/* Calibrating Posteriors tokens: docs/BRAND_GUIDE.md */
@font-face {
  font-family: "Space Grotesk";
  src: url("./fonts/SpaceGrotesk-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("./fonts/SpaceGrotesk-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("./fonts/Satoshi-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("./fonts/Satoshi-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #0d1b2a;
  --surface: #142640;
  --surface-2: #1a2d52;
  --edge: #1e3158;
  --edge-strong: #2a3f66;
  --ink: #e8e8e8;
  --ink-soft: #a8b8d9;
  --ink-muted: #64748b;
  --navy: #1b3a72;
  --navy-light: #3d5a9c;
  --navy-lighter: #7894c5;
  --navy-ghost: #d6e0f0;
  --amber: #f5a623;
  --chart-bg: #ffffff;
  --chart-text: #1a1a1a;
  --chart-subtext: #888888;
  --chart-grid: #eeeeee;
  --chart-spine: #cccccc;
  --max-width: 1440px;
  --radius: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(120, 148, 197, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 148, 197, 0.045) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: "Satoshi", ui-sans-serif, system-ui, sans-serif;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button,
a,
summary,
input {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 50;
  top: 12px;
  left: 12px;
  transform: translateY(-180%);
  padding: 10px 14px;
  border-radius: 4px;
  background: var(--amber);
  color: var(--bg);
  text-decoration: none;
}

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

.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,
.hero,
.mode-switch,
.workspace,
.methodology,
.site-footer {
  width: min(calc(100% - 48px), var(--max-width));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  border-bottom: 1px solid var(--edge);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.wordmark-mark {
  position: relative;
  width: 22px;
  height: 22px;
  border: 1px solid var(--ink-soft);
  border-radius: 50%;
}

.wordmark-mark::before,
.wordmark-mark::after {
  position: absolute;
  content: "";
}

.wordmark-mark::before {
  top: 10px;
  left: -3px;
  width: 28px;
  border-top: 1px solid var(--ink-soft);
  transform: rotate(-25deg);
}

.wordmark-mark::after {
  top: 5px;
  left: 14px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
}

.edition {
  margin: 0;
  color: var(--ink-muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 80px;
  align-items: end;
  min-height: 560px;
  padding: 112px 0 86px;
}

.eyebrow,
.chart-kicker,
.control-label {
  margin: 0 0 14px;
  color: var(--ink-muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 950px;
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(64px, 8.7vw, 132px);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.87;
}

.hero h1 span {
  color: var(--ink-soft);
}

.hero-deck {
  max-width: 690px;
  margin: 38px 0 0;
  color: var(--ink-soft);
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.55;
}

.hero-measure {
  align-self: center;
  padding-bottom: 6px;
}

.measure-line {
  position: relative;
  height: 40px;
  margin-bottom: 24px;
}

.measure-line span {
  position: absolute;
  top: 20px;
  right: 0;
  left: 0;
  border-top: 1px solid var(--navy-lighter);
}

.measure-line span::before,
.measure-line span::after {
  position: absolute;
  top: -5px;
  width: 1px;
  height: 10px;
  content: "";
  background: var(--navy-lighter);
}

.measure-line span::before { left: 0; }
.measure-line span::after { right: 0; }

.measure-line i {
  position: absolute;
  top: 15px;
  left: 72%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 5px rgba(245, 166, 35, 0.12);
}

.hero-measure p {
  margin: 0;
  color: var(--ink-soft);
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  letter-spacing: 0.03em;
  line-height: 1.7;
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 90px;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  overflow: hidden;
}

.mode-button {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 2px 18px;
  align-items: center;
  min-height: 98px;
  padding: 22px 28px;
  border: 0;
  border-right: 1px solid var(--edge);
  background: rgba(20, 38, 64, 0.72);
  cursor: pointer;
  text-align: left;
}

.mode-button:last-child {
  border-right: 0;
}

.mode-button::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  content: "";
  background: transparent;
}

.mode-button:hover {
  background: var(--surface-2);
}

.mode-button.is-active {
  background: var(--surface-2);
}

.mode-button.is-active::after {
  background: var(--amber);
}

.mode-button > span {
  grid-row: 1 / span 2;
  color: var(--ink-muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
}

.mode-button strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
  font-weight: 500;
}

.mode-button small {
  color: var(--ink-muted);
  font-size: 13px;
}

.workspace,
.methodology {
  padding: 0 0 120px;
}

.section-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 470px);
  gap: 60px;
  align-items: end;
  margin-bottom: 48px;
}

.section-intro h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1;
}

.section-intro > p {
  margin: 0 0 3px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
}

.section-intro.compact {
  margin-bottom: 40px;
}

.section-intro.compact h2 {
  font-size: clamp(38px, 4vw, 58px);
}

.control-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  padding: 24px;
  border: 1px solid var(--edge);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--surface);
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 12px;
  color: var(--ink-muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--edge-strong);
  border-radius: 6px;
  overflow: hidden;
}

