/* ════════════════════════════════════════════════════
   ROOT & RESET
════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

:root {
  --ink:        #07090F;
  --ink-2:      #0D1220;
  --ink-3:      #141B2E;
  --rule:       #1E2A45;
  --steel-dk:   #2A3A5C;
  --steel:      #4A6080;
  --steel-lt:   #7A93B4;
  --mist:       #A8BCCE;
  --fog:        #C8D4DF;
  --paper:      #E8EDF2;
  --white:      #F4F7FA;
  --gold:       #B8922A;
  --gold-lt:    #D4AE58;
  --gold-pale:  #EDD98A;
  --signal:     #1A4EC8;
  --signal-lt:  #3D72F4;
  --signal-glow:rgba(61,114,244,0.15);
  --safe:       #1A7A4A;
  --safe-lt:    #22A060;
  --danger:     #B83030;
  --danger-lt:  #E04848;
  --warn:       #B87020;
  --warn-lt:    #E09030;
  --border:     rgba(74,96,128,0.2);
  --border-lt:  rgba(74,96,128,0.1);
}

body {
  font-family: 'Barlow', sans-serif;
  background: var(--ink);
  color: var(--fog);
  line-height: 1.65;
  overflow-x: hidden;
}

/* ════════════════════════════════════════════════════
   NOISE TEXTURE
════════════════════════════════════════════════════ */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: overlay;
}

/* ════════════════════════════════════════════════════
   NAV BAR (sticky document nav)
════════════════════════════════════════════════════ */
.doc-nav {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(7,9,15,0.96);
  border-bottom: 1px solid var(--rule);
  padding: 0 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  backdrop-filter: blur(12px);
}

.nav-org {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--steel-lt);
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-doc {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  color: var(--steel);
}

.nav-version {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  border: 1px solid rgba(184,146,42,0.4);
  padding: 0.15rem 0.6rem;
}

/* ════════════════════════════════════════════════════
   COVER
════════════════════════════════════════════════════ */
.cover {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  position: relative;
  overflow: hidden;
}

.cover-blueprint {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(61,114,244,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61,114,244,0.04) 1px, transparent 1px),
    linear-gradient(rgba(61,114,244,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61,114,244,0.015) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  animation: bpPulse 12s ease-in-out infinite;
}
@keyframes bpPulse { 0%,100%{opacity:.6} 50%{opacity:1} }

.cover-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 30%, rgba(26,78,200,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(184,146,42,0.06) 0%, transparent 60%);
}

.cover-inner {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 3.5rem;
}

.cover-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 5rem;
  animation: fadeSlide 0.9s ease 0.2s both;
}
@keyframes fadeSlide {
  from { opacity:0; transform: translateY(-16px); }
  to   { opacity:1; transform: translateY(0); }
}

.cover-classification {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.classif-line {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: var(--steel);
  text-transform: uppercase;
}

.classif-line.highlight { color: var(--gold-lt); }

.cover-corner-marks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem 2rem;
  text-align: right;
}

.corner-item {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  color: var(--steel);
  letter-spacing: 0.1em;
}

.cover-headline {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: fadeSlide2 1s ease 0.5s both;
}
@keyframes fadeSlide2 {
  from { opacity:0; transform: translateY(24px); }
  to   { opacity:1; transform: translateY(0); }
}

.cover-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.cover-eyebrow::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
}

.cover-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 800;
  line-height: 0.92;
  color: var(--white);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.cover-title .accent { color: var(--gold-lt); }
.cover-title .light  { font-weight: 300; color: var(--steel-lt); }

.cover-tagline {
  font-family: 'Libre Baskerville', serif;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--mist);
  margin: 1.5rem 0 3rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--gold);
}

.cover-metrics-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--rule);
  background: rgba(20,27,46,0.5);
  margin-top: 3rem;
}

.cov-metric {
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--rule);
  position: relative;
  transition: background 0.3s;
}
.cov-metric:last-child { border-right: none; }
.cov-metric:hover { background: rgba(61,114,244,0.04); }

.cov-metric-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.cov-metric-num sub { font-size: 1.2rem; color: var(--gold-lt); vertical-align: baseline; }

