/* Managers tab: a card per manager, then one page per manager. Colors come from the tokens in app.css only. */
#managers .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#managers a:focus-visible, #managers button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
#managers dl, #managers dd { margin: 0; }
#managers .team .mgr { display: none; }                 /* names only inside the compact blocks */

/* ── the list ── */
.mg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.mg-card { display: block; padding: 16px 16px 14px; color: inherit; text-decoration: none; min-width: 0; }
.mg-card:hover { border-color: var(--axis); }
.mg-card .logo { width: 44px; height: 44px; font-size: 14px; }
.mg-top { display: flex; align-items: center; gap: 12px; }
.mg-id { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.mg-nm { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-mgr { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-rk { flex: none; min-width: 56px; padding: 4px 8px 5px; border-radius: 10px; text-align: center; background: var(--surface-2); border: 1px solid var(--border); }
.mg-rk b { display: block; font-size: 20px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.mg-rk small { display: block; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mg-rk.r1 { background: var(--gold-soft); } .mg-rk.r2 { background: var(--silver-soft); } .mg-rk.r3 { background: var(--bronze-soft); }
.mg-rk.r1 small, .mg-rk.r2 small, .mg-rk.r3 small { color: var(--ink-2); }
.mg-stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--grid); }
.mg-stats dt, .mg-odds dt, .mg-facts dt { font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.mg-stats dt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mg-stats dd { margin-top: 2px; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mg-mv { margin-left: 5px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── a manager's page ── */
.mg-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0 0 12px; }
.mg-back { display: inline-flex; align-items: center; min-height: 40px; padding: 0 2px; font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.mg-back:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.mg-pn { display: flex; gap: 8px; margin-left: auto; min-width: 0; }
.mg-pn a { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 230px; min-height: 40px; padding: 0 12px; font-size: 13px; font-weight: 500; color: var(--ink-2); text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.mg-pn a:hover { color: var(--ink); background: var(--surface-2); }
.mg-pn-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mg-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px 28px; padding: 18px 20px; }
.mg-who { display: flex; align-items: center; gap: 16px; min-width: 0; }
.mg-head .logo { width: 72px; height: 72px; font-size: 20px; }
.mg-title { margin: 0; font-size: clamp(22px, 4.6vw, 30px); line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.mg-sub { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.mg-facts { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.mg-facts dd { margin-top: 2px; font-size: 22px; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mg-facts .of { font-size: 14px; font-weight: 600; color: var(--muted); }
.mg-facts .mg-mv { font-size: 14px; }
.mg-blurb { grid-column: 1 / -1; margin: 0; padding-top: 12px; border-top: 1px solid var(--grid); font-size: 14px; color: var(--ink-2); }

.mg-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.mg-tile { padding: 14px 16px; min-width: 0; }
.mg-tile .value { font-size: 26px; font-variant-numeric: tabular-nums; }
.mg-tile .who { font-size: 13px; line-height: 1.35; }

.mg-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.mg-two.one { grid-template-columns: minmax(0, 1fr); }
.mg-col { display: grid; gap: 16px; min-width: 0; }
.mg-blk { min-width: 0; padding-bottom: 4px; overflow: hidden; }
.mg-blk h3 { margin: 0; padding: 16px 18px 0; font-size: 15px; font-weight: 700; }
.mg-blk .cap { margin: 2px 0 0; padding: 0 18px; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.mg-blk .empty { padding: 22px 18px; }
.mg-chart { padding: 10px 18px 12px; }
.mg-odds { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; padding: 14px 18px 2px; }
.mg-odds > div { display: flex; flex-direction: column; justify-content: space-between; gap: 2px; }
.mg-odds dd { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.mg-foot { margin: 0; padding: 4px 18px 10px; font-size: 13px; }
.mg-foot a { display: inline-flex; align-items: center; min-height: 40px; color: var(--accent); font-weight: 600; text-decoration: none; }
.mg-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* tables inside blocks */
.mg-tbl { table-layout: fixed; margin-top: 8px; }
.mg-tbl th, .mg-tbl td { padding: 8px 10px; }
.mg-tbl th:first-child, .mg-tbl td:first-child { padding-left: 18px; }
.mg-tbl th:last-child, .mg-tbl td:last-child { padding-right: 18px; }
.mg-tbl td { overflow: hidden; }
.mg-tbl td .team { max-width: 100%; min-height: 40px; }
.mg-weeks td { padding-top: 2px; padding-bottom: 2px; }
.mg-tbl th { overflow: hidden; text-overflow: ellipsis; }
.mg-weeks .c-wk { width: 52px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mg-weeks .c-res { width: 44px; padding-left: 0; padding-right: 0; text-align: center; }
.mg-weeks .c-sc { width: 108px; }
.mg-weeks .c-rk { width: 66px; }
.mg-wl { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; font-size: 12px; font-weight: 800; color: var(--ink); background: var(--surface-2); }
.mg-wl.W { background: var(--pos-soft); } .mg-wl.L { background: var(--neg-soft); }
.mg-rank { display: inline-block; min-width: 34px; padding: 2px 7px; border-radius: 999px; font-size: 12px; font-weight: 700; text-align: center; color: var(--ink-2); cursor: default; }
.mg-rank.top { background: var(--gold-soft); color: var(--ink); } .mg-rank.last { background: var(--neg-soft); color: var(--ink); }
.mg-next-head { margin-top: 6px; padding: 14px 18px 2px; border-top: 1px solid var(--grid); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mg-up { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 12px; margin: 0; padding: 0 18px 10px; list-style: none; }
.mg-up li { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 40px; }
.mg-up .w { flex: none; width: 44px; white-space: nowrap; font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.mg-up .team { min-width: 0; min-height: 40px; }
.mg-up .logo { width: 24px; height: 24px; }

/* head-to-head: one row per opponent, the whole row is the link */
.mg-hh { margin: 0; padding: 0; list-style: none; }
.mg-hh-head, .mg-hh li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 64px 20px; align-items: center; gap: 0 10px; padding: 0 14px 0 18px; }
.mg-hh-head { margin-top: 10px; padding-top: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--grid); font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.mg-hh-head .n { text-align: right; }
.mg-hh li { position: relative; min-height: 52px; padding-top: 4px; padding-bottom: 4px; border-bottom: 1px solid var(--grid); }
.mg-hh li:last-child { border-bottom: 0; }
.mg-hh li:hover { background: var(--surface-2); }
.mg-hh .c-opp { grid-area: opp; min-width: 0; }
.mg-hh .c-hr { grid-area: res; min-width: 0; font-size: 13px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.mg-hh .c-ew { grid-area: ew; text-align: right; font-size: 15px; font-variant-numeric: tabular-nums; }
.mg-hh .c-ew small { display: none; font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.mg-hh .c-go { grid-area: go; font-size: 20px; line-height: 1; color: var(--muted); text-align: right; }
.mg-hh-head, .mg-hh li { grid-template-areas: "opp res ew go"; }
.mg-rl { color: inherit; text-decoration: none; }
.mg-rl::after { content: ""; position: absolute; inset: 0; }
.mg-rl:focus-visible { outline: none; }
.mg-hh li:has(.mg-rl:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.mg-hh .team { min-width: 0; max-width: 100%; }
.mg-r { display: block; }
.mg-r b { font-weight: 700; }

/* trades */
.mg-trades { margin: 10px 0 0; padding: 0; list-style: none; }
.mg-trade { padding: 14px 18px; border-top: 1px solid var(--grid); }
.mg-th { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; color: var(--muted); }
.mg-th b { font-size: 14px; font-weight: 700; color: var(--ink); }
.mg-net { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.mg-net small { margin-left: 6px; font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.mg-gg { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 8px; align-items: baseline; margin-top: 8px; font-size: 14px; }
.mg-gg .k { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.mg-gg .v { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; min-width: 0; }
.mg-gg .v .team { min-height: 40px; }
.mg-gg .v .logo { width: 24px; height: 24px; }
.mg-pl small { margin-left: 5px; font-size: 12px; color: var(--muted); }

/* pickups */
.mg-pick .c-pn { white-space: nowrap; text-overflow: ellipsis; }
.mg-pick .c-pn small { margin-left: 6px; font-size: 12px; color: var(--muted); }
.mg-pick th:nth-child(2), .mg-pick td:nth-child(2) { width: 64px; }
.mg-pick th:nth-child(3), .mg-pick td:nth-child(3) { width: 52px; }
.mg-pick th:nth-child(4), .mg-pick td:nth-child(4) { width: 88px; }

/* awards */
.mg-awards { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px 4px; }
.mg-aw { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 11px; font-size: 13px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; cursor: default; }
.mg-aw.good { background: var(--pos-soft); } .mg-aw.shame, .mg-aw.unlucky { background: var(--neg-soft); }
.mg-aw b { font-variant-numeric: tabular-nums; }
.mg-awlist { margin: 8px 0 0; padding: 0; list-style: none; }
.mg-awlist li { display: flex; align-items: baseline; gap: 10px; padding: 9px 18px; border-top: 1px solid var(--grid); font-size: 14px; }
.mg-awlist .w { flex: none; width: 40px; font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.mg-awlist .ic { flex: none; width: 20px; text-align: center; }
.mg-awlist .tx { min-width: 0; overflow-wrap: anywhere; }
.mg-more { display: block; width: 100%; min-height: 44px; margin-top: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); border: 0; border-top: 1px solid var(--grid); cursor: pointer; }
.mg-more:hover { color: var(--ink); }

.mg-missing p { margin: 6px 0; }

/* blocks other tabs add (A.managerBlocks / A.managerTags in core.js) */
.mg-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.mg-wide { margin-top: 16px; min-width: 0; }
.mg-extra { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }

@media (prefers-reduced-motion: no-preference) {
  .mg-card { transition: border-color .15s; }
}

@media (max-width: 899px) {
  .mg-two, .mg-extra { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .mg-grid { grid-template-columns: minmax(0, 1fr); }
  .mg-head { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 12px; }
  .mg-head .logo { width: 56px; height: 56px; font-size: 16px; }
  .mg-facts { gap: 10px 16px; }
  .mg-facts dd { font-size: 19px; }
  .mg-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mg-tile { padding: 12px 14px; }
  .mg-tile .value { font-size: 22px; }
  .mg-two, .mg-extra { gap: 12px; margin-top: 12px; }
  .mg-wide { margin-top: 12px; }
  .mg-col { gap: 12px; }
  .mg-pn { flex: 1 1 auto; justify-content: flex-end; }
  .mg-pn a { max-width: 100%; }
  .mg-pn .mg-prev:not(:only-child) { margin-right: auto; }
  .mg-tbl th, .mg-tbl td { padding-left: 6px; padding-right: 6px; }
  .mg-tbl th:first-child, .mg-tbl td:first-child { padding-left: 12px; }
  .mg-tbl th:last-child, .mg-tbl td:last-child { padding-right: 12px; }
  .mg-weeks .c-wk { width: 40px; }
  .mg-weeks .c-res { width: 32px; padding-left: 0; padding-right: 0; }
  .mg-weeks .c-sc { width: 94px; }
  .mg-weeks .c-rk { width: 54px; }
  .mg-weeks .logo { display: none; }
  .mg-up { grid-template-columns: minmax(0, 1fr); }
  .mg-up .logo { width: 28px; height: 28px; }
  /* head-to-head: results drop under the name */
  .mg-hh-head { display: none; }
  .mg-hh li { grid-template-columns: minmax(0, 1fr) auto 18px; grid-template-areas: "opp ew go" "res res go"; padding: 6px 12px 8px 16px; min-height: 60px; }
  .mg-hh .c-hr { padding-left: 38px; margin-top: -2px; }
  .mg-hh .c-ew { display: flex; flex-direction: column; align-items: flex-end; }
  .mg-hh .c-ew small { display: block; }
  .mg-odds { padding-left: 14px; padding-right: 14px; }
  .mg-chart { padding-left: 10px; padding-right: 10px; }
}
.mg-tl { color: inherit; text-decoration: none; }
.mg-tl:hover b { text-decoration: underline; text-underline-offset: 2px; }
