/* AIBEAT Series · Editorial Research Monograph Stylesheet
 * Dual Dark (Mineral Charcoal) + Light (Gallery Alabaster) themes, zero CDN deps.
 */

:root,
:root[data-theme="dark"] {
  --bg: #090c0e;
  --bg-tinted: #0d1215;
  --surface: #11171b;
  --surface-2: #161f24;
  --surface-hover: #1b262c;
  --border: rgba(255, 255, 255, 0.085);
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #f3f7f6;
  --text-2: #a5b4b1;
  --text-3: #6c7d7a;

  --accent: #2dd4bf;
  --accent-soft: rgba(45, 212, 191, 0.10);
  --accent-border: rgba(45, 212, 191, 0.28);

  --safe: #34d399;
  --safe-soft: rgba(52, 211, 153, 0.11);
  --risk: #fb7185;
  --risk-soft: rgba(251, 113, 133, 0.11);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, 0.11);

  --m-ds: #2dd4bf;
  --m-glm: #38bdf8;
  --m-kimi: #f59e0b;

  --btn-primary-bg: #f3f7f6;
  --btn-primary-fg: #090c0e;
  --btn-primary-hover: #2dd4bf;

  --header-bg: rgba(9, 12, 14, 0.82);
  --hero-glow: radial-gradient(ellipse 75% 52% at 50% -12%, rgba(45, 212, 191, 0.12), transparent 72%);
  --shadow-float: 0 18px 40px rgba(0, 0, 0, 0.45);
  --bar-track: rgba(255, 255, 255, 0.07);
  --bar-muted: rgba(255, 255, 255, 0.28);
  --code-bg: #0a0e11;
}

:root[data-theme="light"] {
  --bg: #fafcfb;
  --bg-tinted: #f2f6f5;
  --surface: #ffffff;
  --surface-2: #f4f7f6;
  --surface-hover: #ebf1ef;
  --border: rgba(15, 23, 42, 0.09);
  --border-subtle: rgba(15, 23, 42, 0.055);
  --border-strong: rgba(15, 23, 42, 0.18);

  --text: #0d1917;
  --text-2: #475855;
  --text-3: #748683;

  --accent: #0f766e;
  --accent-soft: rgba(15, 118, 110, 0.08);
  --accent-border: rgba(15, 118, 110, 0.24);

  --safe: #059669;
  --safe-soft: rgba(5, 150, 105, 0.09);
  --risk: #e11d48;
  --risk-soft: rgba(225, 29, 72, 0.08);
  --warn: #d97706;
  --warn-soft: rgba(217, 119, 6, 0.09);

  --m-ds: #0f766e;
  --m-glm: #0284c7;
  --m-kimi: #d97706;

  --btn-primary-bg: #0d1917;
  --btn-primary-fg: #ffffff;
  --btn-primary-hover: #0f766e;

  --header-bg: rgba(250, 252, 251, 0.85);
  --hero-glow: radial-gradient(ellipse 75% 52% at 50% -12%, rgba(15, 118, 110, 0.09), transparent 72%);
  --shadow-float: 0 14px 34px rgba(15, 23, 42, 0.12);
  --bar-track: rgba(15, 23, 42, 0.07);
  --bar-muted: rgba(15, 23, 42, 0.24);
  --code-bg: #f3f6f5;
}

:root {
  --font-sans: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --shell: 1140px;
  --gutter: 28px;
  --header-h: 64px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.72;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hidden { display: none !important; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="light"] .logo-dark { display: none; }
:root[data-theme="dark"] .icon-moon { display: none; }
:root[data-theme="light"] .icon-sun { display: none; }

#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  z-index: 100;
  transition: width 60ms linear;
}

