/* ORSTYDE — Design System V1
   Enterprise, minimal, data-first. No external fonts or CDNs (strict CSP: 'self' only).
   Tokens first; components below; every value used by the UI comes from the public API. */

:root {
  /* ink & surfaces */
  --bg: #fbfbfa;
  --surface: #ffffff;
  --surface-2: #f4f5f7;
  --ink: #0b1220;
  --ink-2: #2f3a4f;
  --muted: #667085;
  --line: #e5e7eb;
  --line-strong: #cfd4dc;
  /* brand */
  --accent: #1f4fe0;
  --accent-ink: #ffffff;
  --accent-soft: #eaf0ff;
  --focus: #1f4fe0;
  /* truth statuses (semantic, used everywhere the same way) */
  --st-official: #0e7a55;  --st-official-bg: #e7f5ee;
  --st-derived:  #1f4fe0;  --st-derived-bg:  #eaf0ff;
  --st-inference:#a3560a;  --st-inference-bg:#fdf1e3;
  --st-unknown:  #5b6474;  --st-unknown-bg:  #eef0f3;
  --danger: #b42318; --danger-bg: #fdecea;
  /* type */
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --fs-xs: 12px; --fs-sm: 14px; --fs-md: 16px; --fs-lg: 18px; --fs-xl: 22px; --fs-2xl: 30px; --fs-3xl: 44px; --fs-4xl: 60px;
  /* space & shape */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px;
  --shadow-1: 0 1px 2px rgba(11,18,32,.06), 0 1px 1px rgba(11,18,32,.04);
  --shadow-2: 0 12px 32px -12px rgba(11,18,32,.18), 0 2px 6px rgba(11,18,32,.06);
  --max: 1180px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #080c16; --surface: #0e1422; --surface-2: #131a2b; --ink: #eef1f7; --ink-2: #c3cad8; --muted: #8b95a8;
    --line: #1e2638; --line-strong: #2b3550; --accent: #6d8dff; --accent-ink: #0b1220; --accent-soft: #16213f;
    --st-official: #3fcf97; --st-official-bg: #0f2a20; --st-derived: #7d9bff; --st-derived-bg: #141f3d;
    --st-inference: #f0a959; --st-inference-bg: #2d1e0c; --st-unknown: #9aa3b5; --st-unknown-bg: #1a2130;
    --danger: #ff7a6b; --danger-bg: #2d1210;
    --shadow-1: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 16px 40px -16px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #080c16; --surface: #0e1422; --surface-2: #131a2b; --ink: #eef1f7; --ink-2: #c3cad8; --muted: #8b95a8;
  --line: #1e2638; --line-strong: #2b3550; --accent: #6d8dff; --accent-ink: #0b1220; --accent-soft: #16213f;
  --st-official: #3fcf97; --st-official-bg: #0f2a20; --st-derived: #7d9bff; --st-derived-bg: #141f3d;
  --st-inference: #f0a959; --st-inference-bg: #2d1e0c; --st-unknown: #9aa3b5; --st-unknown-bg: #1a2130;
  --danger: #ff7a6b; --danger-bg: #2d1210;
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--fs-md)/1.6 var(--font);
       -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0 0 var(--s3); line-height: 1.15; letter-spacing: -0.02em; font-weight: 650; }
h1 { font-size: clamp(34px, 5.2vw, var(--fs-4xl)); letter-spacing: -0.035em; }
h2 { font-size: clamp(26px, 3.2vw, var(--fs-3xl)); letter-spacing: -0.03em; }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-md); }
p { margin: 0 0 var(--s4); color: var(--ink-2); }
code, pre, .mono { font-family: var(--mono); font-size: 0.9em; }
img, svg { max-width: 100%; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--s4); top: var(--s4); background: var(--surface); padding: var(--s2) var(--s3); z-index: 99; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--s5); }
@media (max-width: 640px) { .wrap { padding: 0 var(--s4); } }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.eyebrow { font: 600 var(--fs-xs)/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
           margin-bottom: var(--s4); display: inline-flex; align-items: center; gap: var(--s2); }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--line-strong); }
.lead { font-size: var(--fs-lg); color: var(--ink-2); max-width: 62ch; }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- header / nav */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 86%, transparent);
               backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: var(--s6); height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; letter-spacing: -0.02em;
         font-size: 17px; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 22px; height: 22px; }
