/* The team page, v2.0 (Dec 2, docs/REDESIGN.md "Team page v2.0"): the header row, offense against defense, the games
   over the rankings, the polls' squares, rank gaps by year at full width, week by week's opponents. Loads after
   12-team.css and 16-kern.css, whose rules it builds on. */

/* ---------- the header: the name, Play anyone to its right ---------- */
.tm-name-r { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.tm-name-r .tm-name { margin: 4px 0 0; }

/* ---------- 1. offense against defense ---------- */
.tm-xy-w { margin-top: 8px; }
.tm-xy-c { position: relative; width: 100%; max-width: 560px; }
.tm-xy-svg { display: block; width: 100%; max-width: none; height: auto; }
.tm-xy-svg .tm-xy-d { fill-opacity: 0.35; stroke: none; }
.tm-xy-lgs { position: absolute; inset: 0; pointer-events: none; }
.tm-xy-lg { position: absolute; transform: translate(-50%, -50%); width: 22px; height: 22px; padding: 0; margin: 0; border: 0; background: none;
  border-radius: 50%; cursor: pointer; pointer-events: auto; display: grid; place-items: center; }
.tm-xy-lg.me { width: 44px; height: 44px; z-index: 2; }
.tm-xy-lg .logo, .tm-xy-lg img { display: block; width: 100%; height: 100%; object-fit: contain; }
.tm-xy-lg.op img { filter: drop-shadow(0 0 1px var(--bg)) drop-shadow(0 0 1px var(--bg)); }
.tm-xy-lg.me img { filter: drop-shadow(0 0 2px var(--bg)) drop-shadow(0 0 2px var(--bg)); }
.tm-xy-lg:focus-visible { outline: 2px solid var(--score); outline-offset: 2px; }
.tm-xy-tip { white-space: nowrap; }
@media (max-width: 480px) { .tm-xy-lg { width: 15px; height: 15px; } .tm-xy-lg.me { width: 30px; height: 30px; } .tm-xy-tip { white-space: normal; max-width: 240px; } }

/* ---------- 4. current rankings: the games, a dot a column, over the ranks ---------- */
.tm-wlr { align-items: start; }
.tm-wl { position: relative; min-width: 0; }
.tm-wl .tm-wk { position: relative; display: block; height: 40px; gap: 0; }
.tm-wl .tm-wk li { position: absolute; top: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; flex: none; }
.tm-wl .tm-c { width: min(22px, 94%); height: auto; aspect-ratio: 1; font-size: 10.5px; font-weight: 700; line-height: 1; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; color: #fff; }
.tm-wl .tm-c span.x3 { font-size: 8.5px; }
.tm-wl .tm-c.pre { visibility: hidden; }
.tm-wl .tm-c.bye, .tm-wl .tm-c.todo { background: transparent; }
.tm-wl .tm-c-l { font-size: 0.7rem; }
/* the margin in white inside the dot (the owner): in dark mode the fills go a shade deeper so white reads on them */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tm-wl .tm-c.w { background: #2f6bd0; } :root:not([data-theme="light"]) .tm-wl .tm-c.l { background: #b4570a; } }
:root[data-theme="dark"] .tm-wl .tm-c.w { background: #2f6bd0; } :root[data-theme="dark"] .tm-wl .tm-c.l { background: #b4570a; }
/* a game against an FCS team (Dec 3): a faint fill and the margin in the color, so it reads as counted apart */
.tm-wl .tm-c.fcs.w { background: var(--score-tint); color: var(--score); border: 1px solid var(--score); }
.tm-wl .tm-c.fcs.l { background: var(--turn-tint); color: var(--turn); border: 1px solid var(--turn); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tm-wl .tm-c.fcs.w { background: var(--score-tint); } :root:not([data-theme="light"]) .tm-wl .tm-c.fcs.l { background: var(--turn-tint); } }
:root[data-theme="dark"] .tm-wl .tm-c.fcs.w { background: var(--score-tint); } :root[data-theme="dark"] .tm-wl .tm-c.fcs.l { background: var(--turn-tint); }
.tm-wl .tm-pop { top: 44px; }
.tm-rk2s .tm-sp { padding-bottom: 0; }
/* a phone: the label and the teams around on top, the week line under them across the width, under the games */
@media (max-width: 699px) {
  .tm-rk2s .tm-rk2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); grid-template-areas: "v lad" "sp sp"; gap: 4px 10px; }
  .tm-rk2s .tm-rk2-v { grid-area: v; } .tm-rk2s .tm-lad { grid-area: lad; } .tm-rk2s .tm-sp { grid-area: sp; }
  .tm-rk2s .tm-wlr { grid-template-areas: "v v" "sp sp"; }
  .tm-rk2s .tm-wlr > .tm-wl { grid-area: sp; } .tm-rk2s .tm-wlr > div:last-child { display: none; }
  .tm-rk2s .tm-rk2-v { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
  .tm-rk2s .tm-rk2-v .tm-rk-l { flex-basis: 100%; }
  .tm-rk2s .tm-rk2-s small { display: inline; margin: 0 6px 0 3px; }
  .tm-wl .tm-c { font-size: 9.5px; }
}

/* ---------- 5. polls: the AP a larger hollow square, the CFP a smaller solid one inside it ---------- */
.tm-pc .mk.ap, .tm-pl-sw .mk.ap, .tm-pc .mk.ap.nr { fill: var(--bg); stroke: var(--muted); stroke-width: 1.5; }
.tm-pc .mk.cfp, .tm-pl-sw .mk.cfp { fill: var(--muted); stroke: none; }

/* ---------- 6. rank gaps by year: as wide as the section; the AP's top 25 blue and bold ---------- */
.tm-hy { max-width: none; width: 100%; height: auto; }
.tm-hy .tp { stroke: var(--score); stroke-width: 1.6; opacity: 0.9; }
.tm-hy .fl { opacity: 0.3; }
.tm-key i.tm-hy-sw.tp { border-top: 2px solid var(--score); opacity: 1; }

/* ---------- 9. week by week: the opponent and the score margin beside each step ---------- */
.tm-wf-lgs { position: absolute; inset: 0; pointer-events: none; }
.tm-wf-lg { position: absolute; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1; }
.tm-wf-lg .logo, .tm-wf-lg img { display: block; }
.tm-wf-lg b { font-size: 11px; font-variant-numeric: tabular-nums; color: var(--muted); }
.tm-wf-lg b.pos { color: var(--score); } .tm-wf-lg b.neg { color: var(--turn); }
.tm-wf-lg small { font-size: 9px; color: var(--muted); }
@media (max-width: 479px) { .tm-wf-lg b { font-size: 9.5px; letter-spacing: -0.03em; } }

/* ---------- 10. by situation: the field and the neighbors under the five lines ---------- */
#tm-sit .tm-pp-h { margin-top: 18px; }

/* the NAPPR+ card's value: per possession, then per game, a line each */
.tm-rk2s .tm-rk2-s small { display: inline; }
/* 3. score margin in its own section: no rule over it */
#tm-flow .tm-fw { border-top: 0; margin-top: 0; padding-top: 0; }
@media (min-width: 700px) { .tm-rk2s .tm-rk2 { grid-template-columns: 124px minmax(0, 1fr) 196px; } }
