/* Holdfast — warm paper, deep sea-green, amber for "held". Light and dark. */

:root {
  --bg: #f6f1e7;
  --bg-2: #efe8da;
  --surface: #fffdf8;
  --ink: #1b2430;
  --ink-2: #3d4757;
  --muted: #6b7380;
  --line: #e2d9c8;
  --line-2: #d4c8b2;

  --brand: #1f5c50;
  --brand-ink: #f6f1e7;
  --brand-soft: #dcebe4;

  --ok: #2d7a4c;
  --ok-soft: #e1f1e6;
  --held: #a35f0a;
  --held-soft: #fbedd4;
  --busy: #3657a8;
  --busy-soft: #e3e9f7;
  --bad: #b3261e;
  --bad-soft: #f9e1de;
  --quiet: #6b7380;
  --quiet-soft: #ece7dd;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(27, 36, 48, .04), 0 10px 30px -12px rgba(27, 36, 48, .18);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12171d;
    --bg-2: #171e26;
    --surface: #1b232c;
    --ink: #ece6da;
    --ink-2: #c9c2b5;
    --muted: #949aa3;
    --line: #2b3540;
    --line-2: #37424f;
    --brand: #6cc3ad;
    --brand-ink: #0f1a17;
    --brand-soft: #1d3530;
    --ok: #6fcf94;
    --ok-soft: #183427;
    --held: #f0b45c;
    --held-soft: #3a2a12;
    --busy: #8fa9ec;
    --busy-soft: #1d2740;
    --bad: #f08a80;
    --bad-soft: #3b1d1a;
    --quiet: #949aa3;
    --quiet-soft: #232c36;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 14px 34px -14px rgba(0, 0, 0, .6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-underline-offset: 3px; }
code, pre { font-family: var(--mono); font-size: .88em; }
code { background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: .05em .4em; }
pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; overflow-x: auto; line-height: 1.5; }
pre code { background: none; border: 0; padding: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 650; letter-spacing: -.01em; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 .8em; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 860px; }
.muted { color: var(--muted); }
.bad { color: var(--bad); }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .5em; }
.lede { font-size: 1.12rem; color: var(--ink-2); max-width: 38em; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font: 600 .95rem/1 var(--sans);
  padding: .85em 1.25em; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--brand); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn--small { padding: .6em 1em; font-size: .85rem; }
.link { background: none; border: 0; padding: 0; color: var(--brand); font: 600 .82rem var(--sans); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
button:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }

