/* ============================================================
   Trivy Supply Chain Attack — Interactive Walkthrough
   GitHub-dark UI. Pure CSS, no external assets.
   ============================================================ */

:root {
  --bg: #0d1117;
  --bg-hero: #010409;
  --panel: #161b22;
  --panel-2: #1c2128;
  --border: #30363d;
  --border-strong: #444c56;
  --accent: #58a6ff;
  --green: #3fb950;
  --red: #f85149;
  --orange: #d29922;
  --purple: #a371f7;
  --pink: #db61a2;
  --text: #c9d1d9;
  --text-dim: #8b949e;
  --text-faint: #6e7681;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
    sans-serif;
  --sidebar-w: 290px;
  --stage-h: calc(100vh - 118px);
  --radius: 8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
}

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

::selection { background: rgba(88, 166, 255, 0.3); }

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 5px;
  border: 2px solid var(--bg);
}

/* ============ App shell ============ */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ============ Sidebar ============ */

.sidebar {
  background: var(--bg-hero);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 20;
}

.brand {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.2px;
}

.brand-title svg { flex: 0 0 auto; }

.brand-sub {
  color: var(--text-dim);
  font-size: 12px;
  margin-top: 5px;
  font-family: var(--mono);
}

.brand-chips { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  background: var(--panel);
  white-space: nowrap;
}

.chip.red   { color: var(--red);    border-color: rgba(248, 81, 73, 0.45); background: rgba(248, 81, 73, 0.1); }
.chip.blue  { color: var(--accent); border-color: rgba(88, 166, 255, 0.45); background: rgba(88, 166, 255, 0.1); }
.chip.green { color: var(--green);  border-color: rgba(63, 185, 80, 0.45); background: rgba(63, 185, 80, 0.1); }
.chip.orange{ color: var(--orange); border-color: rgba(210, 153, 34, 0.45); background: rgba(210, 153, 34, 0.1); }
.chip.purple{ color: var(--purple); border-color: rgba(163, 113, 247, 0.45); background: rgba(163, 113, 247, 0.1); }

.nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 10px 10px;
}

.nav-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 8px 10px;
  margin-bottom: 2px;
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  font-family: var(--sans);
}

.nav-item:hover { background: var(--panel); color: var(--text); }

.nav-item.active {
  background: var(--panel-2);
  border-color: var(--border);
  color: var(--text);
}

.nav-num {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 1px;
  transition: all 0.2s ease;
}

.nav-item.active .nav-num {
  background: var(--accent);
  border-color: var(--accent);
  color: #0d1117;
  font-weight: 700;
}

.nav-item.done .nav-num {
  background: rgba(63, 185, 80, 0.15);
  border-color: var(--green);
  color: var(--green);
}

.nav-label { font-size: 13px; font-weight: 600; line-height: 1.3; }
.nav-meta  { font-size: 11px; color: var(--text-faint); font-family: var(--mono); margin-top: 1px; }

.sidebar-foot {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-faint);
  font-family: var(--mono);
}

.progress-wrap { padding: 0 16px 10px; }

.progress-track {
  height: 6px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  border-radius: 3px;
  transition: width 0.35s ease;
}

.progress-label {
  font-size: 11px;
  color: var(--text-faint);
  font-family: var(--mono);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
}

/* ============ Main / stage ============ */

.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-hero);
  position: sticky;
  top: 0;
  z-index: 15;
}

.topbar-scene-title { font-weight: 700; font-size: 15px; }
.topbar-scene-sub { color: var(--text-dim); font-size: 12px; font-family: var(--mono); }

.topbar-nav { display: flex; gap: 8px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
  text-decoration: none;
  user-select: none;
}

