:root {
  --ink: #17211d;
  --muted: #68736e;
  --forest: #163d32;
  --forest-2: #205746;
  --forest-3: #0e2b23;
  --lime: #d6ef73;
  --lime-2: #bedc52;
  --coral: #f0835c;
  --cream: #f4f2e9;
  --paper: #fffef9;
  --line: #d9ddd5;
  --line-dark: rgba(255, 255, 255, 0.16);
  --shadow: 0 18px 50px rgba(21, 50, 41, 0.09);
  --radius: 18px;
  --radius-sm: 10px;
  --page: min(1380px, calc(100% - 64px));
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: -0.035em;
  line-height: 1.05;
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: var(--paper);
  background: var(--forest-3);
  border-radius: 7px;
  transform: translateY(-150%);
}

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

.page-shell {
  width: var(--page);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 76px;
  padding: 10px max(32px, calc((100vw - 1380px) / 2));
  border-bottom: 1px solid rgba(22, 61, 50, 0.1);
  background: rgba(244, 242, 233, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: max-content;
  color: var(--forest);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  color: var(--forest-3);
  background: var(--lime);
  border: 2px solid var(--forest);
  border-radius: 50%;
  box-shadow: inset -6px -5px 0 rgba(22, 61, 50, 0.08);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  width: 3px;
  height: 3px;
  content: "";
  background: rgba(22, 61, 50, 0.28);
  border-radius: 50%;
  box-shadow: 8px -6px rgba(22, 61, 50, 0.24), -7px 7px rgba(22, 61, 50, 0.22),
    10px 10px rgba(22, 61, 50, 0.2), -10px -8px rgba(22, 61, 50, 0.18);
}

.brand-mark::before {
  top: 13px;
  left: 13px;
}

.brand-mark::after {
  right: 12px;
  bottom: 12px;
}

.brand-mark span {
  position: relative;
  z-index: 1;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  line-height: 1.1;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  line-height: 1;
  text-transform: uppercase;
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.primary-nav a {
  position: relative;
  color: #39463f;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.primary-nav a::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--forest);
  transform: scaleX(0);
  transition: transform 160ms ease;
}

.primary-nav a:hover::after,
.primary-nav a:focus-visible::after {
  transform: scaleX(1);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.global-search {
  position: relative;
}

.global-search input,
.search-field input {
  width: 210px;
  height: 42px;
  padding: 0 14px 0 39px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.global-search input:focus,
.search-field input:focus {
  border-color: var(--forest-2);
  box-shadow: 0 0 0 3px rgba(32, 87, 70, 0.12);
}

.search-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 15px;
  width: 13px;
  height: 13px;
  border: 1.8px solid #66736d;
  border-radius: 50%;
  transform: translateY(-58%);
}

.search-icon::after {
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 6px;
  height: 2px;
  content: "";
  background: #66736d;
  border-radius: 2px;
  transform: rotate(45deg);
}

.search-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  max-height: 390px;
  padding: 7px;
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 20px 45px rgba(19, 44, 36, 0.18);
}

.search-result {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 11px;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 9px;
}

.search-result:hover,
.search-result:focus-visible {
  background: #eff1e9;
  outline: none;
}

.search-result strong,
.search-result small {
  display: block;
}

.search-result strong {
  font-size: 13px;
}

.search-result small,
.search-empty {
  color: var(--muted);
  font-size: 11px;
}

.search-result-type {
  padding: 4px 7px;
  color: var(--forest);
  background: rgba(214, 239, 115, 0.42);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-empty {
  padding: 13px;
}

.season-control {
  display: flex;
  height: 42px;
  align-items: center;
  gap: 8px;
  padding-left: 13px;
  background: var(--forest);
  border-radius: 999px;
}

.season-control span {
  color: rgba(255, 255, 255, 0.64);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.season-control select {
  height: 100%;
  max-width: 160px;
  padding: 0 34px 0 0;
  color: #fff;
  background: transparent;
  border: 0;
  outline: none;
  font-size: 12px;
  font-weight: 750;
}

.season-control option {
  color: var(--ink);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
  min-height: 370px;
  overflow: hidden;
  color: white;
  background: var(--forest);
}

.hero::before {
  position: absolute;
  top: -300px;
  left: -100px;
  width: 620px;
  height: 620px;
  content: "";
  border: 1px solid rgba(214, 239, 115, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 90px rgba(214, 239, 115, 0.025),
    0 0 0 180px rgba(214, 239, 115, 0.018);
}

.hero::after {
  position: absolute;
  right: 42%;
  bottom: -140px;
  width: 280px;
  height: 280px;
  content: "";
  background: var(--lime);
  border-radius: 50%;
  opacity: 0.07;
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 64px));
  align-self: center;
  justify-self: end;
  padding: 46px 70px 46px 0;
}

.eyebrow {
  margin-bottom: 15px;
  color: var(--forest-2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow-light {
  color: var(--lime);
}

.hero h1 {
  max-width: 680px;
  margin-bottom: 18px;
  font-size: clamp(40px, 4.4vw, 66px);
  font-weight: 780;
  letter-spacing: -0.07em;
}

.hero-intro {
  max-width: 560px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 15px;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  color: var(--lime);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.hero-link span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(214, 239, 115, 0.5);
  border-radius: 50%;
  transition: background 150ms ease, color 150ms ease;
}

.hero-link:hover span {
  color: var(--forest);
  background: var(--lime);
}

.hero-scorecard {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  min-width: 0;
  padding: 32px 50px 0;
  background: var(--lime);
  color: var(--forest-3);
}

.scorecard-topline {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(14, 43, 35, 0.2);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-leader {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 22px 0;
}

.leader-place {
  font-family: var(--mono);
  font-size: clamp(52px, 5vw, 74px);
  font-weight: 800;
  letter-spacing: -0.1em;
  line-height: 1;
}

.stat-label {
  display: block;
  margin-bottom: 4px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-leader strong {
  display: block;
  max-width: 260px;
  font-size: clamp(20px, 2vw, 30px);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.leader-total {
  align-self: center;
  padding: 8px 10px;
  border: 1px solid rgba(14, 43, 35, 0.3);
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
}

.leader-total::after {
  margin-left: 4px;
  content: "total";
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 17px 0;
  border-top: 1px solid rgba(14, 43, 35, 0.2);
}

.hero-metrics div + div {
  padding-left: 22px;
  border-left: 1px solid rgba(14, 43, 35, 0.2);
}

.hero-metrics strong,
.hero-metrics span {
  display: block;
}

.hero-metrics strong {
  font-family: var(--mono);
  font-size: 21px;
  line-height: 1;
}

.hero-metrics span {
  margin-top: 8px;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.scorecard-stripes {
  height: 28px;
  margin: 0 -50px;
  background: repeating-linear-gradient(
    -45deg,
    rgba(22, 61, 50, 0.08),
    rgba(22, 61, 50, 0.08) 10px,
    transparent 10px,
    transparent 22px
  );
}

.load-error {
  margin-top: 32px;
  padding: 18px 22px;
  color: #7a2415;
  background: #ffe3d8;
  border: 1px solid #f0ad96;
  border-radius: 10px;
}

.load-error strong,
.load-error span {
  display: block;
}

.load-error span {
  margin-top: 3px;
  font-size: 13px;
}

.section {
  padding-block: 100px;
}

.section-tint {
  background: #e9ece2;
  border-block: 1px solid #d8dcd2;
}

.section-heading {
  margin-bottom: 42px;
}

.section-heading h2 {
  max-width: 720px;
  margin-bottom: 15px;
  color: var(--forest-3);
  font-size: clamp(39px, 4.5vw, 64px);
  letter-spacing: -0.065em;
}

.section-heading > p:last-child,
.section-heading > div > p:last-child {
  max-width: 670px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
}

.split-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 50px;
}

.section-meta {
  display: flex;
  min-width: max-content;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  color: #516059;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: #5f9f58;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(95, 159, 88, 0.14);
}

.table-card,
.chart-card {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-toolbar,
.mini-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.card-toolbar {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--line);
}

.card-toolbar h3,
.mini-card-heading h3 {
  margin-bottom: 4px;
  color: var(--forest-3);
  font-size: 21px;
}

.card-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.search-field {
  position: relative;
}

.search-field input {
  width: 190px;
  background: #f7f7f1;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  scrollbar-color: #a8b2ac transparent;
  scrollbar-width: thin;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 15px 13px;
  text-align: right;
  border-bottom: 1px solid #e7e9e3;
  white-space: nowrap;
}

th:first-child,
td:first-child,
th:nth-child(2),
td:nth-child(2) {
  text-align: left;
}

thead th {
  padding-block: 12px;
  color: #737d78;
  background: #f7f7f2;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

thead th button {
  position: relative;
  padding: 0 14px 0 0;
  color: inherit;
  background: transparent;
  border: 0;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

thead th button::after {
  position: absolute;
  top: 50%;
  right: 0;
  content: "↕";
  color: #a4aca7;
  font-size: 9px;
  transform: translateY(-52%);
}

thead th[aria-sort="ascending"] button::after {
  content: "↑";
  color: var(--forest);
}

thead th[aria-sort="descending"] button::after {
  content: "↓";
  color: var(--forest);
}

tbody td {
  color: #3d4943;
  font-family: var(--mono);
  font-size: 12px;
}

#standings-table tbody tr {
  cursor: pointer;
  transition: background 120ms ease;
}

#standings-table tbody tr:hover,
#standings-table tbody tr:focus {
  background: #f2f5e8;
  outline: none;
}

#standings-table tbody tr.selected {
  background: rgba(214, 239, 115, 0.2);
  box-shadow: inset 3px 0 var(--forest);
}

#standings-table .place-cell {
  width: 50px;
  color: var(--forest);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 850;
}

#standings-table .team-cell {
  min-width: 175px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 800;
}

#standings-table .total-cell {
  color: var(--forest);
  font-weight: 900;
}

.table-note {
  margin: 0;
  padding: 14px 28px;
  color: var(--muted);
  background: #f7f7f2;
  font-size: 10px;
}

.field {
  display: grid;
  gap: 7px;
}

.field > span {
  color: #6b7671;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.field select {
  min-width: 190px;
  height: 44px;
  padding: 0 42px 0 13px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #cdd2ca;
  border-radius: 9px;
  outline: none;
  font-size: 13px;
  font-weight: 750;
}

.field select:focus {
  border-color: var(--forest-2);
  box-shadow: 0 0 0 3px rgba(32, 87, 70, 0.12);
}

.chart-controls,
.sandbag-controls {
  display: flex;
  align-items: flex-end;
  gap: 18px;
}

.toggle-control {
  display: flex;
  height: 44px;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  color: #4f5b55;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid #cdd2ca;
  border-radius: 9px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.toggle-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toggle-control > span {
  position: relative;
  width: 30px;
  height: 18px;
  background: #aab3ad;
  border-radius: 99px;
  transition: background 140ms ease;
}

.toggle-control > span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  content: "";
  background: white;
  border-radius: 50%;
  transition: transform 140ms ease;
}

.toggle-control input:checked + span {
  background: var(--forest-2);
}

.toggle-control input:checked + span::after {
  transform: translateX(12px);
}

.toggle-control input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(32, 87, 70, 0.17);
}

.movement-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  min-height: 520px;
  padding: 28px 26px 24px;
}

.chart {
  position: relative;
  width: 100%;
  min-width: 0;
}

.chart svg {
  display: block;
  max-width: 100%;
  overflow: visible;
}

.movement-chart {
  min-height: 460px;
}

.movement-legend {
  display: grid;
  align-content: start;
  gap: 4px;
  max-height: 450px;
  padding: 5px 0 5px 24px;
  overflow-y: auto;
  border-left: 1px solid var(--line);
}

.legend-team {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 8px;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 10px;
}

.legend-team:hover,
.legend-team:focus-visible,
.legend-team.active {
  background: #f0f3e8;
  outline: none;
}

.legend-team i {
  width: 8px;
  height: 8px;
  background: var(--team-color);
  border-radius: 50%;
}

.legend-team span {
  overflow: hidden;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-team small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.axis text {
  fill: #78837d;
  font-family: var(--sans);
  font-size: 10px;
}

.axis path,
.axis line {
  stroke: #cfd5cd;
}

.grid line {
  stroke: #dfe3dc;
  stroke-dasharray: 2 4;
}

.grid path {
  display: none;
}

.chart-axis-label {
  fill: #6a756f;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.movement-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 130ms ease, stroke-width 130ms ease;
}

.movement-point {
  stroke: var(--paper);
  stroke-width: 1.5;
}

.leader-line {
  stroke: var(--forest);
  stroke-dasharray: 5 5;
  opacity: 0.45;
}

.player-picker {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin: -8px 0 34px;
  padding: 20px 22px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.player-picker .field {
  flex: 1;
}

.player-picker select {
  width: 100%;
}

.picker-arrow {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--forest-2);
  font-weight: 900;
}

.player-overview {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  gap: 24px;
  margin-bottom: 24px;
}

.player-profile {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: space-between;
  gap: 28px;
  min-height: 390px;
  padding: 30px;
  overflow: hidden;
  color: white;
  background: var(--forest);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.player-profile::after {
  position: absolute;
  right: -60px;
  bottom: -90px;
  width: 230px;
  height: 230px;
  content: "";
  border: 34px solid rgba(214, 239, 115, 0.08);
  border-radius: 50%;
}

.player-kicker {
  display: block;
  margin-bottom: 11px;
  color: var(--lime);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.player-profile h3 {
  max-width: 330px;
  margin: 0;
  font-size: clamp(31px, 3vw, 45px);
}

.cap-badge {
  display: grid;
  width: 78px;
  height: 78px;
  place-content: center;
  text-align: center;
  color: var(--forest-3);
  background: var(--lime);
  border-radius: 50%;
}

.cap-badge span {
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cap-badge strong {
  font-family: var(--mono);
  font-size: 27px;
  line-height: 1.1;
}

.player-stat-grid {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid rgba(255, 255, 255, 0.16);
}

.player-stat-grid div {
  padding: 18px 0;
}

.player-stat-grid div + div {
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.player-stat-grid span,
.player-stat-grid strong {
  display: block;
}

.player-stat-grid span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.player-stat-grid strong {
  margin-top: 7px;
  font-family: var(--mono);
  font-size: 20px;
}

.player-profile > p {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  max-width: 430px;
  margin: 0;
  color: rgba(255, 255, 255, 0.54);
  font-size: 10px;
}

.player-chart-card {
  min-height: 390px;
  padding: 27px 28px 22px;
}

.mini-card-heading {
  margin-bottom: 20px;
}

.mini-label {
  display: block;
  margin-bottom: 7px;
  color: var(--forest-2);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.key,
.ranking-key {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.key span,
.ranking-key span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.key i,
.ranking-key i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.gross-key {
  background: var(--coral);
}

.net-key {
  background: var(--forest-2);
}

.under-par-key {
  background: var(--lime);
}

.even-key {
  background: #aeb8b2;
}

.over-par-key {
  background: var(--coral);
}

.distribution-chart {
  min-height: 285px;
}

.empty-chart {
  display: grid;
  min-height: inherit;
  place-items: center;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.rounds-card {
  padding: 27px 28px 0;
}

.rounds-chart {
  min-height: 340px;
}

.rounds-summary {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.score-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.score-point {
  stroke: white;
  stroke-width: 2;
}

.par-line {
  stroke: #9ca69f;
  stroke-dasharray: 5 5;
}

.compact-table-scroll {
  margin: 8px -28px 0;
}

.rounds-table th,
.rounds-table td {
  padding-block: 11px;
  text-align: center;
}

.rounds-table th:first-child,
.rounds-table td:first-child {
  padding-left: 28px;
  text-align: left;
}

.rounds-table th:last-child,
.rounds-table td:last-child {
  padding-right: 28px;
}

.rounds-table .under-par {
  color: var(--forest-2);
  font-weight: 900;
}

.rounds-table .over-par {
  color: #ae5237;
}

.section-dark {
  color: white;
  background: var(--forest-3);
}

.dark-heading h2 {
  color: white;
}

.dark-heading > div > p:last-child {
  color: rgba(255, 255, 255, 0.55);
}

.segmented {
  display: flex;
  height: 44px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line-dark);
  border-radius: 10px;
}

.segmented button {
  padding: 0 15px;
  color: rgba(255, 255, 255, 0.57);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 850;
}

.segmented button.active {
  color: var(--forest-3);
  background: var(--lime);
}

.field-dark > span {
  color: rgba(255, 255, 255, 0.47);
}

.field-dark select {
  min-width: 140px;
  color: white;
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--line-dark);
}

.field-dark select:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(214, 239, 115, 0.12);
}

.field-dark option {
  color: var(--ink);
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.65fr);
  gap: 24px;
}

.ranking-chart-wrap {
  min-width: 0;
  padding: 24px 26px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
}

.ranking-key {
  justify-content: flex-end;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.6);
}

.ranking-chart {
  min-height: 560px;
}

.ranking-chart .axis text {
  fill: rgba(255, 255, 255, 0.55);
}

.ranking-chart .axis path,
.ranking-chart .axis line {
  stroke: rgba(255, 255, 255, 0.13);
}

.ranking-chart .grid line {
  stroke: rgba(255, 255, 255, 0.1);
}

.ranking-label {
  fill: rgba(255, 255, 255, 0.78);
  font-size: 9px;
  font-weight: 750;
}

.ranking-connector {
  stroke: rgba(255, 255, 255, 0.28);
  stroke-linecap: round;
  stroke-width: 3;
}

.net-par-line {
  stroke: rgba(255, 255, 255, 0.72);
  stroke-dasharray: 4 4;
  stroke-width: 1.5;
}

.ranking-list-card {
  padding: 27px 25px;
  color: var(--ink);
  background: var(--lime);
  border-radius: var(--radius);
}

.ranking-list-card .mini-label {
  color: var(--forest-2);
}

.ranking-list {
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: ranking;
}

.ranking-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  border-top: 1px solid rgba(14, 43, 35, 0.16);
  counter-increment: ranking;
}

.ranking-list li::before {
  content: counter(ranking, decimal-leading-zero);
  color: rgba(14, 43, 35, 0.48);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
}

.ranking-list strong,
.ranking-list small {
  display: block;
}

.ranking-list strong {
  overflow: visible;
  font-size: 12px;
  line-height: 1.25;
  text-overflow: clip;
  white-space: normal;
}

.ranking-list small {
  margin-top: 2px;
  color: rgba(14, 43, 35, 0.57);
  font-size: 9px;
}

.ranking-list-value {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 900;
}

.ranking-list-value span {
  margin-left: 2px;
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.method-note {
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
}

.site-footer {
  padding-block: 35px;
  color: white;
  background: #091d17;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer .page-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.footer-brand {
  color: white;
}

.footer-brand small {
  color: rgba(255, 255, 255, 0.45);
}

.site-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
}

.chart-tooltip {
  position: fixed;
  z-index: 500;
  max-width: 250px;
  padding: 10px 12px;
  color: white;
  pointer-events: none;
  background: #0a251d;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
  font-size: 10px;
  line-height: 1.45;
}

.chart-tooltip strong {
  display: block;
  margin-bottom: 2px;
  color: var(--lime);
  font-size: 11px;
}

.chart-tooltip .tooltip-values {
  display: grid;
  grid-template-columns: auto auto;
  gap: 1px 13px;
  margin-top: 6px;
}

.chart-tooltip .tooltip-values span:nth-child(even) {
  text-align: right;
  font-family: var(--mono);
}

.noscript {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  padding: 12px 16px;
  color: white;
  background: #872f1c;
  border-radius: 8px;
}

@media (max-width: 1120px) {
  :root {
    --page: min(100% - 40px, 980px);
  }

  .site-header {
    padding-inline: 20px;
  }

  .primary-nav {
    display: none;
  }

  .site-header {
    grid-template-columns: auto 1fr;
  }

  .header-tools {
    justify-self: end;
  }

  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  }

  .hero-copy {
    padding-right: 45px;
  }

  .hero-scorecard {
    padding-inline: 38px;
  }

  .scorecard-stripes {
    margin-inline: -38px;
  }

  .split-heading {
    align-items: flex-start;
  }

  .chart-controls,
  .sandbag-controls {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .ranking-layout {
    grid-template-columns: 1fr;
  }

  .ranking-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 30px;
  }
}

@media (max-width: 820px) {
  :root {
    --page: calc(100% - 32px);
  }

  .global-search input {
    width: 42px;
    padding-right: 0;
    cursor: pointer;
  }

  .global-search input::placeholder {
    color: transparent;
  }

  .global-search input:focus {
    width: min(220px, 42vw);
    padding-right: 12px;
    cursor: text;
  }

  .global-search input:focus::placeholder {
    color: #7a847f;
  }

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

  .hero-copy {
    width: var(--page);
    justify-self: center;
    padding: 48px 0 42px;
  }

  .hero-scorecard {
    min-height: 285px;
    padding-top: 24px;
  }

  .section {
    padding-block: 76px;
  }

  .split-heading {
    display: grid;
    gap: 28px;
  }

  .section-meta,
  .chart-controls,
  .sandbag-controls {
    justify-self: start;
  }

  .movement-card {
    grid-template-columns: 1fr;
  }

  .movement-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
    padding: 20px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

  .player-profile {
    min-height: 340px;
  }

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

@media (max-width: 620px) {
  :root {
    --page: calc(100% - 24px);
  }

  .site-header {
    min-height: 68px;
    padding-inline: 12px;
  }

  .brand strong {
    max-width: 72px;
  }

  .brand small,
  .season-control > span {
    display: none;
  }

  .brand-mark {
    width: 39px;
    height: 39px;
  }

  .season-control {
    padding-left: 12px;
  }

  .season-control select {
    max-width: 112px;
  }

  .hero-copy {
    padding: 40px 0 36px;
  }

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

  .hero-intro {
    font-size: 15px;
  }

  .hero-scorecard {
    min-height: 275px;
    padding-inline: 24px;
  }

  .scorecard-stripes {
    margin-inline: -24px;
  }

  .hero-leader {
    grid-template-columns: auto 1fr;
  }

  .leader-total {
    display: none;
  }

  .section-heading h2 {
    font-size: 40px;
  }

  .card-toolbar {
    align-items: flex-start;
    padding-inline: 18px;
  }

  .card-toolbar p {
    display: none;
  }

  .search-field input {
    width: 145px;
  }

  .table-note {
    padding-inline: 18px;
  }

  .chart-controls,
  .sandbag-controls {
    width: 100%;
    align-items: stretch;
  }

  .chart-controls .field,
  .chart-controls select,
  .sandbag-controls .field,
  .sandbag-controls select {
    width: 100%;
  }

  .chart-controls .field {
    flex: 1 0 100%;
  }

  .movement-card {
    padding-inline: 12px;
  }

  .movement-legend {
    grid-template-columns: 1fr;
  }

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

  .picker-arrow {
    display: none;
  }

  .player-profile {
    padding: 24px;
  }

  .player-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .player-stat-grid div:nth-child(3) {
    padding-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    border-left: 0;
  }

  .player-stat-grid div:nth-child(4) {
    border-top: 1px solid rgba(255, 255, 255, 0.16);
  }

  .player-chart-card,
  .rounds-card {
    padding-inline: 18px;
  }

  .compact-table-scroll {
    margin-inline: -18px;
  }

  .rounds-table th:first-child,
  .rounds-table td:first-child {
    padding-left: 18px;
  }

  .rounds-table th:last-child,
  .rounds-table td:last-child {
    padding-right: 18px;
  }

  .segmented {
    flex: 1 0 100%;
  }

  .segmented button {
    flex: 1;
  }

  .field-dark {
    flex: 1;
  }

  .ranking-chart-wrap {
    padding-inline: 10px;
  }

  .site-footer .page-shell {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

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