/* research-surface — Peptide RX app shell.
 *
 * Typography re-aligned 2026-05-02 to match the /intro marketing surface:
 * Inter as the body font, monospace reserved for code / IDs / technical
 * data (badges, hashes, sequences). Chrome (nav, footer) reads as
 * marketing-grade; the working data tables and badges keep their
 * compact instrument feel.
 */

:root {
  /* Pure black + grayscale chrome to match /intro. Lane / status accents
     are intentionally desaturated — every hue is at ~45-65% saturation
     and ~70% lightness so badges read as gentle category tags rather
     than competing brand colors. The single brand accent is white. */
  --bg: #000;
  --bg-2: #0a0a0c;
  --bg-3: #111114;
  --fg: #f3f4f6;
  --muted: #6b7280;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);

  /* Primary brand accent — used sparingly for active state, focus, the
     "current" pager page, and submit-button surfaces. */
  --accent: #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.85);

  /* Subdued category palette — all tuned to similar perceived lightness
     so they sit equally in the visual hierarchy. Use as text + 1px ring
     on dark backgrounds; never as fill. */
  --tag-metabolic: #d4a574;        /* warm sand */
  --tag-recovery:  #84cc8e;        /* sage */
  --tag-cognitive: #a78bda;        /* heather */
  --tag-longevity: #d4c574;        /* soft gold */
  --tag-sleep:     #7c9cd4;        /* dusk */
  --tag-immune:    #74c4c4;        /* seafoam */

  /* Status colors — dimmer than before so the page doesn't shout */
  --status-good:    #86efac;
  --status-warn:    #fcd34d;
  --status-bad:     #fca5a5;
  --status-info:    #cbd5e1;

  /* Legacy aliases kept so existing rules keep compiling. Mapped to the
     new restrained tokens; remove after any third-party CSS lands. */
  --accent-cyan:    #cbd5e1;
  --accent-lime:    var(--tag-recovery);
  --accent-amber:   var(--tag-metabolic);
  --accent-magenta: var(--tag-cognitive);
  --accent-red:     var(--status-bad);

  --mono: "JetBrains Mono", "Berkeley Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  background: var(--bg);
  color: var(--fg);
  margin: 0;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.005em;
}
/* Reserve monospace for technical data only */
code, pre, kbd, samp,
.mono, .hash-mini, .badge,
table.data code, .gene, .pager-page, .pager-btn {
  font-family: var(--mono);
  letter-spacing: 0;
}

/* ----- Top nav ------------------------------------------------------ */
.topnav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 36px; border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 100;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--fg); }
.brand-mark { color: var(--fg); display: inline-flex; }
.brand-name { color: var(--fg); }
.topnav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  font-weight: 400;
}
.topnav-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s ease;
}
.topnav-links a:hover { color: var(--fg); }

/* ----- Footer ------------------------------------------------------- */
.topfooter {
  border-top: 1px solid var(--line);
  padding: 24px 36px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 64px;
}
.topfooter .muted { font-size: 13px; }

main { max-width: 1180px; margin: 0 auto; padding: 36px 36px 24px; }

/* ----- Headings ----------------------------------------------------- */
h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
  line-height: 1.15;
}
h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 32px 0 12px;
  color: var(--fg);
}
h3 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 18px 0 8px;
}
.lead { font-size: 16px; color: var(--muted); line-height: 1.55; max-width: 720px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px;
  padding: 14px; text-decoration: none; color: var(--fg); display: block;
}
.card:hover { border-color: var(--accent-cyan); }
.card-head { display: flex; justify-content: space-between; align-items: center; }
.gene { font-weight: 700; }
.confidence { margin-top: 6px; }
.card-foot { margin-top: 6px; }

.activity-stream { list-style: none; padding: 0; margin: 0; }
.activity-stream li {
  padding: 6px 0; border-bottom: 1px dashed var(--line);
  display: flex; justify-content: space-between;
}
.activity-stream .kind { color: var(--accent-lime); }

.filter-bar { display: flex; gap: 10px; margin: 14px 0 22px; }
.filter-bar select, .filter-bar input, .filter-bar button {
  background: var(--bg-2); color: var(--fg); border: 1px solid var(--line);
  padding: 8px 10px; border-radius: 4px; font-family: inherit;
}
.filter-bar button { background: var(--accent-cyan); color: var(--bg); cursor: pointer; }

table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
table.data th { color: var(--muted); font-weight: 600; }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 3px;
  font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase;
  background: transparent; color: var(--fg);
  border: 1px solid var(--line-strong);
}
/* Lane badges: subdued color text + matching 1px ring. No fill. */
.badge.lane-metabolic         { color: var(--tag-metabolic); border-color: rgba(212, 165, 116, 0.45); }
.badge.lane-recovery          { color: var(--tag-recovery);  border-color: rgba(132, 204, 142, 0.45); }
.badge.lane-cognitive         { color: var(--tag-cognitive); border-color: rgba(167, 139, 218, 0.45); }
.badge.lane-longevity         { color: var(--tag-longevity); border-color: rgba(212, 197, 116, 0.45); }
.badge.lane-sleep_circadian   { color: var(--tag-sleep);     border-color: rgba(124, 156, 212, 0.45); }
.badge.lane-immune_resilience { color: var(--tag-immune);    border-color: rgba(116, 196, 196, 0.45); }
.badge.lane-unknown           { color: var(--muted); }

.badge.wada    { color: var(--status-bad);  border-color: rgba(252, 165, 165, 0.55); }
.badge.grade-A { color: var(--status-good); border-color: rgba(134, 239, 172, 0.55); }
.badge.grade-B { color: var(--accent);      border-color: var(--line-strong); }
.badge.grade-C { color: var(--status-warn); border-color: rgba(252, 211, 77, 0.45); }
.badge.grade-D, .badge.grade-X { color: var(--muted); border-color: var(--line); }

.viewer { margin: 28px 0; }

.lab-form { display: grid; gap: 12px; max-width: 520px; }
.lab-form label { display: block; }
.lab-form input, .lab-form textarea {
  width: 100%; padding: 8px; background: var(--bg-2);
  border: 1px solid var(--line); color: var(--fg); border-radius: 4px;
  font-family: inherit;
}
.lab-form .hp { display: none; }              /* honeypot */
.lab-form button {
  background: var(--accent-cyan); color: var(--bg); border: none;
  padding: 10px 18px; border-radius: 4px; cursor: pointer;
}

.button {
  display: inline-block; padding: 8px 14px; background: var(--accent-cyan);
  color: var(--bg); border-radius: 4px; text-decoration: none;
}

.finding {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px;
  padding: 14px; margin-bottom: 12px;
}
.finding header { display: flex; gap: 10px; align-items: center; }
.finding .md {
  white-space: pre-wrap; background: var(--bg-3); padding: 10px;
  border-radius: 3px; margin-top: 8px;
}

footer {
  border-top: 1px solid var(--line); padding: 18px 28px;
  display: flex; justify-content: space-between; color: var(--muted);
  font-size: 12px;
}

/* Admin */
.admin-head { margin-bottom: 18px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 22px 0; }
.kpi {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px;
  padding: 18px; display: flex; flex-direction: column; gap: 4px;
}
.kpi-num { font-size: 28px; color: var(--accent-cyan); font-weight: 700; }
.kpi-label { color: var(--muted); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }

.badge.status-pending,
.badge.status-validating { background: var(--accent-amber); color: var(--bg); }
.badge.status-queued,
.badge.status-active { background: var(--accent-cyan); color: var(--bg); }
.badge.status-rejected,
.badge.status-revoked,
.badge.status-failed { background: var(--accent-red); color: white; }
.badge.status-complete,
.badge.status-done,
.badge.status-folded { background: var(--accent-lime); color: var(--bg); }
.badge.status-suspended,
.badge.status-leased { background: var(--bg-3); color: var(--muted); }

.badge.type-literature { color: var(--accent-cyan); border-color: var(--accent-cyan); }
.badge.type-pharmacology { color: var(--accent-lime); border-color: var(--accent-lime); }
.badge.type-structural { color: var(--accent-amber); border-color: var(--accent-amber); }
.badge.type-synthesis { color: var(--accent-magenta); border-color: var(--accent-magenta); }
.badge.type-peptides,
.badge.type-translatability { color: var(--fg); border-color: var(--line); }

/* --- KPIs on homepage (clickable) --- */
a.kpi { color: var(--fg); text-decoration: none; transition: border-color 120ms; }
a.kpi:hover { border-color: var(--accent-cyan); }

/* --- Lane cards on homepage / lane page --- */
.lanes-overview .grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card.lane-card:hover { border-color: var(--accent-cyan); }

/* --- Gallery --- */
.gallery-head { margin-bottom: 18px; }
.gallery-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.lane-pill {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--fg); text-decoration: none;
  font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
}
.lane-pill:hover, .lane-pill.active { background: var(--bg-2); border-color: var(--accent-cyan); }
.lane-pill.lane-metabolic.active { border-color: var(--accent-amber); }
.lane-pill.lane-recovery.active { border-color: var(--accent-lime); }
.lane-pill.lane-cognitive.active { border-color: var(--accent-cyan); }
.lane-pill.lane-longevity.active { border-color: var(--accent-magenta); }