.segmented button {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 58px;
  padding: 10px 12px;
  border: 0;
  border-right: 1px solid var(--edge-strong);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button:hover {
  background: rgba(255, 255, 255, 0.04);
}

.segmented button.is-active {
  background: var(--navy-light);
  box-shadow: inset 0 -2px var(--amber);
}

.segmented span {
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 500;
}

.segmented small {
  color: var(--ink-muted);
  font-size: 10px;
}

.segmented .is-active small {
  color: var(--ink-soft);
}

.view-controls {
  display: flex;
  gap: 28px;
  align-items: end;
  white-space: nowrap;
}

.control-label {
  display: block;
  margin-bottom: 10px;
}

.mini-switch {
  display: flex;
  border: 1px solid var(--edge-strong);
  border-radius: 5px;
  overflow: hidden;
}

.mini-switch button,
.roster-presets button,
.goat-presets button {
  padding: 9px 12px;
  border: 0;
  border-right: 1px solid var(--edge-strong);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 11px;
}

.mini-switch button:last-child,
.roster-presets button:last-child,
.goat-presets button:last-child {
  border-right: 0;
}

.mini-switch button.is-active,
.roster-presets button.is-active,
.goat-presets button.is-active {
  background: var(--surface-2);
  color: var(--ink);
}

.toggle {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 38px;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 12px;
}

.toggle input {
  position: absolute;
  opacity: 0;
}

.toggle > span {
  position: relative;
  width: 34px;
  height: 19px;
  border: 1px solid var(--edge-strong);
  border-radius: 99px;
  background: var(--bg);
  transition: background 160ms ease;
}

.toggle > span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  content: "";
  background: var(--ink-muted);
  transition: transform 160ms ease, background 160ms ease;
}

.toggle input:checked + span {
  background: var(--navy-light);
}

.toggle input:checked + span::after {
  background: var(--amber);
  transform: translateX(15px);
}

.takeoff-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  border-right: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
  border-left: 1px solid var(--edge);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}

.chart-card {
  min-width: 0;
  background: var(--chart-bg);
  color: var(--chart-text);
}

.chart-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 34px 8px;
}

.chart-heading .chart-kicker,
.ranking-heading .chart-kicker {
  margin-bottom: 6px;
  color: var(--chart-subtext);
}

.chart-heading h3,
.ranking-heading h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 400;
  letter-spacing: -0.025em;
}

.chart-age {
  flex: 0 0 auto;
  margin-top: 2px;
  padding: 8px 11px;
  border: 1px solid var(--chart-spine);
  border-radius: 4px;
  color: var(--chart-subtext);
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.chart-wrap {
  position: relative;
  min-height: 0;
  padding: 0 10px;
}

#trajectory-chart {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  touch-action: pan-y;
}

#trajectory-chart text {
  font-family: "Space Grotesk", sans-serif;
}

.chart-tooltip {
  position: absolute;
  z-index: 4;
  width: min(260px, calc(100% - 28px));
  padding: 12px 14px;
  border: 1px solid #d5d5d5;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 30px rgba(13, 27, 42, 0.14);
  pointer-events: none;
  color: var(--chart-text);
  font-size: 12px;
}

.tooltip-age {
  margin-bottom: 8px;
  color: var(--chart-subtext);
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.tooltip-row {
  display: grid;
  grid-template-columns: 9px 1fr auto;
  gap: 7px;
  align-items: center;
  padding: 3px 0;
}

.tooltip-row i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.tooltip-row strong {
  font-weight: 500;
}

.tooltip-row span:last-child {
  font-variant-numeric: tabular-nums;
}

.chart-footer {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 17px 34px 22px;
  border-top: 1px solid var(--chart-grid);
}

.chart-footer p {
  max-width: 760px;
  margin: 0;
  color: var(--chart-subtext);
  font-size: 11px;
  line-height: 1.5;
}

.text-button {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 500;
}

.player-panel {
  padding: 28px 22px;
  border-left: 1px solid var(--edge);
  background: var(--surface);
}

.player-panel h3,
.weight-panel h3 {
  margin: -5px 0 20px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  font-weight: 400;
}

.roster-presets,
.goat-presets {
  display: flex;
  margin-bottom: 24px;
  border: 1px solid var(--edge-strong);
  border-radius: 5px;
  overflow: hidden;
}

.roster-presets button,
.goat-presets button {
  flex: 1;
  padding-inline: 6px;
}

.player-group + .player-group {
  margin-top: 20px;
}

.player-group-title {
  margin: 0 0 8px;
  color: var(--ink-muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.player-option {
  display: grid;
  grid-template-columns: 18px 10px 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  cursor: pointer;
  font-size: 12px;
}

.player-option input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--navy-lighter);
}

.player-option input:disabled {
  accent-color: var(--amber);
}

.player-swatch {
  width: 9px;
  height: 3px;
  border-radius: 3px;
}

.player-country {
  color: var(--ink-muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: 9px;
  letter-spacing: 0.05em;
}

.roster-note {
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--edge);
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.45;
}

.snapshot {
  margin-top: 32px;
  padding: 28px;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: rgba(20, 38, 64, 0.74);
}

.snapshot > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 22px;
}

