/* Long-form mobby articles. Tokens, top bar, chips and buttons come from ../style.css. */
:root {
  --accent-soft: color-mix(in srgb, var(--accent) 9%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 28%, var(--line));
  --ok: #1f9d63;
  --warn: #c27a12;
  --stage-a: #e9effd;
  --stage-b: #f4f1ea;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="white"]) { --stage-a: #18213a; --stage-b: #1b1a17; --ok: #5bd09a; --warn: #e9b155; }
}
:root[data-theme="black"] { --stage-a: #18213a; --stage-b: #1b1a17; --ok: #5bd09a; --warn: #e9b155; }

/* Only one language is visible; the head script sets data-lang before paint. */
html[data-lang="en"] [data-l="zh"],
html:not([data-lang="en"]) [data-l="en"] { display: none !important; }

.crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs .sep { opacity: .5; }

/* hero */
.a-hero {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center;
  padding: 64px 0 48px;
}
.a-hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.a-hero .eyebrow img { width: 20px; height: 20px; border-radius: 5px; }
.a-hero h1 { font-size: clamp(34px, 5.4vw, 54px); letter-spacing: -.02em; }
.a-hero .lede { font-size: 18.5px; margin: 18px 0 26px; }
.prompt {
  position: relative; margin: 0 0 22px; padding: 14px 18px 14px 46px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px;
  font-size: 15.5px; line-height: 1.6; box-shadow: 0 1px 0 var(--line);
}
.prompt::before {
  content: ""; position: absolute; left: 16px; top: 17px; width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #8fb0ff, var(--accent));
}
.prompt small { display: block; margin-bottom: 2px; color: var(--muted); font-size: 12px; letter-spacing: .04em; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.badges li {
  padding: 4px 11px; border-radius: 999px; font-size: 13px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
}
.badges li b { color: var(--text); font-weight: 600; }

.stage {
  position: relative; margin: 0; padding: 34px 0 26px; border-radius: 28px; text-align: center;
  background:
    radial-gradient(120% 80% at 20% 0%, var(--stage-a), transparent 60%),
    radial-gradient(100% 80% at 100% 100%, var(--stage-b), transparent 60%),
    var(--surface);
  border: 1px solid var(--line); overflow: hidden;
}
.stage img { display: block; width: min(300px, 78%); height: auto; margin: 0 auto; filter: drop-shadow(0 22px 34px rgba(20, 30, 60, .22)); }
.stage figcaption { margin-top: 16px; padding: 0 20px; font-size: 12.5px; color: var(--muted); }

/* table of contents */
.toc {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 18px 0 30px;
  border-bottom: 1px solid var(--line); list-style: none; counter-reset: toc;
}
.toc li { counter-increment: toc; }
.toc a {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px;
  font-size: 14px; text-decoration: none; color: var(--muted);
  border: 1px solid var(--line); background: var(--surface); transition: color .15s, border-color .15s;
}
.toc a::before { content: counter(toc, decimal-leading-zero); font: 600 11.5px var(--mono); color: var(--accent); }
.toc a:hover { color: var(--text); border-color: var(--muted); }

/* sections */
.chapter { padding: 64px 0 8px; scroll-margin-top: 64px; }
.chapter-head { max-width: 760px; margin-bottom: 28px; }
.chapter-head .num { display: block; margin-bottom: 10px; font: 600 13px var(--mono); color: var(--accent); letter-spacing: .08em; }
.chapter h2 { margin: 0; font-size: clamp(25px, 3.4vw, 33px); line-height: 1.3; letter-spacing: -.01em; text-wrap: balance; }
.chapter-head p { margin: 14px 0 0; color: var(--muted); font-size: 17px; }
.prose { max-width: 720px; }
.prose p { margin: 0 0 16px; font-size: 16.5px; line-height: 1.85; }
.prose p strong { font-weight: 600; }
code, .mono { font-family: var(--mono); font-size: .9em; }
:not(pre) > code { padding: 1px 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }

/* cards */
.grid-2, .grid-3, .grid-4 { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  position: relative; display: flex; flex-direction: column; padding: 22px 22px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.card h3 { margin: 0 0 8px; font-size: 17.5px; line-height: 1.4; }
.card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.75; }
.card p + p { margin-top: 10px; }
.card .kicker { display: block; margin-bottom: 8px; font-size: 12.5px; font-weight: 600; color: var(--accent); letter-spacing: .04em; }
.card .need { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13.5px; color: var(--muted); }
.card p:has(+ .need) { margin-bottom: 16px; }
.card .need a { color: var(--accent); text-decoration: none; font-weight: 600; }
.card .need b { color: var(--text); font-weight: 600; }
.card.featured { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.flag {
  position: absolute; top: 18px; right: 18px; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--accent-ink); background: var(--accent);
}
.icon-dot {
  display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 14px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent);
}
.icon-dot svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* the observe → act loop */
.loop { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 8px 0 28px; padding: 0; counter-reset: loop; }
.loop li {
  position: relative; list-style: none; padding: 20px 22px; counter-increment: loop;
  background: var(--surface); border: 1px solid var(--line); margin-left: -1px;
}
.loop li:first-child { border-radius: var(--radius) 0 0 var(--radius); margin-left: 0; }
.loop li:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.loop li::before { content: counter(loop, decimal-leading-zero); display: block; font: 600 12px var(--mono); color: var(--accent); margin-bottom: 8px; }
.loop li + li::after {
  content: ""; position: absolute; left: -9px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%) rotate(45deg);
  background: var(--surface); border-top: 1px solid var(--line); border-right: 1px solid var(--line);
}
.loop li > b { display: block; font-size: 17px; margin-bottom: 4px; }
.loop span { color: var(--muted); font-size: 14.5px; line-height: 1.65; }
.loop-back { display: flex; align-items: center; gap: 10px; margin: -16px 0 28px; color: var(--muted); font-size: 13.5px; }
.loop-back::before { content: "↺"; color: var(--accent); font-size: 17px; }