.cov-metric-lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  color: var(--steel-lt);
  text-transform: uppercase;
  line-height: 1.5;
}

.cover-bottom {
  padding-top: 3rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  animation: fadeSlide 1s ease 1s both;
}

.cover-desc {
  font-size: 0.88rem;
  color: var(--steel-lt);
  max-width: 65ch;
  line-height: 1.7;
}

.cover-edition-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--ink);
  background: var(--gold-lt);
  padding: 0.4rem 1rem;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ════════════════════════════════════════════════════
   TABLE OF CONTENTS
════════════════════════════════════════════════════ */
.toc-section {
  background: var(--ink-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 4rem 3.5rem;
}

.toc-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.toc-header::after { content:''; flex:1; max-width:80px; height:1px; background:var(--gold); opacity:.4; }

.toc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
}

.toc-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  text-decoration: none;
  transition: background 0.2s;
  cursor: pointer;
}
.toc-item:hover { background: var(--signal-glow); }
.toc-item:nth-child(3n) { border-right: none; }

.toc-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  flex-shrink: 0;
  width: 24px;
}

.toc-title {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--mist);
  line-height: 1.3;
}

/* ════════════════════════════════════════════════════
   DOCUMENT BODY LAYOUT
════════════════════════════════════════════════════ */
.doc-body {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 3.5rem;
}

.section-block {
  padding: 5rem 0;
  border-bottom: 1px solid var(--rule);
}

.section-block:last-child { border-bottom: none; }

/* Section Header */
.sec-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.sec-num-block {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  background: var(--ink-3);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.sec-title-block { flex: 1; }

.sec-category {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.25em;
  color: var(--steel-lt);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

h2.sec-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

h2.sec-title em {
  font-style: italic;
  font-family: 'Libre Baskerville', serif;
  font-weight: 400;
  color: var(--gold-lt);
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.92em;
}

/* Body text */
.lead {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--fog);
  max-width: 80ch;
  line-height: 1.8;
  margin-bottom: 1.8rem;
}

p.body-text {
  font-size: 0.93rem;
  color: var(--mist);
  max-width: 80ch;
  line-height: 1.85;
  margin-bottom: 1.4rem;
}

p.body-text strong { color: var(--fog); font-weight: 600; }

/* ════════════════════════════════════════════════════
   STATS GRID
════════════════════════════════════════════════════ */
.stats-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
  margin: 2.5rem 0;
}

.stat-cell {
  padding: 2.5rem 2rem;
  border-right: 1px solid var(--rule);
  background: var(--ink-2);
  position: relative;
  overflow: hidden;
}
.stat-cell:last-child { border-right: none; }
.stat-cell::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  background: var(--danger-lt);
  opacity: 0.7;
}

.stat-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  margin-bottom: 0.6rem;
}

.stat-num.safe  { color: var(--safe-lt); }
.stat-num.warn  { color: var(--warn-lt); }

.stat-desc {
  font-size: 0.8rem;
  color: var(--steel-lt);
  line-height: 1.6;
  margin: 0;
  max-width: none;
}

.stat-source {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  color: rgba(122,147,180,0.5);
  margin-top: 0.8rem;
  letter-spacing: 0.05em;
}

/* ════════════════════════════════════════════════════
   CONTROL LOOP TABLE
════════════════════════════════════════════════════ */
.loop-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.85rem;
}

.loop-table thead tr {
  background: var(--ink-3);
  border-bottom: 2px solid var(--gold);
}

.loop-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--gold-lt);
  text-transform: uppercase;
  text-align: left;
  padding: 1rem 1.2rem;
  font-weight: 400;
}

.loop-table td {
  padding: 1.2rem 1.2rem;
  color: var(--mist);
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  line-height: 1.6;
  max-width: none;
  margin: 0;
}

.loop-table td:first-child {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.loop-table td:nth-child(2) {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--signal-lt);
  white-space: nowrap;
}

.loop-table tr:hover td { background: rgba(61,114,244,0.04); }

.loop-tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  padding: 0.15rem 0.5rem;
  border: 1px solid;
  margin: 0.1rem 0.1rem;
}

.tag-fast   { border-color: var(--signal-lt); color: var(--signal-lt); }
.tag-medium { border-color: var(--gold); color: var(--gold-lt); }
.tag-slow   { border-color: var(--steel-lt); color: var(--steel-lt); }

