@font-face {
  font-family: "Barlow Condensed";
  src: url("/memphis-draft/barlow-condensed-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f4f5f7;
  --surface: #fff;
  --ink: #182139;
  --muted: #4e5d72;
  --line: #d0d9e5;
  --brand: #12173f;
  --blue: #3e5d92;
  --blue-wash: #e9eff9;
  --stripe: #f4f7fb;
  --active: #3e5d92;
  --on-active: #fff;
  --success: #236343;
  --delay: #845310;
  --number: "Barlow Condensed", "Arial Narrow", sans-serif;
  --sans: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141a22;
  --surface: #1b222c;
  --ink: #e5ebf5;
  --muted: #aebdd0;
  --line: #3b4c65;
  --brand: #d4e5ff;
  --blue: #aac8fc;
  --blue-wash: #25354e;
  --stripe: #202a38;
  --active: #a6c4f3;
  --on-active: #111f35;
  --success: #8ed3ab;
  --delay: #fac277;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--sans); }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.frame { width: min(100%, 1120px); margin-inline: auto; padding-inline: clamp(12px, 3.2vw, 36px); }
.mast { background: var(--surface); border-bottom: 1px solid var(--line); }
.mast-content, .mast-actions, .wordmark { display: flex; align-items: center; }
.mast-content { min-height: 52px; justify-content: space-between; gap: 10px; }
.wordmark { gap: 8px; color: var(--brand); font: 700 20px/1 var(--number); letter-spacing: .12em; }
.wordmark img { object-fit: contain; }
.brand-dot { display: inline-block; width: 5px; height: 5px; margin-left: 4px; vertical-align: top; background: var(--blue); }
.mast-actions { gap: clamp(8px, 2vw, 20px); font-size: 12px; }
.mast-actions a { text-decoration: none; }
.mast-actions button { border: 1px solid var(--line); border-radius: 0; padding: 4px 9px; background: transparent; min-height: 34px; }

main { padding-block: 24px 42px; }
.title-row { border-left: 4px solid var(--blue); padding-left: 12px; }
.kicker, .section-head > span { color: var(--muted); font-size: 12px; }
.kicker span, .clock time, #updated, .score, .seed, .pick-number, .right-prob, .percent, .balls { font: 700 1.15em/1.1 var(--number); font-variant-numeric: tabular-nums; }
h1, h2, h3, p { margin: 0; }
h1 { color: var(--brand); font-size: clamp(22px, 5.9vw, 42px); line-height: 1.13; letter-spacing: -.035em; }
h1 span { font: 700 1.2em/.95 var(--number); letter-spacing: 0; }
h2 { color: var(--brand); font-size: clamp(15px, 3.8vw, 21px); line-height: 1.25; }

.controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-top: 20px; }
.segment { display: inline-flex; border: 1px solid var(--line); max-width: 100%; background: var(--surface); }
.segment button { flex: 1 1 auto; padding: 6px clamp(5px, 2vw, 13px); min-height: 36px; border: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: 12px; white-space: nowrap; }
.segment button + button { border-left: 1px solid var(--line); }
.segment button[aria-pressed="true"] { background: var(--active); color: var(--on-active); font-weight: 700; }
.clock { color: var(--muted); font-size: 12px; }
.clock time { color: var(--ink); margin-left: 4px; }

.data-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 9px; border: 1px solid var(--line); background: var(--surface); padding: 7px 10px; font-size: 12px; }
.data-status div { display: flex; align-items: center; gap: 5px; }
.data-status div > span:first-child { color: var(--muted); }
.data-status time { color: var(--ink); }
.status-mark { width: 6px; height: 6px; background: var(--success); }
.status-pending { background: var(--muted); }
.status-delayed { background: var(--delay); }
.play-in { margin-top: 7px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.reference-forecast { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 7px; color: var(--muted); font-size: 12px; }

section { margin-top: 23px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; border-bottom: 2px solid var(--blue); padding-bottom: 6px; }
.section-head a { font-size: 12px; }

.rights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.right { display: grid; align-content: start; background: var(--surface); border: 1px solid var(--line); min-width: 0; container-type: inline-size; }
.right-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px 9px; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.right-code { display: inline-block; background: var(--blue-wash); color: var(--blue); padding: 2px 5px; font: 700 15px/1 var(--number); }
.right h3 { font-size: 14px; }
.right dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 8px 6px; text-align: center; }
.right dl div + div { border-left: 1px solid var(--line); }
.right dt { color: var(--muted); font-size: 11px; }
.right dd { margin: 2px 0 0; color: var(--brand); font-size: 17px; font-size: clamp(17px, 7.5cqi, 28px); }
.right-prob { display: block; white-space: nowrap; font-size: .98em; }
.right-foot { min-height: 37px; margin: 0; border-top: 1px solid var(--line); padding: 7px 10px; color: var(--muted); font-size: 12px; }
.right-foot b { color: var(--blue); white-space: nowrap; }
.empty { padding: 9px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }

