/* Dugout base: the shared look: colour tokens (Terrace, and Night under :root[data-theme=dark]), the masthead, tape and
   page tabs, cards, tables, chips, buttons and anything more than one screen uses.
   Classes here belong to this screen; tests/css-lint.mjs fails if another screen's file defines the same class. */
/* Dugout 3 (2026-10-30): "Terrace", a matchday fanzine: newsprint paper, black ink, extra-condensed capitals for
   headings, mono figures, and one signal orange for the interface (never data: green/red still mean up/down, and
   fixture difficulty keeps its own blue-to-red scale in every look).
   Dugout 4 (2026-11-26) keeps the colours and type and makes it a sleek modern app: rounded cards with hairline edges
   (--edge) and soft shadows (--drop, --lift) instead of hard 2px frames and offset shadows, a frosted-glass masthead
   and page bar, pill-shaped tabs, buttons and chips, and more room. --frame stays the look's ink line for the few
   things still drawn with it (kit rings' outer edge, the tape's dark labels). */
:root {
  --bg: #eeeae0;
  --bg2: #e5e0d4;
  --card: #fbfaf6;
  --card2: #f2eee5;
  --line: #d8d2c4;            /* hairlines inside a card */
  --frame: #151515;           /* the outline of cards and controls */
  --ink: #151515;
  --ink2: #3a3833;
  --muted: #6f6a5f;
  --accent: #ff4f1f;          /* signal orange: interface only, never data */
  --accent-ink: #151515;
  --accent-soft: rgba(255,79,31,.13);
  --accent-text: #c8370c;     /* the accent as words on paper: darker, so it reads (the accent itself is for marks and fills) */
  --hi: #e4ff3d;              /* highlighter: the one thing on a card to look at */
  --hi-ink: #151515;
  --mast: #151515; --mast-ink: #eeeae0;
  /* text colours read at 4.5:1 or better on card, tinted tile and page (WCAG AA; checked 2026-11-27). --warn stays bright for
     rings and borders (3:1 is enough there); text in it is --warn-text */
  --good: #0e7844; --warn: #b87300; --warn-text: #935c00; --serious: #d2601c; --bad: #c52c27;
  --up: #0e7844; --down: #c52c27;
  /* fixture difficulty, diverging: easy (blue) .. neutral .. hard (red); cells always carry text too */
  --d1: #2a6fdb; --d2: #1d4f9f; --d3: #66625a; --d4: #a3322a; --d5: #d83a2f;
  --seq: #2a6fdb;
  --r: 16px;                  /* cards; controls use --r-sm, pills 999px */
  --r-sm: 11px;
  --edge: color-mix(in srgb, var(--ink) 12%, transparent);   /* the hairline round a card or control, in every look */
  --drop: 0 1px 2px rgb(40 32 16 / .06), 0 10px 28px -12px rgb(40 32 16 / .24);
  --drop-sm: 0 1px 2px rgb(40 32 16 / .07), 0 4px 12px -6px rgb(40 32 16 / .2);
  --lift: 0 2px 6px rgb(40 32 16 / .08), 0 32px 80px -24px rgb(40 32 16 / .5);   /* sheets, search, menus */
  --shadow: var(--drop);
  --glass: blur(18px) saturate(1.5);
  --grain: rgba(21,21,21,.03);
  /* Noto Color Emoji last: only the emoji this device can't draw itself, when js/emoji.js finds any (none are loaded otherwise) */
  --font: 'Archivo', system-ui, sans-serif, 'Noto Color Emoji';
  --num: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', monospace, 'Noto Color Emoji';
  --head: 'Archivo', 'Arial Narrow', system-ui, sans-serif, 'Noto Color Emoji';   /* drawn extra-condensed */
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }   /* clear the sticky masthead (the page bar on phones) */
body {
  margin: 0; color: var(--ink); font: 400 15px/1.5 var(--font);
  background: var(--bg) radial-gradient(var(--grain) 1px, transparent 1.2px) 0 0/5px 5px;
  min-height: calc(100vh / var(--z, 1)); padding-bottom: calc(66px + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--hi); color: var(--hi-ink); }
a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
b { font-weight: 700; color: var(--ink); }
code { font: 500 .88em var(--num); background: var(--card2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 8px; }
kbd { font: 700 11px/1 var(--num); border: 1.5px solid currentColor; border-radius: 8px; padding: 2px 5px; opacity: .8; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mark { width: 26px; height: 26px; flex: none; color: var(--accent); stroke: none; }

/* ---------------------------------------------------------------- the masthead: brand, sections, search, tools */
/* the masthead is frosted glass over the page as it scrolls under (bigger screens: on phones it scrolls away, and the
   dock inside it is position: fixed, which a backdrop-filter here would trap) */
.mast {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: stretch; gap: 8px;
  height: 58px; padding: 0 18px; background: var(--mast); color: var(--mast-ink);
}
@media (min-width: 760px) {
  .mast { background: color-mix(in srgb, var(--mast) 86%, transparent); -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass); }
}
.brand { display: flex; align-items: center; gap: 9px; padding-right: 14px; color: var(--mast-ink); text-decoration: none;
  font: 900 extra-condensed 30px/1 var(--head); text-transform: uppercase; letter-spacing: .01em; }
.brand .mark { --mark-cut: var(--mast); width: 28px; height: 28px; }
/* the sections: pills, the current one lit, with an accent dot under it */
.hubs { display: flex; gap: 2px; align-items: center; }
.hubs button {
  position: relative; display: flex; align-items: center; gap: 8px; height: 38px; background: none; border: 0; border-radius: 999px; padding: 0 15px;
  color: color-mix(in srgb, var(--mast-ink) 62%, transparent); font: 800 condensed 15.5px/1 var(--head); text-transform: uppercase; letter-spacing: .07em;
  transition: background-color .15s, color .15s;
}
.hubs button .ico { display: none; }
.hubs button:hover { color: var(--mast-ink); background: color-mix(in srgb, var(--mast-ink) 8%, transparent); }
.hubs button[aria-current=true] { color: var(--mast-ink); background: color-mix(in srgb, var(--mast-ink) 14%, transparent); }
.hubs button[aria-current=true]::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--accent); }
.findbtn {
  margin-left: auto; align-self: center; display: flex; align-items: center; gap: 10px; min-width: 0; width: min(330px, 30vw);
  background: color-mix(in srgb, var(--mast-ink) 9%, transparent); border: 1px solid color-mix(in srgb, var(--mast-ink) 18%, transparent);
  border-radius: 999px; padding: 8px 14px; color: color-mix(in srgb, var(--mast-ink) 75%, transparent); font-size: 14px; text-align: left;
  transition: border-color .15s, background-color .15s;
}
.findbtn span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.findbtn:hover { border-color: var(--accent); color: var(--mast-ink); background: color-mix(in srgb, var(--mast-ink) 13%, transparent); }
.findbtn .ico { width: 18px; height: 18px; }
.tools { display: flex; gap: 4px; align-items: center; }
.themebtn { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; background: none; border: 0; border-radius: 50%; color: color-mix(in srgb, var(--mast-ink) 80%, transparent); transition: background-color .15s; }
.themebtn:hover { background: color-mix(in srgb, var(--mast-ink) 12%, transparent); color: var(--mast-ink); }
.themebtn .ico { width: 20px; height: 20px; }
.themewrap { position: relative; }
.thememenu { position: absolute; right: 0; top: 48px; z-index: 45; width: 270px; max-height: min(70vh / var(--z, 1), 600px); overflow-y: auto; background: var(--card); color: var(--ink);
  border: 1px solid var(--edge); border-radius: var(--r); padding: 6px; box-shadow: var(--lift); }
