/* sportsteams.net — page shell + reusable heatmap (.hm-*) */
:root{
  --bg:#0e1116; --surface:#1b2028; --line:#2a313b; --text:#e6e8eb; --muted:#a3a9b3; --link:#9ec5ff; --focus:#ffd166;
  /* form buckets: dark = strong (white text), light = mild (dark text); all pass 4.5:1 */
  --g3:#0d5226; --g2:#1a7a3a; --g1:#8fd19e; --z:#5b6270; --r1:#f4aca4; --r2:#b42318; --r3:#7a1610; --ink:#0b0d10;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font:15px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
a{color:var(--link)} a:hover{color:#c7ddff}
:focus-visible{outline:3px solid var(--focus);outline-offset:2px}

/* shell */
.st-head,.st-tabs,.st-main,.st-foot{max-width:1280px;margin:0 auto;padding-left:16px;padding-right:16px}
.st-head{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;padding-top:20px}
.st-logo{color:var(--text);text-decoration:none;font-size:22px;font-weight:800}
.st-logo span{color:var(--g1)}
.st-tag{color:var(--muted);font-size:14px}
.st-tabs{display:flex;gap:8px;overflow-x:auto;padding-top:14px;padding-bottom:4px;scrollbar-width:none}
.st-tabs a{flex:0 0 auto;display:inline-flex;align-items:center;min-height:44px;padding:0 18px;border:1px solid var(--line);border-radius:999px;color:#c3c8d0;text-decoration:none;font-weight:600;font-size:14px}
.st-tabs a[aria-current]{background:var(--text);color:var(--bg);border-color:var(--text)}
.st-titlebar{display:flex;align-items:baseline;justify-content:space-between;gap:8px 16px;flex-wrap:wrap;margin:18px 0 12px}
.st-titlebar h1{margin:0;font-size:24px;font-weight:800}
.st-titlebar small{font-size:14px;font-weight:500;color:var(--muted)}
.st-upd{margin:0;color:var(--muted);font-size:13px}
.st-foot{margin-top:40px;padding-top:18px;padding-bottom:32px;border-top:1px solid #222832;color:var(--muted);font-size:13px}
.st-foot a{margin-right:20px;display:inline-block}

/* home */
.st-sec{margin-top:26px}
.st-sec h2{margin:0 0 10px;font-size:18px;font-weight:800}
.st-cards{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:8px}
.st-card{display:flex;flex-direction:column;gap:6px;min-height:44px;padding:14px;border:1px solid var(--line);border-radius:10px;background:#171b22;color:var(--text);text-decoration:none}
.st-card:hover{border-color:#3a4350}
.st-card-t{font-weight:700;font-size:16px;color:var(--link)}
.st-card-l{font-size:13px;color:var(--muted)}
.st-card-l b{color:var(--text)}

/* heatmap */
.hm{position:relative}
.hm-bar{display:flex;justify-content:flex-end;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.hm-key{display:flex;gap:3px}
.hm-key span{padding:5px 8px;border-radius:4px;font-size:11px;font-weight:700}
.hm-eq{min-height:44px;padding:0 14px;border:1px solid var(--line);border-radius:8px;background:#171b22;color:var(--text);font:600 13px inherit;cursor:pointer}
.hm-eq[aria-pressed="true"]{background:var(--text);color:var(--bg)}

.hm-grid{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:4px}
/* weighted flex: width & height grow with --w (points). Not a strict treemap, but reflows for free. */
.hm-tile{flex:var(--w) 1 calc(96px + var(--w) * 6px);min-height:calc(72px + var(--w) * 1.6px);display:flex;border-radius:6px}
.hm--equal .hm-tile{--w:12 !important}
.hm-btn{all:unset;box-sizing:border-box;width:100%;padding:10px 12px;display:flex;flex-direction:column;justify-content:space-between;gap:4px;cursor:pointer;border-radius:6px}
.hm-btn:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.hm-btn[aria-expanded="true"]{box-shadow:inset 0 0 0 2px #fff}
.hm-name{font-weight:700;font-size:15px;line-height:1.2}
.hm-tag{display:inline-block;margin-left:4px;padding:1px 5px;border-radius:3px;border:1px solid currentColor;font-size:10px;font-weight:700;vertical-align:2px}
.hm-letters{font-weight:800;font-size:13px;letter-spacing:3px}
.hm-meta{font-weight:600;font-size:12px;font-variant-numeric:tabular-nums}

.hm-g3{background:var(--g3);color:#fff}.hm-g2{background:var(--g2);color:#fff}.hm-g1{background:var(--g1);color:var(--ink)}
.hm-z{background:var(--z);color:#fff}
.hm-r1{background:var(--r1);color:var(--ink)}.hm-r2{background:var(--r2);color:#fff}.hm-r3{background:var(--r3);color:#fff}

/* popover (desktop) / bottom sheet (phone) */
.hm-pop{position:absolute;z-index:10;width:300px;background:var(--surface);border:1px solid #2f3742;border-radius:10px;box-shadow:0 12px 32px rgba(0,0,0,.5);padding:14px;font-size:13px}
.hm-pop[hidden]{display:none}
.hm-pop-h{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}
.hm-pop-t{font-size:16px;font-weight:700;color:var(--text)}
a.hm-pop-t{color:var(--link)}
.hm-pop-x{all:unset;cursor:pointer;width:44px;height:44px;display:flex;align-items:center;justify-content:center;border-radius:8px;color:#c3c8d0;margin:-10px -10px -10px 0}
.hm-pop-x:hover{background:var(--line)}
.hm-pop-m{color:var(--muted);font-size:12px;margin-bottom:8px}
.hm-pop ul{list-style:none;margin:0 0 10px;padding:0;display:flex;flex-direction:column;gap:6px}
.hm-pop li{display:flex;align-items:center;gap:10px;font-variant-numeric:tabular-nums}
.hm-b{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:4px;font-weight:800;font-size:12px;color:#fff;flex:0 0 auto}
.hm-bW{background:var(--g2)}.hm-bD{background:var(--z)}.hm-bL{background:var(--r2)}
.hm-pop-n{border-top:1px solid #2f3742;padding-top:10px}
.hm-pop-n span{color:var(--muted)}

@media (max-width:640px){
  .st-head,.st-tabs,.st-main,.st-foot{padding-left:12px;padding-right:12px}
  .st-titlebar h1{font-size:19px}
  .hm-grid{gap:3px}
  .hm-tile{flex-basis:calc(84px + var(--w) * 3px);min-height:calc(60px + var(--w) * 1px)}
  .hm-btn{padding:8px 9px}
  .hm-name{font-size:13px}.hm-letters{font-size:11px;letter-spacing:2px}.hm-meta{font-size:11px}
  .hm-key{display:none}
  .hm-pop{position:fixed;left:0;right:0;bottom:0;top:auto!important;width:auto;border-radius:16px 16px 0 0;padding:12px 16px 22px;font-size:14px}
}