/* ---- header / footer ---- */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 650 1.2rem var(--serif); }
.logo { width: 32px; height: 32px; }
.logo__bg { fill: var(--brand); }
.logo__line { fill: none; stroke: var(--brand-ink); stroke-width: 2.4; stroke-linecap: round; }
.nav { display: flex; align-items: center; gap: 18px; font-size: .92rem; }
.nav a { color: var(--ink-2); text-decoration: none; }
.nav a:hover { color: var(--brand); }
.nav__game { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--held-soft); color: var(--held) !important; font-weight: 600; font-size: .82rem; }
.i-lock { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; flex: none; }
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.foot { border-top: 1px solid var(--line); margin-top: 96px; padding: 40px 0 56px; color: var(--muted); font-size: .9rem; background: var(--bg-2); }
.foot__inner { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px 40px; }
.foot__inner p { max-width: 36em; }
.foot__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; align-content: start; justify-items: start; }
.foot__links a { color: var(--ink-2); text-decoration: none; }
.foot__links a:hover { color: var(--brand); }
.foot__meta { grid-column: 1 / -1; font-size: .8rem; margin-top: 8px; }
.brand--small { font-size: 1rem; margin-bottom: 8px; }
.brand--small .logo { width: 24px; height: 24px; }
@media (max-width: 640px) { .foot__inner { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .nav a:not(.nav__game) { display: none; } }

/* ---- hero ---- */
.hero { padding: 64px 0 40px; }
.hero__inner { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
.hero__text, .hero__art, .controls, .step, .level__body { min-width: 0; }
.hero h1 em { font-style: italic; color: var(--brand); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.flow { width: 100%; height: auto; }
.flow__wire { stroke: var(--line-2); stroke-width: 3; stroke-dasharray: 2 9; stroke-linecap: round; fill: none; }
.flow__node rect { fill: var(--surface); stroke: var(--line-2); stroke-width: 1.5; }
.flow__node--app rect { stroke: var(--held); stroke-dasharray: 5 4; }
.flow text { font: 600 14px var(--sans); fill: var(--ink); text-anchor: middle; }
.flow .flow__small { font: 400 11px var(--sans); fill: var(--muted); }
.flow__vault-bg { fill: var(--brand); }
.flow__vault circle, .flow__vault path { fill: none; stroke: var(--brand-ink); stroke-width: 3.2; stroke-linecap: round; }
.flow__vault text { fill: var(--brand-ink); font-family: var(--serif); font-size: 15px; }
.flow__msg rect { fill: var(--surface); stroke: var(--brand); stroke-width: 1.8; }
.flow__msg path { fill: none; stroke: var(--brand); stroke-width: 1.6; }
.flow__msg--a { animation: travel 4.5s ease-in-out infinite; }
.flow__msg--b { animation: travel-held 4.5s ease-in-out infinite 2.25s; opacity: 0; }
.flow__held rect { fill: var(--held-soft); stroke: var(--held); stroke-width: 1.4; }
.flow__held text { fill: var(--held); font-size: 12px; }
@keyframes travel { 0% { transform: translate(134px, 150px); opacity: 0; } 10% { opacity: 1; } 45%, 55% { transform: translate(210px, 150px); } 90% { opacity: 1; } 100% { transform: translate(286px, 150px); opacity: 0; } }
@keyframes travel-held { 0% { transform: translate(134px, 150px); opacity: 0; } 10% { opacity: 1; } 45% { transform: translate(210px, 150px); } 70%, 92% { transform: translate(210px, 214px); opacity: 1; } 100% { transform: translate(210px, 214px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .flow__msg--a, .flow__msg--b { animation: none; } .flow__msg--a { transform: translate(210px, 150px); } }
@media (max-width: 860px) { .hero { padding-top: 36px; } .hero__inner { grid-template-columns: 1fr; } .hero__art { max-width: 460px; } }

/* ---- sections ---- */
section { scroll-margin-top: 80px; }
.section-head { max-width: 46em; margin-bottom: 28px; }
.section-head p:not(.eyebrow) { color: var(--ink-2); }
.demo, .how, .open, .route, .paths, .example, .honest, .live-in, .conns, .connect { padding: 56px 0 16px; }

/* ---- demo ---- */
.demo__grid { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
.controls { display: grid; gap: 10px; position: sticky; top: 84px; }
.controls form { margin: 0; }
.control {
  width: 100%; text-align: left; cursor: pointer;
  display: grid; gap: 3px; padding: 14px 16px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .15s ease, transform .12s ease, box-shadow .2s ease;
  font: inherit;
}
.control:hover { border-color: var(--brand); transform: translateX(2px); box-shadow: var(--shadow); }
.control:disabled { opacity: .55; cursor: progress; }
.control__label { font-weight: 600; }
.control__explain { font-size: .88rem; color: var(--muted); }
.control__lock { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: .76rem; font-weight: 600; color: var(--held); }
.controls__foot { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.dash { display: grid; gap: 16px; min-width: 0; }
@media (max-width: 900px) { .demo__grid { grid-template-columns: 1fr; } .controls { position: static; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); } }

/* ---- verdict ---- */
.verdict {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 20px 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  border-left: 6px solid var(--tone);
  --tone: var(--quiet); --tone-soft: var(--quiet-soft);
}
.verdict--ok { --tone: var(--ok); --tone-soft: var(--ok-soft); }
.verdict--held { --tone: var(--held); --tone-soft: var(--held-soft); }
.verdict--busy { --tone: var(--busy); --tone-soft: var(--busy-soft); }
.verdict__mark { width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--tone-soft); position: relative; }
.verdict__mark::after { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: var(--tone); }
.verdict--busy .verdict__mark::after { animation: pulse 1.2s ease-in-out infinite; }
.verdict__text { flex: 1; min-width: 200px; }
.verdict__text h3 { font-size: 1.35rem; margin: 0 0 2px; }
.verdict__text p { margin: 0; color: var(--ink-2); }
@keyframes pulse { 50% { transform: scale(.6); opacity: .6; } }

/* ---- client note ---- */
.note { padding: 18px 22px; border-radius: var(--radius); background: var(--held-soft); border: 1px solid color-mix(in srgb, var(--held) 30%, transparent); }
.note__head { display: flex; justify-content: space-between; align-items: baseline; }
.note p { font-family: var(--serif); font-size: 1.08rem; color: var(--ink); margin: 0 0 6px; }
.note .byline { font-family: var(--sans); }
.byline { font-size: .8rem !important; color: var(--muted) !important; margin: 0; }

/* ---- timeline ---- */
.feed { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 8px 8px; }
.feed__head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 12px; }
.feed__count { font-size: .78rem; color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline .empty { padding: 16px 12px; color: var(--muted); }
.card a { display: flex; gap: 12px; padding: 12px; border-radius: var(--radius-sm); color: inherit; text-decoration: none; }
.card a:hover { background: var(--bg); }
.card__dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--quiet); }
.card--delivered .card__dot { background: var(--ok); }
.card--held .card__dot { background: var(--held); box-shadow: 0 0 0 4px var(--held-soft); }
.card--retrying .card__dot, .card--pending .card__dot { background: var(--busy); animation: pulse 1.2s infinite; }
.card--duplicate .card__dot { background: var(--quiet); }
.card__main { display: grid; gap: 4px; flex: 1; min-width: 0; }
.card__top { display: flex; justify-content: space-between; gap: 12px; }
.card__what { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card time { font: .8rem var(--mono); color: var(--muted); flex: none; }
.card__bottom { display: flex; align-items: center; gap: 10px; min-width: 0; }
.card__why { font-size: .88rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card + .card { border-top: 1px solid var(--line); }

/* ---- pills ---- */
.pill { display: inline-flex; align-items: center; gap: 4px; font: 600 .74rem/1 var(--sans); padding: 5px 9px; border-radius: 999px; background: var(--quiet-soft); color: var(--quiet); white-space: nowrap; flex: none; }
.pill--delivered { background: var(--ok-soft); color: var(--ok); }
.pill--held { background: var(--held-soft); color: var(--held); }
.pill--retrying, .pill--pending { background: var(--busy-soft); color: var(--busy); }

/* ---- order book ---- */
.ledger { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.ledger__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ledger__sum { color: var(--ink-2); font-size: .92rem; }
.ledger__list { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.ledger__list li { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; padding: 7px 0; border-top: 1px dashed var(--line); }
.ledger__list li.repeat { color: var(--bad); }
.ledger__list li em { grid-column: 1 / -1; font-size: .78rem; font-style: normal; font-weight: 600; }
.ledger__list .empty { display: block; color: var(--muted); }
.ledger__amt { font-family: var(--mono); }
.ledger__item { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--ok); }
.shop__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.shop--down { color: var(--bad); }
.shop--slow { color: var(--held); }
.shop--down .shop__dot, .shop--slow .shop__dot { animation: pulse 1s infinite; }

/* ---- the WIP tile: the locked parts of the site ---- */
.wip {
  position: relative; overflow: hidden;
  border-radius: var(--radius-sm); border: 1.5px dashed var(--line-2);
  background: repeating-linear-gradient(-45deg, transparent 0 10px, color-mix(in srgb, var(--line) 45%, transparent) 10px 11px), var(--bg);
  min-height: 132px;
}
.wip--cracked { border-color: var(--held); }
.wip__ghost { position: absolute; inset: 18px; display: grid; gap: 10px; align-content: start; filter: blur(5px); opacity: .55; }
.wip__ghost span { height: 12px; border-radius: 6px; background: var(--line-2); }
.wip__ghost span:nth-child(1) { width: 70%; }
.wip__ghost span:nth-child(2) { width: 92%; }
.wip__ghost span:nth-child(3) { width: 48%; }
.wip__body { position: relative; padding: 16px 18px; display: grid; gap: 4px; justify-items: start; }
.wip__badge { display: inline-flex; align-items: center; gap: 6px; font: 600 .74rem var(--sans); letter-spacing: .02em; padding: 5px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2); }
.wip--cracked .wip__badge { color: var(--held); border-color: var(--held); }
.wip__title { font-weight: 600; margin: 4px 0 0; }
.wip code { overflow-wrap: anywhere; }
.wip__fail { font-size: .86rem; color: var(--held); margin: 0; }
.wip__hint { font-size: .82rem; color: var(--muted); margin: 0; }
.wip-inline { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--held); text-decoration: none; padding: 6px 10px; border: 1px dashed var(--held); border-radius: 999px; }

/* ---- how it works ---- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 8px; align-content: start; }
.step__n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font: 650 1rem var(--serif); }
.step p { color: var(--ink-2); margin: 0; }
.step__demo { display: flex; flex-wrap: wrap; gap: 6px; }
.try-chip { font: 600 .74rem var(--sans); padding: 5px 9px; border-radius: 999px; }
.try-chip--held { background: var(--held-soft); color: var(--held); }
.try-chip--ok { background: var(--ok-soft); color: var(--ok); }
.sig { display: inline-flex; align-items: center; gap: 6px; }
.step .sig { font: 600 .78rem var(--sans); padding: 5px 9px; border-radius: 999px; }
.sig--ok { color: var(--ok); }
.step .sig--ok { background: var(--ok-soft); }
.sig--bad { color: var(--bad); }
.step .sig--bad { background: var(--bad-soft); }
.sig--quiet { color: var(--muted); }
.chg { font-size: .8rem; }
.chg--added { color: var(--ok); }
.chg--removed { color: var(--bad); text-decoration: line-through; text-decoration-thickness: 1px; }
.chg--retyped { color: var(--held); }

/* ---- open models ---- */
.open__inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; background: var(--brand); color: var(--brand-ink); border-radius: calc(var(--radius) + 6px); padding: 40px; }
.open .eyebrow { color: color-mix(in srgb, var(--brand-ink) 70%, transparent); }
.open__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.open__list strong { font-family: var(--serif); font-size: 1.05rem; }
@media (max-width: 760px) { .open__inner { grid-template-columns: 1fr; padding: 28px 22px; } }

/* ---- event page ---- */
.crumbs { margin: 28px 0 8px; font-size: .9rem; }
.crumbs a { text-decoration: none; }
.ev-head { margin-bottom: 18px; }
.ev-head h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.story { padding: 24px 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--quiet); box-shadow: var(--shadow); margin-bottom: 20px; }
.story--held { border-left-color: var(--held); }
.story--delivered { border-left-color: var(--ok); }
.story--retrying, .story--pending { border-left-color: var(--busy); }
.story h2 { display: flex; align-items: center; gap: 12px; font-size: 1.6rem; }
.story__summary { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--brand); animation: spin .9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner--small { display: inline-block; width: 12px; height: 12px; border-width: 2px; margin-right: 6px; vertical-align: -1px; }
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; min-width: 0; }
.panel h3 { font-size: 1.02rem; }
@media (max-width: 720px) { .panels { grid-template-columns: 1fr; } }
.tries { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.try { display: grid; gap: 2px; padding-left: 14px; border-left: 3px solid var(--quiet); font-size: .9rem; }
.try--ok { border-color: var(--ok); }
.try--busy { border-color: var(--busy); }
.try--held { border-color: var(--held); }
.try time { font: .76rem var(--mono); color: var(--muted); }
.try span { color: var(--ink-2); }
.changes { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: .9rem; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 20px; margin-top: 16px; }
details summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 10px; }
.headers { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font: .82rem var(--mono); margin: 0 0 12px; }
.headers dt { color: var(--muted); }
.headers dd { margin: 0; overflow-wrap: anywhere; }
details h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 6px; }

