/*
 * Morrow's one design system: the tokens every public page reads (the instrument views, the front
 * page's story, the record and proof pages, the documents and the 404 page), then the instrument's
 * shared parts.
 *
 *   Dark by default; light when the device asks for it, or when the header's switch sets
 *   html[data-theme] (static/feel.js keeps the choice under localStorage "morrow_theme"). The
 *   system font stack only: no web font is downloaded. Rounded, generous shapes; one accent.
 *
 *   colour   --bg --bg-2 --bg-3         ground, raised surface, inset/hover
 *            --line --line-2            hairlines (faint, stronger)
 *            --text --muted --dim       text: primary, secondary, labels (all AA on --bg and --bg-2)
 *            --safe --safe-ink          quantum-safe: text and fills, and the ink on a --safe fill
 *            --warn --warn-dim          not yet: text, and the tint behind it (--warn is AA on --warn-dim)
 *            --ok --bad --accent        ok / broken / focus and active state
 *            --glow                     the soft halo behind a safe answer
 *   type     --fs-hero --fs-h2 --fs-big --fs-xl --fs-lg --fs-md --fs-sm --fs-xs
 *   shape    --r-xs --r-sm --r-md --r-lg --r-xl --r-pill
 *   depth    --shadow-1 --shadow-2 --shadow-glow
 *   motion   --ease (settle) --ease-io (in-out) --t-fast --t-med --t-slow
 *
 * Motion answers an event or plays once; the only things allowed to move for as long as they are on
 * screen are the front page's rows of names and its glow, and both stop off screen, on hover and
 * focus, and under prefers-reduced-motion (static/home-story.css, scripts/motion-smoke.js).
 */

