:root {
  --paper: #f1ecdf;
  --ink: #151611;
  --orange: #f05b32;
  --orange-soft: #f7a58c;
  --blue: #2554e8;
  --yellow: #f2cc45;
  --mint: #a9d6bf;
  --rule: rgba(21, 22, 17, 0.28);
  --serif: "Newsreader", Georgia, serif;
  --sans: "Manrope", Arial, sans-serif;
  --mono: "DM Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 100;
  left: 1rem;
  top: -5rem;
  padding: 0.8rem 1rem;
  background: var(--ink);
  color: white;
}
.skip-link:focus { top: 1rem; }

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

.site-header {
  height: 78px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  padding: 0 4.2vw;
  border-bottom: 1px solid var(--ink);
  background: rgba(241, 236, 223, 0.94);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.wordmark {
  width: max-content;
  display: grid;
  grid-template-columns: auto auto;
  align-items: end;
  position: relative;
  text-decoration: none;
  font-size: 1.06rem;
  font-weight: 800;
  line-height: 0.87;
  letter-spacing: -0.05em;
}
.wordmark span:first-child { transform: rotate(-3deg); }
.wordmark span:nth-child(2) { transform: rotate(2deg); }
.wordmark i {
  position: absolute;
  width: 32px;
  height: 3px;
  background: var(--orange);
  right: -2px;
  bottom: -6px;
  transform: rotate(-5deg);
}

.site-header nav { display: flex; gap: 2.4rem; }
.site-header nav a {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.site-header nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

.header-year {
  justify-self: end;
  border: 0;
  padding: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 0.7rem;
  cursor: pointer;
}
.header-year span { border-bottom: 1px solid; font-weight: 500; }

.hero {
  min-height: 690px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 7vw;
  align-items: center;
  padding: 7.6rem 7vw 8.5rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  left: -10rem;
  top: 42%;
  width: 26rem;
  height: 26rem;
  border: 1px solid var(--rule);
  border-radius: 50%;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1.5rem;
  font: 500 0.68rem/1 var(--mono);
  letter-spacing: 0.1em;
}
.eyebrow span { width: 18px; height: 7px; background: var(--orange); }

.hero h1, .results-intro h2, .method h2, .closing h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.9;
}
.hero h1 { max-width: 790px; font-size: clamp(4.3rem, 7.4vw, 8rem); }
.hero h1 em, .closing h2 em {
  position: relative;
  color: var(--paper);
  font-style: italic;
  z-index: 0;
}
.hero h1 em::before, .closing h2 em::before {
  content: "";
  position: absolute;
  inset: 4% -4% -2% -3%;
  background: var(--orange);
  transform: rotate(-1.5deg);
  z-index: -1;
}

.hero-dek {
  max-width: 620px;
  margin: 2.4rem 0 0;
  font-size: 1.02rem;
  line-height: 1.65;
}

.year-panel {
  min-height: 470px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 2.5rem;
  color: white;
  background: var(--blue);
  transform: rotate(1deg);
  box-shadow: 12px 12px 0 var(--ink);
}

.orbit-art { position: absolute; inset: 0; overflow: hidden; }
.orbit-one, .orbit-two {
  position: absolute;
  border: 1px solid rgba(255,255,255,0.48);
  border-radius: 50%;
  transform: rotate(-25deg);
}
.orbit-one { width: 470px; height: 180px; top: 20px; left: -70px; }
.orbit-two { width: 310px; height: 115px; top: 75px; left: 10px; }
.planet {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  right: 24%;
  top: 50px;
  background: var(--orange);
  box-shadow: inset -11px -8px 0 rgba(0,0,0,0.16);
}
.moon {
  position: absolute;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  left: 9%;
  top: 102px;
  background: var(--yellow);
}

.year-panel form { position: relative; width: 100%; z-index: 1; }
.year-panel label { display: block; margin-bottom: 1.1rem; font-size: 0.92rem; font-weight: 600; }
.year-entry { display: flex; align-items: baseline; gap: 0.8rem; padding-bottom: 0.3rem; border-bottom: 2px solid white; }
.year-entry span { font: 500 0.7rem/1 var(--mono); letter-spacing: 0.08em; }
.year-entry input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: none;
  color: white;
  background: transparent;
  font: 700 clamp(3rem, 5vw, 5rem)/1 var(--serif);
  letter-spacing: -0.05em;
  appearance: textfield;
}
.year-entry input::-webkit-inner-spin-button { appearance: none; }
.year-panel form > p { margin: 0.7rem 0 1.2rem; color: rgba(255,255,255,0.72); font-size: 0.72rem; line-height: 1.45; }
.year-panel .form-error { min-height: 1em; margin: 0 0 0.45rem; color: #fff0a8; font-weight: 700; }

.primary-button, .secondary-button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--ink);
  padding: 1.15rem 1.25rem;
  color: var(--ink);
  background: var(--yellow);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.primary-button:hover, .secondary-button:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.primary-button:focus-visible, .secondary-button:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