.container {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand-logo { height: 20px; width: auto; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.site-nav a {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  transition: color 0.16s, background 0.16s;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.hdr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.16s, border-color 0.16s, background 0.16s;
}
.hdr-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.hdr-icon { width: 34px; padding: 0; }

/* ---------- Editorial Hero ---------- */
.hero {
  position: relative;
  padding: 88px 0 80px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  inset: 0;
  background: var(--hero-glow);
  pointer-events: none;
}
.hero-center {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}
.eyebrow {
  display: inline-block;
  margin-bottom: 20px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.hero-title {
  font-size: clamp(2.2rem, 4.4vw, 3.55rem);
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: var(--text);
  text-wrap: balance;
}
.hero-lead {
  max-width: 660px;
  margin: 22px auto 0;
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--text-2);
}
.hero-cta {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.15s, background 0.18s, border-color 0.18s, color 0.18s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
}
.btn-primary:hover {
  background: var(--btn-primary-hover);
  color: #090c0e;
}
.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover { background: var(--surface-2); }
.btn-link {
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.16s;
}
.btn-link:hover { color: var(--accent); }

.hero-facts {
  margin: 44px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.fact { min-width: 0; }
.fact strong {
  display: block;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}
.fact span {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-3);
}

/* 3-Model Executive Portraits */
.portraits-grid {
  position: relative;
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.portrait-card {
  position: relative;
  min-width: 0;
  padding: 24px 24px 22px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.18s, transform 0.18s;
}
.portrait-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--card-accent, var(--accent));
  opacity: 0.85;
}
.portrait-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.portrait-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.portrait-name { font-size: 17px; font-weight: 650; color: var(--text); }
.portrait-org { font-size: 12.5px; color: var(--text-3); }
.portrait-verdict {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-2);
  flex: 1;
}
.portrait-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}
.pkpi { min-width: 0; }
.pkpi-label { display: block; font-size: 11.5px; color: var(--text-3); }
.pkpi-val {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}
.pkpi-val.is-safe { color: var(--safe); }
.pkpi-val.is-risk { color: var(--risk); }

/* ---------- Sections ---------- */
.section {
  padding: 96px 0;
  scroll-margin-top: 72px;
}
.section-tinted {
  background: var(--bg-tinted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-intro {
  max-width: 720px;
  margin-bottom: 52px;
}
.sec-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 12px;
}
.sec-title {
  font-size: clamp(1.65rem, 2.8vw, 2.25rem);
  font-weight: 650;
  line-height: 1.24;
  letter-spacing: -0.015em;
  color: var(--text);
  text-wrap: balance;
}
.sec-desc {
  margin-top: 14px;
  font-size: 15.5px;
  line-height: 1.78;
  color: var(--text-2);
}

/* ---------- Finding Chapters ---------- */
.finding-chapter {
  padding-top: 48px;
  border-top: 1px solid var(--border);
}
.finding-chapter:first-of-type { padding-top: 0; border-top: 0; }
.finding-chapter + .finding-chapter { margin-top: 68px; }

.chapter-head { max-width: 860px; margin-bottom: 28px; }
.chapter-tag {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
}
.tag-risk { background: var(--risk-soft); color: var(--risk); }
.tag-accent { background: var(--accent-soft); color: var(--accent); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }

.chapter-title {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  text-wrap: balance;
}
.chapter-what {
  margin-top: 12px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-2);
}
.chapter-what strong { color: var(--text); font-weight: 600; }

.finding-grid { display: grid; gap: 20px; }
.finding-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.finding-grid-wide { grid-template-columns: minmax(0, 1fr); }

.viz-card {
  min-width: 0;
  padding: 26px 28px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
.viz-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.viz-card-head h4 { font-size: 15.5px; font-weight: 600; color: var(--text); }
.viz-card-head p { margin-top: 4px; font-size: 13px; color: var(--text-3); line-height: 1.55; }

.callout-stat {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--risk-soft);
  color: var(--risk);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}
.callout-safe { background: var(--safe-soft); color: var(--safe); }

.svg-box { width: 100%; min-width: 0; }
.svg-box svg { width: 100%; height: auto; }
.svg-box svg text {
  font-family: var(--font-mono);
  fill: var(--text-3);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 3.5px;
  stroke-linejoin: round;
}
.chart-legend {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.leg-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
}
.m-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.m-ds { background: var(--m-ds); }
.m-glm { background: var(--m-glm); }
.m-kimi { background: var(--m-kimi); }

.viz-footnote {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-2);
}