:root {
  --bg: #060708; --bg-2: #0d0f12; --bg-3: #15181d;
  --line: rgba(232, 240, 248, .09); --line-2: rgba(232, 240, 248, .18);
  --text: #f4f6f8; --muted: #a9b1bb; --dim: #7d868f;
  --safe: #b9f26b; --safe-ink: #0b1400; --warn: #ffb547; --warn-dim: #3a2a10; --glow: rgba(185, 242, 107, .18);
  --accent: #b9f26b; --on-solid: #000;
  --ok: #3ee38f; --bad: #ff7676;
  --ch-grade: #b9f26b; --ch-conn: #a6ecff; --ch-league: #ffd36b; --ch-atlas: #c9a6ff;
  --ch-ref: #7fd6c2; --ch-trust: #ff9fb5; --ch-tools: #e6e6e6;
  --ch: var(--accent);
  --g-a: #b9f26b; --g-b: #9be35a; --g-c: #ffd36b; --g-d: #ffb547; --g-e: #ff9364; --g-f: #ff7676;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;
  --fs-hero: clamp(46px, 9.2vw, 138px); --fs-big: clamp(112px, 26vw, 360px); --fs-h2: clamp(36px, 6.4vw, 92px);
  --fs-xl: clamp(26px, 3vw, 40px); --fs-lg: clamp(19px, 1.6vw, 22px); --fs-md: 17px; --fs-sm: 14px; --fs-xs: 12.5px;
  --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 22px; --r-xl: 30px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, .35), 0 24px 60px -24px rgba(0, 0, 0, .8);
  --shadow-glow: 0 0 0 10px var(--glow), 0 30px 80px -24px var(--safe);
  --ease: cubic-bezier(.2, .8, .2, 1); --ease-io: cubic-bezier(.65, 0, .35, 1);
  --t-fast: .16s; --t-med: .4s; --t-slow: .9s;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #fbfbf9; --bg-2: #f1f2ef; --bg-3: #e7e9e4;
    --line: rgba(12, 16, 20, .10); --line-2: rgba(12, 16, 20, .22);
    --text: #0b0d10; --muted: #4b535c; --dim: #5a636c;
    --safe: #3a7000; --safe-ink: #ffffff; --warn: #8f5200; --warn-dim: #f6e7cf; --glow: rgba(58, 112, 0, .13);
    --accent: #3a7000; --on-solid: #fff;
    --ok: #0f7a45; --bad: #b42b28;
    --ch-grade: #3a7000; --ch-conn: #006f8f; --ch-league: #7a5a00; --ch-atlas: #6a3fb0;
    --ch-ref: #0d6b58; --ch-trust: #a3304f; --ch-tools: #333;
    --g-a: #3a7000; --g-b: #4f7a00; --g-c: #7a6400; --g-d: #8f5200; --g-e: #a8461a; --g-f: #b42b28;
    --shadow-1: 0 1px 2px rgba(12, 16, 20, .06), 0 8px 24px -12px rgba(12, 16, 20, .18);
    --shadow-2: 0 2px 6px rgba(12, 16, 20, .06), 0 24px 60px -24px rgba(12, 16, 20, .28);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #fbfbf9; --bg-2: #f1f2ef; --bg-3: #e7e9e4;
  --line: rgba(12, 16, 20, .10); --line-2: rgba(12, 16, 20, .22);
  --text: #0b0d10; --muted: #4b535c; --dim: #5a636c;
  --safe: #3a7000; --safe-ink: #ffffff; --warn: #8f5200; --warn-dim: #f6e7cf; --glow: rgba(58, 112, 0, .13);
  --accent: #3a7000; --on-solid: #fff;
  --ok: #0f7a45; --bad: #b42b28;
  --ch-grade: #3a7000; --ch-conn: #006f8f; --ch-league: #7a5a00; --ch-atlas: #6a3fb0;
  --ch-ref: #0d6b58; --ch-trust: #a3304f; --ch-tools: #333;
  --g-a: #3a7000; --g-b: #4f7a00; --g-c: #7a6400; --g-d: #8f5200; --g-e: #a8461a; --g-f: #b42b28;
  --shadow-1: 0 1px 2px rgba(12, 16, 20, .06), 0 8px 24px -12px rgba(12, 16, 20, .18);
  --shadow-2: 0 2px 6px rgba(12, 16, 20, .06), 0 24px 60px -24px rgba(12, 16, 20, .28);
  color-scheme: light;
}
[data-ch="grade"] { --ch: var(--ch-grade); }
[data-ch="conn"] { --ch: var(--ch-conn); }
[data-ch="league"] { --ch: var(--ch-league); }
[data-ch="atlas"] { --ch: var(--ch-atlas); }
[data-ch="ref"] { --ch: var(--ch-ref); }
[data-ch="trust"] { --ch: var(--ch-trust); }
[data-ch="tools"] { --ch: var(--ch-tools); }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.ins { background: var(--bg); color: var(--text); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100vh; }
.ins a { color: inherit; }
.ins button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
.ins :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ins ::selection { background: var(--accent); color: var(--on-solid); }
.ins kbd { font: 11px var(--mono); border: 1px solid var(--line-2); padding: 1px 5px; color: var(--muted); background: var(--bg-2); }
.ins code, .ins pre, .mono { font-family: var(--mono); }
.ins pre { margin: 0; white-space: pre-wrap; word-break: break-word; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--text); color: var(--on-solid); padding: 8px 14px; }
.skip:focus { top: 8px; }

