/* ============================================================
   MaskGuide — project page
   Marine / underwater editorial theme
   ============================================================ */

:root {
  --bg:        #dceaeb;
  --bg-2:      #cce0e2;
  --panel:     #ffffff;
  --ink:       #0b2a31;
  --ink-2:     #3c5a62;
  --muted:     #6f9098;
  --line:      #bdd6d8;
  --line-2:    #a7c8cb;
  --accent:    #0e8f9b;
  --accent-2:  #0a6e78;
  --aqua:      #22b9b6;
  --coral:     #ef6a3f;
  --coral-2:   #ff8a64;
  --hl:        #cfeef0;       /* aqua highlight */
  --good:      #f0a07f;       /* warm (strong) */
  --bad:       #bfe3ec;       /* cool (weak) */

  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:  "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --maxw: 1140px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(11,42,49,.05), 0 8px 30px rgba(11,42,49,.08);
}

[data-theme="dark"] {
  --bg:        #0b2a33;
  --bg-2:      #103942;
  --panel:     #15414b;
  --ink:       #ecf6f6;
  --ink-2:     #c5dadd;
  --muted:     #87a7ad;
  --line:      #235159;
  --line-2:    #2f626c;
  --accent:    #2bc4c0;
  --accent-2:  #5fded6;
  --aqua:      #45d6cf;
  --coral:     #ff7a59;
  --coral-2:   #ff9778;
  --hl:        #0d4a4a;
  --good:      #c4744f;
  --bad:       #2b5566;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 10px 34px rgba(0,0,0,.4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* keep anchored headings clear of the sticky nav */
section[id], div[id] { scroll-margin-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
/* figures are transparent PNGs — keep a light canvas behind them in every theme
   so their black labels/lines stay readable (esp. in dark mode) */
.teaser-panel img, .panel > img, .conv-grid img, .album-stage img, .gcard img { background: #f6fafa; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

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

/* ---------- shared type ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 22px;
}
h2.section-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2rem, 4.2vw, 3rem);
  line-height: 1.05;
  letter-spacing: -.01em;
  margin: 0 0 18px;
}
h2.section-title em { font-style: italic; color: var(--accent); }
.lead {
  font-size: 1.12rem;
  color: var(--ink-2);
  max-width: 64ch;
  margin: 0 0 8px;
}
.accent { color: var(--accent); }
.serif { font-family: var(--font-serif); }

/* ============================================================ NAV */
header.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 28px;
  display: flex; align-items: center; gap: 22px;
}
.brand {
  font-family: var(--font-serif);
  font-size: 1.32rem; font-weight: 600; letter-spacing: -.01em;
  color: var(--ink); white-space: nowrap;
}
.brand em { font-style: italic; color: var(--accent); }
.nav-links { display: flex; gap: 22px; margin-left: 8px; }
.nav-links a { font-size: .92rem; color: var(--ink-2); font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-size: .9rem; font-weight: 500;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--panel); color: var(--ink);
  cursor: pointer; transition: transform .12s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); border-color: var(--accent); color: var(--ink); }
.btn svg { width: 16px; height: 16px; }
.btn-dark { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-dark:hover { background: var(--accent-2); color: #fff; border-color: var(--accent-2); }
.icon-btn { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 50%; }

/* ============================================================ HERO */
.hero {
  padding: 84px 0 40px; position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 460px at 86% -12%, color-mix(in srgb, var(--aqua) 22%, transparent), transparent 60%),
    radial-gradient(720px 420px at -6% 8%, color-mix(in srgb, var(--coral) 12%, transparent), transparent 55%);
  pointer-events: none;
}
.accepted {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .08em;
  background: color-mix(in srgb, var(--coral) 16%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--coral) 45%, var(--line-2));
  color: var(--coral); font-weight: 600;
  padding: 7px 15px; border-radius: 999px; margin: 0 0 22px;
  transition: transform .12s ease, border-color .15s ease;
}
.accepted:hover { color: var(--coral); border-color: var(--coral); transform: translateY(-1px); }
.accepted .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 0 var(--coral); animation: pulse 2.2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--coral) 60%,transparent);} 70%{box-shadow:0 0 0 8px transparent;} 100%{box-shadow:0 0 0 0 transparent;} }

.hero h1 {
  font-family: var(--font-serif);
  font-weight: 480;
  font-size: clamp(2.9rem, 7.2vw, 5.4rem);
  line-height: .98;
  letter-spacing: -.02em;
  margin: 0 0 22px;
}
.hero h1 .l2 { display: block; font-style: italic; font-size: .52em; color: var(--accent); margin-top: 12px; }
.hero .lead { font-size: 1.18rem; max-width: 64ch; margin-bottom: 30px; }
.hero .lead strong, .hero .lead b { color: var(--ink); font-weight: 600; }