.btn:hover:not(:disabled) { background: #2d333b; border-color: #4a5159; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: default; }

.btn.primary {
  background: #1f6feb;
  border-color: #1f6feb;
  color: #fff;
}
.btn.primary:hover:not(:disabled) { background: #388bfd; border-color: #388bfd; }

.btn.danger {
  background: #da3633;
  border-color: #da3633;
  color: #fff;
}
.btn.danger:hover:not(:disabled) { background: #f85149; border-color: #f85149; }

.btn.success {
  background: #238636;
  border-color: #238636;
  color: #fff;
}
.btn.success:hover:not(:disabled) { background: #2ea043; border-color: #2ea043; }

.btn.ghost { background: transparent; }
.btn.ghost:hover:not(:disabled) { background: var(--panel-2); }

.btn.small { padding: 4px 11px; font-size: 12.5px; }

.stage-outer { flex: 1; display: flex; justify-content: center; }

.stage {
  width: 100%;
  max-width: 1180px;
  padding: 22px 26px 26px;
}

/* Fixed-height stage region so scenes don't jump the layout */
.scene-viewport {
  height: var(--stage-h);
  min-height: 480px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-hero);
  position: relative;
}

.scene {
  display: none;
  padding: 26px 30px 30px;
  animation: sceneIn 0.35s ease;
}

.scene.active { display: block; }

@keyframes sceneIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.scene-kicker {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.scene h2 {
  margin: 0 0 6px;
  font-size: 26px;
  letter-spacing: -0.3px;
}

.scene h3 { font-size: 16px; margin: 22px 0 8px; }

.scene-lede { color: var(--text-dim); max-width: 780px; margin: 0 0 20px; }

.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--panel);
  border-radius: 8px;
  padding: 13px 16px;
  margin: 16px 0;
  max-width: 860px;
  font-size: 14px;
}

.callout.red    { border-left-color: var(--red); }
.callout.green  { border-left-color: var(--green); }
.callout.orange { border-left-color: var(--orange); }
.callout.purple { border-left-color: var(--purple); }

.callout-title { font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 7px; }
.callout p { margin: 4px 0 0; color: var(--text-dim); }
.callout p strong, .callout strong { color: var(--text); }

/* Panels & cards */

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.panel-title {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Code blocks */

pre.codeblock {
  background: var(--bg-hero);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  overflow-x: auto;
  max-width: 100%;
  font-size: 12.5px;
  line-height: 1.6;
  margin: 10px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

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

.tok-k { color: var(--red); }       /* keywords / danger */
.tok-s { color: #a5d6ff; }          /* strings */
.tok-c { color: var(--text-faint); font-style: italic; } /* comments */
.tok-f { color: var(--purple); }    /* functions */
.tok-n { color: #79c0ff; }          /* names */
.tok-g { color: var(--green); }     /* good/safe */
.tok-o { color: var(--orange); }    /* highlight */
.tok-v { color: var(--pink); }      /* values */

.diff-del { background: rgba(248, 81, 73, 0.12); color: #ffa198; display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
.diff-add { background: rgba(63, 185, 80, 0.1); color: #7ee787; display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
.diff-ctx { color: var(--text-dim); display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
.diff-hdr { color: var(--accent); display: block; font-weight: 700; overflow-wrap: anywhere; }

/* grid/flex children must be allowed to shrink below their content's
   min-content width, or long code lines blow the column out and get
   clipped by the viewport instead of wrapping/scrolling inside the card */
.grid > *, .defend-grid > *, .ci-layout > *, .net-graph-wrap > *,
.workflow-focus > *, .repo-body > *, .pipeline > * { min-width: 0; }

/* long tokens inside prose (domains, SHAs, paths) must wrap, never clip */
.callout p, .callout, .scene-lede, .check-title, .check-desc, .alert-card p,
.hero-sub, .gauge-fact, .stat-label, .about-text, .fdesc, .cred-kind, .cred-name {
  overflow-wrap: anywhere;
}
.check-desc code, .callout code, .tell-item code, .alert-card code,
.scene-lede code, .monday-item code, .gauge-fact code, .ioc-note code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ============ SCENE 1 : intro hero ============ */

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border);
  background:
    radial-gradient(1000px 400px at 20% -10%, rgba(88, 166, 255, 0.12), transparent 60%),
    radial-gradient(800px 400px at 90% 110%, rgba(248, 81, 73, 0.1), transparent 60%),
    var(--bg-hero);
  padding: 46px 44px 40px;
}

/* scanline overlay */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(201, 209, 217, 0.018) 3px,
    rgba(201, 209, 217, 0.018) 4px
  );
  mix-blend-mode: overlay;
}

.hero-scan {
  position: absolute;
  left: 0; right: 0;
  height: 90px;
  top: -90px;
  background: linear-gradient(to bottom, transparent, rgba(88, 166, 255, 0.07), transparent);
  animation: scanSweep 7s linear infinite;
  pointer-events: none;
}

@keyframes scanSweep {
  0%   { transform: translateY(0); }
  100% { transform: translateY(calc(100% + 600px)); }
}

.hero-kicker {
  font-family: var(--mono);
  color: var(--red);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  animation: pulseDot 1.6s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248, 81, 73, 0.5); }
  50%      { box-shadow: 0 0 0 7px rgba(248, 81, 73, 0); }
}

.hero h1 {
  font-size: 42px;
  margin: 14px 0 10px;
  letter-spacing: -1px;
  line-height: 1.12;
}

.hero h1 .grad {
  background: linear-gradient(90deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub { color: var(--text-dim); max-width: 680px; font-size: 15.5px; }

.hero-ctas { display: flex; gap: 12px; margin-top: 24px; align-items: center; flex-wrap: wrap; }

.hero-cves { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }

/* CVSS gauge */

.gauge-row {
  display: flex;
  gap: 34px;
  align-items: center;
  margin-top: 30px;
  flex-wrap: wrap;
}

.gauge { position: relative; width: 150px; height: 150px; flex: 0 0 auto; }

.gauge svg { transform: rotate(-90deg); }

.gauge-track { stroke: var(--panel-2); }
.gauge-fill {
  stroke: var(--red);
  stroke-linecap: round;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 0 6px rgba(248, 81, 73, 0.55));
}

.gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge-num { font-size: 34px; font-weight: 800; font-family: var(--mono); color: var(--red); }
.gauge-label { font-size: 11px; color: var(--text-faint); font-family: var(--mono); letter-spacing: 1px; }

.gauge-facts { flex: 1; min-width: 260px; display: grid; gap: 8px; }

.gauge-fact {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 13.5px;
  color: var(--text-dim);
}
.gauge-fact .k { color: var(--text); font-weight: 600; min-width: 150px; font-family: var(--mono); font-size: 12.5px; }

/* Stat counters */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 30px;
}

.stat {
  background: rgba(22, 27, 34, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px 14px;
  position: relative;
  overflow: hidden;
}

.stat::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.stat.danger::before { background: linear-gradient(90deg, var(--red), transparent); }
.stat.warn::before   { background: linear-gradient(90deg, var(--orange), transparent); }
.stat.good::before   { background: linear-gradient(90deg, var(--green), transparent); }

.stat-num {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -1px;
}
.stat.danger .stat-num { color: var(--red); }
.stat.warn .stat-num   { color: var(--orange); }
.stat.good .stat-num   { color: var(--green); }

.stat-label { color: var(--text-dim); font-size: 12.5px; margin-top: 3px; }
.stat-label .mono { color: var(--text-faint); font-size: 11px; }

/* ============ SCENE 2 : victim repo mock ============ */

.repo-mock {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-hero);
  overflow: hidden;
}

.repo-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.repo-name { font-size: 17px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.repo-name .owner { color: var(--accent); font-weight: 500; }
.repo-name .slash { color: var(--text-faint); }
.repo-name .name { font-weight: 700; }
.repo-badge {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1px 9px;
}

.repo-stats { display: flex; gap: 14px; color: var(--text-dim); font-size: 12.5px; align-items: center; }
.repo-stats span { display: inline-flex; gap: 5px; align-items: center; }
.repo-stats b { color: var(--text); font-family: var(--mono); }

.repo-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 18px;
  gap: 4px;
  overflow-x: auto;
}

.repo-tab {
  padding: 9px 14px;
  font-size: 13px;
  color: var(--text-dim);
  border-bottom: 2px solid transparent;
  cursor: default;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.repo-tab.active { color: var(--text); border-bottom-color: #f78166; font-weight: 600; }

.repo-body { display: grid; grid-template-columns: 1fr 300px; }

@media (max-width: 1100px) { .repo-body { grid-template-columns: 1fr; } }

.file-list { border-right: 1px solid var(--border); }

.file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 18px;
  border-bottom: 1px solid rgba(48, 54, 61, 0.45);
  font-family: var(--mono);
  font-size: 12.5px;
}
.file-row:hover { background: var(--panel); }
.file-row .fname { color: var(--text); }
.file-row .fmsg { color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.file-row .ftime { color: var(--text-faint); font-size: 11.5px; flex: 0 0 auto; }

.repo-side { padding: 14px 18px; }
.repo-side h4 { margin: 0 0 8px; font-size: 12px; color: var(--text-dim); font-weight: 600; }
.about-text { font-size: 12.5px; color: var(--text-dim); margin-bottom: 12px; }
.topic { display: inline-block; font-size: 11px; color: var(--accent); background: rgba(56, 139, 253, 0.12); padding: 1px 9px; border-radius: 10px; margin: 0 4px 5px 0; }

.release-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid rgba(48, 54, 61, 0.45);
  font-size: 12.5px;
}
.release-item .tag-name { font-family: var(--mono); color: var(--accent); }
.release-item .tag-date { color: var(--text-faint); font-size: 11px; }
.release-item .immutable {
  font-size: 10px;
  font-family: var(--mono);
  color: var(--green);
  border: 1px solid rgba(63, 185, 80, 0.4);
  border-radius: 8px;
  padding: 0 6px;
  margin-left: 6px;
}

/* workflow file focus */

.workflow-focus {
  margin-top: 18px;
}

/* the YAML viewer + callout pair; the h3 above is a full-width block,
   the .grid.cols-2 child below provides the two equal columns */

.tag-ref {
  background: rgba(210, 153, 34, 0.14);
  border: 1px solid rgba(210, 153, 34, 0.5);
  border-radius: 5px;
  padding: 1px 7px;
  cursor: help;
  transition: all 0.2s ease;
  position: relative;
}

.tag-ref.hot {
  background: rgba(248, 81, 73, 0.18);
  border-color: var(--red);
  box-shadow: 0 0 14px rgba(248, 81, 73, 0.4);
}

.why-btn-wrap { margin-top: 10px; }

/* tag swing animation */

.tag-swing { display: flex; align-items: center; gap: 22px; padding: 16px 4px 4px; }

.git-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
}

.git-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: var(--panel);
}

.git-dot.good { border-color: var(--green); background: rgba(63, 185, 80, 0.2); }
.git-dot.bad  { border-color: var(--red); background: rgba(248, 81, 73, 0.25); box-shadow: 0 0 10px rgba(248, 81, 73, 0.5); }

.tag-arrow-svg { flex: 1; max-width: 340px; }

.tag-label-chip {
  font-family: var(--mono);
  font-size: 11.5px;
  border: 1px solid var(--orange);
  color: var(--orange);
  border-radius: 10px;
  padding: 1px 9px;
  background: rgba(210, 153, 34, 0.1);
}

.swing-anim .tag-group { transition: transform 1.1s cubic-bezier(0.65, 0, 0.35, 1); }
.swing-anim.moved .tag-group { transform: translateX(var(--swing, 200px)); }

.tag-group { display: flex; flex-direction: column; align-items: center; gap: 4px; }

/* ============ SCENE 3 : initial access flow ============ */

.flow-diagram { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; }

.flow-node {
  flex: 1;
  min-width: 170px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  position: relative;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  opacity: 0.45;
}

.flow-node.lit { opacity: 1; border-color: var(--accent); box-shadow: 0 0 18px rgba(88, 166, 255, 0.18); }
.flow-node.lit.danger { border-color: var(--red); box-shadow: 0 0 18px rgba(248, 81, 73, 0.25); }

.flow-arrow {
  align-self: center;
  color: var(--text-faint);
  padding: 0 8px;
  flex: 0 0 auto;
}

.flow-node .fstep {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-faint);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* never clip long tokens inside narrow step cards */
.flow-node .fdesc, .flow-node .ftitle { overflow-wrap: anywhere; }

.flow-node .ftitle { font-weight: 700; font-size: 13.5px; margin: 5px 0 4px; }
.flow-node .fdesc { font-size: 12px; color: var(--text-dim); }

.flow-node .fcode {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  background: var(--bg-hero);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 6px 8px;
  color: #a5d6ff;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.flow-explain {
  margin-top: 18px;
  min-height: 96px;
}

.flow-explain .panel { border-left: 3px solid var(--accent); }

.token-flash { animation: tokenFlash 0.7s ease 3; }
@keyframes tokenFlash {
  0%, 100% { background: rgba(248, 81, 73, 0.05); }
  50%      { background: rgba(248, 81, 73, 0.3); }
}

/* ============ SCENE 4 : credential grid ============ */

.cred-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 18px 0;
}

@media (max-width: 1100px) { .cred-grid { grid-template-columns: repeat(3, 1fr); } }

.cred-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 14px;
  position: relative;
  transition: all 0.35s ease;
  min-height: 92px;
}