.hero-stamp {
  position: absolute;
  right: -1rem;
  bottom: 1.5rem;
  width: 122px;
  height: 122px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  transform: rotate(10deg);
  font: 500 0.54rem/1.7 var(--mono);
}
.hero-stamp::after { content: ""; position: absolute; inset: 7px; border: 1px solid var(--ink); border-radius: 50%; }
.hero-stamp strong { font-size: 1rem; letter-spacing: 0.05em; }

.ticker {
  min-height: 88px;
  display: grid;
  grid-template-columns: repeat(3, auto) 1fr;
  align-items: center;
  gap: 3rem;
  padding: 1.1rem 4.2vw;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  color: white;
  background: var(--ink);
}
.ticker div { display: flex; align-items: center; gap: 0.7rem; white-space: nowrap; }
.ticker strong { color: var(--yellow); font: 600 2.2rem/1 var(--serif); }
.ticker span { font: 0.62rem/1.3 var(--mono); text-transform: uppercase; }
.ticker p { justify-self: end; margin: 0; font-size: 0.76rem; color: rgba(255,255,255,0.6); }

.results { padding: 8rem 5vw 9rem; }
.results-intro {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 3rem;
  align-items: end;
}
.results-intro h2 { font-size: clamp(3.7rem, 6.4vw, 7rem); }
.results-intro h2 span { color: var(--blue); font-style: italic; }
.results-note { max-width: 430px; justify-self: end; }
.results-note > p { margin: 0 0 1.5rem; line-height: 1.65; font-size: 0.88rem; }
.text-button {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  border: 0;
  border-bottom: 1px solid;
  padding: 0 0 0.35rem;
  background: transparent;
  font: 500 0.68rem/1 var(--mono);
  text-transform: uppercase;
  cursor: pointer;
}

.era-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 5rem 0 3rem;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.era-stats div { padding: 1.4rem 2rem; border-right: 1px solid var(--ink); }
.era-stats div:first-child { padding-left: 0; }
.era-stats div:last-child { border-right: 0; }
.stat-label { display: block; margin-bottom: 0.5rem; font: 0.6rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; }
.era-stats strong { font: 600 1.55rem/1 var(--serif); }

.toolbar { display: grid; grid-template-columns: 1fr 250px; gap: 2rem; align-items: center; }
.filter-scroller { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.filter-button {
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  background: transparent;
  font: 500 0.62rem/1 var(--mono);
  text-transform: uppercase;
  cursor: pointer;
}
.filter-button:hover, .filter-button.active { color: white; background: var(--ink); }
.filter-button span { margin-left: 0.35rem; opacity: 0.55; }

.search-box { display: flex; gap: 0.5rem; align-items: center; padding: 0.65rem 0; border-bottom: 1px solid var(--ink); }
.search-box span { font-size: 1.2rem; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 0.72rem; }
.search-box:focus-within { border-color: var(--blue); border-width: 2px; }

.facts-heading { display: flex; justify-content: space-between; align-items: center; margin: 4rem 0 1rem; }
.facts-heading p { font: 500 0.68rem/1 var(--mono); text-transform: uppercase; }
.facts-heading label { display: flex; align-items: center; gap: 0.5rem; font: 0.65rem/1 var(--mono); text-transform: uppercase; }
.facts-heading select { border: 0; border-bottom: 1px solid; padding: 0.3rem 1.3rem 0.3rem 0.2rem; background: transparent; }

.fact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.15rem; }
.fact-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid var(--ink);
  background: #f7f3e9;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.fact-card:hover { transform: translateY(-4px); box-shadow: 6px 7px 0 var(--ink); }
