:root {
  --ink: #1f2d3d;
  --ink-soft: #596675;
  --paper: #f7f4ee;
  --paper-deep: #e9e2d6;
  --white: #fffdf9;
  --orange: #e2765d;
  --orange-deep: #b95743;
  --teal: #6b9790;
  --blue: #476a8a;
  --line: rgba(31, 45, 61, 0.15);
  --display: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --body: "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --max: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: 0.14;
  pointer-events: none;
  background-image: radial-gradient(circle at 82% 0%, rgba(226, 118, 93, 0.22), transparent 25rem), radial-gradient(rgba(31, 45, 61, 0.16) 0.7px, transparent 0.7px);
  background-size: auto, 7px 7px;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}

button,
select,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(calc(100% - 3rem), var(--max));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.6rem 0.8rem;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-top: 4px solid var(--orange);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 244, 238, 0.9);
  backdrop-filter: blur(12px);
}

.header-inner {
  width: min(calc(100% - 3rem), var(--max));
  min-height: 76px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 0.95;
  text-transform: uppercase;
  text-decoration: none;
}

.wordmark-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--white);
  background: var(--ink);
  font-family: Georgia, serif;
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0;
  transform: rotate(-4deg);
}

.header-inner nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.header-inner nav a,
.text-link {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.language-switcher a[aria-current="page"] {
  color: var(--orange-deep);
  font-weight: 700;
  text-decoration: none;
}

.language-switcher span {
  color: var(--ink-soft);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: clamp(3rem, 7vw, 8.5rem);
  align-items: center;
  min-height: 610px;
  padding-block: clamp(4rem, 9vw, 8rem);
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 1.15rem;
  color: var(--orange-deep);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.25;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

h1 {
  max-width: 720px;
  font-size: clamp(3.4rem, 6.4vw, 6.15rem);
}

h2 {
  max-width: 780px;
  font-size: clamp(2.35rem, 4.25vw, 4.2rem);
}

h3 {
  font-size: clamp(1.5rem, 2.2vw, 2.15rem);
}

.dek {
  max-width: 580px;
  margin: 1.7rem 0 0;
  color: var(--ink-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 1.55vw, 1.45rem);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2.3rem;
}

.button-link,
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 46px;
  padding: 0.78rem 1rem;
  color: var(--white);
  background: var(--ink);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-decoration: none;
  border-radius: 10px;
  transition: background-color 160ms ease, transform 160ms ease;
}

.button-link:hover,
.arrow-link:hover {
  background: var(--orange-deep);
  transform: translateY(-2px);
}

.text-link {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.hero-board {
  position: relative;
  min-height: 382px;
  padding: 1.5rem 1.6rem 1.65rem;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, #203448 0%, var(--ink) 68%, #273e50 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: 0 24px 50px rgba(31, 45, 61, 0.16);
}

.hero-board::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -82px;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 25px rgba(255, 255, 255, 0.05), 0 0 0 50px rgba(255, 255, 255, 0.04);
}

.board-topline,
.board-bottomline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(251, 252, 249, 0.62);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-transform: uppercase;
}

.board-topline {
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(251, 252, 249, 0.2);
}

.board-score {
  margin-top: 2.7rem;
  color: var(--orange);
  font-family: var(--display);
  font-size: clamp(5.8rem, 12vw, 9.2rem);
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 0.76;
}

.board-score span {
  margin-left: 0.08em;
  font-size: 0.38em;
  letter-spacing: -0.04em;
}