/* ════════════════════════════════════════════════════
   CONTROL AUTHORITY TABLE (Section 04)
════════════════════════════════════════════════════ */
.authority-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--rule);
  margin: 2.5rem 0;
}

.auth-col {
  padding: 2.5rem 2rem;
}

.auth-col.permitted {
  background: rgba(26,122,74,0.05);
  border-right: 1px solid var(--rule);
  border-top: 3px solid var(--safe-lt);
}

.auth-col.foreclosed {
  background: rgba(184,48,48,0.05);
  border-top: 3px solid var(--danger-lt);
}

.auth-col-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.permitted .auth-col-label { color: var(--safe-lt); }
.foreclosed .auth-col-label { color: var(--danger-lt); }

.auth-col-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.5rem;
  letter-spacing: 0.03em;
}

.auth-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.auth-list li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--mist);
  line-height: 1.5;
}

.auth-check { color: var(--safe-lt); flex-shrink: 0; }
.auth-cross { color: var(--danger-lt); flex-shrink: 0; }

/* ════════════════════════════════════════════════════
   SENSOR TABLE
════════════════════════════════════════════════════ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.83rem;
}

.data-table thead tr {
  background: var(--ink-3);
  border-bottom: 2px solid var(--rule);
}

.data-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: var(--gold-lt);
  text-transform: uppercase;
  text-align: left;
  padding: 0.9rem 1.2rem;
  font-weight: 400;
}

.data-table td {
  padding: 1.1rem 1.2rem;
  color: var(--mist);
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  line-height: 1.6;
  max-width: none;
  margin: 0;
}

.data-table td:first-child {
  color: var(--fog);
  font-weight: 600;
  white-space: nowrap;
}

.data-table tr:hover td { background: rgba(20,27,46,0.5); }

/* ════════════════════════════════════════════════════
   SAFETY OUTCOME CARDS
════════════════════════════════════════════════════ */
.outcomes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
  margin: 2rem 0;
}

.outcome-card {
  padding: 2rem 1.8rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--ink-2);
  transition: background 0.3s;
}
.outcome-card:hover { background: rgba(26,78,200,0.05); }
.outcome-card:nth-child(3n) { border-right: none; }
.outcome-card:nth-last-child(-n+3) { border-bottom: none; }

.outcome-cat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.outcome-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
}

.outcome-text {
  font-size: 0.8rem;
  color: var(--steel-lt);
  line-height: 1.7;
  max-width: none;
  margin: 0;
}

/* ════════════════════════════════════════════════════
   PULL QUOTE
════════════════════════════════════════════════════ */
.pull-quote-block {
  background: var(--ink-3);
  border-left: 3px solid var(--gold);
  padding: 2.5rem 3rem;
  margin: 3rem 0;
  position: relative;
}

.pull-quote-text {
  font-family: 'Libre Baskerville', serif;
  font-size: 1.35rem;
  font-style: italic;
  color: var(--fog);
  line-height: 1.55;
  max-width: 80ch;
  margin-bottom: 1rem;
}

.pull-quote-text strong {
  font-style: normal;
  color: var(--gold-lt);
}

.pull-quote-attr {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--steel-lt);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ════════════════════════════════════════════════════
   PRIVACY SPLIT
════════════════════════════════════════════════════ */
.privacy-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--rule);
  margin: 2.5rem 0;
}

.priv-col {
  padding: 2rem 2rem;
}

.priv-col.yes {
  border-right: 1px solid var(--rule);
  border-top: 2px solid var(--safe-lt);
  background: rgba(26,122,74,0.04);
}

.priv-col.no {
  border-top: 2px solid var(--danger-lt);
  background: rgba(184,48,48,0.04);
}

.priv-col-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.priv-col.yes .priv-col-label { color: var(--safe-lt); }
.priv-col.no  .priv-col-label { color: var(--danger-lt); }

.priv-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.priv-list li {
  display: flex;
  gap: 0.75rem;
  font-size: 0.83rem;
  color: var(--mist);
  align-items: flex-start;
  line-height: 1.5;
}