.cred-card .cred-icon { margin-bottom: 7px; }
.cred-card .cred-name { font-weight: 700; font-size: 13px; }
.cred-card .cred-kind { font-size: 11px; color: var(--text-faint); font-family: var(--mono); }

.cred-card .cred-status {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 10.5px;
  font-family: var(--mono);
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0 7px;
}

.cred-card.rotated { border-color: rgba(63, 185, 80, 0.55); background: rgba(63, 185, 80, 0.06); }
.cred-card.rotated .cred-status { color: var(--green); border-color: rgba(63, 185, 80, 0.55); }

.cred-card.missed { border-color: var(--red); }
.cred-card.missed .cred-status { color: var(--red); border-color: var(--red); }

.cred-card.missed.revealed {
  animation: missedPulse 1.2s ease-in-out infinite;
  box-shadow: 0 0 22px rgba(248, 81, 73, 0.4);
}

@keyframes missedPulse {
  0%, 100% { border-color: var(--red); }
  50%      { border-color: #ffb3ae; box-shadow: 0 0 34px rgba(248, 81, 73, 0.65); }
}

.cred-flip { transition: transform 0.4s ease; }

.three-weeks {
  margin-top: 22px;
  text-align: center;
  font-family: var(--mono);
  color: var(--text-faint);
  font-size: 14px;
  letter-spacing: 2px;
  opacity: 0;
  transition: opacity 1s ease;
}
.three-weeks.show { opacity: 1; }
.three-weeks .big { font-size: 22px; color: var(--orange); display: block; margin-top: 6px; }

/* ============ SCENE 5 : tag poisoning ============ */

.tells-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}