/* Scene Heatmap Matrix (Finding 1 Right) */
.scene-matrix { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.scene-mhead, .scene-mrow {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 10px;
}
.scene-mhead {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
}
.scene-mhead span:not(:first-child) { text-align: center; }
.scene-mrow {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.scene-mrow:last-child { border-bottom: 0; }
.scene-info strong { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); }
.scene-info span { display: block; font-size: 11.5px; color: var(--text-3); line-height: 1.45; margin-top: 2px; }
.heat-cell {
  text-align: center;
  padding: 7px 6px;
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
}
.heat-zero { background: var(--safe-soft); color: var(--safe); }
.heat-low { background: var(--warn-soft); color: var(--warn); }
.heat-high { background: var(--risk-soft); color: var(--risk); }

/* Cyber 3-Stage Capability Comparison (Finding 2) */
.cyber-stages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.stage-col {
  min-width: 0;
  padding: 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-tinted);
}
.stage-step { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); font-weight: 600; }
.stage-name { margin-top: 4px; font-size: 15px; font-weight: 600; color: var(--text); }
.stage-sub { margin-top: 3px; font-size: 12.5px; color: var(--text-3); margin-bottom: 18px; }
.stage-bars { display: flex; flex-direction: column; gap: 14px; }
.sbar-row { min-width: 0; }
.sbar-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
}
.sbar-model { color: var(--text-2); font-weight: 500; }
.sbar-val { font-family: var(--font-mono); font-weight: 600; color: var(--text); }
.sbar-val.is-top { color: var(--accent); }
.sbar-val small { margin-left: 5px; font-weight: 400; color: var(--text-3); font-size: 11.5px; }
.sbar-track {
  height: 8px;
  border-radius: 999px;
  background: var(--bar-track);
  overflow: hidden;
}
.sbar-fill { height: 100%; border-radius: 999px; transition: width 0.3s ease; }

.insight-strip {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.insight-item strong { display: block; font-size: 20px; font-weight: 650; color: var(--text); }
.insight-item span { display: block; margin-top: 3px; font-size: 12.5px; color: var(--text-3); }

/* Guardrail 3-Layer Contrast (Finding 3 Left) */
.guard-layers { display: flex; flex-direction: column; gap: 22px; }
.glayer { padding-bottom: 18px; border-bottom: 1px solid var(--border-subtle); }
.glayer:last-child { padding-bottom: 0; border-bottom: 0; }
.glayer-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.glayer-head strong { font-size: 14px; font-weight: 600; color: var(--text); }
.glayer-head span { font-size: 12px; color: var(--text-3); }
.glayer-bars { display: flex; flex-direction: column; gap: 9px; }
.gbar-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 78px;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
}
.gbar-name { color: var(--text-2); white-space: nowrap; }
.gbar-track { height: 8px; border-radius: 999px; background: var(--bar-track); overflow: hidden; }
.gbar-fill { height: 100%; border-radius: 999px; }
.gbar-num { text-align: right; font-family: var(--font-mono); font-weight: 600; color: var(--text); }

/* ---------- Filter Pills ---------- */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.fpill {
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.16s;
}
.fpill:hover { color: var(--text); border-color: var(--border-strong); }
.fpill[aria-selected="true"] {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
  font-weight: 600;
}

/* ---------- Interactive Trajectory Replay Theater ---------- */
.replay-theater {
  margin-bottom: 48px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  overflow: hidden;
}
.replay-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-tinted);
}
.replay-case-tabs,
.replay-model-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rtab {
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}
.rtab:hover { color: var(--text); border-color: var(--border-strong); }
.rtab[aria-selected="true"] {
  background: var(--surface);
  border-color: var(--accent-border);
  color: var(--text);
  font-weight: 600;
}
.rmodel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  transition: all 0.15s;
}
.rmodel:hover { color: var(--text); border-color: var(--border-strong); }
.rmodel[aria-selected="true"] {
  background: var(--surface-2);
  border-color: var(--m-accent, var(--accent-border));
  color: var(--text);
  font-weight: 600;
}
.replay-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 26px 18px;
}
.replay-title {
  font-size: 19px;
  font-weight: 650;
  line-height: 1.4;
  color: var(--text);
}
.replay-setup {
  margin-top: 8px;
  max-width: 780px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-2);
}
.replay-meta-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.replay-cmds { font-size: 11.5px; color: var(--text-3); }