/* venue line under the authors */
.venue {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: .82rem; letter-spacing: .02em; color: var(--ink-2);
}
.venue .vk { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-right: 8px; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }

.authors { color: var(--ink-2); font-size: .98rem; }
.authors .names { font-weight: 600; color: var(--ink); line-height: 1.9; }
.authors .aff { color: var(--muted); font-size: .92rem; margin-top: 5px; }
.authors sup { color: var(--accent); font-weight: 700; }

/* hover-for-email tooltip on each author name */
.authors .aut {
  position: relative; color: var(--ink); font-weight: 600;
  border-bottom: 1px dotted var(--line-2); cursor: help;
}
.authors .aut:hover { color: var(--accent); border-color: var(--accent); }
.authors .aut::after {
  content: attr(data-email);
  position: absolute; left: 50%; bottom: calc(100% + 9px);
  transform: translateX(-50%) translateY(4px);
  background: var(--ink); color: var(--bg);
  font-family: var(--font-mono); font-size: .72rem; font-weight: 500; letter-spacing: .02em;
  padding: 6px 11px; border-radius: 7px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease;
  z-index: 20; box-shadow: var(--shadow);
}
.authors .aut::before {
  content: ""; position: absolute; left: 50%; bottom: calc(100% + 4px);
  transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--ink);
  opacity: 0; transition: opacity .15s ease; pointer-events: none; z-index: 20;
}
.authors .aut:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.authors .aut:hover::before { opacity: 1; }
.authors .emails { color: var(--muted); font-size: .9rem; margin-top: 10px; line-height: 1.7; }
.authors .emails a { color: var(--ink-2); border-bottom: 1px solid var(--line-2); }
.authors .emails a:hover { color: var(--accent); border-color: var(--accent); }

/* convergence curves */
.conv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 40px; }
.conv-grid img { width: 100%; }

/* ---------- framed panel ---------- */
.panel {
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--panel); box-shadow: var(--shadow); overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.panel-head .r { color: var(--accent); }
.panel-body { padding: 22px; }
.teaser-panel { margin-top: 44px; }
.teaser-panel img { width: 100%; background: var(--panel); }

/* ============================================================ STATS BAND */
.stats {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 80px; padding: 40px 0 48px;
}
.stats-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 30px;
}
.stats-head .sync { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--aqua); display: inline-block; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat {
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px;
  padding: 24px 24px 20px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.stat::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(var(--aqua), var(--accent));
}
.stat:nth-child(2)::before { background: linear-gradient(var(--coral), var(--coral-2)); }
.stat .num {
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(2.4rem, 5.2vw, 3.6rem); line-height: 1; letter-spacing: -.02em;
  color: var(--ink);
}
.stat .num small { font-size: .36em; font-weight: 600; color: var(--coral); font-family: var(--font-sans); letter-spacing: 0; }
.stat .lab {
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .04em;
  color: var(--muted); margin-top: 12px;
}
.stat-sub { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.chip {
  font-family: var(--font-mono); font-size: .76rem; color: var(--ink-2);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 14px;
  background: var(--panel);
}
.chip b { color: var(--accent); }

/* ============================================================ SECTIONS */
section.block { padding: 84px 0; }
section.block.tight { padding: 64px 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }

.pullquote {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem); line-height: 1.3;
  border-left: 3px solid var(--coral); padding-left: 24px; color: var(--ink);
  margin: 0;
}
.pullquote .q-accent { color: var(--accent); font-style: normal; }
.prose p { color: var(--ink-2); margin: 0 0 18px; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 600; }

.kicker {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 18px;
  display: flex; align-items: center; gap: 14px;
}
.kicker::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }

/* ---------- failure mode cards ---------- */
.fails { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 34px; }
.fail { border: 1px solid var(--line-2); border-radius: 12px; padding: 18px 18px 16px; background: var(--panel); position: relative; }
.fail::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 4px; background: var(--swatch, var(--accent)); }
.fail .bad-tag {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em;
  display: inline-block; background: var(--hl); color: var(--accent-2);
  padding: 2px 9px; border-radius: 5px; margin-bottom: 10px; margin-left: 10px;
}
.fail .fail-name { font-weight: 600; font-size: 1rem; margin-bottom: 4px; padding-left: 10px; }
.fail p { font-size: .9rem; color: var(--ink-2); margin: 0; line-height: 1.5; padding-left: 10px; }

