@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/hanken-grotesk-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/instrument-serif-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/instrument-serif-italic-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --background: #F6F3EC;
  --text: #17202B;
  --accent: #B4472F;
  --muted: #58616A;
  --line: #CDCBC5;
  --surface: #F0ECE4;
  --panel: #FCFAF5;
  --accent-surface: #F8EEE8;
  --button-text: #F6F3EC;
  --heading-font: "Instrument Serif", Georgia, "Times New Roman", serif;
  --body-font: "Hanken Grotesk", Arial, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #17202B;
  --text: #F6F3EC;
  --accent: #EE8F76;
  --muted: #B5BBC1;
  --line: #424B55;
  --surface: #1E2935;
  --panel: #24303D;
  --accent-surface: #382B2B;
  --button-text: #17202B;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: #17202B;
    --text: #F6F3EC;
    --accent: #EE8F76;
    --muted: #B5BBC1;
    --line: #424B55;
    --surface: #1E2935;
    --panel: #24303D;
    --accent-surface: #382B2B;
    --button-text: #17202B;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body { margin: 0; background: var(--background); color: var(--text); font-family: var(--body-font); font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
::selection { background: var(--accent); color: var(--button-text); }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .3em; }
button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; border-radius: 2px; }
p, h1, h2, h3, h4, blockquote { margin: 0; }
h1, h2, h3, h4 { font-weight: 400; }
h1, h2, .feature h3, .clause-panel > h3, .sector-title, .testing-principle { font-family: var(--heading-font); }
em { font-weight: 400; }
ol, ul { margin: 0; padding: 0; list-style: none; }
.page-width { width: min(100% - 2.5rem, 75rem); margin-inline: auto; }
.skip-link { position: absolute; top: .75rem; left: 1rem; z-index: 10; background: var(--text); color: var(--background); padding: .75rem 1rem; transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }

.site-header { min-height: 6.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); }
.brand { display: block; flex: 0 0 auto; line-height: 0; }
.logo { display: block; width: 11.5rem; height: auto; }
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}
.header-controls { display: flex; align-items: center; gap: 2.5rem; }
.site-nav { display: none; gap: 2rem; }
.site-nav a { font-size: .9375rem; text-decoration: none; transition: color 160ms ease; }
.site-nav a:hover, .footer-links a:hover { color: var(--accent); }
.theme-toggle { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; transition: border-color 160ms ease, background-color 160ms ease; }
.theme-toggle:hover { border-color: var(--accent); background: var(--accent-surface); }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }

.hero { display: grid; gap: 3.5rem; padding-block: 3.5rem 4rem; }
.eyebrow, .section-index { font-size: .8125rem; line-height: 1.5; letter-spacing: .085em; text-transform: uppercase; }
.hero .eyebrow { color: var(--muted); margin-bottom: 1.5rem; }
h1 { max-width: 55rem; font-size: clamp(3.15rem, 8vw, 6.5rem); line-height: .99; letter-spacing: -.025em; text-wrap: balance; }
h1 em { color: var(--accent); }
.project-status { margin-block: 2rem 1.5rem; color: var(--muted); font-size: 1rem; }
.primary-link { display: inline-flex; align-items: center; justify-content: center; min-height: 3.125rem; padding: .8rem 1.6rem; background: var(--accent); color: var(--button-text); font-size: 1rem; font-weight: 600; text-decoration: none; border: 1px solid var(--accent); transition: background-color 180ms ease, color 180ms ease; }
.primary-link:hover { background: transparent; color: var(--accent); }
.sector-note { border-top: 2px solid var(--accent); padding-top: 1rem; max-width: 18rem; }
.sector-note .eyebrow { margin-bottom: .8rem; }
.sector-title { font-size: 2.4rem; line-height: 1.07; }
.sector-divider { color: var(--accent); padding-right: .15em; }
.sector-detail { margin-top: 1rem; }
.sector-caption { color: var(--muted); font-size: .875rem; margin-top: .1rem; }

.section { border-top: 1px solid var(--line); padding-block: 3.5rem 4rem; }
.section-heading { margin-bottom: 2rem; }
.section-index { color: var(--accent); margin-bottom: 1rem; }
h2 { font-size: clamp(2.6rem, 5.2vw, 4.25rem); line-height: 1.04; letter-spacing: -.02em; }
.feature-grid { display: grid; gap: 2rem; }
.feature { border-top: 1px solid var(--line); padding-top: 1.2rem; }
.feature-number { color: var(--accent); font-size: .875rem; }
.feature h3 { font-size: 2rem; line-height: 1.15; margin-block: 1.1rem .65rem; }
.feature p { color: var(--muted); }

.testing-section { display: grid; gap: 2.5rem; }
.testing-principle { margin-top: 1.5rem; font-size: 1.75rem; line-height: 1.2; }
.testing-principle em { color: var(--accent); }
.method-list li { display: grid; grid-template-columns: 1.5rem 1fr; gap: 1rem; padding-block: 1.4rem; border-top: 1px solid var(--line); }
.method-number { color: var(--accent); font-size: .875rem; padding-top: .15rem; }
.method-list h3 { font-family: var(--body-font); font-weight: 600; font-size: 1.0625rem; line-height: 1.4; margin-bottom: .4rem; }
.method-list p { color: var(--muted); max-width: 33rem; }
.evidence-note { padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--accent); }

