/* thestatzone
   Visual language borrowed from the courtside scorer's book: a ruled
   green-bar grid, a deep court-green masthead, and a red-pencil mark
   reserved for the one number that matters on any given page. */

:root {
  --paper:      #FBFBF9;
  --ledger:     #E9F0E9;
  --rule:       #C6D2C8;
  --rule-soft:  #E4EAE5;
  --ink:        #15201A;
  --ink-soft:   #5D6E63;
  --ink-faint:  #8A9990;
  --field:      #0E3B2E;
  --field-deep: #082720;
  --mark:       #C0202B;

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --data: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 76rem;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "tnum" 0;
}

a { color: var(--ink); text-decoration-color: var(--rule); text-underline-offset: 2px; }
a:hover { color: var(--mark); text-decoration-color: var(--mark); }
a:focus-visible {
  outline: 2px solid var(--mark);
  outline-offset: 2px;
  border-radius: 1px;
}

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }

/* ------------------------------------------------------------ masthead */

.masthead {
  background: var(--field);
  color: #EDF3EE;
  border-bottom: 3px solid var(--field-deep);
}
.masthead a { color: inherit; text-decoration: none; }
.masthead-inner {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 1.5rem;
  padding-block: 0.9rem;
}
.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  letter-spacing: 0.01em;
  line-height: 1;
  text-transform: uppercase;
  margin: 0;
}
.wordmark .zone { color: #7FCB9B; }
.tagline {
  font-family: var(--data);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9BB6A5;
}
.nav {
  margin-left: auto;
  display: flex; flex-wrap: wrap; gap: 1.1rem;
  font-family: var(--data);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav a { padding-block: 0.15rem; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current] { border-bottom-color: #7FCB9B; color: #fff; }

/* ------------------------------------------------------------ page head */

main { padding-block: clamp(1.5rem, 5vw, 3rem) 4rem; }

.eyebrow {
  font-family: var(--data);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.35rem;
}
.eyebrow a { color: inherit; }

h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.1rem, 7vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: 0.005em;
  margin: 0 0 0.4rem;
  text-wrap: balance;
}
h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.35rem, 3.5vw, 1.8rem);
  line-height: 1.1;
  margin: 2.6rem 0 0.8rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--ink);
}
h3 {
  font-family: var(--data);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 1.8rem 0 0.5rem;
}
.subtitle { color: var(--ink-soft); margin: 0 0 1.6rem; font-size: 1.02rem; }

/* --------------------------------------------------------- career ribbon */
/* One segment per stint, width proportional to games played. A season split
   across two teams shows as two segments, which is the point: it makes a
   mid-season trade legible without reading the table. */

.ribbon { margin: 1.4rem 0 2rem; }
.ribbon-track { display: flex; gap: 2px; height: 3.4rem; }
.ribbon-seg {
  flex: var(--w) 1 0;
  min-width: 2.2rem;
  background: var(--ledger);
  border: 1px solid var(--rule);
  border-bottom: 3px solid var(--field);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-decoration: none;
  overflow: hidden;
  padding: 0 0.2rem;
}
.ribbon-seg:hover { background: #fff; border-bottom-color: var(--mark); }
.ribbon-seg.is-exhibition { border-style: dashed; border-bottom-style: dashed; opacity: 0.72; }
.ribbon-abbr {
  font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  line-height: 1; letter-spacing: 0.02em;
}
.ribbon-season {
  font-family: var(--data); font-size: 0.6rem; letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.ribbon-key {
  font-family: var(--data); font-size: 0.68rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-faint); margin-top: 0.45rem;
}

/* ------------------------------------------------------------ stat lines */

.statline {
  display: flex; flex-wrap: wrap; gap: 0 2.2rem;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  padding: 0.85rem 0;
  margin-bottom: 1.4rem;
}
.stat { display: flex; flex-direction: column; }
.stat-value {
  font-family: var(--data); font-variant-numeric: tabular-nums;
  font-size: 1.5rem; font-weight: 600; line-height: 1.1;
}
.stat.is-lead .stat-value { color: var(--mark); }
.stat-label {
  font-family: var(--data); font-size: 0.66rem; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--ink-soft);
}

/* ---------------------------------------------------------------- tables */