/* opens and closes with a short drop (Dugout 4): [hidden] stays drawn while it fades, then goes (allow-discrete) */
.thememenu { transition: opacity .16s ease, translate .2s cubic-bezier(.2, .8, .2, 1), display .2s allow-discrete; }
.thememenu[hidden] { display: none; opacity: 0; translate: 0 -8px; pointer-events: none; }
@starting-style { .thememenu { opacity: 0; translate: 0 -8px; } }
.thememenu button { display: flex; gap: 12px; align-items: center; width: 100%; background: none; border: 0; border-radius: 8px; padding: 8px; text-align: left; color: var(--ink); }
.thememenu button:hover, .thememenu button[aria-checked=true] { background: var(--card2); }
.thememenu button[aria-checked=true] b::after { content: ' ✓'; color: var(--accent-text); }
.thememenu i { flex: none; width: 30px; height: 30px; border: 1px solid var(--edge); border-radius: 8px; background: linear-gradient(135deg, var(--sw1) 0 55%, var(--sw2) 55%); }
.thememenu b { display: block; font: 800 condensed 16px/1.1 var(--head); text-transform: uppercase; letter-spacing: .04em; }
.thememenu small { display: block; font-size: 12.5px; color: var(--muted); }
/* What's new (js/fx.js openNews): a dot until it's been opened */
.newsbtn { position: relative; }
.newsbtn.unseen::after { content: ''; position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--mast); }
.adminlink { text-decoration: none; }
.adminlink[hidden] { display: none; }
.acctbtn.on { color: var(--accent); }

/* ---------------------------------------------------------------- the tape: clocks, then tonight's price moves running past */
.ribbon { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 6px; background: var(--accent); color: var(--accent-ink);
  font: 700 12.5px/1 var(--num); text-transform: uppercase; letter-spacing: .03em; overflow: hidden; }
.clocks { display: flex; flex: none; gap: 6px; }
/* the clocks are pills; the deadline's is dark */
.clock { display: flex; align-items: center; gap: 9px; height: 26px; padding: 0 12px; border-radius: 999px; background: color-mix(in srgb, var(--accent-ink) 10%, transparent); white-space: nowrap; }
.clock small { font: 600 11px/1 var(--num); opacity: .78; }
.clock span { font: 800 14px/1 var(--num); font-variant-numeric: tabular-nums; }
.clock:first-child { background: var(--mast); color: var(--accent); }
.ribbon-win { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.ribbon-run { display: flex; flex: none; align-items: center; white-space: nowrap; animation: ribbon 70s linear infinite; }
.ribbon-win:hover .ribbon-run { animation-play-state: paused; }
.ribbon-run span { padding: 0 16px; border-right: 1px solid color-mix(in srgb, var(--accent-ink) 22%, transparent); }
.ribbon-run b { color: inherit; font-weight: 800; }
.ribbon-run .t-up::before { content: '▲ '; }
.ribbon-run .t-down::before { content: '▼ '; }
.ribbon-run .t-label { background: var(--mast); color: var(--accent); border-radius: 999px; padding: 5px 12px; margin: 0 8px; border-right: 0; }
@keyframes ribbon { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ribbon-run { animation: none; } }

/* ---------------------------------------------------------------- the section's pages */
/* the page bar: frosted paper, the section's pages as pills, the open one inked in */
.subbar { display: flex; align-items: center; gap: 16px; padding: 8px 18px; background: color-mix(in srgb, var(--card) 82%, transparent);
  -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass); border-bottom: 1px solid var(--edge); }