/* ── Frame: top strip with wordmark, channels, the one input, the dial ── */
.i-top { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); }
.i-top-in { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); min-height: 56px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.i-mark { font: 600 13px var(--mono); letter-spacing: .28em; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.i-mark::before { content: ""; width: 10px; height: 10px; background: var(--ch-grade); }
.i-channels { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; font-size: 14px; }
.i-channels a { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; color: var(--muted); text-decoration: none; border: 1px solid transparent; white-space: nowrap; }
.i-channels a::before { content: ""; width: 6px; height: 6px; background: var(--ch); }
.i-channels a:hover { color: var(--text); }
.i-channels a[aria-current="page"] { color: var(--text); border-color: var(--line-2); background: var(--bg-2); }
.i-top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.i-cmd-btn { display: inline-flex; align-items: center; gap: 10px; height: 34px; padding: 0 8px 0 12px; min-width: 220px; border: 1px solid var(--line-2) !important; background: var(--bg-2) !important; color: var(--dim) !important; font-size: 14px; }
.i-cmd-btn kbd { margin-left: auto; }
.i-cmd-btn:hover { color: var(--muted) !important; border-color: var(--text) !important; }
@media (max-width: 860px) {
  .i-top-in { padding-block: 8px; gap: 8px 12px; }
  .i-channels { order: 3; width: 100%; }
  .i-cmd-btn { min-width: 0; }
  .i-cmd-btn kbd, .i-cmd-btn .t { display: none; }
}

/* the technicality dial */
.i-dial { display: inline-flex; border: 1px solid var(--line-2); font: 12px var(--mono); }
.i-dial button { padding: 6px 9px; color: var(--muted) !important; }
.i-dial button[aria-pressed="true"] { background: var(--text) !important; color: var(--on-solid) !important; }

/* live connection readout strip */
.i-conn { border-bottom: 1px solid var(--line); background: var(--bg-2); font: 12.5px var(--mono); color: var(--muted); }
.i-conn-in { max-width: var(--max); margin: 0 auto; padding: 6px var(--gutter); display: flex; gap: 6px 18px; flex-wrap: wrap; align-items: center; }
.i-conn b { color: var(--text); font-weight: 500; }
.i-conn [data-s="pq"] { color: var(--ok); }
.i-conn [data-s="classical"] { color: var(--warn); }
.i-conn a { color: var(--muted); }

/* ── Page body ── */
.i-main { max-width: var(--max); margin: 0 auto; padding: clamp(20px, 3vw, 40px) var(--gutter) 64px; }
.i-say { font-size: clamp(20px, 2.2vw, 28px); line-height: 1.3; letter-spacing: -.01em; margin: 0 0 24px; max-width: 46ch; text-wrap: balance; }
.i-say::before { content: "\201C"; color: var(--ch); margin-right: .1em; }
.i-say::after { content: "\201D"; color: var(--ch); margin-left: .05em; }
.i-eyebrow { font: 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin: 0 0 8px; }
.i-h1 { font-size: clamp(28px, 4vw, 52px); line-height: 1.04; letter-spacing: -.03em; font-weight: 500; margin: 0; word-break: break-word; }
.i-h2 { font-size: 20px; font-weight: 500; margin: 0; letter-spacing: -.01em; }
.i-muted { color: var(--muted); }
.i-dim { color: var(--dim); }
.i-fine { font-size: 13px; color: var(--dim); }
.i-fine a, .i-muted a { color: var(--muted); }
p { max-width: 72ch; }

/* channel panels: a labelled rule, never a card with shadows */
.ch { border: 1px solid var(--line); background: var(--bg); margin: 0 0 16px; min-width: 0; }
.ch-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); font: 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.ch-head::before { content: ""; width: 8px; height: 8px; background: var(--ch); flex: none; }
.ch-head .ch-n { color: var(--ch); }
.ch-head .ch-r { margin-left: auto; letter-spacing: .04em; text-transform: none; }
.ch-body { padding: 14px 12px; min-width: 0; }
.ch-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; } .span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; }
@media (max-width: 900px) { .ch-grid > * { grid-column: span 12; } }

/* readouts: label above, mono value below */
.readouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.reading { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 12px; min-width: 0; }
.reading dt, .reading .k { font: 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin: 0 0 4px; }
.reading dd, .reading .v { margin: 0; font: 500 15px var(--mono); overflow-wrap: anywhere; }
.reading .v small { font-weight: 400; color: var(--dim); font-size: 12px; }
dl.readouts { margin: 0; }
.v-ok { color: var(--ok); } .v-warn { color: var(--warn); } .v-bad { color: var(--bad); }

