/* ==========================================================================
   DeepInfer Field Notes — independent technical dossier
   Palette: warm paper, ink teal, signal orange.
   Type: Archivo + IBM Plex Mono.
   ========================================================================== */

:root {
  --paper: #f4f1e9;
  --paper-raised: #fbf9f3;
  --paper-deep: #ebe6da;
  --ink: #15211f;
  --ink-soft: #1f302c;
  --muted: #4c5a55;
  --faint: #5f6b64;
  --teal: #0d6b5e;
  --teal-deep: #084c43;
  --teal-tint: #dfece7;
  --orange: #b93d0a;
  --orange-tint: #f7e4d8;
  --line: #d8d2c4;
  --line-strong: #b9b1a0;
  --grid: rgba(21, 33, 31, 0.055);
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --shadow: 0 18px 50px -30px rgba(21, 33, 31, 0.45);
}

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

html {
  scroll-padding-top: 92px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  font-size: 16.5px;
  line-height: 1.68;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px, 32px 32px, auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  -webkit-tap-highlight-color: transparent;
}

::selection { background: rgba(13, 107, 94, 0.22); }

a {
  color: var(--teal);
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover { color: var(--orange); }

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { text-wrap: pretty; orphans: 3; widows: 3; }

img { max-width: 100%; display: block; }

code, pre, .mono { font-family: var(--font-mono); }

code {
  font-size: 0.86em;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  padding: 1px 5px;
  white-space: nowrap;
}

pre {
  background: var(--ink);
  color: #ece7da;
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.7;
  border-left: 3px solid var(--orange);
}

pre code { background: none; border: 0; padding: 0; color: inherit; white-space: pre; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.wrap { max-width: 760px; }
.wrap-wide { max-width: 980px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  font-weight: 600;
}
.skip-link:focus { left: 8px; }

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

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 241, 233, 0.94);
  border-bottom: 1.5px solid var(--ink);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.25s ease;
}
.topbar.scrolled { box-shadow: 0 10px 30px -22px rgba(21, 33, 31, 0.7); }

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding-block: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  flex-shrink: 0;
}
.brand:hover { color: var(--ink); }

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--teal-deep);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  letter-spacing: -0.06em;
}
.brand-mark::after {
  content: "";
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 8px;
  height: 8px;
  background: var(--orange);
}

.brand-text { line-height: 1.1; }
.brand-name {
  display: block;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}
.brand-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-top: 3px;
  text-transform: uppercase;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.topnav a {
  color: var(--muted);
  padding: 3px 0;
  border-bottom: 2px solid transparent;
}
.topnav a:hover { color: var(--teal); border-bottom-color: var(--teal); }
.topnav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--orange); }

.top-flag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  border: 1px solid var(--orange);
  padding: 4px 8px;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .topbar-inner { flex-wrap: wrap; gap: 10px 18px; }
  .topnav { order: 3; width: 100%; justify-content: flex-start; gap: 14px; padding-bottom: 2px; }
  .top-flag { display: none; }
}

/* --------------------------------------------------------------------------
   Hero / title sheet
   -------------------------------------------------------------------------- */

.hero { padding: 58px 0 42px; }

.sheet {
  position: relative;
  border: 1.5px solid var(--ink);
  background: var(--paper-raised);
  padding: 46px 48px 40px;
  box-shadow: var(--shadow);
}
.sheet::before, .sheet::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid var(--teal);
  pointer-events: none;
}
.sheet::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.sheet::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }

.fig {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 18px;
}
.fig b { color: var(--ink); font-weight: 500; }

.hero h1 {
  font-size: clamp(2.55rem, 5.8vw, 4.35rem);
  line-height: 1.01;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
  max-width: 16ch;
}
.hero h1 .mark {
  box-shadow: inset 0 -0.26em 0 var(--teal-tint);
  padding: 0 0.03em;
}