.scroller {
  overflow-x: auto;
  border: 1px solid var(--rule);
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.scroller::-webkit-scrollbar { height: 10px; }
.scroller::-webkit-scrollbar-thumb { background: var(--rule); }

table.box { border-collapse: collapse; width: 100%; font-size: 0.86rem; }
table.box th, table.box td {
  padding: 0.4rem 0.55rem;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--rule-soft);
}
table.box thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--field); color: #EDF3EE;
  font-family: var(--data); font-weight: 600;
  font-size: 0.66rem; letter-spacing: 0.09em; text-transform: uppercase;
  border-bottom: 2px solid var(--field-deep);
}
table.box tbody tr:nth-child(even) { background: var(--ledger); }
table.box tbody tr:hover { background: #FFF8DC; }
table.box td.num, table.box th.num {
  font-family: var(--data); font-variant-numeric: tabular-nums;
}
/* first column pinned so a name stays visible while the line scrolls */
table.box th.sticky, table.box td.sticky {
  position: sticky; left: 0; z-index: 1;
  text-align: left;
  background: var(--paper);
  border-right: 2px solid var(--rule);
  max-width: 13rem; overflow: hidden; text-overflow: ellipsis;
}
table.box thead th.sticky { z-index: 3; background: var(--field); }
table.box tbody tr:nth-child(even) td.sticky { background: var(--ledger); }
table.box tbody tr:hover td.sticky { background: #FFF8DC; }
table.box tfoot td {
  font-weight: 600; border-top: 2px solid var(--ink);
  background: var(--paper);
}
table.box tfoot td.sticky { background: var(--paper); }
.jersey {
  font-family: var(--data); color: var(--ink-faint);
  font-size: 0.78rem; margin-right: 0.35rem;
}
caption {
  caption-side: top; text-align: left;
  font-family: var(--data); font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-soft);
  padding: 0.5rem 0.55rem;
}

/* ----------------------------------------------------------------- cards */

.grid { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.card { background: var(--paper); padding: 1rem 1.1rem; }
.card h3 { margin-top: 0; }
.card ol, .card ul { margin: 0; padding-left: 1.1rem; }
.card li { margin-bottom: 0.2rem; }
.card li .v {
  font-family: var(--data); font-variant-numeric: tabular-nums;
  color: var(--ink-soft); float: right; margin-left: 0.6rem;
}
.card li:first-child .v { color: var(--mark); font-weight: 600; }

/* ------------------------------------------------------------- index list */

.alpha { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0 0 1.6rem; }
.alpha a {
  font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  min-width: 2rem; text-align: center; padding: 0.15rem 0.3rem;
  border: 1px solid var(--rule); text-decoration: none; background: #fff;
}
.alpha a:hover { background: var(--field); color: #fff; border-color: var(--field); }

.namelist { columns: 3 14rem; column-gap: 2rem; margin: 0; padding: 0; list-style: none; }
.namelist li { break-inside: avoid; padding: 0.16rem 0; border-bottom: 1px solid var(--rule-soft); }
.namelist .meta { font-family: var(--data); font-size: 0.7rem; color: var(--ink-faint); float: right; }

/* --------------------------------------------------------------- pills */

.pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.4rem; padding: 0; list-style: none; }
.pills a {
  display: inline-block; padding: 0.25rem 0.7rem;
  border: 1px solid var(--rule); background: #fff; text-decoration: none;
  font-family: var(--data); font-size: 0.78rem; letter-spacing: 0.04em;
}
.pills a:hover { background: var(--field); color: #fff; border-color: var(--field); }
.pills a[aria-current] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* --------------------------------------------------------------- search */

.search { margin: 0 0 2rem; }
.search input {
  width: 100%; max-width: 26rem;
  font-family: var(--body); font-size: 1rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--rule); background: #fff; color: var(--ink);
}
.search input:focus-visible { outline: 2px solid var(--mark); outline-offset: 1px; }
#results { list-style: none; margin: 0.6rem 0 0; padding: 0; max-width: 26rem; }
#results li { border-bottom: 1px solid var(--rule-soft); padding: 0.3rem 0; }
#results .meta { font-family: var(--data); font-size: 0.72rem; color: var(--ink-faint); }

/* --------------------------------------------------------------- footer */

.foot {
  border-top: 3px solid var(--field);
  margin-top: 3rem; padding-block: 1.4rem 2.4rem;
  font-size: 0.84rem; color: var(--ink-soft);
}
.foot p { margin: 0.2rem 0; }
.foot a { color: var(--ink-soft); }

.note {
  font-size: 0.84rem; color: var(--ink-soft);
  border-left: 3px solid var(--rule); padding: 0.2rem 0 0.2rem 0.8rem;
  margin: 1rem 0;
}

@media (max-width: 40rem) {
  .namelist { columns: 1; }
  .statline { gap: 0 1.3rem; }
  .stat-value { font-size: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media print {
  .masthead, .nav, .search, .alpha { display: none; }
  body { background: #fff; }
  .scroller { overflow: visible; border: 0; }
}

/* --------------------------------------------------- official box score */
/* Column set and section order follow the original stats.asp box score. */

table.box.official { font-size: 0.84rem; }
table.box.official thead tr.grouped th { border-bottom: 0; background: var(--field-deep); }
table.box thead th.rebgroup {
  /* A single-column group label (NVGM, 40, PIE) lines up with the right-
     aligned figures beneath it. A multi-column label (REBOUNDS) sits over
     the first column of its span instead, so it left-aligns. The colspan
     attribute distinguishes the two without extra classes. */
  text-align: right;
  border-bottom: 1px solid var(--rule);
  letter-spacing: 0.14em;
}
table.box thead th.rebgroup[colspan] { text-align: left; }

/* Column-group rules. These run the full height of the table so the reader
   can see where REBOUNDS (and the FACT / MIN FACT / PIE block) begins and
   ends, not just in the header. Light against the dark header, darker
   against the body. */
table.box thead th.rebgroup,
table.box thead th.grp-start { border-left: 2px solid #7FCB9B; }
table.box thead th.rebgroup,
table.box thead th.grp-end { border-right: 2px solid #7FCB9B; }
table.box tbody td.grp-start,
table.box tfoot td.grp-start,
table.box tbody th.grp-start { border-left: 2px solid var(--ink-faint); }
table.box tbody td.grp-end,
table.box tfoot td.grp-end,
table.box tbody th.grp-end { border-right: 2px solid var(--ink-faint); }

table.splits {
  border-collapse: collapse;
  font-family: var(--data);
  font-size: 0.78rem;
  margin: 0.7rem 0 0;
}
table.splits th, table.splits td { padding: 0.22rem 0.55rem 0.22rem 0; text-align: left; }
table.splits th[scope="row"] {
  font-weight: 600; letter-spacing: 0.06em; color: var(--ink-soft);
  padding-right: 1.1rem;
}
table.splits td.num { font-variant-numeric: tabular-nums; text-align: right; }

dl.gamenotes {
  display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1.2rem;
  margin: 0.6rem 0 0; font-size: 0.9rem;
  border-top: 1px solid var(--rule); padding-top: 0.7rem;
}
dl.gamenotes dt {
  font-family: var(--data); font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-soft); padding-top: 0.18rem;
}
dl.gamenotes dd { margin: 0; }

@media (max-width: 40rem) {
  dl.gamenotes { grid-template-columns: 1fr; gap: 0 0; }
  dl.gamenotes dd { margin-bottom: 0.5rem; }
}

/* Box score heading block, mirroring the original's teams / date / venue. */
.boxhead {
  font-family: var(--data);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 1.6rem;
  padding-bottom: 0.9rem;
  border-bottom: 2px solid var(--ink);
}
.boxhead-teams {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
  color: var(--ink);
}

/* ------------------------------------------- legacy player-page tables */
/* Column set, order and group headers follow NVGMplayerstat.asp. */

table.box.legacy { font-size: 0.82rem; }
table.box.legacy thead tr.titlebar th {
  background: var(--field-deep);
  color: #EDF3EE;
  text-align: left;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: none;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--field);
  position: static;
}
table.box.legacy thead tr.grouped th { background: var(--field-deep); border-bottom: 0; }
table.box.legacy + .scroller { margin-top: 1rem; }
.scroller + .scroller { margin-top: 1.1rem; }

/* "40 / MIN / FACT" reads as a three-line stack, matching the original,
   so the column stays narrow instead of forcing the table wider. */
table.box th.stacked {
  white-space: normal;
  line-height: 1.15;
  text-align: right;
}

/* Opening paragraphs on the home page: a little larger than body text,
   held to a readable measure. */
.lede {
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  line-height: 1.6;
  max-width: 40rem;
  margin: 0 0 1rem;
  color: var(--ink);
}
.lede + .lede { color: var(--ink-soft); }
.card p { margin: 0 0 0.7rem; font-size: 0.92rem; }
.card p:last-child { margin-bottom: 0; }

.foot .legal {
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--ink-faint);
  max-width: 46rem;
  margin-top: 0.9rem;
}