.gallery-grid {
  display: grid; gap: 12px;
  /* Smaller minimum column = more tiles per row, tighter "small windows" feel */
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.gallery-tile {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px;
  text-decoration: none; color: var(--fg); display: flex; flex-direction: column;
  overflow: hidden; transition: border-color 120ms, transform 120ms;
}
.gallery-tile:hover { border-color: var(--accent-cyan); transform: translateY(-2px); }
/* CRITICAL: Mol* injects an absolutely-positioned plugin host. Without
   `position: relative` + `overflow: hidden` the canvas escapes the
   thumb and fills the viewport, which then pushes every sibling tile
   below the IntersectionObserver's reach so they never initialize.
   contain:strict is a belt-and-braces lock. */
/* CRITICAL: Mol* injects an absolutely-positioned canvas. Without these
   containment rules the canvas escapes the host and a single tile can
   inflate to fill the whole page. position+overflow+contain together
   are the belt-and-suspenders lock; the > * !important rule catches
   anything Mol* tries to position outside the box. */
.gallery-tile .thumb {
  position: relative;
  width: 100%;
  height: 200px;
  background: radial-gradient(ellipse at center, #0a0d12 0%, #02040a 100%);
  overflow: hidden;
  contain: strict;
}
.gallery-tile .thumb > * {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
}
.gallery-tile .thumb canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.gallery-tile .thumb-error {
  padding: 70px 12px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

/* ----- Gallery pagination ------------------------------------------ */
.gallery-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 28px 0 32px;
  flex-wrap: wrap;
}
.gallery-pager .pager-btn {
  padding: 6px 14px;
  border-radius: 4px;
  background: var(--bg-2, #141a24);
  border: 1px solid var(--line, rgba(255,255,255,0.1));
  color: var(--fg, #e6edf3);
  text-decoration: none;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.gallery-pager .pager-btn:hover {
  border-color: var(--accent-cyan, #4dd0e1);
  background: rgba(77, 208, 225, 0.08);
}
.gallery-pager .pager-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.gallery-pager .pager-pages {
  display: flex;
  gap: 4px;
  align-items: center;
}
.gallery-pager .pager-page {
  display: inline-block;
  min-width: 28px;
  padding: 4px 8px;
  text-align: center;
  border-radius: 3px;
  text-decoration: none;
  color: var(--muted, #8a96a6);
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  transition: color 0.15s ease, background 0.15s ease;
}
.gallery-pager .pager-page:hover {
  color: var(--fg, #e6edf3);
  background: rgba(255, 255, 255, 0.04);
}
.gallery-pager .pager-page.active {
  color: var(--accent-cyan, #4dd0e1);
  background: rgba(77, 208, 225, 0.12);
  font-weight: 700;
}

/* ----- by-effect form error surface -------------------------------- */
.error-card {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.30);
  border-radius: 6px;
  padding: 14px 16px;
  margin: 16px 0;
}
.error-card h3 {
  margin: 0 0 6px;
  color: #ef4444;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.error-card pre {
  background: rgba(0, 0, 0, 0.35);
  padding: 8px 10px;
  border-radius: 3px;
  overflow-x: auto;
  font-size: 12px;
  color: var(--fg, #e6edf3);
  margin: 8px 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.gallery-tile .tile-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px; padding: 8px 10px; flex-wrap: wrap;
}
.gallery-tile .gene { font-weight: 700; font-size: 13px; }
.gallery-tile .tile-meta .badge { font-size: 10px; padding: 1px 6px; }
.gallery-tile .tile-meta .small { font-size: 10px; }

/* --- Compare --- */
.compare-form { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin: 18px 0; }
.compare-form select {
  background: var(--bg-2); color: var(--fg); border: 1px solid var(--line);
  padding: 8px; border-radius: 4px; font-family: inherit; min-width: 220px;
}
.compare-form button {
  background: var(--accent-cyan); color: var(--bg); border: 0;
  padding: 8px 18px; border-radius: 4px; cursor: pointer;
}
.compare-grid { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; margin-top: 18px; }
.compare-pane { background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 16px; min-width: 0; }
.compare-viewer {
  width: 100%;
  height: 480px;
  background: radial-gradient(ellipse at center, #0a0d12 0%, #02040a 100%);
  border-radius: 4px;
  margin-top: 8px;
  /* `position: relative; overflow: hidden;` already inherited from
     .molstar-viewer. The class chain `.molstar-viewer.compare-viewer`
     means the global containment rules also apply, so Mol* can never
     escape the pane the way it did before this fix. */
}
.compare-viewer.placeholder-3d {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted, #8a96a6);
}
.compare-info {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(20, 26, 36, 0.45);
  border-radius: 6px;
  border-left: 2px solid rgba(77, 208, 225, 0.35);
}
.compare-info h3 {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-cyan, #4dd0e1);
  font-weight: 600;
}
.compare-info p { margin: 4px 0; font-size: 13px; }
.compare-info-meta {
  list-style: none;
  margin: 8px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.compare-info-meta li {
  font-size: 12px;
  color: var(--fg, #e6edf3);
}
.compare-info-meta .muted { margin-right: 6px; }
.compare-notes {
  margin: 8px 0 0;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  font-style: italic;
  font-size: 12px;
  color: var(--fg, #e6edf3);
}

.compare-connection {
  margin: 24px 0 32px;
  padding: 20px 22px;
  background: linear-gradient(180deg, rgba(10, 13, 18, 0.6) 0%, rgba(10, 13, 18, 0.95) 100%);
  border: 1px solid rgba(192, 132, 252, 0.30);
  border-radius: 8px;
}
.compare-connection h2 {
  margin: 0 0 12px;
  color: #c084fc;
  letter-spacing: 0.04em;
  font-size: 18px;
}
.connection-summary {
  font-size: 16px;
  line-height: 1.5;
  color: var(--fg, #e6edf3);
  margin: 8px 0 12px;
}
.connection-bullets {
  list-style: none;
  margin: 12px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.connection-bullets li {
  padding: 10px 12px 10px 32px;
  background: rgba(20, 26, 36, 0.4);
  border-radius: 4px;
  position: relative;
  font-size: 14px;
  line-height: 1.45;
}
.connection-bullets li::before {
  content: "▸";
  position: absolute;
  left: 12px;
  top: 10px;
  color: #c084fc;
}
.connection-foot { margin: 12px 0 0; }

@media (max-width: 980px) {
  .compare-grid { grid-template-columns: 1fr; }
  .compare-viewer { height: 400px; }
}

/* --- Lane page --- */
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 3px;
  background: var(--bg-3); color: var(--muted); font-size: 11px;
}
.lane-targets, .lane-candidates { margin-top: 28px; }

/* --- Per-residue pLDDT heatmap --- */
.plddt-heatmap { margin: 28px 0; }
.plddt-heatmap .legend {
  display: inline-block; width: 12px; height: 12px; vertical-align: middle;
  border-radius: 2px; margin: 0 4px 0 8px;
}
.plddt-heatmap .legend.high     { background: #1c4ad9; }
.plddt-heatmap .legend.mid      { background: #4dd0e1; }
.plddt-heatmap .legend.low      { background: #ffb300; }
.plddt-heatmap .legend.verylow  { background: #ef4444; }
.plddt-bar {
  display: flex; flex-wrap: nowrap; overflow-x: auto;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px;
  padding: 4px; height: 48px; align-items: stretch; gap: 1px;
}
.plddt-bar .r { display: inline-block; min-width: 2px; flex: 1 0 2px; height: 100%; cursor: help; }
.plddt-bar .r-high     { background: #1c4ad9; }
.plddt-bar .r-mid      { background: #4dd0e1; }
.plddt-bar .r-low      { background: #ffb300; }
.plddt-bar .r-verylow  { background: #ef4444; }
.plddt-bar .r:hover    { outline: 1px solid var(--fg); }

/* --- fold-sequence form result --- */
.success {
  background: #0c2418; border: 1px solid var(--accent-lime); border-radius: 6px;
  padding: 16px; margin-top: 18px;
}
.info {
  background: #0c1c2c; border: 1px solid var(--accent-cyan); border-radius: 6px;
  padding: 16px; margin-top: 18px;
}
.error {
  color: #ff5e5e; padding: 8px 12px;
  background: rgba(239, 68, 68, 0.1); border: 1px solid var(--accent-red); border-radius: 4px;
}
.usage-note {
  margin-top: 32px; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 18px;
}
.usage-note ol { margin: 8px 0 0 18px; }

/* --- candidate library table --- */
.candidate-table .hash-mini {
  font-size: 10px; color: var(--muted);
  background: var(--bg-3); padding: 1px 5px; border-radius: 2px;
}

/* CWB tier badges — share badge structure but distinct color */
.badge.cwb { font-weight: 600; }
.badge.cwb-very_strong { background: var(--accent-lime); color: var(--bg); border-color: var(--accent-lime); }
.badge.cwb-strong      { background: var(--accent-cyan); color: var(--bg); border-color: var(--accent-cyan); }
.badge.cwb-moderate    { color: var(--accent-amber); border-color: var(--accent-amber); }
.badge.cwb-weak        { color: var(--accent-magenta); border-color: var(--accent-magenta); }
.badge.cwb-unclear     { color: var(--muted); }

/* --- timeline --- */
.timeline { list-style: none; padding: 0; margin: 18px 0; }
.timeline .event {
  display: grid;
  grid-template-columns: 160px 180px 1fr;
  gap: 12px; align-items: center;
  padding: 10px 12px;
  border-bottom: 1px dashed var(--line);
}
.timeline .event:hover { background: var(--bg-2); }
.timeline .event-kind {
  font-family: var(--mono); font-size: 12px;
  color: var(--accent-cyan); letter-spacing: 0.04em;
}
.timeline .event-fold .event-kind { color: var(--accent-lime); }
.timeline .event-finding .event-kind { color: var(--accent-magenta); }
.timeline .event-candidate .event-kind { color: var(--accent-amber); }
.timeline .event-design .event-kind { color: var(--accent-cyan); }
.timeline .event-hypothesis .event-kind { color: var(--accent-amber); }
.timeline .event-complex .event-kind { color: var(--accent-magenta); }
.timeline .event-payload { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* --- Effect-driven design --- */
.effect-head { margin-bottom: 18px; }
.lanes-fieldset { border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; }
.lanes-fieldset legend { padding: 0 6px; font-size: 12px; color: var(--muted); }
.checkrow { display: flex; flex-wrap: wrap; gap: 12px; }
.checkrow .check { display: flex; align-items: center; gap: 4px; }

.effect-runs-table .effect-cell { max-width: 480px; }
.run-head { margin-bottom: 18px; }
.run-head h1 { line-height: 1.3; }
.error-banner {
  background: rgba(239, 68, 68, 0.1); border: 1px solid var(--accent-red);
  border-radius: 4px; padding: 12px; margin: 16px 0;
}

.matched-targets .grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.matched-targets .card .rationale {
  font-style: italic; padding: 8px 0;
  border-left: 2px solid var(--accent-cyan);
  padding-left: 10px; margin: 8px 0;
}

.pda-list { list-style: none; padding: 0; }
.pda-list li {
  padding: 6px 10px; background: var(--bg-3); border-radius: 3px;
  margin: 4px 0; font-size: 11px; word-break: break-all;
}

.run-pda { margin-top: 28px; }
.run-failures { margin-top: 18px; }

#effect-progress { margin-top: 22px; }
#effect-progress .progress-card {
  background: var(--bg-2); border: 1px solid var(--accent-cyan);
  border-radius: 6px; padding: 18px;
}

/* --- Thesis Studio --- */
.studio-head { margin-bottom: 24px; }
.generate-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 12px; margin: 16px 0;
}
.generate-bar select, .generate-bar input {
  background: var(--bg-3); color: var(--fg); border: 1px solid var(--line);
  padding: 6px 10px; border-radius: 4px; font-family: inherit;
}
.generate-bar button {
  background: var(--accent-cyan); color: var(--bg); border: 0;
  padding: 6px 16px; border-radius: 4px; cursor: pointer;
}

.studio-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  margin-top: 18px;
}
.idea-card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 14px; display: flex; flex-direction: column;
  transition: border-color 120ms;
}
.idea-card:hover { border-color: var(--accent-cyan); }
.idea-card-head { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.idea-card h3 { font-size: 16px; margin: 4px 0 6px; }
.idea-card h3 a { color: var(--fg); text-decoration: none; }
.idea-card h3 a:hover { color: var(--accent-cyan); }
.idea-card .headline { font-size: 13px; color: var(--accent-cyan); margin: 0 0 8px; }
.idea-card .effect-snip { font-size: 12px; line-height: 1.5; }
.idea-card-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 10px;
}
.designed-tag {
  margin-top: 8px; padding: 4px 8px; background: var(--bg-3);
  color: var(--accent-lime); font-size: 11px; border-radius: 3px;
}

.button.button-sm {
  padding: 4px 10px; font-size: 12px;
}
.button.secondary {
  background: var(--bg-3); color: var(--fg); border: 1px solid var(--line);
}
.button.secondary:hover { border-color: var(--accent-cyan); }

.idea-head { margin-bottom: 24px; }
.idea-head h1 { font-size: 26px; line-height: 1.3; }
.idea-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 8px; }
.idea-effect, .idea-rationale, .idea-novelty, .idea-value,
.idea-design-params, .idea-refs, .idea-runs, .idea-forks {
  margin: 24px 0;
}
.idea-rationale .md, .idea-value .md, .idea-refs .md {
  white-space: pre-wrap; background: var(--bg-2); padding: 12px;
  border-radius: 4px; font-size: 13px;
}

.research-banner {
  background: rgba(255, 179, 0, 0.12); border: 1px solid var(--accent-amber);
  border-left: 4px solid var(--accent-amber);
  color: var(--accent-amber); padding: 10px 14px; border-radius: 4px;
  margin-bottom: 16px; font-size: 13px;
}
.wada-banner {
  background: rgba(239, 68, 68, 0.18); border: 1px solid var(--accent-red);
  border-left: 4px solid var(--accent-red);
  color: var(--accent-red); padding: 10px 14px; border-radius: 4px;
  margin-bottom: 16px; font-size: 13px;
}

.sequence {
  font-family: var(--mono); font-size: 14px;
  background: var(--bg-2); border: 1px solid var(--line);
  padding: 14px; border-radius: 4px; word-break: break-all;
  white-space: pre-wrap; line-height: 1.6;
  letter-spacing: 0.05em;
}
.copy-btn {
  margin-top: 6px; background: var(--accent-cyan); color: var(--bg);
  border: 0; padding: 4px 12px; border-radius: 3px; cursor: pointer;
  font-size: 12px;
}
.props-table th { white-space: nowrap; padding-right: 16px; color: var(--muted); }
.props-table { max-width: 720px; }
.qc-list li, .notes-section li { margin-bottom: 4px; }
.pda-hash {
  font-family: var(--mono); font-size: 11px;
  background: var(--bg-2); border: 1px solid var(--line);
  padding: 10px; border-radius: 3px; word-break: break-all;
}
.pack-head { margin-bottom: 18px; }
.disclaimers-section ul { margin-left: 20px; }
.disclaimers-section li { margin-bottom: 8px; }
.pack-proof-overview,
.pack-context-grid {
  display: grid;
  gap: 18px;
  margin: 22px 0;
}
.pack-proof-overview {
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: stretch;
}
.pack-proof-score,
.pack-context-grid article {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
  padding: 18px;
}
.pack-proof-score strong {
  display: block;
  font-family: var(--mono);
  font-size: 48px;
  line-height: 1;
}
.pack-proof-score span {
  color: var(--muted);
  font-size: 12px;
}
.pack-spine {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.pack-spine li,
.gate-grid div,
.risk-flag-grid div,
.evidence-list div {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.016);
  padding: 12px;
}
.pack-spine li.present {
  border-color: rgba(134, 239, 172, 0.32);
}
.pack-spine li.missing,
.gate-grid div.pending,
.risk-flag-grid div.flagged {
  border-color: rgba(252, 211, 77, 0.28);
}
.pack-spine span,
.pack-spine em,
.gate-grid span,
.gate-grid em,
.risk-flag-grid span,
.evidence-list span,
.pack-mini-dl dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.pack-spine strong,
.gate-grid strong,
.risk-flag-grid strong,
.evidence-list strong {
  display: block;
  margin: 5px 0 2px;
}
.pack-context-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.pack-context-grid article h2 {
  margin-top: 0;
  font-size: 24px;
}
.pack-mini-dl {
  margin: 12px 0;
}
.pack-mini-dl div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.pack-mini-dl dd {
  margin: 0;
  text-align: right;
}
.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip-cloud span {
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 5px 8px;
  font-size: 12px;
}
.gate-grid,
.risk-flag-grid,
.evidence-list {
  display: grid;
  gap: 8px;
}
.gate-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.risk-flag-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.pack-limit-list {
  color: var(--muted);
  padding-left: 18px;
}
.pack-limit-list li {
  margin-bottom: 6px;
}
#effect-progress .progress-card h3 { margin-top: 0; }
#effect-progress .progress-card ul { list-style: none; padding-left: 0; }
#effect-progress .progress-card li { padding: 4px 0; }

/* --- Free tier banner / note --- */
.free-tier-note {
  background: linear-gradient(135deg, rgba(77, 208, 225, 0.08), rgba(198, 255, 0, 0.08));
  border: 1px solid var(--accent-cyan);
  border-left: 4px solid var(--accent-cyan);
  border-radius: 4px;
  padding: 10px 14px;
  margin: 14px 0;
  font-size: 13px;
}
.free-tier-note strong { color: var(--accent-cyan); }
.free-tier-note details summary {
  cursor: pointer; padding: 4px 0; color: var(--muted);
}
.free-tier-note details summary:hover { color: var(--fg); }

/* ============================================================ */
/* Visual upgrade: hero protein + target structure boxes        */
/* ============================================================ */

.hero-with-protein {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding: 32px 24px;
  flex-wrap: wrap;
}
.hero-with-protein .hero-text {
  flex: 1 1 420px;
  min-width: 320px;
}
.hero-with-protein .hero-protein {
  flex: 0 0 auto;
  animation: hero-pulse 4s ease-in-out infinite;
}
@keyframes hero-pulse {
  0%, 100% { box-shadow: 0 0 60px rgba(77, 208, 225, 0.25); }
  50%      { box-shadow: 0 0 90px rgba(198, 255, 0, 0.35); }
}
@media (max-width: 900px) {
  .hero-with-protein { flex-direction: column-reverse; gap: 24px; }
  .hero-with-protein .hero-protein { width: 320px !important; height: 320px !important; }
}

/* ----- Cognitive showcase: 4 spinning protein orbs ------------------- */
.cognitive-showcase {
  margin: 56px 0 32px;
  padding: 28px 16px;
  border-top: 1px solid rgba(192, 132, 252, 0.18);
  border-bottom: 1px solid rgba(192, 132, 252, 0.18);
}
.cognitive-showcase h2 {
  color: #c084fc;
  letter-spacing: 0.04em;
}
.cognitive-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 24px 0 16px;
}
.cognitive-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fg);
  transition: transform 0.2s ease;
}
.cognitive-tile:hover { transform: translateY(-4px); }
.cognitive-orb {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
              #0a0d12 0%, #02040a 100%);
  box-shadow: 0 0 40px rgba(192, 132, 252, 0.25),
              inset 0 0 20px rgba(192, 132, 252, 0.10);
  border: 1px solid rgba(192, 132, 252, 0.30);
  overflow: hidden;
  animation: cognitive-pulse 5s ease-in-out infinite;
}
.cognitive-orb:nth-child(2n)  { animation-delay: 1.2s; }
.cognitive-orb:nth-child(3n)  { animation-delay: 2.4s; }
@keyframes cognitive-pulse {
  0%, 100% { box-shadow: 0 0 40px rgba(192, 132, 252, 0.25); }
  50%      { box-shadow: 0 0 65px rgba(77, 208, 225, 0.32); }
}
.cognitive-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.cognitive-meta .gene {
  color: #c084fc;
  font-size: 14px;
  letter-spacing: 0.05em;
}
.cognitive-cta {
  text-align: center;
  margin-top: 18px;
}
@media (max-width: 1100px) {
  .cognitive-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .cognitive-grid { grid-template-columns: 1fr; }
  .cognitive-orb { width: 240px; height: 240px; }
}

/* ----- Live run progress (effect_run_detail.html) ------------------ */
.run-progress {
  margin: 24px 0 32px;
  padding: 20px 22px;
  background: linear-gradient(180deg, rgba(10, 13, 18, 0.6) 0%, rgba(10, 13, 18, 0.95) 100%);
  border: 1px solid rgba(77, 208, 225, 0.18);
  border-radius: 8px;
}
.progress-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.progress-steps .step {
  position: relative;
  padding: 12px 14px;
  border-radius: 6px;
  background: rgba(20, 26, 36, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.progress-steps .step .step-icon {
  grid-row: 1 / span 2;
  font-size: 22px;
  width: 28px;
  text-align: center;
  color: var(--muted, #8a96a6);
}
.progress-steps .step .step-label {
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fg, #e6edf3);
}
.progress-steps .step .step-detail {
  grid-column: 2;
}
.progress-steps .step.active {
  border-color: rgba(77, 208, 225, 0.55);
  background: rgba(13, 24, 32, 0.95);
  box-shadow: 0 0 22px rgba(77, 208, 225, 0.10);
}
.progress-steps .step.active .step-icon {
  color: #4dd0e1;
  animation: step-spin 1.6s linear infinite;
  display: inline-block;
}
.progress-steps .step.done {
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(14, 28, 18, 0.85);
}
.progress-steps .step.done .step-icon {
  color: #4ade80;
  animation: none;
}
@keyframes step-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.progress-elapsed {
  margin: 14px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.elapsed-clock {
  color: var(--fg, #e6edf3);
  font-weight: 600;
}
@media (max-width: 800px) {
  .progress-steps { grid-template-columns: 1fr; }
}

/* ----- Selectivity panel (run-candidates table) -------------------- */
.badge.sel {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  font-weight: 600;
}
.badge.sel.sel-very_low   { color: #ef4444; background: rgba(239, 68, 68, 0.10); }
.badge.sel.sel-low        { color: #fb923c; background: rgba(251, 146, 60, 0.10); }
.badge.sel.sel-moderate   { color: #fde047; background: rgba(253, 224, 71, 0.10); }
.badge.sel.sel-high       { color: #4dd0e1; background: rgba(77, 208, 225, 0.10); }
.badge.sel.sel-very_high  { color: #4ade80; background: rgba(74, 222, 128, 0.12); }

tr.selectivity-row > td {
  padding-top: 0;
  background: rgba(8, 12, 18, 0.6);
}
.selectivity-details {
  border-left: 2px solid rgba(77, 208, 225, 0.25);
  padding: 10px 14px;
  margin: 4px 0 12px;
}
.selectivity-details summary {
  cursor: pointer;
  list-style: none;
  padding: 4px 0;
  user-select: none;
}
.selectivity-details summary::-webkit-details-marker { display: none; }
.selectivity-details summary::before {
  content: "▸ ";
  color: var(--muted, #8a96a6);
  display: inline-block;
  transition: transform 0.15s ease;
}
.selectivity-details[open] summary::before { content: "▾ "; }
.selectivity-bars {
  display: grid;
  gap: 6px;
  margin: 12px 0 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}
.sel-bar-row {
  display: grid;
  grid-template-columns: 180px 1fr 60px;
  align-items: center;
  gap: 12px;
}
.sel-name { color: var(--fg, #e6edf3); }
.sel-bar {
  position: relative;
  height: 14px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  overflow: hidden;
}
.sel-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: linear-gradient(90deg, #4dd0e1 0%, #c084fc 100%);
  transition: width 0.4s ease;
}
.sel-fill-target {
  background: linear-gradient(90deg, #4ade80 0%, #4dd0e1 100%);
}
.sel-num {
  text-align: right;
  color: var(--fg, #e6edf3);
  font-weight: 600;
}
.sel-bar-target {
  padding: 4px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}
.sel-bar-skipped .sel-bar { background: rgba(239, 68, 68, 0.05); }
.selectivity-foot {
  margin: 8px 0 0;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
@media (max-width: 700px) {
  .sel-bar-row { grid-template-columns: 100px 1fr 50px; }
}

/* ----- SHAP per-residue heatmap ------------------------------------ */
.shap-details {
  border-left: 2px solid rgba(192, 132, 252, 0.30);
  padding: 10px 14px;
  margin: 6px 0 12px;
}
.shap-details summary {
  cursor: pointer;
  list-style: none;
  padding: 4px 0;
  user-select: none;
}
.shap-details summary::-webkit-details-marker { display: none; }
.shap-details summary::before {
  content: "▸ ";
  color: var(--muted, #8a96a6);
}
.shap-details[open] summary::before { content: "▾ "; }
.shap-heatmap {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 12px 0 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.shap-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 38px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: help;
  transition: transform 0.12s ease;
}
.shap-cell:hover { transform: translateY(-2px); }
.shap-residue {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1;
}
.shap-pos {
  font-size: 9px;
  color: rgba(241, 245, 249, 0.55);
  margin-top: 2px;
}
.shap-cell-very_high { background: #ef4444; border-color: #ef4444; }
.shap-cell-high      { background: #fb923c; border-color: #fb923c; }
.shap-cell-moderate  { background: #fde047; border-color: #fde047; }
.shap-cell-moderate .shap-residue,
.shap-cell-moderate .shap-pos { color: #1a1f2c; }
.shap-cell-low       { background: rgba(74, 222, 128, 0.30); border-color: rgba(74, 222, 128, 0.55); }
.shap-cell-neutral   { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.10); }
.shap-cell-neutral .shap-residue,
.shap-cell-neutral .shap-pos { color: rgba(241, 245, 249, 0.40); }
.shap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 4px 0 0;
}
.shap-legend-cell {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 4px;
}

/* ----- Counterfactual ΔΔG regressor preview row ------------------- */
tr.regressor-row > td {
  padding-top: 0;
  background: rgba(8, 12, 18, 0.35);
}
.regressor-line {
  display: inline-block;
  padding: 4px 10px;
  border-left: 2px solid rgba(74, 222, 128, 0.45);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.regressor-residual {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
}
.regressor-residual.good { color: #4ade80; background: rgba(74, 222, 128, 0.10); }
.regressor-residual.okay { color: #fde047; background: rgba(253, 224, 71, 0.10); }
.regressor-residual.bad  { color: #ef4444; background: rgba(239, 68, 68, 0.10); }

/* ----- Candidate detail page (/candidates/{code_id}) --------------- */
.cand-head {
  margin: 24px 0 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cand-head h1 {
  margin: 8px 0 12px;
  font-size: 32px;
  letter-spacing: 0.02em;
}
.cand-head h1 code {
  background: none;
  padding: 0;
  color: var(--accent-cyan, #4dd0e1);
}
.cand-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.cand-badges .badge { font-size: 11px; }
.cand-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 16px 0 32px;
}
.cand-col { display: flex; flex-direction: column; gap: 18px; }
.cand-card {
  background: linear-gradient(180deg, rgba(10, 13, 18, 0.6) 0%, rgba(10, 13, 18, 0.95) 100%);
  border: 1px solid rgba(77, 208, 225, 0.15);
  border-radius: 8px;
  padding: 18px 20px;
}
.cand-card h2 {
  margin: 0 0 12px;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-cyan, #4dd0e1);
}
.cand-card table.data.inline {
  margin: 0;
  width: 100%;
}
.cand-card table.data.inline th {
  text-align: left;
  width: 40%;
  font-weight: 500;
  color: var(--muted, #8a96a6);
  padding: 4px 0;
}
.cand-card table.data.inline td { padding: 4px 0; }
.cand-viewer {
  width: 100%;
  height: 360px;
  border-radius: 6px;
  background: radial-gradient(ellipse at center, #0a0d12 0%, #02040a 100%);
  border: 1px solid rgba(77, 208, 225, 0.18);
  margin: 0 0 10px;
}
.cand-viewer.placeholder-3d {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted, #8a96a6);
  font-size: 13px;
}
.redaction-notice {
  margin: 12px 0 0;
  padding: 10px 12px;
  background: rgba(239, 68, 68, 0.06);
  border-left: 2px solid rgba(239, 68, 68, 0.45);
  border-radius: 3px;
  font-size: 12px;
  color: var(--fg, #e6edf3);
}
.redaction-notice code {
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 2px;
  font-size: 11px;
}
@media (max-width: 1000px) {
  .cand-grid { grid-template-columns: 1fr; }
}

.cand-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.share-widget {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.share-widget .button.secondary {
  font-size: 12px;
  padding: 6px 12px;
}
.share-confirm {
  color: #4ade80;
  font-weight: 600;
}

/* ----- Fold detail page (2-column: viewer + sidebar) -------------- */
.fold-head {
  margin: 24px 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.fold-head h1 {
  margin: 8px 0 6px;
  font-size: 28px;
}
.fold-report {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
  gap: 18px;
  margin: 18px 0 26px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, rgba(77, 208, 225, 0.08), transparent 42%),
    rgba(10, 13, 18, 0.72);
  border-radius: 8px;
}
.fold-report .eyebrow {
  margin: 0 0 8px;
  color: var(--accent-cyan, #4dd0e1);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.fold-report h2 {
  max-width: 800px;
  margin: 0 0 10px;
  font-size: 26px;
  line-height: 1.08;
}
.report-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.report-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--muted, #8a96a6);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
}
.fold-report-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  overflow: hidden;
}
.report-metric {
  min-height: 120px;
  padding: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
}
.report-metric:first-child { border-left: 0; }
.report-metric .metric-label {
  display: block;
  color: var(--muted, #8a96a6);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.report-metric strong {
  display: block;
  margin: 14px 0 6px;
  color: var(--fg, #f8fafc);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 28px;
  line-height: 1;
}
.report-metric span:last-child {
  color: var(--muted, #8a96a6);
  font-size: 12px;
}
.fold-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 22px;
  margin: 8px 0 32px;
  align-items: flex-start;
}
.fold-col { display: flex; flex-direction: column; gap: 18px; }
.fold-card {
  background: linear-gradient(180deg, rgba(10, 13, 18, 0.6) 0%, rgba(10, 13, 18, 0.95) 100%);
  border: 1px solid rgba(77, 208, 225, 0.15);
  border-radius: 8px;
  padding: 16px 18px;
}
.fold-card h2 {
  margin: 0 0 12px;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-cyan, #4dd0e1);
}
.fold-viewer-card { padding: 16px; }
.fold-viewer {
  width: 100%;
  height: 520px;
  border-radius: 6px;
  background: radial-gradient(ellipse at center, #0a0d12 0%, #02040a 100%);
  border: 1px solid rgba(77, 208, 225, 0.18);
}
.fold-viewer.placeholder-3d {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted, #8a96a6);
  font-size: 14px;
}
.viewer-cap { margin: 8px 0 0; text-align: center; }
.fold-card table.data.inline {
  margin: 0;
  width: 100%;
  font-size: 13px;
}
.fold-card table.data.inline th {
  text-align: left;
  width: 40%;
  font-weight: 500;
  color: var(--muted, #8a96a6);
  padding: 4px 0;
}
.fold-card table.data.inline td { padding: 4px 0; }
.fold-card table.data.inline.compact th,
.fold-card table.data.inline.compact td { padding: 3px 4px; font-size: 12px; }
.finding-mini {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.finding-mini:last-child { border-bottom: none; }
.finding-mini-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.finding-mini strong {
  display: block;
  font-size: 13px;
  margin: 2px 0;
}
.finding-mini p { margin: 4px 0 0; }

@media (max-width: 1000px) {
  .fold-grid { grid-template-columns: 1fr; }
  .fold-viewer { height: 380px; }
}

/* ----- AlphaFold metrics card (Clarity-style PAE + pLDDT) -------- */
.alphafold-metrics-card h2 {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.alphafold-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 14px 0 10px;
}
.af-metric-pane {
  background: rgba(20, 26, 36, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 12px;
}
.af-metric-pane h3 {
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted, #8a96a6);
  margin: 0 0 10px;
  font-weight: 600;
}
.af-pae-img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  border-radius: 3px;
  image-rendering: -webkit-optimize-contrast;
}
.af-img-fail {
  padding: 30px 10px;
  background: rgba(239, 68, 68, 0.06);
  border: 1px dashed rgba(239, 68, 68, 0.3);
  color: var(--muted, #8a96a6);
  text-align: center;
  font-size: 12px;
  border-radius: 3px;
}
.af-lddt-chart {
  width: 100%;
  height: 180px;
  background: #fff;
  border-radius: 3px;
  display: block;
}
.af-lddt-fill {
  fill: rgba(77, 208, 225, 0.18);
  stroke: none;
}
.af-lddt-line {
  fill: none;
  stroke: #0d6e7e;
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
}
.af-lddt-ref {
  stroke: rgba(0, 0, 0, 0.15);
  stroke-width: 0.4;
  stroke-dasharray: 2 2;
  vector-effect: non-scaling-stroke;
}
.confidence-band-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 8px;
}
.confidence-band {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
}
.confidence-band span,
.confidence-band em {
  display: block;
  color: var(--muted, #8a96a6);
  font-size: 11px;
  font-style: normal;
}
.confidence-band strong {
  display: block;
  margin: 4px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 20px;
}
.band-track {
  height: 4px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}
.band-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-cyan, #4dd0e1);
}
.band-very_high .band-track i { background: #1c4ad9; }
.band-confident .band-track i { background: #4dd0e1; }
.band-low .band-track i { background: #ffb300; }
.band-very_low .band-track i { background: #ef4444; }
.af-context-row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  margin: 14px 0 8px;
}
.af-context-row > div,
.biology-context-block {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
}
.af-context-row p,
.biology-context-block p {
  margin: 0;
}
.context-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.context-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  color: var(--fg, #f3f4f6);
  background: rgba(255, 255, 255, 0.035);
  font-size: 11px;
  line-height: 1.35;
}
.biology-context-block {
  margin-top: 10px;
}
.metric-empty {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
}
.metric-empty strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 24px;
}
.metric-empty span { color: var(--muted, #8a96a6); }
.context-card h3 {
  margin: 0 0 6px;
  color: var(--muted, #8a96a6);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.context-card p { margin: 0; }
.context-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 16px;
}
.context-grid > div {
  min-height: 86px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
}
.annotation-list {
  display: grid;
  gap: 10px;
}
.annotation-list article {
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.side-note { margin: 12px 0 0; }
@media (max-width: 1100px) {
  .alphafold-metrics-grid { grid-template-columns: 1fr; }
  .af-context-row { grid-template-columns: 1fr; }
  .confidence-band-grid,
  .context-grid,
  .fold-report,
  .fold-report-metrics {
    grid-template-columns: 1fr;
  }
  .report-metric,
  .report-metric:first-child {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
  }
  .report-metric:first-child { border-top: 0; }
}

/* ----- Build proof + Research OS demo surfaces --------------------- */
.proof-hero,
.demo-hero {
  min-height: 360px;
  display: grid;
  align-content: center;
  padding: 56px 0 38px;
  border-bottom: 1px solid var(--line);
}
.proof-hero h1,
.demo-hero h1 {
  max-width: 880px;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.06em;
  margin: 0 0 22px;
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.proof-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.proof-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.proof-strip div {
  min-height: 106px;
  padding: 18px;
  border-left: 1px solid var(--line);
}
.proof-strip div:first-child { border-left: 0; }
.proof-strip strong {
  display: block;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 30px;
  line-height: 1;
}
.proof-strip span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.proof-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  margin: 34px 0;
}
.proof-panel {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}
.proof-panel h2,
.proof-section h2,
.demo-proof-grid h2 {
  margin-top: 0;
}
.proof-dl {
  display: grid;
  gap: 0;
  margin: 0;
}
.proof-dl div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.proof-dl div:first-child { border-top: 0; }
.proof-dl dt {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.proof-dl dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.proof-section {
  margin: 48px 0;
}
.section-head-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 18px;
}
.section-head-row > .muted {
  max-width: 420px;
}
.proof-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.proof-module {
  display: grid;
  grid-template-columns: minmax(180px, 0.78fr) minmax(0, 1fr);
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.018);
}
.proof-shot {
  display: block;
  position: relative;
  min-height: 230px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), transparent 42%),
    #08080a;
}
.proof-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.proof-shot-fallback {
  height: 100%;
  min-height: 230px;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  color: var(--fg);
}
.proof-shot-fallback span {
  font-size: 24px;
  letter-spacing: -0.03em;
}
.proof-shot-fallback small {
  color: var(--muted);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.proof-module-copy {
  padding: 16px;
  min-width: 0;
}
.module-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.module-title-row h3,
.module-title-row h2 {
  margin: 0;
}
.proof-module-copy p {
  margin: 10px 0 0;
}
.module-url {
  display: grid;
  gap: 4px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.status-dot {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.status-ready { color: var(--status-good); border-color: rgba(134, 239, 172, 0.45); }
.status-partial { color: var(--status-warn); border-color: rgba(252, 211, 77, 0.42); }
.commit-list {
  display: grid;
  border-top: 1px solid var(--line);
}
.commit-list article {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 170px;
  gap: 18px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.commit-list em {
  color: var(--muted);
  font-style: normal;
  font-family: var(--mono);
  font-size: 11px;
}
.proof-disclaimer {
  margin: 44px 0 24px;
  max-width: 760px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.demo-spine {
  display: grid;
  gap: 12px;
  margin: 32px 0 42px;
}
.demo-step {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.demo-step-index {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.demo-step-main h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
}
.demo-step-main p {
  max-width: 720px;
}
.demo-proof-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 18px;
  margin: 40px 0;
}
.demo-proof-grid article {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}
@media (max-width: 980px) {
  .proof-strip,
  .proof-two-col,
  .proof-module-grid,
  .proof-module,
  .demo-step,
  .demo-proof-grid {
    grid-template-columns: 1fr;
  }
  .proof-strip div,
  .proof-strip div:first-child {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .proof-strip div:first-child { border-top: 0; }
  .section-head-row {
    display: grid;
    align-items: start;
  }
  .commit-list article {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Target cards on by-effect with embedded mini Mol* viewer */
.target-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(180deg, rgba(10, 13, 18, 0.6) 0%, rgba(10, 13, 18, 0.95) 100%);
  border: 1px solid rgba(77, 208, 225, 0.15);
  border-radius: 8px;
  padding: 14px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.target-card:hover {
  border-color: rgba(198, 255, 0, 0.45);
  transform: translateY(-2px);
}
.target-card .gene {
  font-weight: 700;
  font-size: 18px;
  color: var(--fg);
}
.target-mini-viewer {
  position: relative;
  overflow: hidden;
}
.target-mini-viewer::after {
  content: "drag to rotate · scroll to zoom";
  position: absolute;
  bottom: 6px;
  right: 8px;
  font-size: 10px;
  color: rgba(138, 150, 166, 0.6);
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: 3px;
  pointer-events: none;
}

/* Lane badges — vivid colors per use_case_lane */
.badge.lane {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid currentColor;
}
.badge.lane.lane-metabolic         { color: #fb923c; background: rgba(251, 146, 60, 0.12); }
.badge.lane.lane-recovery          { color: #4ade80; background: rgba(74, 222, 128, 0.12); }
.badge.lane.lane-cognitive         { color: #c084fc; background: rgba(192, 132, 252, 0.12); }
.badge.lane.lane-longevity         { color: #fde047; background: rgba(253, 224, 71, 0.12); }
.badge.lane.lane-sleep_circadian   { color: #60a5fa; background: rgba(96, 165, 250, 0.12); }
.badge.lane.lane-immune_resilience { color: #2dd4bf; background: rgba(45, 212, 191, 0.12); }

/* Mol* viewer container — generic frame */
.molstar-viewer {
  position: relative;
  border: 1px solid rgba(77, 208, 225, 0.15);
  overflow: hidden;
}
/* Same containment rule as .thumb — keeps Mol* from escaping the host
   element. Applies to every viewer site-wide, not just the gallery. */
.molstar-viewer > * {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
}
.molstar-viewer canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.molstar-viewer.placeholder-3d {
  background:
    radial-gradient(circle at 30% 30%, rgba(77, 208, 225, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(198, 255, 0, 0.05) 0%, transparent 60%),
    #0a0d12 !important;
}

/* Claim Graph ------------------------------------------------------- */
.claim-hero,
.claim-detail-hero {
  padding: 96px 32px 38px;
  max-width: 1280px;
  margin: 0 auto;
}
.claim-hero h1,
.claim-detail-hero h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(46px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.055em;
}
.claim-stat-band {
  max-width: 1280px;
  margin: 22px auto 0;
  padding: 0 32px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.claim-stat-band div {
  padding: 22px 20px 20px 0;
  border-right: 1px solid var(--line);
}
.claim-stat-band div:last-child {
  border-right: 0;
}
.claim-stat-band strong {
  display: block;
  font-family: var(--mono);
  font-size: 34px;
  line-height: 1;
}
.claim-stat-band span,
.claim-receipt-strip span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.claim-filter-row {
  max-width: 1280px;
  margin: 20px auto 0;
  padding: 0 32px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.claim-filter-row a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.claim-filter-row a:hover,
.claim-filter-row a.active {
  color: var(--fg);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.claim-graph-shell {
  max-width: 1280px;
  margin: 28px auto 0;
  padding: 0 32px;
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(310px, 0.9fr);
  gap: 22px;
  align-items: stretch;
}
.claim-graph-canvas,
.claim-proof-panel,
.claim-detail-main,
.claim-detail-side,
.claim-relations > div,
.claim-hash-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    var(--bg-2);
}
.claim-graph-canvas {
  min-height: 720px;
  overflow: hidden;
  position: relative;
}
.claim-graph-canvas svg {
  width: 100%;
  min-height: 720px;
  display: block;
}
.claim-canvas-label {
  position: absolute;
  top: 18px;
  left: 22px;
  right: 22px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  z-index: 1;
}
.claim-canvas-label p {
  margin: 0;
}
.claim-canvas-label span {
  color: var(--muted);
  font-size: 12px;
  max-width: 380px;
  text-align: right;
}
.claim-edge {
  fill: none;
  stroke: rgba(255, 255, 255, 0.24);
  stroke-width: 1;
}
#claim-arrow path {
  fill: rgba(255, 255, 255, 0.32);
}
.claim-svg-node rect {
  fill: #0b0d10;
  stroke: rgba(255, 255, 255, 0.16);
  transition: stroke 0.18s ease, transform 0.18s ease;
}
.claim-svg-node:hover rect {
  stroke: rgba(255, 255, 255, 0.56);
}
.claim-svg-node text {
  pointer-events: none;
}
.claim-svg-node .node-type {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.claim-svg-node .node-index {
  fill: rgba(255, 255, 255, 0.9);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.claim-svg-node .node-label {
  fill: var(--fg);
  font-size: 13px;
  font-weight: 650;
}
.claim-svg-node circle {
  fill: var(--status-info);
}
.node-candidate circle,
.node-candidate rect {
  stroke: rgba(134, 239, 172, 0.42);
}
.node-finding circle,
.node-finding rect {
  stroke: rgba(252, 211, 77, 0.4);
}
.node-export circle,
.node-export rect {
  stroke: rgba(203, 213, 225, 0.42);
}
.claim-proof-panel {
  padding: 24px;
}
.claim-proof-panel h2,
.claim-detail-main h2 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.05;
}
.claim-proof-dl,
.proof-dl {
  display: grid;
  gap: 10px;
}
.claim-proof-dl div,
.claim-metrics-table dl div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.claim-proof-dl dt,
.claim-metrics-table dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.claim-proof-dl dd,
.claim-metrics-table dd {
  margin: 0;
  text-align: right;
}
.claim-spine-list {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}
.claim-spine-list a,
.claim-spine-rows a {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  color: var(--fg);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.018);
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.claim-spine-list a:hover,
.claim-spine-rows a:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.claim-spine-list span {
  font-family: var(--mono);
  color: var(--muted);
}
.claim-spine-list strong,
.claim-spine-rows strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.claim-spine-list em,
.claim-spine-rows span,
.claim-spine-rows em {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}
.claim-risk-box {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid rgba(252, 211, 77, 0.2);
  background: rgba(252, 211, 77, 0.035);
}
.claim-risk-box h3 {
  margin: 0 0 10px;
}
.claim-risk-box ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.claim-debt-box {
  border-color: rgba(148, 163, 184, 0.26);
  background:
    linear-gradient(135deg, rgba(148, 163, 184, 0.055), rgba(252, 211, 77, 0.022)),
    rgba(255, 255, 255, 0.016);
}
.claim-debt-box p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.debt-box-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.debt-box-head h3 {
  margin: 4px 0 0;
  font-size: 18px;
}
.debt-box-head strong {
  min-width: 56px;
  padding: 8px 10px;
  border: 1px solid rgba(252, 211, 77, 0.26);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 18px;
  text-align: center;
  background: rgba(252, 211, 77, 0.04);
}
.debt-pill-list {
  display: grid;
  gap: 8px;
}
.debt-pill {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 4px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.debt-pill span {
  grid-row: 1 / span 2;
  align-self: start;
  padding-top: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.debt-pill strong {
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.25;
}
.debt-pill em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}
.debt-pill.severity-high {
  border-color: rgba(248, 113, 113, 0.28);
}
.debt-pill.severity-medium {
  border-color: rgba(252, 211, 77, 0.26);
}
.debt-pill.severity-low {
  border-color: rgba(134, 239, 172, 0.18);
}
.claim-proof-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.claim-spine-table,
.claim-node-inventory,
.claim-detail-grid,
.claim-relations {
  max-width: 1280px;
  margin: 40px auto 0;
  padding: 0 32px;
}
.claim-node-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.claim-node-row {
  display: grid;
  gap: 5px;
  min-height: 98px;
  padding: 14px;
  border: 1px solid var(--line);
  color: var(--fg);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.018);
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.claim-node-row:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.claim-node-row span,
.claim-node-row em {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.claim-node-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.claim-spine-rows {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.claim-spine-rows a {
  grid-template-columns: minmax(0, 1fr) auto;
}
.claim-spine-rows em {
  grid-column: 2;
}
.claim-spine-rows a.complete {
  border-color: rgba(134, 239, 172, 0.32);
}
.claim-empty {
  padding: 48px;
}
.claim-detail-hero {
  padding-bottom: 18px;
}
.claim-receipt-strip {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.claim-receipt-strip span {
  padding: 10px 12px;
  border: 1px solid var(--line);
}
.claim-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.75fr);
  gap: 22px;
}
.claim-detail-main,
.claim-detail-side {
  padding: 24px;
}
.claim-detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 22px 0;
}
.claim-proof-visuals {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.7fr);
  gap: 18px;
  margin: 24px 0;
}
.claim-vertical-spine,
.claim-radar-card,
.claim-af-visual,
.claim-ledger-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.012)),
    var(--bg-2);
}
.claim-vertical-spine,
.claim-radar-card {
  padding: 18px;
}
.claim-vertical-spine ol {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.claim-vertical-spine li {
  position: relative;
  padding-left: 28px;
}
.claim-vertical-spine li::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 23px;
  bottom: -14px;
  width: 1px;
  background: linear-gradient(180deg, var(--line-strong), transparent);
}
.claim-vertical-spine li:last-child::before {
  display: none;
}
.claim-vertical-spine a {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px 14px;
  align-items: center;
  min-height: 62px;
  padding: 12px;
  color: var(--fg);
  text-decoration: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.claim-vertical-spine a:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.claim-vertical-spine .spine-index {
  grid-row: 1 / span 4;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}
.claim-vertical-spine i {
  grid-column: 2;
  display: block;
  height: 4px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.claim-vertical-spine i::after {
  content: "";
  display: block;
  width: var(--score);
  height: 100%;
  background: linear-gradient(90deg, var(--status-warn), var(--status-good));
}
.claim-vertical-spine strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}
.claim-vertical-spine em,
.claim-vertical-spine b,
.radar-axis-list span,
.claim-af-notes,
.claim-ledger-card span,
.proof-debt-matrix span,
.proof-debt-matrix em {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.claim-vertical-spine b {
  color: var(--status-warn);
}
.claim-vertical-spine li.active a {
  border-color: rgba(255, 255, 255, 0.4);
}
.claim-vertical-spine li.warn a {
  border-color: rgba(252, 211, 77, 0.22);
}
.radar-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 8px;
}
.radar-header strong {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 44px;
  line-height: 0.9;
}
.radar-header span,
.radar-pressure span,
.radar-pressure strong {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.radar-pressure {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.radar-pressure strong {
  color: var(--status-warn);
}
.proof-radar {
  width: 100%;
  min-height: 300px;
  display: block;
}
.radar-debt-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 3;
}
.radar-debt-ring {
  fill: none;
  stroke: var(--status-warn);
  stroke-linecap: round;
  stroke-width: 3;
  opacity: 0.75;
  transform: rotate(-90deg);
  transform-origin: 50px 50px;
}
.radar-ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 0.6;
}
.radar-axis {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 0.5;
}
.radar-signal {
  stroke-linecap: round;
  stroke-width: 3.2;
  vector-effect: non-scaling-stroke;
}
.radar-node {
  stroke: var(--bg);
  stroke-width: 0.8;
}
.radar-good { stroke: var(--status-good); fill: var(--status-good); }
.radar-mid { stroke: var(--status-info); fill: var(--status-info); }
.radar-watch { stroke: var(--status-warn); fill: var(--status-warn); }
.radar-bad { stroke: var(--status-bad); fill: var(--status-bad); }
.proof-radar text {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 3.2px;
  letter-spacing: 0.08em;
  text-anchor: middle;
  text-transform: uppercase;
}
.radar-fill {
  fill: rgba(134, 239, 172, 0.1);
  stroke: none;
}
.radar-line {
  fill: none;
  stroke: var(--status-good);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}
.radar-core {
  fill: var(--bg-2);
  stroke: var(--line-strong);
  stroke-width: 0.8;
}
.proof-radar .radar-core-score {
  fill: var(--fg);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0;
}
.radar-axis-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}
.radar-axis-list article {
  display: grid;
  gap: 7px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.radar-axis-list article > div {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 10px;
  align-items: baseline;
}
.radar-axis-list b,
.radar-axis-list small {
  color: var(--fg);
  font-family: var(--mono);
}
.radar-axis-list article > div span,
.radar-axis-list article > div em,
.radar-axis-list small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.radar-axis-list i {
  display: block;
  height: 5px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.radar-axis-list u {
  display: block;
  height: 100%;
  text-decoration: none;
}
.radar-axis-list article.radar-good u { background: var(--status-good); }
.radar-axis-list article.radar-mid u { background: var(--status-info); }
.radar-axis-list article.radar-watch u { background: var(--status-warn); }
.radar-axis-list article.radar-bad u { background: var(--status-bad); }
.claim-metrics-table dl {
  margin: 0;
}
.claim-completeness,
.claim-context-panel {
  margin: 20px 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
  padding: 18px;
}
.claim-completeness {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
}
.claim-completeness strong {
  display: block;
  font-family: var(--mono);
  font-size: 38px;
  line-height: 1;
}
.claim-completeness > div > span {
  color: var(--muted);
  font-size: 12px;
}
.claim-completeness ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.claim-completeness li {
  border: 1px solid var(--line);
  padding: 10px;
}
.claim-completeness li.present {
  border-color: rgba(134, 239, 172, 0.3);
}
.claim-completeness li.missing {
  border-color: rgba(252, 211, 77, 0.3);
}
.claim-completeness li span,
.manifest-dl dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.claim-completeness li strong {
  margin-top: 5px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.2;
}
.claim-context-panel h3 {
  margin: 0 0 12px;
  font-size: 24px;
}
.claim-context-panel dl,
.manifest-dl {
  margin: 0 0 12px;
}
.claim-context-panel dl div,
.manifest-dl div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.claim-context-panel dd,
.manifest-dl dd {
  margin: 0;
  text-align: right;
}
.claim-context-panel ul,
.inline-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}
.inline-list {
  list-style: none;
  padding-left: 0;
  text-align: right;
}
.inline-list li {
  margin: 2px 0;
}
.claim-af-visual {
  margin: 22px 0;
  padding: 18px;
}
.claim-af-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 14px;
}
.claim-af-header h3 {
  margin: 0;
  font-size: 24px;
}
.claim-af-header > strong {
  font-family: var(--mono);
  font-size: 34px;
  line-height: 1;
}
.claim-af-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.78fr);
  gap: 14px;
}
.claim-af-chart,
.claim-af-side {
  min-height: 220px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}
.claim-af-chart {
  padding: 14px;
}
.claim-af-chart svg {
  width: 100%;
  height: 190px;
  display: block;
  background:
    linear-gradient(180deg, rgba(134, 239, 172, 0.06), transparent 24%),
    linear-gradient(180deg, transparent 60%, rgba(252, 211, 77, 0.055));
}
.af-fill {
  fill: rgba(203, 213, 225, 0.12);
  stroke: none;
}
.af-line {
  fill: none;
  stroke: var(--fg);
  stroke-width: 1.35;
  vector-effect: non-scaling-stroke;
}
.af-ref {
  stroke: rgba(255, 255, 255, 0.18);
  stroke-dasharray: 2 3;
  vector-effect: non-scaling-stroke;
}
.claim-af-chart p {
  margin-bottom: 0;
}
.af-summary-only {
  display: grid;
  align-content: center;
  gap: 12px;
  height: 100%;
}
.af-summary-only span {
  position: relative;
  display: block;
  height: 12px;
  background: rgba(255, 255, 255, 0.07);
}
.af-summary-only span::after {
  content: "";
  display: block;
  width: var(--mean);
  height: 100%;
  background: linear-gradient(90deg, var(--status-warn), var(--status-good));
}
.af-summary-only strong {
  font-family: var(--mono);
  font-size: 42px;
  line-height: 1;
}
.af-summary-only em {
  color: var(--muted);
  font-style: normal;
}
.claim-af-side img,
.pae-fallback {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}
.pae-fallback {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.claim-af-bands {
  margin-top: 14px;
}
.claim-af-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.claim-af-notes p,
.claim-af-notes ul {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}
.claim-hash-card {
  padding: 18px;
  overflow-wrap: anywhere;
}
.claim-hash-card code {
  display: block;
  margin: 10px 0;
  color: var(--fg);
}
.claim-ledger-card {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 18px;
}
.claim-ledger-card div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 4px 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.claim-ledger-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.claim-ledger-card code {
  grid-column: 2;
  color: var(--fg);
  font-size: 11px;
}
.detail-spine {
  margin-top: 18px;
}
.detail-spine a.active {
  border-color: rgba(255, 255, 255, 0.44);
}
.manifest-link {
  display: block;
  color: var(--fg);
  border-top: 1px solid var(--line);
  padding: 9px 0;
  text-decoration: none;
}
.claim-weakness {
  max-width: 1280px;
  margin: 40px auto 0;
  padding: 0 32px;
}
.claim-weakness h2 {
  margin-top: 0;
  font-size: 30px;
}
.proof-debt-matrix {
  display: grid;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.014);
}
.proof-debt-matrix .debt-head,
.proof-debt-matrix article {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) 110px 110px 140px minmax(220px, 1fr);
  gap: 14px;
  align-items: center;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
}
.proof-debt-matrix .debt-head {
  border-top: 0;
  background: rgba(255, 255, 255, 0.025);
}
.proof-debt-matrix article.severity-high {
  border-left: 2px solid var(--status-warn);
}
.proof-debt-matrix article.severity-medium {
  border-left: 2px solid var(--status-info);
}
.proof-debt-matrix article.severity-low {
  border-left: 2px solid rgba(134, 239, 172, 0.55);
}
.proof-debt-matrix strong {
  display: block;
}
.claim-weakness-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.claim-weakness-grid article {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
  padding: 14px;
}
.claim-weakness-grid article.severity-high {
  border-color: rgba(252, 211, 77, 0.34);
}
.claim-weakness-grid span,
.claim-weakness-grid em {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.claim-weakness-grid strong {
  display: block;
  margin: 7px 0;
}
.claim-relations {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.claim-relations > div {
  padding: 22px;
}
.claim-relations article {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.claim-relations article strong,
.claim-relations article span,
.claim-relations article em {
  display: block;
}
.claim-relations article span,
.claim-relations article em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  overflow-wrap: anywhere;
}

/* Learning Loop ----------------------------------------------------- */
.loop-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 96px 32px 38px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.55fr);
  gap: 34px;
  align-items: end;
}
.loop-hero h1 {
  max-width: 900px;
  margin: 0 0 18px;
  font-size: clamp(44px, 6.4vw, 88px);
  line-height: 0.96;
  letter-spacing: -0.055em;
}
.loop-status-note {
  max-width: 720px;
  color: var(--muted);
}
.loop-score-card,
.loop-panel,
.loop-orbit-panel,
.loop-stage-panel {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    var(--bg-2);
}
.loop-score-card {
  position: relative;
  min-height: 330px;
  padding: 24px;
  overflow: hidden;
}
.loop-score-card > *:not(.loop-score-ring) {
  position: relative;
  z-index: 1;
}
.loop-score-card strong {
  display: block;
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 68px;
  line-height: 0.9;
}
.loop-score-card span {
  display: block;
  margin-top: 10px;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.loop-score-card p {
  max-width: 210px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.loop-score-ring {
  position: absolute;
  right: -82px;
  bottom: -88px;
  width: 220px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    conic-gradient(rgba(134, 239, 172, 0.75) var(--score), rgba(255, 255, 255, 0.06) 0);
  opacity: 0.72;
}
.loop-score-ring i {
  position: absolute;
  inset: 24px;
  border-radius: inherit;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.loop-stat-band {
  max-width: 1280px;
  margin: 22px auto 0;
  padding: 0 32px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.loop-stat-band div {
  padding: 22px 20px 20px 0;
  border-right: 1px solid var(--line);
}
.loop-stat-band div:last-child {
  border-right: 0;
}
.loop-stat-band strong {
  display: block;
  font-family: var(--mono);
  font-size: 32px;
  line-height: 1;
}
.loop-stat-band span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.loop-machine,
.loop-grid,
.loop-disclaimer {
  max-width: 1280px;
  margin: 38px auto 0;
  padding: 0 32px;
}
.loop-machine {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.75fr);
  gap: 22px;
}
.loop-orbit-panel {
  min-height: 560px;
  padding: 22px;
}
.loop-orbit {
  position: relative;
  min-height: 500px;
  margin-top: 16px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.035), transparent 48%),
    rgba(255, 255, 255, 0.012);
  overflow: hidden;
}
.loop-orbit::before,
.loop-orbit::after {
  content: "";
  position: absolute;
  inset: 72px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}
.loop-orbit::after {
  inset: 136px;
}
.loop-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 164px;
  min-height: 96px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}
.loop-core strong {
  display: block;
  font-size: 18px;
}
.loop-core span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.loop-stage {
  position: absolute;
  width: 176px;
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--line);
  color: var(--fg);
  text-decoration: none;
  background: rgba(10, 10, 12, 0.92);
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.loop-stage:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.loop-stage span,
.loop-stage em {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.loop-stage strong {
  display: block;
  margin: 7px 0 4px;
}
.stage-capture { left: 7%; top: 11%; }
.stage-structure { right: 8%; top: 12%; }
.stage-evidence { right: 5%; top: 42%; }
.stage-debt { right: 21%; bottom: 8%; }
.stage-feedback { left: 20%; bottom: 8%; }
.stage-retrieval { left: 5%; top: 42%; }
.loop-stage.state-active,
.loop-stage-row.state-active {
  border-color: rgba(134, 239, 172, 0.32);
}
.loop-stage.state-next-build,
.loop-stage-row.state-next-build {
  border-color: rgba(252, 211, 77, 0.24);
}
.loop-stage-panel {
  padding: 18px;
}
.loop-stage-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.loop-stage-row:first-child {
  border-top: 0;
}
.loop-stage-row span,
.loop-stage-row em {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.loop-stage-row strong {
  display: block;
}
.loop-stage-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.loop-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.85fr);
  gap: 22px;
}
.loop-grid-bottom {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
}
.loop-panel {
  padding: 22px;
}
.loop-panel h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.05;
}
.loop-action-list,
.loop-debt-list,
.loop-agent-grid,
.loop-event-ledger {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.loop-action,
.loop-debt,
.loop-agent-card,
.loop-event {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}
.loop-action,
.loop-debt,
.loop-agent-card {
  display: grid;
  color: var(--fg);
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.loop-action:hover,
.loop-debt:hover,
.loop-agent-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.loop-action {
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 5px 14px;
  padding: 14px;
}
.loop-action span,
.loop-action em,
.loop-debt span,
.loop-debt em,
.loop-debt small,
.loop-agent-card span,
.loop-agent-card em,
.loop-agent-card small,
.loop-event span,
.loop-event em {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.loop-action span {
  grid-row: 1 / span 3;
  align-self: start;
  color: var(--fg);
}
.loop-action p {
  grid-column: 2;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.loop-action.priority-high {
  border-left: 2px solid var(--status-warn);
}
.loop-action.priority-medium {
  border-left: 2px solid var(--status-info);
}
.loop-action.priority-low {
  border-left: 2px solid rgba(134, 239, 172, 0.48);
}
.loop-debt {
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 4px 12px;
  padding: 12px;
}
.loop-debt span {
  grid-row: 1 / span 3;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--fg);
}
.loop-debt small {
  grid-column: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loop-debt.severity-high {
  border-color: rgba(252, 211, 77, 0.34);
}
.loop-debt.severity-medium {
  border-color: rgba(203, 213, 225, 0.26);
}
.loop-agent-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.loop-agent-card {
  min-height: 180px;
  padding: 16px;
}
.loop-agent-card strong {
  margin: 12px 0 8px;
  font-family: var(--mono);
  font-size: 42px;
  line-height: 1;
}
.loop-agent-card p {
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
}
.loop-event {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 96px;
  gap: 12px;
  align-items: center;
  padding: 12px;
}
.loop-event strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loop-event.tone-good {
  border-left: 2px solid rgba(134, 239, 172, 0.55);
}
.loop-event.tone-bad {
  border-left: 2px solid var(--status-warn);
}
.loop-event.tone-info {
  border-left: 2px solid var(--status-info);
}
.loop-disclaimer {
  margin-bottom: 48px;
}

/* Launch Pack -------------------------------------------------------- */
.launch-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 96px 32px 46px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 46px;
  align-items: end;
}
.launch-hero h1 {
  max-width: 900px;
  margin: 0 0 20px;
  font-size: clamp(46px, 7vw, 96px);
  line-height: 0.94;
  letter-spacing: -0.055em;
}
.launch-receipt-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
    #070708;
  padding: 24px;
}
.launch-receipt-card > strong {
  display: block;
  margin: 10px 0 4px;
  font-family: var(--mono);
  font-size: 42px;
  line-height: 1;
}
.launch-receipt-card > span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.launch-receipt-card dl {
  margin: 22px 0 0;
  display: grid;
  gap: 10px;
}
.launch-receipt-card dl div,
.launch-stat-band div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.launch-receipt-card dt,
.launch-receipt-card dd {
  margin: 0;
}
.launch-receipt-card dt,
.launch-stat-band span,
.launch-deliverable > span,
.launch-flow li span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.launch-receipt-card dd {
  font-family: var(--mono);
}
.launch-stat-band {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.launch-stat-band div {
  display: block;
  border-top: 0;
  border-right: 1px solid var(--line);
  padding: 20px 16px 18px 0;
}
.launch-stat-band div:last-child {
  border-right: 0;
}
.launch-stat-band strong {
  display: block;
  font-family: var(--mono);
  font-size: 34px;
  line-height: 1;
}
.launch-five,
.launch-copy,
.launch-truth,
.launch-flow {
  max-width: 1280px;
  margin: 44px auto 0;
  padding: 0 32px;
}
.launch-deliverable-list {
  border-top: 1px solid var(--line);
}
.launch-deliverable {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 150px;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.launch-deliverable h3 {
  margin: 0 0 4px;
  font-size: 30px;
  line-height: 1.02;
}
.launch-deliverable strong,
.launch-deliverable em {
  display: block;
  font-style: normal;
}
.launch-deliverable strong {
  margin-bottom: 8px;
}
.launch-deliverable p {
  max-width: 780px;
  margin: 0 0 8px;
  color: var(--muted);
}
.launch-deliverable em {
  color: var(--status-info);
}
.launch-links {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.launch-links a {
  min-width: 62px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  color: var(--fg);
  text-align: center;
  text-decoration: none;
}
.launch-links a:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.launch-flow {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 34px;
  align-items: start;
}
.launch-flow h2,
.launch-copy h2,
.launch-truth h2 {
  margin-top: 0;
  font-size: 34px;
  line-height: 1.06;
}
.launch-flow ol {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
}
.launch-flow li {
  min-height: 118px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
  padding: 14px;
  display: grid;
  align-content: space-between;
}
.launch-flow li strong {
  display: block;
  font-size: 18px;
}
.launch-copy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.launch-copy-grid article {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
  padding: 18px;
}
.launch-copy-grid pre {
  margin: 0;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.launch-truth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.launch-truth article {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
  padding: 22px;
}
.launch-truth ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.launch-url-list {
  display: grid;
  gap: 10px;
}
.launch-url-list a {
  padding: 12px;
  border: 1px solid var(--line);
  color: var(--fg);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.build-launch-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.build-launch-strip a {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 14px;
  border: 1px solid var(--line);
  color: var(--fg);
  text-decoration: none;
}
.build-launch-strip a:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.build-launch-strip span,
.build-launch-strip em {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@media (max-width: 920px) {
  .claim-stat-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .claim-graph-shell,
  .claim-detail-grid,
  .claim-relations,
  .claim-proof-visuals,
  .claim-completeness,
  .claim-weakness-grid,
  .claim-af-grid,
  .claim-af-notes,
  .pack-proof-overview,
  .pack-context-grid,
  .loop-hero,
  .loop-machine,
  .loop-grid,
  .loop-grid-bottom,
  .launch-hero,
  .launch-flow,
  .launch-truth,
  .launch-copy-grid {
    grid-template-columns: 1fr;
  }
  .launch-stat-band,
  .build-launch-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .launch-deliverable {
    grid-template-columns: 42px minmax(0, 1fr);
  }
  .launch-links {
    grid-column: 2;
    justify-content: flex-start;
  }
  .launch-flow ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .loop-stat-band {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .loop-orbit {
    min-height: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
  }
  .loop-orbit::before,
  .loop-orbit::after,
  .loop-core {
    display: none;
  }
  .loop-stage {
    position: static;
    width: auto;
  }
  .claim-graph-canvas,
  .claim-graph-canvas svg {
    min-height: 720px;
  }
  .claim-node-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .claim-completeness ol,
  .pack-spine,
  .gate-grid,
  .risk-flag-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .proof-debt-matrix .debt-head {
    display: none;
  }
  .proof-debt-matrix article {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 620px) {
  .claim-hero,
  .claim-detail-hero,
  .loop-hero,
  .claim-stat-band,
  .loop-stat-band,
  .claim-filter-row,
  .claim-graph-shell,
  .claim-spine-table,
  .claim-node-inventory,
  .claim-detail-grid,
  .claim-relations,
  .claim-weakness,
  .loop-machine,
  .loop-grid,
  .loop-disclaimer,
  .launch-hero,
  .launch-stat-band,
  .launch-five,
  .launch-copy,
  .launch-truth,
  .launch-flow {
    padding-left: 16px;
    padding-right: 16px;
  }
  .claim-stat-band,
  .loop-stat-band,
  .launch-stat-band,
  .build-launch-strip,
  .launch-flow ol {
    grid-template-columns: 1fr;
  }
  .claim-stat-band div,
  .loop-stat-band div,
  .launch-stat-band div {
    border-right: 0;
  }
  .claim-canvas-label {
    position: static;
    display: block;
    padding: 18px 18px 0;
  }
  .claim-canvas-label span {
    display: block;
    text-align: left;
    margin-top: 4px;
  }
  .claim-node-grid {
    grid-template-columns: 1fr;
  }
  .claim-completeness ol,
  .pack-spine,
  .gate-grid,
  .risk-flag-grid,
  .loop-agent-grid,
  .loop-orbit {
    grid-template-columns: 1fr;
  }
  .loop-event,
  .loop-stage-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
