:root {
  color-scheme: light;
  --ink: #071827;
  --ink-soft: #173149;
  --paper: #f7f7f1;
  --white: #ffffff;
  --warm: #f3ede2;
  --cyan: #39d8cf;
  --coral: #b63b31;
  --gold: #f0b44d;
  --blue: #1e6bc7;
  --muted: #4f626f;
  --line: rgba(7, 24, 39, 0.18);
  --line-light: rgba(255, 255, 255, 0.22);
  --content: min(1180px, calc(100vw - 48px));
  --header-height: 72px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); letter-spacing: 0; }
button, input, select { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
a { color: inherit; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--white);
  color: var(--ink);
  border: 2px solid var(--coral);
}
.skip-link:focus { top: 12px; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  min-height: var(--header-height);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 0 32px;
  color: var(--white);
  background: rgba(7, 24, 39, 0.76);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
}

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  aspect-ratio: 1;
  background: var(--cyan);
  color: var(--ink);
  font-weight: 900;
  font-size: 0.78rem;
}
.brand-copy { font-size: 0.86rem; font-weight: 700; text-transform: uppercase; }
.site-nav { display: flex; justify-content: center; gap: clamp(14px, 2vw, 30px); }
.site-nav a { padding: 8px 0; text-decoration: none; font-size: 0.84rem; font-weight: 700; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--cyan); }
.header-status { font-size: 0.75rem; text-transform: uppercase; color: #d8e3ea; }

.hero {
  position: relative;
  min-height: 82svh;
  height: min(860px, 88svh);
  overflow: hidden;
  display: grid;
  align-items: center;
  color: var(--white);
  background: var(--ink);
}
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(2, 14, 26, 0.96) 0%, rgba(4, 21, 35, 0.72) 42%, rgba(4, 21, 35, 0.08) 76%); }
.hero-copy { position: relative; width: var(--content); margin: calc(var(--header-height) + 32px) auto 36px; }
.hero-copy > * { max-width: 680px; }
.eyebrow { margin: 0 0 18px; color: var(--cyan); font-size: 0.78rem; font-weight: 850; text-transform: uppercase; }
.eyebrow.ink { color: var(--blue); }
.hero h1 { margin: 0; font-size: clamp(4.2rem, 10vw, 9.4rem); line-height: 0.84; font-weight: 920; }
.hero-subtitle { margin: 22px 0 0; color: var(--gold); font-size: clamp(1.4rem, 2.4vw, 2.25rem); font-weight: 780; }
.hero-intro { margin: 24px 0 0; color: #dce7ef; font-size: clamp(1rem, 1.4vw, 1.18rem); line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid currentColor;
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}
.button-primary { border-color: var(--coral); background: var(--coral); color: var(--white); }
.button-secondary { color: var(--white); border-color: rgba(255, 255, 255, 0.68); }
.button:hover, .button:focus-visible { transform: translateY(-2px); }
.hero-index {
  position: absolute;
  right: 32px;
  bottom: 28px;
  display: flex;
  gap: 18px;
  font-size: 0.72rem;
  color: #dbe9f0;
  text-transform: uppercase;
}
.hero-index span + span { padding-left: 18px; border-left: 1px solid var(--line-light); }

.stat-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  background: var(--coral);
  color: var(--white);
}
.stat-rail div { min-height: 132px; display: flex; flex-direction: column; justify-content: center; padding: 20px clamp(18px, 4vw, 64px); border-right: 1px solid rgba(255, 255, 255, 0.32); }
.stat-rail div:last-child { border-right: 0; }
.stat-rail strong { font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1; }
.stat-rail span { margin-top: 8px; font-size: 0.78rem; text-transform: uppercase; }