.replay-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 26px;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-2);
}
.replay-btns { display: flex; align-items: center; gap: 8px; }
.rbtn {
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  transition: all 0.15s;
}
.rbtn:hover:not(:disabled) { color: var(--text); border-color: var(--border-strong); }
.rbtn:disabled { opacity: 0.4; cursor: not-allowed; }
.rbtn-play {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.rbtn-play.is-playing {
  background: var(--accent);
  color: #090c0e;
}
.rbtn-pivot {
  border-color: rgba(251, 113, 133, 0.36);
  background: var(--risk-soft);
  color: var(--risk);
  font-weight: 600;
}
.rbtn-pivot.is-safe-btn {
  border-color: rgba(52, 211, 153, 0.36);
  background: var(--safe-soft);
  color: var(--safe);
}
.replay-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.replay-progress {
  font-size: 12px;
  color: var(--text-3);
}
.replay-timeline {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 6px;
  padding: 10px 26px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-tinted);
  scrollbar-width: thin;
}
.rstep {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  height: 29px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  color: var(--text-3);
  font-size: 12px;
  transition: all 0.15s;
}
.rstep:hover { color: var(--text); border-color: var(--border-strong); }
.rstep.is-done { color: var(--text-2); border-color: var(--border); }
.rstep.is-pivot {
  border-color: rgba(251, 113, 133, 0.45);
  color: var(--risk);
}
.rstep.is-safe-pivot {
  border-color: rgba(52, 211, 153, 0.45);
  color: var(--safe);
}
.rstep[aria-selected="true"] {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
  font-weight: 600;
}
.rstep.is-pivot[aria-selected="true"] {
  background: var(--risk-soft);
  border-color: var(--risk);
  color: var(--risk);
}
.rstep-num { font-family: var(--font-mono); font-size: 11px; opacity: 0.85; }

.replay-stage {
  padding: 20px 26px 24px;
  min-height: 280px;
}
.trace-stream {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 620px;
  overflow-y: auto;
  scroll-behavior: smooth;
}
.tcard {
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--bg-tinted);
  padding: 16px 18px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.tcard.is-focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 1px var(--accent-border);
}
.tcard.is-smoking-gun {
  border-color: rgba(251, 113, 133, 0.52);
  border-left: 4px solid var(--risk);
  background: color-mix(in srgb, var(--risk-soft) 55%, var(--bg-tinted));
}
.tcard.is-safe-pivot {
  border-color: rgba(52, 211, 153, 0.45);
  border-left: 4px solid var(--safe);
  background: color-mix(in srgb, var(--safe-soft) 50%, var(--bg-tinted));
}
.tcard-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.tcard-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.tcard-step {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
}
.tcard-role {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
}
.tcard-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.tcard-ann {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
}
.tcard-ann.ann-risk { background: var(--risk-soft); color: var(--risk); border: 1px solid rgba(251, 113, 133, 0.35); }
.tcard-ann.ann-safe { background: var(--safe-soft); color: var(--safe); border: 1px solid rgba(52, 211, 153, 0.35); }
.tcard-ann.ann-info { background: var(--surface); color: var(--text-2); border: 1px solid var(--border); }

.trace-sys {
  margin-bottom: 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--text-3);
}
.trace-sys summary {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-2);
}
.trace-sys p {
  margin-top: 8px;
  line-height: 1.65;
  color: var(--text-2);
  white-space: pre-wrap;
}
.trace-user-prompt {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border-left: 3px solid var(--accent);
  background: var(--surface);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
}
.trace-think {
  margin-top: 8px;
  margin-bottom: 10px;
  border-radius: var(--r-sm);
  border: 1px dashed var(--border-strong);
  background: var(--surface);
  padding: 9px 13px;
}
.trace-think summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  user-select: none;
}
.trace-think pre {
  margin-top: 8px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  line-height: 1.68;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 240px;
  overflow-y: auto;
}
.trace-speech {
  margin: 8px 0 10px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  font-size: 13.5px;
  line-height: 1.68;
  color: var(--text);
  white-space: pre-wrap;
}
.trace-term {
  margin-top: 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--code-bg);
  overflow: hidden;
}
.trace-term-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
}
.trace-term-bar.is-out { color: var(--text-3); }
.trace-term pre {
  margin: 0;
  padding: 11px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 250px;
  overflow-y: auto;
}
.trace-term.is-stdout pre { color: var(--text-2); max-height: 210px; }
.rmodel-dot {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 2px;
}
.rmodel-dot.is-safe { background: var(--safe-soft); color: var(--safe); }
.rmodel-dot.is-risk { background: var(--risk-soft); color: var(--risk); }