/* ---- unlock board ---- */
.game-head { padding: 44px 0 12px; }
.game-head--done h1 { color: var(--ok); }
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 18px 0 6px; max-width: 420px; }
.meter__seg { height: 12px; border-radius: 6px; background: var(--line); }
.meter__seg--cracked { background: linear-gradient(90deg, var(--held) 50%, var(--line) 50%); }
.meter__seg--unlocked { background: var(--ok); }
.meter__label { font-size: .88rem; color: var(--muted); }
.howto { background: var(--brand-soft); border-radius: var(--radius); padding: 18px 24px; margin: 16px 0 24px; }
.howto h2 { font-size: 1.1rem; }
.howto ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.levels { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.level { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.level--locked { opacity: .9; }
.level--cracked { border-color: var(--held); }
.level--unlocked { border-color: var(--ok); }
.level__n { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; font: 650 1.15rem var(--serif); background: var(--bg-2); color: var(--muted); }
.level--cracked .level__n { background: var(--held-soft); color: var(--held); }
.level--unlocked .level__n { background: var(--ok-soft); color: var(--ok); }
.level__body { flex: 1; min-width: 0; }
.level__top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.level__top h2 { font-size: 1.3rem; margin: 0; }
.level__reveals { color: var(--ink-2); margin: 6px 0; }
.level__file { font-size: .86rem; color: var(--muted); }
.level details { margin-top: 10px; padding: 10px 14px; background: var(--bg); }
.badge { font: 600 .74rem var(--sans); padding: 5px 10px; border-radius: 999px; background: var(--quiet-soft); color: var(--quiet); }
.badge--cracked { background: var(--held-soft); color: var(--held); }
.badge--unlocked { background: var(--ok-soft); color: var(--ok); }
.checks-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 10px; }
.checks-bar span { display: block; height: 100%; background: var(--held); border-radius: 3px; transition: width .6s ease; }
.level--unlocked .checks-bar span { background: var(--ok); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: .88rem; }
.checks li { display: grid; grid-template-columns: 18px 1fr; }
.checks li.pass span { color: var(--ok); font-weight: 700; }
.checks li.fail { color: var(--ink-2); }
.checks small { grid-column: 2; color: var(--held); font-family: var(--mono); font-size: .76rem; white-space: pre-wrap; }
.level--finale { background: linear-gradient(135deg, var(--ok-soft), var(--surface)); }

/* ---- toast ---- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-size: .9rem; box-shadow: var(--shadow); z-index: 20; max-width: calc(100vw - 32px); }
.toast--bad { background: var(--bad); color: #fff; }
.fresh { animation: fresh 1.6s ease; }
@keyframes fresh { from { background: var(--brand-soft); } }


/* =============================================================================================
   Demo / Live
   ============================================================================================= */

.btn--big { padding: 1em 1.4em; font-size: 1rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.i-gh { width: 18px; height: 18px; fill: currentColor; flex: none; }
.hero__fine { font-size: .85rem; color: var(--muted); margin-top: 14px; }

/* the mode switch in the header */
.top__inner { gap: 12px; }
.modes { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); }
.modes__item { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 999px; font: 600 .86rem var(--sans); color: var(--ink-2); text-decoration: none; transition: background .2s ease, color .2s ease; }
.modes__item:hover { color: var(--ink); }
.modes__item.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--line); }
.modes__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.modes__dot--demo { background: var(--held); }
.modes__dot--live { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.top__right { display: flex; align-items: center; gap: 14px; font-size: .9rem; }
.top__right form { margin: 0; }
.top__link { color: var(--ink-2); text-decoration: none; }
.me { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 600; }
.me img, .me__initial { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); }
.me__initial { display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: .8rem; text-transform: uppercase; }
@media (max-width: 720px) { .top__link, .me__name { display: none; } .top .brand span { display: none; } }