.tabs { display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { display: none; flex: none; background: none; border: 0; border-radius: 999px; padding: 9px 16px 8px;
  color: var(--muted); font: 800 condensed 15.5px/1 var(--head); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; transition: background-color .15s, color .15s; }
.tabs[data-hub=matchday] [data-in=matchday], .tabs[data-hub=team] [data-in=team], .tabs[data-hub=transfers] [data-in=transfers],
.tabs[data-hub=league] [data-in=league], .tabs[data-hub=world] [data-in=world] { display: block; }
.tabs button:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.tabs button[aria-selected=true] { color: var(--bg); background: var(--ink); }
.team { margin-left: auto; align-self: center; min-width: 0; flex-shrink: 100;   /* the team name gives way (ellipsis) before the page tabs do */
  font: 500 12.5px/1.3 var(--num); color: var(--muted); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team b { font: 800 condensed 16px/1 var(--head); text-transform: uppercase; letter-spacing: .03em; color: var(--ink); margin-right: 10px; }
.team:empty { display: none; }

main { max-width: 1480px; margin: 0 auto; padding: 32px 28px 56px; min-width: 0; overflow-x: clip; }   /* clip, not hidden: the sticky bits still stick */
.panel[hidden] { display: none; }
h1 { font: 900 extra-condensed clamp(44px, 6.4vw, 84px)/.86 var(--head); text-transform: uppercase; letter-spacing: -.005em; margin: 0 0 18px; text-wrap: balance; }
h2 { font: 900 extra-condensed 30px/1 var(--head); text-transform: uppercase; letter-spacing: .005em; margin: 28px 0 12px; color: var(--ink); }
h3 { font-stretch: condensed; }
.lede { color: var(--ink2); max-width: 52ch; font-size: 16.5px; }
.hint { color: var(--muted); font-size: 14px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }

/* ---------------------------------------------------------------- the sign-in screen (index.html #signin): stands alone */
body.gated { padding: 0; }
body.gated .mast, body.gated .ribbon, body.gated .subbar { display: none; }
body.gated main { max-width: none; padding: 0; margin: 0; }
#signin { min-height: calc(100vh / var(--z, 1)); min-height: calc(100dvh / var(--z, 1)); display: grid; place-items: center; padding: 24px 16px; position: relative; overflow: hidden; isolation: isolate; background: var(--accent); }
#signin[hidden] { display: none; }
.gate-poster { position: absolute; inset: calc(-4vh / var(--z, 1)) calc(-2vw / var(--z, 1)); z-index: -1; display: grid; align-content: center; pointer-events: none; user-select: none; transform: rotate(-6deg); }
.gate-poster span { font: 900 extra-condensed clamp(120px, 26vh / var(--z, 1), 300px)/.82 var(--head); text-transform: uppercase; color: transparent; -webkit-text-stroke: 2px #151515; white-space: nowrap; opacity: .9; }
.gate-poster span:nth-child(even) { color: #151515; margin-left: calc(-14vw / var(--z, 1)); }
.gate { width: min(410px, 100%); background: var(--card); border: 1px solid var(--edge); border-radius: 22px; padding: 30px 30px 24px; box-shadow: 0 2px 6px rgb(0 0 0 / .12), 0 40px 90px -24px rgb(0 0 0 / .55);
  animation: gate-in .35s ease-out both; }
@keyframes gate-in { from { opacity: 0; transform: translate(-6px, 10px); } }
@keyframes gate-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.gate-brand { display: flex; align-items: center; gap: 10px; font: 900 extra-condensed 34px/1 var(--head); text-transform: uppercase; margin-bottom: 18px; }
.gate-brand .mark { --mark-cut: var(--card); width: 32px; height: 32px; }
.gate h1 { margin: 0 0 6px; font-size: 54px; }
.gate-lede { text-wrap: pretty; color: var(--ink2); font-size: 14.5px; margin: 0 0 20px; }
.gate-form { display: grid; gap: 14px; }
.gate-form label, .gate-field { display: grid; gap: 6px; font: 700 12px/1.2 var(--num); text-transform: uppercase; letter-spacing: .05em; color: var(--ink2); }
.gate-form input:not([type=checkbox]) { width: 100%; background: var(--bg); border: 1px solid var(--edge); border-radius: var(--r-sm); padding: 12px 14px; font: 400 16px var(--font); text-transform: none; letter-spacing: 0; color: var(--ink); }
.gate-form input:focus { outline: none; box-shadow: 0 0 0 4px var(--accent-soft); border-color: var(--accent); background: var(--card); }
.gate-form input[aria-invalid=true] { border-color: var(--bad); }
.gate-pw { position: relative; }
.gate-pw input { padding-right: 46px; }
.gate-eye { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center;
  background: none; border: 0; border-radius: 8px; color: var(--muted); cursor: pointer; }
.gate-eye:hover, .gate-eye[aria-pressed=true] { color: var(--ink); }
.gate-eye:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.gate-eye .ico { width: 18px; height: 18px; }
.gate-form .gate-keep { display: flex; align-items: center; gap: 9px; font: 500 14px var(--font); text-transform: none; letter-spacing: 0; color: var(--ink2); cursor: pointer; justify-self: start; }
.gate-keep input { width: 17px; height: 17px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.gate-form.shake { animation: gate-shake .3s ease-in-out; }
@media (prefers-reduced-motion: reduce) { .gate, .gate-form.shake { animation: none; } }
.gate-form .btn { width: 100%; padding: 13px; font-size: 20px; margin-top: 2px; }
.gate-msg { margin: 0; font: 600 13.5px var(--font); text-transform: none; letter-spacing: 0; color: var(--bad); }
.gate-msg:empty { display: none; }
.gate-note { line-height: 1.55; text-wrap: balance; margin: 18px 0 0; padding-top: 14px; border-top: 2px dashed var(--line); font-size: 13px; color: var(--muted); text-align: center; }

/* ---------------------------------------------------------------- setup, buttons, loading */
.setup { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 10px; }
.setup input { flex: 1 1 220px; background: var(--card); border: 1px solid var(--edge); border-radius: 999px; padding: 12px 18px; font-size: 16px; }
.setup input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
/* buttons are pills that lift a little under the pointer */
.btn, .setup button {
  background: var(--accent); color: var(--accent-ink); border: 1px solid transparent; border-radius: 999px; padding: 10px 20px;
  font: 800 condensed 16px/1.1 var(--head); text-transform: uppercase; letter-spacing: .05em; box-shadow: var(--drop-sm);
  transition: translate .15s, box-shadow .15s, background-color .15s;
}
.btn:hover, .setup button:hover { translate: 0 -1px; box-shadow: var(--drop); }
.btn:active, .setup button:active { translate: 0 1px; box-shadow: none; }
.btn.ghost { background: var(--card); color: var(--ink); border-color: var(--edge); padding: 8px 16px; font-size: 14.5px; }
.btn.ghost:hover { background: var(--card2); }
.btn[disabled] { opacity: .4; cursor: default; translate: none; box-shadow: none; }
/* loading: the page's shape, shimmering, under a label saying which step it's on (Dugout 4; it was a spinner) */
#loading { padding: 2px 0 40px; }
#loadingText { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 999px;
  font: 700 12px/1 var(--num); text-transform: uppercase; letter-spacing: .06em; }
#loadingText::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); animation: spin 1.1s cubic-bezier(.6, 0, .4, 1) infinite; }
.skel { display: grid; gap: 18px; }
.skel i { display: block; border: 1px solid var(--edge); border-radius: var(--r);
  background: linear-gradient(100deg, var(--card2) 35%, var(--card) 50%, var(--card2) 65%) 0 0 / 300% 100%; animation: shimmer 1.5s linear infinite; }
.skel-h { height: 76px; width: min(500px, 80%); }
.skel-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.skel-row i { height: 92px; }
.skel-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
.skel-cols i { height: 340px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.spinner { width: 30px; height: 30px; margin: 0 auto 18px; border-radius: 9px; background: var(--accent); box-shadow: var(--drop-sm); animation: spin 1.1s cubic-bezier(.6, 0, .4, 1) infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#error { background: var(--card); border: 1px solid var(--bad); border-radius: var(--r); box-shadow: 0 0 0 1px var(--bad), 0 12px 28px -14px var(--bad); padding: 20px 22px; }

/* ---------------------------------------------------------------- cards: rounded, a hairline edge and a soft shadow */
.box { background: var(--card); border: 1px solid var(--edge); border-radius: var(--r); padding: 20px 22px 22px; box-shadow: var(--drop); }
.box h3 { margin: 0 0 16px; padding-bottom: 11px; border-bottom: 1px solid var(--edge); font: 900 extra-condensed 22px/1 var(--head); text-transform: uppercase; letter-spacing: .02em; color: var(--ink); }
.box h3 small, .box h3 .small, .box h3 .muted { font: 500 normal 12.5px var(--num); text-transform: none; letter-spacing: 0; color: var(--muted); margin-left: 4px; }
h3.sub, .box h3.sub { font: 800 condensed 15px var(--head); text-transform: uppercase; letter-spacing: .05em; margin: 18px 0 8px; padding: 0; border: 0; color: var(--ink2); }
.brief-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
.memo { display: flex; flex-direction: column; gap: 16px; }
.item {
  background: var(--card); border: 1px solid var(--edge); border-radius: var(--r); padding: 16px 18px 16px 66px; position: relative; box-shadow: var(--drop);
  opacity: 0; transform: translateY(6px); animation: in .4s ease forwards;
}
.item.urgent { box-shadow: 0 0 0 1px var(--bad), 0 12px 28px -14px var(--bad); border-color: var(--bad); }
.item.urgent::before { content: 'Act now'; position: absolute; right: 14px; top: -11px; background: var(--bad); color: #fff; font: 800 10.5px/1 var(--num); text-transform: uppercase; letter-spacing: .06em; padding: 5px 9px; border-radius: 999px; }
.item .ic { position: absolute; left: 15px; top: 16px; width: 38px; height: 38px; display: grid; place-items: center; font-size: 18px; background: var(--hi); border-radius: 12px; }
.item h3 { margin: 4px 0 6px; font: 900 extra-condensed 26px/1 var(--head); text-transform: uppercase; letter-spacing: .01em; }
.item p { margin: 0; color: var(--ink2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.item .chips { margin-top: 12px; }
/* win/draw/lose bar (Rivals, and the Briefing's rival card) */
.oddsbar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; margin: 10px 0; gap: 3px; }
.oddsbar > * { border-radius: 999px; }
.oddsbar .w { background: var(--good); }
.oddsbar .d { background: var(--card2); }
.oddsbar .l { background: var(--bad); }
/* transfer options: a player to sell, then a row of replacements (the Scout report and Squad's weakest links) */
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px; margin-top: 12px; }   /* 215px squeezed names and numbers together in three columns at 768px */
.optgrp { background: var(--card2); border: 1px solid var(--edge); border-radius: var(--r-sm); padding: 10px 14px 6px; min-width: 0; }
.opth { font: 700 11.5px var(--num); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 2px; }
.opth b, .opth .linkbtn { color: var(--ink); }
.optrow { display: flex; align-items: center; border-top: 1px solid var(--line); }
.opth + .optrow { border-top: 0; }
.optrow button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.optbuy { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px; padding: 7px 0; text-align: left; font-size: 14px; }
.optbuy b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.optbuy small { color: var(--muted); font: 500 12px var(--num); }
.optbuy span { margin-left: auto; font: 800 13.5px var(--num); font-variant-numeric: tabular-nums; }
.optbuy:hover b { background: var(--hi); color: var(--hi-ink); }
.optrow .plus { width: 28px; height: 28px; display: grid; place-items: center; color: var(--ink); font-weight: 800; font-size: 15px; padding: 0; margin-left: 6px; border: 1px solid var(--edge); border-radius: 50%; background: var(--card); transition: background-color .15s; }
.optrow .plus:hover { background: var(--accent); border-color: transparent; }
.opthint { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }
.chip { background: var(--card); border: 1px solid var(--edge); border-radius: 999px; padding: 4px 12px; font: 600 13px/1.35 var(--font); color: var(--ink); }
button.chip:hover { background: var(--hi); color: var(--hi-ink); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.keep { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.chip.full { border-color: var(--warn); color: var(--warn-text); }
@keyframes in { to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes tick { to { transform: translateX(-100%); } }
.side { display: flex; flex-direction: column; gap: 16px; }
/* a row (or rows) of figures as tiles */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { container-type: inline-size; background: var(--card2); padding: 11px 13px; min-width: 0; border-radius: var(--r-sm); }
.stat small { display: block; font: 700 10.5px/1.3 var(--num); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stat span { display: block; font: 900 extra-condensed clamp(18px, 24cqi, 32px)/1.05 var(--head); font-variant-numeric: tabular-nums; }   /* sized to its cell, so £100.3m fits a narrow card */
/* histogram */
.hist { width: 100%; height: 130px; display: block; }
.hist rect { fill: var(--ink); }
.hist rect.hot { fill: color-mix(in srgb, var(--muted) 40%, var(--card)); }
.hist rect:hover { fill: var(--accent); }
.hist text { fill: var(--muted); font: 600 10.5px var(--num); }
.hist .mean { stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 4 3; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 4px 0 16px; }
/* a row of choices stays one line and scrolls sideways on narrow screens, rather than wrapping labels */
/* a segmented control: a pill track with the chosen option raised on it */
.seg { display: inline-flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; background: var(--card2); border: 1px solid var(--edge); border-radius: 999px; padding: 3px; gap: 2px; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; white-space: nowrap; background: none; border: 0; padding: 7px 15px; border-radius: 999px; color: var(--ink2); font: 700 condensed 14.5px/1.2 var(--head); text-transform: uppercase; letter-spacing: .04em; transition: background-color .15s, color .15s; }
.seg button:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.seg button[aria-pressed=true] { background: var(--ink); color: var(--card); box-shadow: var(--drop-sm); }
/* the old pitch (kept for any view still drawing one) */
.pitch { position: relative; border: 1px solid var(--edge); border-radius: var(--r); padding: 14px 6px 10px; overflow: hidden; background: var(--card2); }
.row { display: flex; justify-content: center; gap: 4px; margin: 6px 0 14px; }
.bench { background: var(--card); border: 1px solid var(--edge); border-radius: var(--r); margin-top: 10px; padding: 8px 6px 4px; }
.bench .row { margin: 4px 0; }
.bench-label { font: 700 11px var(--num); text-transform: uppercase; color: var(--muted); text-align: center; }
.pc { width: 19%; max-width: 112px; background: none; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.pc .nm { margin-top: 8px; background: var(--ink); color: var(--card); padding: 3px 4px; font-size: 13px; font-weight: 700; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc .xp { background: var(--card); border: 1px solid var(--edge); width: 100%; font: 800 15px/1.3 var(--num); }
.pc .xp small { font: 500 11px var(--font); color: var(--muted); }
/* a club's kit colours in a circle, ringed by the player's status */
.kit {
  --ring: var(--good); --k1: #888; --k2: #fff;
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; position: relative; flex: none;
  background: linear-gradient(135deg, var(--k1) 0 55%, var(--k2) 55%);
  box-shadow: 0 0 0 2px var(--card), 0 0 0 5px var(--ring);
  font: 800 11.5px/1 var(--num); letter-spacing: .02em; color: #fff; text-shadow: 0 1px 2px #000, 0 0 3px #000;
}
.kit .cap { position: absolute; top: -7px; right: -9px; width: 20px; height: 20px; border-radius: 50%; background: var(--hi); color: var(--hi-ink); font: 800 11px/20px var(--num); text-shadow: none; box-shadow: 0 0 0 2px var(--card); }
.kit .cap.v { background: var(--card); color: var(--ink); }
.kit .flag { position: absolute; bottom: -6px; left: -8px; font-size: 14px; text-shadow: none; }
/* his FPL photo, head and shoulders, over the kit colours (core.js kit()): hidden until it loads, so the club's short
   name shows until then, and for anyone without one */
.kit .kph { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; background: inherit; opacity: 0; }
.kit .kph.has-photo { opacity: 1; }
.kph img { position: absolute; left: -20%; top: 6%; width: 140%; }
.strip { display: flex; width: 100%; gap: 2px; overflow: hidden; }
.strip i { flex: 1; height: 17px; font: 700 9.5px/17px var(--num); font-style: normal; color: #fff; overflow: hidden; text-align: center; border-radius: 4px; }
.aw, .strip i.aw { font-style: italic; }
.d1 { background: var(--d1); }
.d2 { background: var(--d2); }
.d3 { background: var(--d3); }
.d4 { background: var(--d4); }
.d5 { background: var(--d5); }
.d0 { background: var(--card2); color: var(--muted) !important; box-shadow: inset 0 0 0 1px var(--line); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 12px; align-items: center; }
.legend i { display: inline-block; width: 14px; height: 10px; border-radius: 1px; vertical-align: -1px; margin-right: 4px; }
.legend .ring { width: 12px; height: 12px; border-radius: 50%; border: 3px solid; background: none; }
.fgrid-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--edge); background: var(--card); }
.panel > .fgrid-wrap { box-shadow: var(--drop); }   /* a table on its own; inside a card it needs no shadow */
@media (prefers-reduced-motion: reduce) {
  .item { animation: none; opacity: 1; transform: none; }
}
.up { color: var(--up); }
.down { color: var(--down); }
.mgrid { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: grid; grid-template-columns: 1fr 110px 58px; align-items: center; gap: 12px; padding: 9px 8px; margin: 0 -8px; border-bottom: 1px solid var(--line); border-radius: 0; }
.plist li:last-child { border: 0; }
.plist li:has(> button.who:hover) { background: color-mix(in srgb, var(--hi) 45%, transparent); border-radius: var(--r-sm); border-bottom-color: transparent; }
.plist button { background: none; border: 0; padding: 0; text-align: left; min-width: 0; }
.plist .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plist .who small { color: var(--muted); font: 500 12px var(--num); }
.plist .val { font: 800 15px var(--num); text-align: right; font-variant-numeric: tabular-nums; }
.prog { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 9%, transparent); position: relative; }
.prog::before { content: ''; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; border-radius: 1px; background: var(--ink); opacity: .5; }
.prog i { border-radius: 999px; }
.prog i { position: absolute; top: 0; bottom: 0; }
.prog i.pos { left: 50%; background: var(--good); }
.prog.own::before { display: none; }
.prog.own i { left: 0; background: var(--seq); }
.search { width: 100%; background: var(--card); border: 1px solid var(--edge); border-radius: 999px; padding: 10px 16px; margin-bottom: 8px; }
.search:focus, .sel:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.sel { background: var(--card); border: 1px solid var(--edge); border-radius: var(--r-sm); padding: 7px 10px; color: var(--ink); margin-left: 4px; font-weight: 600; }

/* ---------------------------------------------------------------- the sheet (player, transfer breakdown, account) */
/* Dugout 4: it rises in and sinks away (a bottom sheet on phones, a card that settles on bigger screens); [hidden] stays
   drawn while it fades, then goes (allow-discrete), and doesn't catch clicks meanwhile */
.sheet { position: fixed; inset: 0; z-index: 50; display: grid; align-items: end; justify-items: center; transition: opacity .24s ease, display .24s allow-discrete; }
.sheet[hidden] { display: none; opacity: 0; pointer-events: none; }
@starting-style { .sheet { opacity: 0; } }
.sheet-bg { position: absolute; inset: 0; background: rgba(21,21,21,.42); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }   /* dims in both looks (Night's --frame is grey) */
.sheet-card {
  position: relative; width: min(700px, 100%); max-height: calc(90vh / var(--z, 1)); overflow-y: auto; overscroll-behavior: none; background: var(--bg);   /* no bounce: a pull at the top drags it */
  border: 1px solid var(--edge); border-bottom: 0; border-radius: 26px 26px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); box-shadow: var(--lift);
  transition: translate .34s cubic-bezier(.2, .8, .2, 1), scale .34s cubic-bezier(.2, .8, .2, 1);
}
.sheet[hidden] .sheet-card { translate: 0 56px; }
@starting-style { .sheet-card { translate: 0 56px; } }
.sheet-grab { display: none; }   /* phones: the handle that says it pulls down (js/fx.js wireSheetDrag) */
@media (max-width: 759px) {
  .sheet-grab { display: block; width: 44px; height: 5px; margin: -10px auto 12px; border-radius: 8px; background: var(--muted); opacity: .55; }
}
.phone-desktop .sheet-bg { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(21,21,21,.6); }   /* blur there mirrors the page behind it (js/phone.js) */
@media (min-width: 760px) {
  .sheet { align-items: center; }
  .sheet-card { border-bottom: 1px solid var(--edge); border-radius: 22px; padding: 28px 30px; box-shadow: var(--lift); }
  .sheet[hidden] .sheet-card { translate: 0 14px; scale: .97; }
  @starting-style { .sheet-card { translate: 0 14px; scale: .97; } }
}
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
/* stays in the corner as the sheet scrolls; the margins leave it no height, so the words start where they would */
.sheet-x { position: sticky; float: right; top: -6px; margin: -6px -4px -30px 0; background: var(--card); border: 1px solid var(--edge); border-radius: 50%; width: 36px; height: 36px; color: var(--ink); font-weight: 800; box-shadow: var(--drop-sm); z-index: 2; transition: background-color .15s; }
@media (max-width: 759px) { .sheet-x { margin: -13px -4px -23px 0; } }
@media (min-width: 760px) { .sheet-x { top: -12px; margin: -12px -14px -24px 0; } }   /* sticky counts from inside the padding */
.sheet-x:hover { background: var(--accent); border-color: transparent; }
.ph { display: flex; gap: 20px; align-items: center; margin-bottom: 12px; padding-right: 44px; }
.ph .kit { width: 56px; height: 56px; font-size: 13px; flex: none; }
.ph h2 { margin: 0; color: var(--ink); font-size: 40px; line-height: .9; overflow-wrap: break-word; }
.ph > div { min-width: 0; }   /* so a long name wraps instead of running under the ✕ and off the screen */
@media (max-width: 600px) { .ph { gap: 12px; } .ph .kit { width: 46px; height: 46px; } .ph h2 { font-size: 32px; } }
.news { background: color-mix(in srgb, var(--hi) 55%, var(--card)); border: 1px solid var(--edge); border-radius: var(--r); padding: 8px 12px; margin: 10px 0; font-size: 13.5px; color: var(--hi-ink); }
/* data behind: FPL not answering, offline, or the hourly snapshot stopped (app.js staleNote) */
.stale { display: flex; gap: 10px; align-items: flex-start; background: var(--hi); color: var(--hi-ink); border: 1px solid var(--edge); border-radius: var(--r); box-shadow: var(--drop-sm); padding: 9px 12px; margin: 0 0 18px; font-size: 13.5px; }
.stale[hidden] { display: none; }
/* on the highlighter, text (bold and muted too) takes the highlighter's ink: in the dark looks --ink is light */
.stale { --ink: var(--hi-ink); --ink2: var(--hi-ink); --muted: color-mix(in srgb, var(--hi-ink) 65%, transparent); }
.stale > div { flex: 1; }
.stale p { margin: 0; text-wrap: pretty; }
.stale p + p { margin-top: 4px; }
.stale .x { background: none; border: 0; color: inherit; font: inherit; font-size: 20px; line-height: 1; padding: 0 2px; cursor: pointer; }
.tip { position: fixed; z-index: 60; pointer-events: none; background: var(--ink); color: var(--bg); border-radius: 6px; padding: 6px 9px; font: 600 12px/1.35 var(--num); max-width: 250px; box-shadow: var(--drop-sm); }
.tip[hidden] { display: none; }
@media (max-width: 560px) {
  .pc .strip i:nth-child(n+4) { display: none; }
}

/* ---------------------------------------------------------------- tables */
table.ptable { border-collapse: collapse; width: 100%; font-size: 14px; }
.ptable th { color: var(--ink); font: 800 10.5px/1.2 var(--num); letter-spacing: .06em; text-transform: uppercase; padding: 10px 8px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--edge); }
.ptable td { padding: 8px; text-align: right; border-top: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ptable tbody tr:hover td { background: color-mix(in srgb, var(--hi) 35%, transparent); }
.ptable .l { text-align: left; }
.ptable tr.mine td:nth-child(2) b { text-decoration: underline 3px var(--accent); text-underline-offset: 3px; text-decoration-skip-ink: none; }
.ptable button.who { background: none; border: 0; padding: 0; text-align: left; }
.ptable button.who small { color: var(--muted); font: 500 11.5px var(--num); }
.ptable .strip { border-radius: 0; }
input[type=checkbox] { accent-color: var(--ink); width: 16px; height: 16px; vertical-align: -3px; }
.tr-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 4px 8px; align-items: center; padding: 4px 0; font-size: 14px; }
.tr-row > span:last-child { grid-column: 2 / -1; color: var(--muted); }
.tr-row button.who { background: none; border: 0; padding: 0; color: var(--ink2); }
.tr-row .l b { color: var(--ink); }
svg.rank { width: 100%; height: auto; display: block; }
svg.rank text { fill: var(--muted); font: 600 10px var(--num); }
.calib { display: flex; gap: 8px; align-items: flex-end; height: 120px; padding-bottom: 16px; position: relative; }
.calib > div { flex: 1; height: 100%; display: flex; align-items: flex-end; gap: 2px; position: relative; }
.calib span { flex: 1; min-height: 2px; }
.calib .pr { background: color-mix(in srgb, var(--muted) 40%, var(--card)); }
.calib small { position: absolute; bottom: -16px; left: 0; right: 0; text-align: center; font: 600 10px var(--num); color: var(--muted); }
.odds { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.odds span { font: 900 extra-condensed 46px/1 var(--head); font-variant-numeric: tabular-nums; }
.odds small { display: block; color: var(--muted); font: 700 11px var(--num); text-transform: uppercase; letter-spacing: .05em; }
.brief-grid > *, .memo > *, .side > * { min-width: 0; }
.subnav { margin-bottom: 4px; }
.plist.live li { grid-template-columns: 1fr auto 44px; }
.plist.live .who { display: flex; gap: 12px; align-items: center; }
.plist.live .who .kit { width: 34px; height: 34px; font-size: 9.5px; flex: none; box-shadow: 0 0 0 1.5px var(--card), 0 0 0 3.5px var(--ring); }
.plist.live .who .kit .flag { display: none; }
.plist.live .who span:last-child { min-width: 0; }
.plist.live li.off { opacity: .55; }
.plist.live li.on .val { color: var(--up); }
.plist.live .val { font-size: 21px; }
.tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.tags i { font: 600 normal 11.5px var(--num); background: var(--card2); border: 1px solid var(--edge); border-radius: 999px; padding: 1px 8px; color: var(--ink2); }
.matches li { grid-template-columns: 1fr auto; }
.matches .score { font-variant-numeric: tabular-nums; }
.matches .score b { display: inline-block; min-width: 46px; text-align: center; font: 800 17px var(--num); }
.weeks { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 12px; margin: 14px 0; }
.week { background: var(--card); border: 1px solid var(--edge); border-radius: var(--r-sm); padding: 12px 14px; cursor: pointer; box-shadow: var(--drop-sm); transition: box-shadow .15s, translate .15s; }
.week:hover { background: var(--card2); }
/* the chosen one of a set is .picked: .sel is the dropdown style above, and as a state it nudged things 4px and framed them */
.week.picked { box-shadow: 0 0 0 2px var(--accent), var(--drop-sm); }
.week .mv { font-size: 13.5px; margin-top: 6px; display: grid; grid-template-columns: 1fr auto; gap: 4px; align-items: center; }
.week .mv button { margin-left: auto; background: none; border: 0; color: var(--muted); padding: 0 2px; }
.week .mv button:hover { color: var(--bad); }
.form { display: flex; gap: 4px; align-items: center; }
.form span, .res { width: 26px; height: 26px; border-radius: 6px; display: inline-grid; place-items: center; font: 800 12.5px var(--num); color: #fff; }
.form small { margin-left: 6px; }
.fW { background: var(--good); }
.fD { background: #77736a; }
.fL { background: var(--bad); }
:root[data-theme=dark] .fW, :root[data-theme=dark] .fL { color: var(--bg); }   /* the dark looks' green and red are bright: dark letters read, white don't */
ul.newslist { list-style: none; margin: 0; padding: 0; }
ul.newslist li { border-top: 1px solid var(--line); }
ul.newslist li:first-child { border-top: 0; }
ul.newslist a { display: grid; grid-template-columns: 112px 1fr; gap: 14px; padding: 12px 0; color: inherit; text-decoration: none; }
ul.newslist a:hover b { background: var(--hi); color: var(--hi-ink); }
ul.newslist small { color: var(--muted); font-size: 12.5px; }
@media (max-width: 500px) {
  ul.newslist a { grid-template-columns: 84px 1fr; }
}
.ltab tr.cut td { border-bottom: 1px solid var(--edge); }
.mgrid > * { min-width: 0; }
details summary { cursor: pointer; color: var(--ink2); margin-top: 6px; font-weight: 600; }
.bins { display: flex; gap: 6px; height: 110px; align-items: flex-end; padding-bottom: 18px; }
.bins > div { flex: 1; height: 100%; position: relative; }
.bins .bb { height: 100%; display: flex; gap: 2px; align-items: flex-end; }
.bins .bb span { flex: 1; min-height: 1px; }
.bins .f { background: var(--seq); }
.bins .a { background: #c2410c; }
.bins small { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font: 600 10px var(--num); color: var(--muted); }
.leaders { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 500px) {
  .leaders { grid-template-columns: repeat(2, 1fr); }
}
.lead small { display: block; color: var(--muted); font: 700 10.5px var(--num); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.lead .who { display: flex; justify-content: space-between; width: 100%; background: none; border: 0; padding: 2px 0; font-size: 14px; color: var(--ink2); }
.lead .who:first-of-type { color: var(--ink); font-weight: 700; }
.share li { grid-template-columns: 1fr 110px 44px; }
.form.mini { display: inline-flex; gap: 2px; }
.form.mini span { width: 18px; height: 18px; font-size: 10.5px; }
.ltab .who { background: none; border: 0; padding: 0; color: inherit; text-align: left; }
.sorth { background: none; border: 0; color: inherit; font: inherit; padding: 0; white-space: nowrap; text-transform: inherit; letter-spacing: inherit; }
.sorth.on, .sorth:hover { color: var(--accent-text); }
.h2h li { grid-template-columns: 1fr auto; }
@media (min-width: 900px) {
  .brief-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
}
/* the Scout report's side column is long: below 1280px its boxes run in two columns under the notes instead */
@media (min-width: 900px) and (max-width: 1279px) {
  #brief .brief-grid { grid-template-columns: minmax(0, 1fr); }
  #brief .side { display: block; columns: 2; column-gap: 16px; }
  #brief .side > * { break-inside: avoid; margin-bottom: 16px; }
}
/* card grids stack like masonry, so short cards don't leave holes */
.mgrid, .masonry { display: block; column-gap: 18px; columns: 1; }
.mgrid > *, .masonry > * { break-inside: avoid; margin-bottom: 18px; display: block; width: 100%; }
@media (min-width: 900px) {
  .mgrid, .masonry { columns: 2; }
}
@media (min-width: 1500px) {
  .masonry { columns: 3; }
}
/* big monitors: more columns rather than very wide cards */
@media (min-width: 1900px) {
  .mgrid { columns: 3; }
  .masonry { columns: 4; }
}
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.badge { background: var(--card2); border: 1.5px dashed var(--edge); border-radius: var(--r); padding: 10px; display: flex; flex-direction: column; gap: 2px; opacity: .55; filter: grayscale(1); }
.badge.got { opacity: 1; filter: none; border: 1px solid var(--edge); background: var(--card); box-shadow: 0 0 0 2px var(--accent), var(--drop-sm); }
.badge small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.awards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.award { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 1px solid var(--edge); border-radius: var(--r); padding: 10px 12px; box-shadow: var(--drop-sm); }
.award small { display: block; color: var(--muted); font-size: 12.5px; }
.award b { display: block; }
.momentum .zero { stroke: var(--muted); }
.momentum .half { stroke: var(--line); stroke-dasharray: 3 3; }
#club .seg button[aria-pressed=true], #club .chip.on { background: var(--ink); color: var(--card); border-color: var(--ink); }
.keyhelp { position: fixed; right: 16px; bottom: 90px; z-index: 40; background: var(--card); border: 1px solid var(--edge); border-radius: var(--r); padding: 12px 14px; font-size: 14px; box-shadow: var(--drop); }
.setgroup { border-top: 1px solid var(--edge); padding: 12px 0; }
.setgroup h3 { margin: 0 0 8px; font-size: 16px; }
.setgroup .search { margin-top: 4px; }
.setgroup .row { margin: 6px 0; }
.ok { background: color-mix(in srgb, var(--good) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--good) 45%, transparent); border-radius: var(--r-sm); padding: 9px 13px; margin: 8px 0; font-size: 14px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--ink); font: inherit; font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; }
.linkbtn:hover { background: var(--hi); color: var(--hi-ink); }
/* account (js/account.js): the sheet's forms */
.acct { display: grid; gap: 8px; margin: 12px 0; }
.acct form { display: grid; gap: 8px; margin: 8px 0 4px; }
.acct input { background: var(--card); border: 1px solid var(--edge); border-radius: var(--r); padding: 10px 12px; font-size: 16px; color: var(--ink); }
details.acct summary { cursor: pointer; font-weight: 700; }
.bd { font-style: normal; width: 19px; height: 19px; border-radius: 8px; border: 1px solid var(--edge); display: grid; place-items: center; font: 800 10.5px var(--num); color: #151515; }
.bd.cap { background: var(--hi); color: var(--hi-ink); }
.bd.out { background: #ff7b7b; }
.bd.up { background: #4ade80; }
.split { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 8px; margin: 6px 0; font: 600 11.5px var(--num); text-transform: uppercase; color: var(--muted); }
#sqedit[aria-pressed=true] { background: var(--hi); color: var(--hi-ink); }
@media (max-width: 600px) {
  .bd { width: 16px; height: 16px; font-size: 9.5px; }
}
/* on touch screens, names and sort headers in tables are bigger to tap than they look (the rows stay as they are) */
@media (pointer: coarse) {
  .ptable button.who, .ptable .linkbtn, .tr-row button.who, .ltab .who, .sorth { position: relative; }
  .ptable button.who::after, .ptable .linkbtn::after, .tr-row button.who::after, .ltab .who::after, .sorth::after { content: ''; position: absolute; inset: -9px -4px; }
}

/* ---------------------------------------------------------------- Dugout 4: motion and feedback (js/fx.js) */
/* A page slides in from the side you moved towards (app.js tab() sets main[data-dir]; next = further along the
   sections), or rises when you jumped to the same place. main clips sideways overflow, so nothing scrolls. */
.panel { transition: opacity .3s ease, translate .42s cubic-bezier(.2, .8, .2, 1); }
@starting-style {
  .panel { opacity: 0; translate: 0 14px; }
  main[data-dir=next] > .panel { translate: 40px 0; }
  main[data-dir=prev] > .panel { translate: -40px 0; }
}
/* then its cards rise in turn (fx.js pageEnter numbers them --rise) */
.fx-rise { animation: rise .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--rise, 0) * 50ms); }
@keyframes rise { from { opacity: 0; translate: 0 22px; } }
/* a new look grows in a circle from where it was picked (fx.js switchLook: View Transitions) */
:root.fx-look::view-transition-old(root), :root.fx-look::view-transition-new(root) { mix-blend-mode: normal; }
:root.fx-look::view-transition-old(root) { animation: none; }
:root.fx-look::view-transition-new(root) { animation: look-wipe .6s cubic-bezier(.65, 0, .35, 1); }
@keyframes look-wipe { from { clip-path: circle(0 at var(--fx-x) var(--fx-y)); } to { clip-path: circle(var(--fx-r) at var(--fx-x) var(--fx-y)); } }
/* how far down the page you are: the line under the page tabs fills with the accent as you scroll (scroll-driven) */
@supports (animation-timeline: scroll()) {
  .subbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 0 2px 2px 0; background: var(--accent); pointer-events: none;
    transform-origin: 0 50%; scale: 0 1; animation: read linear both; animation-timeline: scroll(root); }
  @keyframes read { to { scale: 1 1; } }
}
/* toasts: what an action did, with Undo, at the foot of the screen (above the dock on phones) */
.toasts { position: fixed; left: 50%; bottom: 24px; translate: -50% 0; z-index: 58; width: min(470px, calc(100% - 32px));
  display: flex; flex-direction: column; align-items: stretch; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 14px; background: var(--ink); color: var(--bg); border-radius: 18px;
  box-shadow: var(--lift); padding: 10px 10px 10px 18px; font: 600 14px/1.35 var(--font);
  transition: opacity .26s ease, translate .32s cubic-bezier(.2, .8, .2, 1); }
@starting-style { .toast { opacity: 0; translate: 0 18px; } }
.toast.gone { opacity: 0; translate: 0 10px; }
.toast span { flex: 1; min-width: 0; text-wrap: pretty; }
.toast-undo { flex: none; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px; padding: 8px 14px;
  font: 800 condensed 14px/1 var(--head); text-transform: uppercase; letter-spacing: .05em; }
.toast-undo:hover { background: var(--hi); color: var(--hi-ink); }
/* What's new (fx.js openNews), in the sheet */
.wn-h { margin: 0 0 4px; font-size: 44px; line-height: .9; padding-right: 44px; }
.wn-list { list-style: none; counter-reset: wn; margin: 18px 0 14px; padding: 0; display: grid; gap: 10px; }
.wn-list li { counter-increment: wn; position: relative; background: var(--card); border: 1px solid var(--edge); border-radius: var(--r); box-shadow: var(--drop-sm); padding: 14px 16px 15px 60px; }
.wn-list li::before { content: counter(wn, decimal-leading-zero); position: absolute; left: 13px; top: 11px; font: 900 extra-condensed 30px/1 var(--head); color: var(--accent-text); }
.wn-list b { display: block; font: 900 extra-condensed 22px/1.05 var(--head); text-transform: uppercase; letter-spacing: .02em; }
.wn-list p { margin: 4px 0 0; color: var(--ink2); font-size: 14px; text-wrap: pretty; }
.wn-list .btn { margin-top: 10px; }
/* the guide (views/guide.js), in the sheet: a step at a time */
.gd { padding: 4px 2px 2px; }
.gd-n { font: 700 11px var(--num); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-text); }
.gd-h { margin: 6px 0 10px; font-size: 44px; line-height: .9; padding-right: 44px; }
.gd-p { font-size: 16px; line-height: 1.55; color: var(--ink2); max-width: 60ch; min-height: 7.8em; text-wrap: pretty; }
.gd-dots { display: flex; gap: 6px; margin: 18px 0; }
.gd-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: width .25s ease, background .25s ease; }
.gd-dots i.on { width: 22px; border-radius: 4px; background: var(--accent); }
.gd-nav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; }
.gd-nav > :last-child { margin-left: auto; }
/* a player's photo beside his name in a list (2026-11-27): <button class="who wk">${kit(e)}<span><b>…</b><small>…</small></span> */
.plist .who.wk { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who.wk > span:not(.kit) { display: block; min-width: 0; }   /* the words, not the badge (a span too: it stays a centred grid) */
.who.wk .kit { width: 30px; height: 30px; font-size: 8px; box-shadow: 0 0 0 1.5px var(--card), 0 0 0 3px var(--ring); }
.who.wk .kit .flag, .who.wk .kit .cap { display: none; }
@media (max-width: 759px) {
  .toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .skel-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skel-cols { grid-template-columns: minmax(0, 1fr); }
  .skel-cols i { height: 220px; }
}
/* page tabs stay under the masthead as you scroll (on phones the masthead scrolls away and they stick to the top) */
@media (min-width: 760px) {
  html { scroll-padding-top: 114px; }
  .subbar { position: sticky; top: 58px; z-index: 25; }
}
/* a phone on its side: only the page tabs stay, so there's room to read */
@media (min-width: 760px) and (max-height: 480px) {
  html { scroll-padding-top: 64px; }
  .mast { position: relative; }
  .subbar { top: 0; }
}
/* less motion when the device asks for it: things simply appear */
@media (prefers-reduced-motion: reduce) {
  .panel, .sheet, .sheet-card, .thememenu, .toast { transition: none; }
  .fx-rise, .skel i, #loadingText::before { animation: none; }
}

/* ---------------------------------------------------------------- tablets: icons drop out of the search box; phones: sections in a dock */
@media (max-width: 1180px) {
  .findbtn { width: auto; }
  .findbtn span { display: none; }
  .hubs button { padding: 0 11px; }
}
/* small tablets: the brand keeps only its mark and search only its icon, so the five sections still fit in one row */
@media (max-width: 1023px) {
  .mast { gap: 4px; padding: 0 12px; }
  .brand { padding-right: 6px; }
  .brand span { display: none; }
  .hubs button { padding: 0 9px; font-size: 14.5px; letter-spacing: .05em; }
  .findbtn { border: 0; background: none; padding: 6px; }
  .findbtn kbd { display: none; }
}
@media (max-width: 759px) {
  html { scroll-padding-top: 56px; }
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .mast { position: relative; height: 52px; padding: 0 10px 0 14px; gap: 6px; }
  .brand { font-size: 27px; padding-right: 0; }
  .brand .mark { width: 24px; height: 24px; }
  .brand span { display: inline; }
  .findbtn { border: 0; background: none; padding: 6px; }
  .findbtn kbd { display: none; }
  .findbtn .ico { width: 21px; height: 21px; }
  .themebtn { width: 36px; height: 36px; }
  /* the dock: frosted glass along the bottom, the current section's icon in an accent pill */
  .hubs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: flex; gap: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--mast) 84%, transparent); -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass);
    border-top: 1px solid color-mix(in srgb, var(--mast-ink) 10%, transparent);
  }
  .hubs button { flex: 1; height: auto; flex-direction: column; justify-content: center; gap: 4px; padding: 5px 2px 4px; border-radius: 14px; font-size: 11px; letter-spacing: .05em; }
  .hubs button .ico { display: block; width: 22px; height: 22px; }
  .hubs button:hover { background: none; }
  .hubs button[aria-current=true] { color: var(--accent); background: none; }
  .hubs button[aria-current=true] .ico { background: color-mix(in srgb, var(--accent) 18%, transparent); border-radius: 999px; padding: 3px 14px; width: 52px; height: 28px; margin: -3px 0; }
  .hubs button[aria-current=true]::after { display: none; }
  .ribbon { height: 40px; font-size: 11.5px; }
  .clock { flex: 1; justify-content: space-between; padding: 0 12px; }
  .clocks { flex: 1; }
  .ribbon-win { display: none; }
  .subbar { position: sticky; top: 0; z-index: 25; padding: 6px 8px; }
  .tabs button { padding: 9px 14px 8px; font-size: 15px; }
  .team { display: none; }
  main { padding: 20px 16px 36px; }
  h1 { font-size: clamp(44px, 14vw / var(--z, 1), 60px); }
  .box { padding: 16px 16px 18px; }
  .item { padding: 16px 16px 18px; }
  .item .ic { left: auto; right: 12px; top: 12px; width: 32px; height: 32px; font-size: 15px; }
  .item h3 { padding-right: 40px; font-size: 24px; }
  .keyhelp { bottom: 84px; }
}
@media (max-width: 330px) {
  .brand span { display: none; }
}

/* ---------------------------------------------------------------- the dark looks: Night's tokens, which Third Kit (css/themes.css) recolours */
:root[data-theme=dark] {
  color-scheme: dark;
  --bg: #111110; --bg2: #181816; --card: #1c1c1a; --card2: #262522; --line: #34322e; --frame: #5c5850;
  --ink: #f2efe7; --ink2: #cfcabf; --muted: #969185;
  --accent: #ff5b2b; --accent-ink: #111110; --accent-soft: rgba(255,91,43,.16);
  --accent-text: var(--accent);   /* bright on dark reads as it is (each dark look's own accent) */
  --hi: #e4ff3d; --hi-ink: #111110;
  --mast: #000; --mast-ink: #f2efe7;
  --good: #33c172; --warn: #f0b23a; --warn-text: #f0b23a; --serious: #f48a4a; --bad: #ff5d52;
  --up: #4fd585; --down: #ff7067;
  --d3: #4d4a43;
  --drop: 0 1px 2px rgb(0 0 0 / .35), 0 12px 30px -12px rgb(0 0 0 / .7);
  --drop-sm: 0 1px 2px rgb(0 0 0 / .35), 0 4px 12px -6px rgb(0 0 0 / .6);
  --lift: 0 2px 6px rgb(0 0 0 / .4), 0 34px 90px -24px rgb(0 0 0 / .85);
  --grain: rgba(255,255,255,.02);
}
:root[data-theme=dark] .seg button[aria-pressed=true], :root[data-theme=dark] .chip.on { background: var(--ink); color: var(--bg); }
:root[data-theme=dark] .tip { background: var(--ink); color: var(--bg); }
:root[data-theme=dark] .news { background: color-mix(in srgb, var(--hi) 14%, var(--card)); color: var(--ink); }
:root[data-theme=dark] .sheet-bg { background: rgba(0,0,0,.6); }
:root[data-theme=dark] .gate { box-shadow: var(--lift); }
:root[data-theme=dark] .ribbon-run .t-label, :root[data-theme=dark] .clock:first-child { background: #000; }
:root[data-theme=dark] .mast { border-bottom: 1px solid color-mix(in srgb, var(--mast-ink) 10%, transparent); }
:root[data-theme=dark] .subbar { background: color-mix(in srgb, var(--bg2) 82%, transparent); }
:root[data-theme=dark] .stat { background: color-mix(in srgb, var(--ink) 5%, var(--card)); }
:root[data-theme=dark] .gate-poster span { -webkit-text-stroke-color: #000; }
:root[data-theme=dark] .gate-poster span:nth-child(even) { color: #000; }
/* the week ahead as a picture (views/preview.js), in the sheet */
.pv-img { width: 100%; max-width: 380px; display: block; margin: 12px 0; border-radius: var(--r); border: 1px solid var(--edge); box-shadow: var(--drop); }
.pv-acts { display: flex; flex-wrap: wrap; gap: 8px; }