/* ---------- Technical Report Banner & External Recipes (Section 04) ---------- */
.report-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 30px;
  margin-bottom: 24px;
  border-radius: var(--r-lg);
  border: 1px solid var(--accent-border);
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--surface) 58%);
}
.report-banner-body { max-width: 680px; }
.report-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  margin-bottom: 10px;
}
.report-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.38;
  color: var(--text);
}
.report-desc {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.68;
  color: var(--text-2);
}
.report-banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.ext-recipes-panel {
  margin-top: 24px;
  margin-bottom: 24px;
  padding: 24px 26px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}
.ext-recipes-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.ext-recipes-head h3 { font-size: 17px; font-weight: 650; color: var(--text); }
.ext-recipes-head p { margin-top: 5px; font-size: 13.5px; color: var(--text-2); max-width: 720px; }
.ext-recipes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.ext-card {
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-tinted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ext-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ext-card-name { font-size: 14px; font-weight: 650; color: var(--text); }
.ext-card-dim {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-3);
}
.ext-card-what { font-size: 12.5px; line-height: 1.55; color: var(--text-2); }
.ext-card-cite {
  margin-top: auto;
  padding-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}
.ext-card-cite a { color: var(--accent); }
.ext-card-cite a:hover { text-decoration: underline; }
.stage-kicker {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 10px;
}
.stage-body {
  font-size: 15px;
  line-height: 1.78;
  color: var(--text);
  max-width: 820px;
}
.stage-quote {
  margin-top: 16px;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--bg-tinted);
  font-size: 14px;
  line-height: 1.72;
  color: var(--text-2);
}
.stage-code {
  margin-top: 16px;
  padding: 15px 18px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--code-bg);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-2);
  overflow-x: auto;
  white-space: pre-wrap;
}
.verdict-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.vsplit-card {
  min-width: 0;
  padding: 18px 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--bg-tinted);
}
.vsplit-card.is-safe { border-color: rgba(52, 211, 153, 0.35); background: var(--safe-soft); }
.vsplit-card.is-risk { border-color: rgba(251, 113, 133, 0.38); background: var(--risk-soft); }
.vsplit-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-3);
  margin-bottom: 10px;
}
.vsplit-card.is-safe .vsplit-label { color: var(--safe); }
.vsplit-card.is-risk .vsplit-label { color: var(--risk); }
.vsplit-text {
  font-size: 14px;
  line-height: 1.72;
  color: var(--text);
}
.vsplit-oracle {
  margin-top: 14px;
  padding: 9px 12px;
  border-radius: 6px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  overflow-x: auto;
}
.cases-subhead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}
.cases-subhead h3 { font-size: 17px; font-weight: 650; color: var(--text); }
.cases-subhead .filter-pills { margin-bottom: 0; }

/* ---------- Real Case Study Cards (Section 02) ---------- */
.cases-stack { display: flex; flex-direction: column; gap: 24px; }
.case-card {
  padding: 28px 30px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}
.case-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.case-dim {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}
.case-ds { font-size: 12.5px; color: var(--text-3); }
.case-title {
  font-size: 19px;
  font-weight: 650;
  line-height: 1.4;
  color: var(--text);
}
.case-setup {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.72;
  color: var(--text-2);
}
.case-models {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.case-mcol {
  min-width: 0;
  padding: 16px 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-tinted);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.case-mhead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.case-mname { font-size: 14px; font-weight: 650; color: var(--text); }
.case-badge {
  padding: 2px 9px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}
.tone-safe { background: var(--safe-soft); color: var(--safe); }
.tone-risk { background: var(--risk-soft); color: var(--risk); }
.tone-neutral { background: var(--warn-soft); color: var(--warn); }

.case-action { font-size: 13.5px; line-height: 1.68; color: var(--text-2); }
.case-quote {
  margin-top: auto;
  padding: 9px 12px;
  border-left: 2px solid var(--border-strong);
  background: var(--surface);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-2);
}
.case-takeaway {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: 13.5px;
  line-height: 1.68;
  color: var(--text);
}
.case-takeaway strong { color: var(--accent); margin-right: 6px; }

/* ---------- Complete 17-Benchmark Score Table (Section 03) ---------- */
.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}
.table-toolbar .filter-pills { margin-bottom: 0; }
.search-box {
  height: 36px;
  width: 260px;
  max-width: 100%;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13.5px;
}
.search-box::placeholder { color: var(--text-3); }
.search-box:focus { outline: none; border-color: var(--accent); }

