/* qsy.to — public pages (landing, sign-in, request, 404)
   Identity: chart-plotting / wayfinding. Porcelain ground, slate ink,
   one graphite routing plane, one signal color (chart rhodamine).
   Type: Archivo Variable (width axis as display voice) + Fragment Mono
   (mono reserved for system information: status, labels, coordinates). */

/* ---------- Fonts (self-hosted, cacheable) ---------- */

@font-face {
    font-family: 'Archivo VF';
    src: url('fonts/archivo-vf.woff2') format('woff2-variations');
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Fragment Mono';
    src: url('fonts/fragment-mono.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
    --ground: #F1F2F4;
    --surface: #F7F8F9;
    --ink: #101318;
    --ink-2: #495064;
    --line: rgba(16, 19, 24, 0.16);
    --line-soft: rgba(16, 19, 24, 0.09);
    --slab: #14161B;
    --slab-2: #1E2128;
    --slab-line: rgba(244, 245, 247, 0.13);
    --accent: #C42069;
    --route: #ED3D80;
    --chip: #F4F5F7;
    --btn-bg: #101318;
    --btn-fg: #F1F2F4;
    --shadow: rgba(16, 19, 24, 0.34);
}

@media (prefers-color-scheme: dark) {
    :root {
        --ground: #0E1013;
        --surface: #14161A;
        --ink: #E8EAED;
        --ink-2: #A5ACB8;
        --line: rgba(232, 234, 237, 0.16);
        --line-soft: rgba(232, 234, 237, 0.08);
        --slab: #16181D;
        --slab-2: #22252E;
        --slab-line: rgba(244, 245, 247, 0.15);
        --accent: #F45B9E;
        --chip: #F1F2F4;
        --btn-bg: #E8EAED;
        --btn-fg: #0E1013;
        --shadow: rgba(0, 0, 0, 0.65);
    }
}

:root[data-theme="light"] {
    --ground: #F1F2F4; --surface: #F7F8F9; --ink: #101318; --ink-2: #495064;
    --line: rgba(16,19,24,0.16); --line-soft: rgba(16,19,24,0.09);
    --slab: #14161B; --slab-2: #1E2128; --slab-line: rgba(244,245,247,0.13);
    --accent: #C42069; --route: #ED3D80; --chip: #F4F5F7;
    --btn-bg: #101318; --btn-fg: #F1F2F4; --shadow: rgba(16,19,24,0.34);
}

:root[data-theme="dark"] {
    --ground: #0E1013; --surface: #14161A; --ink: #E8EAED; --ink-2: #A5ACB8;
    --line: rgba(232,234,237,0.16); --line-soft: rgba(232,234,237,0.08);
    --slab: #16181D; --slab-2: #22252E; --slab-line: rgba(244,245,247,0.15);
    --accent: #F45B9E; --route: #ED3D80; --chip: #F1F2F4;
    --btn-bg: #E8EAED; --btn-fg: #0E1013; --shadow: rgba(0,0,0,0.65);
}

/* ---------- Base ---------- */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Archivo VF', 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    background: var(--ground);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }

a { color: inherit; text-decoration: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.mono {
    font-family: 'Fragment Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
    letter-spacing: 0.08em;
}

.container {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: clamp(20px, 4.5vw, 48px);
}

/* ---------- Header ---------- */

.top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-block: 24px 0;
}

.wordmark {
    font-weight: 700;
    font-stretch: 125%;
    font-size: 20px;
    letter-spacing: -0.015em;
}

.wordmark .tld {
    font-family: 'Fragment Mono', ui-monospace, monospace;
    font-size: 0.72em;
    font-weight: 400;
    color: var(--accent);
    letter-spacing: 0;
    margin-left: 1px;
}

.top-link {
    font-family: 'Fragment Mono', ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--ink-2);
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: color .2s, border-color .2s;
}

.top-link:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Hero (object as centrepiece) ---------- */

.hero-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    padding-top: clamp(28px, 4vh, 52px);
}

.hero-copy {
    grid-column: 1 / 9;
    grid-row: 1;
    position: relative;
    z-index: 2;
    pointer-events: none;              /* hero-wide parallax reads through the copy… */
}

.hero-copy a { pointer-events: auto; } /* …but links stay clickable */

.eyebrow {
    font-weight: 640;
    font-size: 11.5px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-2);
    display: flex;
    align-items: center;
    gap: 12px;
}

