/* ============================================================
   VLA Safety — Project page styles
   Theme system: data-theme on <html> swaps neutrals + fonts.
   data-accent swaps the two semantic accent hues.
   Accents: --target (purple, attack)  --benign (blue, nominal)
   ============================================================ */

/* ---------- Accent palettes (independent of theme) ---------- */
:root[data-accent="purpleblue"] {
  --target: oklch(0.55 0.21 300);
  --target-bright: oklch(0.66 0.20 300);
  --benign: oklch(0.56 0.15 248);
  --benign-bright: oklch(0.67 0.14 248);
}
:root[data-accent="crimsonslate"] {
  --target: oklch(0.55 0.21 22);
  --target-bright: oklch(0.66 0.20 22);
  --benign: oklch(0.52 0.05 250);
  --benign-bright: oklch(0.64 0.05 250);
}
:root[data-accent="violetteal"] {
  --target: oklch(0.55 0.20 295);
  --target-bright: oklch(0.66 0.19 295);
  --benign: oklch(0.58 0.11 195);
  --benign-bright: oklch(0.68 0.11 195);
}

/* =====================  THEME: ACADEMIC  ===================== */
:root,
:root[data-theme="academic"] {
  --bg: oklch(0.992 0.003 95);
  --bg-2: oklch(0.972 0.005 95);
  --surface: #ffffff;
  --surface-2: oklch(0.978 0.004 95);
  --text: oklch(0.24 0.012 285);
  --text-muted: oklch(0.50 0.012 285);
  --text-faint: oklch(0.64 0.01 285);
  --border: oklch(0.905 0.005 285);
  --border-strong: oklch(0.82 0.007 285);

  --font-display: "Spectral", Georgia, serif;
  --font-body: "Public Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 7px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px oklch(0.2 0.02 285 / 0.05), 0 1px 1px oklch(0.2 0.02 285 / 0.04);
  --shadow: 0 4px 18px oklch(0.2 0.02 285 / 0.07), 0 1px 3px oklch(0.2 0.02 285 / 0.05);
  --shadow-lg: 0 18px 50px oklch(0.2 0.02 285 / 0.12);

  --display-weight: 600;
  --display-tracking: -0.015em;
  --hero-size: clamp(2.5rem, 5.2vw, 4.4rem);
  --hero-leading: 1.1;
  --rule: 1px;
  --maxw: 1080px;
}

/* =====================  THEME: TECHNICAL (dark)  ===================== */
:root[data-theme="technical"] {
  --bg: oklch(0.165 0.012 274);
  --bg-2: oklch(0.195 0.014 274);
  --surface: oklch(0.215 0.016 274);
  --surface-2: oklch(0.235 0.018 274);
  --text: oklch(0.94 0.008 270);
  --text-muted: oklch(0.70 0.012 270);
  --text-faint: oklch(0.56 0.013 270);
  --border: oklch(0.31 0.016 274);
  --border-strong: oklch(0.40 0.018 274);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 4px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 6px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.55);

  --display-weight: 600;
  --display-tracking: -0.02em;
  --hero-size: clamp(2.4rem, 5vw, 4.2rem);
  --hero-leading: 1.06;
  --rule: 1px;
  --maxw: 1080px;
}
:root[data-theme="technical"] {
  --target: oklch(0.70 0.20 300);
  --target-bright: oklch(0.78 0.18 300);
  --benign: oklch(0.72 0.14 248);
  --benign-bright: oklch(0.80 0.13 248);
}
:root[data-theme="technical"][data-accent="crimsonslate"] {
  --target: oklch(0.70 0.20 22);
  --target-bright: oklch(0.78 0.18 22);
  --benign: oklch(0.74 0.04 250);
  --benign-bright: oklch(0.82 0.04 250);
}
:root[data-theme="technical"][data-accent="violetteal"] {
  --target: oklch(0.70 0.19 295);
  --target-bright: oklch(0.78 0.17 295);
  --benign: oklch(0.74 0.11 195);
  --benign-bright: oklch(0.82 0.10 195);
}