.tick { color: var(--safe-lt); flex-shrink: 0; }
.cross { color: var(--danger-lt); flex-shrink: 0; }

/* ════════════════════════════════════════════════════
   DEPLOYMENT PHASES
════════════════════════════════════════════════════ */
.phases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
  margin: 2.5rem 0;
}

.phase-card {
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--rule);
  background: var(--ink-2);
  position: relative;
  transition: background 0.3s;
}
.phase-card:last-child { border-right: none; }
.phase-card:hover { background: rgba(61,114,244,0.05); }

.phase-indicator {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 4rem;
  font-weight: 800;
  color: rgba(122,147,180,0.06);
  line-height: 1;
  position: absolute;
  top: 0.5rem;
  right: 1rem;
}

.phase-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.phase-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.phase-desc {
  font-size: 0.78rem;
  color: var(--steel-lt);
  line-height: 1.65;
  max-width: none;
  margin: 0;
}

/* ════════════════════════════════════════════════════
   KPI TABLE (Section 11)
════════════════════════════════════════════════════ */
.kpi-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.83rem;
}

.kpi-table thead tr {
  background: var(--ink-3);
  border-bottom: 2px solid var(--gold);
}

.kpi-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: var(--gold-lt);
  text-transform: uppercase;
  text-align: left;
  padding: 0.9rem 1.2rem;
  font-weight: 400;
}

.kpi-table .cat-row td {
  background: rgba(20,27,46,0.8);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
  padding: 0.6rem 1.2rem;
  border-bottom: 1px solid var(--rule);
}

.kpi-table td {
  padding: 0.9rem 1.2rem;
  color: var(--mist);
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  line-height: 1.5;
  max-width: none;
  margin: 0;
}

.kpi-table td:first-child { color: var(--fog); font-weight: 500; }
.kpi-table td:nth-child(2) { color: var(--gold-pale); font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; }
.kpi-table td:nth-child(3) { color: var(--steel-lt); font-style: italic; font-size: 0.78rem; }

/* ════════════════════════════════════════════════════
   COST TABLE (Section 12)
════════════════════════════════════════════════════ */
.cost-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.85rem;
}

.cost-table thead tr { background: var(--ink-3); border-bottom: 2px solid var(--rule); }

.cost-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: var(--gold-lt);
  text-transform: uppercase;
  text-align: left;
  padding: 0.9rem 1.2rem;
  font-weight: 400;
}

.cost-table td {
  padding: 1rem 1.2rem;
  color: var(--mist);
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  max-width: none;
  margin: 0;
}

.cost-table td:first-child { color: var(--fog); font-weight: 500; }
.cost-table td:last-child {
  font-family: 'JetBrains Mono', monospace;
  color: var(--gold-pale);
  text-align: right;
  white-space: nowrap;
}

.cost-table tr.total-row td {
  background: rgba(20,27,46,0.8);
  border-top: 1px solid var(--gold);
  color: var(--white);
  font-weight: 600;
}
.cost-table tr.total-row td:last-child { color: var(--gold-pale); font-weight: 700; }

.cost-summary-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--rule);
  margin: 1.5rem 0;
}

.cost-sum-cell {
  padding: 2rem;
  text-align: center;
  border-right: 1px solid var(--rule);
  background: var(--ink-2);
}
.cost-sum-cell:last-child { border-right: none; }

.cost-sum-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: var(--steel-lt);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.cost-sum-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gold-pale);
  line-height: 1;
}

/* ════════════════════════════════════════════════════
   FAILURE MODE TABLE (Section 13)
════════════════════════════════════════════════════ */
.failure-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.83rem;
}

.failure-table thead tr { background: var(--ink-3); border-bottom: 2px solid var(--rule); }

.failure-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: var(--gold-lt);
  text-transform: uppercase;
  text-align: left;
  padding: 0.9rem 1.2rem;
  font-weight: 400;
}

.failure-table td {
  padding: 1.1rem 1.2rem;
  color: var(--mist);
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  line-height: 1.6;
  max-width: none;
  margin: 0;
}

.failure-table td:first-child {
  font-family: 'JetBrains Mono', monospace;
  color: var(--gold);
  font-size: 0.78rem;
  white-space: nowrap;
}