.snapshot h3 {
  margin: -5px 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 25px;
  font-weight: 400;
}

.snapshot header > p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 11px;
}

.snapshot-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--edge);
  border: 1px solid var(--edge);
}

.snapshot-item {
  position: relative;
  min-height: 120px;
  padding: 18px;
  background: var(--surface);
}

.snapshot-item.is-anchor::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  content: "";
  background: var(--amber);
}

.snapshot-rank {
  color: var(--ink-muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
}

.snapshot-item h4 {
  margin: 14px 0 4px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  font-weight: 500;
}

.snapshot-value {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.goat-workspace {
  min-height: 900px;
}

.goat-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  overflow: hidden;
}

.weight-panel {
  padding: 30px 26px;
  border-right: 1px solid var(--edge);
  background: var(--surface);
}

.goat-presets {
  flex-wrap: wrap;
}

.goat-presets button {
  min-width: 50%;
  border-bottom: 1px solid var(--edge-strong);
}

.goat-presets button:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.goat-presets button:nth-child(2) {
  border-right: 0;
}

.weight-control + .weight-control {
  margin-top: 24px;
}

.weight-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.weight-label span {
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
}

.weight-label output {
  color: var(--ink-soft);
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.weight-control p {
  margin: 7px 0 0;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.4;
}

.weight-control input[type="range"] {
  width: 100%;
  height: 4px;
  margin: 0;
  border-radius: 99px;
  appearance: none;
  background: var(--edge-strong);
  cursor: pointer;
}

.weight-control input[type="range"]::-webkit-slider-thumb {
  width: 15px;
  height: 15px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  appearance: none;
  background: var(--navy-lighter);
  box-shadow: 0 0 0 1px var(--edge-strong);
}

.weight-control input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--navy-lighter);
}

.weight-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--edge);
  color: var(--ink-muted);
  font-size: 11px;
}

.weight-total strong {
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  font-weight: 400;
}

.goat-ranking {
  min-width: 0;
  padding: 30px 34px 38px;
  background: var(--chart-bg);
  color: var(--chart-text);
}

.ranking-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--chart-grid);
}

.ranking-heading > p {
  max-width: 300px;
  margin: 3px 0 0;
  color: var(--chart-subtext);
  font-size: 11px;
  text-align: right;
}

.goat-list {
  padding-top: 16px;
}

.goat-row {
  display: grid;
  grid-template-columns: 32px minmax(110px, 160px) minmax(150px, 1fr) 56px;
  gap: 14px;
  align-items: center;
  min-height: 47px;
  border-bottom: 1px solid var(--chart-grid);
}

.goat-row:last-child {
  border-bottom: 0;
}