.mock-section { background: var(--surface); padding-block: 3.5rem 4rem; border-block: 1px solid var(--line); }
.mock-label { display: block; width: fit-content; max-width: 100%; padding: .55rem .8rem; border: 1px solid var(--accent); color: var(--accent); font-size: .9375rem; font-weight: 600; margin-bottom: 1.5rem; }
.mock-grid { display: grid; border: 1px solid var(--line); }
.clause-panel, .output-panel { padding: 1.5rem; }
.clause-panel { display: flex; flex-direction: column; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.5rem; }
.panel-heading .eyebrow { font-family: var(--body-font); color: var(--muted); }
.panel-tag { font-size: .8125rem; color: var(--muted); }
.clause-panel > h3 { font-size: 2rem; line-height: 1.1; margin-bottom: 1.5rem; }
blockquote { font-family: var(--heading-font); font-size: 1.7rem; line-height: 1.4; }
.clause-caption { color: var(--muted); font-size: .875rem; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.output-panel { background: var(--panel); border-top: 1px solid var(--line); }
.risk-badge { color: var(--accent); background: var(--accent-surface); border: 1px solid var(--accent); font-size: .8125rem; font-weight: 600; line-height: 1.4; padding: .3rem .6rem; }
.output-item + .output-item { margin-top: 1.3rem; }
.output-item h4 { font-size: .9375rem; font-weight: 700; margin-bottom: .4rem; }
.output-item p { color: var(--muted); }
.unknowns { padding-top: 1.3rem; border-top: 1px solid var(--line); }
.unknowns h4 { color: var(--accent); }
.trust-note { font-size: .875rem; padding-left: 1rem; border-left: 2px solid var(--accent); margin-top: 1.5rem; }

.boundaries-section { display: grid; gap: 2rem; border-top: none; }
.boundary-list li { display: flex; align-items: baseline; gap: 1rem; padding-block: .85rem; border-bottom: 1px solid var(--line); font-size: 1.125rem; }
.boundary-list li:first-child { border-top: 1px solid var(--line); }
.boundary-mark { color: var(--accent); font-family: var(--heading-font); font-size: 1.5rem; line-height: 1; }
.site-footer { border-top: 1px solid var(--line); padding-block: 1.75rem 2rem; display: flex; flex-direction: column; gap: 1rem; font-size: .875rem; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer-links a { transition: color 160ms ease; }
.contact-placeholder { overflow-wrap: anywhere; }
.placeholder-notice { position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 2.5rem); padding: .8rem 1rem; border: 1px solid var(--accent); background: var(--panel); color: var(--text); box-shadow: 0 4px 20px #0002; font-size: .9375rem; z-index: 5; }

@keyframes hero-reveal { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.hero-reveal { animation: hero-reveal 650ms ease both; }
.sector-note.hero-reveal { animation-delay: 100ms; }
.reveal { opacity: 1; }
.reveal-pending { opacity: 0; transform: translateY(14px); }
.reveal-visible { opacity: 1; transform: translateY(0); transition: opacity 550ms ease, transform 550ms ease; }

@media (min-width: 40rem) {
  .page-width { width: min(100% - 4rem, 75rem); }
  .site-nav { display: flex; }
  .logo { width: 12.4rem; }
  .hero { padding-block: 4.5rem; }
  .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
  .feature h3 { font-size: 2rem; max-width: 13rem; }
  .site-footer { flex-direction: row; align-items: baseline; justify-content: space-between; }
}

@media (min-width: 56rem) {
  .site-header { min-height: 7.25rem; }
  .hero { grid-template-columns: minmax(0, 4fr) minmax(11rem, 1fr); gap: 3rem; padding-block: 5rem 5.5rem; }
  .hero .eyebrow { margin-bottom: 1.75rem; }
  .hero-main { min-width: 0; }
  .sector-note { margin-top: 4.1rem; padding-top: 1.2rem; }
  .sector-title { font-size: 2.8rem; }
  .sector-note .eyebrow { margin-bottom: 1rem; }
  .project-status { margin-block: 2.25rem 1.6rem; }
  .section { padding-block: 4.5rem 5rem; }
  .section-heading { margin-bottom: 2.5rem; }
  .feature-grid { gap: 3rem; }
  .feature h3 { max-width: none; font-size: 2.1rem; }
  .testing-section { grid-template-columns: 1fr 1.2fr; gap: 5rem; }
  .testing-principle { margin-top: 2rem; font-size: 2.1rem; }
  .method-list li:first-child { padding-top: 0; border-top: none; }
  .method-list li { padding-block: 1.5rem; gap: 1.2rem; }
  .mock-section { padding-block: 4.5rem 5rem; }
  .mock-grid { grid-template-columns: 1fr 1.1fr; }
  .clause-panel, .output-panel { padding: 2.2rem; }
  .clause-caption { margin-top: auto; padding-top: 1.25rem; }
  blockquote { font-size: 1.9rem; padding-bottom: 2rem; }
  .output-panel { border-top: none; border-left: 1px solid var(--line); }
  .boundaries-section { grid-template-columns: 1fr 1.2fr; gap: 5rem; }
}

@media (max-width: 24rem) {
  .page-width { width: calc(100% - 2rem); }
  h1 { font-size: 2.9rem; }
  .clause-panel, .output-panel { padding: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-reveal, .reveal-pending, .reveal-visible { opacity: 1; transform: none; }
}