/* ============================================================ METHOD CARDS */
.scales { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.scale { border: 1px solid var(--line-2); border-radius: 12px; padding: 16px 18px; background: var(--panel); flex: 1; min-width: 240px; }
.scale .st { font-family: var(--font-mono); font-size: .8rem; color: var(--coral); letter-spacing: .02em; }
.scale .sn { font-weight: 600; margin: 6px 0 4px; font-size: 1.02rem; }
.scale p { font-size: .9rem; color: var(--ink-2); margin: 0; line-height: 1.5; }
.scale .eq {
  display: inline-block; margin-top: 10px; font-family: var(--font-mono); font-size: .82rem;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 7px; padding: 4px 10px; color: var(--accent-2);
}

/* ---------- TIO stage flow ---------- */
.tree {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  margin-top: 34px; border: 1px solid var(--line-2); border-radius: var(--radius);
  overflow: hidden; background: var(--panel);
}
.tnode { padding: 26px 22px; position: relative; border-right: 1px solid var(--line); }
.tnode:last-child { border-right: none; }
.tnode .lv {
  font-family: var(--font-mono); font-size: .72rem; font-weight: 600; letter-spacing: .06em;
  color: #fff; background: var(--accent); padding: 4px 11px; border-radius: 999px; display: inline-block; margin-bottom: 12px;
}
.tnode .tname { font-weight: 600; font-size: 1.12rem; font-family: var(--font-serif); }
.tnode .tdesc { font-size: .9rem; color: var(--ink-2); margin-top: 7px; line-height: 1.5; }
.tnode .arrow { position: absolute; right: -11px; top: 28px; color: var(--line-2); z-index: 2; background: var(--panel); font-size: 1.1rem; }
.tnode:nth-child(1) .lv { background: #1aa6ad; }
.tnode:nth-child(2) .lv { background: #14868d; }
.tnode:nth-child(3) .lv { background: var(--coral); }
.tree-note { font-size: .9rem; color: var(--muted); margin-top: 16px; font-family: var(--font-mono); letter-spacing: .02em; }

/* ============================================================ RESULTS / TABLE */
.results-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: start; }
.lb { width: 100%; border-collapse: collapse; font-size: .95rem; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.lb thead th {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); font-weight: 500;
  text-align: right; padding: 13px 12px; border-bottom: 1px solid var(--line-2); background: var(--bg-2);
}
.lb thead th:first-child { text-align: left; }
.lb tbody td { padding: 11px 12px; text-align: right; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.lb tbody tr:last-child td { border-bottom: none; }
.lb tbody td:first-child { text-align: left; font-weight: 600; }
.lb tbody tr.ours { background: color-mix(in srgb, var(--coral) 12%, var(--panel)); }
.lb tbody tr.ours td:first-child { color: var(--coral); }
.lb tbody tr.ours td:first-child::before { content: "★ "; color: var(--coral); }
.lb .rank { color: var(--muted); font-family: var(--font-mono); font-size: .82rem; margin-right: 8px; }
.lb .cell-score {
  display: inline-block; min-width: 50px; text-align: center; padding: 3px 8px;
  border-radius: 6px; font-variant-numeric: tabular-nums; color: #123; font-weight: 600;
}
[data-theme="dark"] .lb .cell-score { color: #06222a; }
.lb .grp { color: var(--accent-2); font-weight: 600; }
.curve-cap { font-size: .9rem; color: var(--muted); margin-top: 14px; line-height: 1.5; }

/* metric legend above the results tables */
.metric-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.metric-legend .ml-title {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin-right: 4px;
}

/* dataset detail panel */
.ds-panel {
  margin-top: 44px; display: grid; grid-template-columns: 1.2fr 1.3fr; gap: 30px; align-items: center;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px 30px;
}
.ds-head .ds-tag {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--coral); display: inline-block; margin-bottom: 10px;
}
.ds-head h3 { font-family: var(--font-serif); font-weight: 600; font-size: 1.5rem; margin: 0 0 8px; line-height: 1.15; }
.ds-head p { color: var(--ink-2); font-size: .96rem; margin: 0; line-height: 1.55; }
.ds-head strong { color: var(--ink); }
.ds-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.ds {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px;
}
.ds .dn { font-family: var(--font-serif); font-weight: 500; font-size: 1.9rem; line-height: 1; color: var(--accent); letter-spacing: -.01em; }
.ds .dl { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em; color: var(--muted); margin-top: 8px; }

/* ============================================================ FINDINGS */
.findings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; }
.finding { border: 1px solid var(--line-2); border-radius: var(--radius); padding: 26px 24px; background: var(--panel); position: relative; }
.finding .fnum { font-family: var(--font-serif); font-size: 2.4rem; color: var(--coral); line-height: 1; font-weight: 500; }
.finding h3 { font-family: var(--font-serif); font-weight: 600; font-size: 1.3rem; margin: 14px 0 10px; line-height: 1.2; }
.finding p { font-size: .96rem; color: var(--ink-2); margin: 0; line-height: 1.55; }
.finding strong { color: var(--ink); }

/* ============================================================ GALLERY */
.gal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 40px; }
.gcard {
  border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden;
  background: var(--panel); cursor: zoom-in; transition: transform .15s ease, box-shadow .15s ease;
}
.gcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.gcard img { width: 100%; }
.gcard .gcap {
  padding: 12px 16px; font-size: .86rem; color: var(--ink-2);
  border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px;
}
.gcard .gcap .tag { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); white-space: nowrap; flex: none; }