.goat-position {
  color: var(--chart-subtext);
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.goat-name {
  overflow: hidden;
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-track {
  height: 8px;
  background: var(--chart-grid);
}

.score-bar {
  height: 100%;
  background: var(--navy);
  transform-origin: left center;
  transition: width 240ms ease;
}

.goat-row:first-child .score-bar {
  background: var(--amber);
}

.goat-score {
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.goat-explainer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  margin-top: 18px;
  padding: 0 4px;
  color: var(--ink-muted);
  font-size: 11px;
}

.goat-explainer p {
  margin: 0;
}

.goat-explainer strong {
  color: var(--ink-soft);
  font-weight: 500;
}

.methodology {
  padding-top: 104px;
  border-top: 1px solid var(--edge);
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  overflow: hidden;
}

.method-grid article {
  min-height: 285px;
  padding: 30px;
  border-right: 1px solid var(--edge);
  background: rgba(20, 38, 64, 0.74);
}

.method-grid article:last-child {
  border-right: 0;
}

.method-number {
  color: var(--amber);
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
}

.method-grid h3,
.detail-columns h3 {
  margin: 52px 0 14px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 19px;
  font-weight: 400;
}

.method-grid p,
.detail-columns p,
.detail-columns li {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.method-grid code {
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
}

.method-details {
  border-right: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
  border-left: 1px solid var(--edge);
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface);
}

.method-details summary {
  padding: 18px 24px;
  cursor: pointer;
  color: var(--ink-soft);
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  list-style: none;
}

.method-details summary::-webkit-details-marker {
  display: none;
}

.method-details summary::after {
  float: right;
  content: "+";
  color: var(--amber);
}

.method-details[open] summary::after {
  content: "−";
}

.detail-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 8px 24px 28px;
  border-top: 1px solid var(--edge);
}

.detail-columns h3 {
  margin-top: 24px;
  font-size: 14px;
}

.detail-columns ul {
  margin: 0;
  padding-left: 16px;
}

.detail-columns a {
  text-decoration-color: var(--edge-strong);
  text-underline-offset: 3px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 28px 0 46px;
  border-top: 1px solid var(--edge);
  color: var(--ink-muted);
  font-size: 10px;
}

.site-footer p {
  margin: 0;
}

.site-footer span {
  margin: 0 5px;
  color: var(--amber);
}

@media (max-width: 1180px) {
  .control-rail {
    grid-template-columns: 1fr;
  }

  .view-controls {
    justify-content: space-between;
  }

  .takeoff-grid {
    grid-template-columns: minmax(0, 1fr) 245px;
  }

  .segmented small {
    display: none;
  }
}

@media (max-width: 940px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 56px;
    min-height: auto;
    padding-top: 90px;
  }

  .hero-measure {
    max-width: 320px;
  }

  .section-intro {
    grid-template-columns: 1fr;
    gap: 22px;
  }

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

  .player-panel {
    border-top: 1px solid var(--edge);
    border-left: 0;
  }

  .player-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 24px;
  }

  .player-group + .player-group {
    margin-top: 0;
  }

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

  .weight-panel {
    border-right: 0;
    border-bottom: 1px solid var(--edge);
  }

  .weight-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 30px;
  }

  .weight-control + .weight-control {
    margin-top: 0;
  }

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

  .method-grid article {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--edge);
  }

  .method-grid article:last-child {
    border-bottom: 0;
  }

  .method-grid h3 {
    margin-top: 28px;
  }
}

@media (max-width: 680px) {
  .site-header,
  .hero,
  .mode-switch,
  .workspace,
  .methodology,
  .site-footer {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .site-header {
    min-height: 64px;
  }

  .wordmark {
    font-size: 10px;
  }

  .edition {
    display: none;
  }

  .hero {
    gap: 48px;
    padding: 72px 0 64px;
  }

  .hero h1 {
    font-size: clamp(52px, 17vw, 86px);
  }

  .hero-deck {
    margin-top: 28px;
    font-size: 16px;
  }

  .mode-switch {
    grid-template-columns: 1fr;
    margin-bottom: 72px;
  }

  .mode-button {
    border-right: 0;
    border-bottom: 1px solid var(--edge);
  }

  .mode-button:last-child {
    border-bottom: 0;
  }

  .workspace,
  .methodology {
    padding-bottom: 88px;
  }

  .section-intro h2 {
    font-size: 42px;
  }

  .control-rail {
    padding: 18px;
  }

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

  .segmented button {
    min-height: 50px;
    border-right: 0;
    border-bottom: 1px solid var(--edge-strong);
  }

  .segmented button:last-child {
    border-bottom: 0;
  }

  .view-controls {
    align-items: start;
    flex-direction: column;
    gap: 12px;
  }

  .chart-heading {
    align-items: start;
    flex-direction: column;
    padding: 24px 20px 0;
  }

  .chart-wrap,
  #trajectory-chart {
    min-height: 0;
  }

  .chart-wrap {
    padding-top: 18px;
    padding-bottom: 12px;
  }

  .chart-footer {
    align-items: start;
    flex-direction: column;
    padding-inline: 20px;
  }

  .player-list {
    grid-template-columns: 1fr 1fr;
  }

  .snapshot {
    padding: 20px;
  }

  .snapshot > header,
  .ranking-heading,
  .goat-explainer,
  .site-footer {
    align-items: start;
    flex-direction: column;
  }

  .ranking-heading > p {
    text-align: left;
  }

  .weight-controls {
    grid-template-columns: 1fr;
  }

  .goat-ranking {
    padding-inline: 20px;
  }

  .goat-row {
    grid-template-columns: 22px minmax(0, 132px) minmax(32px, 1fr) 38px;
    gap: 6px;
  }

  .goat-name {
    font-size: 11px;
  }

  .site-footer {
    display: flex;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