.nav-links { display: flex; gap: var(--s5); list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink-2); font-size: var(--fs-sm); font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); text-decoration: none; }
.nav-links a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); padding-bottom: 20px; }
.nav-right { margin-left: auto; display: flex; gap: var(--s3); align-items: center; }
.nav-right .menu-btn { display: none; }
@media (max-width: 900px) {
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0;
               background: var(--surface); border-bottom: 1px solid var(--line); padding: var(--s2) var(--s4); }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: var(--s3) 0; }
  .nav-links a[aria-current="page"] { box-shadow: none; padding-bottom: var(--s3); color: var(--accent); }
  .nav-right .menu-btn { display: inline-flex; }
  .nav-right .btn-secondary { display: none; }
}

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); height: 40px; padding: 0 var(--s4);
       border-radius: var(--r-sm); border: 1px solid transparent; font: 600 var(--fs-sm)/1 var(--font); cursor: pointer;
       transition: background .15s, border-color .15s, color .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--accent-ink); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { color: var(--ink); background: var(--surface-2); }
.btn-lg { height: 48px; padding: 0 var(--s5); font-size: var(--fs-md); }
.btn-sm { height: 32px; padding: 0 var(--s3); font-size: var(--fs-xs); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.arrow::after { content: "→"; display: inline-block; margin-left: 6px; transition: transform .15s; }
.btn:hover .arrow::after, a:hover .arrow::after { transform: translateX(2px); }

/* ---------------------------------------------------------------- layout */
.section { padding: var(--s8) 0; border-bottom: 1px solid var(--line); }
.section-tight { padding: var(--s7) 0; }
.section-head { max-width: 760px; margin-bottom: var(--s6); }
.section-head p:last-child { margin-bottom: 0; }
.grid { display: grid; gap: var(--s5); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
                            .section { padding: var(--s7) 0; } .section-tight { padding: var(--s6) 0; }
                            .section-head { margin-bottom: var(--s5); } }
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--s8); align-items: center; }
@media (max-width: 960px) { .split { grid-template-columns: minmax(0, 1fr); gap: var(--s7); } }
.row { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.stack > * + * { margin-top: var(--s4); }

/* ---------------------------------------------------------------- hero */
.hero { padding: var(--s8) 0 var(--s7); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
                background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
                background-size: 56px 56px; mask-image: radial-gradient(ellipse 70% 60% at 70% 20%, #000 20%, transparent 75%);
                opacity: .55; }
.hero .wrap { position: relative; }
.hero h1 { max-width: 15ch; }
.hero .lead { margin: var(--s5) 0 var(--s6); }

/* ---------------------------------------------------------------- cards, panels */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s5);
        box-shadow: var(--shadow-1); }
.card h3 { font-size: var(--fs-lg); margin-bottom: var(--s2); }
.card p:last-child { margin-bottom: 0; }
.card-link { display: block; color: inherit; transition: border-color .15s, transform .15s; }
.card-link:hover { border-color: var(--line-strong); text-decoration: none; transform: translateY(-1px); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2);
         overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line);
              background: var(--surface-2); font: 500 var(--fs-xs)/1 var(--mono); color: var(--muted); }
.panel-body { padding: var(--s4); }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); display: block; }
.icon-box { width: 36px; height: 36px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--accent-soft);
            color: var(--accent); margin-bottom: var(--s4); }
.icon-box svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- data display */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-md);
        background: var(--surface); }
.kpi { padding: var(--s5); border-left: 1px solid var(--line); min-width: 0; }
.kpi:first-child { border-left: 0; }
.kpi-value { font: 600 var(--fs-2xl)/1.1 var(--font); letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
             overflow-wrap: anywhere; }
.kpi-value.mono { font: 500 var(--fs-md)/1.4 var(--mono); letter-spacing: 0; }
.kpi-label { font-size: var(--fs-xs); color: var(--muted); margin-top: var(--s2); text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 800px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi:nth-child(3) { border-left: 0; }
                            .kpi:nth-child(n+3) { border-top: 1px solid var(--line); } }
.live { display: inline-flex; align-items: center; gap: 6px; font: 500 var(--fs-xs)/1 var(--mono); color: var(--muted); }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--st-official);
                box-shadow: 0 0 0 3px var(--st-official-bg); }