.board-caption {
  margin-top: 1.45rem;
  color: var(--white);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.board-rule {
  width: 72%;
  margin: 2.8rem 0 1.1rem;
  border-top: 2px solid var(--teal);
}

.board-bottomline {
  display: block;
  max-width: 240px;
  color: rgba(251, 252, 249, 0.72);
  text-transform: none;
}

.board-bottomline strong {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.1;
}

.board-stamp {
  position: absolute;
  right: 1.2rem;
  bottom: 1.5rem;
  padding: 0.38rem 0.48rem;
  color: var(--orange);
  border: 1px solid var(--orange);
  font-family: var(--mono);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.25;
  transform: rotate(-5deg);
}

.section {
  padding-block: clamp(4.5rem, 9vw, 8rem);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 2.5rem;
  align-items: end;
  margin-bottom: 3rem;
}

.section-intro {
  max-width: 370px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
  line-height: 1.5;
}

.controls {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1rem;
  padding-block: 0.8rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.control-group,
.sort-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.control-label {
  margin-right: 0.35rem;
  font-family: var(--mono);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.filter-button,
.preset-button {
  min-height: 34px;
  padding: 0.4rem 0.65rem;
  color: var(--ink-soft);
  border: 1px solid transparent;
  background: transparent;
  font-size: 0.82rem;
  border-radius: 999px;
}

.filter-button:hover,
.filter-button.is-active,
.preset-button:hover,
.preset-button.is-selected {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--white);
}

.sort-control select {
  min-height: 34px;
  padding: 0.3rem 2rem 0.3rem 0.55rem;
  color: var(--ink);
  border: 1px solid var(--line);
  background-color: var(--white);
  font-size: 0.82rem;
  border-radius: 9px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.4);
}

.leaderboard {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}

.leaderboard caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.leaderboard th {
  padding: 0.8rem 0.7rem;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
}

.leaderboard td {
  padding: 1.1rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.leaderboard tbody tr:last-child td {
  border-bottom: 0;
}

.leaderboard tbody tr:hover {
  background: rgba(255, 255, 255, 0.48);
}

.leaderboard td:first-child,
.leaderboard th:first-child {
  width: 66px;
  padding-left: 0;
}

.leaderboard td:nth-child(2) {
  min-width: 290px;
}

.leaderboard td:nth-child(3) {
  min-width: 120px;
  white-space: nowrap;
}

.leaderboard td:nth-child(4) {
  min-width: 190px;
}

.leaderboard td:last-child,
.leaderboard th:last-child {
  padding-right: 0;
}

.leaderboard td strong,
.leaderboard td span {
  display: block;
}

.leaderboard td strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.06rem;
  font-weight: 400;
  line-height: 1.15;
}

.leaderboard td:nth-child(2) span {
  margin-top: 0.25rem;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.rank-cell {
  color: var(--orange-deep);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
}

.score-value {
  font-family: var(--mono);
  font-size: 0.83rem;
  font-weight: 700;
}

.score-meter {
  height: 6px;
  margin-top: 0.5rem;
  background: var(--paper-deep);
}

.score-fill {
  display: block;
  height: 100%;
  background: var(--orange);
}

.fill-100 { width: 100%; }
.fill-58 { width: 58%; }
.fill-53 { width: 53%; }
.fill-51 { width: 51%; }
.fill-50 { width: 50%; }
.fill-49 { width: 49%; }
.fill-47 { width: 47%; }
.fill-35 { width: 35%; }

.leaderboard td a,
.case-note a {
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.73rem;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.table-note,
.empty-state {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.empty-state {
  padding: 1rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
}

.story-lead-link {
  margin: 2.5rem 0 0;
}

.story-lead-link a {
  color: var(--orange-deep);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-underline-offset: 0.3em;
}

.stories-section {
  padding-top: 0;
  border-top: 1px solid var(--line);
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.story-card {
  min-width: 0;
  padding: clamp(1.35rem, 3vw, 2.2rem);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 10px 25px rgba(31, 45, 61, 0.045);
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.story-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 35px rgba(31, 45, 61, 0.1);
}

.story-card-featured {
  grid-column: 1 / -1;
  color: var(--white);
  background: linear-gradient(135deg, #203448 0%, var(--ink) 68%, #273e50 100%);
  border-color: rgba(31, 45, 61, 0.28);
  box-shadow: 0 22px 45px rgba(31, 45, 61, 0.14);
}

.story-card-topline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.1rem;
  color: var(--orange-deep);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-card-featured .story-card-topline {
  color: #f7d8a9;
}

.story-card h3 {
  max-width: 640px;
  color: var(--ink);
  font-size: clamp(1.65rem, 2.7vw, 2.45rem);
}

.story-card-featured h3 {
  color: var(--white);
  font-size: clamp(2rem, 4vw, 3.65rem);
}

.story-incident {
  margin: 0.55rem 0 1.35rem;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.story-card-featured .story-incident {
  color: rgba(251, 252, 249, 0.62);
}

.story-card > p:not(.story-incident):not(.story-takeaway) {
  max-width: 680px;
  margin: 0;
  color: var(--ink-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.03rem;
  line-height: 1.55;
}

.story-card-featured > p:not(.story-incident):not(.story-takeaway) {
  color: rgba(251, 252, 249, 0.82);
}

.story-takeaway {
  max-width: 680px;
  margin: 1.4rem 0 1.6rem;
  padding-top: 1rem;
  color: var(--orange-deep);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.5;
}

.story-card-featured .story-takeaway {
  color: #f7d8a9;
  border-color: rgba(251, 252, 249, 0.25);
}

.story-source {
  display: inline-block;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.story-card-featured .story-source {
  color: #f7d8a9;
}

.calculator-section {
  padding-block: clamp(4rem, 8vw, 7rem);
  color: var(--white);
  background: var(--ink);
}

.calculator-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(400px, 1.1fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: center;
}

.calculator-section .eyebrow {
  color: #f7d8a9;
}

.calculator-section h2 {
  color: var(--white);
}

.calculator-section .section-intro {
  margin-top: 1.5rem;
  color: rgba(251, 252, 249, 0.72);
}

.calculator-card {
  padding: clamp(1.25rem, 3vw, 2rem);
  background: linear-gradient(135deg, #263f55 0%, #1f344a 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 22px 45px rgba(16, 31, 46, 0.2);
}

.calculator-output {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1rem;
  align-items: baseline;
  margin-bottom: 2.3rem;
}

.output-label {
  grid-column: 1 / -1;
  color: rgba(251, 252, 249, 0.58);
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.calculator-output strong {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  letter-spacing: -0.05em;
  line-height: 1;
}

.output-score {
  color: #f7d8a9;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-align: right;
}

#odds-slider {
  width: 100%;
  accent-color: var(--orange);
}

#odds-slider::-webkit-slider-runnable-track {
  height: 6px;
  background: rgba(251, 252, 249, 0.25);
}

#odds-slider::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  margin-top: -8px;
  appearance: none;
  border: 3px solid var(--white);
  border-radius: 50%;
  background: var(--orange);
}

.range-labels,
.target-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(251, 252, 249, 0.58);
  font-family: var(--mono);
  font-size: 0.66rem;
}

.range-labels {
  margin-top: 0.6rem;
}

.target-line {
  margin-top: 1.7rem;
  padding-top: 0.7rem;
  color: #f7d8a9;
  border-top: 1px solid var(--orange);
}

.calculator-note {
  min-height: 3.1em;
  margin: 1.2rem 0 1.5rem;
  color: rgba(251, 252, 249, 0.78);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1.35;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.preset-button {
  color: rgba(251, 252, 249, 0.75);
  border-color: rgba(251, 252, 249, 0.2);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.preset-button:hover,
.preset-button.is-selected {
  color: var(--white);
  border-color: var(--white);
  background: transparent;
}

.method-section {
  padding-bottom: 4.5rem;
}

.method-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(2rem, 6vw, 7rem);
  align-items: start;
}

.formula-card {
  padding: 1.5rem;
  border: 1px solid var(--ink);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 14px 28px rgba(31, 45, 61, 0.06);
}

.formula-label {
  display: block;
  margin-bottom: 2rem;
  color: var(--orange-deep);
  font-family: var(--mono);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.formula {
  margin-bottom: 2.25rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 4.1rem);
  letter-spacing: -0.06em;
  line-height: 1;
}

.formula span {
  white-space: nowrap;
}

.formula-legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.formula-legend div {
  min-width: 0;
}

.formula-legend dt {
  color: var(--orange-deep);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
}

.formula-legend dd {
  margin: 0.15rem 0 0;
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.3;
}

.method-copy {
  max-width: 580px;
  color: var(--ink-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  line-height: 1.55;
}

.method-copy p {
  margin: 0 0 1.4rem;
}

.method-callout {
  margin-top: 2rem !important;
  padding: 1.2rem;
  color: var(--ink);
  border-left: 4px solid var(--orange);
  background: var(--paper-deep);
  font-family: var(--body);
  font-size: 0.9rem;
  line-height: 1.5;
}

.weird-section {
  padding-top: 3rem;
}

.weird-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-block: 1px solid var(--line);
  background: var(--line);
}

.case-note {
  min-height: 300px;
  padding: 1.6rem;
  border-radius: 16px;
  background: var(--paper);
}

.case-number {
  display: block;
  margin-bottom: 3rem;
  color: var(--orange-deep);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.case-note h3 {
  max-width: 260px;
  font-size: clamp(1.6rem, 2.5vw, 2.35rem);
}

.case-note p {
  max-width: 340px;
  margin: 1.2rem 0 1.5rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.sources-section {
  padding-block: clamp(4.5rem, 8vw, 7rem);
  color: var(--white);
  background: var(--orange-deep);
}

.sources-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(3rem, 8vw, 9rem);
}

.sources-section .eyebrow {
  color: #f7d8a9;
}

.sources-section h2 {
  max-width: 500px;
}

.sources-copy {
  max-width: 600px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  line-height: 1.5;
}

.sources-copy p {
  margin: 0 0 1.2rem;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(251, 252, 249, 0.35);
}

.source-links a {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.site-footer {
  color: var(--white);
  background: var(--ink);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-block: 1.4rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.03em;
}

.footer-inner span:nth-child(2) {
  color: rgba(251, 252, 249, 0.58);
}

.footer-inner a {
  white-space: nowrap;
}

.not-found {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 2rem;
}

.not-found main {
  max-width: 600px;
}

.not-found h1 {
  font-size: clamp(3rem, 8vw, 6rem);
}

.not-found main > p:not(.eyebrow) {
  margin-block: 1.5rem 2rem;
  color: var(--ink-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
}

.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;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 4rem;
  }

  .hero-board {
    max-width: 620px;
  }

  .calculator-grid,
  .method-grid,
  .sources-grid {
    grid-template-columns: 1fr;
  }

  .calculator-grid {
    gap: 3rem;
  }

  .section-heading {
    display: block;
  }

  .story-grid {
    grid-template-columns: 1fr;
  }

  .story-card-featured {
    grid-column: auto;
  }

  .section-intro {
    margin-top: 1.4rem;
  }
}

@media (max-width: 720px) {
  .shell,
  .header-inner {
    width: min(calc(100% - 2rem), var(--max));
  }

  .site-header {
    position: relative;
  }

  .header-inner {
    min-height: 68px;
    gap: 0.8rem;
  }

  .wordmark {
    gap: 0.5rem;
    font-size: 0.68rem;
  }

  .wordmark-mark {
    width: 28px;
    height: 28px;
    font-size: 1rem;
  }

  .header-inner nav {
    gap: 0.55rem;
    font-size: 0.55rem;
  }

  .header-inner nav a:last-child {
    display: none;
  }

  .language-switcher {
    gap: 0.25rem;
    font-size: 0.5rem;
    letter-spacing: 0.03em;
  }

  .hero {
    padding-block: 3rem 4.8rem;
  }

  h1 {
    font-size: clamp(2.75rem, 12.2vw, 4.9rem);
  }

  h2 {
    font-size: clamp(2.35rem, 11.4vw, 3.8rem);
  }

  .dek {
    margin-top: 1.2rem;
    font-size: 1rem;
  }

  .hero-actions {
    margin-top: 1.7rem;
  }

  .hero-board {
    min-height: 330px;
    padding: 1.15rem;
    box-shadow: 0 16px 30px rgba(31, 45, 61, 0.14);
  }

  .board-score {
    margin-top: 1.5rem;
    font-size: clamp(5rem, 24vw, 7.5rem);
  }

  .board-rule {
    margin-top: 1.8rem;
  }

  .board-stamp {
    right: 1rem;
    bottom: 1.2rem;
  }

  .controls {
    display: block;
    padding-block: 0.85rem;
  }

  .sort-control {
    margin-top: 0.75rem;
  }

  .leaderboard thead {
    display: none;
  }

  .table-wrap {
    overflow: visible;
  }

  .leaderboard,
  .leaderboard tbody,
  .leaderboard tr,
  .leaderboard td {
    display: block;
  }

  .leaderboard tr {
    position: relative;
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 0 0.5rem;
    padding-block: 1.2rem;
    border-bottom: 1px solid var(--line);
  }

  .leaderboard td {
    min-width: 0 !important;
    padding: 0.22rem 0;
    border: 0;
  }

  .leaderboard td:first-child {
    grid-row: span 4;
    width: auto;
    padding-left: 0;
  }

  .leaderboard td:nth-child(2),
  .leaderboard td:nth-child(3),
  .leaderboard td:nth-child(4),
  .leaderboard td:last-child {
    width: auto;
    padding-right: 0;
  }

  .leaderboard td:nth-child(3),
  .leaderboard td:nth-child(4),
  .leaderboard td:last-child {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
  }

  .leaderboard td:nth-child(3)::before,
  .leaderboard td:nth-child(4)::before,
  .leaderboard td:last-child::before {
    flex: 0 0 auto;
    color: var(--ink-soft);
    font-family: var(--mono);
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .leaderboard td:nth-child(3)::before {
    content: "Survived";
  }

  .leaderboard td:nth-child(4)::before {
    content: "Score";
  }

  .leaderboard td:last-child::before {
    content: "Source";
  }

  .leaderboard td:nth-child(4) {
    flex-wrap: wrap;
  }

  .leaderboard td:nth-child(4) .score-meter {
    flex: 1 0 100%;
    margin-left: 0;
  }

  .calculator-card {
    box-shadow: 0 16px 30px rgba(16, 31, 46, 0.18);
  }

  .calculator-output {
    display: block;
  }

  .output-score {
    display: block;
    margin-top: 0.4rem;
    text-align: left;
  }

  .formula-legend {
    gap: 0.5rem;
  }

  .formula-legend dd {
    font-size: 0.65rem;
  }

  .weird-grid {
    grid-template-columns: 1fr;
  }

  .case-note {
    min-height: 0;
  }

  .case-number {
    margin-bottom: 2rem;
  }

  .footer-inner {
    display: grid;
    gap: 0.45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