.fact-card:nth-child(6n + 2) .card-number, .fact-card:nth-child(6n + 5) .card-number { background: var(--yellow); }
.fact-card:nth-child(6n + 3) .card-number, .fact-card:nth-child(6n + 6) .card-number { color: white; background: var(--blue); }
.card-top { display: grid; grid-template-columns: 58px 1fr; border-bottom: 1px solid var(--ink); }
.card-number { display: grid; place-items: center; min-height: 54px; border-right: 1px solid var(--ink); background: var(--orange-soft); font: 500 0.68rem/1 var(--mono); }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; padding: 0.8rem 1rem; font: 0.56rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.04em; }
.era-badge { max-width: 150px; text-align: right; color: var(--blue); font-weight: 500; }
.card-body { flex: 1; padding: 1.45rem 1.3rem 1.2rem; }
.old-claim { margin: 0 0 0.75rem; color: #706d63; font: 500 0.57rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; }
.old-claim span { text-decoration: line-through; text-decoration-color: var(--orange); text-decoration-thickness: 2px; }
.fact-card h3 { margin: 0; font: 700 1.75rem/1.03 var(--serif); letter-spacing: -0.035em; }
.fact-card .answer { margin: 1rem 0 0; font-size: 0.76rem; line-height: 1.55; color: #44443e; }
.timeline { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px dashed var(--rule); }
.timeline-labels { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font: 0.53rem/1 var(--mono); text-transform: uppercase; }
.timeline-track { height: 5px; position: relative; background: #d5d0c4; }
.timeline-track span { position: absolute; inset: 0 auto 0 0; background: var(--orange); }
.card-details { border-top: 1px solid var(--ink); }
.card-details summary { display: flex; justify-content: space-between; padding: 0.9rem 1.3rem; font: 500 0.61rem/1 var(--mono); text-transform: uppercase; cursor: pointer; list-style: none; }
.card-details summary::-webkit-details-marker { display: none; }
.card-details summary::after { content: "+"; font-size: 1rem; }
.card-details[open] summary::after { content: "−"; }
.detail-inner { padding: 0 1.3rem 1.25rem; }
.detail-inner p { margin: 0 0 1rem; font-size: 0.72rem; line-height: 1.6; }
.source-link { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--blue); font: 500 0.58rem/1.3 var(--mono); text-transform: uppercase; text-decoration-thickness: 1px; text-underline-offset: 3px; }

.empty-state { padding: 6rem 1rem; border: 1px dashed var(--ink); text-align: center; }
.empty-state strong { font: 700 2rem/1 var(--serif); }
.empty-state p { margin: 0.7rem 0 1.4rem; font-size: 0.8rem; }
.secondary-button { width: auto; margin: auto; padding: 0.8rem 1rem; }

.method {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 8vw;
  padding: 8rem 7vw;
  color: white;
  background: var(--blue);
}
.method .eyebrow span { background: var(--yellow); }
.method h2 { max-width: 600px; font-size: clamp(3.3rem, 5vw, 5.8rem); }
.method-lead { margin: 0 0 3.4rem; max-width: 700px; font: 600 1.2rem/1.5 var(--serif); }
.method-steps { border-top: 1px solid rgba(255,255,255,0.6); }
.method-steps article { display: grid; grid-template-columns: 55px 0.9fr 1.1fr; gap: 1rem; padding: 1.45rem 0; border-bottom: 1px solid rgba(255,255,255,0.6); }
.method-steps span { font: 0.62rem/1 var(--mono); color: var(--yellow); }
.method-steps h3 { margin: 0; font-size: 0.82rem; }
.method-steps p { margin: 0; color: rgba(255,255,255,0.72); font-size: 0.74rem; line-height: 1.5; }
.method-caveat { margin: 2.4rem 0 0; font: 0.6rem/1.6 var(--mono); color: rgba(255,255,255,0.62); }

.closing { position: relative; overflow: hidden; padding: 9rem 7vw; text-align: center; }
.closing::before, .closing::after { content: ""; position: absolute; border: 1px solid var(--rule); border-radius: 50%; }
.closing::before { width: 250px; height: 250px; left: -80px; top: -50px; }
.closing::after { width: 430px; height: 430px; right: -160px; bottom: -240px; }
.closing > p { font: 500 0.65rem/1 var(--mono); letter-spacing: 0.1em; }
.closing h2 { font-size: clamp(3.7rem, 6.8vw, 7.5rem); }
.closing a { display: inline-flex; gap: 2rem; margin-top: 3rem; border-bottom: 1px solid; padding-bottom: 0.4rem; font: 500 0.65rem/1 var(--mono); text-transform: uppercase; text-decoration: none; }

footer { display: grid; grid-template-columns: 1fr auto auto; align-items: end; gap: 2rem; padding: 3rem 4.2vw; border-top: 1px solid var(--ink); }
footer p { margin: 0; font: 0.58rem/1.3 var(--mono); text-transform: uppercase; }
.footer-mark { transform: scale(1.2); transform-origin: left bottom; }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr 390px; padding-left: 5vw; padding-right: 5vw; }
  .fact-grid { grid-template-columns: repeat(2, 1fr); }
  .ticker { gap: 1.5rem; }
  .ticker p { display: none; }
}