.live.off::before { background: var(--st-unknown); box-shadow: 0 0 0 3px var(--st-unknown-bg); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
th { text-align: left; font: 600 var(--fs-xs)/1.2 var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
     padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
td { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; text-align: right; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px;
         font: 600 11px/1 var(--mono); letter-spacing: .02em; white-space: nowrap; border: 1px solid transparent; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-official_fact { color: var(--st-official); background: var(--st-official-bg); }
.st-derived_fact { color: var(--st-derived); background: var(--st-derived-bg); }
.st-inference { color: var(--st-inference); background: var(--st-inference-bg); }
.st-unknown { color: var(--st-unknown); background: var(--st-unknown-bg); }
.badge-live { color: var(--st-official); background: var(--st-official-bg); }
.badge-planned { color: var(--st-unknown); background: transparent; border-color: var(--line-strong); }
.badge-beta { color: var(--st-inference); background: var(--st-inference-bg); }
.badge-na { color: var(--st-unknown); background: var(--st-unknown-bg); }

pre.code { margin: 0; padding: var(--s4); overflow-x: auto; background: #0b1220; color: #d6ddf0; border-radius: var(--r-md);
           font: 400 13px/1.65 var(--mono); border: 1px solid #1c2436; }
:root[data-theme="dark"] pre.code { background: #060a13; }
.code .k { color: #8fb0ff; } .code .s { color: #9fe0bf; } .code .c { color: #6b7894; } .code .n { color: #f3c38a; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: var(--s2) var(--s5); font-size: var(--fs-sm); }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-family: var(--mono); overflow-wrap: anywhere; }

/* workflow steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 0;
         grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--line); border-radius: var(--r-md);
         background: var(--surface); }
.steps li { counter-increment: s; padding: var(--s4); border-left: 1px solid var(--line); font-size: var(--fs-sm); }
.steps li:first-child { border-left: 0; }
.steps li::before { content: counter(s, decimal-leading-zero); display: block; font: 600 var(--fs-xs)/1 var(--mono);
                    color: var(--accent); margin-bottom: var(--s2); }
.steps li strong { display: block; color: var(--ink); }
.steps li span { color: var(--muted); font-size: var(--fs-xs); font-family: var(--mono); }
@media (max-width: 640px) { .steps li { border-left: 0; border-top: 1px solid var(--line); } .steps li:first-child { border-top: 0; } }

/* interfaces tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 0; }
.tab { background: none; border: 0; padding: var(--s3) var(--s4); font: 600 var(--fs-sm)/1 var(--font); color: var(--muted);
       cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }

/* network tiles */
.tile { position: relative; }
.tile .row { justify-content: space-between; margin-bottom: var(--s4); }
.tile.planned { background: transparent; box-shadow: none; border-style: dashed; }
.tile.planned h3, .tile.planned p { color: var(--muted); }

/* callouts */
.callout { border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--surface); padding: var(--s4) var(--s5);
           border-radius: var(--r-sm); font-size: var(--fs-sm); color: var(--ink-2); }
.callout.warn { border-left-color: var(--st-inference); }
.callout.danger { border-left-color: var(--danger); background: var(--danger-bg); }

/* forms */
.field { display: grid; gap: var(--s2); margin-bottom: var(--s5); }
.field label, .legend { font-weight: 600; font-size: var(--fs-sm); }
.hint { font-size: var(--fs-xs); color: var(--muted); }
input[type="text"], input[type="password"], input[type="search"], select, textarea {
  width: 100%; height: 42px; padding: 0 var(--s3); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); font: 400 var(--fs-md) var(--font); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--s2); }
.check { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3); border: 1px solid var(--line);
         border-radius: var(--r-sm); background: var(--surface); cursor: pointer; font-size: var(--fs-sm); }
.check:hover { border-color: var(--line-strong); }
.check input { margin-top: 3px; accent-color: var(--accent); }
.check small { display: block; color: var(--muted); font-family: var(--mono); font-size: 11px; }
fieldset { border: 0; padding: 0; margin: 0 0 var(--s5); min-width: 0; }

/* drawer (evidence) */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--surface);
          border-left: 1px solid var(--line); box-shadow: var(--shadow-2); z-index: 80; transform: translateX(100%);
          transition: transform .2s ease; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s4) var(--s5);
               border-bottom: 1px solid var(--line); }
.drawer-body { padding: var(--s5); overflow-y: auto; }
.evidence { border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--s4); margin-bottom: var(--s3); }
.evidence blockquote { margin: var(--s2) 0; padding-left: var(--s3); border-left: 2px solid var(--line-strong);
                       color: var(--ink-2); font-size: var(--fs-sm); }

/* price */
.price { display: flex; align-items: baseline; gap: var(--s2); }
.price-amount { font: 650 var(--fs-3xl)/1 var(--font); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.skeleton { display: inline-block; min-width: 4ch; height: 1em; border-radius: 4px; vertical-align: middle;
            background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%;
            animation: sk 1.2s linear infinite; color: transparent; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } .drawer { transition: none; } }