/* mode banners */
.banner { border-bottom: 1px solid var(--line); }
.banner--demo { background: color-mix(in srgb, var(--held-soft) 70%, var(--bg)); }
.banner--live { background: color-mix(in srgb, var(--ok-soft) 70%, var(--bg)); }
.banner__inner { display: flex; align-items: center; gap: 14px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.banner__inner p { margin: 0; font-size: .9rem; color: var(--ink-2); flex: 1; min-width: 240px; }
.banner__tag { display: inline-flex; align-items: center; gap: 8px; font: 600 .78rem var(--sans); text-transform: uppercase; letter-spacing: .06em; padding: 5px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.section-head--tight { margin-bottom: 22px; }
.section-head--tight h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }

/* the two paths on the landing page */
.paths__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.path { position: relative; display: grid; gap: 10px; align-content: start; padding: 28px; border-radius: calc(var(--radius) + 4px); background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; box-shadow: var(--shadow); transition: transform .18s ease, border-color .2s ease; overflow: hidden; }
.path::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; }
.path--demo::after { background: var(--held); }
.path--live::after { background: var(--ok); }
.path:hover { transform: translateY(-3px); border-color: var(--line-2); }
.path h3 { font-size: 1.6rem; margin: 0; }
.path p { color: var(--ink-2); margin: 0; }
.path__badge { display: inline-flex; align-items: center; gap: 8px; justify-self: start; font: 600 .76rem var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.path__go { font-weight: 600; color: var(--brand); margin-top: 6px; }
.ticks { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; font-size: .93rem; color: var(--ink-2); }
.ticks li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: start; }
.ticks .i { color: var(--ok); margin-top: 2px; }
@media (max-width: 760px) { .paths__grid { grid-template-columns: 1fr; } }

