/* ════════════════════════════════════════════════════════════════════
   DONAU DEFENCE - INSTRUMENT OF STATE
   graphite · danube steel-blue · signal amber · paper doctrine
   display: Archivo Expanded · data: IBM Plex Mono · voice: Newsreader
   ════════════════════════════════════════════════════════════════════ */

:root {
  --bg:        #0B0E11;
  --bg-deep:   #07090B;
  --bg-alt:    #0D1116;
  --panel:     #10151B;
  --panel-2:   #131A21;
  --line:      rgba(208, 220, 226, 0.09);
  --line-2:    rgba(208, 220, 226, 0.18);
  --text:      #E7EAE6;
  --muted:     #8B949C;
  --faint:     #5A636B;
  --amber:     #E8A33D;
  --amber-dim: rgba(232, 163, 61, 0.14);
  --river:     #6FA8BF;
  --river-dim: rgba(111, 168, 191, 0.35);
  --ok:        #7FBF8E;
  --paper:     #EAE7DE;
  --paper-2:   #E2Ded2;
  --ink:       #14171A;
  --ink-soft:  #43484D;

  --disp: "Archivo", "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", monospace;
  --serif: "Newsreader", Georgia, serif;

  --wide: 'wdth' 125;
  --container: 1280px;
  --pad: clamp(20px, 4vw, 48px);
  --topbar-h: 64px;
}

/* ── reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html:focus-within { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--disp);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--amber); color: var(--bg-deep); }

:focus-visible {
  outline: 1px solid var(--amber);
  outline-offset: 3px;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.mono { font-family: var(--mono); }
.amber { color: var(--amber); font-style: normal; }
.ok { color: var(--ok); }

/* ── grain ─────────────────────────────────────────────────────────── */
.grain {
  position: fixed; inset: -50%;
  pointer-events: none;
  z-index: 2000;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 1.4s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0,0); }
  25% { transform: translate(-1.2%, 0.8%); }
  50% { transform: translate(0.8%, -1.0%); }
  75% { transform: translate(-0.6%, -0.6%); }
  100% { transform: translate(0,0); }
}

/* ── classification strips ─────────────────────────────────────────── */
.classification {
  display: flex; justify-content: center; align-items: center; gap: 14px;
  font-family: var(--mono);
  font-size: 10px; letter-spacing: .22em;
  color: var(--faint);
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line);
  padding: 7px var(--pad);
  text-transform: uppercase;
  position: relative; z-index: 900;
}
.classification i { font-style: normal; color: var(--amber); opacity: .6; }
.classification-foot { border-bottom: 0; border-top: 1px solid var(--line); }

/* ── topbar ────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 800;
  display: flex; align-items: center; gap: 32px;
  height: var(--topbar-h);
  padding-inline: var(--pad);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  transition: background .4s ease, border-color .4s ease;
}
.topbar.scrolled { background: color-mix(in srgb, var(--bg-deep) 92%, transparent); border-color: var(--line-2); }

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark { width: 34px; height: 34px; color: var(--text); }
.brand-river { stroke: var(--river); }
.brand-node { fill: var(--amber); }
.brand-word { display: flex; flex-direction: column; line-height: 1.05; }
.brand-word strong {
  font-family: var(--disp);
  font-variation-settings: var(--wide);
  font-weight: 700; font-size: 15px; letter-spacing: .18em;
}
.brand-word em {
  font-style: normal; font-family: var(--mono);
  font-size: 9px; letter-spacing: .54em; color: var(--muted);
}

.nav { display: flex; gap: clamp(14px, 2vw, 30px); margin-inline: auto; }
.nav a {
  font-family: var(--mono); font-size: 11.5px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
  padding: 6px 2px;
  position: relative;
  transition: color .25s ease;
}
.nav a sup { color: var(--faint); margin-right: 6px; font-size: 8.5px; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--amber);
  transition: right .3s cubic-bezier(.6,0,.2,1);
}
.nav a:hover { color: var(--text); }
.nav a:hover::after, .nav a.active::after { right: 0; }
.nav a.active { color: var(--text); }

.topbar-right { display: flex; align-items: center; gap: 22px; flex-shrink: 0; }
.utc { font-size: 11.5px; letter-spacing: .12em; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 1180px) { .utc { display: none; } }
@media (max-width: 980px) { .nodes text, .map-tag { display: none; } }

.nav-toggle { display: none; }

/* ── buttons ───────────────────────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11.5px;
  letter-spacing: .18em; text-transform: uppercase;
  padding: 13px 26px;
  border: 1px solid var(--line-2);
  background: transparent;
  cursor: pointer;
  transition: color .25s ease, background .25s ease, border-color .25s ease;
  white-space: nowrap;
}
.btn span { position: relative; z-index: 1; }
/* reticle corner brackets */
.btn::before, .btn::after {
  content: ""; position: absolute; width: 7px; height: 7px;
  border-color: var(--amber); border-style: solid;
  opacity: 0; transition: opacity .25s ease, transform .3s cubic-bezier(.6,0,.2,1);
}
.btn::before { top: -4px; left: -4px; border-width: 1px 0 0 1px; transform: translate(4px,4px); }
.btn::after  { bottom: -4px; right: -4px; border-width: 0 1px 1px 0; transform: translate(-4px,-4px); }
.btn:hover::before, .btn:hover::after { opacity: 1; transform: translate(0,0); }