/* the big grade */
.grade { display: inline-grid; place-items: center; width: 112px; height: 112px; border: 1px solid var(--line-2); font: 500 64px/1 var(--mono); color: var(--gc, var(--text)); }
.grade[data-g="A"] { --gc: var(--g-a); } .grade[data-g="B"] { --gc: var(--g-b); } .grade[data-g="C"] { --gc: var(--g-c); }
.grade[data-g="D"] { --gc: var(--g-d); } .grade[data-g="E"] { --gc: var(--g-e); } .grade[data-g="F"] { --gc: var(--g-f); }
.g-chip { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 4px; border: 1px solid var(--line-2); font: 500 13px var(--mono); color: var(--gc, var(--dim)); }
.g-chip[data-g="A"] { --gc: var(--g-a); } .g-chip[data-g="B"] { --gc: var(--g-b); } .g-chip[data-g="C"] { --gc: var(--g-c); }
.g-chip[data-g="D"] { --gc: var(--g-d); } .g-chip[data-g="E"] { --gc: var(--g-e); } .g-chip[data-g="F"] { --gc: var(--g-f); }

/* inputs and buttons */
.i-field { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-2); background: var(--bg-2); padding: 0 12px; }
.i-field:focus-within { border-color: var(--accent); }
.i-field input { flex: 1; min-width: 0; height: 48px; border: 0; background: transparent; color: var(--text); font: 16px var(--mono); outline: none; }
.i-field input::placeholder { color: var(--dim); }
.i-field .p { color: var(--accent); font: 18px var(--mono); }
.i-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line-2) !important; font-size: 14px; text-decoration: none; white-space: nowrap; color: var(--text); }
.i-btn:hover { border-color: var(--text) !important; }
.i-btn.solid { background: var(--text) !important; color: var(--on-solid) !important; border-color: var(--text) !important; }
.i-btn[disabled], .i-btn[aria-busy="true"] { opacity: .5; cursor: default; }
.i-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* tables */
.i-table-wrap { overflow-x: auto; }
table.i-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.i-table th { text-align: left; font: 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); font-weight: 400; padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.i-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.i-table tr[data-href] { cursor: pointer; }
.i-table tr[data-href]:hover td { background: var(--bg-2); }
.i-table .num { text-align: right; font-family: var(--mono); }