@media (max-width: 760px) {
  .site-header { height: 66px; grid-template-columns: 1fr auto; padding: 0 1rem; }
  .site-header nav { display: none; }
  .hero { display: block; min-height: 0; padding: 4.7rem 1rem 6.5rem; }
  .hero h1 { font-size: clamp(3.25rem, 14.2vw, 5rem); }
  .hero-dek { font-size: 0.9rem; }
  .year-panel { min-height: 430px; margin: 4rem 0 0; padding: 1.4rem; transform: rotate(0); box-shadow: 7px 7px 0 var(--ink); }
  .hero-stamp { width: 95px; height: 95px; right: -12px; bottom: 0.6rem; font-size: 0.44rem; }
  .hero-stamp strong { font-size: 0.8rem; }
  .ticker { grid-template-columns: repeat(3, 1fr); gap: 0.4rem; padding: 1.1rem 0.8rem; }
  .ticker div { display: block; text-align: center; white-space: normal; }
  .ticker strong { display: block; margin-bottom: 0.3rem; }
  .ticker span { font-size: 0.49rem; }
  .results { padding: 5.5rem 1rem 6rem; }
  .results-intro { grid-template-columns: 1fr; }
  .results-intro h2 { font-size: 3.7rem; }
  .results-note { justify-self: start; }
  .era-stats { grid-template-columns: 1fr; margin-top: 3.5rem; }
  .era-stats div, .era-stats div:first-child { padding: 1rem 0; border-right: 0; border-bottom: 1px solid var(--ink); }
  .era-stats div:last-child { border-bottom: 0; }
  .toolbar { grid-template-columns: 1fr; }
  .filter-scroller { flex-wrap: nowrap; overflow-x: auto; margin: 0 -1rem; padding: 0 1rem 0.5rem; scrollbar-width: none; }
  .filter-button { white-space: nowrap; }
  .facts-heading { margin-top: 2.5rem; }
  .facts-heading label > span { display: none; }
  .fact-grid { grid-template-columns: 1fr; }
  .method { grid-template-columns: 1fr; padding: 5.5rem 1rem; }
  .method-copy { margin-top: 1rem; }
  .method-steps article { grid-template-columns: 35px 1fr; }
  .method-steps article p { grid-column: 2; }
  .closing { padding: 6rem 1rem; }
  .closing h2 { font-size: 4rem; }
  footer { grid-template-columns: 1fr; align-items: start; padding: 2.5rem 1rem; }
}

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