/* Build a game (#build, tabs/model_build.js; docs/REDESIGN.md "Matchup builder (Dec 1)"): the Model pages' look
   (15-model.css: head, sections, keys, the estimate card), plus the score at the top, the mirror (one team's figures
   at the left, the other's at the right, what each part adds to the margin in the middle) and the two seasons.
   Bars in the middle are ink: blue and orange stay for better and worse than the average team (the field strips).
   One slice of the page's stylesheet. The files load in the order of their numbers (the <link> list in
   web/site_template.html) and several rules rely on that order at equal specificity: never reorder or merge
   them without running tests/layout_check.js. */
#build { width: 100%; max-width: 1120px; margin: 0 auto; box-sizing: border-box; gap: 20px; min-width: 0; }

/* SCOR_EST's two views: this week's games and Build a game */
.mb-views { display: inline-flex; flex-wrap: wrap; align-self: flex-start; gap: 2px; padding: 3px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); max-width: 100%; box-sizing: border-box; }
.mb-views a { font: 600 0.85rem/1.2 var(--f-body); padding: 6px 14px; min-height: 30px; box-sizing: border-box; display: inline-flex; align-items: center; border-radius: 999px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.mb-views a:hover { color: var(--ink); }
.mb-views a[aria-current="page"] { background: var(--sel); color: var(--surface); }
.mb-views a:focus-visible { outline: 2px solid var(--score); outline-offset: 2px; }

/* the score */
.mb-hero { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; min-width: 0; }
.mb-score { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.mb-team { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-width: 0; }
.mb-team.b { grid-template-columns: auto minmax(0, 1fr) 40px; }
.mb-team.b .logo { order: 3; } .mb-team.b .mb-tn { order: 2; text-align: right; } .mb-team.b .mb-pts { order: 1; }
.mb-team .logo img { display: block; }
.mb-tn { font-weight: 700; font-size: 1.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mb-pts { font-family: var(--f-display); font-weight: 700; font-size: 2.56rem; line-height: 1; font-variant-numeric: tabular-nums; }
.mb-at { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.mb-lede { margin: 12px 0 0; font-size: 1rem; line-height: 1.45; max-width: 80ch; }
.mb-rng { margin: 6px 0 0; font-size: 0.88rem; color: var(--muted); line-height: 1.4; max-width: 80ch; }

/* the mirror: [team A's figure | the part's points in this game | team B's figure] */
.mb-intro { margin: 0 0 10px; }
.mb-mir { display: grid; gap: 2px; min-width: 0; }
.mb-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 4px 22px; padding: 7px 0; border-top: 1px solid var(--line); min-width: 0; }
.mb-row.mb-hd { border-top: 0; padding-bottom: 2px; font-size: 0.88rem; }
.mb-hd .mb-side { display: flex; align-items: center; gap: 8px; } .mb-hd .mb-side.b { justify-content: flex-end; }
.mb-hd .logo img { display: block; }
.mb-row.mb-sum { border-top: 1px solid var(--line-strong); font-weight: 600; }
.mb-side { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l v" "t t"; align-items: baseline; gap: 2px 8px; min-width: 0; font-size: 0.88rem; }
.mb-sl { grid-area: l; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mb-sv { grid-area: v; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mb-sv .tm-s-rk { min-width: 2.6em; margin-left: 6px; text-align: right; }
.mb-side .mb-tr { grid-area: t; }
.mb-mid { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l v" "b b"; align-items: baseline; gap: 2px 8px; min-width: 0; font-size: 0.88rem; }
.mb-ml { grid-area: l; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-mv { grid-area: v; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.mb-mv small { font-weight: 400; color: var(--muted); }
.mb-mv.e { color: var(--muted); font-weight: 400; }
.mb-bt { grid-area: b; position: relative; display: block; height: 14px; margin-top: 2px; }
.mb-bt i { position: absolute; }
.mb-bt i.z { left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line-strong); }
.mb-bt i.mb-b { top: 3px; height: 8px; background: var(--ink); border-radius: 2px 0 0 2px; }
.mb-bt i.mb-b.r { border-radius: 0 2px 2px 0; }
.mb-ends { grid-area: b; display: flex; justify-content: space-between; color: var(--muted); font-size: 0.78rem; }
.mb-ends em { font-style: normal; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 48%; }
.mb-ab { display: none; }
.tm-key i.mb-sw { width: 14px; height: 8px; border-radius: 2px; background: var(--ink); }

/* a field strip (as the team page's): every FBS team a tick, the average a line, this team a bar from it */
.mb-tr { position: relative; display: block; height: 12px; margin-top: 3px; }
.mb-tr svg { position: absolute; inset: 0; width: 100%; height: 12px; overflow: visible; }
.mb-tr .tk { stroke: var(--line-strong); stroke-width: 1; opacity: 0.4; vector-effect: non-scaling-stroke; }
.mb-tr .z { stroke: var(--ink); stroke-width: 1; opacity: 0.6; vector-effect: non-scaling-stroke; }
.mb-tr-bar { position: absolute; top: 3px; height: 6px; border-radius: 2px; }
.mb-tr-bar.pos { background: var(--score); } .mb-tr-bar.neg { background: var(--turn); }
.mb-tr-end { position: absolute; top: 0; width: 2px; height: 12px; margin-left: -1px; background: var(--ink); border-radius: 1px; }

/* the two seasons (v2.0, the owner): one column a week, the week number on top, then the game (the opponent's logo in
   a ring, blue won, orange lost; a bye a dotted circle) and its margin under it; both teams on the same columns. A
   game opens its score and box score (the team page's .tm-pop look) */
.mb-gots { position: relative; }
.mb-season { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; min-width: 0; }
.mb-season + .mb-season { border-top: 1px solid var(--line); }
.mb-sn { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; }
.mb-sn a { color: var(--ink); font-weight: 600; }
.mb-sn span { color: var(--muted); font-variant-numeric: tabular-nums; }
.mb-sn .logo img { display: block; }
.mb-gh { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 34px)); gap: 2px; overflow-x: auto; }
.mb-gh li { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.mb-wk { font-size: 0.72rem; line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mb-g { box-sizing: border-box; width: 26px; height: 26px; max-width: 100%; border-radius: 50%; display: inline-grid; place-items: center; padding: 0; margin: 0;
  border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; }
button.mb-g { cursor: pointer; }
.mb-g.w { border-color: var(--score); } .mb-g.l { border-color: var(--turn); } .mb-g.t { border-color: var(--muted); }
.mb-g.todo { border-style: dotted; opacity: 0.7; }
.mb-g.bye { background: transparent; border: 1.5px dotted var(--muted); opacity: 0.75; }
.mb-g .logo, .mb-g .logo img { display: block; width: 16px; height: 16px; }
.mb-g-ab { font-size: 0.55rem; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.mb-g:focus-visible { outline: 2px solid var(--score); outline-offset: 2px; }
button.mb-g[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); }
.mb-m { min-height: 1em; font-size: 0.74rem; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--muted); }
.mb-m.w { color: var(--score); } .mb-m.l { color: var(--turn); }
.mb-meet { max-width: none; }
.mb-meet td a { color: var(--ink); }

/* the team page's way in */
.tm-play { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 0.85rem; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
.tm-play:hover { border-color: var(--ink); }
.tm-play:focus-visible { outline: 2px solid var(--score); outline-offset: 2px; }

@media (max-width: 760px) {
  .mb-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "m m" "a b"; gap: 4px 16px; }
  .mb-row > .mb-mid { grid-area: m; } .mb-row > .mb-side.a { grid-area: a; } .mb-row > .mb-side.b { grid-area: b; }
  .mb-row.mb-sum { grid-template-areas: "m m"; } .mb-row.mb-sum > .mb-side { display: none; }
  .mb-row.mb-hd { grid-template-areas: "a b" "m m"; }
  .mb-side.b .mb-sl { text-align: left; }
  .mb-side .mb-full { display: none; } .mb-side .mb-ab { display: inline; }
}
@media (max-width: 640px) {
  .mb-hero { padding: 12px 14px; }
  .mb-score { gap: 6px; }
  .mb-team, .mb-team.b { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; justify-items: start; gap: 2px; }
  .mb-team.b { justify-items: end; }
  .mb-team .logo, .mb-team.b .logo { order: 0; } .mb-team .mb-tn, .mb-team.b .mb-tn { order: 1; font-size: 0.95rem; max-width: 100%; } .mb-team .mb-pts, .mb-team.b .mb-pts { order: 2; font-size: 2.6rem; }
  .mb-sn { min-width: 0; width: 100%; }
}
