/* The Dig ND — layout: one left-aligned column, tables are the hero.
   Color: cool paper, deep teal links, maple (gym floor) for rating bars. */
:root {
  --paper: #f5f6f3;
  --surface: #ffffff;
  --ink: #18222a;
  --muted: #59656c;
  --line: #d9ded9;
  --accent: #1f5f66;
  --maple: #c4964f;
  --maple-soft: #ecdfc6;
  --win: #2d6a3e;
  --loss: #8a3b2e;
  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12181c; --surface: #182027; --ink: #e6ebe9; --muted: #9ba7ac; --line: #2b353c;
    --accent: #84c6c6; --maple: #d6ac68; --maple-soft: #3a3124; --win: #8fcf9c; --loss: #e59a8b;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.55 var(--body); font-variant-numeric: tabular-nums;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--maple); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 6px 10px; z-index: 10; }
.wrap { max-width: 1040px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }

/* header */
.site-head { border-bottom: 1px solid var(--line); background: var(--surface); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 14px; }
.wordmark { font: 700 28px/1 var(--display); color: var(--ink); text-decoration: none; letter-spacing: 0.01em; }
.wordmark span { color: var(--maple); }
.site-head nav { display: flex; gap: 4px 18px; flex-wrap: wrap; }
.site-head nav a { font: 600 17px/1.2 var(--display); color: var(--muted); text-decoration: none; padding-block: 4px; }
.site-head nav a:hover, .site-head nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--maple); }

/* type */
main { padding-block: 32px 56px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.1; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(36px, 6vw, 56px); font-weight: 700; }
h2 { font-size: 28px; margin-top: 40px; margin-bottom: 12px; }
h3 { font-size: 22px; }
.lede { font-size: 19px; color: var(--muted); max-width: 64ch; margin: 12px 0 0; }
.note { color: var(--muted); font-size: 15px; max-width: 70ch; }
.intro { margin-bottom: 28px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.section-head h2 { margin-bottom: 12px; }

/* tables */
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--surface); }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
thead th { font: 600 15px/1.2 var(--display); color: var(--muted); border-bottom: 2px solid var(--ink); white-space: nowrap; }
caption { text-align: left; color: var(--muted); padding-bottom: 6px; }
.num { text-align: right; }
td.rank { color: var(--muted); width: 3em; }
td.team a { color: var(--ink); text-decoration: none; font-weight: 500; }
td.team a:hover { color: var(--accent); text-decoration: underline; }
.wvr-col { width: 38%; min-width: 180px; }
.wvr-cell { display: flex; align-items: center; gap: 10px; }
.wvr { flex: 0 0 3.2em; font: 700 21px/1 var(--display); }
.bar { flex: 1 1 auto; height: 10px; background: var(--maple-soft); }
.bar span { display: block; height: 100%; background: var(--maple); }
.rec { white-space: nowrap; }
.div { font: 600 14px/1 var(--display); padding: 3px 6px; border: 1px solid var(--line); color: var(--muted); }
.tag { font: 600 13px/1 var(--display); color: var(--muted); border: 1px solid var(--line); padding: 2px 5px; margin-left: 4px; }

/* home leaders */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 24px; }
.col h3 a { color: var(--ink); text-decoration: none; }
.col h3 a:hover { color: var(--accent); }
.col ol { margin: 8px 0 0; padding-left: 1.4em; }
.col li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.col li a { color: var(--ink); text-decoration: none; }
.wvr-s { float: right; font: 700 18px/1.4 var(--display); }

/* team page */
.crumb { margin: 0 0 6px; font: 600 17px/1 var(--display); }
.stats { display: flex; flex-wrap: wrap; gap: 12px 36px; margin: 20px 0 8px; }
.stat dt { font: 600 15px/1.2 var(--display); color: var(--muted); }
.stat dd { margin: 2px 0 0; font: 700 30px/1 var(--display); }
.stat.big dd { font-size: 56px; color: var(--ink); box-shadow: inset 0 -8px 0 var(--maple-soft); }
.of { font-size: 18px; color: var(--muted); font-weight: 500; }
.games td.date { white-space: nowrap; color: var(--muted); width: 6em; }
.res { white-space: nowrap; font-weight: 600; }
.res-w { color: var(--win); }
.res-l { color: var(--loss); }
.res-t { color: var(--muted); }
.chance { display: inline-block; width: 60px; height: 8px; background: var(--maple-soft); margin-right: 8px; vertical-align: middle; }
.chance span { display: block; height: 100%; background: var(--maple); }
table.narrow { max-width: 420px; }

