/* ---------- theme tokens ---------- */
:root {
  --blue: #005a9c;          /* Dodger Blue */
  --blue-soft: #2f7fc9;
  --red: #ef3e42;

  --bg: #edf2f8;
  --bg-accent: linear-gradient(180deg, #d9e6f5 0%, #edf2f8 260px);
  --surface: #ffffff;
  --surface-2: #f3f7fb;
  --border: #d7e1ee;
  --text: #10233d;
  --muted: #5d7190;
  --accent: #005a9c;
  --accent-text: #ffffff;
  --win: #1d9a5f;
  --loss: #d3363c;
  --live: #e0552b;
  --shadow: 0 1px 2px rgba(16, 35, 61, 0.06), 0 8px 24px -12px rgba(16, 35, 61, 0.18);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1626;
    --bg-accent: linear-gradient(180deg, #102a4d 0%, #0b1626 280px);
    --surface: #12213a;
    --surface-2: #182b48;
    --border: #23395c;
    --text: #e6edf7;
    --muted: #97a9c4;
    --accent: #4a9eff;
    --accent-text: #08192e;
    --win: #4ccb8f;
    --loss: #f27676;
    --live: #ff8a5b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px -14px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1626;
  --bg-accent: linear-gradient(180deg, #102a4d 0%, #0b1626 280px);
  --surface: #12213a;
  --surface-2: #182b48;
  --border: #23395c;
  --text: #e6edf7;
  --muted: #97a9c4;
  --accent: #4a9eff;
  --accent-text: #08192e;
  --win: #4ccb8f;
  --loss: #f27676;
  --live: #ff8a5b;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px -14px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg-accent), var(--bg);
  background-color: var(--bg);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.hidden { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-logo { width: 44px; height: 44px; flex: none; filter: drop-shadow(0 2px 4px rgba(0,0,0,.15)); }
.brand h1 { margin: 0; font-size: 22px; letter-spacing: -0.01em; line-height: 1.15; }
.standings { margin: 2px 0 0; font-size: 13.5px; }
.standings b { color: var(--text); font-weight: 650; }
.standings .sep { opacity: .5; margin: 0 6px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: var(--shadow);
}
.icon-btn:hover { border-color: var(--accent); }
:root[data-theme="dark"] .icon-sun, :root:not([data-theme]) .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon, :root:not([data-theme]) .icon-moon { display: block; }
:root[data-theme="light"] .icon-sun { display: block; }
:root[data-theme="light"] .icon-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .icon-sun { display: block; }
  :root:not([data-theme]) .icon-moon { display: none; }
}

/* ---------- grid ---------- */
/* Multi-column rather than a grid: a grid keeps a collapsed widget's row at the
   height of its tallest sibling, leaving a hole. Columns let everything below
   pack upward when one closes. */
.grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 20px 24px;
  column-gap: 18px;
}
@media (min-width: 980px) {
  .grid { columns: 2; }
}

/* ---------- widgets ---------- */
.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  height: 680px;
  /* Columns must never split a widget down the middle. */
  break-inside: avoid;
  margin-bottom: 18px;
}
.widget-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.widget-head h2 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: baseline; gap: 8px; }
.widget-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.widget-body::-webkit-scrollbar { width: 8px; }
.widget-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
.widget-foot {
  padding: 9px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.empty { padding: 32px 16px; text-align: center; color: var(--muted); }
.error { padding: 24px 16px; color: var(--loss); }

/* segmented control */
.segmented {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px;
}
.segmented button {
  border: 0; background: transparent; padding: 5px 12px; border-radius: 7px;
  font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.segmented button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.12); }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
  padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  line-height: 1.2;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }

/* search */
.search {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  border-radius: 9px; padding: 6px 10px; font-size: 13.5px; min-width: 160px; outline: none;
}
.search:focus { border-color: var(--accent); }