/* footer */
.site-footer { padding: var(--s8) 0 var(--s7); color: var(--muted); font-size: var(--fs-sm); }
.footer-grid { display: grid; grid-template-columns: 1.7fr repeat(4, 1fr); gap: var(--s6); }
.footer-grid h4 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--ink); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.footer-grid a { color: var(--muted); }
.footer-grid a:hover { color: var(--ink); }
.footer-base { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--line); display: flex; gap: var(--s4);
               justify-content: space-between; flex-wrap: wrap; font-size: var(--fs-xs); }
@media (max-width: 1000px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } .footer-grid > div:first-child { grid-column: 1 / -1; } }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s5); } }

/* ---------------------------------------------------------------- editorial / infrastructure components
   Used in place of card grids: rules, tables, flows and evidence trails rather than rounded boxes. */

/* three-question answer strip under the hero: the 10-second test */
.answers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
           border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.answers > div { padding: var(--s5) var(--s5) var(--s5) 0; border-left: 1px solid var(--line); }
.answers > div:first-child { border-left: 0; padding-left: 0; }
.answers > div:not(:first-child) { padding-left: var(--s5); }
.answers dt { font: 600 var(--fs-xs)/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
              margin-bottom: var(--s3); }
.answers dd { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); }
.answers strong { color: var(--ink); font-weight: 600; }
@media (max-width: 800px) {
  .answers { grid-template-columns: minmax(0, 1fr); }
  .answers > div { border-left: 0; border-top: 1px solid var(--line); padding: var(--s4) 0; }
  .answers > div:first-child { border-top: 0; }
  .answers > div:not(:first-child) { padding-left: 0; }
}

/* definition rows: replaces a grid of cards where the content is really a list */
.rows { border-top: 1px solid var(--line); }
.rows > div { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: var(--s3) var(--s6);
              padding: var(--s4) 0; border-bottom: 1px solid var(--line); align-items: start; }
.rows h3 { font-size: var(--fs-md); margin: 0; }
.rows p { margin: 0; font-size: var(--fs-sm); }
.rows .mono { color: var(--muted); }
@media (max-width: 720px) { .rows > div { grid-template-columns: minmax(0, 1fr); gap: var(--s2); } }

/* horizontal pipeline: product -> markets -> requirements -> tests -> capabilities -> unknowns */
.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line);
        border-radius: var(--r-sm); background: var(--surface); overflow: hidden; }
.flow > div { padding: var(--s4); border-left: 1px solid var(--line); min-width: 0; position: relative; }
.flow > div:nth-child(3n+1) { border-left: 0; }
.flow > div:nth-child(n+4) { border-top: 1px solid var(--line); }
.flow-step { font: 600 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.flow-value { font: 650 var(--fs-xl)/1.1 var(--font); letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
              margin-top: var(--s3); color: var(--ink); overflow-wrap: anywhere; }
.flow-value.sm { font-size: var(--fs-sm); font-weight: 500; line-height: 1.4; letter-spacing: 0; }
.flow-note { font-size: 11px; color: var(--muted); margin-top: var(--s2); line-height: 1.45; }
.flow .alert { color: var(--st-inference); }
@media (max-width: 520px) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
                            .flow > div { padding: var(--s3); border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
                            .flow > div:nth-child(odd) { border-left: 0; }
                            .flow > div:nth-child(-n+2) { border-top: 0; } }

/* worked-example frame: a document, not a marketing card */
.example { border: 1px solid var(--line-strong); background: var(--surface); }
.example-head { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: baseline;
                padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); background: var(--surface-2);
                font: 500 var(--fs-xs)/1.5 var(--mono); color: var(--muted); }
.example-head b { color: var(--ink); font-weight: 600; }
.example-body { padding: var(--s4); }
.example-body > * + * { margin-top: var(--s4); }
.example .table-wrap { border-radius: 0; }
/* narrow screens: let a data table scroll sideways rather than wrap every cell into a tall column */
@media (max-width: 720px) {
  .example table, .section table { min-width: 34rem; }
  .example td, .example th, .section td, .section th { padding: var(--s2) var(--s3); }
  .table-wrap { position: relative; }
  .table-wrap::after { content: "scroll →"; position: sticky; left: 100%; bottom: 0; float: right;
                       font: 500 10px/1 var(--mono); color: var(--muted); padding: 2px 6px; }
}
.example-foot { padding: var(--s3) var(--s4); border-top: 1px solid var(--line); font-size: var(--fs-xs);
                color: var(--muted); background: var(--surface-2); }

/* evidence trail: claim -> evidence -> archived document */
.trail { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.trail > li { list-style: none; padding: var(--s3) var(--s4); border-top: 1px solid var(--line); font-size: var(--fs-sm);
              display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); gap: var(--s2) var(--s4); }
