:root {
  color-scheme: light;
  --paper: #f4efe6;
  --paper-deep: #e8e1d4;
  --panel: #fbf8f1;
  --ink: #14373b;
  --muted: #45595b;
  --line: #aab3ad;
  --wet: #085f78;
  --wet-soft: #b9dce4;
  --dry: #9f351d;
  --dry-soft: #e8c3b5;
  --gold: #745000;
  --focus: #111111;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { max-width: 100%; scroll-behavior: auto; }
html.capture-og { overflow: hidden; }
html.capture-og::-webkit-scrollbar { display: none; }
body {
  max-width: 100%;
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.52;
}

button, select { font: inherit; }
button, summary { cursor: pointer; }
button:focus-visible, summary:focus-visible, a:focus-visible, [tabindex="0"]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 30;
  transform: translateY(-180%);
  padding: .7rem 1rem;
  background: var(--ink);
  color: var(--paper);
}
.skip-link:focus { transform: translateY(0); }
.noscript {
  width: min(var(--max), calc(100% - 2rem));
  margin: 1rem auto;
  padding: .8rem 1rem;
  border: 2px solid var(--dry);
  background: var(--panel);
  color: var(--ink);
  font-weight: 700;
}

.site-header, main, footer {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
}
.site-header {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .045em;
}
.site-header p { margin: 0; }
.wordmark {
  color: var(--wet);
  font-weight: 800;
  letter-spacing: .13em;
  text-decoration: none;
}

.hero {
  min-height: calc(100svh - 62px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 4.5rem;
  align-items: center;
  padding: 2.5rem 0 3rem;
}
.hero > * { min-width: 0; }
.eyebrow {
  margin: 0 0 .8rem;
  color: var(--wet);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
h1, h2, h3, p { text-wrap: pretty; }
h1, h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}
h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(3.8rem, 7.4vw, 6.35rem);
  line-height: .93;
  letter-spacing: -.048em;
}
h1 em { color: var(--dry); font-weight: 400; }
.dek {
  max-width: 720px;
  margin: 1.35rem 0 .75rem;
  color: var(--ink);
  font-size: clamp(1.08rem, 1.55vw, 1.3rem);
}
.scope-note {
  max-width: 700px;
  margin: 0 0 1.45rem;
  color: var(--muted);
  font-size: .9rem;
}
.primary, .secondary, .answer, .grid-cell {
  border: 0;
  font-weight: 750;
}
.primary, .secondary {
  min-height: 48px;
  padding: .72rem 1.05rem;
  border: 2px solid var(--ink);
  border-radius: 3px;
}
.primary { background: var(--ink); color: var(--paper); }
.primary:hover { background: var(--wet); }
.secondary { background: var(--panel); color: var(--ink); }
.secondary:hover { background: var(--paper-deep); }

.hero-score {
  padding: 1rem 0 1rem 1.6rem;
  border-left: 5px solid var(--ink);
}
.score-question {
  margin: 0 0 .8rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
}
.rule-list { margin: 0 0 1rem; padding-left: 1.25rem; }
.rule-list li + li { margin-top: .55rem; }
.hero-score [hidden] { display: none !important; }
.score-kicker {
  margin: 0 0 .55rem;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.score-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.score-pair strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3rem;
  line-height: 1;
}
.score-pair div:first-child strong { color: var(--wet); }
.score-pair div:last-child strong { color: var(--dry); }
.score-pair span { color: var(--muted); font-size: .78rem; font-weight: 700; }
.benchmark-bars { display: grid; gap: .55rem; margin: 1rem 0; }
.benchmark-row { display: grid; grid-template-columns: minmax(105px, auto) 1fr 48px; gap: .65rem; align-items: center; }
.benchmark-row > span { color: var(--muted); font-size: .76rem; font-weight: 750; }
.benchmark-row i { height: 10px; background: var(--line); }
.benchmark-row b { display: block; height: 100%; }
.benchmark-row > strong { font-size: .76rem; font-variant-numeric: tabular-nums; text-align: right; }
.score-hit { background: var(--wet); }
.score-miss { background: var(--dry); }
.hero-score > p:last-child { margin: 0; color: var(--muted); font-size: .9rem; }