.eyebrow::before {
    content: "";
    width: 26px;
    height: 1px;
    background: var(--accent);
}

.hero h1 {
    margin-top: 18px;
    font-size: clamp(25px, 4.7vw, 60px);
    font-weight: 600;
    font-stretch: 122%;
    line-height: 1.0;
    letter-spacing: -0.026em;
}

/* Each phrase stays on its own line; never break mid-phrase. */
.h1-line { display: block; white-space: nowrap; }

.hero h1 .dot { color: var(--accent); }

.hero .lede {
    margin-top: 20px;
    max-width: 44ch;
    font-size: 17px;
    line-height: 1.55;
    color: var(--ink-2);
    text-wrap: pretty;
}

.invite {
    margin-top: 22px;
    font-size: 14px;
    color: var(--ink-2);
}

.invite a {
    color: var(--accent);
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
}

.invite a:hover { color: var(--ink); }

/* ---------- Scene (the routing plane) ---------- */

.scene {
    grid-column: 2 / 13;
    grid-row: 1;
    position: relative;
    z-index: 1;
    height: 560px;
    margin-top: 250px;
}

.stage {
    position: absolute;
    inset: 0;
    perspective: 1500px;
}

/* Centre via absolute + translate(-50%,-50%): this keeps the slab centred
   even when it is wider than the scene (grid place-items:center left-aligns
   an oversized item, which pushed the slab off-centre on mobile). --s is set
   on .stage by the resize script and inherits down to here. */
.tilt {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%)
               scale(var(--s, 1))
               rotateX(calc(55deg + var(--rx, 0deg)))
               rotateZ(calc(-32deg + var(--rz, 0deg)));
    transform-style: preserve-3d;
    will-change: transform;
}

.plate {
    position: relative;
    width: 760px;
    height: 480px;
    border-radius: 20px;
    background:
        radial-gradient(rgba(244,245,247,0.038) 1px, transparent 1.3px) 0 0 / 34px 34px,
        linear-gradient(148deg, var(--slab-2), var(--slab) 58%);
    border: 1px solid var(--slab-line);
    /* precise chamfer: a light top catch-edge instead of visual bulk */
    box-shadow: inset 0 1px 0 rgba(244, 245, 247, 0.09);
    transform-style: preserve-3d;
}

/* thin engineered underside */
.plate::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: #08090B;
    transform: translateZ(-9px);
}

.plate svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.route-base {
    fill: none;
    stroke: rgba(244, 245, 247, 0.22);
    stroke-width: 1.5;
}

.route-active {
    fill: none;
    stroke: var(--route);
    stroke-width: 2.5;
    stroke-linecap: round;
    filter: drop-shadow(0 0 2.5px rgba(237, 61, 128, 0.28));
}

.route-flow {
    fill: none;
    stroke: rgba(255, 214, 231, 0.9);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 3 15;
    animation: flow 1.1s linear infinite;
}

@keyframes flow { to { stroke-dashoffset: -18; } }

.ring {
    fill: none;
    stroke: var(--slab-line);
    stroke-width: 1.4;
}