.hero .lede {
  color: var(--muted);
  font-size: 1.09rem;
  line-height: 1.72;
  max-width: 70ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 11px 18px;
  border: 1.5px solid var(--ink);
  color: var(--paper-raised);
  background: var(--ink);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.btn:hover { background: var(--teal-deep); border-color: var(--teal-deep); color: #fff; transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--teal-tint); color: var(--teal-deep); border-color: var(--teal); }

.spec-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--paper);
  margin-top: 30px;
}
.spec {
  padding: 13px 16px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.spec:last-child { border-right: 0; }
.spec .k {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 3px;
}
.spec .v { font-size: 0.9rem; font-weight: 600; line-height: 1.35; }
.spec .v small { display: block; font-weight: 400; font-size: 0.72rem; color: var(--faint); margin-top: 2px; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  color: var(--faint);
  text-transform: uppercase;
}
.hero-meta .dot { color: var(--orange); }

@media (max-width: 860px) {
  .spec-strip { grid-template-columns: repeat(3, 1fr); }
  .spec:nth-child(3) { border-right: 0; }
  .spec:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .sheet { padding: 28px 22px 26px; }
  .hero { padding: 38px 0 30px; }
  .spec-strip { grid-template-columns: 1fr 1fr; }
  .spec { border-right: 0; border-bottom: 1px solid var(--line); }
  .spec:nth-child(odd) { border-right: 1px solid var(--line); }
  .spec:nth-child(n+4) { border-top: 0; }
  .spec:last-child { border-bottom: 0; }
  .hero h1 { font-size: clamp(2.2rem, 10vw, 3rem); }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 160px; }
  .article h2, .article h3 { scroll-margin-top: 160px; }
}
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .topbar-inner { padding-block: 10px; }
  .article h2 { margin-top: 38px; }
  .article p { font-size: 0.98rem; }
}

/* --------------------------------------------------------------------------
   General sections
   -------------------------------------------------------------------------- */

.section { padding: 54px 0; }
.section.tight { padding: 38px 0; }
.section.rule { border-top: 1px solid var(--line); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}
.kicker {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
}
.section-head h2 {
  font-size: clamp(1.55rem, 2.8vw, 2.1rem);
  letter-spacing: -0.025em;
}
.section-head .aside {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  padding-bottom: 4px;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
  .section-head { display: block; }
  .section-head .aside { margin-top: 10px; }
}

.card {
  position: relative;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  padding: 24px 24px 22px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: 6px 6px 0 var(--teal-tint);
}
.card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--orange);
  border-left: 2px solid var(--orange);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.card:hover::before { opacity: 1; }
.card .num {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--orange);
  display: block;
  margin-bottom: 10px;
}
.card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.92rem; line-height: 1.65; }
.card a.card-link { position: absolute; inset: 0; }
.card a.card-link span { position: absolute; left: -9999px; }

