/* ════════════════════════════════════════════════════════════
   Lazarus — Resurrection Chamber theme
   ════════════════════════════════════════════════════════════ */
:root {
  --bg: #0d0a12;
  --bg-2: #14101d;
  --surface: rgba(28, 23, 40, 0.72);
  --surface-solid: #1c1728;
  --surface-2: #241d33;
  --line: rgba(232, 227, 244, 0.09);
  --line-strong: rgba(232, 227, 244, 0.18);
  --bone: #e8e3f4;
  --muted: #a79ec2;
  --faint: #6f6788;
  --amber: #ffd166;
  --ember: #ff8c42;
  --ember-deep: #e85d2a;
  --moss: #8ce99a;
  --violet: #b197fc;
  --danger: #ff6b6b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(1100px 600px at 75% -10%, rgba(177, 151, 252, 0.10), transparent 60%),
    radial-gradient(900px 700px at -15% 30%, rgba(255, 140, 66, 0.08), transparent 55%),
    var(--bg);
  color: var(--bone);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

#embers { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
main, .site-header, .site-footer { position: relative; z-index: 1; }

.container { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
code { font-family: var(--font-mono); font-size: 0.86em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 0.1em 0.45em; color: var(--amber); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--amber); color: #20180a; padding: 0.6rem 1.2rem; border-radius: 0 0 10px 0; z-index: 100; font-weight: 600; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

/* ── Buttons ─────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; padding: 0.8rem 1.7rem; border-radius: 999px; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, #ffd166 0%, #ff8c42 55%, #e85d2a 100%); color: #2a1608; box-shadow: 0 8px 30px rgba(255, 140, 66, 0.35); }
.btn-primary:hover { box-shadow: 0 12px 44px rgba(255, 140, 66, 0.5); }
.btn-glow { position: relative; }
.btn-glow::after { content: ""; position: absolute; inset: -3px; border-radius: inherit; background: linear-gradient(135deg, rgba(255,209,102,0.5), rgba(232,93,42,0.5)); filter: blur(14px); z-index: -1; opacity: 0.7; }
.btn-outline { background: transparent; color: var(--bone); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--amber); color: var(--amber); }
.btn-ghost { background: rgba(255,255,255,0.04); color: var(--bone); border-color: var(--line); font-size: 0.85rem; padding: 0.45rem 1rem; }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }
.btn-small { font-size: 0.82rem; padding: 0.5rem 1.05rem; }
.btn-big { font-size: 1.05rem; padding: 0.95rem 2.4rem; }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }

/* ── Header ──────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(13, 10, 18, 0.78); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 66px; }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--amber); }
.brand-name { font-family: var(--font-display); font-size: 1.45rem; font-weight: 800; color: var(--bone); letter-spacing: 0.5px; }
.brand-tag { font-family: var(--font-mono); font-size: 0.62rem; color: var(--amber); border: 1px solid rgba(255, 209, 102, 0.4); padding: 0.2em 0.6em; border-radius: 999px; letter-spacing: 1px; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a:not(.btn) { color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 500; transition: color 0.2s; }
.nav a:not(.btn):hover { color: var(--amber); }

/* ── Hero ────────────────────────────────────────────── */
.hero { padding: 4.5rem 0 3.5rem; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: center; }
.kicker { display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 1.6px; text-transform: uppercase; color: var(--amber); background: rgba(255, 209, 102, 0.08); border: 1px solid rgba(255, 209, 102, 0.25); padding: 0.4em 1em; border-radius: 999px; margin-bottom: 1.4rem; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--moss); box-shadow: 0 0 0 0 rgba(140, 233, 154, 0.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(140,233,154,0.55); } 70% { box-shadow: 0 0 0 9px rgba(140,233,154,0); } 100% { box-shadow: 0 0 0 0 rgba(140,233,154,0); } }
.hero-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.6rem, 5.4vw, 4rem); line-height: 1.06; letter-spacing: -0.5px; color: var(--bone); }
.hero-title em { font-style: italic; background: linear-gradient(120deg, #ffd166 10%, #ff8c42 45%, #b197fc 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.subtitle { margin: 1.4rem 0 1.8rem; font-size: 1.08rem; color: var(--muted); max-width: 34rem; }
.subtitle strong { color: var(--bone); }
.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.hero-proof { list-style: none; display: flex; flex-wrap: wrap; gap: 0.8rem 1.4rem; font-size: 0.86rem; color: var(--muted); }
.tick { color: var(--moss); font-weight: 700; margin-right: 0.3em; }

/* Tombstone animation */
.hero-tombstone { display: flex; justify-content: center; }
.tombstone-svg { width: min(280px, 72vw); filter: drop-shadow(0 22px 44px rgba(0,0,0,0.6)); }
.ts-body { animation: rise 3.2s ease-in-out infinite alternate; transform-origin: 110px 236px; }
@keyframes rise { from { transform: translateY(6px); } to { transform: translateY(-7px); } }
.ts-glow { animation: breathe 2.6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.ts-rise { animation: flicker 2.2s steps(2) infinite; }
@keyframes flicker { 0%, 92%, 100% { opacity: 1; } 96% { opacity: 0.35; } }

/* ── Stats bar ───────────────────────────────────────── */
.stats-bar { border-block: 1px solid var(--line); background: rgba(20, 16, 29, 0.7); backdrop-filter: blur(6px); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; padding: 1.1rem 0; }
.stat { text-align: center; padding: 0.4rem 0.5rem; }
.stat-num { display: block; font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; color: var(--amber); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.4px; text-transform: uppercase; }

/* ── Sections ────────────────────────────────────────── */
section { position: relative; }
.how-it-works, .resurrect, .ledger { padding: 4.5rem 0; }
.section-kicker { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 2px; text-transform: uppercase; color: var(--ember); margin-bottom: 0.6rem; }
.section-title { font-family: var(--font-display); font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; color: var(--bone); letter-spacing: -0.3px; }
.intro { color: var(--muted); margin: 0.9rem 0 2.2rem; max-width: 44rem; }

/* ── Crew steps ──────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; counter-reset: step; }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.3rem 1.3rem; overflow: hidden; transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s; }
.step:hover { transform: translateY(-5px); border-color: rgba(255, 209, 102, 0.35); box-shadow: var(--shadow); }
.step::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--amber), transparent); opacity: 0.7; }
.step-icon { color: var(--amber); margin-bottom: 0.8rem; }
.step-number { position: absolute; top: 0.9rem; right: 1.1rem; font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; color: rgba(232,227,244,0.09); }
.step h3 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 0.45rem; color: var(--bone); }
.step p { font-size: 0.86rem; color: var(--muted); }
.step-output { display: inline-block; margin-top: 0.75rem; font-family: var(--font-mono); font-size: 0.68rem; color: var(--violet); background: rgba(177,151,252,0.09); border: 1px solid rgba(177,151,252,0.28); border-radius: 6px; padding: 0.2em 0.6em; }
.crew-links { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.6rem; }
.chip-link { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); text-decoration: none; border: 1px solid var(--line-strong); border-radius: 999px; padding: 0.35em 1em; transition: all 0.2s; }
.chip-link:hover { color: var(--amber); border-color: var(--amber); }

/* ── Resurrect form ──────────────────────────────────── */
.resurrect-form { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; max-width: 62rem; }
.input-wrap { position: relative; flex: 1 1 26rem; }
.gh-icon { position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
#repo-url { width: 100%; background: var(--surface-solid); border: 1px solid var(--line-strong); color: var(--bone); border-radius: 999px; padding: 1.05rem 3.4rem 1.05rem 3.1rem; font-family: var(--font-mono); font-size: 0.95rem; transition: border-color 0.2s, box-shadow 0.2s; }
#repo-url::placeholder { color: var(--faint); }
#repo-url:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.18); }
.kbd-hint { position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; padding: 0.15em 0.55em; background: var(--bg-2); }
.hint { flex-basis: 100%; font-size: 0.78rem; color: var(--faint); margin-top: -0.4rem; }
.hint kbd { font-family: var(--font-mono); background: var(--surface-2); padding: 0 0.35em; border-radius: 4px; border: 1px solid var(--line); }
#form-message { margin-top: 1rem; min-height: 1.4em; font-size: 0.92rem; }
.success-msg { color: var(--moss); }
.error-msg { color: var(--danger); }

/* ── Pipeline panel ──────────────────────────────────── */
.pipeline-panel { margin-top: 1.8rem; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); animation: fadeUp 0.45s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.pipeline-head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; flex-wrap: wrap; margin-bottom: 1rem; }
.pipeline-title { font-weight: 600; color: var(--bone); }
.pipeline-id { font-family: var(--font-mono); font-size: 0.72rem; color: var(--faint); }
.pipeline-stages { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; margin-bottom: 1rem; }
.pstage { text-align: center; padding: 0.75rem 0.4rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-2); transition: all 0.3s; }
.pstage .pstage-dot { display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--faint); margin: 0 auto 0.45rem; transition: all 0.3s; }
.pstage .pstage-name { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.pstage .pstage-agent { display: block; font-family: var(--font-mono); font-size: 0.62rem; color: var(--faint); margin-top: 0.2rem; letter-spacing: 0.6px; }
.pstage.active { border-color: rgba(255, 209, 102, 0.5); box-shadow: 0 0 24px rgba(255, 209, 102, 0.12); }
.pstage.active .pstage-dot { background: var(--amber); animation: pulse 1.1s infinite; }
.pstage.active .pstage-name { color: var(--amber); }
.pstage.done { border-color: rgba(140, 233, 154, 0.4); }
.pstage.done .pstage-dot { background: var(--moss); box-shadow: 0 0 10px rgba(140,233,154,0.5); }
.pstage.done .pstage-name { color: var(--moss); }
.agent-log { background: #0a0810; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 0.76rem; max-height: 220px; overflow-y: auto; padding: 0.9rem 1rem; }
.log-line { display: flex; gap: 0.7rem; padding: 0.18rem 0; color: #b8f0c3; white-space: pre-wrap; }
.log-line .log-agent { color: var(--violet); flex: 0 0 auto; }
.log-line .log-time { color: var(--faint); flex: 0 0 auto; }

/* ── Autopsy report ──────────────────────────────────── */
.report-panel { margin-top: 1.6rem; background: linear-gradient(160deg, var(--surface-solid), var(--bg-2)); border: 1px solid rgba(255, 209, 102, 0.28); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); animation: fadeUp 0.55s ease; }
.report-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 1rem; margin-bottom: 1.2rem; }
.report-repo { font-family: var(--font-display); font-size: 1.5rem; color: var(--bone); }
.report-meta { color: var(--muted); font-size: 0.85rem; font-family: var(--font-mono); margin-top: 0.3rem; }
.report-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.report-body { display: grid; grid-template-columns: auto 1fr 1fr; gap: 1.8rem; align-items: start; }
.report-h4 { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 2px; text-transform: uppercase; color: var(--faint); margin-bottom: 0.65rem; }

.gauge { width: 190px; }
.gauge-track { fill: none; stroke: var(--surface-2); stroke-width: 14; stroke-linecap: round; }
.gauge-fill { fill: none; stroke: var(--amber); stroke-width: 14; stroke-linecap: round; stroke-dasharray: 251.2; stroke-dashoffset: 251.2; transition: stroke-dashoffset 1.4s cubic-bezier(0.22, 1, 0.36, 1); }
.gauge-num { font-family: var(--font-display); font-size: 34px; font-weight: 800; fill: var(--bone); }
.gauge-sub { font-family: var(--font-mono); font-size: 11px; fill: var(--faint); }
.grade-row { display: flex; align-items: center; gap: 0.6rem; justify-content: center; margin-top: 0.6rem; }
.grade-arrow { color: var(--faint); }
.grade-pill { font-family: var(--font-mono); font-weight: 700; font-size: 1rem; border-radius: 8px; padding: 0.2em 0.7em; border: 1px solid; }
.grade-before { color: var(--danger); border-color: rgba(255,107,107,0.4); background: rgba(255,107,107,0.08); }
.grade-after { color: var(--moss); border-color: rgba(140,233,154,0.4); background: rgba(140,233,154,0.08); }
.delta-badge { text-align: center; margin-top: 0.6rem; font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; color: var(--amber); }

.cause-list { list-style: none; display: flex; flex-direction: column; gap: 0.45rem; }
.cause-list li { display: flex; gap: 0.55rem; align-items: baseline; font-size: 0.85rem; color: var(--muted); background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--ember); border-radius: 8px; padding: 0.45rem 0.7rem; }
.cause-list b { color: var(--bone); font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px; }

.spec-chips { display: flex; flex-direction: column; gap: 0.45rem; }
.spec-chip { display: flex; align-items: center; gap: 0.6rem; font-size: 0.82rem; color: var(--muted); background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 0.4rem 0.65rem; animation: chipIn 0.4s ease both; }
@keyframes chipIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.spec-chip .spec-id { font-family: var(--font-mono); font-weight: 700; font-size: 0.72rem; color: #2a1608; background: linear-gradient(135deg, #ffd166, #ff8c42); border-radius: 6px; padding: 0.2em 0.5em; }
.spec-chip .spec-owner { margin-left: auto; font-family: var(--font-mono); font-size: 0.62rem; color: var(--violet); letter-spacing: 0.5px; }
.report-foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.3rem; border-top: 1px solid var(--line); padding-top: 1.1rem; }
.simulated-note { font-size: 0.76rem; color: var(--faint); font-family: var(--font-mono); }

/* ── Ledger / dashboard ──────────────────────────────── */
.ledger { background: var(--bg-2); border-top: 1px solid var(--line); }
.ledger-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.ledger-controls { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.ledger-controls input[type="search"], .ledger-controls select { background: var(--surface-solid); border: 1px solid var(--line-strong); color: var(--bone); border-radius: 10px; padding: 0.55rem 0.85rem; font-family: var(--font-body); font-size: 0.88rem; }
.ledger-controls input[type="search"]:focus, .ledger-controls select:focus { outline: none; border-color: var(--amber); }

.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.1rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; transition: transform 0.22s, border-color 0.22s; display: flex; flex-direction: column; gap: 0.65rem; animation: fadeUp 0.4s ease both; }
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.6rem; }
.card-header h3 { font-family: var(--font-display); font-size: 1.02rem; color: var(--bone); word-break: break-word; }
.status-pill { font-family: var(--font-mono); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; border-radius: 999px; padding: 0.28em 0.8em; border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap; }
.status-pill.pr-opened { color: var(--moss); border-color: rgba(140,233,154,0.45); background: rgba(140,233,154,0.08); }
.status-pill.surgery, .status-pill.testing { color: var(--amber); border-color: rgba(255,209,102,0.45); background: rgba(255,209,102,0.07); }
.status-pill.diagnosed, .status-pill.autopsied { color: var(--violet); border-color: rgba(177,151,252,0.4); }
.repo { font-family: var(--font-mono); font-size: 0.7rem; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.health-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.6rem; background: var(--bg-2); border-radius: var(--radius-sm); padding: 0.7rem 0.8rem; }
.health-item { text-align: center; }
.health-item .label { font-size: 0.62rem; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); }
.health-item .value { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.health-item .value.before { color: var(--danger); }
.health-item .value.after { color: var(--moss); }
.delta-arrow { color: var(--faint); font-size: 1.1rem; }
.spec-badges { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.spec-badges .badge { font-family: var(--font-mono); font-size: 0.62rem; color: var(--amber); background: rgba(255,209,102,0.07); border: 1px solid rgba(255,209,102,0.28); border-radius: 5px; padding: 0.15em 0.45em; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-top: auto; }
.card-grade { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); }
.card-grade b { color: var(--bone); }
.card-pr { font-size: 0.8rem; font-weight: 600; color: var(--amber); text-decoration: none; }
.card-pr:hover { text-decoration: underline; }
.empty-dashboard { color: var(--muted); padding: 2rem; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); grid-column: 1 / -1; }
.empty-dashboard.error-msg { color: var(--danger); border-color: rgba(255,107,107,0.4); }