.pulse-dot { fill: #FFD6E7; }

/* raised origin chip */
.node-origin {
    position: absolute;
    left: 140px;
    top: 240px;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: var(--chip);
    transform: translate(-50%, -50%) translateZ(22px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset;
    display: grid;
    place-items: center;
}

.node-origin::after {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--route);
    opacity: 0.45;
    transition: opacity .5s, box-shadow .5s;
}

.node-origin.lit::after {
    opacity: 1;
    box-shadow: 0 0 10px rgba(237, 61, 128, 0.55);
}

.node-shadow {
    position: absolute;
    left: 140px;
    top: 240px;
    width: 42px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    filter: blur(6px);
    transform: translate(-50%, -50%) translateZ(2px);
}

/* Destination ports — 30px visual, oversized invisible hit area.
   The plane is tilted rotateX(55deg), which compresses everything to ~57%
   of its height on screen, so 88px in the plane ≈ 50px to the pointer. */
.port {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 64px;
    height: 88px;
    border: 0;
    background: transparent;
    cursor: pointer;
    transform: translate(-50%, -50%) translateZ(4px);
    transition: transform .5s cubic-bezier(.5, 0, .2, 1);
    display: grid;
    place-items: center;
}

.port::before {
    content: "";
    grid-area: 1 / 1;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(244, 245, 247, 0.3);
    background: rgba(244, 245, 247, 0.05);
    transition: border-color .3s, background .3s, transform .35s, box-shadow .2s;
}

.port::after {
    content: "";
    grid-area: 1 / 1;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(244, 245, 247, 0.35);
    transition: background .3s;
}

/* Hover/focus must never move the button itself: under perspective a
   translateZ lift shifts it out from under the cursor, the pointer falls
   through to the plate, and the port flickers. Only the dot responds. */
.port:hover::before {
    border-color: rgba(244, 245, 247, 0.6);
    transform: scale(1.14);
}

/* Ring the visible dot rather than the (much larger) invisible hit area. */
.port:focus-visible { outline: none; }

.port:focus-visible::before {
    border-color: var(--route);
    box-shadow: 0 0 0 2px var(--route);
    transform: scale(1.14);
}

.port.is-on { transform: translate(-50%, -50%) translateZ(18px); }
.port.is-on::before { border-color: var(--route); background: rgba(237, 61, 128, 0.12); }
.port.is-on::after { background: var(--route); }

/* ground shadow: broad soft ambient + tighter contact */
.scene-shadow {
    position: absolute;
    left: 50%;
    top: 57%;
    width: 720px;
    height: 250px;
    transform: translate(-50%, -50%);
    background:
        radial-gradient(ellipse 46% 40% at center, var(--shadow), transparent 70%),
        radial-gradient(ellipse at center, var(--shadow), transparent 62%);
    filter: blur(30px);
    opacity: 0.42;
    pointer-events: none;
}

/* drafting annotations (system information → mono) */
.ann {
    position: absolute;
    font-family: 'Fragment Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.16em;
    color: var(--ink-2);
    white-space: nowrap;
    z-index: 2;
}

.ann::before {
    content: "";
    position: absolute;
    background: var(--line);
}

.ann i {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    border: 1px solid var(--ink-2);
    background: var(--ground);
}

.ann-origin { left: clamp(4px, 2vw, 40px); bottom: 12%; }
.ann-origin::before { left: calc(100% + 10px); top: 50%; width: 64px; height: 1px; }
.ann-origin i { left: calc(100% + 74px); top: calc(50% - 2.5px); }

.ann-dest { right: clamp(4px, 2vw, 40px); top: 10%; }
.ann-dest::before { right: calc(100% + 10px); top: 50%; width: 64px; height: 1px; }
.ann-dest i { right: calc(100% + 74px); top: calc(50% - 2.5px); }

.fig {
    position: absolute;
    right: clamp(4px, 2vw, 40px);
    bottom: 4%;
    font-family: 'Fragment Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--ink-2);
}

/* live readout (system information → mono) */
.readout {
    grid-column: 1 / 13;
    grid-row: 2;
    margin-top: 18px;
    text-align: center;
    font-family: 'Fragment Mono', ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: 0.12em;
    color: var(--ink-2);
}

.readout .r-code { color: var(--ink); }
.readout .r-dest { color: var(--accent); }

/* hero load sequence */
.scene, .readout { opacity: 0; transform: translateY(14px); transition: opacity .9s ease .1s, transform .9s cubic-bezier(.4,0,.2,1) .1s; }
.is-in .scene, .is-in .readout { opacity: 1; transform: none; }

/* ---------- Sections ---------- */

section.band { margin-top: clamp(90px, 13vh, 140px); }

.rule { border: 0; border-top: 1px solid var(--line); }

h2 {
    margin-top: 20px;
    font-size: clamp(30px, 3.6vw, 44px);
    font-weight: 590;
    font-stretch: 118%;
    letter-spacing: -0.02em;
    line-height: 1.04;
    text-wrap: balance;
}

/* steps */
.wpts {
    list-style: none;
    margin-top: 56px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(24px, 4vw, 56px);
    position: relative;
}

.wpts::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 4px;
    right: 22%;
    height: 1px;
    background: var(--line);
}

.wpts li { position: relative; padding-top: 26px; }

.wpts li::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    background: var(--ground);
}

.wpt-label {
    font-family: 'Fragment Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--ink-2);
}

.wpts h3 {
    margin-top: 10px;
    font-size: 21px;
    font-weight: 590;
    font-stretch: 114%;
    letter-spacing: -0.01em;
}

.wpts p { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--ink-2); max-width: 34ch; }

.wpts p .mono { font-size: 13px; letter-spacing: 0.02em; color: var(--ink); }

