    /* ── Ruppler tokens, from the locked brand (LOCKED.md 2026-07-29), and the
       SHEET'S OWN GRAMMAR: content margin echoing the teaser's 20mm, the rail as
       furniture in the OUTER margin at half the edge, the optical centre at 46%.
       ONE accent: signature rust. No teal, no second accent, warm mineral
       neutrals, never cool gray. Operator rule: NO em-dashes in copy on this
       surface, ever (enforced by scripts/check-jargon.mjs). ───────────────── */
    :root {
      --bg:        #0a0a0c;
      --bg-2:      #12100e;
      --ink:       #f3efe8;
      --ink-2:     #b9b3a7;
      --ink-3:     #8a857c;
      --copper:    #e08a4f;
      --copper-2:  #f0a268;
      --line:      rgba(240, 162, 104, 0.14);
      --hairline:  rgba(243, 239, 232, 0.10);
      --danger:    #e8a08a;
      --edge:      clamp(20px, 5.5vw, 56px);
      --rail-edge: calc(var(--edge) / 2);
      --ease-arrive: cubic-bezier(0.22, 0.61, 0.36, 1);
      --font-display: "Manrope", system-ui, sans-serif;
      --font-sans: "IBM Plex Sans", system-ui, sans-serif;
      --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
    }
    @font-face {
      font-family: "Manrope"; font-weight: 200 800; font-display: optional;
      src: url("/fonts/manrope-var-subset.woff2") format("woff2");
    }
    @font-face {
      font-family: "IBM Plex Sans"; font-weight: 100 700; font-display: optional;
      src: url("/fonts/plex-sans-var-subset.woff2") format("woff2");
    }

    * { margin: 0; padding: 0; box-sizing: border-box; }
    html, body { height: 100%; background: var(--bg); overscroll-behavior: none; }
    body {
      font-family: var(--font-sans);
      color: var(--ink);
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
    }
    /* the sunburst: one clean rust glow rising from the bottom edge. A single
       smooth radial, quiet enough to read as light, not decoration. */
    body::before {
      content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 72vh;
      background: radial-gradient(120% 100% at 50% 100%,
        rgba(224, 138, 79, 0.14), rgba(224, 138, 79, 0.05) 44%,
        rgba(224, 138, 79, 0.015) 64%, transparent 78%);
      pointer-events: none;
    }
    @media (forced-colors: active) { body::before { display: none; } }

    /* ── the stage ─────────────────────────────────────────────────────── */
    #status {
      position: fixed; inset: 0;
      display: grid; grid-template-rows: auto 1fr;
      padding: var(--edge);
      padding-top: max(var(--edge), env(safe-area-inset-top));
      /* content stops short of the rail's margin, the rail is furniture,
         content never runs into it (the sheet's rule) */
      padding-right: calc(var(--edge) + 10px);
      padding-bottom: max(var(--edge), env(safe-area-inset-bottom));
      overflow-y: auto;
      transition: opacity 400ms var(--ease-arrive);
    }
    #status.leaving { opacity: 0; pointer-events: none; }
    #status.gone { display: none; }
    .is-hidden { display: none !important; }

    .bar { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
    .lockup svg { display: block; height: clamp(20px, 2.4vw, 26px); width: auto; }
    .bar-note {
      font: 11px/1 var(--font-mono);
      letter-spacing: 0.08em;
      color: var(--ink-3);
    }

    /* ── THE RAIL, the brand's binding device, with its travel restored.
       Full height in the outer margin, four tick marks descending to the 46%
       optical centre; the node travels DOWN as the connection progresses and
       cyan lands exactly level with the headline. ───────────────────────── */
    .rail {
      position: fixed; top: 0; bottom: 0; right: var(--rail-edge);
      width: 1px;
      background: linear-gradient(180deg,
        rgba(224, 138, 79, 0.42), rgba(224, 138, 79, 0.10) 62%, rgba(224, 138, 79, 0.22));
      z-index: 1;
      transition: opacity 400ms var(--ease-arrive);
    }
    .rail.leaving { opacity: 0; }
    .rail .tick {
      position: absolute; left: 50%;
      width: 5px; height: 1px;
      transform: translateX(-50%);
      background: rgba(243, 239, 232, 0.22);
      transition: background 400ms var(--ease-arrive), width 400ms var(--ease-arrive);
    }
    .rail .tick[data-t="1"] { top: 28%; }
    .rail .tick[data-t="2"] { top: 34%; }
    .rail .tick[data-t="3"] { top: 40%; }
    .rail .tick[data-t="4"] { top: 46%; }
    .rail .tick.done { background: var(--copper); width: 7px; }
    .rail .node {
      position: absolute; left: 50%; top: 22%;
      width: 5.2px; height: 5.2px; border-radius: 50%;
      transform: translate(-50%, -50%);
      background: var(--copper-2);
      opacity: 0;
      transition: top 700ms var(--ease-arrive), opacity 400ms var(--ease-arrive),
                  background 400ms var(--ease-arrive);
    }
    .rail .node.stage-1 { top: 28%; }
    .rail .node.stage-2 { top: 34%; }
    .rail .node.stage-3 { top: 40%; }
    .rail .node.stage-4 { top: 46%; }
    .rail .node.lit { opacity: 1; animation: breathe 1.6s var(--ease-arrive) infinite alternate; }
    /* arrival: signature rust, at full strength. Ring + stepped constant-alpha
       halo (the brand's six-disc lesson, drawn without blur). */
    .rail .node.now {
      background: var(--copper-2);
      animation: none; opacity: 1;
    }
    .rail .node.now::before {
      content: ""; position: absolute; left: 50%; top: 50%;
      width: 16px; height: 16px; border-radius: 50%;
      transform: translate(-50%, -50%);
      border: 1px solid rgba(240, 162, 104, 0.38);
      animation: arrive 1200ms var(--ease-arrive) both;
    }
    .rail .node.now::after {
      content: ""; position: absolute; left: 50%; top: 50%;
      width: 23px; height: 23px; border-radius: 50%;
      transform: translate(-50%, -50%);
      background: radial-gradient(circle,
        rgba(240, 162, 104, 0.16) 0 30%, rgba(240, 162, 104, 0.10) 30% 55%,
        rgba(240, 162, 104, 0.05) 55% 80%, rgba(240, 162, 104, 0) 80%);
      animation: arrive 1200ms var(--ease-arrive) both;
    }
    @keyframes breathe { from { opacity: 1; } to { opacity: 0.4; } }
    @keyframes arrive { from { opacity: 0; } to { opacity: 1; } }

    /* ── the column, left-aligned on the sheet, optically centred ───────
       Two height regimes, both deliberate: a tall viewport centres the card at
       the optical 46%; a short one (a real phone, or a tall pairing card) falls
       back to top flow, where margin-top guarantees the card NEVER sits against
       the header. `safe center` makes the fallback automatic where supported;
       the margin covers engines that keep plain centering. */
    .card {
      width: 100%; max-width: 30rem;
      align-self: center;
      align-self: safe center;
      margin-top: clamp(44px, 7vh, 88px);
      padding-bottom: 8vh;   /* centre the block, then lift, the 46% centre */
      display: flex; flex-direction: column; align-items: stretch;
    }

    h1 {
      font-family: var(--font-display);
      font-weight: 640;
      font-size: clamp(30px, 8.4vw, 46px);
      letter-spacing: -0.028em;
      line-height: 1.08;
      text-wrap: balance;
    }
    .sub {
      color: var(--ink-2); font-size: 15px; line-height: 1.5;
      margin-top: 14px; max-width: 26rem;
    }
    .sub:empty { display: none; }

    /* the fact ledger: clean terminal formatting. Rust label, colon, bright
       value. Precision as assurance; terse, monospace, real. */
    .ledger {
      margin-top: 26px;
      font: 12.5px/2 var(--font-mono);
      color: var(--ink-2);
      letter-spacing: 0.01em;
    }
    .ledger:empty { display: none; }
    .ledger div { animation: arrive 300ms var(--ease-arrive) both; }
    .ledger b { font-weight: 400; color: var(--copper-2); margin-right: 1ch; }
    /* the terminal cursor: one block, blinking on the working line */
    .ledger .cur {
      display: inline-block; width: 0.62ch; height: 1.05em;
      margin-left: 1px; vertical-align: text-bottom;
      background: var(--copper-2);
      animation: blink 1.06s steps(1) infinite;
    }
    @keyframes blink { 50% { opacity: 0; } }

    #slot { margin-top: 22px; display: flex; flex-direction: column; align-items: stretch; }
    #slot:empty { margin-top: 0; }

    /* fault reason, the raw cause, stated plainly under the plain words */
    .reason {
      margin-top: 16px;
      font: 12px/1.6 var(--font-mono);
      color: var(--ink-3);
      word-break: break-word;
    }

    /* ── pairing ───────────────────────────────────────────────────────── */
    .pair { display: flex; flex-direction: column; gap: 16px; }
    .scan {
      position: relative; width: 100%; max-width: 21rem; aspect-ratio: 1 / 1;
      border-radius: 14px; overflow: hidden;
      background: #000; border: 1px solid var(--hairline);
    }
    .scan video { width: 100%; height: 100%; object-fit: cover; }
    /* camera language: corner brackets, not a box */
    .finder, .finder::before, .finder::after,
    .scan .corner-b::before, .scan .corner-b::after { position: absolute; }
    .finder { inset: 12%; pointer-events: none; }
    .finder::before, .finder::after,
    .scan .corner-b::before, .scan .corner-b::after {
      content: ""; width: 22px; height: 22px;
      border: 0 solid var(--copper-2);
    }
    .finder::before { left: 0; top: 0; border-left-width: 1.5px; border-top-width: 1.5px; border-top-left-radius: 6px; }
    .finder::after { right: 0; top: 0; border-right-width: 1.5px; border-top-width: 1.5px; border-top-right-radius: 6px; }
    .scan .corner-b::before { left: 12%; bottom: 12%; border-left-width: 1.5px; border-bottom-width: 1.5px; border-bottom-left-radius: 6px; }
    .scan .corner-b::after { right: 12%; bottom: 12%; border-right-width: 1.5px; border-bottom-width: 1.5px; border-bottom-right-radius: 6px; }
    .manual { display: none; flex-direction: column; gap: 10px; max-width: 21rem; }
    .manual.open { display: flex; }

    input[type="text"] {
      padding: 13px 14px; font: inherit; font-size: 16px;
      border-radius: 8px; border: 1px solid rgba(243, 239, 232, 0.18);
      background: var(--bg-2); color: var(--ink); text-align: left;
      caret-color: var(--copper-2);
    }
    input[type="text"]::placeholder { color: var(--ink-3); }
    input[type="text"]:focus-visible {
      outline: 2px solid var(--copper-2); outline-offset: 2px; border-color: transparent;
    }

    .btn {
      padding: 12px 18px; font: inherit; font-size: 15px; font-weight: 600;
      border-radius: 8px; border: 0; cursor: pointer;
      background: var(--copper); color: #1a1006;
      align-self: flex-start;
      transition: background 160ms ease, transform 160ms var(--ease-arrive);
    }
    .manual .btn { align-self: stretch; }
    .btn:hover { background: var(--copper-2); }
    .btn:active { transform: scale(0.985); }
    .btn.retry { margin-top: 18px; }
    .btn-ghost {
      background: transparent; color: var(--ink-2);
      border: 1px solid var(--hairline);
      font-weight: 500; font-size: 14px; padding: 10px 14px;
      border-radius: 8px; cursor: pointer;
      align-self: flex-start;
      transition: color 160ms ease, border-color 160ms ease;
    }
    .btn-ghost:hover { color: var(--ink); border-color: rgba(243, 239, 232, 0.28); }
    .btn:focus-visible, .btn-ghost:focus-visible, summary:focus-visible {
      outline: 2px solid var(--copper-2); outline-offset: 3px;
    }
    .field-err { color: var(--danger); min-height: 1.3em; font-size: 13.5px; }
    .field-err:empty { min-height: 0; }

    /* ── diagnostics, present, honest, quiet ──────────────────────────── */
    .diag { margin-top: 34px; }
    .diag summary {
      cursor: pointer; list-style: none;
      font: 12px/1 var(--font-mono); letter-spacing: 0.04em;
      color: var(--ink-3);
      display: flex; align-items: center; gap: 8px;
      -webkit-tap-highlight-color: transparent;
      padding: 4px 0;
    }
    .diag summary::-webkit-details-marker { display: none; }
    .diag summary::before {
      content: ""; width: 5px; height: 5px; border-radius: 1px;
      border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3);
      transform: rotate(-45deg); transition: transform 200ms var(--ease-arrive);
      flex: none;
    }
    .diag[open] summary::before { transform: rotate(45deg); }
    .diag summary:hover { color: var(--ink-2); }
    .diag-note { font: 11px/1.5 var(--font-mono); color: var(--ink-3); margin: 10px 0 6px; opacity: 0.8; }
    #log {
      font: 11.5px/1.8 var(--font-mono);
      color: var(--ink-3);
      max-height: 38vh; overflow-y: auto;
      padding: 14px 16px; border-radius: 6px;
      background: #070605; border: 1px solid rgba(243, 239, 232, 0.07);
    }
    #log .ln {
      display: grid; grid-template-columns: 5ch 8ch 1fr; column-gap: 1.5ch;
    }
    #log .ln .t { color: var(--ink-3); opacity: 0.55; text-align: right; }
    #log .ln .tag { color: var(--copper-2); }
    #log .ln .msg { color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }
    #log .ln.err .tag, #log .ln.err .msg { color: var(--danger); }

    /* ── the console, revealed ─────────────────────────────────────────── */
    #console {
      position: fixed; inset: 0; width: 100%; height: 100%; border: 0;
      display: none; background: var(--bg);
    }
    #console.ready { display: block; animation: arrive 400ms var(--ease-arrive) both; }

    .agentos-video {
      position: fixed; inset: 0; width: 100%; height: 100%;
      object-fit: contain; background: #000; z-index: 40;
    }
    .agentos-video-toggle {
      position: fixed; right: 10px; top: 10px; z-index: 41; padding: 8px 12px;
      border: 1px solid #3a3632; border-radius: 8px; background: #000c; color: #e6e1da;
      font: 12px ui-monospace, Menlo, monospace;
    }
    #agentos-diag {
      position: fixed; left: 0; right: 0; bottom: 0; z-index: 2147483647;
      pointer-events: none; font: 11px/1.4 ui-monospace, monospace;
      background: rgba(11, 13, 16, .82); color: #9aa4b2; padding: 3px 8px;
      white-space: nowrap; overflow: hidden;
    }

    @media (prefers-reduced-motion: reduce) {
      * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    }