.score-table-wrap {
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow-x: auto;
}
.score-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}
.score-table th {
  padding: 14px 18px;
  text-align: left;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.score-table th.col-m { text-align: right; width: 148px; color: var(--text); }
.score-table th.col-dir { width: 104px; text-align: center; }
.score-table td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.score-table tbody tr:last-child td { border-bottom: 0; }
.score-table tbody tr:hover { background: var(--surface-2); }

.bench-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.open-pill {
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
}
.bench-what {
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-3);
}
.dir-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-3);
  background: var(--bg-tinted);
  white-space: nowrap;
}
.score-cell { text-align: right; cursor: default; }
.sc-pct {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.score-cell.is-best .sc-pct { color: var(--accent); }
.sc-bar {
  margin: 5px 0 3px auto;
  width: 72px;
  height: 4px;
  border-radius: 999px;
  background: var(--bar-track);
  overflow: hidden;
}
.sc-fill { height: 100%; border-radius: 999px; background: var(--bar-muted); }
.score-cell.is-best .sc-fill { background: var(--accent); }
.sc-kn {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}
.table-note {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.68;
  color: var(--text-3);
}

/* ---------- Open-Source Suites & Reproduce (Section 04) ---------- */
.open-suites-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.os-card {
  min-width: 0;
  padding: 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.os-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.os-count {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}
.os-lic {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}
.os-card h3 { font-size: 15px; font-weight: 650; color: var(--text); }
.os-card p { font-size: 13px; line-height: 1.62; color: var(--text-2); flex: 1; }
.os-status { font-size: 12px; color: var(--text-3); padding-top: 10px; border-top: 1px solid var(--border-subtle); }

.repro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
  gap: 18px;
  align-items: start;
}
.code-panel {
  min-width: 0;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}
.code-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.code-title { font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.cli-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.cli-tab {
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  border: 0;
  background: transparent;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 12px;
  transition: all 0.14s;
}
.cli-tab:hover { color: var(--text); }
.cli-tab.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.copy-btn {
  height: 28px;
  padding: 0 11px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
}
.copy-btn:hover { color: var(--text); border-color: var(--border-strong); }
.copy-btn.is-copied { border-color: var(--accent-border); color: var(--accent); }

.code-pre {
  margin: 0;
  padding: 18px 20px;
  background: var(--code-bg);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.68;
  color: var(--text-2);
  overflow-x: auto;
}
.code-pre .c-comment { color: var(--text-3); }

.doc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--border-subtle);
}
.doc-links a {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-2);
  transition: all 0.15s;
}
.doc-links a:hover { color: var(--accent); border-color: var(--accent-border); }

/* ---------- Footer ---------- */
.site-footer {
  padding: 36px 0 48px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.footer-left { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.footer-logo { height: 16px; width: auto; }
.footer-copy { font-size: 13px; color: var(--text-3); }
.footer-right { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13.5px; color: var(--text-2); }
.footer-right a:hover { color: var(--accent); }

/* ---------- Floating Tooltip ---------- */
.tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  max-width: 280px;
  padding: 10px 13px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-float);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-2);
  pointer-events: none;
}
.tooltip strong { display: block; color: var(--text); margin-bottom: 4px; font-size: 13px; }
.tt-line { display: flex; justify-content: space-between; gap: 14px; font-family: var(--font-mono); font-size: 11.5px; }