.table-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding-block: 8px; }
.table-controls p, .scenario-note { font-size: 12px; color: var(--muted); }
.scenario-note { padding-block: 7px; }
.table-frame { background: var(--surface); border: 1px solid var(--line); }
.grid-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.grid-table th, .grid-table td { padding: 5px clamp(3px, 1vw, 10px); text-align: center; }
.grid-table thead { background: var(--blue-wash); color: var(--brand); font-size: 12px; }
.grid-table thead th { font-weight: 650; overflow-wrap: anywhere; }
.grid-table tbody tr { border-top: 1px solid var(--line); }
.grid-table tbody tr:nth-child(even) { background: var(--stripe); }
.grid-table .stage-break { border-top: 2px solid var(--blue); }
.probability-table th:first-child { width: 17%; }
.pick-number { color: var(--blue); }
.percent { font-size: 1.03em; }
.percent.zero { color: var(--muted); }
.probability-table td.chance { background: var(--blue-wash); color: var(--brand); }
.probability-table td.chance small { margin-left: 6px; color: var(--muted); font-size: 10px; font-family: var(--sans); }

.standings-table thead th:nth-child(1) { width: 26%; }
.standings-table thead th:nth-child(2) { width: 15%; }
.standings-table thead th:nth-child(3) { width: 12%; }
.standings-table thead th:nth-child(4) { width: 25%; }
.standings-table thead th:nth-child(5) { width: 22%; }
.standings-table :is(th, td):first-child { text-align: left; padding-left: clamp(5px, 1.2vw, 12px); }
.standings-table th:first-child { overflow-wrap: anywhere; }
.standings-table tr.watched { background: var(--blue-wash) !important; }
.team-code { margin-right: .35em; color: var(--blue); font: 700 1.15em/1 var(--number); }
.team-name { font-weight: 550; }
.restriction { color: var(--muted); font-size: 10px; font-weight: 450; }
.draft-slot select { background: var(--surface); border: 1px solid var(--line); border-radius: 0; max-width: 100%; min-height: 31px; padding: 2px; font-size: 12px; }
.standings-table.live thead th:nth-child(4) { width: 36%; }
.standings-table.live thead th:nth-child(5) { width: 11%; }

.method { margin-top: 20px; padding: 8px 11px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 12px; }
.method summary { cursor: pointer; color: var(--blue); font-weight: 700; }
.method p { margin-top: 7px; }
.method ul { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 7px 0 0; padding-left: 16px; }

@media (max-width: 900px) {
  .rights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .right:last-child { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .rights { grid-template-columns: 1fr; gap: 6px; }
  .right-top { padding-block: 6px; }
  .right-foot { min-height: 0; padding-block: 5px; }
}
@media (max-width: 390px) {
  .mast-content { min-height: 45px; }
  main { padding-top: 17px; }
  .controls { margin-top: 15px; }
  .team-name, .team-code { display: block; margin: 0; }
  .restriction { display: none; }
  .standings-table { font-size: 12px; }
  .probability-table td.chance small { display: block; margin: 1px 0 0; }
}

.right-record { color: var(--muted); font: 700 17px/1 var(--number); font-variant-numeric: tabular-nums; }
.right-foot .source-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.source-grid > span { min-width: 0; }
.source-grid small { display: block; font: 700 1.15em/1.05 var(--number); }