.btn-solid { background: var(--amber); border-color: var(--amber); color: var(--bg-deep); font-weight: 600; }
.btn-solid:hover { background: #F0B254; border-color: #F0B254; }
.btn-line { color: var(--text); }
.btn-line:hover { border-color: var(--amber); color: var(--amber); }
.btn-wide { width: 100%; }

/* ── hero ──────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100svh - var(--topbar-h) - 30px);
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(1200px 600px at 75% -10%, rgba(111,168,191,.07), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(232,163,61,.05), transparent 60%),
    var(--bg);
}
.hero-map { position: absolute; inset: 0; }
.hero-map svg { width: 100%; height: 100%; }

.graticule path { stroke: rgba(208,220,226,.045); stroke-width: 1; }
.reticle circle, .reticle path { stroke: rgba(208,220,226,.07); stroke-width: 1; fill: none; }
.reticle { animation: reticle-spin 90s linear infinite; transform-origin: 0 0; }
@keyframes reticle-spin { to { rotate: 360deg; } }

.river { fill: none; stroke-linecap: round; }
.river-base { stroke: rgba(111,168,191,.12); stroke-width: 7; }
.river-draw {
  stroke: url(#riverGrad); stroke-width: 1.8;
  stroke-dasharray: 2600; stroke-dashoffset: 2600;
  animation: river-draw 3.2s cubic-bezier(.5,0,.2,1) .4s forwards;
}
@keyframes river-draw { to { stroke-dashoffset: 0; } }
.river-flow {
  stroke: rgba(231,234,230,.5); stroke-width: 1;
  stroke-dasharray: 3 44;
  animation: river-flow 7s linear infinite;
  opacity: 0; animation-delay: 0s;
}
.hero.loaded .river-flow { opacity: .8; }
@keyframes river-flow { to { stroke-dashoffset: -470; } }

.chords path {
  stroke: rgba(111,168,191,.14); stroke-width: 1;
  stroke-dasharray: 2 5;
}
.nodes .ring {
  fill: none; stroke: var(--river-dim); stroke-width: 1;
  transform-box: fill-box; transform-origin: center;
  animation: node-pulse 4s ease-out infinite;
}
.nodes .dot { fill: var(--river); }
.node-hq .dot { fill: var(--amber); }
.node-hq .ring { stroke: rgba(232,163,61,.5); animation-duration: 2.6s; }
@keyframes node-pulse {
  0% { transform: scale(.4); opacity: 1; }
  70%, 100% { transform: scale(1.6); opacity: 0; }
}
.nodes text, .map-tag {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .14em; fill: var(--faint);
}
.node-hq text { fill: var(--muted); }
.map-tag { fill: rgba(90,99,107,.8); }

.hero-inner { position: relative; z-index: 2; padding-top: 40px; padding-bottom: 24px; }
.hero-inner::before {
  content: ""; position: absolute; z-index: -1;
  inset: -60px -20% -40px -60vw;
  background: radial-gradient(75% 80% at 32% 50%, rgba(11,14,17,.82), rgba(11,14,17,.45) 55%, transparent 80%);
  pointer-events: none;
}

.kicker {
  display: flex; align-items: center; gap: 16px;
  font-size: 11px; letter-spacing: .3em; color: var(--muted);
  text-transform: uppercase;
}
.kicker-rule { width: 56px; height: 1px; background: var(--amber); flex-shrink: 0; }

.hero-h {
  margin-top: 30px;
  font-family: var(--disp);
  font-variation-settings: var(--wide);
  font-stretch: 125%;
  font-weight: 700;
  font-size: clamp(2rem, 7.2vw, 6.9rem);
  line-height: .98;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}
.hero-line { display: block; overflow: hidden; }
.hero-line > span { display: inline-block; transform: translateY(110%); }
.hero.loaded .hero-line > span { animation: line-rise 1s cubic-bezier(.22,1,.3,1) forwards; }
.hero.loaded .hero-line:nth-child(1) > span { animation-delay: .15s; }
.hero.loaded .hero-line:nth-child(2) > span { animation-delay: .3s; }
.hero.loaded .hero-line:nth-child(3) > span { animation-delay: .45s; }
@keyframes line-rise { to { transform: translateY(0); } }

.ghost {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(231,234,230,.55);
}

.hero-sub {
  margin-top: 38px;
  display: flex; gap: clamp(24px, 5vw, 80px);
  align-items: flex-end; flex-wrap: wrap;
}
.hero-sub p {
  max-width: 560px;
  color: var(--muted);
  font-size: 17px; line-height: 1.7;
  border-left: 1px solid var(--line-2);
  padding-left: 22px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-foot {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; gap: 18px;
  padding: 18px var(--pad);
  border-top: 1px solid var(--line);
  font-size: 10.5px; letter-spacing: .18em;
  color: var(--faint); text-transform: uppercase;
  flex-wrap: wrap;
}
.hero-foot .amber { font-size: 8px; vertical-align: 2px; animation: blink 2.4s steps(1) infinite; }
@keyframes blink { 50% { opacity: .25; } }

.scroll-cue {
  position: absolute; right: var(--pad); bottom: 84px; z-index: 3;
  writing-mode: vertical-rl;
  font-size: 10px; letter-spacing: .4em; color: var(--faint);
  display: flex; align-items: center; gap: 10px;
}
.scroll-cue i {
  width: 1px; height: 44px; background: var(--line-2);
  position: relative; overflow: hidden;
}
.scroll-cue i::after {
  content: ""; position: absolute; left: 0; top: -50%;
  width: 100%; height: 50%; background: var(--amber);
  animation: cue-drop 2s cubic-bezier(.6,0,.4,1) infinite;
}
@keyframes cue-drop { to { top: 110%; } }

/* ── metrics ───────────────────────────────────────────────────────── */
.metrics { border-bottom: 1px solid var(--line); background: var(--bg-deep); }
.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.metric {
  padding: 34px 26px 30px 0;
  border-left: 1px solid var(--line);
  padding-left: 26px;
}
.metric:first-child { border-left: 0; padding-left: 0; }
.metric strong {
  display: block;
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
  font-weight: 500; color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.metric > span {
  display: block; margin-top: 8px;
  font-size: 12.5px; line-height: 1.55; color: var(--faint);
  text-transform: uppercase; letter-spacing: .08em;
}

/* ── sections ──────────────────────────────────────────────────────── */
.section { padding-block: clamp(90px, 11vw, 150px); border-bottom: 1px solid var(--line); position: relative; }
.section-alt { background: var(--bg-alt); }

.sec-head {
  display: flex; align-items: center; gap: 20px;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.sec-idx { font-size: 12px; color: var(--amber); letter-spacing: .2em; white-space: nowrap; }
.sec-rule { flex: 1; height: 1px; background: var(--line); }
.sec-label { font-size: 11px; color: var(--muted); letter-spacing: .3em; text-transform: uppercase; }

.sec-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
}
.sec-grid-rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

.h2 {
  font-family: var(--disp);
  font-variation-settings: var(--wide);
  font-stretch: 125%;
  font-weight: 700;
  font-size: clamp(2.4rem, 4.4vw, 4rem);
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: .01em;
  margin-bottom: 26px;
}
.h2 .tm { font-size: .28em; vertical-align: 2.4em; color: var(--muted); font-weight: 400; }
.h2 small {
  display: block; margin-top: 14px;
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  text-transform: none; letter-spacing: 0;
  color: var(--river); line-height: 1.4;
  font-stretch: 100%; font-variation-settings: normal;
}
.h2-s {
  font-family: var(--disp);
  font-variation-settings: var(--wide);
  font-stretch: 125%;
  font-weight: 700;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  text-transform: uppercase;
  line-height: 1.05;
  margin-bottom: 22px;
}
.ghost-l { color: transparent; -webkit-text-stroke: 1.2px rgba(231,234,230,.5); }

.sec-copy p { color: var(--muted); margin-bottom: 18px; max-width: 54ch; font-size: 15px; line-height: 1.75; }
.sec-copy p em { font-family: var(--serif); font-style: italic; color: var(--text); }

.feature-list { list-style: none; margin: 28px 0 34px; }
.feature-list li {
  position: relative;
  padding: 14px 0 14px 26px;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 14.5px; line-height: 1.6;
}
.feature-list li:last-child { border-bottom: 1px solid var(--line); }
.feature-list li::before {
  content: ""; position: absolute; left: 2px; top: 22px;
  width: 8px; height: 8px;
  border: 1px solid var(--amber);
  transform: rotate(45deg);
}
.feature-list b { color: var(--text); font-weight: 600; }

.fine { margin-top: 34px; font-size: 9.5px; letter-spacing: .26em; color: var(--faint); }

/* ── console mock ──────────────────────────────────────────────────── */
.console {
  border: 1px solid var(--line-2);
  background: var(--panel);
  box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(0,0,0,.4);
  position: sticky; top: calc(var(--topbar-h) + 40px);
}
.console-bar {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line-2);
  background: var(--panel-2);
  font-size: 10.5px; letter-spacing: .12em; color: var(--muted);
}
.cb-sys b { animation: blink 2s steps(1) infinite; }
.cb-clock { font-variant-numeric: tabular-nums; color: var(--text); }

.console-body {
  display: grid;
  grid-template-columns: 132px 1fr 178px;
  min-height: 390px;
}
.tracks, .decisions { padding: 12px; border-right: 1px solid var(--line); overflow: hidden; }
.decisions { border-right: 0; border-left: 1px solid var(--line); }
.tracks h4, .decisions h4 {
  font-size: 9px; letter-spacing: .26em; color: var(--faint);
  font-weight: 500; margin-bottom: 10px;
}
.tracks ol, .decisions ol { list-style: none; }
.tracks li {
  font-size: 9.5px; line-height: 1.5; letter-spacing: .04em;
  color: var(--muted);
  padding: 7px 0 8px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.tracks li b { color: var(--text); font-weight: 500; }
.tracks li.hostile b { color: var(--amber); }
.tracks li.sel { box-shadow: inset 2px 0 0 var(--amber); padding-left: 8px; }

.tbar {
  display: block; height: 3px; margin-top: 6px;
  background: var(--line);
  overflow: hidden;
}
.tbar b {
  display: block; height: 100%;
  background: var(--river);
  transition: width .6s ease;
}
.tracks li.hostile .tbar b { background: var(--amber); }

.decisions li {
  font-size: 9.5px; line-height: 1.45; letter-spacing: .03em;
  padding: 7px 0; border-top: 1px solid var(--line);
  color: var(--muted);
  animation: log-in .5s cubic-bezier(.2,.8,.3,1);
}
.decisions li time { color: var(--faint); display: block; font-size: 8.5px; }
.decisions li b { font-weight: 500; color: var(--text); }
.decisions li.auth b { color: var(--ok); }
.decisions li.alert b { color: var(--amber); }
@keyframes log-in { from { transform: translateY(-8px); opacity: 0; } }

.cmap { position: relative; overflow: hidden; background: var(--bg-deep); }
.cmap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* selected-object card */
.ent {
  border: 1px solid var(--line-2);
  background: var(--bg-deep);
  padding: 10px 11px 12px;
  margin-bottom: 14px;
}
.ent h4 { color: var(--amber) !important; }
.ent-id {
  font-size: 10px; letter-spacing: .08em; color: var(--text);
  padding-bottom: 8px; margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.ent-row {
  display: grid; grid-template-columns: 30px 1fr 44px;
  gap: 8px; align-items: center;
  font-size: 8.5px; letter-spacing: .08em; color: var(--faint);
  padding: 5px 0 2px;
}
.ent-row span:last-child { color: var(--muted); text-align: right; }
.ent-row .tbar { margin-top: 0; }
.ent-kv {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 8.5px; letter-spacing: .08em;
  color: var(--faint);
  padding: 5px 0 0;
}
.ent-kv b { font-weight: 500; color: var(--muted); }
.ent-kv b.warn { color: var(--amber); }

.console-status {
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px;
  border-top: 1px solid var(--line-2);
  background: var(--panel-2);
  font-size: 9.5px; letter-spacing: .14em; color: var(--faint);
}

/* ── swarm / MILVUS ────────────────────────────────────────────────── */
.swarm {
  position: sticky; top: calc(var(--topbar-h) + 40px);
  border: 1px solid var(--line-2);
  background: var(--bg-deep);
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.swarm canvas { width: 100%; height: 440px; }
.swarm-tag {
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 11px 16px;
  border-top: 1px solid var(--line-2);
  background: var(--panel-2);
  font-size: 10px; letter-spacing: .16em; color: var(--muted);
}

.spec { width: 100%; border-collapse: collapse; margin: 28px 0 34px; }
.spec th, .spec td {
  text-align: left;
  padding: 11px 14px 11px 0;
  border-top: 1px solid var(--line);
  font-size: 11.5px; letter-spacing: .06em;
  vertical-align: top;
}
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 1px solid var(--line); }
.spec th { color: var(--faint); font-weight: 500; white-space: nowrap; padding-right: 28px; letter-spacing: .18em; }
.spec td { color: var(--muted); }
.amber-t { color: var(--amber) !important; }

/* ── doctrine / paper ──────────────────────────────────────────────── */
.paper {
  background: var(--paper);
  color: var(--ink);
  border-bottom: 1px solid rgba(20,23,26,.2);
}
.paper .sec-rule { background: rgba(20,23,26,.18); }
.paper .sec-label { color: var(--ink-soft); }
.paper .sec-idx { color: #B0751F; }

.manifesto { max-width: 980px; margin-bottom: clamp(56px, 7vw, 96px); }
.manifesto p {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 350;
  font-size: clamp(1.7rem, 3.6vw, 3.1rem);
  line-height: 1.28;
  letter-spacing: -.01em;
  color: var(--ink);
}
.manifesto em { color: #B0751F; font-style: italic; }
.manifesto cite {
  display: block; margin-top: 26px;
  font-style: normal; font-size: 10.5px;
  letter-spacing: .3em; color: var(--ink-soft);
}

.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-left: 1px solid rgba(20,23,26,.18);
}
.pillar {
  border-right: 1px solid rgba(20,23,26,.18);
  border-top: 1px solid rgba(20,23,26,.18);
  border-bottom: 1px solid rgba(20,23,26,.18);
  padding: 26px 22px 30px;
  transition: background .3s ease;
}
.pillar:hover { background: rgba(20,23,26,.04); }
.p-idx { font-size: 11px; letter-spacing: .2em; color: #B0751F; }
.pillar h3 {
  margin: 46px 0 12px;
  font-family: var(--disp);
  font-variation-settings: var(--wide);
  font-stretch: 125%;
  font-size: 17px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em;
  line-height: 1.25;
}
.pillar p { font-size: 13.5px; line-height: 1.65; color: var(--ink-soft); }

/* ── sovereignty diagram ───────────────────────────────────────────── */
.sov-intro { max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }
.sov-intro p { color: var(--muted); max-width: 60ch; }

.sov { border: 1px solid var(--line); background: var(--bg-deep); padding: clamp(10px, 2vw, 30px); }
.sov svg { width: 100%; height: auto; }
.mono-t { font-family: var(--mono); }

.sov-boundary {
  fill: rgba(111,168,191,.025);
  stroke: var(--river-dim); stroke-width: 1.2;
  stroke-dasharray: 10 6;
}
.sov-btag { font-size: 11px; letter-spacing: .2em; fill: var(--river); }
.sov-box { fill: var(--panel); stroke: var(--line-2); stroke-width: 1; }
.sov-out { stroke: rgba(127,191,142,.5); }
.sov-audit { stroke: var(--amber); fill: rgba(232,163,61,.05); }
.sov-t { font-size: 11px; letter-spacing: .12em; fill: var(--muted); text-anchor: middle; }
.sov-t-sm { font-size: 7.5px; letter-spacing: .08em; fill: var(--faint); }
.sov-hex { fill: rgba(232,163,61,.06); stroke: var(--amber); stroke-width: 1.2; }
.sov-ct { font-size: 14px; letter-spacing: .2em; fill: var(--text); text-anchor: middle; font-weight: 600; }
.sov-cs { font-size: 9.5px; letter-spacing: .16em; fill: var(--muted); text-anchor: middle; }

.sov-flow path {
  fill: none; stroke: var(--river-dim); stroke-width: 1;
  stroke-dasharray: 4 6;
  animation: flow-dash 1.6s linear infinite;
}
@keyframes flow-dash { to { stroke-dashoffset: -20; } }
.sov-flow-a { stroke: var(--amber); stroke-width: 1; stroke-dasharray: 3 5; animation: flow-dash 2s linear infinite; }

.pkt { fill: var(--river); opacity: .9; }
.pkt-amber { fill: var(--amber); }
@media (prefers-reduced-motion: reduce) { .pkt { display: none; } }

.sov-denied rect { fill: none; stroke: var(--faint); stroke-width: 1; stroke-dasharray: 4 4; }
.sov-denied text { font-size: 10.5px; letter-spacing: .14em; fill: var(--faint); text-anchor: middle; }
.sov-deny-line { stroke: var(--faint); stroke-width: 1; stroke-dasharray: 2 4; }
.sov-x { stroke: #C2574B; stroke-width: 2.4; }
.sov-no { fill: #C2574B !important; font-size: 9.5px !important; letter-spacing: .24em !important; }

/* ── missions ──────────────────────────────────────────────────────── */
.missions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-left: 1px solid var(--line);
}
.mission {
  border-right: 1px solid var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 24px 30px;
  display: flex; flex-direction: column;
  min-height: 360px;
  transition: background .35s ease;
  position: relative;
}
.mission::after {
  content: ""; position: absolute; left: 0; top: 0;
  width: 100%; height: 2px;
  background: var(--amber);
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s cubic-bezier(.6,0,.2,1);
}
.mission:hover { background: var(--panel); }
.mission:hover::after { transform: scaleX(1); }
.mission header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 56px; }
.m-idx { font-size: 12px; color: var(--faint); letter-spacing: .2em; transition: color .3s ease; }
.mission:hover .m-idx { color: var(--amber); }
.mission header svg {
  width: 30px; height: 30px;
  stroke: var(--muted); stroke-width: 1.3; fill: none;
}
.mission h3 {
  font-family: var(--disp);
  font-variation-settings: var(--wide);
  font-stretch: 125%;
  font-size: 19px; font-weight: 700;
  text-transform: uppercase; line-height: 1.2;
  margin-bottom: 14px;
}
.mission p { font-size: 13.5px; line-height: 1.65; color: var(--muted); flex: 1; }
.mission footer {
  margin-top: 22px; padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 9.5px; letter-spacing: .18em; color: var(--faint);
}

/* ── certs marquee ─────────────────────────────────────────────────── */
.certs {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg-deep);
  padding-block: 18px;
  position: relative;
}
.certs::before, .certs::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 120px; z-index: 2;
  pointer-events: none;
}
.certs::before { left: 0; background: linear-gradient(90deg, var(--bg-deep), transparent); }
.certs::after { right: 0; background: linear-gradient(-90deg, var(--bg-deep), transparent); }
.certs-track {
  display: flex; gap: 0; width: max-content;
  animation: marquee 36s linear infinite;
}
.certs-track span {
  font-size: 11px; letter-spacing: .26em; color: var(--faint);
  padding: 4px 38px;
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── company ───────────────────────────────────────────────────────── */
.company-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(36px, 5vw, 90px);
  margin-bottom: clamp(56px, 7vw, 90px);
}
.company-copy p { color: var(--muted); margin-bottom: 18px; max-width: 54ch; }

.locations { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.loc {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 20px; align-items: center;
  padding: 16px 6px;
  border-bottom: 1px solid var(--line);
  transition: background .3s ease;
}
.loc:hover { background: var(--panel); }
.loc-idx {
  font-size: 10px; letter-spacing: .22em; color: var(--amber);
  border: 1px solid var(--amber-dim);
  background: var(--amber-dim);
  padding: 4px 0; text-align: center;
}
.loc h4 {
  font-family: var(--disp);
  font-variation-settings: var(--wide);
  font-stretch: 125%;
  font-size: 14.5px; font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.loc-main p { font-size: 9px; letter-spacing: .14em; color: var(--faint); }
.loc-geo { font-size: 9px; letter-spacing: .1em; color: var(--faint); }
@media (max-width: 560px) { .loc-geo { display: none; } }

.careers { border: 1px solid var(--line); background: var(--panel); }
.careers-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px; flex-wrap: wrap;
  padding: 28px 30px;
  border-bottom: 1px solid var(--line);
}
.careers-head h3 {
  font-family: var(--disp);
  font-variation-settings: var(--wide);
  font-stretch: 125%;
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  font-weight: 700; text-transform: uppercase;
}
.careers-head p { font-size: 10px; letter-spacing: .2em; color: var(--faint); }

.roles { list-style: none; }
.roles a {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center; gap: 24px;
  padding: 18px 30px;
  border-top: 1px solid var(--line);
  transition: background .25s ease, padding-left .25s ease;
}
.roles li:first-child a { border-top: 0; }
.roles a:hover { background: var(--panel-2); padding-left: 38px; }
.r-title { font-size: 15.5px; font-weight: 500; }
.r-meta { font-size: 10px; letter-spacing: .18em; color: var(--faint); }
.r-arrow { color: var(--faint); transition: color .25s ease, transform .25s ease; }
.roles a:hover .r-arrow { color: var(--amber); transform: translateX(6px); }

/* ── contact ───────────────────────────────────────────────────────── */
.section-contact {
  background:
    radial-gradient(900px 500px at 85% 20%, rgba(111,168,191,.06), transparent 60%),
    var(--bg-deep);
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 6vw, 100px);
}
.contact-copy p { color: var(--muted); max-width: 46ch; margin-bottom: 34px; }
.contact-meta { display: grid; gap: 20px; }
.contact-meta dt { font-size: 9.5px; letter-spacing: .24em; color: var(--faint); margin-bottom: 5px; }
.contact-meta dd { font-size: 13px; letter-spacing: .05em; color: var(--text); }

.contact-form {
  border: 1px solid var(--line-2);
  background: var(--panel);
  padding: clamp(24px, 3vw, 40px);
  display: flex; flex-direction: column; gap: 20px;
}
.ff { display: flex; flex-direction: column; gap: 8px; }
.ff-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ff label { font-size: 9.5px; letter-spacing: .24em; color: var(--faint); }
.ff input, .ff select, .ff textarea {
  background: var(--bg-deep);
  border: 1px solid var(--line-2);
  padding: 12px 14px;
  font-family: var(--mono); font-size: 13px;
  color: var(--text);
  border-radius: 0;
  transition: border-color .25s ease, box-shadow .25s ease;
  appearance: none;
  resize: vertical;
}
.ff select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1 L5 5 L9 1' stroke='%238B949C' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.ff input:focus, .ff select:focus, .ff textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 1px var(--amber-dim);
}
.form-note { font-size: 9px; letter-spacing: .14em; line-height: 1.8; color: var(--faint); }

.form-done { text-align: center; padding: 60px 20px; }
.form-done .fd-ref {
  font-family: var(--mono); color: var(--amber);
  font-size: 13px; letter-spacing: .2em;
  display: block; margin-bottom: 18px;
}
.form-done h3 {
  font-family: var(--disp); font-variation-settings: var(--wide); font-stretch: 125%;
  text-transform: uppercase; font-size: 22px; margin-bottom: 14px;
}
.form-done p { color: var(--muted); font-size: 14px; max-width: 40ch; margin-inline: auto; }

/* ── footer ────────────────────────────────────────────────────────── */
.footer { background: var(--bg-deep); }
.footer .container { padding-block: clamp(60px, 8vw, 100px) 40px; }
.foot-mark {
  font-family: var(--disp);
  font-variation-settings: var(--wide);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(2rem, 6.6vw, 6.4rem);
  line-height: 1;
  letter-spacing: .02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(231,234,230,.18);
  white-space: nowrap;
  margin-bottom: clamp(48px, 6vw, 80px);
  user-select: none;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line);
}
.foot-col h5 { font-size: 9.5px; letter-spacing: .26em; color: var(--faint); font-weight: 500; margin-bottom: 16px; }
.foot-col p { font-size: 13.5px; color: var(--muted); line-height: 1.8; }
.foot-col p .sp { display: block; content: ""; margin-top: 10px; }
.foot-col a {
  display: block; font-size: 13.5px; color: var(--muted);
  padding: 4px 0;
  transition: color .2s ease, padding-left .2s ease;
}
.foot-col a:hover { color: var(--amber); padding-left: 6px; }
.foot-line { padding-top: 26px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot-line p { font-size: 9.5px; letter-spacing: .18em; color: var(--faint); }
.foot-decl { color: var(--muted); }

/* ── technical frame: progress, rail, hero ruler ───────────────────── */
.progress {
  position: absolute; left: 0; bottom: -1px;
  height: 1px; width: 100%;
  background: var(--amber);
  transform-origin: left; transform: scaleX(0);
  z-index: 3;
}

.rail {
  position: fixed; right: 18px; top: 50%;
  transform: translateY(-50%);
  z-index: 600;
  display: flex; flex-direction: column; gap: 13px;
  align-items: flex-end;
}
.rail a {
  font-size: 9px; letter-spacing: .12em;
  color: var(--faint);
  position: relative;
  transition: color .25s ease;
  line-height: 1;
}
.rail a::before {
  content: ""; position: absolute; right: calc(100% + 7px); top: 50%;
  width: 0; height: 1px; background: var(--amber);
  transition: width .3s cubic-bezier(.6,0,.2,1);
}
.rail a.active { color: var(--amber); }
.rail a.active::before { width: 12px; }
@media (max-width: 1400px) { .rail { display: none; } }

.lon text {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: .16em; fill: var(--faint);
  text-anchor: middle; opacity: .7;
}

.hero-map svg { animation: map-drift 38s ease-in-out infinite alternate; transform-origin: 58% 42%; }
@keyframes map-drift {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.045) translate(-14px, -8px); }
}