.tells-bar { flex: 1; max-width: 320px; height: 8px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.tells-fill { height: 100%; width: 0%; background: var(--orange); transition: width 0.4s ease; }

.commit-list { display: flex; flex-direction: column; gap: 10px; }

.commit-row {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  overflow: hidden;
}

.commit-row:hover { border-color: var(--border-strong); background: var(--panel-2); }
.commit-row.solved { border-color: rgba(210, 153, 34, 0.55); }
.commit-row.protected { border-color: rgba(63, 185, 80, 0.45); }

.commit-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  flex-wrap: wrap;
}

.commit-msg { font-size: 13.5px; font-weight: 600; flex: 1; min-width: 220px; }
.commit-msg .pr-ref { color: var(--text-faint); font-weight: 400; font-family: var(--mono); font-size: 12px; }

.badge {
  font-family: var(--mono);
  font-size: 10.5px;
  border-radius: 10px;
  padding: 1px 8px;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.badge.verified { color: var(--green); border-color: rgba(63, 185, 80, 0.5); background: rgba(63, 185, 80, 0.08); }
.badge.unsigned { color: var(--red); border-color: rgba(248, 81, 73, 0.5); background: rgba(248, 81, 73, 0.08); }
.badge.protected { color: var(--green); border-color: rgba(63, 185, 80, 0.5); }
.badge.sha { font-size: 10px; color: var(--text-faint); }

.commit-meta {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-faint);
  padding: 0 14px 10px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}