.quiz-section, .evidence-section, .territory-section, .limits, .method { padding: 6rem 0; }
.quiz-section, .territory-section, .method { border-top: 1px solid var(--line); }
.evidence-section, .limits { width: 100%; padding-inline: max(calc((100% - var(--max)) / 2), 1.25rem); background: var(--paper-deep); }
.section-intro { max-width: 860px; margin-bottom: 2.4rem; }
h2 {
  margin: 0 0 .8rem;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: .98;
  letter-spacing: -.035em;
}
.section-intro > p:not(.eyebrow), .method > p { color: var(--muted); }
.disclosure {
  max-width: 760px;
  padding-left: .9rem;
  border-left: 4px solid var(--gold);
  font-size: .88rem;
}
.case-note { max-width: 760px; }
.case-note p { color: var(--muted); }

.quiz-card {
  min-height: 510px;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--panel);
}
.quiz-progress {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.place { margin: 3rem 0 .35rem; color: var(--muted); font-weight: 700; }
.rain-category {
  margin: 0;
  color: var(--wet);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.7rem, 8vw, 6.7rem);
  font-weight: 700;
  line-height: .95;
  letter-spacing: -.045em;
}
.rain-category.is-dry { color: var(--dry); }
.rain-context { margin: .65rem 0 2.25rem; color: var(--muted); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { margin-bottom: .85rem; font-weight: 750; }
.answer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.answer {
  min-height: 64px;
  padding: 1rem;
  border: 2px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.answer span { float: right; font-size: 1.4rem; }
.answer:hover:not(:disabled), .answer.is-selected { border-color: var(--ink); background: var(--paper-deep); }
.answer:disabled { cursor: default; opacity: .66; }
.answer-result { min-height: 5.5rem; margin-top: 1.2rem; font-size: 1.02rem; }
.answer-result strong { color: var(--gold); }

.grid-key, .territory-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem 1.5rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: .86rem;
}
.setup-picker {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
  margin: 0 0 1.2rem;
}
.setup-picker label { color: var(--muted); font-size: .82rem; font-weight: 750; }
.setup-picker select {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: .35rem;
  padding: .65rem .75rem;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: var(--panel);
  color: var(--ink);
}
.key-mark, .territory-dot { display: inline-block; width: .72rem; height: .72rem; margin-right: .35rem; border-radius: 50%; }
.key-below, .dot-common { background: var(--dry); }
.key-above, .dot-rule { background: var(--wet); }
.territory-dot.dot-common {
  background: transparent;
  border: 2px solid var(--dry);
  border-radius: 0;
  transform: rotate(45deg);
}
.scroll-note { display: none; margin: 0 0 .7rem; color: var(--muted); font-size: .82rem; }
.decision-table-wrap { max-width: 100%; overflow-x: auto; }
.decision-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: .5rem;
}
.decision-table caption { padding: 0 0 .45rem .5rem; color: var(--muted); text-align: left; }
.decision-table th { padding: .35rem .5rem; color: var(--muted); text-align: left; font-size: .82rem; }
.decision-table thead th:not(:first-child) { text-align: center; }
.decision-table td { min-width: 128px; }
.grid-cell {
  width: 100%;
  min-height: 96px;
  padding: .7rem;
  border: 2px solid transparent;
  border-radius: 2px;
  background: var(--panel);
  color: var(--ink);
}
.grid-cell strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; }
.grid-cell span { display: block; color: var(--muted); font-size: .76rem; }
.grid-cell .cell-n { margin-top: .2rem; font-size: .7rem; }
.grid-cell.is-above { border-top: 5px solid var(--wet); }
.grid-cell.is-below { border-top: 5px solid var(--dry); }
.grid-cell.is-equal { border-top: 5px solid var(--muted); }
.grid-cell.is-selected { border-right-color: var(--ink); border-bottom-color: var(--ink); border-left-color: var(--ink); background: #fffdf7; }
.selected-comparison { margin-top: 2.3rem; }
.selected-label { color: var(--gold); font-weight: 750; }
.metric-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.2rem; align-items: stretch; }
.metric-pair article { min-height: 190px; padding: 1.5rem; border-top: 3px solid var(--ink); background: var(--panel); }
.metric { display: block; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 3.3rem; font-weight: 700; letter-spacing: -.04em; }
.metric-pair h3 { margin: .3rem 0; font-size: 1.05rem; }
.metric-pair p { color: var(--muted); }
.versus { align-self: center; color: var(--muted); font-family: Georgia, "Times New Roman", serif; font-style: italic; }
.verdict { color: var(--muted); font-weight: 750; }
.verdict.is-above { color: var(--wet); }
.verdict.is-below { color: var(--dry); }