/* ── Footer ──────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding: 2.2rem 0; background: var(--bg); }
.footer-inner { display: flex; justify-content: space-between; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.footer-brand { font-family: var(--font-display); color: var(--bone); font-size: 1rem; }
.small { color: var(--faint); font-size: 0.8rem; margin-top: 0.3rem; }
.footer-nav { display: flex; gap: 1.3rem; }
.footer-nav a { color: var(--muted); text-decoration: none; font-size: 0.88rem; }
.footer-nav a:hover { color: var(--amber); }

/* ── Toast ───────────────────────────────────────────── */
.toast { position: fixed; bottom: 1.4rem; left: 50%; transform: translate(-50%, 16px); z-index: 80; background: var(--surface-solid); border: 1px solid rgba(255,209,102,0.4); color: var(--bone); padding: 0.7rem 1.3rem; border-radius: 12px; font-size: 0.88rem; opacity: 0; pointer-events: none; transition: all 0.3s; box-shadow: var(--shadow); max-width: min(480px, 90vw); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .report-body { grid-template-columns: 1fr; }
  .gauge-block { display: flex; flex-direction: column; align-items: center; }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-tombstone { order: -1; }
  .tombstone-svg { width: min(180px, 50vw); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .nav a:not(.btn) { display: none; }
  .pipeline-stages { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .hero { padding-top: 2.5rem; }
  .kbd-hint { display: none; }
}

/* ── Reduced motion ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* Custom scrollbar for the agent log */
.agent-log::-webkit-scrollbar { width: 8px; }
.agent-log::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 8px; }