/* skeletons */
.skeleton-list { padding: 14px 16px; display: grid; gap: 12px; }
.skeleton-list > div {
  height: 52px; border-radius: 10px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- schedule ---------- */
.hero {
  margin: 14px 16px 8px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue) 0%, #0d3d75 100%);
  color: #fff;
  display: block;
  position: relative;
  overflow: hidden;
}
.hero:hover { text-decoration: none; filter: brightness(1.05); }
.hero .kicker { font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; opacity: .8; font-weight: 700; }
.hero .kicker.live { color: #ffd6c7; }
.hero .kicker.live::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff6a3d; margin-right: 6px; animation: pulse 1.4s infinite; vertical-align: 1px; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.hero .matchup { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.hero .matchup img { width: 44px; height: 44px; background: rgba(255,255,255,.92); border-radius: 50%; padding: 5px; flex: none; }
.hero .matchup .vs { font-size: 20px; font-weight: 750; letter-spacing: -0.01em; line-height: 1.2; }
.hero .matchup .vs small { font-size: 13px; font-weight: 500; opacity: .85; display: block; }
.hero .score { margin-left: auto; font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; line-height: 1; }
.hero .score small { display: block; font-size: 12px; font-weight: 600; opacity: .85; margin-top: 4px; }
.hero .details { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; opacity: .92; }
.hero .details span::before { content: "·"; margin-right: 8px; opacity: .6; }
.hero .details span:first-child::before { content: none; }

.game-list { list-style: none; margin: 0; padding: 4px 8px 12px; }
.game-list .day-label { padding: 12px 8px 4px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.game {
  display: grid;
  grid-template-columns: 54px 30px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-radius: 10px;
}
.game:hover { background: var(--surface-2); text-decoration: none; }
.game .date { font-size: 13px; font-weight: 600; line-height: 1.15; }
.game .date small { display: block; color: var(--muted); font-weight: 500; font-size: 11.5px; }
.game .logo { width: 28px; height: 28px; object-fit: contain; }
.game .who { min-width: 0; }
.game .who .opp { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game .who .opp .ha { color: var(--muted); font-weight: 500; margin-right: 3px; }
.game .who .sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game .right { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 13px; }
.game .right .res { font-weight: 700; }
.game .right .res.w { color: var(--win); }
.game .right .res.l { color: var(--loss); }
.game .right .res.live { color: var(--live); }
.game .right small { display: block; color: var(--muted); font-size: 11.5px; }
.game.today { outline: 1px solid var(--accent); outline-offset: -1px; }

/* calendar */
.cal-nav { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 8px; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.cal-nav h3 { margin: 0; font-size: 15px; }
.cal-nav button { border: 1px solid var(--border); background: var(--surface-2); border-radius: 8px; width: 30px; height: 30px; cursor: pointer; }
.cal-nav button:disabled { opacity: .35; cursor: default; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 0 12px 14px; }
.cal .dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 4px 0; }
.cal .cell {
  min-height: 64px; border-radius: 8px; padding: 5px 5px 4px;
  background: var(--surface-2); border: 1px solid transparent;
  display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--muted);
}
.cal .cell.pad { background: transparent; }
.cal .cell.today { border-color: var(--accent); }
.cal .cell .d { font-weight: 700; font-size: 11px; }
.cal .cell.has-game { color: var(--text); }
.cal a.cell:hover { text-decoration: none; border-color: var(--accent); }
.cal .cell.home { background: color-mix(in srgb, var(--accent) 14%, var(--surface-2)); }
.cal .cell .opp { display: flex; align-items: center; gap: 4px; font-weight: 600; font-size: 11.5px; }
.cal .cell .opp img { width: 16px; height: 16px; }
.cal .cell .r { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cal .cell .r.w { color: var(--win); }
.cal .cell .r.l { color: var(--loss); }
.cal .cell .r.live { color: var(--live); }
.cal .cell .t { font-size: 10.5px; color: var(--muted); }
.cal-legend { display: flex; gap: 14px; padding: 0 16px 12px; font-size: 11.5px; color: var(--muted); }
.cal-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- news ---------- */
.news-list { list-style: none; margin: 0; padding: 6px 8px 10px; }
.news-item { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 10px 8px; border-radius: 10px; }
.news-item.has-img { grid-template-columns: 92px 1fr; }
.news-item:hover { background: var(--surface-2); }
.news-item img { width: 92px; height: 62px; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.news-item .title { font-weight: 600; line-height: 1.3; display: block; }
.news-item .title:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.news-item .summary { color: var(--muted); font-size: 12.5px; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-item .meta { color: var(--muted); font-size: 11.5px; margin-top: 5px; display: flex; gap: 6px; flex-wrap: wrap; }
.news-item .meta .src { font-weight: 700; color: var(--accent); }

/* ---------- roster ---------- */
.roster-group { padding: 12px 8px 0; }
.roster-group h3 { margin: 0 8px 4px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.roster-group h3 span { font-weight: 500; letter-spacing: 0; text-transform: none; margin-left: 6px; }
.player {
  display: grid; grid-template-columns: 38px 34px 1fr auto; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 10px;
}
.player:hover { background: var(--surface-2); text-decoration: none; }
.player img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.player .num { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13px; text-align: center; }
.player .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .name .pos { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); font-size: 10.5px; font-weight: 700; vertical-align: 1px; }
.player .bt { color: var(--muted); font-size: 12px; }
.player .stat { text-align: right; font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.player .stat b { color: var(--text); font-weight: 650; }

/* ---------- social ---------- */
.social-frame { padding: 10px 12px 12px; }
.social-frame .twitter-timeline { color: var(--muted); font-size: 13px; }
.social-note { padding: 14px 16px 0; color: var(--muted); font-size: 13px; }
.social-cards { list-style: none; margin: 0; padding: 10px 8px 12px; display: grid; gap: 6px; }
.social-cards a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; border: 1px solid var(--border); }
.social-cards a:hover { background: var(--surface-2); text-decoration: none; border-color: var(--accent); }
.social-cards .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; font-weight: 800; }
.social-cards .handle { font-weight: 700; }
.social-cards .why { color: var(--muted); font-size: 12.5px; }

/* ---------- page footer ---------- */
.page-foot { max-width: 1280px; margin: 0 auto; padding: 4px 20px 32px; }

@media (max-width: 560px) {
  .topbar { padding: 16px 14px 10px; }
  .grid { padding: 6px 12px 20px; gap: 14px; }
  .widget { height: 600px; }
  .widget-head { padding: 12px 14px 10px; }
  .hero { margin: 12px 12px 6px; }
  .hero .score { font-size: 24px; }
  .cal .cell { min-height: 56px; padding: 4px; }
  .cal .cell .opp img { display: none; }
  .news-item.has-img { grid-template-columns: 72px 1fr; }
  .news-item img { width: 72px; height: 50px; }
}

/* =========================================================
   Round two: standings, trades, roster tabs, Bluesky, drawer
   ========================================================= */

.head-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.thinking { display: flex; align-items: center; gap: 14px; padding: 40px 20px; color: var(--text); }
.widget-off { display: grid; gap: 8px; padding: 36px 22px; color: var(--muted); }
.widget-off p { margin: 0; font-size: 13.5px; line-height: 1.55; max-width: 46ch; }
.widget-off b { color: var(--text); }
/* A switched-off widget holds no content; don't reserve a full column of height for it. */
.widget:has(.widget-off) { height: auto; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: spin 0.9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* generic data table */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 6px 8px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border); }
.tbl th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl tr.us td { background: color-mix(in srgb, var(--accent) 12%, transparent); font-weight: 650; }
.tbl tr.us td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.tbl td.pos { color: var(--win); }
.tbl td.neg { color: var(--loss); }
.tbl .team { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.tbl .team img { width: 20px; height: 20px; }
.tbl .team .clinch { color: var(--muted); font-weight: 500; font-size: 11.5px; }
.tbl-wrap { overflow-x: auto; }

/* ---------- standings ---------- */
.stand-section { padding: 12px 16px 4px; }
.stand-section h3 { margin: 0 0 6px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; justify-content: space-between; }
.stand-section h3 span { font-weight: 500; text-transform: none; letter-spacing: 0; }
.seeds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 16px 8px; }
.seed { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; display: flex; align-items: center; gap: 8px; background: var(--surface-2); min-width: 0; }
.seed.us { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface-2)); }
.seed img { width: 26px; height: 26px; flex: none; }
.seed .n { font-size: 11px; font-weight: 800; color: var(--muted); width: 14px; }
.seed .who { min-width: 0; }
.seed .who b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seed .who small { color: var(--muted); font-size: 11px; }
.seed .bye { margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--win); }
.wc-line { height: 2px; background: var(--loss); margin: 2px 0; opacity: .6; }
.tbl tr.cut td { border-bottom: 2px dashed var(--loss); }

/* ---------- trades ---------- */
.trade-note { padding: 12px 16px 4px; color: var(--muted); font-size: 13px; }
.trade-note b { color: var(--text); }
.trade { margin: 10px 12px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.trade-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.trade-head img { width: 34px; height: 34px; flex: none; }
.trade-head .h { min-width: 0; }
.trade-head .h b { display: block; font-size: 14px; line-height: 1.25; }
.trade-head .h small { color: var(--muted); }
.meter { margin-left: auto; text-align: right; flex: none; }
.meter .bar { width: 72px; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; margin-top: 3px; }
.meter .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--loss), #e6b93a, var(--win)); background-size: 72px 100%; }
.meter small { font-size: 10.5px; color: var(--muted); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.trade-cols { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--border); }
.trade-cols > div { padding: 8px 12px; }
.trade-cols > div + div { border-left: 1px solid var(--border); }
.trade-cols h4 { margin: 0 0 4px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.trade-cols ul { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.trade-cols li { padding: 2px 0; }
.trade-cols li b { font-weight: 650; }
.trade-cols li .pos { color: var(--muted); font-size: 11px; margin-left: 4px; }
.trade-cols li small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.trade-why { border-top: 1px solid var(--border); padding: 8px 12px; font-size: 12.5px; color: var(--muted); display: grid; gap: 4px; }
.trade-why b { color: var(--text); }
.trade-verdict { padding: 8px 12px; font-size: 13px; font-style: italic; border-top: 1px solid var(--border); background: var(--surface); }

.trade-start { display: grid; justify-items: center; gap: 12px; padding: 34px 20px 36px; text-align: center; }
.trade-start p { margin: 0; max-width: 44ch; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.btn-accent {
  border: 0; border-radius: 10px; padding: 10px 20px; cursor: pointer;
  background: var(--accent); color: var(--accent-text); font-size: 14px; font-weight: 650;
}
.btn-accent:hover { filter: brightness(1.08); }
.btn-accent:active { transform: translateY(1px); }

/* ---------- roster: IL & moves ---------- */
.il-tag { font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 5px; background: color-mix(in srgb, var(--loss) 15%, transparent); color: var(--loss); }
.moves { list-style: none; margin: 0; padding: 8px 8px 12px; }
.move { display: grid; grid-template-columns: 58px 1fr; gap: 10px; padding: 8px; border-radius: 10px; font-size: 13px; }
.move:hover { background: var(--surface-2); }
.move .d { color: var(--muted); font-size: 12px; font-weight: 600; padding-top: 2px; }
.move .t { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); margin-bottom: 3px; }
.move .t.il { color: var(--loss); }
.move .t.up { color: var(--win); }
.player { cursor: pointer; border: 0; background: none; width: 100%; text-align: left; font: inherit; color: inherit; }

/* ---------- Bluesky posts ---------- */
.posts { list-style: none; margin: 0; padding: 6px 8px 10px; }
.post { padding: 10px 8px; border-radius: 10px; display: grid; grid-template-columns: 38px 1fr; gap: 10px; }
.post:hover { background: var(--surface-2); }
.post .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--surface-2); object-fit: cover; }
.post .who { font-size: 13px; display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; }
.post .who b { font-weight: 700; }
.post .who span { color: var(--muted); font-size: 12px; }
.post .rt { color: var(--muted); font-size: 11.5px; margin-bottom: 2px; }
.post .text { font-size: 13.5px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.post .text a { color: var(--accent); }
.post .media { margin-top: 8px; display: grid; gap: 4px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.post .media img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); }
.post .video { position: relative; display: block; margin-top: 8px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: #000; }
.post .video img { width: 100%; max-height: 300px; object-fit: cover; display: block; opacity: .95; }
.post .video .play { position: absolute; inset: 0; display: grid; place-items: center; }
.post .video .play i { width: 52px; height: 52px; border-radius: 50%; background: rgba(0,0,0,.6); border: 2px solid rgba(255,255,255,.85); display: grid; place-items: center; color: #fff; font-style: normal; font-size: 20px; padding-left: 4px; }
.post .link { display: grid; grid-template-columns: 84px 1fr; gap: 10px; margin-top: 8px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.post .link.noimg { grid-template-columns: 1fr; }
.post .link img { width: 84px; height: 100%; min-height: 58px; object-fit: cover; }
.post .link div { padding: 7px 10px 7px 0; min-width: 0; }
.post .link.noimg div { padding-left: 10px; }
.post .link b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post .link small { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post .quote { margin-top: 8px; border-left: 3px solid var(--border); padding: 4px 10px; font-size: 12.5px; color: var(--muted); }
.post .quote b { color: var(--text); }
.post .meta { margin-top: 6px; display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.post .meta a:hover { color: var(--accent); }

/* ---------- drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(5, 12, 24, .55); z-index: 40; backdrop-filter: blur(2px); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 100%); z-index: 41;
  background: var(--surface); border-left: 1px solid var(--border); box-shadow: -20px 0 50px -20px rgba(0,0,0,.5);
  display: flex; flex-direction: column;
  animation: slide-in .22s ease-out;
}
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { margin: 0; font-size: 16px; }
.drawer-body { overflow-y: auto; flex: 1; min-height: 0; padding-bottom: 24px; }
.drawer .section { padding: 14px 16px 4px; }
.drawer .section h3 { margin: 0 0 8px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.drawer .section h3 span { font-weight: 500; text-transform: none; letter-spacing: 0; margin-left: 6px; }
.drawer .ext { padding: 12px 16px; }
.drawer .ext a { color: var(--accent); font-weight: 600; }
.drawer .kv { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.drawer .kv b { color: var(--text); font-weight: 600; }

.score-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 16px; background: linear-gradient(135deg, var(--blue) 0%, #0d3d75 100%); color: #fff; }
.score-head .side { display: flex; align-items: center; gap: 10px; min-width: 0; }
.score-head .side.right { flex-direction: row-reverse; text-align: right; }
.score-head img { width: 44px; height: 44px; background: rgba(255,255,255,.92); border-radius: 50%; padding: 5px; flex: none; }
.score-head .side b { display: block; font-size: 15px; line-height: 1.2; }
.score-head .side small { opacity: .8; font-size: 12px; }
.score-head .mid { text-align: center; }
.score-head .mid .sc { font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.score-head .mid .st { font-size: 12px; opacity: .85; margin-top: 4px; font-weight: 600; }
.score-head .mid .st.live { color: #ffd6c7; }

.linescore th, .linescore td { padding: 5px 6px; text-align: center; }
.linescore th:first-child, .linescore td:first-child { text-align: left; }
.linescore td.tot { font-weight: 750; border-left: 1px solid var(--border); }

.plays { list-style: none; margin: 0; padding: 0; }
.plays li { display: grid; grid-template-columns: 46px 1fr auto; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.plays .inn { color: var(--muted); font-size: 11.5px; font-weight: 700; padding-top: 2px; }
.plays .sc { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; white-space: nowrap; }
.plays .ev { font-weight: 650; }

.diamond { display: inline-grid; grid-template-columns: repeat(3, 10px); grid-template-rows: repeat(2, 10px); gap: 2px; transform: rotate(45deg); margin: 6px 10px 0 4px; vertical-align: middle; }
.diamond i { display: block; width: 10px; height: 10px; border: 1.5px solid var(--muted); border-radius: 2px; }
.diamond i.on { background: var(--accent); border-color: var(--accent); }
.box-tabs { padding: 12px 16px 0; }
.box .sub td:first-child { padding-left: 22px; color: var(--muted); }
.box td:first-child { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.box td:first-child small { color: var(--muted); margin-left: 4px; }

.bio { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 16px; align-items: center; }
.bio img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.bio h4 { margin: 0 0 4px; font-size: 18px; }
.bio .num { color: var(--muted); font-weight: 700; margin-right: 6px; }

@media (max-width: 640px) {
  .seeds { grid-template-columns: repeat(2, 1fr); }
  .trade-cols { grid-template-columns: 1fr; }
  .trade-cols > div + div { border-left: 0; border-top: 1px solid var(--border); }
  .score-head { padding: 12px; gap: 8px; }
  .score-head img { width: 34px; height: 34px; }
  .score-head .mid .sc { font-size: 26px; }
}

/* promos */
.promo { display: inline-block; font-size: 11.5px; color: var(--text); background: color-mix(in srgb, #e6b93a 22%, var(--surface-2)); border-radius: 6px; padding: 1px 6px; margin-top: 3px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero .promos span { background: rgba(255,255,255,.14); border-radius: 6px; padding: 2px 8px; }
.hero .promos span::before { content: none; }
.cal .cell .gift { font-size: 10px; }
.gives { padding: 4px 16px 16px; }
.gives h4 { margin: 0 0 6px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.gives ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.gives li a { display: block; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); }
.gives li a:hover { text-decoration: none; outline: 1px solid var(--accent); }
.gives li b { color: var(--accent); margin-right: 6px; }
.trade-note { display: flex; gap: 12px; align-items: flex-start; }
.trade-note img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.promo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.promo-list li { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center; }
.promo-list img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.promo-list .promo-ico { width: 56px; height: 56px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; font-size: 22px; }
.promo-list b { display: block; font-size: 13.5px; }
.promo-list small { display: block; color: var(--muted); }
.promo-list a { color: var(--accent); font-size: 12.5px; font-weight: 600; }

/* ---------- video grid ---------- */
.vgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 12px; }
.vcard { margin: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface-2); display: flex; flex-direction: column; }
.vthumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; border: 0; padding: 0; background: #000; cursor: pointer; }
.vthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: .92; transition: opacity .15s; }
.vthumb:hover img { opacity: 1; }
.vthumb .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.6); border: 2px solid rgba(255,255,255,.85); color: #fff; display: grid; place-items: center; font-size: 16px; padding-left: 3px; }
.vplayer { width: 100%; aspect-ratio: 16 / 10; background: #000; display: block; }
.vcard figcaption { padding: 7px 9px 8px; display: grid; gap: 3px; }
.vcard .cap { font-size: 12.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vcard .meta { font-size: 11px; color: var(--muted); }
.vcard .meta a:hover { color: var(--accent); }
@media (max-width: 480px) { .vgrid { grid-template-columns: 1fr; } }
.drawer[hidden], .drawer-backdrop[hidden] { display: none; }

/* ---------- collapsible widgets ---------- */
.collapse-btn {
  margin-left: auto; flex: none;
  width: 28px; height: 28px; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
  border-radius: 8px; cursor: pointer; padding: 0;
  transition: transform .18s ease, border-color .15s, color .15s;
}
.collapse-btn:hover { border-color: var(--accent); color: var(--text); }
.collapse-btn svg { display: block; }
.widget[data-collapsed] { height: auto; }
.widget[data-collapsed] .widget-body,
.widget[data-collapsed] .widget-foot { display: none; }
.widget[data-collapsed] .widget-head { border-bottom: 0; }
.widget[data-collapsed] .collapse-btn { transform: rotate(-90deg); }
/* Header controls only make sense against visible content. */
.widget[data-collapsed] .segmented,
.widget[data-collapsed] .chips,
.widget[data-collapsed] .search { display: none; }
@media (prefers-reduced-motion: reduce) { .collapse-btn { transition: none; } }

/* ---------- drag to reorder ---------- */
.head-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.drag-handle {
  flex: none; display: grid; place-items: center;
  width: 26px; height: 26px; padding: 0;
  border: 1px solid transparent; border-radius: 8px;
  background: none; color: var(--muted); cursor: grab;
  transition: border-color .15s, color .15s;
}
.drag-handle:hover { border-color: var(--border); color: var(--text); }
.drag-handle:active { cursor: grabbing; }
.widget.dragging { opacity: .4; }
@media (prefers-reduced-motion: reduce) { .drag-handle { transition: none; } }

/* ---------- trade direction badge ---------- */
.dir {
  flex: none; align-self: flex-start;
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; border: 1px solid transparent;
}
.dir-buy { background: color-mix(in srgb, var(--win) 18%, var(--surface)); color: var(--win); border-color: color-mix(in srgb, var(--win) 40%, transparent); }
.dir-sell { background: color-mix(in srgb, var(--loss) 16%, var(--surface)); color: var(--loss); border-color: color-mix(in srgb, var(--loss) 40%, transparent); }
.dir-swap { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }

/* ---------- payroll ---------- */
.pay-summary { padding: 14px 16px 4px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.pay-bar { padding: 10px 16px 6px; }
.pay-bar .track { position: relative; height: 10px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.pay-bar .track i { display: block; height: 100%; background: var(--accent); }
.pay-bar .track i.over { background: linear-gradient(90deg, var(--accent), var(--loss)); }
.pay-bar .track .mark { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--text); opacity: .55; }
.pay-bar .legend { display: flex; justify-content: space-between; gap: 12px; font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.pay-h { margin: 16px 16px 6px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pay-rows { display: grid; }
.pay-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 9px 16px; border-top: 1px solid var(--border);
}
.pay-row:hover { background: var(--surface-2); }
.pay-row .who { min-width: 0; }
.pay-row .who b { font-size: 13.5px; font-weight: 650; }
.pay-row .who .pos { color: var(--muted); font-size: 11px; margin-left: 5px; }
.pay-row .who small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.35; margin-top: 2px; }
.pay-row .nums { flex: none; display: flex; gap: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.pay-row .nums > * { display: grid; gap: 1px; font-size: 13px; }
.pay-row .nums b { font-weight: 700; }
.pay-row .nums span { color: var(--muted); }
.pay-row .nums small { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pay-row .nums small.tag { justify-self: end; padding: 0 5px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); }
.pay-row .nums small.tag-deferred { color: var(--live); border-color: color-mix(in srgb, var(--live) 45%, transparent); }
.pay-row .nums small.tag-option { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }

.pay-fa { list-style: none; margin: 0; padding: 0; }
.pay-fa li { padding: 7px 16px; border-top: 1px solid var(--border); font-size: 13px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.pay-fa li .pos { color: var(--muted); font-size: 11px; }
.pay-fa li .aav { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 650; }
.pay-fa li small { flex-basis: 100%; color: var(--muted); font-size: 11.5px; }

.pay-notes { margin: 0; padding: 0 16px 4px 32px; font-size: 13px; color: var(--muted); display: grid; gap: 5px; }
.pay-notes li { line-height: 1.45; }

@media (max-width: 640px) {
  .pay-metric-head { grid-template-columns: 1fr auto auto; }
  .pay-metric-head .hl { grid-column: 1 / -1; grid-row: 2; }
  .pay-row { flex-direction: column; gap: 6px; }
  .pay-row .nums { text-align: left; }
  .pay-row .nums small.tag { justify-self: start; }
}

/* payroll metrics — one headline figure per row, tap for the arithmetic */
.pay-metrics { border-top: 1px solid var(--border); }
.pay-metric + .pay-metric { border-top: 1px solid var(--border); }
.pay-metric-head {
  width: 100%; text-align: left; cursor: pointer;
  border: 0; background: transparent; color: inherit; font: inherit;
  padding: 10px 16px;
  display: grid; grid-template-columns: 1fr auto auto; align-items: baseline; gap: 4px 12px;
}
.pay-metric-head:hover { background: var(--surface-2); }
.pay-metric-head .lbl { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.pay-metric-head .lbl em { font-style: normal; font-weight: 600; letter-spacing: 0; text-transform: none; opacity: .8; }
.pay-metric-head .val { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pay-metric-head .hl { grid-column: 1; grid-row: 2; font-size: 12.5px; color: var(--muted); }
.pay-metric-head .chev { grid-row: 1 / span 2; align-self: center; color: var(--muted); transition: transform .18s ease; }
.pay-metric-head[aria-expanded="true"] .chev { transform: rotate(180deg); }
.pay-metric-body { padding: 2px 16px 12px; }
.pay-metric-body p { margin: 0 0 8px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.pay-metric-body ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.pay-metric-body li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 10px; background: var(--surface-2); font-size: 13px; }
.pay-metric-body li .k { min-width: 0; }
.pay-metric-body li .k small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.pay-metric-body li .v { flex: none; font-weight: 650; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .pay-metric-head .chev { transition: none; } }