.failure-table td:nth-child(2) { color: var(--fog); font-weight: 500; }
.failure-table td:nth-child(3) { color: var(--safe-lt); }

/* ════════════════════════════════════════════════════
   PROCUREMENT LANGUAGE TABLE
════════════════════════════════════════════════════ */
.procurement-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.83rem;
}

.procurement-table thead tr { background: var(--ink-3); border-bottom: 2px solid var(--rule); }

.procurement-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: var(--gold-lt);
  text-transform: uppercase;
  text-align: left;
  padding: 0.9rem 1.2rem;
  font-weight: 400;
}

.procurement-table td {
  padding: 1.1rem 1.2rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  line-height: 1.6;
  max-width: none;
  margin: 0;
}

.procurement-table td:first-child {
  color: var(--danger-lt);
  font-size: 0.8rem;
  font-style: italic;
  text-decoration: line-through;
  text-decoration-color: rgba(224,72,72,0.4);
}

.procurement-table td:last-child {
  color: var(--safe-lt);
  font-weight: 500;
}

/* ════════════════════════════════════════════════════
   COMPARATIVE SYSTEM TABLE (Section 16)
════════════════════════════════════════════════════ */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.8rem;
}

.compare-table thead tr { background: var(--ink-3); border-bottom: 2px solid var(--rule); }

.compare-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: var(--gold-lt);
  text-transform: uppercase;
  text-align: left;
  padding: 0.9rem 1rem;
  font-weight: 400;
}

.compare-table td {
  padding: 1rem 1rem;
  color: var(--mist);
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  line-height: 1.6;
  max-width: none;
  margin: 0;
}

.compare-table td:first-child { color: var(--fog); font-weight: 600; }
.compare-table tr:hover td { background: rgba(20,27,46,0.5); }

/* ════════════════════════════════════════════════════
   RETROFIT TABLE (Section 16.4)
════════════════════════════════════════════════════ */
.retrofit-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.82rem;
}

.retrofit-table thead tr { background: var(--ink-3); border-bottom: 2px solid var(--rule); }

.retrofit-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: var(--gold-lt);
  text-transform: uppercase;
  text-align: left;
  padding: 0.8rem 1rem;
  font-weight: 400;
}

.retrofit-table td {
  padding: 0.9rem 1rem;
  color: var(--mist);
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  line-height: 1.5;
  max-width: none;
  margin: 0;
}

.retrofit-table td:first-child { color: var(--fog); font-weight: 500; }
.retrofit-table td:last-child { color: var(--safe-lt); font-weight: 500; }

/* ════════════════════════════════════════════════════
   CONTROL LEVEL BLOCKS (Section 17)
════════════════════════════════════════════════════ */
.control-levels {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--rule);
  margin: 2rem 0;
}

.ctrl-level {
  display: grid;
  grid-template-columns: 80px 1fr;
  border-bottom: 1px solid var(--rule);
}
.ctrl-level:last-child { border-bottom: none; }

.ctrl-level-num {
  background: var(--ink-3);
  border-right: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--gold);
  font-weight: 600;
}

.ctrl-level-content {
  padding: 1.5rem 1.8rem;
}

.ctrl-level-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.ctrl-level-desc {
  font-size: 0.82rem;
  color: var(--steel-lt);
  line-height: 1.6;
  max-width: none;
  margin: 0;
}

.ctrl-level.authority .ctrl-level-num { color: var(--signal-lt); }
.ctrl-level.authority .ctrl-level-title { color: var(--signal-lt); }

/* ════════════════════════════════════════════════════
   FLOW DIAGRAM (ASCII-style)
════════════════════════════════════════════════════ */
.flow-block {
  background: var(--ink-3);
  border: 1px solid var(--rule);
  padding: 2.5rem 3rem;
  margin: 2rem 0;
  font-family: 'JetBrains Mono', monospace;
}

.flow-title {
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.flow-lines {
  font-size: 0.82rem;
  color: var(--mist);
  line-height: 1.8;
}

.flow-lines .node {
  color: var(--fog);
  font-weight: 600;
}

.flow-lines .arrow { color: var(--signal-lt); }
.flow-lines .constraint { color: var(--danger-lt); }
.flow-lines .note { color: var(--steel-lt); font-size: 0.72rem; }

/* ════════════════════════════════════════════════════
   VERIFICATION SECTION (Section 18)
════════════════════════════════════════════════════ */
.verify-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
  margin: 2rem 0;
}