/* ---------- Scenario Replay Launchers (Section 02) ---------- */
.launcher-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.launcher-intro h3 { font-size: 18px; font-weight: 650; color: var(--text); }
.launcher-intro p { margin-top: 6px; font-size: 14px; color: var(--text-2); max-width: 720px; }
.launcher-hint {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
}
.launchers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 42px;
}
.lcard {
  display: flex;
  flex-direction: column;
  padding: 22px 22px 20px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.lcard:hover {
  transform: translateY(-2px);
  border-color: var(--accent-border);
  box-shadow: var(--shadow-float);
}
.lcard-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.lcard-title {
  font-size: 17px;
  font-weight: 650;
  line-height: 1.4;
  color: var(--text);
}
.lcard-summary {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-2);
}
.lcard-models {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.lcard-mbtn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 11px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-tinted);
  color: var(--text);
  font-size: 12.5px;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.lcard-mbtn:hover {
  border-color: var(--accent-border);
  background: var(--surface-2);
}
.lcard-mleft {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  flex-shrink: 0;
}
.lcard-mact {
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lcard-mact.is-safe { background: var(--safe-soft); color: var(--safe); }
.lcard-mact.is-risk { background: var(--risk-soft); color: var(--risk); }

.lcard-launch {
  margin-top: 16px;
  width: 100%;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s, color 0.15s;
}
.lcard-launch:hover {
  background: var(--accent);
  color: #090c0e;
}

/* ---------- Fullscreen-Feel Live Agent Workspace Replay Modal ---------- */
body.modal-open { overflow: hidden; }
.tmodal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.tmodal.hidden { display: none; }
.tmodal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 11, 0.8);
  backdrop-filter: blur(8px);
}
.tmodal-shell {
  position: relative;
  z-index: 1;
  width: min(1320px, 95vw);
  height: min(860px, 90vh);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.tmodal-chrome {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  flex-shrink: 0;
}
.tmodal-chrome-left,
.tmodal-chrome-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.win-dots { display: inline-flex; gap: 6px; margin-right: 4px; }
.win-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}
.win-dots span:nth-child(1) { background: #fb7185; opacity: 0.8; }
.win-dots span:nth-child(2) { background: #f59e0b; opacity: 0.8; }
.win-dots span:nth-child(3) { background: #34d399; opacity: 0.8; }

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}
.live-pill.is-risk { border-color: rgba(251, 113, 133, 0.45); background: var(--risk-soft); color: var(--risk); }
.live-pill.is-safe { border-color: rgba(52, 211, 153, 0.45); background: var(--safe-soft); color: var(--safe); }
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.live-pill.is-playing .live-dot { animation: livePulse 1.1s ease-in-out infinite; }
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.72); }
}

.tm-case-tabs, .tm-model-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.tm-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.tm-close:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-tinted); }

.tmodal-workbench {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(300px, 0.95fr);
}
.tm-feed-pane {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--bg);
}
.tm-feed-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface);
  flex-shrink: 0;
}
.tm-title { font-size: 15.5px; font-weight: 650; color: var(--text); }
.tm-sample { font-size: 11.5px; color: var(--text-3); }

.tm-feed {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px 26px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.tm-feed .tcard { animation: slideInTurn 0.24s ease-out; }
@keyframes slideInTurn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.tm-feed::-webkit-scrollbar,
.tm-inspector::-webkit-scrollbar,
.trace-think pre::-webkit-scrollbar,
.trace-term pre::-webkit-scrollbar { width: 7px; height: 7px; }
.tm-feed::-webkit-scrollbar-thumb,
.tm-inspector::-webkit-scrollbar-thumb,
.trace-think pre::-webkit-scrollbar-thumb,
.trace-term pre::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
.tm-feed::-webkit-scrollbar-track,
.tm-inspector::-webkit-scrollbar-track,
.trace-think pre::-webkit-scrollbar-track,
.trace-term pre::-webkit-scrollbar-track { background: transparent; }

.tm-typing-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  flex-shrink: 0;
}
.tm-typing-bar.hidden { display: none; }
.typing-dots { display: inline-flex; gap: 4px; }
.typing-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: bounceDot 1s infinite ease-in-out;
}
.typing-dots i:nth-child(2) { animation-delay: 0.16s; }
.typing-dots i:nth-child(3) { animation-delay: 0.32s; }
@keyframes bounceDot {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

.live-cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  margin-left: 4px;
  vertical-align: -2px;
  background: var(--accent);
  animation: blinkCursor 0.8s step-end infinite;
}
@keyframes blinkCursor {
  50% { opacity: 0; }
}

.tm-inspector {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.insp-block {
  padding: 14px 15px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-tinted);
}
.insp-narr {
  border-color: var(--accent-border);
  background: color-mix(in srgb, var(--accent-soft) 55%, var(--bg-tinted));
}
.insp-narr.is-risk {
  border-color: rgba(251, 113, 133, 0.55);
  background: color-mix(in srgb, var(--risk-soft) 72%, var(--bg-tinted));
}
.insp-narr.is-safe {
  border-color: rgba(52, 211, 153, 0.45);
  background: color-mix(in srgb, var(--safe-soft) 65%, var(--bg-tinted));
}
.insp-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.insp-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
}
.insp-step-badge, .insp-path { font-size: 11px; color: var(--accent); }
.insp-narr-text {
  font-size: 13.5px;
  line-height: 1.68;
  color: var(--text);
  font-weight: 500;
}