.commit-detail {
  display: none;
  border-top: 1px solid var(--border);
  padding: 14px;
  background: var(--bg-hero);
}

.commit-row.open .commit-detail { display: block; animation: sceneIn 0.25s ease; }

.tell-item {
  display: flex;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  align-items: flex-start;
  overflow-wrap: anywhere;
}

.tell-item .tell-mark { flex: 0 0 auto; margin-top: 2px; }
.tell-item.ok  { color: var(--text-dim); }
.tell-item.bad { color: #ffa198; background: rgba(248, 81, 73, 0.07); margin: 4px 0; }

.timeline-squiggle { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11.5px; margin: 6px 0 2px; }
.timeline-squiggle .t-date { padding: 1px 8px; border-radius: 9px; border: 1px solid var(--border-strong); }
.timeline-squiggle .t-date.old { color: var(--accent); }
.timeline-squiggle .t-date.new { color: var(--red); border-color: var(--red); }
.timeline-squiggle .t-zig { color: var(--red); font-weight: 700; }

/* confetti-lite */
.confetti-wrap { position: relative; }

.confetti-bit {
  position: absolute;
  width: 8px; height: 8px;
  top: 0; left: 50%;
  pointer-events: none;
  animation: confettiFly 1.6s ease-out forwards;
}

@keyframes confettiFly {
  0%   { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; }
}

/* ============ SCENE 6 : payload pipeline ============ */

.pipeline {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin: 18px 0;
}

@media (max-width: 1100px) { .pipeline { grid-template-columns: 1fr; } }

.pipe-stage {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  min-height: 300px;
}

.pipe-stage.active { border-color: var(--accent); box-shadow: 0 0 22px rgba(88, 166, 255, 0.15); }
.pipe-stage.active.pipe-danger { border-color: var(--red); box-shadow: 0 0 22px rgba(248, 81, 73, 0.2); }

.pipe-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pipe-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 12px; color: var(--text-dim);
  transition: all 0.3s ease;
}
.pipe-stage.active .pipe-num { background: var(--accent); color: #0d1117; border-color: var(--accent); font-weight: 700; }
.pipe-stage.active.pipe-danger .pipe-num { background: var(--red); border-color: var(--red); color: #fff; }

.pipe-title { font-weight: 800; letter-spacing: 1.5px; font-size: 14px; }

.secret-flow-box { position: relative; height: 190px; }

.runner-mini {
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 96px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg-hero);
  padding: 8px;
  font-family: var(--mono);
  font-size: 10px;
  text-align: center;
  color: var(--text-dim);
}

.floater {
  position: absolute;
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 9px;
  border: 1px solid var(--orange);
  color: var(--orange);
  background: rgba(210, 153, 34, 0.1);
  opacity: 0;
  white-space: nowrap;
}

.pipe-run .floater { animation: floatUp 2.4s ease forwards; }

@keyframes floatUp {
  0%   { opacity: 0; transform: translateY(12px); }
  15%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-70px); }
}

