:root {
  color-scheme: light;
  --paper: #f6f2e8;
  --paper-deep: #ece5d7;
  --surface: #fffdf8;
  --ink: #10233f;
  --muted: #5c6778;
  --line: #d6d0c4;
  --blue: #215ca6;
  --blue-deep: #153d70;
  --teal: #247363;
  --amber: #a45c08;
  --amber-soft: #fff0ce;
  --red: #a43b46;
  --red-soft: #fbe6e5;
  --shadow: 0 18px 54px rgba(16, 35, 63, 0.08);
  --radius: 20px;
  --content: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid #efad35;
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--ink);
  color: white;
  border-radius: 8px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 4vw;
  background: rgba(246, 242, 232, 0.96);
  border-bottom: 1px solid rgba(16, 35, 63, 0.12);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand svg {
  fill: var(--blue);
  stroke: var(--blue);
  stroke-width: 1.8;
}

nav {
  display: flex;
  gap: clamp(14px, 2vw, 26px);
}

nav a {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

nav a:hover {
  color: var(--ink);
}

main,
footer {
  width: min(100% - 40px, var(--content));
  margin-inline: auto;
}

.hero {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(36px, 7vw, 96px);
  align-items: center;
  min-height: 680px;
  padding: 84px 0 68px;
}

.hero-copy,
.hero-visual,
.chart-card,
.folding-layout > * {
  min-width: 0;
}

.eyebrow,
.chart-kicker,
.card-label {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 28px;
  font-size: clamp(2.7rem, 5.4vw, 5.35rem);
  font-weight: 820;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 3.8vw, 3.6rem);
  letter-spacing: -0.045em;
  line-height: 1.04;
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  letter-spacing: -0.025em;
  line-height: 1.18;
}

.lead {
  max-width: 680px;
  margin-bottom: 32px;
  color: #3d4b60;
  font-size: clamp(1.08rem, 1.6vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 11px 18px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--ink);
  color: white;
  box-shadow: 5px 5px 0 var(--blue);
}

.button-secondary {
  background: transparent;
}

.hero-visual {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  padding: 20px;
  background: var(--ink);
  color: white;
  border-radius: 28px;
  box-shadow: 18px 18px 0 var(--paper-deep);
}

.visual-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 3px 4px;
  color: #bfd1e8;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.visual-label strong {
  color: white;
  font-size: 0.86rem;
}

.hero-visual svg {
  display: block;
  width: 100%;
  margin-top: 28px;
}

.network-lines {
  fill: none;
  stroke: #5c7698;
  stroke-width: 2;
}

.data-nodes {
  fill: #e8f0fb;
}

.check-nodes {
  fill: var(--amber-soft);
  stroke: #efad35;
  stroke-width: 2;
}

.stabilizer-rings {
  fill: none;
  stroke: #61bba9;
  stroke-width: 2;
  stroke-dasharray: 4 4;
}

.network-labels {
  fill: #9eb3cd;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  text-anchor: middle;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metric-strip article {
  display: flex;
  flex-direction: column;
  min-height: 132px;
  padding: 26px;
}

.metric-strip article + article {
  border-left: 1px solid var(--line);
}

.metric-strip strong {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.metric-strip sup,
.clock-card sup {
  font-size: 0.55em;
  vertical-align: super;
}

.metric-strip span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  margin: 0 0 120px;
  padding: 24px 28px;
  border-radius: 16px;
}

.callout-warning {
  background: var(--amber-soft);
  border: 1px solid #e9bd62;
}

.callout-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: var(--amber);
  color: white;
  border-radius: 50%;
  font-weight: 900;
}

.callout h2 {
  margin: 0 0 4px;
  font-size: 1rem;
  letter-spacing: 0;
}

.callout p {
  max-width: 900px;
  margin-bottom: 0;
  color: #5f431c;
  font-size: 0.93rem;
}

.section {
  padding: 118px 0;
}

.section-contrast {
  position: relative;
}

.section-contrast::before {
  position: absolute;
  z-index: -1;
  inset: 0 calc(50% - 50vw);
  background: var(--paper-deep);
  content: "";
}

.section-heading {
  max-width: 780px;
  margin-bottom: 48px;
}

.section-heading > p:last-child {
  color: var(--muted);
  font-size: 1.04rem;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 40px;
}

.status-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  min-height: 112px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid currentColor;
  border-radius: 14px;
}