.territory-section .section-intro { margin-bottom: 1.5rem; }
.territory-legend { margin-bottom: .6rem; }
.territory-axis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 135px .25rem 250px;
  color: var(--muted);
  font-size: .7rem;
}
.territory-axis span:nth-child(2) { text-align: center; }
.territory-axis span:last-child { text-align: right; }
.territory-row {
  display: grid;
  grid-template-columns: 230px minmax(300px, 1fr) 115px;
  gap: 1rem;
  align-items: center;
  min-height: 43px;
  border-top: 1px solid var(--line);
}
.territory-name { font-weight: 700; }
.territory-track {
  position: relative;
  height: 28px;
  background-image: linear-gradient(to right, transparent 49.8%, var(--line) 49.8%, var(--line) 50.2%, transparent 50.2%);
}
.territory-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 13px;
  height: 1px;
  background: var(--line);
}
.territory-connector {
  position: absolute;
  top: 11px;
  height: 5px;
  background: #7e8d89;
}
.territory-mark {
  position: absolute;
  top: 7px;
  width: 14px;
  height: 14px;
  transform: translateX(-7px);
  border: 2px solid var(--panel);
  border-radius: 50%;
}
.territory-mark.rule { background: var(--wet); }
.territory-mark.common {
  background: var(--panel);
  border: 3px solid var(--dry);
  border-radius: 0;
  transform: translateX(-7px) rotate(45deg);
}
.territory-meta { color: var(--muted); font-size: .76rem; text-align: right; }

.limit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.limit-grid p { margin: 0; padding-top: 1rem; border-top: 3px solid var(--ink); color: var(--muted); }
.limit-grid strong { color: var(--ink); }
.method { max-width: 900px; }
.method code { color: var(--gold); }
.method a { color: var(--wet); text-underline-offset: .18em; }
details { margin-top: 1.5rem; padding: .9rem 1rem; border: 1px solid var(--line); background: var(--panel); }
summary { font-weight: 750; }
footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2.2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .78rem;
}

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; min-height: auto; padding: 3.5rem 0 4.5rem; }
  .hero-score { max-width: 620px; }
  .territory-axis { margin-left: 0; margin-right: 0; }
  .territory-row { grid-template-columns: 1fr; gap: .25rem; padding: .7rem 0; }
  .territory-meta { text-align: left; }
  .limit-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .site-header p { display: none; }
  .site-header, main, footer { width: calc(100% - 1.4rem); max-width: var(--max); }
  h1 { font-size: clamp(3.2rem, 16vw, 4.5rem); }
  .quiz-section, .evidence-section, .territory-section, .limits, .method { padding-block: 4.5rem; }
  .evidence-section, .limits { padding-inline: .7rem; }
  .quiz-card { min-height: 560px; padding: 1.1rem; }
  .place { margin-top: 2.6rem; }
  .answer-grid { grid-template-columns: 1fr; }
  .metric-pair { grid-template-columns: 1fr; }
  .versus { text-align: center; }
  .scroll-note { display: block; }
  .setup-picker { display: grid; }
  footer { display: block; }
}

@media (max-width: 430px) {
  .setup-picker { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  h1 { font-size: 3.15rem; }
  .score-pair strong { font-size: 2.5rem; }
  .quiz-progress { display: grid; }
  .rain-category { font-size: 3.6rem; }
}

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

@media (forced-colors: active) {
  .primary, .grid-cell.is-selected { border: 2px solid ButtonText; }
  .territory-mark, .score-hit, .score-miss { forced-color-adjust: none; }
}