.trail > li:first-child { border-top: 0; }
.trail dt, .trail-key { font: 600 var(--fs-xs)/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase;
                        color: var(--muted); }
.trail-val { font-family: var(--mono); font-size: var(--fs-xs); overflow-wrap: anywhere; color: var(--ink-2); }
.trail-val .q { display: block; margin-top: var(--s2); font-family: var(--font); font-size: var(--fs-sm); font-style: italic;
                color: var(--ink-2); border-left: 2px solid var(--line-strong); padding-left: var(--s3); }
@media (max-width: 640px) { .trail > li { grid-template-columns: minmax(0, 1fr); gap: var(--s1); } }

/* infrastructure metrics: inline and explained, never the headline proof */
.metrics { border-top: 1px solid var(--line); }
.metrics > div { display: grid; grid-template-columns: minmax(0, 8rem) minmax(0, 13rem) minmax(0, 1fr);
                 gap: var(--s2) var(--s5); padding: var(--s4) 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.metrics .m-value { font: 650 var(--fs-xl)/1 var(--font); letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
                    color: var(--ink); overflow-wrap: anywhere; }
.metrics .m-value.mono { font: 500 var(--fs-sm)/1.4 var(--mono); letter-spacing: 0; }
.metrics .m-name { font-weight: 600; font-size: var(--fs-sm); }
.metrics .m-what { font-size: var(--fs-sm); color: var(--muted); margin: 0; }
@media (max-width: 720px) { .metrics > div { grid-template-columns: minmax(0, 1fr); gap: var(--s1); } }

/* section heading inside the worked example */
.h-sm { font: 600 var(--fs-xs)/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
        margin: 0 0 var(--s3); padding-top: var(--s2); }
.example-body > .h-sm:first-child { padding-top: 0; }

/* status table for the network: live vs planned, no tiles */
td .badge { vertical-align: middle; }
.t-plan td { color: var(--muted); }
.num-zero { color: var(--st-inference); font-weight: 650; }

/* access flow: required marker, honeypot, one-time key */
.req { font: 600 9px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
       border: 1px solid var(--line-strong); border-radius: 3px; padding: 2px 5px; margin-left: var(--s2);
       vertical-align: 1px; }
/* honeypot: off-screen rather than display:none, because some bots skip hidden inputs and fill positioned ones */
.trap { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.keybox { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; border: 1px solid var(--line-strong);
          border-radius: var(--r-sm); background: var(--surface-2); padding: var(--s3) var(--s4); }
.keyvalue { font-family: var(--mono); font-size: var(--fs-sm); word-break: break-all; flex: 1 1 22rem; min-width: 0;
            color: var(--ink); -webkit-user-select: all; user-select: all; }
textarea { height: auto; padding: var(--s3); line-height: 1.5; resize: vertical; }

/* corporate identity block in the footer and on About */
.org { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--s5);
       border-top: 1px solid var(--line); padding-top: var(--s5); }
.org dt { font: 600 var(--fs-xs)/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.org dd { margin: var(--s2) 0 0; font-size: var(--fs-sm); color: var(--ink-2); }

/* design-system page helpers */
.ds-display { font: 650 clamp(34px, 5.2vw, var(--fs-4xl))/1.15 var(--font); letter-spacing: -0.035em; color: var(--ink); }
.swatch { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; font-size: var(--fs-xs); }
.swatch div:first-child { height: 56px; }
.swatch div:last-child { padding: var(--s2) var(--s3); font-family: var(--mono); }
.sw-ink { background: var(--ink); } .sw-accent { background: var(--accent); } .sw-surface { background: var(--surface-2); }
.sw-official { background: var(--st-official); } .sw-derived { background: var(--st-derived); }
.sw-inference { background: var(--st-inference); } .sw-unknown { background: var(--st-unknown); } .sw-line { background: var(--line-strong); }
.mt0 { margin-top: 0; } .mt4 { margin-top: var(--s4); } .mt5 { margin-top: var(--s5); } .mt6 { margin-top: var(--s6); }
.mb0 { margin-bottom: 0; } .mb5 { margin-bottom: var(--s5); }
.w-full { width: 100%; }
.right { margin-left: auto; }


/* ---- draft placeholders (Artifact/legal pages): impossible to miss, and `manage.py web-check` refuses them ---- */
.todo{display:inline-block;padding:.1em .45em;border-radius:4px;background:#fde68a;color:#7c2d12;
      font-weight:600;font-size:.92em}
.todo-banner{border-left:4px solid #f59e0b;background:#fffbeb;color:#7c2d12;margin-bottom:1.5rem}