/* example answer */
.example__inner { display: grid; grid-template-columns: 1fr 1.25fr; gap: 40px; align-items: center; }
.example__text p:not(.eyebrow) { color: var(--ink-2); }
.example__card { margin: 0; display: grid; gap: 12px; }
.example__card figcaption { font-size: .8rem; color: var(--muted); }
.example__dev { padding: 16px 20px; border-radius: var(--radius); background: var(--bg-2); border: 1px dashed var(--line-2); font-size: .92rem; }
.example__dev p { margin: 4px 0 0; }
.story--compact { margin: 0; padding: 22px 24px; }
.story--compact h3 { font-size: 1.35rem; margin-bottom: 6px; }
.story--compact .story__summary { font-size: 1.05rem; }
@media (max-width: 860px) { .example__inner { grid-template-columns: 1fr; gap: 20px; } }

/* what's real today */
.honest__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.honest__item { padding: 18px 20px 18px 46px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); position: relative; color: var(--ink-2); }
.honest__item strong { color: var(--ink); }
.honest__item::before { position: absolute; left: 18px; top: 19px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font: 700 .7rem var(--sans); }
.honest__item--ok::before { content: "✓"; background: var(--ok-soft); color: var(--ok); }
.honest__item--part::before { content: "!"; background: var(--held-soft); color: var(--held); }
@media (max-width: 760px) { .honest__list { grid-template-columns: 1fr; } }

/* Live: signed out */
.live-in__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.live-in h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.numbered { counter-reset: n; list-style: none; padding: 0; margin: 20px 0 28px; display: grid; gap: 16px; }
.numbered > li { counter-increment: n; position: relative; padding-left: 46px; color: var(--ink-2); }
.numbered > li::before { content: counter(n); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font: 650 .95rem var(--serif); }
.numbered strong { color: var(--ink); }
.numbered--small { margin: 8px 0 0; gap: 12px; font-size: .9rem; }
.numbered--small > li { padding-left: 34px; }
.numbered--small > li::before { width: 24px; height: 24px; font-size: .8rem; }
.fine { font-size: .84rem; color: var(--muted); margin-top: 10px; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: grid; gap: 8px; align-content: start; }
.side-card + .side-card { margin-top: 14px; }
.side-card h3 { margin: 0; font-size: 1.1rem; }
.side-card p { margin: 0; color: var(--ink-2); font-size: .92rem; }
.side-card--todo { border-color: var(--held); box-shadow: 0 0 0 3px var(--held-soft); }
.side-card--quiet { background: transparent; border-style: dashed; }
@media (max-width: 860px) { .live-in__grid { grid-template-columns: 1fr; } }