.callout {
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  background: var(--paper-raised);
  padding: 18px 20px;
  margin: 24px 0;
  font-size: 0.94rem;
}
.callout.warn { border-left-color: var(--orange); }
.callout.dark { background: var(--ink); color: #ece7da; border-color: var(--ink); border-left-color: var(--orange); }
.callout.dark p, .callout.dark li, .callout.dark strong { color: #ece7da; }
.callout.dark a { color: #f0b090; }
.callout .label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 7px;
}
.callout.dark .label { color: #f0b090; }
.callout p:last-child { margin-bottom: 0; }

.note {
  border: 1px solid var(--line);
  border-left: 3px solid var(--orange);
  background: var(--paper-raised);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 22px 0;
}
.note b { color: var(--ink); font-weight: 600; }

/* Source chips */
.chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 6px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  background: var(--paper);
  white-space: nowrap;
  vertical-align: 1px;
}
.chip.official { border-color: var(--teal); color: var(--teal-deep); background: var(--teal-tint); }
.chip.claim { border-color: var(--orange); color: var(--orange); background: var(--orange-tint); }
.chip.secondary { border-color: var(--line-strong); color: var(--muted); }
.chip.community { border-color: #7d8fa8; color: #3f5875; background: #e7edf5; }
.chip.untested { border-color: var(--orange); color: var(--orange); background: transparent; border-style: dashed; }

/* --------------------------------------------------------------------------
   Home-specific blocks
   -------------------------------------------------------------------------- */

.three-up { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); background: var(--paper-raised); }
.three-up > div { padding: 26px 24px; border-right: 1px solid var(--line); }
.three-up > div:last-child { border-right: 0; }
.three-up h3 { font-size: 1.02rem; margin-bottom: 8px; }
.three-up p, .three-up li { color: var(--muted); font-size: 0.9rem; }
.three-up ul { list-style: none; }
.three-up li { padding-left: 16px; position: relative; margin-bottom: 5px; }
.three-up li::before { content: "—"; position: absolute; left: 0; color: var(--orange); }
@media (max-width: 760px) {
  .three-up { grid-template-columns: 1fr; }
  .three-up > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .three-up > div:last-child { border-bottom: 0; }
}

.scope {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  background: var(--paper-raised);
}
.scope-col { padding: 24px 26px; }
.scope-col + .scope-col { border-left: 1px solid var(--line); }
.scope-col h3 { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px; }
.scope-col.in h3 { color: var(--teal); }
.scope-col.out h3 { color: var(--orange); }
.scope-col ul { list-style: none; }
.scope-col li { position: relative; padding-left: 20px; margin-bottom: 7px; font-size: 0.9rem; color: var(--muted); }
.scope-col.in li::before { content: "+"; position: absolute; left: 0; color: var(--teal); font-family: var(--font-mono); font-weight: 600; }
.scope-col.out li::before { content: "−"; position: absolute; left: 0; color: var(--orange); font-family: var(--font-mono); font-weight: 600; }
@media (max-width: 700px) {
  .scope { grid-template-columns: 1fr; }
  .scope-col + .scope-col { border-left: 0; border-top: 1px solid var(--line); }
}

.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.article .chart-grid { grid-template-columns: 1fr; }
@media (max-width: 820px) { .chart-grid { grid-template-columns: 1fr; } }

figure.chart {
  border: 1px solid var(--line);
  background: var(--paper-raised);
  padding: 12px 12px 14px;
}
figure.chart img { width: 100%; height: auto; border: 1px solid var(--line); background: #fff; }
figure.chart figcaption {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  line-height: 1.55;
  color: var(--faint);
  padding: 10px 2px 0;
}
figure.chart figcaption b { color: var(--ink); font-weight: 600; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); background: var(--paper-raised); }
.stat { padding: 22px 22px 20px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .big { font-family: var(--font-mono); font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--teal-deep); line-height: 1; letter-spacing: -0.04em; }
.stat .lbl { display: block; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin-top: 8px; line-height: 1.5; }
.stat .src { display: block; font-size: 0.68rem; color: var(--muted); margin-top: 6px; }
@media (max-width: 700px) { .stat-row { grid-template-columns: 1fr; } .stat { border-right: 0; border-bottom: 1px solid var(--line); } .stat:last-child { border-bottom: 0; } }

.name-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--ink);
  color: #ece7da;
  border: 1px solid var(--ink);
}
.name-cell { padding: 20px 20px 18px; border-right: 1px solid rgba(236, 231, 218, 0.18); }
.name-cell:last-child { border-right: 0; }
.name-cell .n { font-weight: 700; font-size: 1rem; display: block; margin-bottom: 4px; }
.name-cell .f { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.06em; text-transform: uppercase; color: #b9b1a0; display: block; }
.name-cell.here { background: var(--teal-deep); }
.name-cell.here .n { color: #fff; }
.name-cell.here .f { color: #cfe3dd; }
@media (max-width: 760px) { .name-strip { grid-template-columns: 1fr 1fr; } .name-cell:nth-child(2) { border-right: 0; } .name-cell:nth-child(n+3) { border-top: 1px solid rgba(236, 231, 218, 0.18); } }
@media (max-width: 460px) { .name-strip { grid-template-columns: 1fr; } .name-cell { border-right: 0; border-bottom: 1px solid rgba(236, 231, 218, 0.18); } .name-cell:last-child { border-bottom: 0; } }

.timeline { list-style: none; border-left: 2px solid var(--line-strong); margin-left: 6px; }
.tl-item { position: relative; padding: 0 0 22px 24px; }
.tl-item::before { content: ""; position: absolute; left: -6px; top: 7px; width: 9px; height: 9px; background: var(--paper); border: 2px solid var(--teal); }
.tl-item.hot::before { background: var(--orange); border-color: var(--orange); }
.tl-date { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.06em; color: var(--orange); text-transform: uppercase; display: block; margin-bottom: 3px; }
.tl-item p { color: var(--muted); font-size: 0.92rem; }
.tl-item p b { color: var(--ink); }

.read-next { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.read-next .card { padding: 20px; }
.read-next .card h3 { font-size: 0.98rem; }
.read-next .card .arrow { font-family: var(--font-mono); font-size: 0.7rem; color: var(--teal); display: block; margin-top: 12px; }
@media (max-width: 820px) { .read-next { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .read-next { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Article / rail layout
   -------------------------------------------------------------------------- */

.rail-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 54px;
  align-items: start;
  padding-block: 44px 72px;
}
.rail { position: sticky; top: 100px; }
.rail .rail-title { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.rail a { display: block; font-size: 0.82rem; color: var(--muted); padding: 5px 0 5px 10px; border-left: 2px solid var(--line); line-height: 1.4; }
.rail a:hover { color: var(--teal); border-left-color: var(--teal); }
.rail a.active { color: var(--ink); border-left-color: var(--orange); }
.rail .rail-note { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; font-family: var(--font-mono); font-size: 0.62rem; line-height: 1.6; color: var(--faint); }
@media (max-width: 1020px) { .rail-layout { grid-template-columns: minmax(0,1fr); gap: 0; } .rail { display: none; } }

.article { max-width: 780px; min-width: 0; }
.article pre, .article .table-wrap { max-width: 100%; }
.article > .article-head { margin-bottom: 30px; }
.article > .article-head h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin: 8px 0 14px; }
.article > .article-head .standfirst { color: var(--muted); font-size: 1.06rem; line-height: 1.72; max-width: 68ch; }
.article .meta-line { display: flex; flex-wrap: wrap; gap: 8px 16px; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); margin-top: 14px; }
.article .meta-line .dot { color: var(--orange); }

.article h2 {
  counter-increment: section;
  border-top: 1px solid var(--line);
  padding-top: 26px;
  margin: 46px 0 14px;
  font-size: clamp(1.4rem, 2.5vw, 1.72rem);
  letter-spacing: -0.025em;
}
.article { counter-reset: section; }
.article h2::before {
  content: "§ " counter(section, decimal-leading-zero);
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--orange);
  margin-bottom: 7px;
  font-weight: 400;
}
.article h3 { font-size: 1.12rem; margin: 26px 0 8px; letter-spacing: -0.015em; }
.article h4 { font-size: 0.98rem; margin: 20px 0 6px; }
.article p { margin-bottom: 16px; color: #20302c; font-size: 1rem; }
.article p code, .article li code, .article td code { white-space: normal; overflow-wrap: anywhere; }
.article p.lede { font-size: 1.07rem; color: var(--muted); }
.article ul, .article ol { margin: 0 0 18px 1.2em; }
.article li { margin-bottom: 7px; color: #20302c; }
.article li::marker { color: var(--teal); }
.article strong { color: var(--ink); font-weight: 600; }
.article em { font-style: italic; }
.article blockquote {
  margin: 24px 0;
  padding: 2px 0 2px 20px;
  border-left: 3px solid var(--teal);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink-soft);
}
.article blockquote p:last-child { margin-bottom: 0; }
.article hr { border: 0; border-top: 1px solid var(--line); margin: 34px 0; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.table-wrap table { min-width: 560px; }

.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 24px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}
.article th, .article td { border: 1px solid var(--line); padding: 9px 11px; text-align: left; vertical-align: top; }
.article th { background: var(--teal-tint); color: var(--teal-deep); font-weight: 600; font-size: 0.66rem; letter-spacing: 0.04em; text-transform: uppercase; }
.article td:first-child { color: var(--muted); }
.article tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.35); }
.article .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 20px 0 24px; }
.article .table-wrap table { margin: 0; min-width: 560px; }

.article .callout { margin: 24px 0; }
.article .note { margin: 22px 0; }

.article .source-list { list-style: none; margin-left: 0; }
.article .source-list li { padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 0.9rem; }
.article .source-list li:last-child { border-bottom: 0; }

/* Flow diagram */
.flow {
  display: grid;
  grid-template-columns: minmax(0,1fr) 26px minmax(0,1fr) 26px minmax(0,1fr) 26px minmax(0,1fr);
  align-items: stretch;
  margin: 24px 0;
}
.flow-box {
  border: 1px solid var(--line);
  background: var(--paper-raised);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.flow-box strong { font-size: 0.86rem; line-height: 1.3; }
.flow-box small { font-family: var(--font-mono); font-size: 0.63rem; line-height: 1.5; color: var(--faint); }
.flow-k {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--orange);
  text-transform: uppercase;
}
.flow-arrow {
  display: grid;
  place-items: center;
  color: var(--orange);
  font-family: var(--font-mono);
  font-size: 1rem;
}
@media (max-width: 720px) {
  .flow { grid-template-columns: minmax(0,1fr); gap: 6px; }
  .flow-arrow { transform: rotate(90deg); height: 18px; }
}

/* FAQ */
.qa { border-top: 1px solid var(--line); padding: 20px 0 18px; }
.qa:last-child { border-bottom: 1px solid var(--line); }
.qa h3 { margin: 0 0 7px; font-size: 1.05rem; }
.qa p { margin-bottom: 0; color: var(--muted); font-size: 0.94rem; }
.qa .chip { margin-bottom: 8px; }

/* Timeline page block */
.timeline.big .tl-item { padding-bottom: 26px; }
.timeline.big .tl-date { font-size: 0.68rem; }
.timeline.big .tl-item p { font-size: 0.96rem; }

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

.footer {
  margin-top: 30px;
  background: var(--ink);
  color: #dcd6c7;
  border-top: 4px solid var(--orange);
}
.footer a { color: #f0b090; }
.footer a:hover { color: #fff; }
.footer-inner { padding-block: 40px 34px; display: grid; grid-template-columns: 1.4fr .85fr 1fr 1.05fr; gap: 28px; }
.footer h3 { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: #b9b1a0; margin-bottom: 10px; }
.footer p, .footer li { font-size: 0.8rem; line-height: 1.65; color: #c9c2b2; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 5px; }
.footer .f-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer .f-brand .brand-mark { background: var(--orange); color: #fff; }
.footer .f-brand .brand-mark::after { background: var(--teal); }
.footer .f-brand .brand-name { color: #fff; }
.footer .f-brand .brand-sub { color: #b9b1a0; }
.footer .disclosure { font-family: var(--font-mono); font-size: 0.68rem; line-height: 1.7; color: #b9b1a0; border-top: 1px solid rgba(236, 231, 218, 0.18); padding-top: 14px; margin-top: 16px; }
.footer .colophon { font-family: var(--font-mono); font-size: 0.64rem; color: #a9a293; }
@media (max-width: 820px) { .footer-inner { grid-template-columns: 1fr 1fr; } .footer-inner > div:first-child { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-inner { grid-template-columns: 1fr; } }

.back-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--teal-deep);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.back-top.show { opacity: 1; pointer-events: auto; }
.back-top:hover { background: var(--orange); color: #fff; transform: translateY(-2px); }

/* --------------------------------------------------------------------------
   Motion / utilities
   -------------------------------------------------------------------------- */

[data-reveal] { opacity: 1; transform: none; }
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.js [data-reveal].in { opacity: 1; transform: none; }

.prose-link {
  background: linear-gradient(currentColor, currentColor) bottom left / 0% 1px no-repeat;
  transition: background-size 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  padding-bottom: 1px;
}
.prose-link:hover { background-size: 100% 1px; }

.mono-label { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }

.hr-dashed { border: 0; border-top: 1px dashed var(--line-strong); margin: 30px 0; }

.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  [data-reveal], .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* Print */
@media print {
  .topbar, .back-top, .hero-actions, .footer { display: none; }
  body { background: #fff; }
  .sheet, .card, .callout { box-shadow: none; }
}

/* Chrome / Safari scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper-deep); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border: 2px solid var(--paper-deep); }
::-webkit-scrollbar-thumb:hover { background: var(--teal); }