/* prose */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 32px; }
.prose li { margin: 6px 0; }
.policies h2 { font-size: 26px; }
.policies table { font-size: 15px; }

/* footer */
.site-foot { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 15px; }
.foot-row { padding-block: 20px 28px; }
.foot-row p { margin: 6px 0; }
.foot-row a { margin-right: 16px; }
.fine { font-size: 14px; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hide-s { display: none; }
  th, td { padding: 8px 6px; }
  .wvr-col { width: auto; min-width: 140px; }
  .stat.big dd { font-size: 46px; }
}

/* regions */
.region-list { list-style: none; margin: 8px 0 0; padding: 0; }
.region-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.region-list > li > a { font: 600 19px/1.3 var(--display); }
.leader { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.leader .wvr-s { float: none; color: var(--ink); }
.stat dt a { color: inherit; }

/* logo mark */
.wordmark { display: inline-flex; align-items: center; gap: 10px; }
.mark { width: 34px; height: 34px; flex: none; }
.mark-fill { fill: var(--maple); }
.mark-line { stroke: var(--ink); }

/* region switcher */
.subnav { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0 0 24px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.subnav-group { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.subnav-label { font: 700 16px/1 var(--display); color: var(--muted); margin-right: 6px; }
.subnav a { font: 600 17px/1 var(--display); min-width: 40px; padding: 9px 10px; text-align: center; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); }
.subnav a:hover { border-color: var(--maple); }
.subnav a[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pager { display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); }
.pager a { max-width: 48%; display: flex; flex-direction: column; gap: 2px; font: 600 19px/1.2 var(--display); text-decoration: none; }
.pager-next { text-align: right; margin-left: auto; }
.pager-dir { font: 500 14px/1 var(--body); color: var(--muted); }

/* brackets */
.matches { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); gap: 14px; max-width: 900px; }
.match { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--maple); }
.m-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; }
.m-row + .m-row { border-top: 1px solid var(--line); }
.m-row a { color: var(--ink); text-decoration: none; font-weight: 500; flex: 1 1 auto; }
.m-row a:hover { color: var(--accent); text-decoration: underline; }
.seed { flex: 0 0 2.4em; font: 600 15px/1 var(--display); color: var(--muted); }
.b-wvr { color: var(--muted); font-size: 15px; }
.b-p { flex: 0 0 3.2em; text-align: right; font: 700 18px/1 var(--display); }
.tbd { color: var(--muted); font-style: italic; flex: 1 1 auto; }
.empty { font-size: 18px; padding: 20px; background: var(--surface); border: 1px dashed var(--line); }
table.odds td.num:last-child { white-space: nowrap; }

/* drawn bracket */
.bracket-wrap { overflow-x: auto; padding: 8px 0 4px; -webkit-overflow-scrolling: touch; }
.bracket-svg { display: block; width: 100%; height: auto; min-width: 860px; font-family: var(--body); }
.bk-slot { fill: var(--surface); stroke: var(--line); }
.bk-open { fill: transparent; stroke-dasharray: 3 3; }
.bk-game rect:first-of-type { }
.bk-seed { fill: var(--muted); font: 600 13px var(--display); }
.bk-team { fill: var(--ink); font-size: 14px; font-weight: 500; }
a:hover .bk-team { fill: var(--accent); text-decoration: underline; }
.bk-pct { fill: var(--ink); font: 700 15px var(--display); }
.bk-label { fill: var(--muted); font-size: 13px; font-style: italic; }
.bk-head { fill: var(--muted); font: 600 12.5px var(--display); }
.bk-line { fill: none; stroke: var(--maple); stroke-width: 2; }
.bk-tag { fill: var(--accent); font: 600 13px var(--display); }
