:root {
  color-scheme: light;
  --ink: #0b1720;
  --muted: #5b6973;
  --surface: #ffffff;
  --surface-alt: #f2f5f4;
  --surface-strong: #e8eeec;
  --line: #d8e0de;
  --navy: #071521;
  --teal: #0b6b68;
  --teal-bright: #16a39e;
  --gold: #d8a938;
  --coral: #c75043;
  --blue: #346f97;
  --shadow: 0 18px 50px rgba(7, 21, 33, .09);
  --radius: 18px;
  --max: 1180px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #ecf5f3;
  --muted: #a9b7b7;
  --surface: #0d1c28;
  --surface-alt: #071521;
  --surface-strong: #142735;
  --line: #29404d;
  --navy: #06121c;
  --teal: #35b9b2;
  --teal-bright: #58d6cf;
  --gold: #e3bd61;
  --coral: #e17a6f;
  --blue: #71a9cc;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface-alt);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input { font: inherit; }
img { max-width: 100%; }
.shell { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.section-space { padding-block: 76px; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 100; background: var(--surface); padding: 12px 18px; border-radius: 10px; }
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--navy) 92%, transparent);
  color: #f4fbfa;
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.header-inner {
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: inline-flex; gap: 11px; align-items: center; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; font: 800 19px/1 Georgia, serif; background: linear-gradient(145deg, #39bfb7, #0d716e); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.brand strong { display: block; font-size: 18px; letter-spacing: -.02em; }
.brand small { display: block; color: #b7cac7; font-size: 11px; letter-spacing: .04em; }
.primary-nav { display: flex; align-items: center; gap: 6px; }
.primary-nav a, .icon-button { color: #c9d8d6; text-decoration: none; border: 0; background: transparent; border-radius: 9px; padding: 9px 12px; cursor: pointer; }
.primary-nav a:hover, .primary-nav a.active, .icon-button:hover { color: white; background: rgba(255,255,255,.08); }
.icon-button { font-size: 18px; }
.demo-banner { background: #f5df9c; color: #34270b; text-align: center; padding: 9px 16px; font-size: 13px; border-bottom: 1px solid #e3c96e; }

.hero { padding-block: 92px 78px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 72px; align-items: center; }
.hero h1, .dossier-hero h1 { font-family: Georgia, "Times New Roman", serif; letter-spacing: -.035em; line-height: 1.04; margin: 0; }
.hero h1 { font-size: clamp(42px, 6vw, 74px); max-width: 850px; }
.eyebrow { margin: 0 0 12px; text-transform: uppercase; letter-spacing: .16em; font-weight: 800; font-size: 11px; color: var(--teal); }
.hero-lede { max-width: 760px; color: var(--muted); font-size: 19px; margin: 26px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 11px; padding: 0 18px; font-weight: 750; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.button:hover { transform: translateY(-2px); }
.button.primary { background: var(--teal); color: #fff; box-shadow: 0 10px 25px rgba(11,107,104,.22); }
.button.secondary { background: var(--surface); border: 1px solid var(--line); }
.trust-panel { border-radius: var(--radius); padding: 22px; background: var(--navy); color: white; box-shadow: var(--shadow); }
.trust-header { display: flex; align-items: center; gap: 9px; font-weight: 800; padding-bottom: 17px; border-bottom: 1px solid rgba(255,255,255,.12); }
.pulse-dot { width: 10px; height: 10px; border-radius: 50%; background: #58d6cf; box-shadow: 0 0 0 6px rgba(88,214,207,.12); }
.trust-panel dl { margin: 8px 0 0; }
.trust-panel dl div { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.trust-panel dt { color: #b9c9c7; }
.trust-panel dd { margin: 0; font-weight: 750; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 28px; }
.section-heading h2 { font: 700 clamp(30px, 4vw, 46px)/1.1 Georgia, serif; letter-spacing: -.02em; margin: 0; }
.section-heading.compact h2 { font-size: clamp(28px, 3vw, 38px); }
.section-heading.narrow { max-width: 650px; }
.view-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); color: var(--muted); background: var(--surface); padding: 8px 13px; border-radius: 999px; cursor: pointer; }
.chip.active, .chip:hover { color: var(--ink); border-color: var(--teal); }
.dossier-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 22px; }
.dossier-card { grid-column: span 8; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.dossier-card > a { display: block; text-decoration: none; padding: 30px; }
.dossier-card .card-top { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.dossier-card h3 { font: 700 31px/1.15 Georgia, serif; letter-spacing: -.02em; margin: 21px 0 13px; }
.dossier-card p { color: var(--muted); margin: 0; max-width: 750px; }
.dossier-card .card-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.score-pill { display: inline-flex; align-items: baseline; gap: 4px; background: var(--surface-alt); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.score-pill strong { font-size: 22px; }
.score-pill small { color: var(--muted); }
.status-badge { display: inline-flex; align-items: center; text-transform: uppercase; letter-spacing: .1em; font-size: 10px; font-weight: 850; border-radius: 999px; padding: 7px 10px; color: #075854; background: #d8efec; }
:root[data-theme="dark"] .status-badge { background: #153d3d; color: #8ae4df; }
.card-arrow { color: var(--teal); font-weight: 800; }
.skeleton { min-height: 300px; background: linear-gradient(100deg, var(--surface) 20%, var(--surface-strong) 40%, var(--surface) 60%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position-x: -200%; } }

.process-section { background: var(--navy); color: white; padding-block: 84px; }
.process-section .eyebrow { color: #58d6cf; }
.process-grid { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.process-grid li { padding: 23px; min-height: 220px; border-radius: 16px; border: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.04); }
.process-grid span { font-weight: 900; font-size: 12px; color: #58d6cf; }
.process-grid h3 { font: 700 24px/1.15 Georgia, serif; margin: 36px 0 10px; }
.process-grid p { color: #b9c9c7; font-size: 14px; margin: 0; }
.methodology-grid { display: grid; grid-template-columns: 1.25fr repeat(3, 1fr); gap: 22px; align-items: stretch; }
.methodology-grid > div:first-child { padding-right: 30px; }
.methodology-grid h2 { font: 700 39px/1.1 Georgia, serif; margin: 0; }
.method-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.method-card h3 { margin-top: 0; }
.method-card p { color: var(--muted); margin-bottom: 0; }

.site-footer { background: var(--navy); color: white; padding-block: 40px; }
.footer-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 30px; }
.footer-grid strong { font-size: 20px; }
.footer-grid p { margin: 4px 0 0; color: #afc0be; }
.footer-grid > div:nth-child(2) { display: flex; gap: 20px; }
.footer-grid a { color: #dbe8e6; text-decoration: none; }
.fine-print { text-align: right; font-size: 12px; }

/* Dossier */
.dossier-shell { min-height: 70vh; }
.loading-state { min-height: 60vh; display: grid; place-items: center; color: var(--muted); }
.dossier-hero { padding-block: 56px 46px; }
.breadcrumbs { display: flex; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 32px; }
.breadcrumbs a { color: var(--teal); text-decoration: none; }
.dossier-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 58px; align-items: start; }
.status-row { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.meta-text { color: var(--muted); font-size: 13px; }
.dossier-hero h1 { font-size: clamp(42px, 5vw, 65px); }
.dossier-summary { font-size: 19px; color: var(--muted); max-width: 820px; margin: 24px 0; }
.meta-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.meta-chip { border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; font-size: 12px; color: var(--muted); background: var(--surface); }
.primary-score { background: var(--navy); color: white; border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.primary-score > p:first-child { text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 800; color: #b8c9c7; }
.score-number { margin-top: 12px; display: flex; align-items: baseline; }
.score-number span { font: 700 68px/1 Georgia, serif; }
.score-number small { color: #b8c9c7; margin-left: 5px; }
.score-track { height: 7px; background: rgba(255,255,255,.14); border-radius: 999px; overflow: hidden; margin: 16px 0; }
.score-track span { display: block; height: 100%; background: #58d6cf; border-radius: inherit; }
.primary-score > p:not(:first-child) { color: #c3d0cf; font-size: 13px; }
.text-button { background: transparent; color: #75e2dc; border: 0; padding: 0; font-weight: 750; cursor: pointer; }
.dossier-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 52px; align-items: start; padding-bottom: 100px; }
.contents-card { position: sticky; top: 106px; border-top: 3px solid var(--teal); padding-top: 18px; }
.contents-card nav { display: grid; gap: 3px; }
.contents-card a { text-decoration: none; color: var(--muted); font-size: 14px; padding: 7px 9px; border-radius: 8px; }
.contents-card a:hover { color: var(--ink); background: var(--surface-strong); }
.dossier-content { min-width: 0; }
.content-section { scroll-margin-top: 100px; padding-block: 45px; border-top: 1px solid var(--line); }
.content-section:first-child { border-top: 0; }
.snapshot-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.snapshot-card { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 22px; border-top: 4px solid var(--blue); }
.snapshot-card.claimed { border-top-color: var(--gold); }
.snapshot-card.disputed { border-top-color: var(--coral); }
.snapshot-card.missing { border-top-color: #7a6aa6; }
.snapshot-card h3 { margin: 0 0 12px; }
.snapshot-card ul, .change-callout ul { margin: 0; padding-left: 20px; }
.snapshot-card li, .change-callout li { margin: 7px 0; }
.empty-item { color: var(--muted); font-style: italic; }
.change-callout { margin-top: 16px; display: grid; grid-template-columns: 130px 1fr; gap: 20px; background: color-mix(in srgb, var(--teal) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--teal) 35%, var(--line)); border-radius: 15px; padding: 20px; }
.change-callout > span { font-weight: 800; color: var(--teal); }
.score-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.score-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.score-card .score-card-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.score-card h3 { margin: 0; font-size: 14px; }
.score-card strong { font: 700 27px/1 Georgia, serif; }
.mini-track { height: 6px; background: var(--surface-strong); border-radius: 999px; overflow: hidden; margin-top: 15px; }
.mini-track span { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.note-card { margin-top: 16px; background: var(--surface); border-left: 4px solid var(--gold); padding: 18px 20px; border-radius: 0 12px 12px 0; color: var(--muted); }
.claim-list { display: grid; gap: 16px; }
.claim-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.claim-card-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.claim-type { display: inline-flex; padding: 6px 9px; border-radius: 7px; background: var(--surface-strong); font-size: 10px; text-transform: uppercase; font-weight: 850; letter-spacing: .08em; }
.claim-card h3 { font: 700 24px/1.25 Georgia, serif; margin: 16px 0 9px; }
.claim-card .claimant { color: var(--muted); font-size: 13px; }
.claim-score { min-width: 72px; text-align: center; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.claim-score strong { display: block; font: 700 27px/1 Georgia, serif; }
.claim-score small { color: var(--muted); }
.claim-details { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.claim-details h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.claim-details p, .claim-details ul { margin: 0; }
.claim-details ul { padding-left: 18px; }
.timeline-list { list-style: none; margin: 0; padding: 0; }
.timeline-list li { position: relative; margin-left: 110px; padding: 0 0 30px 34px; border-left: 2px solid var(--line); }
.timeline-list li::before { content: ""; position: absolute; left: -8px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--teal); border: 2px solid var(--surface-alt); }
.timeline-list time { position: absolute; left: -110px; top: 0; width: 90px; color: var(--muted); font-size: 12px; }
.timeline-list h3 { margin: 0 0 5px; font-size: 17px; }
.timeline-list span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.relationship-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.relationship-card + .relationship-card { margin-top: 15px; }
.relationship-header { display: flex; justify-content: space-between; gap: 18px; }
.relationship-card h3 { font: 700 25px/1.2 Georgia, serif; margin: 12px 0; }
.relationship-card p { margin: 8px 0; }
.relationship-label { font-size: 10px; text-transform: uppercase; letter-spacing: .09em; color: var(--teal); font-weight: 850; }
.confidence-band { font-size: 11px; border: 1px solid var(--line); padding: 5px 8px; border-radius: 999px; color: var(--muted); white-space: nowrap; }
.alternative { color: var(--muted); font-size: 14px; }
.source-list { display: grid; gap: 12px; }
.source-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: grid; grid-template-columns: 1fr auto; gap: 20px; }
.source-card h3 { margin: 0 0 4px; }
.source-card p { margin: 0; color: var(--muted); }
.source-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.source-meta span { font-size: 11px; padding: 5px 8px; border-radius: 7px; background: var(--surface-strong); }
.source-link { align-self: center; text-decoration: none; color: var(--teal); font-weight: 750; }
.prediction-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: grid; grid-template-columns: 110px 1fr; gap: 20px; }
.probability { display: grid; place-items: center; border-radius: 14px; background: var(--navy); color: white; min-height: 100px; }
.probability strong { font: 700 37px/1 Georgia, serif; }
.probability small { color: #b8c9c7; }
.prediction-card h3 { margin: 0 0 8px; }
.prediction-card p { margin: 0; color: var(--muted); }
.correction-card { border-left: 4px solid var(--coral); background: var(--surface); padding: 18px 20px; border-radius: 0 12px 12px 0; }
.correction-card + .correction-card { margin-top: 12px; }
.correction-card time { color: var(--muted); font-size: 12px; }
.correction-card p { margin-bottom: 0; }
.method-dialog { max-width: 640px; border: 1px solid var(--line); border-radius: 18px; padding: 0; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.method-dialog::backdrop { background: rgba(2, 11, 18, .72); backdrop-filter: blur(5px); }
.method-dialog form { padding: 32px; position: relative; }
.method-dialog h2 { font: 700 34px/1.15 Georgia, serif; margin: 0 0 18px; }
.dialog-close { position: absolute; right: 16px; top: 12px; border: 0; background: transparent; color: var(--muted); font-size: 28px; cursor: pointer; }

@media (max-width: 960px) {
  .hero, .dossier-hero-grid { grid-template-columns: 1fr; }
  .trust-panel, .primary-score { max-width: 520px; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .methodology-grid { grid-template-columns: repeat(2, 1fr); }
  .methodology-grid > div:first-child { grid-column: 1 / -1; }
  .dossier-layout { grid-template-columns: 1fr; }
  .contents-card { position: static; display: none; }
  .score-grid { grid-template-columns: repeat(2, 1fr); }
  .dossier-card { grid-column: span 12; }
}

@media (max-width: 680px) {
  .shell, .header-inner { width: min(calc(100% - 26px), var(--max)); }
  .header-inner { min-height: 64px; }
  .brand small, .primary-nav a:not(.active) { display: none; }
  .primary-nav a, .icon-button { padding: 8px; }
  .hero { padding-block: 60px; gap: 40px; }
  .hero h1 { font-size: 43px; }
  .hero-lede, .dossier-summary { font-size: 17px; }
  .section-space { padding-block: 55px; }
  .section-heading { align-items: start; flex-direction: column; }
  .process-grid, .methodology-grid, .snapshot-grid, .score-grid, .claim-details { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > div:nth-child(2) { flex-wrap: wrap; }
  .fine-print { text-align: left; }
  .dossier-hero { padding-block: 40px; }
  .dossier-hero h1 { font-size: 41px; }
  .primary-score { max-width: none; }
  .change-callout { grid-template-columns: 1fr; }
  .timeline-list li { margin-left: 0; padding-left: 28px; }
  .timeline-list time { position: static; display: block; width: auto; margin-bottom: 5px; }
  .relationship-header, .source-card { grid-template-columns: 1fr; display: grid; }
  .prediction-card { grid-template-columns: 1fr; }
  .probability { min-height: 86px; }
}

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