.status-card p {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.status-card strong {
  color: var(--ink);
  font-size: 0.98rem;
}

.status-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-weight: 900;
}

.status-pass { color: var(--teal); }
.status-fail { color: var(--red); }
.status-explore { color: var(--amber); }
.status-neutral { color: var(--muted); }

.chart-card {
  padding: clamp(22px, 4vw, 42px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.chart-heading {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.chart-heading h3,
.chart-heading p {
  margin-bottom: 0;
}

.chart-unit {
  color: var(--muted);
  font-size: 0.75rem;
}

.confidence-chart,
.folding-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.scroll-hint {
  display: none;
}

.axis line {
  stroke: #aab1bb;
  stroke-width: 1;
}

.axis .zero-line {
  stroke: var(--ink);
  stroke-width: 2;
  stroke-dasharray: 5 5;
}

.axis text,
.row-label,
.value-label,
.outcome-label,
.point-label {
  fill: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.axis .zero-label {
  fill: var(--ink);
  font-weight: 800;
  text-anchor: middle;
}

.row-label {
  fill: var(--ink);
  font-weight: 800;
}

.confidence-row line {
  stroke-width: 4;
}

.confidence-row circle {
  stroke: white;
  stroke-width: 3;
}

.confidence-fail line { stroke: var(--red); }
.confidence-fail circle { fill: var(--red); }
.confidence-positive line { stroke: var(--amber); }
.confidence-positive circle { fill: var(--amber); }
.confidence-fail .outcome-label { fill: var(--red); font-weight: 800; }
.confidence-positive .outcome-label { fill: var(--amber); font-weight: 800; }

.table-wrap {
  overflow-x: auto;
  margin-top: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

th,
td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chart-note {
  max-width: 800px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.83rem;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.comparison-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.comparison-card h3 {
  min-height: 2.4em;
}

.comparison-card dl,
.decision-card dl,
.receipt-grid dl {
  margin: 22px 0 0;
}

.comparison-card dl div,
.decision-card dl div,
.receipt-grid dl div {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-size: 0.79rem;
}

dd {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 750;
  text-align: right;
}

.source-card { border-top: 5px solid var(--blue); }
.failed-card { border-top: 5px solid var(--red); }
.working-card { border-top: 5px solid var(--amber); }

.comparison-note {
  max-width: 920px;
  margin: 24px auto 0;
  padding: 22px 26px;
  background: transparent;
  border: 1px solid #b8afa1;
  border-radius: 14px;
}

.comparison-note p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.clock-section {
  padding-top: 104px;
}

.clock-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.clock-card {
  display: flex;
  min-height: 240px;
  padding: clamp(24px, 3vw, 36px);
  flex-direction: column;
  justify-content: flex-end;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.clock-card .card-label {
  margin-bottom: auto;
}

.clock-card strong {
  display: block;
  margin: 34px 0 12px;
  font-size: clamp(2rem, 3.2vw, 3.35rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.clock-card > span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.clock-quantum {
  border-top: 6px solid var(--teal);
}

.clock-classical {
  border-top: 6px solid var(--blue);
}

.clock-ratio {
  color: white;
  background: var(--ink);
  border-color: var(--ink);
}

.clock-ratio .card-label,
.clock-ratio > span {
  color: #bac9dc;
}

.clock-boundary {
  margin-top: 28px;
  background: rgba(255, 253, 248, 0.55);
}

.folding-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
  align-items: stretch;
}

.folding-card {
  box-shadow: none;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 0.72rem;
}

.legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-unfolded,
.unfolded-point { fill: var(--blue); background: var(--blue); }
.dot-folded,
.folded-point { fill: var(--amber); background: var(--amber); }

.change-line {
  stroke-width: 5;
  stroke-linecap: round;
}

.positive-change { stroke: #76a99d; }
.negative-change { stroke: #d69aa0; }
.unfolded-point,
.folded-point { stroke: white; stroke-width: 3; }

.decision-card {
  padding: 32px;
  background: var(--ink);
  color: white;
  border-radius: var(--radius);
}

.decision-card .card-label {
  color: #b6c9e1;
}

.decision-card > strong {
  display: block;
  color: #f6c56c;
  font-size: 2.65rem;
  letter-spacing: -0.055em;
  line-height: 1;
}

.decision-card > p:not(.card-label) {
  margin-top: 14px;
  color: #c7d3e4;
  font-size: 0.88rem;
}

.decision-card dl div {
  border-color: #38506f;
}

.decision-card dt { color: #9fb2cc; }

.boundary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.boundary-card {
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.boundary-card h3 span {
  display: inline-grid;
  width: 32px;
  height: 32px;
  margin-right: 8px;
  place-items: center;
  border-radius: 50%;
}

.boundary-yes h3 span { background: #dcefe9; color: var(--teal); }
.boundary-no h3 span { background: var(--red-soft); color: var(--red); }

.boundary-card ul {
  margin: 22px 0 0;
  padding-left: 22px;
}

.boundary-card li + li {
  margin-top: 10px;
}

.evidence-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  margin-top: 52px;
  padding: clamp(26px, 5vw, 50px);
  background: var(--ink);
  color: white;
  border-radius: var(--radius);
}

.evidence-panel .eyebrow { color: #94c8be; }
.evidence-panel p:last-child { color: #bac9dc; }

.evidence-links {
  display: grid;
  gap: 10px;
}

.evidence-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  color: white;
  border: 1px solid #405977;
  border-radius: 10px;
  text-decoration: none;
}

.evidence-link:hover {
  background: #1a3456;
}

.evidence-link span { font-weight: 750; }
.evidence-link small { color: #9eb2cc; }

.receipt-details {
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.receipt-details summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 800;
}

.receipt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 0 22px 22px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
}

.next-step {
  max-width: 860px;
  margin: 0 auto;
  padding: 128px 0;
  text-align: center;
}

.next-step p:last-child {
  color: var(--muted);
  font-size: 1.06rem;
}

footer {
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: space-between;
  min-height: 130px;
  padding: 30px 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}

footer div {
  display: flex;
  flex-direction: column;
}

footer strong { color: var(--ink); font-size: 1rem; }
footer p { margin: 0; text-align: right; }

.visually-hidden {
  position: absolute !important;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  white-space: nowrap;
  border: 0;
  clip: rect(0, 0, 0, 0);
}

@media (max-width: 940px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 62px;
  }

  .hero-visual {
    min-height: 0;
  }

  .metric-strip,
  .status-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric-strip article:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .metric-strip article:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .clock-grid {
    grid-template-columns: 1fr;
  }

  .clock-card {
    min-height: 210px;
  }

  .comparison-card h3 {
    min-height: 0;
  }

  .folding-layout,
  .evidence-panel {
    grid-template-columns: 1fr;
  }

  .decision-card {
    order: -1;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  .site-header {
    min-height: 64px;
    padding: 0 20px;
  }

  nav {
    display: none;
  }

  main,
  footer {
    width: min(100% - 28px, var(--content));
  }

  .hero {
    min-height: auto;
    padding: 52px 0;
  }

  h1 {
    overflow-wrap: anywhere;
    font-size: clamp(2.55rem, 12.5vw, 3.4rem);
  }

  .hero-visual {
    padding: 15px;
    border-radius: 18px;
    box-shadow: 9px 9px 0 var(--paper-deep);
  }

  .visual-label {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-strip,
  .status-grid,
  .boundary-grid,
  .receipt-grid {
    grid-template-columns: 1fr;
  }

  .metric-strip article + article,
  .metric-strip article:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .metric-strip article {
    min-height: 110px;
  }

  .callout {
    grid-template-columns: 1fr;
    margin-bottom: 72px;
  }

  .section {
    padding: 84px 0;
  }

  .chart-card {
    padding: 20px 12px;
  }

  .chart-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .confidence-chart,
  .folding-chart {
    min-width: 650px;
  }

  .scroll-hint {
    display: block;
    margin: 0 8px 12px;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
  }

  .chart-card {
    overflow-x: auto;
  }

  .table-wrap,
  .chart-note,
  .chart-heading {
    min-width: 0;
    margin-inline: 8px;
  }

  .evidence-panel {
    gap: 26px;
  }

  .evidence-link {
    align-items: flex-start;
    flex-direction: column;
  }

  .next-step {
    padding: 90px 0;
    text-align: left;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }

  footer p {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .hero-actions,
  .skip-link {
    display: none;
  }

  body {
    background: white;
  }

  main {
    width: 100%;
  }

  .hero {
    min-height: 0;
  }

  .section {
    break-inside: avoid;
  }
}
