:root {
  color-scheme: dark;
  --background: #020617;
  --surface: #0b1220;
  --surface-raised: #111a2b;
  --text: #f8fafc;
  --muted: #9aa8bc;
  --border: #263449;
  --accent: #22c55e;
  --accent-soft: rgba(34, 197, 94, 0.12);
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--background); color: var(--text); line-height: 1.6; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(circle at 12% 0%, var(--accent-soft), transparent 34rem), linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px); background-size: auto, 48px 48px, 48px 48px; }
a { color: inherit; }
button, select { font: inherit; }
button, .button, select, .family-nav a { min-height: 44px; }
button, .button, .brand, .family-nav a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 20; padding: 10px 14px; background: #fff; color: #020617; border-radius: 8px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.shell { width: min(1160px, calc(100% - 32px)); margin-inline: auto; }
.site-header { width: min(1240px, calc(100% - 32px)); min-height: 76px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--accent); color: var(--accent); font: 700 17px ui-monospace, SFMono-Regular, Menlo, monospace; border-radius: 9px; background: var(--accent-soft); }
.brand strong, .brand small { display: block; line-height: 1.2; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.family-nav { display: flex; gap: 6px; }
.family-nav a { display: inline-flex; align-items: center; padding: 0 14px; color: var(--muted); text-decoration: none; border-radius: 8px; font-weight: 650; }
.family-nav a:hover { color: var(--text); background: var(--surface); }
.family-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.hero { padding-block: clamp(72px, 9vw, 126px) clamp(54px, 7vw, 96px); display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr); gap: clamp(40px, 7vw, 92px); align-items: end; }
.eyebrow, .case-kicker { margin: 0 0 12px; color: var(--accent); font: 700 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { text-wrap: pretty; }
h1 { max-width: 820px; margin: 0; font-size: clamp(44px, 7vw, 86px); line-height: .98; letter-spacing: -.055em; }
.lede { max-width: 720px; margin: 28px 0 0; color: #c9d4e3; font-size: clamp(18px, 2vw, 22px); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 0 18px; border: 1px solid var(--border); border-radius: 9px; text-decoration: none; font-weight: 700; transition: background-color .18s ease, border-color .18s ease, transform .18s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: #041008; background: var(--accent); border-color: var(--accent); }
.button.secondary:hover { border-color: var(--accent); background: var(--accent-soft); }
.runtime-note { display: flex; gap: 13px; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: rgba(11, 18, 32, .78); box-shadow: var(--shadow); }
.runtime-note p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.status-dot { flex: 0 0 auto; width: 9px; height: 9px; margin-top: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.playground { padding-block: 72px; border-top: 1px solid var(--border); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 28px; }
.section-heading.compact { align-items: start; }
.section-heading h2 { max-width: 760px; margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.08; letter-spacing: -.035em; }
.case-picker { display: grid; gap: 8px; min-width: min(100%, 330px); color: var(--muted); font-size: 13px; font-weight: 700; }
.case-picker select { width: 100%; padding: 0 42px 0 13px; color: var(--text); background: var(--surface-raised); border: 1px solid var(--border); border-radius: 9px; cursor: pointer; }
.evidence-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .7fr); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.result-card { min-width: 0; padding: clamp(24px, 4vw, 42px); }
.result-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.result-heading h3 { margin: 0; font-size: clamp(25px, 3vw, 36px); line-height: 1.12; }
.verdict { padding: 6px 10px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); background: var(--accent-soft); font: 700 12px ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; }
.case-summary { max-width: 760px; margin: 18px 0 0; color: #c9d4e3; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 30px 0 0; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--border); }
.metrics div { min-width: 0; padding: 16px; background: var(--surface-raised); }
.metrics dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.metrics dd { margin: 5px 0 0; overflow-wrap: anywhere; font: 650 16px ui-monospace, SFMono-Regular, Menlo, monospace; }
.highlights { display: grid; gap: 10px; margin: 28px 0 0; padding: 0; list-style: none; }
.highlights li { position: relative; padding-left: 22px; color: #d7e0ec; }
.highlights li::before { content: ""; position: absolute; left: 0; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.evidence-meta { padding: clamp(24px, 3vw, 34px); border-left: 1px solid var(--border); background: var(--surface-raised); }
.meta-row { display: grid; gap: 5px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.meta-row:first-child { padding-top: 0; }
.meta-row span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.meta-row code { overflow-wrap: anywhere; color: var(--text); font-size: 13px; }
.boundary { margin: 24px 0 0; color: var(--muted); font-size: 14px; }
.reproduce-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.code-card { min-width: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.code-heading { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.code-heading span, .code-heading strong { display: block; }
.code-heading span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .09em; }
.copy-button { padding: 0 14px; color: var(--text); border: 1px solid var(--border); border-radius: 8px; background: var(--surface-raised); cursor: pointer; font-weight: 700; }
.copy-button:hover { border-color: var(--accent); color: var(--accent); }
pre { min-height: 220px; max-height: 480px; margin: 0; padding: 20px; overflow: auto; color: #d9e7f7; font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2; }
pre.json { white-space: pre; overflow-wrap: normal; }
.copy-status { min-height: 24px; margin: 10px 0 0; color: var(--accent); font-size: 13px; text-align: right; }
.principles { padding-block: 76px 96px; border-top: 1px solid var(--border); }
.principle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 30px; }
.principle-grid article { padding: 24px; border: 1px solid var(--border); border-radius: 12px; background: rgba(11, 18, 32, .64); }
.principle-grid span { color: var(--accent); font: 700 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.principle-grid h3 { margin: 32px 0 8px; font-size: 20px; }
.principle-grid p { margin: 0; color: var(--muted); font-size: 14px; }
.site-footer { display: flex; justify-content: space-between; gap: 24px; padding-block: 26px 42px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.site-footer p { margin: 0; }

@media (max-width: 820px) {
  .hero, .evidence-grid, .reproduce-grid { grid-template-columns: 1fr; }
  .hero { align-items: start; }
  .evidence-meta { border-top: 1px solid var(--border); border-left: 0; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .case-picker { min-width: 0; }
  .principle-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .site-header { align-items: flex-start; flex-direction: column; padding-block: 16px; }
  .family-nav { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); }
  .family-nav a { justify-content: center; padding-inline: 6px; }
  .hero { padding-top: 58px; }
  h1 { font-size: clamp(40px, 13vw, 62px); }
  .actions .button { width: 100%; }
  .result-heading { align-items: flex-start; flex-direction: column; }
  .metrics { grid-template-columns: 1fr; }
  .code-heading { align-items: flex-start; }
  .site-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