.verify-card {
  padding: 2rem 1.8rem;
  border-right: 1px solid var(--rule);
  background: var(--ink-2);
}
.verify-card:last-child { border-right: none; }

.verify-type {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.verify-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.verify-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.verify-items li {
  font-size: 0.78rem;
  color: var(--steel-lt);
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  line-height: 1.5;
}

.verify-items li::before {
  content: '→';
  color: var(--signal-lt);
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════
   PILOT GEOGRAPHY TABLE (Section 19)
════════════════════════════════════════════════════ */
.geo-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--rule);
  margin: 2rem 0;
}

.geo-col {
  padding: 2rem;
}

.geo-col:first-child {
  border-right: 1px solid var(--rule);
  border-top: 2px solid var(--signal-lt);
  background: rgba(61,114,244,0.04);
}

.geo-col:last-child {
  border-top: 2px solid var(--steel);
  background: rgba(74,96,128,0.04);
}

.geo-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: var(--gold-lt);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.geo-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.geo-list li {
  font-size: 0.83rem;
  color: var(--mist);
  display: flex;
  gap: 0.7rem;
  align-items: center;
  line-height: 1.5;
}

.geo-list li::before {
  content: '◆';
  font-size: 0.4rem;
  color: var(--signal-lt);
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════
   RISK TABLE (Section 19.7)
════════════════════════════════════════════════════ */
.risk-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.82rem;
}

.risk-table thead tr { background: var(--ink-3); border-bottom: 2px solid var(--rule); }

.risk-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: var(--gold-lt);
  text-transform: uppercase;
  padding: 0.8rem 1rem;
  text-align: left;
  font-weight: 400;
}

.risk-table td {
  padding: 1rem 1rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  line-height: 1.6;
  max-width: none;
  margin: 0;
}

.risk-table td:first-child { color: var(--warn-lt); font-weight: 500; }
.risk-table td:last-child  { color: var(--safe-lt); }

/* ════════════════════════════════════════════════════
   ROI TABLE (Section 20)
════════════════════════════════════════════════════ */
.roi-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.83rem;
}

.roi-table thead tr { background: var(--ink-3); border-bottom: 2px solid var(--rule); }

.roi-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: var(--gold-lt);
  text-transform: uppercase;
  padding: 0.8rem 1.2rem;
  text-align: left;
  font-weight: 400;
}

.roi-table td {
  padding: 1rem 1.2rem;
  color: var(--mist);
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  line-height: 1.6;
  max-width: none;
  margin: 0;
}

.roi-table td:first-child { color: var(--fog); font-weight: 500; }
.roi-table td:last-child { color: var(--gold-pale); font-family: 'JetBrains Mono', monospace; }

/* ════════════════════════════════════════════════════
   SECURITY TABLE (Section 21.7)
════════════════════════════════════════════════════ */
.security-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.82rem;
}

.security-table thead tr { background: var(--ink-3); border-bottom: 2px solid var(--rule); }

.security-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: var(--gold-lt);
  text-transform: uppercase;
  padding: 0.8rem 1rem;
  text-align: left;
  font-weight: 400;
}

.security-table td {
  padding: 0.9rem 1rem;
  color: var(--mist);
  border-bottom: 1px solid var(--rule);
  max-width: none;
  margin: 0;
  line-height: 1.5;
}

.security-table td:first-child { color: var(--fog); font-weight: 500; }

.sec-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  padding: 0.15rem 0.5rem;
  letter-spacing: 0.1em;
  border: 1px solid;
}

.sec-badge.isolated { border-color: var(--safe-lt); color: var(--safe-lt); }
.sec-badge.local    { border-color: var(--signal-lt); color: var(--signal-lt); }
.sec-badge.readonly { border-color: var(--warn-lt); color: var(--warn-lt); }
.sec-badge.observe  { border-color: var(--steel-lt); color: var(--steel-lt); }

/* ════════════════════════════════════════════════════
   STATEMENT BLOCKS
════════════════════════════════════════════════════ */
.statement-block {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--signal-lt);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  background: rgba(61,114,244,0.04);
}

