@font-face {
  font-family: "Serotiva";
  src: url("assets/serotiva-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #fefcfb;
  --surface: #ffffff;
  --surface-2: #f6f4ef;
  --line: #e3e1de;
  --ink: #302e23;
  --ink-2: #4a473b;
  --muted: #6b6656;
  --accent: #315cda;
  --accent-soft: #edf1fc;
  --display-accent: #315cda;
  --ok: #1f8a4c;
  --ok-soft: #e7f5ec;
  --bad: #c2382b;
  --bad-soft: #fcebe8;
  --warn: #b5650d;
  --warn-soft: #fdf1e2;
  --code-bg: #f6f4ef;
  --btn-ink-bg: #1b1a15;
  --btn-ink-fg: #ffffff;
  --shadow: 0 1px 2px rgba(48, 46, 35, .06), 0 8px 28px rgba(48, 46, 35, .08);
  --display: "Serotiva", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1a15; --surface: #24231d; --surface-2: #2b2a22; --line: #3a382e;
    --ink: #f3f0e8; --ink-2: #d9d5c9; --muted: #b0ab9c; --accent: #8aa6f5; --accent-soft: #2a3150;
    --display-accent: #c4b8fa; --ok: #5fc98a; --ok-soft: #1f3327; --bad: #f08a7e; --bad-soft: #3d2420;
    --warn: #f0b066; --warn-soft: #3a2e1d; --code-bg: #1f1e19; --btn-ink-bg: #f3f0e8; --btn-ink-fg: #1b1a15;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1b1a15; --surface: #24231d; --surface-2: #2b2a22; --line: #3a382e;
  --ink: #f3f0e8; --ink-2: #d9d5c9; --muted: #b0ab9c; --accent: #8aa6f5; --accent-soft: #2a3150;
  --display-accent: #c4b8fa; --ok: #5fc98a; --ok-soft: #1f3327; --bad: #f08a7e; --bad-soft: #3d2420;
  --warn: #f0b066; --warn-soft: #3a2e1d; --code-bg: #1f1e19; --btn-ink-bg: #f3f0e8; --btn-ink-fg: #1b1a15;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
  color-scheme: dark;
}

:root { --dim: rgba(27, 26, 21, .14); --frame-shadow: 0 1px 1px rgba(48,46,35,.04), 0 10px 24px -8px rgba(48,46,35,.12), 0 32px 72px -24px rgba(48,46,35,.20); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --dim: rgba(0, 0, 0, .42); --frame-shadow: 0 1px 1px rgba(0,0,0,.3), 0 18px 48px -12px rgba(0,0,0,.6); } }
:root[data-theme="dark"] { --dim: rgba(0, 0, 0, .42); --frame-shadow: 0 1px 1px rgba(0,0,0,.3), 0 18px 48px -12px rgba(0,0,0,.6); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; }
a { color: inherit; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 32px; height: 64px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.wordmark {
  display: block; width: 118px; height: 30px; background: var(--ink);
  -webkit-mask: url("assets/routerplus-wordmark.svg") no-repeat left center / contain;
  mask: url("assets/routerplus-wordmark.svg") no-repeat left center / contain;
}
.topnav { display: flex; gap: 24px; font-size: 14px; }
.topnav a { text-decoration: none; color: var(--muted); }
.topnav a:hover { color: var(--ink); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.icon-btn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 20px; border-radius: 9px; font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; border: 1px solid transparent; transition: background .15s, border-color .15s; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
:root[data-theme="dark"] .btn-primary { color: #11131c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #11131c; } }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--muted); }

.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }

/* Hero */
.hero { padding: 96px 0 0; }
.hero-text { max-width: 820px; margin: 0 auto; text-align: center; }
.hero h1 { font-family: var(--display); font-weight: 500; font-size: 64px; line-height: 1.04; letter-spacing: -.02em; margin: 0 0 24px; }
.lede { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 640px; margin: 0 auto 32px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-shot { max-width: 1120px; margin: 72px auto 0; animation: rise 1s cubic-bezier(.2,.7,.2,1) both .1s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.hero-vp { position: relative; overflow: hidden; pointer-events: none; }
.hero-cam { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.hero-console .chart i { animation: grow 1s cubic-bezier(.2,.7,.2,1) both .4s; transform-origin: bottom; }
@keyframes grow { from { transform: scaleY(0); } to { transform: none; } }

/* Window frame */
.window { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--frame-shadow); }
.wbar { display: flex; align-items: center; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.dots, .wbar-end { width: 60px; flex: none; display: flex; gap: 7px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.url { flex: 1; margin: 0 auto; max-width: 380px; text-align: center; font-family: var(--mono); font-size: 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 3px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Proof strip */
.proof { margin-top: 96px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.proof ul { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; margin: 0 auto; padding-top: 24px; padding-bottom: 24px; }
.proof li { font-size: 15px; color: var(--ink-2); padding: 0 24px; }
.proof li + li { border-left: 1px solid var(--line); }

/* Story */
.story { padding: 128px 0 0; }
.story-head { max-width: 640px; margin-bottom: 32px; }
.story-head h2 { font-family: var(--display); font-weight: 500; font-size: 44px; line-height: 1.1; letter-spacing: -.015em; margin: 0 0 16px; }
.story-head p { color: var(--muted); font-size: 18px; margin: 0; }
.story-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 64px; }
.steps { padding: 18vh 0 46vh; }
.step { min-height: 64vh; padding-bottom: 64px; opacity: .32; transition: opacity .5s ease; }
.step.active { opacity: 1; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: flex; gap: 12px; }
.eyebrow .num { color: var(--accent); }
.step h3 { font-size: 24px; line-height: 1.25; letter-spacing: -.015em; font-weight: 600; margin: 12px 0 16px; }
.step p { font-size: 16px; line-height: 1.7; color: var(--ink-2); margin: 0 0 16px; }
.docline { margin: 0 0 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; font: 12px/1.75 var(--mono); color: var(--ink-2); overflow-x: auto; white-space: pre; }
.docline b { font-weight: 500; color: var(--accent); }
.doclink { font-size: 14px; font-weight: 500; color: var(--accent); text-decoration: none; }
.doclink:hover { text-decoration: underline; text-underline-offset: 3px; }
.m-frame { display: none; }

/* Stage */
.stage-col { position: relative; }
.stage { position: sticky; top: max(96px, calc(50vh - 270px)); }
.viewport { position: relative; overflow: hidden; aspect-ratio: 960 / 600; background: var(--surface); }
.viewport .console { transition: opacity .2s ease; }
.viewport.swap .console { opacity: 0; }
.cam { position: absolute; left: 0; top: 0; transform-origin: 0 0; transition: transform 850ms cubic-bezier(.65, 0, .35, 1); will-change: transform; }
.stage .console { border: 0; border-radius: 0; box-shadow: none; }
.stage .c-main, .stage .c-side, .hero-console .c-main { scrollbar-width: none; }
.stage .c-main::-webkit-scrollbar, .stage .c-side::-webkit-scrollbar { display: none; }
.trying .c-main { scrollbar-width: thin; }
.shield { position: absolute; inset: 0; z-index: 10; }
.trying .shield { display: none; }
.stage-foot { display: flex; align-items: center; gap: 16px; margin-top: 16px; min-height: 36px; }
.step-label { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .04em; white-space: nowrap; }
.try-hint { flex: 1; font-size: 14px; color: var(--ink-2); }
#tryBtn { margin-left: auto; }
.trying #tryBtn { border-color: var(--accent); color: var(--accent); }

.spot { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 6; pointer-events: none; border-radius: 10px; opacity: 0;
  box-shadow: 0 0 0 calc(1.5px * var(--inv, 1)) var(--accent), 0 0 0 calc(4px * var(--inv, 1)) color-mix(in srgb, var(--accent) 14%, transparent), 0 0 0 4000px var(--dim);
  transition: left 850ms cubic-bezier(.65, 0, .35, 1), top 850ms cubic-bezier(.65, 0, .35, 1), width 850ms cubic-bezier(.65, 0, .35, 1), height 850ms cubic-bezier(.65, 0, .35, 1), opacity .45s ease; }
.spot.on { opacity: 1; }

.cursor { position: absolute; left: 0; top: 0; z-index: 9; pointer-events: none; opacity: 0; transform-origin: 0 0;
  transform: translate(var(--cx, 700px), var(--cy, 440px)) scale(var(--inv, 1));
  transition: transform 720ms cubic-bezier(.65, 0, .35, 1), opacity .3s; }
.cursor.on { opacity: 1; }
.trying .cursor { display: none; }
.cursor svg { display: block; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.3)); }
.cursor .ripple { position: absolute; left: 3px; top: 2px; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: var(--accent); opacity: 0; transform: scale(.3); }
.cursor.click .ripple { animation: ripple .5s ease-out; }
@keyframes ripple { 0% { opacity: .4; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.4); } }
.pressed { outline: 2px solid var(--accent); outline-offset: 2px; }
.c-toast { position: absolute; left: 50%; bottom: 16px; z-index: 11; max-width: 80%; background: var(--btn-ink-bg); color: var(--btn-ink-fg); border-radius: 9px; padding: 9px 14px; font-size: 13px; line-height: 1.4; opacity: 0; transform: translate(-50%, 8px); transition: opacity .3s, transform .3s; pointer-events: none; }
.c-toast.show { opacity: 1; transform: translate(-50%, 0); }

.bar.anim i { animation: barfill 1.1s cubic-bezier(.2,.7,.2,1) both 1s; }
@keyframes barfill { from { width: 0; } }

/* Closing */
.closing { padding: 96px 0 128px; text-align: center; border-top: 1px solid var(--line); }
.closing h2 { font-family: var(--display); font-weight: 500; font-size: 44px; line-height: 1.08; letter-spacing: -.015em; margin: 0 0 20px; }
.closing p { max-width: 560px; margin: 0 auto 32px; color: var(--muted); font-size: 18px; }
.foot { border-top: 1px solid var(--line); padding: 32px 0; font-size: 13px; color: var(--muted); }

/* Console window (shared by hero, stage and phone crops) */
.console { position: relative; background: var(--surface); overflow: hidden; display: flex; flex-direction: column; font-size: 13.5px; container-type: inline-size; color: var(--ink); line-height: 1.5; text-align: left; }
.c-top { display: flex; align-items: center; gap: 20px; height: 46px; padding: 0 16px; border-bottom: 1px solid var(--line); flex: none; }
.c-logo { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.c-logo-mark { width: 22px; height: 22px; border-radius: 6px; background: url("assets/favicon.svg") center / cover no-repeat, var(--accent); }
.c-nav { display: flex; gap: 18px; color: var(--muted); font-size: 13.5px; height: 100%; }
.c-nav span { display: flex; align-items: center; border-bottom: 2px solid transparent; }
.c-nav span.on { color: var(--ink); font-weight: 500; border-bottom-color: var(--accent); }
.c-credits { margin-left: auto; font-family: var(--mono); font-size: 12px; border: 1px solid var(--line); border-radius: 7px; padding: 4px 10px; color: var(--ink-2); display: flex; align-items: center; gap: 7px; }
.c-credits i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.c-body { display: flex; flex: 1; min-height: 0; }
.c-side { width: 196px; flex: none; border-right: 1px solid var(--line); background: var(--surface-2); padding: 10px 8px; overflow-y: auto; }
.c-org { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 7px 8px; margin-bottom: 8px; }
.c-org b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 5px; background: var(--btn-ink-bg); color: var(--btn-ink-fg); font-size: 12px; }
.c-org div { line-height: 1.2; font-size: 12.5px; font-weight: 600; }
.c-org small { display: block; font-family: var(--mono); font-weight: 400; font-size: 10.5px; color: var(--muted); }
.c-group { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--muted); padding: 10px 8px 3px; text-transform: uppercase; }
.c-link { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 4.5px 8px; border-radius: 6px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.c-link:hover { background: var(--surface); }
.c-link.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.c-main { flex: 1; min-width: 0; overflow-y: auto; padding: 18px 22px 40px; position: relative; }


/* Console page parts */
.p-eyebrow { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.p-head { display: flex; align-items: flex-end; gap: 12px; padding-bottom: 12px; border-bottom: 1.5px solid var(--ink); margin-bottom: 16px; flex-wrap: wrap; }
.p-head h2 { margin: 2px 0 0; font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.p-head .actions { margin-left: auto; display: flex; gap: 8px; }
.b { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: 6px 12px; font-size: 13px; cursor: pointer; font-weight: 500; white-space: nowrap; }
.b:hover { border-color: var(--muted); }
.b-ink { background: var(--btn-ink-bg); color: var(--btn-ink-fg); border-color: var(--btn-ink-bg); }
.b-blue { background: var(--accent); color: var(--surface); border-color: var(--accent); }
.b-red { color: var(--bad); }
.b-sm { padding: 3px 9px; font-size: 12px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.kpi label { font-size: 12px; color: var(--muted); display: block; }
.kpi b { font-family: var(--mono); font-weight: 500; font-size: 21px; display: block; margin: 2px 0; letter-spacing: -.02em; }
.kpi small { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.card { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 14px 16px; margin-bottom: 14px; }
.card h3 { margin: 0 0 10px; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card h3 .sub { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.card h3 .right { margin-left: auto; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { text-align: left; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 400; padding: 7px 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.tbl td { padding: 8px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num, .tbl th.num { text-align: right; font-family: var(--mono); }
.tbl tr.new td { animation: rowin .9s ease-out; }
.tbl tr.sel td { background: var(--accent-soft); }
.tbl tr.clickable { cursor: pointer; }
@keyframes rowin { from { background: var(--accent-soft); } to { background: transparent; } }
.tbl-wrap { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; overflow-x: auto; margin-bottom: 14px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 11px; padding: 1px 8px; border-radius: 20px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.blue { background: var(--accent-soft); color: var(--accent); }
.flag { display: inline-block; font-size: 11px; padding: 1px 7px; border: 1px solid var(--warn); color: var(--warn); border-radius: 4px; margin: 0 4px 3px 0; }
.flag.okf { border-color: transparent; color: var(--ok); padding-left: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { border: 1px solid var(--line); border-radius: 8px; padding: 5px 11px; font-size: 12.5px; color: var(--ink-2); background: var(--surface); }
.chip b { font-family: var(--mono); color: var(--ink); margin-right: 4px; }
.tabs { display: inline-flex; background: var(--surface-2); border-radius: 8px; padding: 3px; gap: 2px; margin-bottom: 12px; flex-wrap: wrap; }
.tab { border: 0; background: none; border-radius: 6px; padding: 4px 11px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.tab.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.form { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px 14px; }
.form .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.field label code { font-size: 11px; }
.in, select.in, textarea.in { width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; background: var(--surface); color: var(--ink); font: 13px var(--sans); }
.in.mono { font-family: var(--mono); font-size: 12.5px; }
.in:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea.in { resize: vertical; min-height: 64px; }
.form-actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; }

pre.code { margin: 0; background: var(--code-bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: 12px/1.6 var(--mono); overflow-x: auto; color: var(--ink-2); white-space: pre; }
pre.code .k { color: var(--accent); }
pre.code .s { color: var(--ok); }
pre.code .hl { background: var(--accent-soft); color: var(--ink); border-radius: 3px; padding: 0 2px; }
pre.code .err { color: var(--bad); }
code { font-family: var(--mono); font-size: .92em; }

.bar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; position: relative; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .6s ease; }
.bar.warn i { background: var(--warn); }
.bar.bad i { background: var(--bad); }
.blist .row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 90px; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.blist .row:last-child { border-bottom: 0; }
.blist .row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blist .row .bar { grid-column: 1 / -1; height: 5px; margin-top: -2px; }

.chart { display: flex; align-items: flex-end; gap: 3px; height: 130px; padding-top: 6px; border-bottom: 1px solid var(--line); }
.chart i { flex: 1; background: var(--accent); border-radius: 2px 2px 0 0; min-height: 2px; transition: height .5s ease; opacity: .85; }
.chart i.wk { opacity: .55; }
.chart-axis { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; color: var(--muted); margin-top: 4px; }

.drawer { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--surface); margin-bottom: 14px; animation: rowin 1s ease-out; }
.kv { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 5px 12px; font-size: 12.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.attempt { display: grid; grid-template-columns: 12px 1fr; gap: 8px; margin: 8px 0; font-size: 13px; }
.attempt i { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; background: var(--bad); }
.attempt.ok i { background: var(--ok); }
.attempt small { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); }

.chat { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--surface-2); }
.msg { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; margin-bottom: 9px; font-size: 13px; overflow-wrap: anywhere; }
.msg { max-width: 560px; }
.msg.user { background: transparent; }
.msg .meta { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 6px; }
.msg.err { border-color: var(--bad); }
.msg.err b { color: var(--bad); }
.redact { background: var(--warn-soft); color: var(--warn); font-family: var(--mono); font-size: 12px; padding: 0 3px; border-radius: 3px; }
.composer { display: flex; gap: 8px; margin-top: 6px; }
.composer .in { flex: 1; }

.toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.toggle:last-child { border-bottom: 0; }
.toggle .t-text b { font-size: 13.5px; font-weight: 600; display: block; }
.toggle .t-text span { font-size: 12px; color: var(--muted); }
.sw { width: 38px; height: 22px; border-radius: 11px; background: var(--line); border: 0; position: relative; cursor: pointer; flex: none; transition: background .2s; }
.sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.sw.on { background: var(--accent); }
.sw.on::after { left: 19px; }

.progress { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin: 8px 0; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s linear; }
.best td { background: var(--ok-soft); }
.note { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.banner { border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-bottom: 12px; animation: rowin .8s; }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.bad { background: var(--bad-soft); color: var(--bad); }
.banner.ok { background: var(--ok-soft); color: var(--ok); }

/* Compact parts the camera can frame */
.card.fit, pre.code.fit, .banner.fit, .tbl-wrap.fit { width: fit-content; max-width: 100%; }
.tbl-wrap.fit .tbl { width: auto; }
.tbl td.num { white-space: nowrap; }
.card.fit { min-width: min(100%, 460px); }
.split { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 14px; }
.blist .name .small { font-family: var(--sans); }
.used { display: flex; align-items: center; gap: 8px; }
.used .bar { flex: 1; }
.tbl th.sorted { color: var(--accent); }
.bad-t { color: var(--bad); }
.drawer { max-width: 540px; }
.dr-sec { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.atts { list-style: none; margin: 4px 0 0; padding: 0; }
.cl { display: flex; justify-content: space-between; gap: 16px; font: 12px/1.5 var(--mono); padding: 2px 0; color: var(--ink-2); }
.cl.sub { color: var(--muted); }
.cl.total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 6px; color: var(--ink); font-weight: 500; }

/* Narrow console: hide the sidebar */
@container (max-width: 640px) {
  .c-side { display: none; }
  .c-nav { display: none; }
  .c-main { padding: 14px 14px 32px; }
  .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid2, .form { grid-template-columns: minmax(0,1fr); }
  .p-head h2 { font-size: 20px; }
  .hide-narrow { display: none; }
  .split { grid-template-columns: minmax(0,1fr); }
  .card.fit { min-width: 0; }
}

.msg pre.code, .drawer pre.code { white-space: pre-wrap; overflow-wrap: anywhere; }
@container (max-width: 640px) {
  .tbl th { white-space: normal; letter-spacing: .04em; }
  .tbl th, .tbl td { padding: 7px 6px; }
}
@container (max-width: 640px) { pre.code { white-space: pre-wrap; overflow-wrap: anywhere; } }

/* Phone: each step's text above a framed crop of the console */
@media (max-width: 900px) {
  .wrap { padding: 0 16px; }
  .topbar-in { gap: 16px; height: 56px; }
  .topnav { display: none; }
  .hero { padding-top: 56px; }
  .hero h1 { font-size: 38px; line-height: 1.08; }
  .lede { font-size: 17px; }
  .hero-shot { margin-top: 48px; }
  .proof { margin-top: 64px; }
  .proof ul { flex-direction: column; align-items: center; gap: 8px; padding-top: 20px; padding-bottom: 20px; }
  .proof li { padding: 0; text-align: center; }
  .proof li + li { border-left: 0; }
  .story { padding-top: 80px; }
  .story-head h2 { font-size: 32px; }
  .story-grid { display: block; }
  .steps { padding: 8px 0 32px; }
  .step { min-height: 0; opacity: 1; padding: 40px 0 0; }
  .step h3 { font-size: 22px; }
  .docline { font-size: 12px; }
  .m-frame { display: block; position: relative; overflow: hidden; margin-top: 20px; height: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--frame-shadow); }
  .m-cam { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
  .m-cam .c-main { scrollbar-width: none; }
  .m-ring { position: absolute; border-radius: 10px; pointer-events: none; box-shadow: 0 0 0 calc(1.5px * var(--inv, 1)) var(--accent), 0 0 0 calc(4px * var(--inv, 1)) color-mix(in srgb, var(--accent) 14%, transparent); }
  .stage.offscreen { position: absolute; left: -10000px; top: 0; width: 400px; visibility: hidden; }
  .closing { padding: 72px 0 88px; }
  .closing h2 { font-size: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .cam, .spot, .cursor { transition: none !important; }
  .cursor { display: none; }
  .hero-shot, .hero-console .chart i, .bar.anim i { animation: none; }
  .step { transition: none; }
}