/* source badges */
.src { display: inline-flex; align-items: center; font: 600 .72rem var(--sans); letter-spacing: .04em; text-transform: uppercase; padding: 4px 9px; border-radius: 6px; background: var(--quiet-soft); color: var(--ink-2); justify-self: start; }
.src--github { background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink); }
.src--stripe { background: color-mix(in srgb, #635bff 16%, transparent); color: #635bff; }
@media (prefers-color-scheme: dark) { .src--stripe { color: #a29bff; } }

/* Live: connections */
.conns__head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.conns__head h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.5rem); }
.conn-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.conn-card { display: grid; gap: 10px; padding: 20px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; box-shadow: var(--shadow); transition: transform .15s ease, border-color .2s ease; }
.conn-card:hover { transform: translateY(-2px); border-color: var(--brand); }
.conn-card--held { border-left: 5px solid var(--held); }
.conn-card__top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.conn-card__where { font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conn-card h3 { margin: 0; font-size: 1.25rem; overflow-wrap: anywhere; }
.conn-card__stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.stat strong { font: 650 1.1rem var(--serif); color: var(--ink); margin-right: 3px; }
.stat--ok strong { color: var(--ok); }
.stat--held strong { color: var(--held); }
.stat--busy strong { color: var(--busy); }
.conn-card__go { font-weight: 600; font-size: .88rem; color: var(--brand); }
.empty-state { text-align: center; padding: 56px 24px; border: 1.5px dashed var(--line-2); border-radius: calc(var(--radius) + 4px); display: grid; gap: 12px; justify-items: center; }
.empty-state h2 { margin: 0; }
.empty-state p { color: var(--ink-2); margin: 0; }

/* Live: new connection */
.tabs { display: flex; gap: 6px; margin: 18px 0; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .92rem; }
.tab.is-on { border-color: var(--brand); color: var(--ink); box-shadow: 0 0 0 3px var(--brand-soft); }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 2px); padding: 26px; display: grid; gap: 22px; box-shadow: var(--shadow); }
.field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-weight: 600; padding: 0; }
.field legend { margin-bottom: 8px; }
.field .opt { font-weight: 400; color: var(--muted); font-size: .85rem; margin-left: 6px; }
.field input[type=url], .field input:not([type]), .field select, .inline-form input {
  width: 100%; font: 400 1rem var(--sans); color: var(--ink); background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 11px 13px;
}
.field input:focus, .field select:focus, .inline-form input:focus { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
.hint { margin: 0; font-size: .85rem; color: var(--muted); }
.form-error { margin: 0 0 16px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bad-soft); color: var(--bad); font-weight: 500; font-size: .92rem; }
.field .form-error { margin: 0; }
.choice { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-weight: 400 !important; }
.choice:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 50%, transparent); }
.choice input { margin-top: 4px; accent-color: var(--brand); }
.choice strong { display: block; }
.choice small { display: block; color: var(--muted); font-size: .86rem; margin-top: 2px; }
.choice__url { display: none; }
.field:has(input[value=own]:checked) .choice__url { display: block; }

/* Live: one connection */
.route__head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.route__head h1 { margin: 8px 0 4px; font-size: clamp(1.7rem, 4vw, 2.4rem); overflow-wrap: anywhere; }
.route__sub { color: var(--muted); margin: 0; }
.route__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.route__side { position: sticky; top: 84px; }
@media (max-width: 960px) { .route__grid { grid-template-columns: 1fr; } .route__side { position: static; } }
.welcome { padding: 14px 18px; border-radius: var(--radius); background: var(--ok-soft); color: var(--ink); margin-bottom: 18px; border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); }
.copyline { display: flex; align-items: center; gap: 10px; margin-top: 4px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--line); min-width: 0; }
.copyline code { background: none; border: 0; padding: 0; font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.inline-form { display: flex; gap: 8px; margin: 8px 0 4px; }
.inline-form input { padding: 8px 10px; font-size: .9rem; }
.todo { display: block; color: var(--held); font-size: .82rem; font-weight: 600; }
.done { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-size: .82rem; font-weight: 600; }
.done .i { width: 15px; height: 15px; }
.modepick { display: grid; gap: 6px; }
.modepick form { margin: 0; }
.modepick__btn { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); font: 500 .9rem var(--sans); cursor: pointer; }
.modepick__btn:hover { border-color: var(--line-2); color: var(--ink); }
.modepick__btn.is-on { border-color: var(--brand); color: var(--ink); background: var(--surface); box-shadow: 0 0 0 3px var(--brand-soft); font-weight: 600; }
.modepick__dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.modepick__dot--working { background: var(--ok); }
.modepick__dot--down { background: var(--bad); }
.modepick__dot--strict { background: var(--held); }
.modepick__dot--slow { background: var(--busy); }
.link--danger { color: var(--bad); }

/* small refinements to the shared pieces */
.card__go { color: var(--line-2); font-size: 1.3rem; line-height: 1; align-self: center; transition: transform .15s ease, color .15s ease; }
.card a:hover .card__go { color: var(--brand); transform: translateX(2px); }
.controls__head { margin: 0 0 2px; }
.control { position: relative; padding-left: 40px; }
.control::before { content: ""; position: absolute; left: 17px; top: 20px; width: 9px; height: 9px; border-radius: 50%; background: var(--held); }
.control--healthy::before { background: var(--ok); }