.statement-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.25em;
  color: var(--signal-lt);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.statement-text {
  font-size: 0.9rem;
  color: var(--fog);
  line-height: 1.75;
  max-width: none;
  margin: 0;
}

.statement-text strong { color: var(--white); }

/* ════════════════════════════════════════════════════
   H3 SUB-SECTIONS
════════════════════════════════════════════════════ */
h3.subsec {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--mist);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

h3.subsec::before {
  content: attr(data-num);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--gold);
  letter-spacing: 0.1em;
}

/* ════════════════════════════════════════════════════
   CERTIFICATION THRESHOLDS TABLE (Section 18.6)
════════════════════════════════════════════════════ */
.cert-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.82rem;
}

.cert-table thead tr { background: var(--ink-3); border-bottom: 2px solid var(--rule); }

.cert-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: var(--gold-lt);
  text-transform: uppercase;
  padding: 0.8rem 1.2rem;
  text-align: left;
  font-weight: 400;
}

.cert-table td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  line-height: 1.5;
  max-width: none;
  margin: 0;
}

.cert-table td:first-child { color: var(--fog); font-weight: 500; }
.cert-table td:last-child  { color: var(--safe-lt); font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; }

/* ════════════════════════════════════════════════════
   CLOSING
════════════════════════════════════════════════════ */
.doc-closing {
  background: var(--ink-2);
  border-top: 1px solid var(--rule);
  padding: 6rem 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.doc-closing::before {
  content: 'UMIN';
  position: absolute;
  bottom: -4rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22rem;
  font-weight: 800;
  color: rgba(122,147,180,0.02);
  white-space: nowrap;
  pointer-events: none;
}

.closing-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.closing-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.closing-title .em {
  font-family: 'Libre Baskerville', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--gold-lt);
  text-transform: none;
  letter-spacing: normal;
}

.closing-body {
  font-size: 0.93rem;
  color: var(--steel-lt);
  max-width: 60ch;
  line-height: 1.8;
  margin: 2rem auto 3rem;
}

.contact-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--rule);
  border-top: 2px solid var(--gold);
  padding: 2.5rem 4rem;
  background: var(--ink-3);
  position: relative;
  z-index: 2;
}

.contact-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.25em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.contact-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.03em;
}

.contact-title {
  font-size: 0.85rem;
  color: var(--mist);
}

.contact-org {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--steel-lt);
  letter-spacing: 0.1em;
  margin-top: 0.3rem;
}

/* ════════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════════ */
footer {
  background: var(--ink);
  border-top: 1px solid var(--rule);
  padding: 1.5rem 3.5rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
}

.ft-left {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  color: rgba(74,96,128,0.5);
  letter-spacing: 0.1em;
}

.ft-center {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-align: center;
  border: 1px solid rgba(184,146,42,0.3);
  padding: 0.3rem 0.8rem;
  white-space: nowrap;
}

.ft-right {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  color: rgba(74,96,128,0.5);
  letter-spacing: 0.1em;
  text-align: right;
}

/* ════════════════════════════════════════════════════
   SCROLL REVEAL
════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .doc-body, .toc-section, .doc-closing, footer { padding-left: 1.5rem; padding-right: 1.5rem; }
  .cover-inner { padding: 2rem 1.5rem; }
  .cover-metrics-bar { grid-template-columns: repeat(2, 1fr); }
  .toc-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .outcomes-grid, .verify-grid { grid-template-columns: 1fr; }
  .phases-grid { grid-template-columns: repeat(2, 1fr); }
  .authority-split, .privacy-split, .geo-split, .cost-summary-pair { grid-template-columns: 1fr; }
  .authority-split .auth-col.permitted, .privacy-split .priv-col.yes, .geo-split .geo-col:first-child { border-right: none; border-bottom: 1px solid var(--rule); }
  .doc-nav { padding: 0 1.5rem; }
  .doc-nav .nav-doc { display: none; }
  footer { grid-template-columns: 1fr; }
  .ft-right { text-align: left; }
  .cover-top-bar { flex-direction: column; gap: 1rem; }
  .cover-corner-marks { text-align: left; }
}