/* =====================  THEME: EDITORIAL  ===================== */
:root[data-theme="editorial"] {
  --bg: oklch(0.965 0.008 88);
  --bg-2: oklch(0.93 0.013 86);
  --surface: oklch(0.995 0.004 88);
  --surface-2: oklch(0.95 0.009 88);
  --text: oklch(0.17 0.012 60);
  --text-muted: oklch(0.42 0.014 60);
  --text-faint: oklch(0.56 0.012 60);
  --border: oklch(0.18 0.012 60);
  --border-strong: oklch(0.17 0.012 60);

  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Archivo", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 0px;
  --radius-lg: 0px;
  --shadow-sm: 3px 3px 0 var(--text);
  --shadow: 6px 6px 0 var(--text);
  --shadow-lg: 10px 10px 0 var(--text);

  --display-weight: 400;
  --display-tracking: -0.01em;
  --hero-size: clamp(3rem, 7.5vw, 6.4rem);
  --hero-leading: 1.02;
  --rule: 2px;
  --maxw: 1120px;
}

/* ============================  BASE  ============================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.35s ease, color 0.35s ease;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: inherit; }
strong { font-weight: 650; }
:root[data-theme="editorial"] strong { font-weight: 700; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.mono { font-family: var(--font-mono); }

/* section rhythm */
section { padding: clamp(56px, 8vw, 104px) 0; }
.section-band { background: var(--bg-2); }

/* eyebrow / section heading */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: var(--rule);
  background: var(--target);
}
.section-title {
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  margin-bottom: 22px;
}
.section-lead {
  font-size: 1.18rem;
  color: var(--text-muted);
  max-width: 64ch;
  margin-bottom: 8px;
}
:root[data-theme="editorial"] .section-lead { font-size: 1.28rem; }

/* ============================  NAV  ============================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklch, var(--bg) 84%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: var(--rule) solid var(--border);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 28px;
  height: 64px; display: flex; align-items: center; gap: 24px;
}
.nav-mark {
  font-family: var(--font-mono);
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em;
  display: flex; align-items: center; gap: 9px;
  white-space: nowrap;
}
.nav-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--target);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--target) 22%, transparent);
}
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a {
  font-size: 0.86rem; text-decoration: none; color: var(--text-muted);
  padding: 7px 12px; border-radius: var(--radius);
  transition: color 0.18s, background 0.18s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-cta {
  font-family: var(--font-mono); font-size: 0.78rem !important;
  border: var(--rule) solid var(--border-strong);
  color: var(--text) !important;
}
.nav-cta:hover { border-color: var(--target); background: var(--surface) !important; }
@media (max-width: 760px) { .nav-links a:not(.nav-cta) { display: none; } }

/* ============================  HERO  ============================ */
.hero { padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(40px, 6vw, 72px); }
.hero-eyebrow {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-faint);
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 26px;
}
.hero-eyebrow .pill {
  border: var(--rule) solid var(--border-strong); border-radius: 999px;
  padding: 4px 12px; color: var(--text-muted);
}
:root[data-theme="editorial"] .hero-eyebrow .pill { border-radius: 0; }
.hero h1 {
  font-size: var(--hero-size);
  line-height: var(--hero-leading);
  max-width: 18ch;
  margin-bottom: 46px;
  padding-bottom: 0.1em;
}
.hero h1 .accent { color: var(--target); }
.hero-tagline {
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  color: var(--text-muted);
  max-width: 60ch;
  line-height: 1.5;
  margin-bottom: 30px;
}
.hero-authors {
  font-size: 0.95rem; color: var(--text-muted); margin-bottom: 30px;
  display: flex; gap: 10px 22px; flex-wrap: wrap; align-items: baseline;
}
.hero-authors .anon { color: var(--text); font-weight: 600; }
.hero-authors .sep { color: var(--border-strong); }

/* link buttons */
.linkrow { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 0.85rem; font-weight: 500;
  text-decoration: none; padding: 11px 18px;
  border-radius: var(--radius); border: var(--rule) solid var(--border-strong);
  color: var(--text); background: var(--surface);
  transition: transform 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.btn .ic { width: 15px; height: 15px; opacity: 0.7; }
.btn:hover { border-color: var(--text); transform: translateY(-1px); }
.btn-primary {
  background: var(--target); border-color: var(--target); color: #fff;
}
:root[data-theme="editorial"] .btn-primary { color: var(--bg); }
.btn-primary:hover { background: var(--target-bright); border-color: var(--target-bright); }
.btn-primary .ic { opacity: 0.9; }
:root[data-theme="editorial"] .btn { box-shadow: 3px 3px 0 var(--text); }
:root[data-theme="editorial"] .btn:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--text); }

