/* The Injury Report: one stylesheet for every page */
/* Black type on white, with red accents */
:root {
  color-scheme: light;
  --page: #ffffff;
  --surface: #ffffff;
  --raised: #ffffff;
  --ink: #0a0a0a;
  --ink-2: #3d3d3d;
  --muted: #6b6b6b;
  --grid: #e8e8e8;
  --axis: #bdbdbd;
  --border: #e2e2e2;
  --accent: #c8102e;
  --accent-ink: #a50d26;
  --deemph: #c4c4c4;
  --wash: rgba(200, 16, 46, 0.06);
  --out: #0a0a0a;
  --radius: 10px;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.5 var(--font);
}
a { color: var(--accent-ink); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ---- Header and league tabs ---- */
.site-head { border-top: 4px solid var(--accent); border-bottom: 1px solid var(--border); background: var(--surface); }
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 56px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.brand-mark { width: 22px; height: 22px; flex: none; }
.tabs { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; overflow-x: auto; }
.tabs a {
  display: block; padding: 6px 12px; border-radius: 999px; color: var(--ink-2);
  text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap;
}
.tabs a:hover { background: var(--wash); color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--accent); color: #fff; }
/* the links that leave the site: Articles (the newsletter) and Support (PayPal) */
.tabs li.tab-gap { margin-left: 8px; }
.tabs a.tab-out .out { font-size: 12px; }
.tabs a.tab-support { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent-ink); }
.tabs a.tab-support:hover { background: var(--accent); color: #fff; }
.site-head nav { min-width: 0; max-width: 100%; }
@media (max-width: 640px) { .tabs { flex-wrap: wrap; overflow-x: visible; } .tabs li.tab-gap { margin-left: 0; } }

/* ---- Page title ---- */
.page-title { padding: 28px 0 8px; }
.page-title h1 { margin: 0; font-size: clamp(26px, 4vw, 34px); line-height: 1.15; letter-spacing: -0.02em; }
.lede { margin: 6px 0 0; color: var(--ink-2); max-width: 70ch; }
.meta { margin: 8px 0 0; color: var(--muted); font-size: 13px; }

/* ---- Filters: one row above everything they scope ---- */
.pagebar {
  position: sticky; top: 0; z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
  padding: 10px 0; margin-top: 12px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
/* the chapter links: the section you are in is underlined in red */
.chapters { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; max-width: 100%; }
.chapters::-webkit-scrollbar { display: none; }
.chapters a {
  flex: none; padding: 6px 10px; border-radius: 6px; color: var(--ink-2); text-decoration: none; white-space: nowrap;
  font-family: var(--display); font-size: 15px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
  box-shadow: inset 0 -2px 0 transparent;
}
.chapters a:hover { background: var(--wash); color: var(--ink); }
.chapters a[aria-current="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 6px 6px 0 0; }
.chapter, section.block { scroll-margin-top: 76px; }
.chapter:focus, section.block:focus { outline: none; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.pagebar .find { margin-left: auto; }
.field { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
select, input[type="search"] {
  font: inherit; color: var(--ink); background: var(--raised);
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; min-height: 36px;
}
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: #f1f1f1; }
.segmented button {
  font: inherit; font-size: 14px; font-weight: 600; border: 0; cursor: pointer;
  padding: 5px 12px; border-radius: 8px; background: transparent; color: var(--ink-2); min-height: 30px;
}
.segmented button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---- Stat tiles ---- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.tile .label { color: var(--ink-2); font-size: 13px; }
.tile .value { font-size: 28px; font-weight: 650; line-height: 1.2; margin-top: 4px; overflow-wrap: anywhere; }
.tile .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ---- Cards and charts ---- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 18px 12px; min-width: 0; }
.card.wide { grid-column: 1 / -1; }
.card h2 { margin: 0; font-size: 17px; letter-spacing: -0.01em; }
.card .note { margin: 2px 0 14px; color: var(--muted); font-size: 13px; }
section.block { margin: 28px 0; }
section.block > h2 { font-size: 20px; margin: 0 0 4px; letter-spacing: -0.01em; }
section.block > .note { margin: 0 0 12px; color: var(--muted); font-size: 13px; }

.bars { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.bar-row {
  display: grid; grid-template-columns: minmax(6.5rem, 11rem) minmax(0, 1fr); align-items: center; gap: 10px;
  border-radius: 6px; padding: 2px 4px; margin: 0 -4px; cursor: default;
}
.bar-row:hover, .bar-row:focus-visible { background: var(--wash); }
.bar-label { font-size: 13px; color: var(--ink-2); line-height: 1.25; overflow-wrap: anywhere; }
.bar-track { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.bar { height: 14px; background: var(--accent); border-radius: 0 4px 4px 0; min-width: 2px; flex: none; }
.bar-row:hover .bar, .bar-row:focus-visible .bar { filter: brightness(1.12); }
.bar-value { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }

.columns { display: flex; align-items: flex-end; gap: 8px; height: 220px; padding-top: 20px; border-bottom: 1px solid var(--axis); }
.col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; cursor: default; border-radius: 6px 6px 0 0; }
.col:hover, .col:focus-visible { background: var(--wash); }
.col .cap { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ink-2); margin-bottom: 4px; white-space: nowrap; }
.col .colbar { width: min(24px, 70%); background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.col.dim .colbar { background: var(--deemph); }
.col.dim .cap { color: var(--muted); }
.col-labels { display: flex; gap: 8px; margin-top: 6px; }
.col-labels span { flex: 1 1 0; min-width: 0; text-align: center; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

details.as-table { margin-top: 10px; border-top: 1px solid var(--grid); padding-top: 8px; }
details.as-table summary { cursor: pointer; color: var(--ink-2); font-size: 13px; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; margin-top: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--grid); vertical-align: top; }
th { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.detail { color: var(--ink-2); min-width: 12rem; }
tbody tr:hover { background: var(--wash); }
/* a name in the injury report opens the player's injury history */
a.who { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--deemph); text-underline-offset: 3px; }
a.who:hover { color: var(--accent-ink); text-decoration-color: var(--accent); }
.status { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--deemph); flex: none; }
.status.out::before { background: var(--out); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 8px; }
.count { color: var(--muted); font-size: 13px; }
/* the report picker: earlier / menu / later / latest */
.report-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.report-pick select { max-width: 100%; }
#current-search { flex: 1 1 260px; max-width: 360px; min-width: 0; }
.step {
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; white-space: nowrap;
  background: var(--raised); border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; min-height: 36px;
}
.step:hover:not(:disabled) { background: var(--wash); border-color: var(--accent); }
.step:disabled { color: var(--deemph); cursor: default; }
.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; }

/* ---- Tooltip ---- */
.tooltip {
  position: fixed; z-index: 20; pointer-events: none; max-width: 260px;
  background: var(--raised); color: var(--ink); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; font-size: 13px; line-height: 1.35;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}
.tooltip strong { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.tooltip span { color: var(--ink-2); }

/* ---- Home ---- */
.hero { padding: 44px 0 12px; }
.hero h1 { margin: 0; font-size: clamp(32px, 6vw, 52px); line-height: 1.05; letter-spacing: -0.03em; }
.hero p { margin: 12px 0 0; color: var(--ink-2); font-size: 17px; max-width: 62ch; }
.leagues { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 28px 0; }
.league-card {
  display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
  transition: border-color 0.15s, transform 0.15s;
}
.league-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.league-card h2 { margin: 0; font-size: 22px; letter-spacing: -0.01em; }
.league-card .state { font-size: 13px; color: var(--muted); }
.league-card .state.live { color: var(--ink-2); }
.league-card .state.live::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 1px; }
.league-card .big { font-size: 30px; font-weight: 650; line-height: 1.1; }
.league-card .small { color: var(--ink-2); font-size: 14px; }
.league-card .go { margin-top: auto; color: var(--accent-ink); font-weight: 600; font-size: 14px; }
.prose { max-width: 75ch; }
.prose h2 { font-size: 20px; margin: 28px 0 6px; }
.prose p, .prose li { color: var(--ink-2); }

/* ---- Dropdowns: the explanations on every page ---- */
details.drop { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin: 10px 0; }
details.drop > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 48px; padding: 10px 16px; border-radius: var(--radius);
  font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: 0.01em; color: var(--ink);
}
details.drop > summary::-webkit-details-marker { display: none; }
details.drop > summary::after {
  content: ""; flex: none; width: 9px; height: 9px; margin: -4px 4px 0 0;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform 0.15s;
}
details.drop[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
details.drop > summary:hover { background: var(--wash); }
details.drop[open] > summary { border-bottom: 1px solid var(--grid); border-radius: var(--radius) var(--radius) 0 0; }
.drop-body { padding: 4px 16px 8px; }
#about .downloads { margin-top: 16px; }
.drop-body > p:first-child, .drop-body > ul:first-child { margin-top: 12px; }
@media (prefers-reduced-motion: reduce) { details.drop > summary::after { transition: none; } }

.site-foot { margin-top: 48px; border-top: 1px solid var(--border); padding: 20px 0 32px; color: var(--muted); font-size: 13px; }
.site-foot p { margin: 4px 0; }
.downloads { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 8px 0 0; padding: 0; list-style: none; }

@media (max-width: 900px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .leagues { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .leagues { grid-template-columns: minmax(0, 1fr); }
  .tile .value { font-size: 24px; }
  .bar-row { grid-template-columns: minmax(5.5rem, 8.5rem) minmax(0, 1fr); }
  .pagebar { position: static; }
  .chapter, section.block { scroll-margin-top: 12px; }
}
@media (forced-colors: active) {
  .bar, .col .colbar { background: CanvasText; }
  .col.dim .colbar { background: GrayText; }
}

/* team bars run in two columns on wide screens */
.bars.two-col { display: block; columns: 2; column-gap: 40px; }
.bars.two-col .bar-row { break-inside: avoid; margin-bottom: 6px; }
@media (max-width: 760px) { .bars.two-col { columns: 1; } }

/* the latest report can run to hundreds of rows: it scrolls in its own box */
.table-wrap.tall { max-height: 560px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.table-wrap.tall thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; box-shadow: inset 0 -1px 0 var(--grid); }

/* ---- Type: Barlow for reading, Barlow Condensed for names and numbers ---- */
.brand { font-family: var(--display); font-size: 21px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.tabs a { font-family: var(--display); font-size: 16px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.page-title h1, .hero h1 { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.01em; }
.page-title h1 { font-size: clamp(34px, 5vw, 48px); line-height: 1; }
.hero h1 { font-size: clamp(44px, 8vw, 80px); line-height: 0.95; }
.hero h1::after { content: ""; display: block; width: 72px; height: 5px; background: var(--accent); margin-top: 16px; }
.card h2, section.block > h2, .prose h2, .league-card h2 { font-family: var(--display); font-weight: 600; letter-spacing: 0.01em; }
.card h2 { font-size: 21px; }
section.block > h2, .prose h2 { font-size: 26px; }
.league-card h2 { font-size: 30px; text-transform: uppercase; }
.tile .label { font-family: var(--display); font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.tile .value { font-family: var(--display); font-weight: 600; font-size: 38px; line-height: 1.1; }
.league-card .big { font-family: var(--display); font-weight: 600; font-size: 46px; line-height: 1; }
.segmented button, .field { font-weight: 500; }
th { font-family: var(--display); font-size: 13px; letter-spacing: 0.06em; }

/* ---- Heatmaps (z-scores) ---- */
.heat-card { margin-top: 16px; }
.heat-legend { display: grid; grid-template-columns: auto 220px auto; align-items: center; gap: 4px 10px; width: max-content; font-size: 13px; color: var(--ink-2); margin: 4px 0 4px; }
.heat-ramp { height: 10px; border-radius: 5px; background: linear-gradient(to right, rgb(93,174,116), #fff 50%, rgb(215,83,104)); box-shadow: inset 0 0 0 1px var(--border); }
.heat-ticks { grid-column: 2; display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
table.heat { width: auto; min-width: 100%; border-collapse: separate; border-spacing: 2px; font-size: 13px; }
table.heat th, table.heat td { border: 0; padding: 5px 8px; }
table.heat thead th { text-align: center; vertical-align: bottom; font-family: var(--display); font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: 0.02em; color: var(--ink-2); white-space: nowrap; }
table.heat thead th.wrap { white-space: normal; min-width: 58px; max-width: 84px; line-height: 1.15; }
table.heat thead th.sel { color: var(--ink); box-shadow: inset 0 -3px 0 var(--accent); }
table.heat tbody th { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: right; font-family: var(--font); font-size: 14px; font-weight: 500; text-transform: none; letter-spacing: 0; white-space: nowrap; padding-right: 12px; color: var(--ink); }
table.heat td { min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; color: var(--ink); border-radius: 2px; cursor: default; }
table.heat td.total { font-weight: 700; box-shadow: inset 0 0 0 1px var(--border); }
table.heat .gap { width: 12px; min-width: 12px; padding: 0; background: none; box-shadow: none; }
table.heat tbody tr:hover { background: none; }
table.heat tbody tr:hover th { color: var(--accent-ink); }
table.heat td:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.heat-foot { margin: 8px 0 0; font-size: 12px; }
.heat-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 8px; }
/* the three z-score tables as tabs in one card */
.heat-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--grid); }
.heat-tabs [role="tab"] {
  font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: 0.01em; color: var(--muted);
  background: none; border: 0; padding: 6px 10px 8px; cursor: pointer; border-radius: 6px 6px 0 0;
  box-shadow: inset 0 -3px 0 transparent;
}
.heat-tabs [role="tab"]:hover { color: var(--ink); background: var(--wash); }
.heat-tabs [role="tab"][aria-selected="true"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--accent); }
.heat-panel > .note:first-child { margin-top: 4px; }
/* a heading for each group of positions in Positions per player */
table.heat tr.group-row th { position: static; text-align: left; padding: 12px 8px 4px; font-family: var(--display); font-size: 14px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); background: none; }
table.heat tbody tr.group-row:hover th { color: var(--muted); }

/* ---- Typical return to play: the middle half as a bar, the median as a dot, log scale ---- */
:root { --rtp-range: rgba(200, 16, 46, 0.26); }
.rtp-key { display: inline-flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); }
.rtp-key i { display: inline-block; vertical-align: -1px; margin-right: 6px; }
.rtp-key .k-mid { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.rtp-key .k-range { width: 28px; height: 10px; border-radius: 5px; background: var(--rtp-range); }
table.rtp { min-width: 760px; }
table.rtp th, table.rtp td { vertical-align: middle; }
table.rtp tbody th { position: sticky; left: 0; z-index: 1; background: var(--surface); font-family: var(--font); font-size: 14px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink); white-space: normal; min-width: 11rem; }
table.rtp tr.rtp-r th, table.rtp tr.rtp-r td { font-weight: 650; border-top: 1px solid var(--axis); }
table.rtp tr.rtp-t th { padding-left: 26px; font-weight: 400; color: var(--ink-2); }
table.rtp th.tl, table.rtp td.tl { width: 42%; min-width: 260px; }
table.rtp td.num { white-space: nowrap; }
table.rtp tbody tr:hover th { background: #fdf2f4; }
.rtp-axis-title { display: block; }
.rtp-axis { position: relative; height: 16px; margin: 2px 10px 0; }
.rtp-axis span { position: absolute; transform: translateX(-50%); font-variant-numeric: tabular-nums; letter-spacing: 0; color: var(--muted); font-weight: 500; white-space: nowrap; }
.rtp-track { position: relative; height: 22px; margin: 0 10px; }
.rtp-grid { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--grid); }
.rtp-range { position: absolute; top: 6px; height: 10px; border-radius: 5px; background: var(--rtp-range); }
.rtp-range.open { background: linear-gradient(to right, var(--rtp-range) 60%, rgba(200, 16, 46, 0)); border-radius: 5px 0 0 5px; }
.rtp-mid { position: absolute; top: 5px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
.rtp-method { margin-top: 10px; max-width: 90ch; }
details.rtp-how { margin-top: 14px; }
details.rtp-how > summary { font-size: 16px; min-height: 40px; padding: 8px 14px; }
@media (forced-colors: active) {
  .rtp-range, .rtp-key .k-range { background: GrayText; }
  .rtp-mid, .rtp-key .k-mid { background: CanvasText; }
}
/* on a phone each injury takes three lines: name and typical time, the timeline, then the rest */
@media (max-width: 640px) {
  table.rtp, table.rtp thead, table.rtp tbody, table.rtp thead tr { display: block; min-width: 0; }
  table.rtp thead th { display: none; }
  table.rtp thead th.tl { display: block; width: auto; min-width: 0; padding: 4px 0; border: 0; }
  table.rtp tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--grid); }
  table.rtp tbody th, table.rtp tbody td { position: static; width: auto; min-width: 0; padding: 0; border: 0; background: none; }
  table.rtp tbody th { grid-column: 1 / 3; }
  table.rtp td.typ { grid-column: 3; grid-row: 1; }
  table.rtp td.tl { grid-column: 1 / -1; width: auto; min-width: 0; padding: 2px 0; }
  table.rtp td.meta { grid-row: 3; text-align: left; font-size: 12px; font-weight: 400; color: var(--muted); white-space: normal; }
  table.rtp td.meta::before { content: attr(data-label) " "; }
  table.rtp tr.rtp-r { border-top: 1px solid var(--axis); }
  table.rtp tr.rtp-r th, table.rtp tr.rtp-r td { border-top: 0; }
  table.rtp tr.rtp-t th { padding-left: 14px; }
}

/* ---- Player injury history: the search in the chapter bar, and the panel it opens ---- */
.find { position: relative; flex: 0 1 260px; min-width: 0; }
.find input { width: 100%; padding-left: 34px; }
.find::before {
  content: ""; position: absolute; left: 12px; top: 50%; width: 11px; height: 11px; margin-top: -8px;
  border: 2px solid var(--muted); border-radius: 50%; pointer-events: none;
}
.find::after {
  content: ""; position: absolute; left: 23px; top: 50%; width: 2px; height: 7px; margin-top: 2px;
  background: var(--muted); transform: rotate(-45deg); pointer-events: none;
}
.find input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--wash); }
.find-pop {
  position: absolute; z-index: 10; top: calc(100% + 6px); left: 0; width: max(100%, 340px); max-width: calc(100vw - 32px);
  background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16); padding: 6px; max-height: min(460px, 70vh); overflow-y: auto;
}
.find-pop ul { list-style: none; margin: 0; padding: 0; }
.find-pop ul:empty { display: none; }
.opt { display: flex; flex-direction: column; padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.opt:hover, .opt[aria-selected="true"] { background: var(--wash); }
.opt[aria-selected="true"] { box-shadow: inset 2px 0 0 var(--accent); }
.opt-name { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-team .opt-name { font-family: var(--display); font-size: 17px; letter-spacing: 0.02em; }
.find-more { margin: 0; padding: 7px 10px; font-size: 13px; color: var(--muted); }
.find-pop ul:not(:empty) + .find-more { border-top: 1px solid var(--grid); margin-top: 4px; }

dialog.sheet {
  position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0; border: 0;
  width: min(600px, 100%); max-width: 100%; height: 100%; max-height: 100%;
  background: var(--surface); color: var(--ink); border-left: 1px solid var(--border);
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.16);
}
dialog.sheet[open] { display: flex; flex-direction: column; }
dialog.sheet::backdrop { background: rgba(10, 10, 10, 0.36); }
.sheet-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 4px solid var(--accent); border-bottom: 1px solid var(--border); }
.sheet-bar .find { flex: 1 1 auto; }
.sheet-back { font: inherit; font-size: 14px; font-weight: 600; color: var(--accent-ink); background: none; border: 0; padding: 6px 4px; cursor: pointer; white-space: nowrap; max-width: 40%; overflow: hidden; text-overflow: ellipsis; }
.sheet-back:hover { text-decoration: underline; }
.sheet-close {
  position: relative; flex: none; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--raised); font-size: 0; color: var(--ink); cursor: pointer;
}
.sheet-close::before, .sheet-close::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 2px; margin: -1px 0 0 -8px;
  background: currentColor; border-radius: 1px; transform: rotate(45deg);
}
.sheet-close::after { transform: rotate(-45deg); }
.sheet-close:hover { background: var(--wash); border-color: var(--accent); }
.sheet-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 20px 20px 32px; }
.sheet-head h2 { margin: 2px 0 0; font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1.05; text-transform: uppercase; letter-spacing: 0.01em; }
.sheet-head h2:focus { outline: none; }
.kicker { margin: 0; font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-ink); }
.sheet-sub { margin: 4px 0 0; color: var(--ink-2); }
.sheet-head .stats { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; font-family: var(--display); font-size: 22px; font-weight: 600; color: var(--ink); }
.sheet-head .stats span span { font-family: var(--font); font-size: 14px; font-weight: 500; color: var(--muted); }
.sheet-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.sheet-actions .step { min-height: 32px; padding: 4px 12px; }
.copied { font-size: 13px; color: var(--muted); min-width: 0; flex: 1 1 200px; }
.link-box { width: 100%; font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; }
.history h3 {
  margin: 22px 0 0; padding-bottom: 6px; border-bottom: 2px solid var(--ink);
  font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: 0.05em; text-transform: uppercase;
}
.inj-list { list-style: none; margin: 0; padding: 0; }
.inj { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--grid); }
.inj .what { font-weight: 600; }
.inj .type { font-weight: 500; color: var(--ink-2); }
.inj .missed { text-align: right; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.inj .missed.none { font-weight: 500; color: var(--muted); }
.inj .when, .inj .said { grid-column: 1 / -1; font-size: 14px; color: var(--ink-2); }
.inj .said { color: var(--muted); }
.sheet-note { margin: 18px 0 0; font-size: 13px; color: var(--muted); }
.roster { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--grid); }
.roster-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; width: 100%; text-align: left;
  font: inherit; color: inherit; background: none; border: 0; border-bottom: 1px solid var(--grid); padding: 9px 6px; cursor: pointer;
}
.roster-item:hover { background: var(--wash); }
.roster-item .nm { font-weight: 600; }
.roster-item .ps { grid-column: 1; font-size: 13px; color: var(--muted); }
.roster-item .ct { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
  dialog.sheet[open] { animation: sheet-in 0.2s ease-out; }
  dialog.sheet[open]::backdrop { animation: shade-in 0.2s ease-out; }
}
@keyframes sheet-in { from { transform: translateX(40px); opacity: 0; } }
@keyframes shade-in { from { opacity: 0; } }
@media (max-width: 640px) {
  .pagebar .find { flex: 1 1 100%; margin-left: 0; order: 1; }
  .pagebar .filters { order: 2; }
  dialog.sheet { width: 100%; border-left: 0; }
  .sheet-bar { padding: 10px 12px; }
  .sheet-body { padding: 16px 16px 28px; }
  .sheet-head h2 { font-size: 30px; }
  .find-pop { width: 100%; }
}
@media (forced-colors: active) {
  .opt[aria-selected="true"] { outline: 2px solid Highlight; }
}