.insp-files { display: flex; flex-direction: column; gap: 7px; }
.ifile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 7px;
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  font-size: 12px;
  transition: all 0.2s;
}
.ifile-row.state-tampered {
  border-color: rgba(251, 113, 133, 0.55);
  background: var(--risk-soft);
  animation: flashRisk 0.5s ease-out;
}
.ifile-row.state-written, .ifile-row.state-cleaned {
  border-color: var(--accent-border);
}
@keyframes flashRisk {
  0% { box-shadow: 0 0 0 0 rgba(251, 113, 133, 0.55); }
  100% { box-shadow: 0 0 0 8px rgba(251, 113, 133, 0); }
}
.ifile-path {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text);
  overflow-wrap: anywhere;
}
.ifile-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-tinted);
  color: var(--text-2);
}
.ifile-row.state-tampered .ifile-badge { background: rgba(251, 113, 133, 0.2); color: var(--risk); }
.ifile-row.state-cleaned .ifile-badge,
.ifile-row.state-written .ifile-badge { background: var(--accent-soft); color: var(--accent); }

.insp-gauges {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}
.igauge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 7px;
  border: 1px solid var(--border-subtle);
  background: var(--surface);
}
.igauge-lbl { font-size: 12px; color: var(--text-2); }
.igauge-val { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; color: var(--text); }
.igauge-val.tone-risk { color: var(--risk); }
.igauge-val.tone-safe { color: var(--safe); }
.insp-context-text { margin-top: 6px; font-size: 12.5px; line-height: 1.65; color: var(--text-2); }

.tmodal-dock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  flex-shrink: 0;
}
.dock-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.dock-timeline {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 2px;
}
.tdot {
  min-width: 28px;
  height: 26px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 11px;
  transition: all 0.15s;
}
.tdot:hover { color: var(--text); border-color: var(--border-strong); }
.tdot.is-done { color: var(--text-2); border-color: var(--border-strong); }
.tdot.is-pivot { border-color: rgba(251, 113, 133, 0.5); color: var(--risk); }
.tdot.is-safe-pivot { border-color: rgba(52, 211, 153, 0.5); color: var(--safe); }
.tdot[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #090c0e;
  font-weight: 700;
}
.tdot.is-pivot[aria-selected="true"] {
  background: var(--risk);
  border-color: var(--risk);
  color: #090c0e;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .portraits-grid,
  .cyber-stages,
  .case-models,
  .launchers-grid,
  .verdict-split { grid-template-columns: 1fr; }
  .finding-grid-2,
  .repro-grid { grid-template-columns: 1fr; }
  .open-suites-grid,
  .ext-recipes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tmodal-workbench { grid-template-columns: 1fr; overflow-y: auto; }
  .tm-feed-pane { border-right: none; border-bottom: 1px solid var(--border); min-height: 340px; }
}

@media (max-width: 820px) {
  .site-nav { display: none; }
  .hero-facts,
  .insight-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tmodal { padding: 8px; }
  .tmodal-shell { width: 100vw; height: 94vh; border-radius: 12px; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .brand-logo { height: 16px; }
  .hdr-gh span { display: none; }
  .hdr-gh { width: 34px; padding: 0; }
  .hero { padding: 56px 0 52px; }
  .section { padding: 64px 0; }
  .viz-card, .case-card, .report-banner, .ext-recipes-panel { padding: 20px 18px; }
  .replay-topbar, .replay-head, .replay-controls, .replay-timeline, .replay-stage { padding-left: 14px; padding-right: 14px; }
  .replay-meta-right { align-items: flex-start; }
  .open-suites-grid,
  .ext-recipes-grid { grid-template-columns: 1fr; }
  .gbar-row { grid-template-columns: 96px minmax(0, 1fr) 62px; gap: 8px; }
  .scene-mhead, .scene-mrow { grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr)); gap: 6px; }
  .heat-cell { font-size: 11.5px; padding: 6px 3px; }
}