/* the command bar */
.i-pal-back { position: fixed; inset: 0; z-index: 90; background: color-mix(in srgb, var(--bg) 72%, transparent); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.i-pal { width: min(680px, 100%); background: var(--bg-2); border: 1px solid var(--line-2); }
.i-pal .i-field { border: 0; border-bottom: 1px solid var(--line); }
.i-opts { max-height: min(60vh, 440px); overflow-y: auto; }
.i-opt { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 9px 14px; cursor: pointer; border-left: 2px solid transparent; text-decoration: none; }
.i-opt[aria-selected="true"] { background: var(--bg-3); border-left-color: var(--accent); }
.i-opt .k { font: 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.i-opt[data-kind="domain"] .k { color: var(--ch-grade); } .i-opt[data-kind="algorithm"] .k { color: var(--ch-ref); }
.i-opt[data-kind="commit"] .k { color: var(--ch-trust); } .i-opt[data-kind="cve"] .k { color: var(--warn); }
.i-opt .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.i-opt .h { font-size: 13px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 28ch; }
.i-pal-foot { display: flex; gap: 18px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 11px; color: var(--dim); }
@media (max-width: 560px) { .i-opt { grid-template-columns: 60px minmax(0, 1fr); } .i-opt .h, .i-pal-foot { display: none; } .i-pal-back { padding-top: 8px; } }

/* time scrubber (scroll as time) */
.scrub { display: flex; gap: 2px; align-items: flex-end; height: 44px; border-bottom: 1px solid var(--line); overflow-x: auto; overscroll-behavior: contain; touch-action: pan-x; }
.scrub button { flex: 0 0 auto; width: 16px; height: 100%; display: flex; align-items: flex-end; }
.scrub button i { display: block; width: 100%; background: var(--gc, var(--line-2)); height: var(--h, 30%); }
.scrub button[aria-current="true"] { outline: 1px solid var(--text); outline-offset: 1px; }
.scrub button[data-g="A"] { --gc: var(--g-a); --h: 100%; } .scrub button[data-g="B"] { --gc: var(--g-b); --h: 84%; }
.scrub button[data-g="C"] { --gc: var(--g-c); --h: 68%; } .scrub button[data-g="D"] { --gc: var(--g-d); --h: 52%; }
.scrub button[data-g="E"] { --gc: var(--g-e); --h: 36%; } .scrub button[data-g="F"] { --gc: var(--g-f); --h: 20%; }

/* status line and toasts that answer a real event */
.i-status { font: 13px var(--mono); color: var(--muted); min-height: 1.4em; }
.i-status[data-tone="bad"] { color: var(--bad); } .i-status[data-tone="ok"] { color: var(--ok); }
.flash { animation: i-flash .9s ease-out 1; }
@keyframes i-flash { from { background: color-mix(in srgb, var(--ch) 26%, transparent); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } * { scroll-behavior: auto !important; transition: none !important; } }

/* the plain-language footer */
.i-foot { border-top: 1px solid var(--line); margin-top: 32px; }
.i-foot-in { max-width: var(--max); margin: 0 auto; padding: 16px var(--gutter) 28px; display: flex; flex-wrap: wrap; gap: 8px 20px; font: 12px var(--mono); color: var(--dim); }
.i-foot a { color: var(--muted); }
.i-empty { padding: 18px 12px; color: var(--muted); font-size: 14px; }
.i-tl { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line-2); }
.i-tl li { position: relative; padding: 0 0 18px 18px; }
.i-tl li::before { content: ""; position: absolute; left: -4px; top: 8px; width: 7px; height: 7px; background: var(--ch); }
.i-tl .y { font: 500 13px var(--mono); color: var(--ch); }

/* atlas: the zoomable map */
.atlas-wrap { height: min(70vh, 640px); background: var(--bg-2); }
svg.atlas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; user-select: none; }
svg.atlas:active { cursor: grabbing; }
.atlas-frame { fill: none; stroke: var(--line-2); stroke-width: .5; vector-effect: non-scaling-stroke; }
.atlas-region-label { fill: var(--muted); font: 5px var(--mono); }
.atlas-cell rect { fill: var(--line-2); }
.atlas-cell rect[data-g="A"] { fill: var(--g-a); } .atlas-cell rect[data-g="B"] { fill: var(--g-b); } .atlas-cell rect[data-g="C"] { fill: var(--g-c); }
.atlas-cell rect[data-g="D"] { fill: var(--g-d); } .atlas-cell rect[data-g="E"] { fill: var(--g-e); } .atlas-cell rect[data-g="F"] { fill: var(--g-f); }
.atlas-cell:hover rect, .atlas-focus rect { stroke: var(--text); stroke-width: 1; vector-effect: non-scaling-stroke; }
.atlas-cell-label { display: none; fill: var(--on-solid); font: .9px var(--mono); pointer-events: none; }
svg.atlas[data-zoom="near"] .atlas-cell-label { display: inline; }
svg.atlas[data-zoom="near"] .atlas-region-label { font-size: 2.2px; }
.i-opts:empty { display: none; }
.i-main .i-opts { border: 1px solid var(--line-2); border-top: 0; background: var(--bg-2); }
.i-main .i-channels { margin: 14px 0; }
.i-main ul { padding-left: 18px; }
select.i-btn { background: var(--bg-2); }
.i-field input:focus-visible { outline: none; }
.ins pre { font-size: 13px; line-height: 1.5; }
.i-big { font: 500 clamp(26px, 3vw, 38px)/1.1 var(--sans); letter-spacing: -.02em; margin: 0 0 10px; }
.i-h1 { margin-bottom: 18px; }
.ch-body { overflow-wrap: anywhere; }
.i-fine code, .ch-body code { word-break: break-all; }
.i-top { position: static; }
.atlas-cell rect:not([data-g]), .atlas-cell rect[data-g=""] { fill: none; stroke: var(--line-2); stroke-width: .4; vector-effect: non-scaling-stroke; }
.i-answer { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin: 0 0 18px; }
.i-answer .i-h2 { font-family: var(--mono); }
.bar { display: flex; width: 100%; min-width: 120px; height: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.bar .seg { display: block; height: 100%; background: var(--gc, var(--line-2)); }
.seg[data-g="A"] { --gc: var(--g-a); } .seg[data-g="B"] { --gc: var(--g-b); } .seg[data-g="C"] { --gc: var(--g-c); }
.seg[data-g="D"] { --gc: var(--g-d); } .seg[data-g="E"] { --gc: var(--g-e); } .seg[data-g="F"] { --gc: var(--g-f); }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 22px; min-width: 60px; }
.spark .tick { display: block; width: 5px; background: var(--ok); }
.fix { border-top: 1px solid var(--line); padding-top: 10px; margin-bottom: 10px; }
.fix p { margin: 0 0 6px; }
/* Buttons: ruled, mono, never a bare box. Solid is the one action of a view (Re-check). */
.ins .i-btn { padding: 0 14px; background: var(--bg-2); border: 1px solid var(--line-2); font: 500 13px var(--mono); letter-spacing: .02em; color: var(--text); cursor: pointer; }
.ins .i-btn:hover { background: var(--bg-3); }
.ins .i-btn.solid { background: var(--ch-grade) !important; border-color: var(--ch-grade) !important; color: var(--on-solid) !important; }
.ins .i-btn.solid:hover { filter: brightness(1.08); }
.ins .fix .i-btn { min-height: 28px; padding: 0 10px; font-size: 12px; margin-left: 8px; vertical-align: middle; }
.i-conn[hidden] { display: none; }
@media (max-width: 560px) { .i-top-right { width: 100%; } .i-cmd-btn { flex: 1; } .i-cmd-btn .t { display: inline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
.nr-list { list-style: none; margin: 0; padding: 0; }
.nr-list li { border-top: 1px solid var(--line); padding: 10px 0; }
.nr-list p { margin: 0 0 6px; }
.ins textarea.i-btn, .ins input.i-btn { display: block; width: 100%; max-width: 520px; min-height: 34px; padding: 6px 10px; font: 14px var(--sans); white-space: normal; }
/* Your quantum risk in one sentence: the first thing on every report, with the assumption under it. */
.risk { border-left: 3px solid var(--ch, var(--line-2)); padding: 2px 0 2px 14px; margin: 0 0 22px; max-width: 72ch; }
.ins .risk-say { font: 500 clamp(19px, 2.2vw, 26px)/1.3 var(--sans); letter-spacing: -.01em; margin: 0 0 10px; overflow-wrap: anywhere; }
.risk-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.risk-pick label { flex: 1 0 100%; font: 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.risk-pick select { min-width: 0; max-width: 100%; flex: 1 1 160px; }
.risk-pick select + select { flex: 0 1 auto; }
.ins .risk .i-fine { margin: 8px 0 0; overflow-wrap: anywhere; }
/* The harvest clock: two dials and one line, answered as they move. */
.ins .hv-say, .ins .tp-say { font: 500 clamp(19px, 2.1vw, 25px)/1.3 var(--sans); letter-spacing: -.01em; margin: 0 0 14px; max-width: 64ch; }
.hv-dials { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 24px; margin: 4px 0 18px; }
.hv-dial { min-width: 0; }
.hv-dial label { display: block; font: 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin: 0 0 6px; }
.hv-dial input[type="range"] { width: 100%; margin: 0; accent-color: var(--ch); }
.hv-dial input[type="range"]:disabled { opacity: .4; }
.hv-dial output { display: block; font: 500 14px var(--mono); margin-top: 4px; overflow-wrap: anywhere; }
.hv-exs { margin-top: 8px; gap: 6px; }
.ins .hv-ex { min-height: 26px; padding: 0 8px; font-size: 11.5px; }
.hv-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hv-pick select { min-width: 0; max-width: 100%; flex: 1 1 140px; }
.hv-pick select + select { flex: 0 1 auto; }
.ins .hv-cat { margin: 6px 0 0; overflow-wrap: anywhere; }
.hv-cat a { overflow-wrap: anywhere; }
.hv-line { position: relative; height: 58px; border-bottom: 1px solid var(--line-2); margin: 6px 0 26px; }
.hv-line [hidden] { display: none; }
.hv-band { position: absolute; bottom: 0; height: 10px; background: color-mix(in srgb, var(--warn) 24%, transparent); }
.hv-gap { position: absolute; bottom: 0; height: 4px; background: var(--bad); }
.hv-mark { position: absolute; bottom: 0; width: 1px; height: 44px; background: var(--text); }
.hv-mark b { position: absolute; top: 0; left: 5px; font: 400 11px var(--mono); white-space: nowrap; color: var(--muted); }
.hv-mark.flip b { left: auto; right: 5px; }
.hv-z { background: var(--warn); height: 26px; }
.hv-u b { top: 0; } .hv-z b { top: -2px; }
.hv-a0, .hv-a1 { position: absolute; top: 100%; margin-top: 4px; font: 11px var(--mono); color: var(--dim); }
.hv-a0 { left: 0; } .hv-a1 { right: 0; }
#tp-list td:first-child { white-space: nowrap; }
/* Vendor check, what changed, sector reports. The trend line is a plain polyline on a fixed 0-100% scale. */
.ins textarea.vc-text { max-width: none; min-height: 168px; font: 14px/1.5 var(--mono); }
.vc-row { margin: 10px 0 4px; }
.vc-file { cursor: pointer; }
.vc-ws { display: inline-flex; gap: 8px 10px; flex-wrap: wrap; align-items: center; }
.ins .vc-ws input.i-btn { display: inline-block; width: auto; min-width: 0; max-width: 240px; }
.vc-chk { font-size: 13px; color: var(--muted); }
.vr-note td { background: var(--bg-2); }
.vr-note pre { margin-bottom: 10px; max-width: 80ch; }
.cg-list { list-style: none; margin: 0; padding: 0; }
.cg-list li { display: grid; grid-template-columns: 96px 76px minmax(0, 1fr); gap: 4px 12px; border-top: 1px solid var(--line); padding: 9px 0; align-items: baseline; }
.cg-list .k { font: 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.cg-list .k[data-k="ready"], .cg-list .k[data-k="listed"] { color: var(--ok); }
.cg-list .k[data-k="not_ready"] { color: var(--warn); }
@media (max-width: 560px) { .cg-list li { grid-template-columns: 1fr; } }
svg.tl { display: block; width: 100%; height: 120px; }
svg.tl.mini { width: 96px; height: 22px; }
.tl-line { fill: none; stroke: var(--ch); stroke-width: 2; vector-effect: non-scaling-stroke; }
.tl-base, .tl-top { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.tl-top { stroke-dasharray: 2 3; }
.tl-axis { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font: 11px var(--mono); color: var(--dim); margin-top: 4px; }

/* Home: one domain input, one action. */
.i-safe { margin: 0 0 8px; }
.i-safe-l { display: block; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.i-safe-row { display: flex; gap: 8px; align-items: stretch; }
.i-safe-row .i-field { flex: 1; min-width: 0; }
.i-safe-go { flex: none; justify-content: center; min-height: 50px; padding: 0 20px; font-size: 15px; cursor: pointer; }
.i-safe #home-hint[data-tone="bad"] { color: var(--bad, #c0392b); }
/* Your connection, right now: one line under the domain box; the invisible sizer reserves its height. */
.i-safe .i-you { display: grid; margin: 4px 0 0; }
.i-safe .i-you > span { grid-area: 1 / 1; }
.i-safe .i-you-size { visibility: hidden; }
@media (max-width: 520px) {
  .i-safe-row { flex-direction: column; }
  .i-safe-go { width: 100%; min-height: 48px; }
}