/* callouts */
.note {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start;
  margin: 24px 0; padding: 18px 20px; border-radius: var(--radius);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.note::before {
  content: "i"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  font: 700 13px/1 Georgia, serif; color: var(--accent-ink); background: var(--accent); margin-top: 2px;
}
.note.warn { background: color-mix(in srgb, var(--warn) 9%, transparent); border-color: color-mix(in srgb, var(--warn) 30%, var(--line)); }
.note.warn::before { content: "!"; background: var(--warn); font-family: inherit; }
.note p { margin: 0; font-size: 15.5px; line-height: 1.8; }
.note p + p { margin-top: 8px; }
.note b { font-weight: 600; }

/* two screens illustration */
.screens {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 22px; align-items: center;
  margin: 8px 0 30px; padding: 32px; border-radius: 22px; border: 1px solid var(--line);
  background:
    radial-gradient(90% 90% at 0% 0%, var(--stage-a), transparent 65%),
    radial-gradient(90% 90% at 100% 100%, var(--stage-b), transparent 65%),
    var(--surface);
}
.device {
  position: relative; width: min(220px, 100%); aspect-ratio: 9 / 18.5; margin: 0 auto; padding: 10px;
  border-radius: 30px; background: #1c1f26; box-shadow: 0 20px 40px rgba(15, 20, 40, .25);
}
.device.virtual { background: transparent; border: 2px dashed color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: none; }
.device .glass { position: relative; height: 100%; border-radius: 22px; overflow: hidden; background: #f6f7f9; color: #1b1d21; }
.device.virtual .glass { background: color-mix(in srgb, var(--surface) 92%, var(--accent)); color: var(--text); }
.device-label { margin-top: 14px; text-align: center; font-size: 13.5px; color: var(--muted); }
.device-label b { display: block; color: var(--text); font-size: 15px; }
.mock-bar { height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 12px; font-size: 11px; font-weight: 600; border-bottom: 1px solid #00000010; }
.mock-bar i { width: 14px; height: 14px; border-radius: 4px; background: var(--accent); }
.mock-msg { margin: 10px 38% 0 10px; padding: 8px 10px; border-radius: 10px; font-size: 10px; line-height: 1.45; background: #fff; border: 1px solid #00000012; }
.mock-msg.me { margin-left: 10px; background: #e6eeff; border-color: transparent; }
.mock-step { display: flex; align-items: center; gap: 6px; margin: 6px 38% 0 10px; padding: 6px 8px; border-radius: 8px; font-size: 9.5px; background: #fff; border: 1px solid #00000010; }
.mock-step::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.mock-step.run::before { background: var(--accent); box-shadow: 0 0 0 3px #2f6fe433; }
.mock-pip {
  position: absolute; top: 44px; right: 8px; width: 31%; aspect-ratio: 9 / 16; border-radius: 8px;
  background: #fff; border: 2px solid var(--accent); box-shadow: 0 6px 14px rgba(20, 40, 90, .25); overflow: hidden;
}
.mock-pip::before { content: ""; position: absolute; inset: 0 0 auto; height: 18%; background: #ffd9cf; }
.mock-pip::after { content: ""; position: absolute; left: 12%; right: 12%; top: 32%; height: 40%; border-radius: 4px; background: repeating-linear-gradient(#eef0f4 0 5px, transparent 5px 10px); }
.mock-app { height: 100%; display: flex; flex-direction: column; }
.mock-app .head { height: 18%; background: linear-gradient(135deg, #ff8a6b, #ff5f6d); color: #fff; display: flex; align-items: flex-end; padding: 10px; font-size: 12px; font-weight: 700; }
.mock-app .rows { flex: 1; padding: 10px; display: grid; gap: 7px; align-content: start; }
.mock-app .rows span { height: 22px; border-radius: 6px; background: color-mix(in srgb, var(--text) 7%, transparent); }
.mock-app .rows span.hit { background: color-mix(in srgb, var(--accent) 22%, transparent); outline: 2px solid var(--accent); }
.tap { position: absolute; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 25%, transparent); left: 58%; top: 47%; }
.tap::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); animation: ping 1.8s ease-out infinite; }
@keyframes ping { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tap::after { animation: none; } }
.link-arrow { display: grid; justify-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; text-align: center; max-width: 120px; }
.link-arrow svg { width: 64px; height: 20px; stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-dasharray: 4 4; }

/* checklist style bullets */
.ticks { margin: 0 0 18px; padding: 0; list-style: none; }
.ticks li { position: relative; padding: 0 0 0 30px; margin: 0 0 12px; font-size: 16px; line-height: 1.8; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 18px; height: 18px; border-radius: 6px;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.6 2.5L13 6.5' fill='none' stroke='%232f6fe4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.ticks li b { font-weight: 600; }

/* vertical timeline */
.timeline { position: relative; margin: 8px 0 24px; padding: 0; list-style: none; max-width: 760px; }
.timeline::before { content: ""; position: absolute; left: 15px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--accent), var(--accent-line)); }
.timeline li { position: relative; padding: 0 0 22px 52px; counter-increment: tl; }
.timeline { counter-reset: tl; }
.timeline li::before {
  content: counter(tl); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font: 600 13px var(--mono); color: var(--accent);
  background: var(--surface); border: 2px solid var(--accent);
}
.timeline li > b { display: block; font-size: 17px; margin: 3px 0 4px; }
.timeline span { color: var(--muted); font-size: 15.5px; line-height: 1.75; }

/* numbered steps */
.steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 8px 0 24px; padding: 0; list-style: none; counter-reset: st; }
.steps li { counter-increment: st; padding: 22px 22px 20px 72px; position: relative; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.steps li::before {
  content: counter(st); position: absolute; left: 22px; top: 20px; width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center; font: 700 15px var(--mono); color: var(--accent-ink); background: var(--accent);
}
.steps li > b { display: block; font-size: 16.5px; margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: 15px; line-height: 1.75; }
.steps em { font-style: normal; padding: 0 4px; border-radius: 4px; background: var(--accent-soft); color: var(--text); }

/* key facts */
.kv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 8px 0 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.kv div { padding: 18px 20px; border-left: 1px solid var(--line); }
.kv div:first-child { border-left: 0; }
.kv dt { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.kv dd { margin: 0; font-weight: 600; font-size: 15.5px; line-height: 1.5; }

/* code / file tree card, shares look with the overview page */
.code-card { background: var(--code-bg); border-radius: 14px; overflow: hidden; color: var(--code-text); margin: 0; }
.code-bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; border-bottom: 1px solid #ffffff12; }
.code-bar span { width: 10px; height: 10px; border-radius: 50%; background: #ffffff26; }
.code-bar em { margin-left: 8px; font: 12px var(--mono); font-style: normal; color: var(--code-muted); }
.code-card pre { margin: 0; padding: 18px 20px; overflow-x: auto; font: 13.5px/1.8 var(--mono); }
.code-card .c { color: var(--code-muted); }
.code-card .k { color: #9ab8ff; }
.code-card .s { color: #a5dcb4; }
.code-card .add { color: var(--add); }

.pipe { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; margin: 18px 0 0; padding: 0; list-style: none; font-size: 13.5px; }
.pipe li { position: relative; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.pipe li + li::before { content: "→"; position: absolute; left: -20px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.pipe li.hl { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }

/* capability groups */
.caps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.cap { padding: 20px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.cap h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 16.5px; }
.cap h3 .icon-dot { margin: 0; width: 30px; height: 30px; border-radius: 9px; }
.cap p { margin: 0 0 12px; color: var(--muted); font-size: 14.5px; line-height: 1.7; }
.cap ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cap li { padding: 3px 9px; border-radius: 7px; font: 12.5px var(--mono); background: var(--accent-soft); color: var(--accent); }
.cap li.plain { font-family: inherit; font-size: 13px; color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }

/* examples */
.examples { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.example { display: flex; flex-direction: column; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.example h3 { margin: 0; font-size: 17px; }
.example .meta { margin: 4px 0 12px; font-size: 12.5px; color: var(--accent); font-weight: 600; letter-spacing: .02em; }
.example p { margin: 0 0 10px; color: var(--muted); font-size: 15px; line-height: 1.75; }
.example .result { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 14px; line-height: 1.7; }
.example .result::before { content: "✓ "; color: var(--ok); font-weight: 700; }

/* limits */
.limits { margin: 0; padding: 0; list-style: none; max-width: 820px; border-top: 1px solid var(--line); }
.limits li { display: grid; grid-template-columns: 170px 1fr; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; line-height: 1.75; }
.limits b { font-weight: 600; }
.limits span { color: var(--muted); }

/* next article */
.next {
  display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
  margin: 72px 0 0; padding: 30px 32px; border-radius: 22px; text-decoration: none;
  background:
    radial-gradient(80% 120% at 0% 0%, var(--stage-a), transparent 70%),
    var(--surface);
  border: 1px solid var(--line); transition: border-color .15s, transform .15s;
}
.next:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.next small { display: block; color: var(--accent); font-weight: 600; font-size: 13px; letter-spacing: .04em; }
.next strong { display: block; margin: 4px 0; font-size: 22px; }
.next span { color: var(--muted); font-size: 15px; }
.next .go { font-size: 28px; color: var(--accent); }

.article-footer { margin-top: 56px; }

@media (max-width: 960px) {
  .grid-4, .kv { grid-template-columns: repeat(2, 1fr); }
  .kv div:nth-child(3) { border-left: 0; }
  .kv div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .loop { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .loop li, .loop li:first-child, .loop li:last-child { border-radius: var(--radius); margin-left: 0; }
  .loop li + li::after { display: none; }
}
@media (max-width: 860px) {
  .a-hero { grid-template-columns: 1fr; gap: 32px; padding: 40px 0 32px; }
  .grid-3, .grid-2, .steps, .caps, .examples, .split { grid-template-columns: 1fr; }
  .screens { grid-template-columns: 1fr; padding: 24px; }
  .link-arrow { max-width: none; }
  .link-arrow svg { transform: rotate(90deg); margin: 22px 0; }
  .device { width: min(200px, 70%); }
  .limits li { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 560px) {
  .crumbs .hide-sm { display: none; }
  .loop, .grid-4, .kv { grid-template-columns: 1fr; }
  .kv div { border-left: 0; border-top: 1px solid var(--line); }
  .kv div:first-child { border-top: 0; }
  .steps li { padding: 70px 18px 18px; }
  .steps li::before { left: 18px; top: 18px; }
  .chapter { padding-top: 48px; }
  .next { grid-template-columns: 1fr; padding: 24px; }
  .next .go { display: none; }
  .code-card pre { font-size: 12px; padding: 14px; }
}

/* ============================== article list ============================== */
.list-hero { position: relative; max-width: 820px; padding: 72px 0 40px; }
.list-hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.list-hero .eyebrow img { width: 20px; height: 20px; border-radius: 5px; }
.list-hero h1 { font-size: clamp(34px, 5.4vw, 54px); letter-spacing: -.02em; }
.list-hero .lede { font-size: 18.5px; margin: 18px 0 26px; }
.list-links { display: flex; flex-wrap: wrap; gap: 10px; }

.series { padding: 8px 0 40px; scroll-margin-top: 72px; }
.series + .series { border-top: 1px solid var(--line); padding-top: 48px; }
.series-head { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; margin-bottom: 22px; }
.series-head img { width: 44px; height: 44px; border-radius: 12px; }
.series-head h2 { margin: 0; font-size: 24px; line-height: 1.3; letter-spacing: -.01em; }
.series-head p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.series-links { display: flex; gap: 8px; }
.series-links a {
  padding: 5px 12px; border-radius: 999px; font-size: 13.5px; text-decoration: none; color: var(--muted);
  border: 1px solid var(--line); background: var(--surface); transition: color .15s, border-color .15s;
}
.series-links a:hover { color: var(--text); border-color: var(--muted); }
.posts { display: grid; gap: 22px; }
.post {
  display: grid; grid-template-columns: 300px 1fr; border-radius: 24px; overflow: hidden; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .2s, transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s;
}
.post:hover { border-color: var(--accent-line); transform: translateY(-3px); box-shadow: 0 18px 40px rgba(20, 30, 60, .10); }
.post-visual {
  position: relative; min-height: 330px; overflow: hidden; border-right: 1px solid var(--line);
  background:
    radial-gradient(120% 80% at 20% 0%, var(--stage-a), transparent 60%),
    radial-gradient(100% 80% at 100% 100%, var(--stage-b), transparent 60%),
    var(--bg);
}
.post-visual img {
  position: absolute; left: 50%; top: 30px; width: 210px; height: auto; transform: translateX(-50%);
  filter: drop-shadow(0 18px 28px rgba(20, 30, 60, .22)); transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.post:hover .post-visual img { transform: translateX(-50%) translateY(-16px); }
.post-body { display: flex; flex-direction: column; padding: 30px 34px 26px; }
.post-tag { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: .04em; }
.post-tag span { padding: 2px 8px; border-radius: 999px; font: 600 12px var(--mono); background: var(--accent-soft); }
.post h3 { margin: 0; font-size: clamp(24px, 3vw, 30px); line-height: 1.3; letter-spacing: -.01em; }
.post-sum { margin: 12px 0 18px; color: var(--muted); font-size: 16px; line-height: 1.8; }
.post-chapters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; padding: 0; list-style: none; counter-reset: pc; }
.post-chapters li {
  counter-increment: pc; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12.5px; color: var(--muted); border: 1px solid var(--line);
}
.post-chapters li::before { content: counter(pc, decimal-leading-zero); font: 600 11px var(--mono); color: var(--accent); }
.post-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--line); }
.post-meta { font-size: 13.5px; color: var(--muted); }
.post-go { font-size: 15px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.post-go b { display: inline-block; transition: transform .2s; }
.post:hover .post-go b { transform: translateX(5px); }

.byline { margin: 18px 0 0; font-size: 13.5px; color: var(--muted); }
.byline a { text-decoration: none; color: var(--text); font-weight: 600; }

@media (max-width: 860px) {
  .post { grid-template-columns: 1fr; }
  .post-visual { min-height: 250px; border-right: 0; border-bottom: 1px solid var(--line); }
  .post-visual img { width: 190px; }
}
@media (max-width: 560px) {
  .list-hero { padding: 44px 0 28px; }
  .series-head { grid-template-columns: auto 1fr; }
  .series-links { grid-column: 1 / -1; }
  .post-body { padding: 22px 20px 20px; }
}

/* ============================== motion ============================== */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(26px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes spin { to { transform: rotate(1turn); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes loop-hl {
  0%, 22% { box-shadow: inset 0 -3px 0 var(--accent); color: var(--accent); }
  30%, 100% { box-shadow: inset 0 -3px 0 transparent; color: inherit; }
}
@keyframes chip-hl {
  0%, 14% { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  24%, 100% { border-color: var(--line); color: inherit; box-shadow: none; }
}
@keyframes dash { to { stroke-dashoffset: -16; } }
@keyframes hit { 0%, 100% { outline-color: var(--accent); } 50% { outline-color: transparent; } }

/* hero entrance: plays without JS too, and always ends visible */
.a-hero > div > *, .list-hero > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.a-hero > div > :nth-child(2), .list-hero > :nth-child(2) { animation-delay: .08s; }
.a-hero > div > :nth-child(3), .list-hero > :nth-child(3) { animation-delay: .16s; }
.a-hero > div > :nth-child(4), .list-hero > :nth-child(4) { animation-delay: .24s; }
.a-hero > div > :nth-child(5) { animation-delay: .32s; }
.a-hero > div > :nth-child(6) { animation-delay: .4s; }
.badges li { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; }
.badges li:nth-child(1) { animation-delay: .45s; }
.badges li:nth-child(2) { animation-delay: .52s; }
.badges li:nth-child(3) { animation-delay: .59s; }
.badges li:nth-child(4) { animation-delay: .66s; }
.a-hero .stage { animation: pop .9s .2s cubic-bezier(.2, .7, .2, 1) both; }
.stage::before {
  content: ""; position: absolute; left: 50%; top: 42%; width: 140%; aspect-ratio: 1; margin-left: -70%; margin-top: -70%;
  background: conic-gradient(from 0deg, transparent 0 55%, color-mix(in srgb, var(--accent) 16%, transparent) 70%, transparent 85%);
  animation: spin 16s linear infinite; pointer-events: none;
}
.stage img, .stage figcaption { position: relative; }
.stage img { animation: float 6s 1.2s ease-in-out infinite; }

/* typed prompt: the full sentence is laid out from the start, so nothing shifts */
.prompt .ghost { color: transparent; }
.prompt .caret {
  display: inline-block; width: 2px; height: 1.05em; margin: 0 1px; vertical-align: -.15em;
  background: var(--accent); animation: blink 1s steps(1) infinite;
}

/* scroll reveal, only when the script runs */
.js .reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }

/* pieces that come alive once they are on screen */
.loop.live li { animation: loop-hl 8s infinite; }
.loop.live li:nth-child(2) { animation-delay: 2s; }
.loop.live li:nth-child(3) { animation-delay: 4s; }
.loop.live li:nth-child(4) { animation-delay: 6s; }
.pipe.live li { animation: chip-hl calc(var(--n, 6) * .55s + 1.6s) calc(var(--i, 0) * .55s) infinite; }
.js .timeline::before { transform: scaleY(0); transform-origin: top; transition: transform 1.4s cubic-bezier(.2, .7, .2, 1) .2s; }
.js .timeline.live::before { transform: none; }
.js .screens .mock-msg, .js .screens .mock-step, .js .screens .mock-pip { opacity: 0; }
.screens.live .mock-msg, .screens.live .mock-step, .screens.live .mock-pip { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; }
.screens.live .glass > :nth-child(3) { animation-delay: .5s; }
.screens.live .glass > :nth-child(4) { animation-delay: .9s; }
.screens.live .glass > :nth-child(5) { animation-delay: 1.3s; }
.screens.live .glass > :nth-child(6) { animation-delay: 1.7s; }
.screens.live .mock-pip { animation-delay: 2.1s; }
.screens.live .link-arrow svg { animation: dash 1.2s linear infinite; }
.screens.live .rows span.hit { animation: hit 1.8s 2.4s ease-in-out infinite; }

/* reading progress */
.progress {
  position: fixed; left: 0; top: 0; z-index: 30; width: 100%; height: 3px; pointer-events: none;
  transform: scaleX(var(--p, 0)); transform-origin: left;
  background: linear-gradient(90deg, var(--accent), #8fb0ff);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .screens .mock-msg, .js .screens .mock-step, .js .screens .mock-pip { opacity: 1; transform: none; }
  .js .timeline::before { transform: none; }
  .prompt .ghost { color: inherit; }
}