/* ============================================================ FIGURE ALBUM */
.album { margin-top: 34px; }
.album-stage { position: relative; display: flex; align-items: center; justify-content: center; background: var(--bg-2); padding: 24px; min-height: 360px; }
.album-stage img { max-height: 62vh; max-width: 100%; width: auto; object-fit: contain; cursor: zoom-in; border-radius: 6px; }
.album-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--panel) 88%, transparent); color: var(--ink);
  font-size: 1.5rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: border-color .12s ease, background .12s ease;
}
.album-nav:hover { border-color: var(--accent); background: var(--panel); }
.album-nav.prev { left: 16px; } .album-nav.next { right: 16px; }
.album-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
.album-tabs button {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .02em;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink-2);
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.album-tabs button:hover { color: var(--ink); border-color: var(--accent); }
.album-tabs button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.album-cap { margin-top: 14px; }

/* ============================================================ PAPER PREVIEW */
/* centered, document-width column so a portrait page fills it at the right
   proportion instead of floating small in a wide, short box */
.pdf-panel { margin: 38px auto 0; max-width: 900px; }
.pdf-panel .panel-head { flex-wrap: wrap; }
.pdf-actions { display: inline-flex; gap: 16px; }
.pdf-actions a {
  font-family: var(--font-sans); font-size: .82rem; font-weight: 600; letter-spacing: 0;
  text-transform: none; color: var(--accent);
}
.pdf-actions a:hover { color: var(--accent-2); }
.pdf-stage { background: var(--bg-2); }
/* US-Letter page ratio (8.5 : 11) keeps the embedded page in proportion */
.pdf-frame {
  width: 100%; aspect-ratio: 8.5 / 11; height: auto;
  border: 0; display: block; background: var(--bg-2);
}
.pdf-fallback { padding: 64px 24px; text-align: center; color: var(--ink-2); }
.pdf-fallback p { margin: 0 0 16px; }

/* ============================================================ CITATION */
.cite-box { border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; background: var(--panel); margin-top: 30px; }
.cite-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.cite-box pre { margin: 0; padding: 20px 18px; overflow-x: auto; font-family: var(--font-mono); font-size: .82rem; line-height: 1.6; color: var(--ink-2); }
.copy-btn { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink-2); padding: 5px 12px; border-radius: 6px; cursor: pointer; }
.copy-btn:hover { color: var(--ink); border-color: var(--accent); }

/* ============================================================ FOOTER */
footer.foot { border-top: 1px solid var(--line); background: var(--bg-2); padding: 50px 0 60px; margin-top: 40px; }
.foot-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.foot .brand2 { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; }
.foot .brand2 em { font-style: italic; color: var(--accent); }
.foot p { color: var(--muted); font-size: .9rem; max-width: 42ch; margin: 12px 0 0; }
.foot-links { display: flex; gap: 40px; }
.foot-links .col h4 { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; font-weight: 500; }
.foot-links .col a { display: block; color: var(--ink-2); font-size: .92rem; margin-bottom: 8px; }
.foot-links .col a:hover { color: var(--accent); }
.foot-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); font-family: var(--font-mono); letter-spacing: .02em; }

/* ============================================================ LIGHTBOX */
.lightbox { position: fixed; inset: 0; z-index: 100; display: none; background: rgba(4,18,24,.9); backdrop-filter: blur(4px); align-items: center; justify-content: center; padding: 40px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 94vw; max-height: 90vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox .lb-close { position: absolute; top: 22px; right: 28px; color: #fff; font-size: 2rem; background: none; border: none; cursor: pointer; line-height: 1; }
.lightbox .lb-cap { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; color: #e7f4f4; font-family: var(--font-mono); font-size: .82rem; letter-spacing: .03em; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================ RESPONSIVE */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .two-col, .results-grid { grid-template-columns: 1fr; gap: 32px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .tree { grid-template-columns: 1fr; }
  .tnode { border-right: none; border-bottom: 1px solid var(--line); }
  .tnode:last-child { border-bottom: none; }
  .tnode .arrow { display: none; }
  .findings { grid-template-columns: 1fr; }
  .gal-grid { grid-template-columns: 1fr; }
  .conv-grid { grid-template-columns: 1fr; }
  .ds-panel { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .nav-inner { padding: 12px 18px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 56px 0 30px; }
  .nav-cta-text { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .accepted .pulse { animation: none; }
}