.section { padding: clamp(88px, 10vw, 144px) 0; scroll-margin-top: var(--header-height); }
.section-light { background: var(--paper); }
.section-warm { background: var(--warm); }
.section-dark { background: var(--ink); color: var(--white); }
.section-method { background: #102d31; color: var(--white); }
.section-heading { width: var(--content); margin: 0 auto 54px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr); gap: 48px; align-items: end; }
.section-heading .eyebrow { grid-column: 1 / -1; margin-bottom: -28px; }
.section-heading h2 { margin: 0; max-width: 760px; font-size: clamp(2.4rem, 5vw, 4.8rem); line-height: 0.98; }
.section-heading > p:last-child { margin: 0; color: var(--muted); line-height: 1.75; }
.section-heading.light-copy > p:last-child { color: #c8d6dc; }

.research-sequence { width: var(--content); margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.research-sequence div { min-width: 0; padding: 28px 22px 34px; border-right: 1px solid var(--line); }
.research-sequence div:last-child { border-right: 0; }
.research-sequence span { color: var(--coral); font-size: 0.74rem; font-weight: 850; }
.research-sequence strong { display: block; margin-top: 42px; font-size: 1rem; }
.research-sequence p { margin: 10px 0 0; color: var(--muted); font-size: 0.86rem; line-height: 1.55; }

.overview-grid { width: var(--content); margin: 70px auto 0; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 56px; }
.panel-heading { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.panel-heading .eyebrow { margin-bottom: 8px; }
.panel-heading h3 { margin: 0; font-size: 1.45rem; }
.grade-chart { margin-top: 26px; display: grid; gap: 14px; }
.grade-row { display: grid; grid-template-columns: 36px 1fr 52px; gap: 12px; align-items: center; }
.grade-label { font-weight: 900; }
.grade-track { height: 18px; background: #dde2e1; }
.grade-fill { height: 100%; min-width: 2px; background: var(--blue); }
.grade-row:nth-child(2) .grade-fill { background: var(--cyan); }
.grade-row:nth-child(3) .grade-fill { background: var(--gold); }
.grade-row:nth-child(4) .grade-fill { background: var(--coral); }
.grade-row:nth-child(5) .grade-fill { background: #8f6ead; }
.grade-row:nth-child(6) .grade-fill { background: #7e8991; }
.grade-count { text-align: right; font-variant-numeric: tabular-nums; }
.operator-list { margin: 24px 0 0; padding: 0; list-style: none; counter-reset: operators; }
.operator-list li { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.operator-list li::before { counter-increment: operators; content: counter(operators, decimal-leading-zero); color: var(--coral); font-weight: 800; }
.operator-list code { overflow-wrap: anywhere; color: var(--ink-soft); }
.operator-list strong { font-variant-numeric: tabular-nums; }

.family-band { position: relative; min-height: 560px; display: grid; grid-template-columns: 1.18fr 0.82fr; border-top: 1px solid var(--line-light); overflow: hidden; }
.family-band:last-child { border-bottom: 1px solid var(--line-light); }
.family-band.reverse { grid-template-columns: 0.82fr 1.18fr; }
.family-band.reverse img { order: 2; }
.family-band img { width: 100%; height: 100%; min-height: 560px; object-fit: cover; }
.family-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(40px, 7vw, 96px); background: #0b2032; }
.family-band.reverse .family-copy { background: #142b2c; }
.family-number { color: var(--gold); font-size: 0.78rem; font-weight: 850; }
.family-kicker { margin: auto 0 14px; color: var(--cyan); text-transform: uppercase; font-size: 0.78rem; font-weight: 850; }
.family-copy h3 { margin: 0; font-size: clamp(2.4rem, 5vw, 4.6rem); }
.family-copy > p:last-of-type { max-width: 520px; color: #cbd9df; line-height: 1.7; }
.family-copy dl { display: flex; gap: 34px; margin: 34px 0 0; padding-top: 24px; border-top: 1px solid var(--line-light); }
.family-copy dl div { display: flex; flex-direction: column-reverse; gap: 6px; }
.family-copy dt { color: #a8bac4; font-size: 0.74rem; text-transform: uppercase; }
.family-copy dd { margin: 0; font-size: 1.6rem; font-weight: 900; color: var(--gold); }

.top-alpha-grid { width: var(--content); margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.top-alpha-card { min-height: 286px; padding: 30px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.top-alpha-card:nth-child(even) { border-right: 0; }
.top-alpha-card:hover, .top-alpha-card:focus-visible { background: rgba(255, 255, 255, 0.62); outline: 2px solid var(--blue); outline-offset: -2px; }
.top-card-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.top-rank { color: var(--coral); font-size: 0.78rem; font-weight: 850; }
.top-grade { display: grid; place-items: center; width: 38px; aspect-ratio: 1; background: var(--ink); color: var(--white); font-weight: 900; }
.top-alpha-card h3 { margin: 18px 0 0; font-size: clamp(2rem, 4vw, 3.1rem); }
.top-alpha-card .top-family { margin: 8px 0 0; color: var(--blue); font-weight: 800; }
.top-alpha-card .top-strategy { margin: 8px 0 26px; color: var(--muted); }
.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-top: 18px; border-top: 1px solid var(--line); }
.metric-row span { display: block; color: var(--muted); font-size: 0.7rem; text-transform: uppercase; }
.metric-row strong { display: block; margin-top: 5px; font-variant-numeric: tabular-nums; }

.archive-heading { align-items: start; }
.archive-heading .eyebrow { grid-column: auto; margin-bottom: 14px; }
.archive-heading > div { grid-row: 1; }
.archive-heading > p { align-self: end; }
.archive-controls { width: var(--content); margin: 0 auto 26px; display: grid; grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(140px, 0.7fr)); gap: 14px; }
.archive-controls label { display: grid; gap: 8px; font-size: 0.74rem; font-weight: 780; text-transform: uppercase; }
.archive-controls input, .archive-controls select { width: 100%; min-height: 48px; padding: 0 13px; border: 1px solid #aeb9bd; border-radius: 0; background: var(--white); color: var(--ink); }
.archive-controls input:focus, .archive-controls select:focus { outline: 3px solid rgba(30, 107, 199, 0.22); border-color: var(--blue); }
.archive-summary { width: var(--content); margin: 0 auto; display: flex; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 0.84rem; }
.archive-summary strong { color: var(--coral); font-size: 1.1rem; }
.archive-table { width: var(--content); margin: 10px auto 0; border-top: 2px solid var(--ink); }
.archive-table-head, .archive-row { display: grid; grid-template-columns: 0.7fr 1.1fr 1.8fr 0.5fr 0.5fr; gap: 18px; align-items: center; }
.archive-table-head { padding: 14px 18px; color: var(--muted); font-size: 0.7rem; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.archive-row { width: 100%; min-height: 74px; padding: 14px 18px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.archive-row:hover, .archive-row:focus-visible { background: var(--white); outline: 2px solid var(--blue); outline-offset: -2px; }
.archive-row strong { font-size: 1rem; }
.archive-row span { min-width: 0; overflow-wrap: anywhere; }
.archive-row .score { font-weight: 900; color: var(--blue); font-variant-numeric: tabular-nums; }
.archive-empty { width: 100%; margin: 0; padding: 30px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.load-button { margin: 28px auto 0; background: var(--ink); color: var(--white); border-color: var(--ink); }
.load-button[hidden] { display: none; }

.validation-path { width: var(--content); margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line-light); }
.validation-path div { min-height: 244px; padding: 26px 22px; border-right: 1px solid var(--line-light); }
.validation-path div:last-child { border-right: 0; }
.validation-path span { color: var(--gold); font-size: 0.78rem; font-weight: 900; }
.validation-path strong { display: block; margin-top: 48px; }
.validation-path p { margin: 12px 0 0; color: #c8d8dc; font-size: 0.85rem; line-height: 1.6; }
.disclosure { width: var(--content); margin: 40px auto 0; display: grid; grid-template-columns: 0.55fr 1.45fr; gap: 34px; padding: 30px 0 0; border-top: 1px solid var(--line-light); }
.disclosure strong { color: var(--gold); text-transform: uppercase; }
.disclosure p { margin: 0; color: #c8d8dc; line-height: 1.7; }

.site-footer { display: flex; justify-content: space-between; gap: 32px; padding: 34px max(24px, calc((100vw - 1180px) / 2)); background: #04111c; color: var(--white); border-top: 1px solid rgba(255, 255, 255, 0.12); }
.site-footer div { display: flex; flex-direction: column; gap: 5px; }
.site-footer div:last-child { text-align: right; }
.site-footer span { color: #9fb2bd; font-size: 0.78rem; }

.alpha-dialog { width: min(760px, calc(100vw - 32px)); max-height: min(820px, calc(100vh - 32px)); padding: 0; border: 0; border-radius: 0; background: var(--paper); color: var(--ink); box-shadow: 0 32px 100px rgba(0, 0, 0, 0.42); }
.alpha-dialog::backdrop { background: rgba(1, 10, 18, 0.82); backdrop-filter: blur(7px); }
.dialog-close { position: sticky; top: 0; z-index: 2; width: 100%; min-height: 48px; border: 0; border-bottom: 1px solid var(--line); background: var(--ink); color: var(--white); font-weight: 800; cursor: pointer; }
.dialog-close:hover, .dialog-close:focus-visible { background: var(--coral); }
.dialog-body { padding: 38px; }
.dialog-body .eyebrow { margin-bottom: 12px; }
.dialog-body h2 { margin: 0; font-size: clamp(2.6rem, 7vw, 5rem); }
.dialog-lead { margin: 12px 0 28px; color: var(--blue); font-weight: 800; }
.dialog-metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.dialog-metrics div { min-height: 88px; padding: 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dialog-metrics span { display: block; color: var(--muted); font-size: 0.7rem; text-transform: uppercase; }
.dialog-metrics strong { display: block; margin-top: 8px; }
.dialog-section { margin-top: 28px; }
.dialog-section h3 { margin: 0 0 10px; font-size: 1rem; }
.dialog-section p { margin: 0; color: var(--muted); line-height: 1.65; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag-list span { padding: 7px 9px; border: 1px solid var(--line); background: var(--white); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.78rem; }

@media (max-width: 980px) {
  :root { --content: min(100% - 32px, 760px); }
  .site-header { grid-template-columns: auto 1fr; padding: 0 18px; }
  .site-nav { justify-content: end; gap: 14px; overflow-x: auto; }
  .header-status { display: none; }
  .hero-index { display: none; }
  .section-heading { grid-template-columns: 1fr; gap: 22px; }
  .section-heading .eyebrow { margin-bottom: -6px; }
  .research-sequence { grid-template-columns: repeat(2, 1fr); }
  .research-sequence div { border-bottom: 1px solid var(--line); }
  .overview-grid { grid-template-columns: 1fr; }
  .family-band, .family-band.reverse { grid-template-columns: 1fr; }
  .family-band.reverse img { order: 0; }
  .family-band img { min-height: 400px; aspect-ratio: 16 / 9; }
  .archive-controls { grid-template-columns: repeat(2, 1fr); }
  .validation-path { grid-template-columns: repeat(2, 1fr); }
  .validation-path div { border-bottom: 1px solid var(--line-light); }
}

@media (max-width: 700px) {
  :root { --header-height: 58px; }
  .site-header { display: flex; justify-content: space-between; min-height: var(--header-height); padding: 0 12px; }
  .brand-copy { display: none; }
  .brand-mark { width: 38px; }
  .site-nav { justify-content: flex-start; gap: 13px; }
  .site-nav a:nth-child(1), .site-nav a:nth-child(2) { display: none; }
  .hero { min-height: 84svh; height: auto; }
  .hero-image { object-position: 62% center; }
  .hero-overlay { background: linear-gradient(90deg, rgba(2, 14, 26, 0.96) 0%, rgba(4, 21, 35, 0.82) 72%, rgba(4, 21, 35, 0.42)); }
  .hero-copy { margin-top: calc(var(--header-height) + 48px); padding-bottom: 38px; }
  .hero h1 { font-size: clamp(4rem, 22vw, 6.5rem); }
  .hero-intro { line-height: 1.55; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .stat-rail { grid-template-columns: repeat(2, 1fr); }
  .stat-rail div { min-height: 112px; padding: 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.32); }
  .section { padding: 76px 0; }
  .research-sequence { grid-template-columns: 1fr; }
  .research-sequence div { border-right: 0; }
  .research-sequence strong { margin-top: 18px; }
  .family-band { min-height: 0; }
  .family-band img { min-height: 250px; aspect-ratio: 4 / 3; }
  .family-copy { min-height: 380px; padding: 32px 20px; }
  .top-alpha-grid { grid-template-columns: 1fr; }
  .top-alpha-card { border-right: 0; }
  .archive-controls { grid-template-columns: 1fr; }
  .archive-summary { align-items: flex-end; }
  .archive-summary p:last-child { text-align: right; }
  .archive-table-head { display: none; }
  .archive-row { grid-template-columns: 1fr auto; gap: 8px 14px; padding: 16px 8px; }
  .archive-row span:nth-child(2), .archive-row span:nth-child(3) { grid-column: 1; }
  .archive-row span:nth-child(4), .archive-row span:nth-child(5) { grid-column: 2; text-align: right; }
  .archive-row span:nth-child(4) { grid-row: 1; }
  .archive-row span:nth-child(5) { grid-row: 2; }
  .validation-path { grid-template-columns: 1fr; }
  .validation-path div { min-height: 190px; border-right: 0; }
  .validation-path strong { margin-top: 24px; }
  .disclosure { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; }
  .site-footer div:last-child { text-align: left; }
  .dialog-body { padding: 26px 20px; }
  .dialog-metrics { grid-template-columns: repeat(2, 1fr); }
}

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