/* specimen band */
.specimen {
    border-top: 1px solid var(--line);
    padding-block: 30px 0;
    display: flex;
    align-items: center;
    gap: 22px;
    font-family: 'Fragment Mono', ui-monospace, monospace;
    letter-spacing: 0.04em;
    font-size: clamp(14px, 1.8vw, 19px);
    white-space: nowrap;
    overflow: hidden;
}

.spec-in { color: var(--ink); flex-shrink: 0; }

.spec-arrow {
    flex: 0 1 220px;
    min-width: 60px;
    height: 1px;
    background: var(--accent);
    position: relative;
}

.spec-arrow::after {
    content: "";
    position: absolute;
    right: 0;
    top: -3.5px;
    border-left: 8px solid var(--accent);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

.spec-out {
    color: var(--ink-2);
    overflow: hidden;
    min-width: 0;
    -webkit-mask-image: linear-gradient(90deg, #000 78%, transparent 97%);
    mask-image: linear-gradient(90deg, #000 78%, transparent 97%);
}

.spec-chip {
    flex-shrink: 0;
    font-size: 10px;
    letter-spacing: 0.14em;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 5px 9px 4px;
}

.spec-note {
    border-bottom: 1px solid var(--line);
    padding-block: 16px 26px;
    font-family: 'Fragment Mono', ui-monospace, monospace;
    font-size: 9.5px;
    letter-spacing: 0.1em;
    color: var(--ink-2);
    opacity: 0.85;
}

.spec-note b { color: var(--accent); font-weight: 400; }

/* principles — asymmetric composition */
.principles {
    margin-top: 52px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    border-top: 1px solid var(--line);
}

.pr { padding: 34px 34px 38px 0; }

.pr-key {
    font-family: 'Fragment Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--accent);
}

.pr h3 {
    margin-top: 12px;
    font-size: 22px;
    font-weight: 590;
    font-stretch: 114%;
    letter-spacing: -0.012em;
}

.pr p { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--ink-2); max-width: 46ch; }

.pr-lead {
    grid-column: 1 / 8;
    border-right: 1px solid var(--line-soft);
    display: flex;
    flex-direction: column;
}

.pr-lead h3 { font-size: clamp(24px, 2.4vw, 30px); }

.pr-side { grid-column: 8 / 13; padding-left: 34px; }

/* re-aim mini diagram */
.swap-fig {
    margin-top: auto;
    padding-top: 52px;
    max-width: 470px;
}

.swap-fig svg { width: 100%; height: auto; display: block; overflow: visible; }

.swap-old { fill: none; stroke: var(--line); stroke-width: 1.1; stroke-dasharray: 3 6; }
.swap-new { fill: none; stroke: var(--route); stroke-width: 1.6; stroke-linecap: round; }
.swap-node { fill: none; stroke: var(--ink-2); stroke-width: 1; opacity: 0.7; }
.swap-node-on { fill: none; stroke: var(--route); stroke-width: 1.2; }
.swap-origin { fill: var(--route); }

.swap-label {
    font-family: 'Fragment Mono', ui-monospace, monospace;
    font-size: 8px;
    letter-spacing: 0.14em;
    fill: var(--ink-2);
}

.swap-label-on { fill: var(--accent); }

/* state chips (control) */
.state-row { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }

.state {
    font-family: 'Fragment Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.14em;
    padding: 6px 10px 5px;
    border: 1px solid var(--line);
    color: var(--ink-2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.state-on { border-color: var(--accent); color: var(--ink); }
.state-on::before { background: var(--route); }
.state-off::before { background: transparent; box-shadow: inset 0 0 0 1.2px var(--ink-2); }

/* ---------- Footer ---------- */

footer { margin-top: clamp(90px, 13vh, 140px); border-top: 1px solid var(--line); }

.foot-main {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 24px;
    padding-block: 36px 10px;
    flex-wrap: wrap;
}

.foot-links { display: flex; gap: 26px; }

.foot-tag { font-size: 14px; color: var(--ink-2); margin-top: 8px; }

/* The one datum that proves the whole thesis: the address never moved. */
.foot-tag .est { color: var(--accent); }

.foot-note {
    padding-block: 22px 36px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--ink-2);
    max-width: 62ch;
}

.foot-note b {
    font-family: 'Fragment Mono', ui-monospace, monospace;
    font-size: 0.86em;
    font-weight: 400;
    color: var(--accent);
    letter-spacing: 0.08em;
}

.foot-legal {
    font-family: 'Fragment Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.14em;
    color: var(--ink-2);
    padding-bottom: 36px;
}

/* ---------- Auth & request pages ---------- */

.auth-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* cross-axis auto margins would otherwise shrink-center the header */
.auth-wrap .top { width: 100%; }

.auth-main {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 40px 20px 80px;
}

.auth-panel {
    width: 100%;
    max-width: 420px;
    border-top: 2px solid var(--ink);
    padding-top: 30px;
    position: relative;
}

.auth-panel.wide { max-width: 560px; }

/* route motif: an accent tick crossing the top rule */
.auth-panel::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 0;
    width: 56px;
    height: 2px;
    background: var(--accent);
}

.auth-kicker {
    font-family: 'Fragment Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--ink-2);
    text-transform: uppercase;
}

.auth-panel h1 {
    margin-top: 12px;
    font-size: 30px;
    font-weight: 600;
    font-stretch: 120%;
    letter-spacing: -0.018em;
}

.auth-sub { margin-top: 10px; font-size: 15px; color: var(--ink-2); line-height: 1.55; }

.field { margin-top: 22px; }

.field label {
    display: block;
    font-family: 'Fragment Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-2);
    margin-bottom: 8px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field textarea {
    width: 100%;
    font: inherit;
    font-size: 15px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 0;
    padding: 12px 14px;
    transition: border-color .2s;
}

.field input:focus, .field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.field textarea { min-height: 120px; resize: vertical; }

.choice-row { display: flex; gap: 10px; flex-wrap: wrap; }

.choice { position: relative; display: inline-flex; }

.choice input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.choice span {
    font-family: 'Fragment Mono', ui-monospace, monospace;
    font-size: 10.5px;
    letter-spacing: 0.14em;
    padding: 10px 14px 9px;
    border: 1px solid var(--line);
    color: var(--ink-2);
    transition: border-color .2s, color .2s, background .2s;
}

.choice input:checked + span {
    border-color: var(--ink);
    color: var(--ink);
    background: var(--surface);
}

.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-primary {
    display: inline-block;
    font-family: 'Fragment Mono', ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: 0.16em;
    background: var(--btn-bg);
    color: var(--btn-fg);
    border: 1px solid var(--btn-bg);
    padding: 15px 26px 13px;
    cursor: pointer;
    transition: background .22s, border-color .22s, color .22s;
}

.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.btn-block { width: 100%; text-align: center; margin-top: 28px; }

.auth-alt { margin-top: 22px; font-size: 13.5px; color: var(--ink-2); }

.auth-alt a { color: var(--accent); border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.auth-alt a:hover { color: var(--ink); }

.form-error {
    margin-top: 22px;
    border-left: 2px solid var(--accent);
    padding: 10px 14px;
    font-size: 14px;
    color: var(--ink);
    background: var(--surface);
}

.form-error div + div { margin-top: 6px; }

.auth-ok {
    margin-top: 26px;
    border-top: 1px solid var(--line);
    padding-top: 22px;
}

.auth-ok .mono { color: var(--accent); font-size: 11px; }

.auth-ok p { margin-top: 10px; font-size: 15px; color: var(--ink-2); line-height: 1.6; }

/* honeypot — parked far off-screen; humans never see it, bots fill it */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* consent row on the request form */
.consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink-2);
    cursor: pointer;
}

.consent input {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--accent);
}

.consent a { color: var(--accent); border-bottom: 1px solid currentColor; }
.consent a:hover { color: var(--ink); }

.form-hint {
    margin-top: 8px;
    font-size: 13px;
    color: var(--ink-2);
    line-height: 1.5;
}

.form-hint a { color: var(--accent); border-bottom: 1px solid currentColor; }

/* ---------- Legal documents (terms, privacy) ---------- */

.legal-main { padding: 44px 20px 96px; }

.legal {
    max-width: 730px;
    margin-inline: auto;
}

.legal .auth-kicker { color: var(--ink-2); }

.legal h1 {
    margin-top: 12px;
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 600;
    font-stretch: 120%;
    letter-spacing: -0.02em;
    line-height: 1.02;
}

.legal .updated {
    margin-top: 12px;
    font-family: 'Fragment Mono', ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--ink-2);
    text-transform: uppercase;
}