/* layout fixes */
body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }
.side-card > *, .numbered > li, .route__side { min-width: 0; }
.numbered--small .copyline { max-width: 100%; }
.steps { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.side-card { grid-template-columns: minmax(0, 1fr); }
.numbered--small > li { overflow-wrap: anywhere; }
.inline-form .btn { flex: none; white-space: nowrap; }

/* =============================================================================================
   Lighter pages: pitch, GitHub button, chips
   ============================================================================================= */
.kicker { display: inline-flex; align-items: center; gap: 8px; font: 600 .8rem var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
h1 em { font-style: italic; color: var(--brand); }

.btn--gh { background: #1f2328; border-color: #1f2328; color: #fff; }
.btn--gh:hover { background: #32383f; border-color: #32383f; }
.btn--gh .i-gh { width: 20px; height: 20px; }
.btn--huge { padding: 1.05em 1.8em; font-size: 1.08rem; gap: .7em; box-shadow: 0 10px 24px -12px rgba(31, 35, 40, .55); }
.btn--wide { width: 100%; justify-content: center; }
.btn.is-off { opacity: .45; pointer-events: none; }
@media (prefers-color-scheme: dark) {
  .btn--gh { background: #f0f3f6; border-color: #f0f3f6; color: #1f2328; }
  .btn--gh:hover { background: #fff; border-color: #fff; }
}

.pitch { padding: 72px 0 24px; text-align: center; }
.pitch__inner { display: grid; justify-items: center; gap: 20px; max-width: 760px; }
.pitch h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin: 4px 0 0; }
.pitch__lede { font-size: 1.2rem; color: var(--ink-2); margin: 0; max-width: 30em; }
.pitch__off { margin: -6px 0 0; font-size: .9rem; color: var(--muted); }
.pitch__aside { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; font-size: .88rem; color: var(--muted); margin: 6px 0 0; }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chips li { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .86rem; color: var(--ink-2); }
.chips .i, .chips .i-lock { width: 15px; height: 15px; color: var(--ok); }

.mini-steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; }
.mini-steps li { display: grid; justify-items: center; gap: 2px; padding: 18px 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.mini-steps span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font: 650 .95rem var(--serif); margin-bottom: 6px; }
.mini-steps strong { font-family: var(--serif); font-size: 1.08rem; }
.mini-steps small { color: var(--muted); font-size: .84rem; }
@media (max-width: 560px) { .mini-steps { grid-template-columns: 1fr; } }

.demo__head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.demo__head h1 { font-size: clamp(2rem, 4.6vw, 3rem); margin: 14px 0 0; }
.side-action { margin-top: 14px; }
.side-action .link--danger { display: block; text-align: center; width: 100%; padding: 6px; }
.route__side .fine { margin: 0; display: inline-flex; align-items: center; gap: 4px; }
.route__side .fine .i { width: 15px; height: 15px; color: var(--ok); }
@media (max-width: 560px) {
  .controls { grid-template-columns: 1fr 1fr; gap: 8px; }
  .controls__head { grid-column: 1 / -1; }
  .control { padding: 12px 10px 12px 30px; }
  .control::before { left: 12px; top: 17px; }
  .control__explain { display: none; }
  .demo__head .btn { width: 100%; justify-content: center; }
}

/* =============================================================================================
   How it works: one looping story, 15 s, five 3 s steps
   ============================================================================================= */
.story-ani { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); box-shadow: var(--shadow); padding: 24px 24px 20px; display: grid; gap: 18px; }
.ani { width: 100%; height: auto; overflow: visible; }
.ani text { font: 600 15px var(--sans); fill: var(--ink); text-anchor: middle; }
.ani .ani-small { font: 400 11px var(--sans); fill: var(--muted); }
.ani-wire { stroke: var(--line-2); stroke-width: 3; stroke-dasharray: 2 9; stroke-linecap: round; fill: none; }
.ani-node rect { fill: var(--bg); stroke: var(--line-2); stroke-width: 1.5; }
.ani-vault rect { fill: var(--brand); }
.ani-vault circle, .ani-vault path { fill: none; stroke: var(--brand-ink); stroke-width: 3.2; stroke-linecap: round; }
.ani-vault text { fill: var(--brand-ink); font-family: var(--serif); font-size: 16px; }
.ani-env rect, .ani-dup rect { fill: var(--surface); stroke: var(--brand); stroke-width: 2; }
.ani-env path, .ani-dup path { fill: none; stroke: var(--brand); stroke-width: 1.7; }
.ani-dup .ani-cross { stroke: var(--bad); stroke-width: 3; stroke-linecap: round; }
.ani-disk rect { fill: var(--ok-soft); stroke: var(--ok); stroke-width: 2; }
.ani-disk path { stroke: var(--ok); stroke-width: 2.4; stroke-linecap: round; }
.ani-shield path:first-of-type { fill: var(--ok); }
.ani-shield__bg { fill: var(--surface); stroke: var(--ok); stroke-width: 2; }
.ani-shield .ani-tick { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ani-down circle { fill: var(--bad); }
.ani-down path, .ani-ok path { stroke: #fff; stroke-width: 3; stroke-linecap: round; fill: none; }
.ani-ok circle { fill: var(--ok); }
.ani-tray rect { fill: var(--held-soft); stroke: var(--held); stroke-width: 1.5; }
.ani-tray text { fill: var(--held); font-size: 12px; }
.ani-bubble rect, .ani-bubble path { fill: var(--ink); }
.ani-bubble text { fill: var(--bg); font: 500 13px var(--mono); }

.ani-env { animation: ani-env 15s ease-in-out infinite; }
.ani-disk { animation: ani-disk 15s ease infinite; }
.ani-shield { animation: ani-shield 15s ease infinite; }
.ani-down { animation: ani-down 15s ease infinite; }
.ani-tray { animation: ani-tray 15s ease infinite; }
.ani-bubble { animation: ani-bubble 15s ease infinite; }
.ani-ok { animation: ani-ok 15s ease infinite; }
.ani-dup { animation: ani-dup 15s ease-in-out infinite; }
.ani-dup .ani-cross { animation: ani-cross 15s ease infinite; }
.ani-shop rect { animation: ani-shop 15s ease infinite; }

@keyframes ani-env {
  0% { transform: translate(80px, 135px); opacity: 0; }
  3% { opacity: 1; }
  10%, 40% { transform: translate(360px, 135px); }
  46%, 50% { transform: translate(588px, 135px); }
  55% { transform: translate(360px, 135px); }
  59%, 80% { transform: translate(360px, 234px); }
  87%, 95% { transform: translate(588px, 135px); opacity: 1; }
  100% { transform: translate(588px, 135px); opacity: 0; }
}
@keyframes ani-disk { 0%, 9% { opacity: 0; } 11% { opacity: 1; transform: translate(288px, 186px) scale(1.15); } 14%, 19% { opacity: 1; transform: translate(288px, 186px); } 21%, 100% { opacity: 0; } }
@keyframes ani-shield { 0%, 21% { opacity: 0; } 24%, 38% { opacity: 1; } 40%, 100% { opacity: 0; } }
@keyframes ani-down { 0%, 45% { opacity: 0; } 47%, 54% { opacity: 1; } 57%, 100% { opacity: 0; } }
@keyframes ani-shop { 0%, 45% { stroke: var(--line-2); } 47%, 54% { stroke: var(--bad); } 57%, 86% { stroke: var(--line-2); } 88%, 96% { stroke: var(--ok); } 100% { stroke: var(--line-2); } }
@keyframes ani-tray { 0%, 57% { opacity: 0; } 60%, 80% { opacity: 1; } 83%, 100% { opacity: 0; } }
@keyframes ani-bubble { 0%, 61% { opacity: 0; transform: translate(360px, 30px); } 64%, 78% { opacity: 1; transform: translate(360px, 22px); } 80%, 100% { opacity: 0; transform: translate(360px, 22px); } }
@keyframes ani-ok { 0%, 87% { opacity: 0; } 89%, 97% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ani-dup {
  0%, 81% { transform: translate(80px, 105px); opacity: 0; }
  83% { opacity: 1; }
  89%, 96% { transform: translate(262px, 105px); opacity: 1; }
  100% { transform: translate(262px, 105px); opacity: 0; }
}
@keyframes ani-cross { 0%, 88% { opacity: 0; } 90%, 100% { opacity: 1; } }

.ani-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.ani-steps li { display: grid; justify-items: center; text-align: center; gap: 2px; padding: 12px 8px; border-radius: var(--radius-sm); border: 1px solid transparent; color: var(--muted); animation: ani-step 15s linear infinite; }
.ani-steps li:nth-child(2) { animation-delay: 3s; }
.ani-steps li:nth-child(3) { animation-delay: 6s; }
.ani-steps li:nth-child(4) { animation-delay: 9s; }
.ani-steps li:nth-child(5) { animation-delay: 12s; }
.ani-steps span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); font: 650 .85rem var(--serif); margin-bottom: 4px; }
.ani-steps strong { font-family: var(--serif); font-size: 1rem; color: var(--ink-2); }
.ani-steps small { font-size: .8rem; }
@keyframes ani-step {
  0%, 19% { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 40%, transparent); color: var(--ink-2); }
  20%, 100% { background: transparent; border-color: transparent; color: var(--muted); }
}
@media (max-width: 760px) {
  .story-ani { padding: 16px 12px; }
  .ani-steps { grid-template-columns: 1fr; }
  .ani-steps li { grid-template-columns: 26px auto 1fr; justify-items: start; text-align: left; column-gap: 10px; align-items: center; }
  .ani-steps span { margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ani-env, .ani-disk, .ani-shield, .ani-down, .ani-tray, .ani-bubble, .ani-ok, .ani-dup, .ani-dup .ani-cross, .ani-shop rect, .ani-steps li { animation: none; }
  .ani-env { transform: translate(360px, 234px); }
  .ani-tray, .ani-bubble { opacity: 1; }
  .ani-dup, .ani-down, .ani-ok, .ani-shield, .ani-disk { opacity: 0; }
}