.mem-snippet {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--bg-hero);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: 10px;
  color: var(--text-dim);
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.encrypt-visual { display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; height: 190px; }

.tar-ball {
  font-family: var(--mono);
  font-size: 13px;
  border: 1px solid var(--purple);
  color: var(--purple);
  background: rgba(163, 113, 247, 0.1);
  border-radius: 8px;
  padding: 10px 20px;
  transition: all 0.4s ease;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.tar-ball.sealed { box-shadow: 0 0 24px rgba(163, 113, 247, 0.4); }

.algo-tag { font-family: var(--mono); font-size: 10.5px; color: var(--text-faint); overflow-wrap: anywhere; text-align: center; }

.exfil-visual { position: relative; height: 190px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }

.packet {
  position: absolute;
  left: 8px;
  width: 10px; height: 10px;
  border-radius: 2px;
  background: var(--red);
  box-shadow: 0 0 8px rgba(248, 81, 73, 0.7);
  opacity: 0;
}

.pipe-run .packet { animation: packetFly 1.8s linear infinite; }
.pipe-run .packet:nth-child(2) { animation-delay: 0.5s; }
.pipe-run .packet:nth-child(3) { animation-delay: 1.1s; }

@keyframes packetFly {
  0%   { left: 4%;  opacity: 0; }
  10%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { left: 88%; opacity: 0; }
}

.c2-dest {
  align-self: flex-end;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--red);
  border: 1px solid rgba(248, 81, 73, 0.5);
  background: rgba(248, 81, 73, 0.08);
  border-radius: 8px;
  padding: 8px 14px;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.typo-focus { border-bottom: 2px dashed var(--orange); padding: 0 2px; }

.fallback-path {
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--mono);
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ============ SCENE 7 : CI log ============ */

.view-toggle { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; }
.view-toggle button {
  background: var(--panel);
  border: none;
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.view-toggle button.on-victim { background: #238636; color: #fff; }
.view-toggle button.on-attacker { background: #da3633; color: #fff; }

.ci-layout { display: grid; grid-template-columns: 1fr 340px; gap: 16px; margin-top: 16px; align-items: start; }
@media (max-width: 1100px) { .ci-layout { grid-template-columns: 1fr; } }

.terminal {
  background: var(--bg-hero);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.term-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-faint);
}

.term-dot { width: 11px; height: 11px; border-radius: 50%; }
.term-dot.r { background: #ff5f57; }
.term-dot.y { background: #febc2e; }
.term-dot.g { background: #28c840; }

.term-body {
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.75;
  min-height: 380px;
  max-height: 460px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.term-body .t-dim { color: var(--text-faint); }
.term-body .t-ok { color: var(--green); }
.term-body .t-warn { color: var(--orange); }
.term-body .t-bad { color: var(--red); }
.term-body .t-info { color: var(--accent); }
.term-body .t-cmd { color: #a5d6ff; }

.caret { display: inline-block; width: 8px; height: 14px; background: var(--accent); vertical-align: -2px; animation: caretBlink 0.9s steps(1) infinite; }
@keyframes caretBlink { 50% { opacity: 0; } }

.side-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.side-panel.attacking { border-color: var(--red); box-shadow: 0 0 20px rgba(248, 81, 73, 0.2); }
.side-panel.hidden-panel { display: none; }

.exfil-line {
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 0;
  color: var(--text-dim);
  border-bottom: 1px solid rgba(48, 54, 61, 0.4);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  animation: sceneIn 0.3s ease;
  overflow-wrap: anywhere;
}

.exfil-line span { min-width: 0; }

.exfil-line .x-val { color: var(--red); }

/* ============ SCENE 8 : detection ============ */

.net-graph-wrap { display: grid; grid-template-columns: 1fr 330px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .net-graph-wrap { grid-template-columns: 1fr; } }

.net-svg-box { background: var(--bg-hero); border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.net-svg-box svg { width: 100%; height: auto; display: block; }

.alert-card {
  border: 1px solid var(--red);
  background: rgba(248, 81, 73, 0.07);
  border-radius: 10px;
  padding: 14px 16px;
  transform: translateX(30px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  margin-top: 12px;
}

.alert-card.show { transform: translateX(0); opacity: 1; }
.alert-card.blocked { border-color: var(--green); background: rgba(63, 185, 80, 0.07); }

.alert-head { display: flex; align-items: center; gap: 9px; font-weight: 800; color: var(--red); font-size: 13.5px; }
.alert-card.blocked .alert-head { color: var(--green); }
.alert-card p { font-size: 12.5px; color: var(--text-dim); margin: 8px 0 10px; }

.checklist { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }

.check-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.check-item:hover { border-color: var(--border-strong); }
.check-item.checked { border-color: rgba(63, 185, 80, 0.5); background: rgba(63, 185, 80, 0.05); }

.check-box {
  flex: 0 0 auto;
  width: 19px; height: 19px;
  border: 1.5px solid var(--border-strong);
  border-radius: 5px;
  margin-top: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.check-item.checked .check-box { background: var(--green); border-color: var(--green); }

.check-body { flex: 1; }
.check-title { font-weight: 600; font-size: 13.5px; }
.check-desc { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.check-desc code { font-size: 11px; background: var(--bg-hero); border: 1px solid var(--border); padding: 0 5px; border-radius: 4px; color: #a5d6ff; }

.containment-banner {
  margin-top: 16px;
  border: 1px solid rgba(63, 185, 80, 0.5);
  background: rgba(63, 185, 80, 0.07);
  border-radius: 10px;
  padding: 14px 18px;
  display: none;
  align-items: center;
  gap: 14px;
}

.containment-banner.show { display: flex; animation: sceneIn 0.4s ease; }
.containment-banner .cb-time { font-family: var(--mono); font-size: 22px; font-weight: 800; color: var(--green); white-space: nowrap; }

/* ============ SCENE 9 : timeline & cascade ============ */

.timeline-scroll { overflow-x: auto; padding-bottom: 8px; }

.timeline-track {
  display: flex;
  gap: 14px;
  min-width: 1250px;
  position: relative;
  padding: 26px 6px 10px;
}

.timeline-track::before {
  content: "";
  position: absolute;
  top: 46px;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--purple), var(--red), var(--orange));
  opacity: 0.5;
}

.tl-node { flex: 0 0 190px; position: relative; }

.tl-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--panel);
  border: 3px solid var(--accent);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.tl-node.red .tl-dot  { border-color: var(--red); box-shadow: 0 0 10px rgba(248, 81, 73, 0.5); }
.tl-node.green .tl-dot{ border-color: var(--green); }
.tl-node.orange .tl-dot{ border-color: var(--orange); }

.tl-date {
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  margin: 10px 0 8px;
}

.tl-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.2s ease;
  min-height: 108px;
}
.tl-card:hover { border-color: var(--border-strong); }
.tl-node.red .tl-card { border-color: rgba(248, 81, 73, 0.4); }

.tl-title { font-weight: 700; font-size: 12.5px; line-height: 1.35; overflow-wrap: anywhere; }
.tl-desc { font-size: 11.5px; color: var(--text-dim); margin-top: 5px; overflow-wrap: anywhere; }
.tl-more {
  display: none;
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  overflow-wrap: anywhere;
}
.tl-node.expanded .tl-more { display: block; animation: sceneIn 0.25s ease; }
.tl-hint { font-size: 10px; color: var(--text-faint); font-family: var(--mono); margin-top: 6px; }

/* cascade map */

.cascade-box { margin-top: 24px; }

.cascade-svg-box { background: var(--bg-hero); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.cascade-svg-box svg { width: 100%; height: auto; display: block; }

/* ============ SCENE 10 : defend ============ */

.defend-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .defend-grid { grid-template-columns: 1fr; } }

.safe-unsafe { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }

.safe-unsafe .su-pane { transition: opacity 0.45s ease, transform 0.45s ease; }
.safe-unsafe .su-pane.pane-hidden { position: absolute; inset: 0; opacity: 0; pointer-events: none; transform: translateY(8px); }

.pin-compare pre { min-height: 205px; margin: 0; border: none; border-radius: 0; }

.ioc-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 12px 0; display: block; overflow-x: auto; }
.ioc-table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-strong);
}
.ioc-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(48, 54, 61, 0.5);
  vertical-align: top;
}
.ioc-table tr:hover td { background: var(--panel); }
.ioc-type { color: var(--orange); font-family: var(--mono); font-size: 11.5px; white-space: nowrap; }
.ioc-val { font-family: var(--mono); font-size: 11.5px; word-break: break-all; color: #a5d6ff; }
.ioc-note { color: var(--text-dim); font-size: 12px; }

.monday-list { counter-reset: monday; display: flex; flex-direction: column; gap: 9px; margin: 12px 0; }
.monday-item {
  counter-increment: monday;
  display: flex;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 13.5px;
  align-items: flex-start;
  overflow-wrap: anywhere;
}
.monday-item::before {
  content: counter(monday);
  flex: 0 0 auto;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(88, 166, 255, 0.12);
  border: 1px solid rgba(88, 166, 255, 0.5);
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.monday-item strong { color: var(--text); }

/* the safe/unsafe overlay panes must never exceed the card that masks them */
.pin-compare pre { min-width: 0; }
.safe-unsafe .su-pane { max-width: 100%; }
.safe-unsafe .su-pane pre { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }

.credits { color: var(--text-faint); font-size: 12px; }
.credits a, a.src-link { color: var(--accent); text-decoration: none; }
.credits a:hover, a.src-link:hover { text-decoration: underline; }

/* footer disclaimer */

.foot-disclaimer {
  margin-top: 20px;
  padding: 12px 4px 0;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 11.5px;
  text-align: center;
  font-family: var(--mono);
}

/* SVG anim helpers */

.draw-path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
}
.pipe-run .draw-path, .draw-path.go { animation: drawPath 1.6s ease forwards; }
@keyframes drawPath { to { stroke-dashoffset: 0; } }

.blink-me { animation: blinkMe 1s ease-in-out infinite; }
@keyframes blinkMe { 50% { opacity: 0.25; } }

/* Scene controls row */
.scene-controls { display: flex; gap: 10px; align-items: center; margin: 4px 0 16px; flex-wrap: wrap; }

.kbd-hint { font-size: 11px; color: var(--text-faint); font-family: var(--mono); margin-left: auto; }

/* ============ Responsive ============ */

@media (max-width: 1280px) {
  :root { --sidebar-w: 250px; }
  .hero h1 { font-size: 34px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .nav { display: flex; overflow-x: auto; padding: 8px 10px; }
  .nav-item { min-width: 150px; }
  :root { --stage-h: auto; }
  .scene-viewport { height: auto; overflow: visible; }
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .cred-grid { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 28px; }
}

@media (max-width: 720px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .cred-grid, .stats { grid-template-columns: 1fr; }
  .scene { padding: 18px; }
  .stage { padding: 14px; }
}

/* ============ Reduced motion ============ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-scan { display: none; }
  .caret { animation: none; }
}