.legal .lead {
    margin-top: 22px;
    font-size: 16.5px;
    line-height: 1.6;
    color: var(--ink-2);
}

.legal h2 {
    margin-top: 46px;
    padding-top: 22px;
    border-top: 1px solid var(--line-soft);
    font-size: 20px;
    font-weight: 600;
    font-stretch: 114%;
    letter-spacing: -0.012em;
    line-height: 1.15;
}

.legal h2 .s-num {
    font-family: 'Fragment Mono', ui-monospace, monospace;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-right: 10px;
    vertical-align: 2px;
}

.legal h3 {
    margin-top: 24px;
    font-size: 16px;
    font-weight: 600;
    font-stretch: 110%;
}

.legal p {
    margin-top: 12px;
    font-size: 15.5px;
    line-height: 1.68;
    color: var(--ink);
    max-width: 68ch;
}

.legal p.muted, .legal .muted { color: var(--ink-2); }

.legal ul {
    margin-top: 12px;
    padding-left: 20px;
    max-width: 68ch;
}

.legal li {
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink);
}

.legal li::marker { color: var(--accent); }

.legal a {
    color: var(--accent);
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
}

.legal a:hover { color: var(--ink); }

.legal strong { font-weight: 600; }

.legal .table-wrap { margin-top: 16px; overflow-x: auto; }