/* ---------- Hero thesis visual (prompt diff) ---------- */
.thesis {
  margin-top: clamp(44px, 6vw, 72px);
  border: var(--rule) solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.thesis-top {
  display: grid; grid-template-columns: 1fr 1fr;
}
.thesis-cell { padding: 26px 28px; }
.thesis-cell + .thesis-cell { border-left: var(--rule) solid var(--border); }
.thesis-tag {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.16em;
  text-transform: uppercase; display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 16px;
}
.thesis-tag::before { content:""; width: 8px; height: 8px; border-radius: 50%; }
.thesis-cell.benign .thesis-tag { color: var(--benign); }
.thesis-cell.benign .thesis-tag::before { background: var(--benign); }
.thesis-cell.attack .thesis-tag { color: var(--target); }
.thesis-cell.attack .thesis-tag::before { background: var(--target); }
.prompt {
  font-family: var(--font-mono); font-size: 1.05rem; line-height: 1.5;
  color: var(--text);
}
.prompt .hl {
  background: color-mix(in oklch, var(--target) 26%, transparent);
  color: var(--target-bright);
  font-weight: 700; border-radius: 3px; padding: 0 2px;
  outline: 1px solid color-mix(in oklch, var(--target) 45%, transparent);
}
.thesis-cell.benign { background: color-mix(in oklch, var(--benign) 5%, var(--surface)); }
.thesis-cell.attack { background: color-mix(in oklch, var(--target) 6%, var(--surface)); }
.thesis-foot {
  border-top: var(--rule) solid var(--border);
  padding: 20px 28px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--surface-2);
  font-size: 0.98rem; color: var(--text-muted);
}
.thesis-foot .edit-chip {
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600;
  color: var(--target); border: var(--rule) solid color-mix(in oklch, var(--target) 40%, var(--border));
  background: color-mix(in oklch, var(--target) 8%, transparent);
  padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
:root[data-theme="editorial"] .thesis-foot .edit-chip { border-radius: 0; }
.thesis-foot strong { color: var(--text); }
@media (max-width: 680px) {
  .thesis-top { grid-template-columns: 1fr; }
  .thesis-cell + .thesis-cell { border-left: none; border-top: var(--rule) solid var(--border); }
}

/* ============================  PROSE / ABSTRACT  ============================ */
.abstract-grid {
  display: grid; grid-template-columns: 200px 1fr; gap: 0 56px; align-items: start;
}
.abstract-body { font-size: 1.16rem; line-height: 1.72; max-width: 70ch; }
:root[data-theme="editorial"] .abstract-body { font-size: 1.24rem; }
.abstract-body .lead-cap::first-letter {
  font-family: var(--font-display); font-size: 3.4em; line-height: 0.8;
  float: left; padding: 6px 12px 0 0; color: var(--target); font-weight: var(--display-weight);
}
@media (max-width: 820px) {
  .abstract-grid { grid-template-columns: 1fr; gap: 18px; }
}

/* ============================  CARDS / GENERIC  ============================ */
.card {
  background: var(--surface); border: var(--rule) solid var(--border);
  border-radius: var(--radius-lg); padding: 26px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* constraint chips (threat model) */
.constraints { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 34px 0; }
@media (max-width: 820px) { .constraints { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 460px) { .constraints { grid-template-columns: 1fr; } }
.constraint {
  border: var(--rule) solid var(--border); border-radius: var(--radius);
  padding: 18px 18px 20px; background: var(--surface);
  position: relative; overflow: hidden;
}
.constraint::before {
  content:""; position:absolute; left:0; top:0; bottom:0; width: 3px; background: var(--benign);
}
.constraint .ctitle { font-weight: 650; font-size: 1.02rem; margin-bottom: 6px; }
.constraint .cmono { font-family: var(--font-mono); font-size: 0.74rem; color: var(--benign); letter-spacing: 0.02em; margin-bottom: 10px; }
.constraint .cdesc { font-size: 0.92rem; color: var(--text-muted); line-height: 1.5; }

/* admissibility list */
.admit { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.admit-row {
  display: grid; grid-template-columns: 34px 1fr; gap: 16px; align-items: start;
  padding: 16px 20px; border: var(--rule) solid var(--border);
  border-radius: var(--radius); background: var(--surface);
}
.admit-row.ok { border-color: color-mix(in oklch, var(--benign) 38%, var(--border)); background: color-mix(in oklch, var(--benign) 5%, var(--surface)); }
.admit-row.bad { border-color: color-mix(in oklch, var(--target) 30%, var(--border)); }
.admit-mark {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 0.95rem; font-family: var(--font-mono);
}
.admit-row.ok .admit-mark { background: color-mix(in oklch, var(--benign) 16%, transparent); color: var(--benign); }
.admit-row.bad .admit-mark { background: color-mix(in oklch, var(--target) 16%, transparent); color: var(--target); }
.admit-prompt { font-family: var(--font-mono); font-size: 0.98rem; color: var(--text); margin-bottom: 3px; }
.admit-prompt .hl { background: color-mix(in oklch, var(--target) 24%, transparent); color: var(--target-bright); font-weight: 700; padding: 0 2px; border-radius: 3px; }
.admit-prompt .leak { color: var(--target); font-weight: 650; }
.admit-note { font-size: 0.86rem; color: var(--text-muted); }
:root[data-theme="editorial"] .admit-mark { border-radius: 0; }

/* success criterion formula */
.criterion {
  margin-top: 36px; border: var(--rule) solid var(--border-strong);
  border-radius: var(--radius-lg); background: var(--surface-2); padding: 26px 28px;
}
.criterion .ctop { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 16px; }
.criterion-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 0.95rem; }
.crit-term { padding: 9px 14px; border-radius: var(--radius); border: var(--rule) solid var(--border); background: var(--surface); }
.crit-term b { display: block; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 3px; font-weight: 600; }
.crit-term.t1 { border-color: color-mix(in oklch,var(--benign) 40%, var(--border)); }
.crit-term.t2 { border-color: color-mix(in oklch,var(--target) 40%, var(--border)); }
.crit-term.t3 { border-color: color-mix(in oklch,var(--target) 40%, var(--border)); }
.crit-op { color: var(--text-faint); font-size: 1.3rem; }

/* ============================  METHOD PIPELINE  ============================ */
.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 8px 0 0; counter-reset: step; }
@media (max-width: 920px) { .pipeline { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px) { .pipeline { grid-template-columns: 1fr; } }
.step {
  position: relative; border: var(--rule) solid var(--border); border-radius: var(--radius-lg);
  padding: 24px 22px 26px; background: var(--surface); counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 600;
  color: var(--target); display: block; margin-bottom: 14px;
  letter-spacing: 0.05em;
}
.step h3 { font-size: 1.15rem; margin-bottom: 10px; }
.step p { font-size: 0.94rem; color: var(--text-muted); line-height: 1.55; margin: 0; }
.step .smono { font-family: var(--font-mono); font-size: 0.85em; color: var(--benign); }

/* theory callout */
.theory {
  margin-top: 26px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 0;
  border: var(--rule) solid var(--border-strong); border-radius: var(--radius-lg); overflow: hidden;
}
@media (max-width: 760px){ .theory { grid-template-columns: 1fr; } }
.theory-text { padding: 30px 32px; }
.theory-text h3 { font-size: 1.3rem; margin-bottom: 12px; }
.theory-text p { color: var(--text-muted); margin-bottom: 0; }
.theory-eq {
  padding: 30px 32px; background: var(--bg-2);
  border-left: var(--rule) solid var(--border);
  display: flex; flex-direction: column; justify-content: center; gap: 16px;
}
@media (max-width: 760px){ .theory-eq { border-left: none; border-top: var(--rule) solid var(--border); } }
.eq-block { font-family: var(--font-mono); }
.eq-label { font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px; }
.eq-math { font-size: 1.1rem; color: var(--text); line-height: 1.4; }
.eq-math .var { color: var(--target); }

/* ============================  RESULTS  ============================ */
.statstrip { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; border: var(--rule) solid var(--border-strong); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 44px; }
@media (max-width:680px){ .statstrip{ grid-template-columns:1fr; } }
.stat { padding: 30px 28px; }
.stat + .stat { border-left: var(--rule) solid var(--border); }
@media (max-width:680px){ .stat + .stat { border-left:none; border-top: var(--rule) solid var(--border);} }
.stat .num { font-family: var(--font-display); font-size: clamp(2.4rem, 4vw, 3.4rem); font-weight: var(--display-weight); color: var(--target); line-height: 1; letter-spacing: -0.02em; }
.stat .lbl { margin-top: 12px; font-size: 0.95rem; color: var(--text-muted); }

/* key finding cards */
.kf-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 740px){ .kf-grid { grid-template-columns: 1fr; } }
.kf {
  border: var(--rule) solid var(--border); border-radius: var(--radius-lg);
  padding: 26px 26px 28px; background: var(--surface); position: relative;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.kf:hover { border-color: var(--target); transform: translateY(-2px); box-shadow: var(--shadow); }
.kf-num {
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.08em;
  color: var(--target); display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
.kf-num::before { content:""; width: 18px; height: var(--rule); background: var(--target); }
.kf h3 { font-size: 1.22rem; margin-bottom: 10px; line-height: 1.2; }
.kf p { font-size: 0.96rem; color: var(--text-muted); line-height: 1.58; margin: 0; }

/* tables */
.tablewrap { border: var(--rule) solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.tablewrap.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 640px; }
caption { text-align: left; }
thead th {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-faint); font-weight: 600; text-align: right; padding: 16px 14px;
  border-bottom: var(--rule) solid var(--border-strong); white-space: nowrap;
}
thead th:first-child { text-align: left; }
tbody td { padding: 13px 14px; text-align: right; border-bottom: var(--rule) solid var(--border); font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
tbody td:first-child { text-align: left; font-family: var(--font-body); font-weight: 600; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface-2); }
td.asr { color: var(--target); font-weight: 700; }
td.high { position: relative; }
.bar {
  display: inline-block; height: 6px; border-radius: 3px; background: var(--target);
  vertical-align: middle; margin-right: 8px; opacity: 0.85;
}
.tnote { font-size: 0.84rem; color: var(--text-faint); margin-top: 14px; line-height: 1.5; }

.subhead { font-size: 0.78rem; font-family: var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); margin: 52px 0 18px; display:flex; align-items:center; gap:12px; }
.subhead::after { content:""; flex:1; height: var(--rule); background: var(--border); }

/* ============================  FIGURE PLACEHOLDERS  ============================ */
.figph {
  border: var(--rule) dashed var(--border-strong); border-radius: var(--radius-lg);
  background:
    repeating-linear-gradient(135deg, transparent, transparent 11px, color-mix(in oklch, var(--text) 4%, transparent) 11px, color-mix(in oklch, var(--text) 4%, transparent) 12px),
    var(--surface-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--text-faint); text-align: center; padding: 32px;
}
.figph .ftag { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; color: var(--text-muted); }
.figph .fdesc { font-family: var(--font-mono); font-size: 0.72rem; max-width: 46ch; line-height: 1.5; }
.figph .ficon { width: 30px; height: 30px; opacity: 0.4; }
.figcap { font-size: 0.86rem; color: var(--text-faint); margin-top: 12px; line-height: 1.5; }
.figcap b { color: var(--text-muted); font-weight: 650; }

/* real figure panel — keeps white-bg figures legible on every theme */
.figframe {
  margin: 0;
  border: var(--rule) solid var(--border);
  border-radius: var(--radius-lg);
  background: #ffffff;
  padding: clamp(18px, 3vw, 34px);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.figframe img { display: block; width: 100%; height: auto; }
:root[data-theme="technical"] .figframe { border-color: var(--border-strong); }
:root[data-theme="editorial"] .figframe { box-shadow: var(--shadow); }

/* ============================  FOOTER  ============================ */
.footer { border-top: var(--rule) solid var(--border); padding: 48px 0 64px; background: var(--bg-2); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.footer .fmark { font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-muted); }
.footer .fnote { font-size: 0.82rem; color: var(--text-faint); max-width: 50ch; margin-top: 8px; }
.footer-links { display: flex; gap: 8px; flex-wrap: wrap; }

/* utility */
.tcolor { color: var(--target); }
.bcolor { color: var(--benign); }
.divider { height: var(--rule); background: var(--border); border: none; margin: 0; }