.hero-frame { position: absolute; inset: 84px 20px 20px; pointer-events: none; z-index: 2; }
.hero-frame::before, .hero-frame::after, .hero-frame i::before, .hero-frame i::after {
  content: ""; position: absolute; width: 16px; height: 16px;
  border: 0 solid rgba(208, 220, 226, .3);
}
.hero-frame::before { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.hero-frame::after { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.hero-frame i::before { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.hero-frame i::after { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

/* ── metrics head + programmes strip ───────────────────────────────── */
.metrics-head {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding-top: 20px;
  font-size: 9.5px; letter-spacing: .24em; color: var(--faint);
}

.partners {
  border-bottom: 1px solid var(--line);
  padding-block: 30px 34px;
}
.partners-head {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: 9.5px; letter-spacing: .24em; color: var(--faint);
  margin-bottom: 22px;
}
.partners-row {
  display: flex; flex-wrap: wrap; gap: 16px 48px;
  font-size: 11.5px; letter-spacing: .18em; color: var(--muted);
}
.partners-row > span { white-space: nowrap; }
.partners-row > span { position: relative; padding-left: 16px; }
.partners-row > span::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 7px; height: 7px; margin-top: -3.5px;
  border: 1px solid var(--amber);
  transform: rotate(45deg);
  opacity: .65;
}

/* ── console v2: tabs, timeline, evidence ──────────────────────────── */
.console-tabs {
  display: flex; align-items: stretch;
  border-bottom: 1px solid var(--line-2);
  background: var(--bg-deep);
  font-size: 9px; letter-spacing: .18em; color: var(--faint);
  overflow: hidden;
}
.ct {
  padding: 8px 16px;
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.ct.active {
  color: var(--text);
  background: var(--panel);
  box-shadow: inset 0 2px 0 var(--amber);
}
.ct-meta {
  margin-left: auto; padding: 8px 14px;
  font-size: 8.5px; letter-spacing: .14em;
  white-space: nowrap;
}

.console-time {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 16px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  font-size: 8.5px; letter-spacing: .14em; color: var(--faint);
}
.ct-track {
  flex: 1; height: 12px; position: relative;
  border-left: 1px solid var(--line-2);
  border-right: 1px solid var(--line-2);
  background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 26px) center / 100% 6px no-repeat;
}
.ct-head {
  position: absolute; top: -1px; bottom: -1px; left: 2%;
  width: 1px; background: var(--amber);
  box-shadow: 0 0 7px rgba(232, 163, 61, .9);
  animation: playhead 26s linear infinite;
}
@keyframes playhead { from { left: 2%; } to { left: 98%; } }

.evidence {
  position: absolute; top: -26px; right: -26px;
  width: 232px;
  background: var(--bg-deep);
  border: 1px solid var(--line-2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .65);
  padding: 13px 15px;
  z-index: 6;
}
.evidence h5 {
  font-size: 8.5px; letter-spacing: .2em; font-weight: 500;
  color: var(--amber);
  margin-bottom: 8px;
}
.evidence ul { list-style: none; }
.evidence li {
  display: flex; gap: 8px;
  font-size: 9px; letter-spacing: .05em; line-height: 1.5;
  color: var(--muted);
  padding: 5px 0;
  border-top: 1px solid var(--line);
}
.evidence li b { color: var(--ok); font-weight: 400; }
.ev-hash { color: var(--faint); }
@media (max-width: 1080px) { .evidence { display: none; } }

/* ── doctrine document furniture ───────────────────────────────────── */
.doc-plate {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 10px; letter-spacing: .2em; color: var(--ink-soft);
  padding-bottom: 12px;
  margin-bottom: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid rgba(20, 23, 26, .4);
  position: relative;
}
.doc-plate::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 3px;
  height: 1px; background: rgba(20, 23, 26, .4);
}

.doc-sign {
  display: flex; align-items: flex-end; flex-wrap: wrap;
  gap: clamp(36px, 7vw, 100px);
  margin-top: clamp(48px, 6vw, 84px);
}
.seal {
  width: 116px; height: 116px;
  margin-left: auto;
  transform: rotate(-8deg);
  opacity: .9;
}
.seal-ring { fill: none; stroke: #33517A; stroke-width: 1.1; }
.seal-text { font-family: var(--mono); font-size: 7.5px; letter-spacing: .12em; fill: #33517A; }
.seal-wave { fill: none; stroke: #33517A; stroke-width: 1.5; }
.seal-dot { fill: #33517A; }

/* ── reveal on scroll ──────────────────────────────────────────────── */
.rev {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s cubic-bezier(.2,.7,.3,1), transform .9s cubic-bezier(.2,.7,.3,1);
}
.rev.in { opacity: 1; transform: none; }
.rev:nth-child(2) { transition-delay: .08s; }
.rev:nth-child(3) { transition-delay: .16s; }
.rev:nth-child(4) { transition-delay: .24s; }

/* ── responsive ────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .sec-grid, .sec-grid-rev { grid-template-columns: minmax(0, 1fr); }
  .console, .swarm { position: static; }
  .sec-grid-rev .swarm { order: 2; }
  .metrics-row { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(3) { border-left: 0; padding-left: 0; }
  .metric { border-top: 1px solid var(--line); }
  .metric:nth-child(-n+2) { border-top: 0; }
  .missions, .pillars { grid-template-columns: 1fr 1fr; }
  .mission { min-height: 300px; }
  .company-grid, .contact-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--line-2);
    padding: 10px var(--pad) 24px;
    opacity: 0; visibility: hidden;
    transform: translateY(-14px);
    transition: opacity .3s ease, transform .35s cubic-bezier(.2,.8,.3,1), visibility 0s .35s;
    z-index: 700;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 13px; }

  .nav-toggle {
    display: flex; flex-direction: column; gap: 6px;
    background: none; border: 0; cursor: pointer;
    padding: 8px; margin-left: auto;
  }
  .nav-toggle span { width: 26px; height: 1.5px; background: var(--text); transition: transform .3s ease; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .topbar { gap: 16px; }
  .topbar-right { margin-left: auto; }
}

@media (max-width: 560px) {
  .topbar-right .btn { display: none; }
}

@media (max-width: 760px) {
  .hero-sub p { border-left: 0; padding-left: 0; font-size: 15px; }
  .scroll-cue { display: none; }
  .hero-foot .hf-mid { display: none; }
  .metrics-row { grid-template-columns: 1fr; }
  .metric { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .metric:nth-child(-n+2) { border-top: 1px solid var(--line); }
  .metric:first-child { border-top: 0; }
  .missions, .pillars, .locations { grid-template-columns: 1fr; }
  .mission { min-height: 0; }
  .console-body { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .tracks { display: none; }
  .ct-meta { display: none; }
  .ct { padding: 8px 10px; }
  .console-tabs { overflow-x: auto; }
  .cmap { min-height: 240px; }
  .decisions { border-left: 0; border-top: 1px solid var(--line); }
  .ff-row { grid-template-columns: 1fr; }
  .roles a { grid-template-columns: 1fr auto; }
  .r-meta { display: none; }
  .foot-grid { grid-template-columns: 1fr; }
  .classification { letter-spacing: .12em; font-size: 8.5px; gap: 8px; }
}

/* ── reduced motion ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001s !important;
  }
  .hero-line > span { transform: none; }
  .river-draw { stroke-dashoffset: 0; }
  .rev { opacity: 1; transform: none; }
  .grain { display: none; }
}