.legal table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    min-width: 460px;
}

.legal th, .legal td {
    text-align: left;
    vertical-align: top;
    padding: 10px 12px;
    border: 1px solid var(--line);
    line-height: 1.5;
}

.legal th {
    font-family: 'Fragment Mono', ui-monospace, monospace;
    font-size: 10.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-2);
    background: var(--surface);
    font-weight: 400;
}

.legal td code {
    font-family: 'Fragment Mono', ui-monospace, monospace;
    font-size: 12px;
    color: var(--accent);
}

.legal .callout {
    margin-top: 20px;
    border-left: 2px solid var(--accent);
    background: var(--surface);
    padding: 14px 16px;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--ink);
}

.legal-toc {
    margin-top: 26px;
    padding: 16px 18px;
    border: 1px solid var(--line-soft);
    background: var(--surface);
}

.legal-toc-title {
    font-family: 'Fragment Mono', ui-monospace, monospace;
    font-size: 10.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-2);
}

.legal-toc ol {
    margin-top: 10px;
    columns: 2;
    column-gap: 28px;
    padding-left: 18px;
    font-size: 13.5px;
}

.legal-toc li { margin-top: 5px; line-height: 1.4; }
.legal-toc a { border-bottom: none; color: var(--ink-2); }
.legal-toc a:hover { color: var(--accent); }

@media (max-width: 560px) {
    .legal-toc ol { columns: 1; }
}

/* ---------- 404 page ---------- */

.miss {
    min-height: 100vh;
    display: grid;
    place-content: center;
    justify-items: start;
    padding: 24px;
}

.miss .eyebrow { color: var(--accent); }

.miss h1 {
    margin-top: 18px;
    font-size: clamp(34px, 5vw, 58px);
    font-weight: 600;
    font-stretch: 120%;
    letter-spacing: -0.02em;
}

.miss p { margin-top: 14px; color: var(--ink-2); max-width: 44ch; }

.miss a { margin-top: 28px; }

/* ---------- Motion & responsive ---------- */

@media (prefers-reduced-motion: reduce) {
    .route-flow { animation: none; }
    .scene, .readout { opacity: 1; transform: none; transition: none; }
    .port, .tilt, .node-origin::after { transition: none; }
}

@media (max-width: 1180px) {
    .scene { margin-top: 250px; }
}

@media (max-width: 1080px) {
    .ann, .fig { display: none; }
    .hero-copy { grid-column: 1 / 13; }
    .scene { grid-column: 1 / 13; grid-row: 2; margin-top: 40px; height: 480px; }
    .readout { grid-row: 3; }
}

@media (max-width: 900px) {
    .wpts { grid-template-columns: 1fr; gap: 34px; }
    .wpts::before { top: 5px; bottom: 5px; left: 4px; right: auto; width: 1px; height: auto; }
    .wpts li { padding-top: 0; padding-left: 30px; }
    .wpts li::before { top: 5px; }
    .principles { grid-template-columns: 1fr; }
    .pr { grid-column: 1 / -1; grid-row: auto; padding-left: 0; border-right: 0; }
    .pr-lead { border-right: 0; border-bottom: 1px solid var(--line-soft); padding-bottom: 34px; }
}

@media (max-width: 640px) {
    .scene { height: 320px; margin-top: 24px; }
    .specimen .spec-out { display: none; }
    .specimen .spec-arrow { flex: 1; }
    .spec-note { letter-spacing: 0.08em; }
}
