:root {
  --night: #06111f;
  --night-soft: #0a1829;
  --panel: rgba(11, 28, 47, 0.88);
  --panel-bright: rgba(17, 39, 64, 0.95);
  --line: rgba(173, 202, 225, 0.16);
  --muted: #8ea5bb;
  --paper: #f5f2e9;
  --gold: #f2b631;
  --gold-soft: #ffd77a;
  --mint: #48dfb0;
  --blue: #54b8f7;
  --danger: #ff7979;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--paper);
  background: var(--night);
  font-family: "Avenir Next", "Trebuchet MS", sans-serif;
  line-height: 1.45;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(circle at 15% 10%, rgba(242, 182, 49, 0.15), transparent 26%),
    radial-gradient(circle at 84% 24%, rgba(72, 223, 176, 0.1), transparent 25%),
    linear-gradient(145deg, #06111f 0%, #081827 52%, #07111d 100%);
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

.masthead {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  padding: 54px max(5vw, 28px) 38px;
  border-bottom: 1px solid rgba(242, 182, 49, 0.38);
  background:
    linear-gradient(110deg, rgba(6, 17, 31, 0.08), rgba(6, 17, 31, 0.95)),
    radial-gradient(circle at 15% 20%, rgba(242, 182, 49, 0.28), transparent 44%);
}

.masthead::after {
  position: absolute;
  right: -90px;
  bottom: -235px;
  width: 660px;
  height: 660px;
  border: 1px solid rgba(242, 182, 49, 0.2);
  border-radius: 50%;
  box-shadow:
    0 0 0 60px rgba(242, 182, 49, 0.025),
    0 0 0 140px rgba(242, 182, 49, 0.018);
  content: "";
}

.masthead-copy,
.filters,
.freshness {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-heading p,
.panel-heading p,
.boundary-note > p {
  margin: 0;
  color: var(--muted);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow span {
  display: inline-block;
  margin-right: 10px;
  padding: 5px 8px;
  color: var(--night);
  background: var(--gold);
  border-radius: 3px;
  letter-spacing: 0.12em;
}

h1,
h2,
h3,
p {
  max-width: 100%;
}

h1 {
  margin: 28px 0 4px;
  font-family: "DIN Condensed", "Avenir Next Condensed", sans-serif;
  font-size: clamp(5.4rem, 13vw, 11rem);
  font-weight: 300;
  letter-spacing: -0.065em;
  line-height: 0.78;
  text-transform: uppercase;
}

h1 strong {
  color: var(--gold);
  font-weight: 900;
}

.dek {
  max-width: 650px;
  margin: 28px 0 0;
  color: #c6d5e2;
  font-size: clamp(1rem, 1.7vw, 1.3rem);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 900px;
  margin-top: 42px;
}

.filters label {
  min-width: 190px;
}

.filters label:nth-child(2) {
  flex: 1;
  max-width: 330px;
}

.filters label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

select,
.filters button,
.ledger-tools input,
.export-button {
  min-height: 46px;
  color: var(--paper);
  border: 1px solid rgba(173, 202, 225, 0.22);
  border-radius: 6px;
  background: rgba(5, 17, 30, 0.78);
}

select {
  width: 100%;
  padding: 0 40px 0 14px;
}

.filters button {
  align-self: flex-end;
  padding: 0 20px;
  color: var(--gold-soft);
}

.filters button:hover,
.export-button:hover {
  border-color: var(--gold);
  background: rgba(242, 182, 49, 0.12);
}

.freshness {
  margin: 22px 0 0;
  color: #6f89a1;
  font-size: 0.75rem;
}

main {
  width: min(1540px, 94vw);
  margin: 0 auto;
}

.metric-strip {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  margin-top: -2px;
  border: 1px solid var(--line);
  background: var(--line);
  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 150px;
  padding: 23px 24px;
  background: rgba(9, 25, 43, 0.96);
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
}

.metric-card span {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin: 9px 0 3px;
  color: var(--paper);
  font-family: "DIN Condensed", "Avenir Next Condensed", sans-serif;
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 1;
}

.metric-card small {
  font-size: 0.75rem;
}

.metric-primary {
  background: var(--blue);
}

.metric-primary span,
.metric-primary strong,
.metric-primary small {
  color: #17170f;
}

.metric-card.position-rb {
  box-shadow: inset 0 3px 0 var(--mint);
}

.metric-card.position-wr {
  box-shadow: inset 0 3px 0 var(--gold);
}

.metric-card.position-te {
  box-shadow: inset 0 3px 0 #ff8f70;
}

.section {
  padding-top: 90px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) 1.5fr 1fr;
  gap: 32px;
  align-items: end;
  margin-bottom: 25px;
  padding-bottom: 23px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2,
.boundary-note h2 {
  margin: 0;
  font-family: "DIN Condensed", "Avenir Next Condensed", sans-serif;
  font-size: clamp(2.3rem, 5vw, 4.9rem);
  letter-spacing: -0.035em;
  line-height: 0.95;
  text-transform: uppercase;
}

.section-heading > span,
.section-heading > div > span {
  color: var(--muted);
  font-size: 0.9rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(16px);
}

.panel-wide {
  grid-column: 1 / -1;
}

.panel-heading {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 83px;
  padding: 19px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.panel-heading h3 {
  margin: 4px 0 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.panel-heading > span {
  color: #6f89a1;
  font-size: 0.72rem;
  text-align: right;
}

.chart {
  min-height: 360px;
  padding: 18px 14px 12px;
}

.chart-tall {
  min-height: 430px;
}

.chart svg {
  display: block;
  overflow: visible;
  width: 100%;
  height: auto;
}

.chart .grid-line {
  stroke: rgba(173, 202, 225, 0.12);
  stroke-dasharray: 3 5;
}

.chart .axis-line {
  stroke: rgba(173, 202, 225, 0.32);
}

.chart text {
  fill: #8ea5bb;
  font-family: "Avenir Next", sans-serif;
  font-size: 11px;
}

.chart .axis-label {
  fill: #c1cfda;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.chart .point-label {
  fill: var(--paper);
  stroke: var(--night);
  stroke-width: 3px;
  paint-order: stroke;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.035em;
}

.chart .selected-guide {
  stroke: var(--paper);
  stroke-dasharray: 3 4;
  stroke-opacity: 0.65;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
  padding: 3px 8px 8px;
  color: var(--muted);
  font-size: 0.68rem;
}

.legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

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

.ledger-heading {
  grid-template-columns: 1fr auto;
}

.scoring-key {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin: -6px 0 18px;
  border: 1px solid var(--line);
  background: var(--line);
}

.scoring-key span {
  flex: 1 1 150px;
  padding: 11px 14px;
  color: var(--muted);
  background: rgba(9, 25, 43, 0.96);
  font-size: 0.72rem;
}

.scoring-key strong {
  display: block;
  color: var(--paper);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ledger-heading > div {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) 1.5fr 1fr;
  gap: 32px;
  align-items: end;
}

.export-button {
  padding: 0 18px;
}

.ledger-tools {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}

.ledger-tools label {
  flex: 1;
  max-width: 520px;
}

.ledger-tools input {
  width: 100%;
  padding: 0 15px;
}

.ledger-tools strong {
  color: var(--gold-soft);
  font-family: "Avenir Next Condensed", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
  font-size: 0.78rem;
}

th,
td {
  padding: 11px 13px;
  border-bottom: 1px solid rgba(173, 202, 225, 0.09);
  text-align: left;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #9eb2c5;
  background: #0a1829;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

th:hover {
  color: var(--gold-soft);
}

tbody tr:hover {
  background: rgba(84, 184, 247, 0.055);
}

.price-cell {
  color: var(--gold-soft);
  font-weight: 800;
}

.role-chip {
  display: inline-block;
  padding: 3px 7px;
  color: #83efcd;
  border: 1px solid rgba(72, 223, 176, 0.24);
  border-radius: 999px;
  background: rgba(72, 223, 176, 0.08);
  text-transform: capitalize;
}

.role-chip.bench {
  color: #9db2c5;
  border-color: rgba(142, 165, 187, 0.2);
  background: rgba(142, 165, 187, 0.06);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  padding: 16px;
}

.pagination button {
  min-width: 34px;
  min-height: 34px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
}

.pagination button.active,
.pagination button:hover {
  color: var(--night);
  border-color: var(--gold);
  background: var(--gold);
}

.boundary-note {
  display: grid;
  grid-template-columns: 0.45fr 1.15fr 1.5fr;
  gap: 34px;
  align-items: start;
  margin: 95px 0 45px;
  padding: 34px;
  color: #17170f;
  border-radius: 8px;
  background: var(--gold);
  box-shadow: var(--shadow);
}

.boundary-note > p {
  color: rgba(23, 23, 15, 0.65);
}

.boundary-note h2 {
  font-size: clamp(2rem, 4vw, 3.8rem);
}

.boundary-note div {
  display: grid;
  gap: 12px;
  font-size: 0.9rem;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 30px max(3vw, 22px);
  color: #5f7890;
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: arrive 0.72s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.reveal:nth-of-type(2) {
  animation-delay: 90ms;
}

.reveal:nth-of-type(3) {
  animation-delay: 160ms;
}

.reveal:nth-of-type(4) {
  animation-delay: 230ms;
}

@keyframes arrive {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1050px) {
  .metric-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .section-heading,
  .ledger-heading > div {
    grid-template-columns: 1fr 2fr;
  }

  .section-heading > span,
  .ledger-heading > div > span {
    grid-column: 2;
  }

  .boundary-note {
    grid-template-columns: 1fr 2fr;
  }

  .boundary-note div {
    grid-column: 2;
  }
}

@media (max-width: 760px) {
  .masthead {
    min-height: 520px;
    padding-top: 35px;
  }

  h1 {
    margin-top: 40px;
    font-size: clamp(4.8rem, 25vw, 8rem);
  }

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

  .filters label,
  .filters label:nth-child(2) {
    max-width: none;
  }

  .filters button {
    width: 100%;
  }

  main {
    width: min(100% - 24px, 1540px);
  }

  .metric-strip,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 116px;
  }

  .section {
    padding-top: 68px;
  }

  .section-heading,
  .ledger-heading,
  .ledger-heading > div,
  .boundary-note {
    display: grid;
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .section-heading > span,
  .ledger-heading > div > span,
  .boundary-note div {
    grid-column: 1;
  }

  .ledger-heading .export-button {
    width: 100%;
  }

  .panel-heading {
    min-height: 98px;
  }

  .chart {
    min-height: 320px;
    padding-inline: 4px;
  }

  .ledger-tools {
    display: grid;
  }

  .boundary-note {
    padding: 27px 24px;
  }

  footer {
    display: grid;
    gap: 8px;
  }
}

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