/* URC Live Tracker - extracted from index.html on 7 Nov 2026 to close
 * CARL-oct-005. The CSP carried style-src 'unsafe-inline' solely for this
 * block; there were no inline style= attributes anywhere in the markup.
 *
 * Carl's note said the directive could not be removed without refactoring
 * how row animations are timed. That was wrong, and it was tested rather
 * than assumed: under a real style-src 'self' policy, element.style writes
 * and setProperty('--d', ...) both still apply, while an injected <style>
 * element and a style attribute are both blocked. CSSOM is not governed by
 * style-src, so the animations are unaffected.
 */
*, *::before, *::after { box-sizing: border-box; }

  :root {
    --bg:          #060910;
    --surface:     #0f1622;
    --surface-2:   #151e2d;
    --surface-3:   #1c2637;
    --line:        rgba(255,255,255,.07);
    --line-strong: rgba(255,255,255,.15);

    --text:        #eaf0f7;
    --text-dim:    #94a2b6;
    /* Lifted from #667588 on 2026-10-06. The old value measured 4.24:1 on the
       page background and 3.86:1 on a card - below the WCAG AA floor of 4.5:1 -
       and it is used on 28 SMALL-text elements (section headings, match dates,
       venues, table headers, timeline minutes, line-up positions, the footer).
       Same hue and saturation, minimum lift that clears 4.5:1 against the page,
       a card AND the deepest surface (Laura, item 28). */
    --text-faint:  #808ea0;

    --green:       #24c97a;
    --green-deep:  #0e7a45;
    --gold:        #e2b755;
    --live:        #ff4d5e;
    --sky:         #4aa8ff;

    --radius:      16px;
    --radius-sm:   10px;
    --shadow:      0 1px 2px rgba(0,0,0,.5), 0 12px 40px rgba(0,0,0,.4);

    --sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --display: 'Barlow Condensed', 'Inter', sans-serif;
    --mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --ease:    cubic-bezier(.22,.8,.3,1);
  }

  html { -webkit-text-size-adjust: 100%; }

  body {
    margin: 0; min-height: 100vh;
    background: var(--bg); color: var(--text);
    font-family: var(--sans); font-size: 15px; line-height: 1.5;
    -webkit-font-smoothing: antialiased; overflow-x: hidden;
  }

  /* -------------------------------------------------- the floodlit pitch --- */
  /* A rugby field seen in perspective, under stadium light. Two repeating
     gradients on a plane tipped back in 3D, so the markings recede properly and
     drift a pitch-length every half minute; the light pools above drift on
     their own slower cycles so the two never visibly repeat together. Masked
     out towards the top and kept well under the text contrast threshold — it
     should read as atmosphere, not as decoration competing with the scores.  */

  .pitch {
    position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
    background: radial-gradient(130% 85% at 50% -12%, #0b1a13 0%, #070c11 52%, #04060a 100%);
  }

  .turf {
    position: absolute; left: -45%; right: -45%; bottom: 0; height: 125%;
    /* A gentle rake with a long perspective: steeper than this and the plane
       collapses to a few pixels at the bottom of the screen. */
    transform: perspective(1000px) rotateX(66deg);
    transform-origin: bottom center;
    background-image:
      repeating-linear-gradient(0deg,  rgba(46,214,133,.55) 0 2px, transparent 2px 70px),
      repeating-linear-gradient(90deg, rgba(46,214,133,.22) 0 2px, transparent 2px 110px);
    -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.55) 38%, transparent 78%);
            mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.55) 38%, transparent 78%);
    opacity: .55;
    animation: turfDrift 26s linear infinite;
    will-change: background-position;
  }
  @keyframes turfDrift { to { background-position: 0 70px, 110px 0; } }

  .glow { position: absolute; border-radius: 50%; filter: blur(85px); will-change: transform; }
  .glow.a { width: 58vmax; height: 44vmax; top: -21vmax; left: -11vmax; background: #128a51; opacity: .26; animation: gA 31s ease-in-out infinite; }
  .glow.b { width: 50vmax; height: 38vmax; top: -16vmax; right: -13vmax; background: #14477f; opacity: .24; animation: gB 39s ease-in-out infinite; }
  .glow.c { width: 42vmax; height: 32vmax; bottom: -14vmax; left: 28%;   background: #6d4e12; opacity: .13; animation: gC 47s ease-in-out infinite; }

  @keyframes gA { 0%,100% { transform: translate3d(0,0,0) scale(1); }    50% { transform: translate3d(7vmax,4vmax,0) scale(1.14); } }
  @keyframes gB { 0%,100% { transform: translate3d(0,0,0) scale(1.08); } 50% { transform: translate3d(-8vmax,6vmax,0) scale(1); } }
  @keyframes gC { 0%,100% { transform: translate3d(0,0,0) scale(1); }    50% { transform: translate3d(6vmax,-5vmax,0) scale(1.2); } }

  .grain {
    position: fixed; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(180deg, rgba(4,6,10,.15), rgba(4,6,10,.55) 82%);
  }

  .wrap { width: min(1120px, 100% - 2rem); margin-inline: auto; position: relative; z-index: 2; }

  /* ------------------------------------------------------------ header --- */

  header.top {
    position: sticky; top: 0; z-index: 40;
    background: rgba(6,9,16,.72);
    backdrop-filter: blur(18px) saturate(1.3);
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
    border-bottom: 1px solid var(--line);
  }

  .top-inner { display: flex; align-items: center; gap: 1rem; padding: .8rem 0 .75rem; }
  .brand { display: flex; align-items: center; gap: .75rem; margin-right: auto; min-width: 0; }

  .crest {
    width: 40px; height: 40px; flex: none; border-radius: 11px;
    object-fit: contain; padding: 4px;
    background: linear-gradient(150deg, #12301f, #081410);
    border: 1px solid rgba(36,201,122,.28);
  }
  .crest.ph { display: grid; place-items: center; }
  .crest.ph svg { width: 22px; height: 22px; }

  .brand h1 {
    margin: 0; font-family: var(--display); font-size: 1.42rem; font-weight: 700;
    letter-spacing: .012em; line-height: 1.08; text-transform: uppercase;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .brand .sub {
    margin: 0; font-size: .655rem; color: var(--text-faint);
    text-transform: uppercase; letter-spacing: .16em; font-weight: 600;
  }

  .head-tools { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }

  .teambtn {
    display: inline-flex; align-items: center; gap: .42rem;
    padding: .36rem .62rem; border-radius: 999px; cursor: pointer;
    background: var(--surface); border: 1px solid var(--line);
    color: var(--text-dim); font: inherit; font-size: .74rem; font-weight: 500;
    transition: background .18s, border-color .18s, color .18s; white-space: nowrap;
  }
  .teambtn:hover { color: var(--text); background: var(--surface-2); }
  .teambtn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
  .teambtn.following { color: var(--text); border-color: rgba(36,201,122,.4); background: rgba(36,201,122,.1); }
  .teambtn img { width: 18px; height: 18px; object-fit: contain; }

  .seasons { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
  .seg {
    appearance: none; border: none; background: none; cursor: pointer;
    font: inherit; font-size: .715rem; font-weight: 500; color: var(--text-faint);
    padding: .28rem .6rem; border-radius: 999px; white-space: nowrap;
    transition: background .18s, color .18s;
  }
  .seg:hover { color: var(--text-dim); }
  .seg[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }
  .seg:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }

  .status {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .4rem .7rem; background: var(--surface); border: 1px solid var(--line);
    border-radius: 999px; font-size: .715rem; color: var(--text-dim);
    font-variant-numeric: tabular-nums; white-space: nowrap;
    transition: background .3s, border-color .3s, color .3s;
  }
  .status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); flex: none; }
  .status[data-state="live"]  { color: #ffd9dc; border-color: rgba(255,77,94,.36); background: rgba(255,77,94,.1); }
  .status[data-state="live"] .dot  { background: var(--live); animation: beat 1.6s ease-in-out infinite; }
  .status[data-state="ok"] .dot    { background: var(--green); }
  .status[data-state="stale"] { color: #f2ddb2; border-color: rgba(226,183,85,.36); background: rgba(226,183,85,.09); }
  .status[data-state="stale"] .dot { background: var(--gold); }
  .status[data-state="error"] { color: #ffcace; border-color: rgba(255,77,94,.36); }
  .status[data-state="error"] .dot { background: var(--live); }

  @keyframes beat { 0%,100% { opacity:1; transform:scale(1);} 50% { opacity:.3; transform:scale(.75);} }

  /* -------------------------------------------------------------- tabs --- */

  nav.tabs { display: flex; gap: .3rem; padding-bottom: .6rem; overflow-x: auto; scrollbar-width: none; }
  nav.tabs::-webkit-scrollbar { display: none; }

  .tab {
    appearance: none; border: 1px solid transparent; background: none;
    color: var(--text-dim); font: inherit; font-size: .83rem; font-weight: 500;
    padding: .45rem .85rem; border-radius: 999px; cursor: pointer; white-space: nowrap;
    display: inline-flex; align-items: center; gap: .45rem;
    transition: background .2s var(--ease), color .2s, border-color .2s, transform .18s var(--ease);
  }
  .tab:hover { color: var(--text); background: var(--surface); transform: translateY(-1px); }
  .tab[aria-selected="true"] { background: var(--surface-2); color: var(--text); border-color: var(--line-strong); }
  .tab:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

  .tab .count {
    font-family: var(--mono); font-size: .66rem; font-weight: 700;
    padding: .1rem .36rem; border-radius: 5px;
    background: rgba(255,255,255,.07); color: var(--text-dim);
    transition: background .25s, color .25s;
  }
  .tab[aria-selected="true"] .count { background: rgba(36,201,122,.18); color: var(--green); }
  .tab[data-live="true"] .count { background: rgba(255,77,94,.2); color: #ff8f98; animation: beat 1.6s ease-in-out infinite; }

  /* ----------------------------------------------------------- notices --- */

  .notice {
    display: flex; align-items: flex-start; gap: .6rem;
    margin: 1rem 0 0; padding: .7rem .9rem; border-radius: var(--radius-sm);
    font-size: .8rem; line-height: 1.45; border: 1px solid;
    animation: slideDown .45s var(--ease) both;
  }
  .notice svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
  .notice.demo  { background: rgba(226,183,85,.09); border-color: rgba(226,183,85,.32); color: #f4e0b4; }
  .notice.stale { background: rgba(226,183,85,.06); border-color: rgba(226,183,85,.22); color: #eedab0; }
  .notice.error { background: rgba(255,77,94,.09); border-color: rgba(255,77,94,.32); color: #ffcace; }
  .notice.info  { background: rgba(74,168,255,.07); border-color: rgba(74,168,255,.26); color: #c4e0ff; }
  /* A fallback the reader should notice without it reading as an error. */
  .notice.warn  { background: rgba(226,183,85,.10); border-color: rgba(226,183,85,.34); color: #f6e3bb; }
  .notice strong { font-weight: 600; }
  .notice button {
    margin-left: auto; flex: none; appearance: none;
    background: rgba(255,255,255,.08); border: 1px solid var(--line-strong);
    color: inherit; font: inherit; font-size: .74rem; font-weight: 500;
    padding: .24rem .62rem; border-radius: 6px; cursor: pointer; transition: background .18s;
  }
  .notice button:hover { background: rgba(255,255,255,.16); }

  @keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

  /* -------------------------------------------------------------- main --- */

  main { padding: 1.1rem 0 4rem; }
  .view[hidden] { display: none; }

  /* The `hidden` attribute only hides an element through the browser's own
     default stylesheet, which ANY author `display` rule outranks. .tab sets
     display:inline-flex, so setting tab.hidden = true changed the attribute
     and left the tab on screen — the Card Watch tab stayed visible on last
     season even though the code had hidden it (Allison, ALLISON-oct-003).
     One baseline rule, so this cannot bite again anywhere else. */
  [hidden] { display: none !important; }
  .view { animation: viewIn .38s var(--ease) both; }
  @keyframes viewIn { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }

  .section-head { display: flex; align-items: center; gap: .7rem; margin: 1.7rem 0 .75rem; }
  .section-head:first-child { margin-top: .4rem; }
  /* These were .7rem faint grey caps with .15em tracking — the micro-label
     every generated dashboard uses. The condensed face is already the voice
     the page uses for club names, so the headings now speak with it too, at a
     size that actually leads the section. */
  .section-head h2 {
    margin: 0; font-family: var(--display); font-size: 1.12rem; font-weight: 700;
    letter-spacing: .035em; text-transform: uppercase; color: var(--text-dim);
    white-space: nowrap;
  }
  .section-head .rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }

  /* -------------------------------------------------------- hero match --- */

  .hero {
    position: relative; overflow: hidden;
    border: 1px solid var(--line-strong); border-radius: 22px;
    background: linear-gradient(160deg, var(--surface-2), var(--surface) 62%);
    box-shadow: var(--shadow); padding: 1.4rem 1.3rem 1.25rem; margin-top: .4rem;
    animation: heroIn .55s var(--ease) both; cursor: pointer;
  }
  @keyframes heroIn { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }

  .hero.is-live { border-color: rgba(255,77,94,.34); }
  /* A slow sheen across the live hero — motion that says "this is happening
     now" without a spinner shouting for attention. */
  .hero.is-live::before {
    content: ''; position: absolute; top: 0; left: -60%; width: 45%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.045), transparent);
    animation: sheen 5.5s ease-in-out infinite;
  }
  @keyframes sheen { 0% { left: -60%; } 55%, 100% { left: 125%; } }

  .hero-top {
    display: flex; align-items: center; gap: .55rem;
    font-size: .7rem; color: var(--text-faint); letter-spacing: .07em;
    text-transform: uppercase; font-weight: 600; margin-bottom: 1rem;
    position: relative; z-index: 1;
  }
  .hero-top .venue { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; }

  .hero-body { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; position: relative; z-index: 1; }
  .hero-side { display: flex; flex-direction: column; align-items: center; gap: .6rem; min-width: 0; }

  .hero-logo {
    width: 78px; height: 78px; object-fit: contain;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,.55));
    animation: float 7s ease-in-out infinite;
  }
  .hero-side:nth-child(3) .hero-logo { animation-delay: -3.5s; }
  @keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

  .hero-logo.ph {
    display: grid; place-items: center; border-radius: 18px;
    background: var(--surface-3); border: 1px solid var(--line);
    font-family: var(--display); font-size: 1.5rem; font-weight: 700; color: var(--text-dim);
  }

  .hero-name { font-family: var(--display); font-size: 1.28rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; text-align: center; line-height: 1.1; }

  .hero-score {
    font-family: var(--mono); font-weight: 700; font-size: 3rem;
    letter-spacing: -.04em; line-height: 1; display: flex; align-items: center; gap: .55rem;
    font-variant-numeric: tabular-nums;
  }
  .hero-score .dash { color: var(--text-faint); font-size: 1.7rem; font-weight: 500; }

  .hero-kick { text-align: center; font-family: var(--mono); font-size: 1.85rem; font-weight: 700; letter-spacing: -.02em; }
  .hero-kick .tz { display: block; font-size: .6rem; color: var(--text-faint); letter-spacing: .16em; font-weight: 500; margin-top: .2rem; }
  .hero-kick .day { display: block; font-family: var(--sans); font-size: .74rem; color: var(--text-dim); font-weight: 500; margin-bottom: .25rem; letter-spacing: 0; }

  .clockbar { margin-top: 1.15rem; position: relative; z-index: 1; }
  .clockbar .track { height: 4px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; }
  .clockbar .fill { height: 100%; border-radius: 3px; width: 0; background: linear-gradient(90deg, var(--green-deep), var(--green)); transition: width 1.1s var(--ease); }
  .clockbar .marks { display: flex; justify-content: space-between; margin-top: .35rem; font-size: .625rem; color: var(--text-faint); letter-spacing: .09em; text-transform: uppercase; }

  /* ------------------------------------------------------ match cards --- */

  .cards { display: grid; gap: .6rem; }

  .match {
    position: relative; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: .9rem 1.05rem; cursor: pointer;
    transition: border-color .22s, transform .22s var(--ease), background .22s;
    animation: cardIn .45s var(--ease) both; animation-delay: var(--d, 0ms);
  }
  @keyframes cardIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

  .match:hover { border-color: var(--line-strong); transform: translateY(-2px); background: var(--surface-2); }
  .match:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
  .match.is-live { border-color: rgba(255,77,94,.3); background: linear-gradient(180deg, rgba(255,77,94,.05), transparent 55%), var(--surface); }

  /* a followed side, wherever it appears */
  .match.mine { border-color: rgba(36,201,122,.34); }
  .match.mine::after {
    content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px;
    border-radius: 0 3px 3px 0; background: var(--green);
  }

  /* A day's fixtures read as one list under their date, rather than as a run
     of separate floating cards with identical borders and even gaps between
     them. The Live view keeps the card treatment, where the rows genuinely are
     separate items sitting under different headings. */
  .cards.listed {
    gap: 0; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden;
  }
  .cards.listed .match {
    border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
    background: none;
  }
  .cards.listed .match:last-child { border-bottom: none; }
  .cards.listed .match:hover { transform: none; background: var(--surface-2); }
  .cards.listed .match:focus-visible { outline-offset: -2px; }

  .match-meta { display: flex; align-items: center; gap: .45rem; margin-bottom: .65rem; font-size: .69rem; color: var(--text-faint); letter-spacing: .04em; }
  .match-meta .sep { opacity: .4; }
  .match-meta .venue { margin-left: auto; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46%; }

  .live-chip {
    display: inline-flex; align-items: center; gap: .34rem;
    padding: .14rem .44rem; border-radius: 5px;
    background: rgba(255,77,94,.16); color: #ff8f98;
    font-size: .635rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  }
  .live-chip::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--live); animation: beat 1.6s ease-in-out infinite; }

  .row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .85rem; }
  .side { display: flex; align-items: center; gap: .6rem; min-width: 0; }
  .side.away { flex-direction: row-reverse; text-align: right; }

  .logo { width: 28px; height: 28px; flex: none; object-fit: contain; transition: transform .25s var(--ease); }
  .match:hover .logo { transform: scale(1.11); }
  .logo.ph {
    display: grid; place-items: center; border-radius: 7px; background: rgba(255,255,255,.05);
    font-family: var(--mono); font-size: .58rem; font-weight: 700; color: var(--text-faint);
  }

  .team-name {
    font-family: var(--display); font-weight: 600; font-size: 1.07rem;
    text-transform: uppercase; letter-spacing: .015em; line-height: 1.12;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .team-name.dim { color: var(--text-dim); font-weight: 400; }

  .score { font-family: var(--mono); font-weight: 700; font-size: 1.34rem; letter-spacing: -.025em; display: flex; align-items: center; gap: .5rem; font-variant-numeric: tabular-nums; }
  .score .dash { color: var(--text-faint); font-weight: 500; font-size: .95rem; }
  .score.is-live { color: #fff; }

  .kickoff { font-family: var(--mono); font-weight: 700; font-size: .98rem; text-align: center; white-space: nowrap; }
  .kickoff .tz { display: block; font-size: .58rem; font-weight: 500; color: var(--text-faint); letter-spacing: .12em; }

  .flash { animation: flash 1.1s ease-out; }
  @keyframes flash {
    0%   { color: var(--green); text-shadow: 0 0 22px rgba(36,201,122,.8); transform: scale(1.16); }
    100% { color: inherit; text-shadow: none; transform: scale(1); }
  }

  /* ------------------------------------------------ fixtures toolbar --- */

  .fx-bar {
    position: relative; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    padding: .7rem .85rem; margin: .4rem 0 .2rem;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  }
  .fx-bar .checked { font-size: .755rem; color: var(--text-dim); margin-right: auto; }
  .fx-bar .checked b { color: var(--text); font-weight: 600; }
  .fx-bar .checked span { display: block; font-size: .68rem; color: var(--text-faint); }

  .btn {
    appearance: none; cursor: pointer; font: inherit;
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .775rem; font-weight: 500; padding: .42rem .75rem; border-radius: 9px;
    background: rgba(255,255,255,.06); border: 1px solid var(--line-strong); color: var(--text);
    transition: background .18s, transform .18s var(--ease), border-color .18s;
  }
  .btn, .btn:visited { text-decoration: none; }
  .btn:hover { background: rgba(255,255,255,.13); transform: translateY(-1px); }
  .btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
  .btn svg { width: 14px; height: 14px; }
  .btn.primary { background: rgba(36,201,122,.15); border-color: rgba(36,201,122,.4); color: #8ff0c0; }
  .btn.primary:hover { background: rgba(36,201,122,.25); }
  .btn.ghost { background: none; border-color: var(--line); color: var(--text-dim); padding: .3rem .5rem; }
  .btn.ghost:hover { color: var(--text); background: rgba(255,255,255,.07); }

  /* The calendar button on a card. Always visible on touch, where there is no
     hover to reveal it. */
  .cal-btn { opacity: 0; transition: opacity .2s; }
  .match:hover .cal-btn, .match:focus-within .cal-btn { opacity: 1; }
  @media (hover: none) { .cal-btn { opacity: 1; } }

  .filter-chip {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .35rem .7rem; border-radius: 999px; cursor: pointer;
    background: var(--surface); border: 1px solid var(--line);
    color: var(--text-dim); font: inherit; font-size: .755rem; font-weight: 500;
  }
  .filter-chip[aria-pressed="true"] { background: rgba(36,201,122,.14); border-color: rgba(36,201,122,.42); color: #96eec2; }
  .filter-chip img { width: 16px; height: 16px; object-fit: contain; }

  /* ------------------------------------------------------ rugby ball --- */
  /* Spins on every fixture check, and is punted across the bar when the check
     actually turned something up — so a glance tells you whether the schedule
     moved, without reading a word. */

  .ball { width: 30px; height: 30px; flex: none; display: block; transform-origin: 50% 50%; }
  .ball svg { width: 100%; height: 100%; display: block; overflow: visible; }

  .ball.spin { animation: ballSpin 1.15s var(--ease); }
  @keyframes ballSpin {
    0%   { transform: rotate(0) scale(1); }
    45%  { transform: rotate(340deg) scale(1.22); }
    100% { transform: rotate(720deg) scale(1); }
  }

  /* The punt travels across the toolbar, not up the page: arcing any higher
     sends the ball behind the sticky header where nobody sees it. Distance
     comes from --punt, set from the bar's measured width. */
  .ball.punt { animation: ballPunt 1.65s cubic-bezier(.33,.06,.4,1); }
  @keyframes ballPunt {
    0%   { transform: translate(0,0) rotate(0) scale(1); }
    16%  { transform: translate(calc(var(--punt,220px) * .22), -16px) rotate(280deg) scale(1.2); }
    38%  { transform: translate(calc(var(--punt,220px) * .52), -22px) rotate(620deg) scale(1.2); }
    60%  { transform: translate(calc(var(--punt,220px) * .82), -12px) rotate(960deg) scale(1.1); }
    74%  { transform: translate(var(--punt,220px), 0) rotate(1140deg) scale(1); }
    100% { transform: translate(0,0) rotate(1440deg) scale(1); }
  }

  .ball-wrap { position: relative; z-index: 3; display: grid; place-items: center; }
  .ball-wrap .ring { position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--green); opacity: 0; pointer-events: none; }
  .ball-wrap .ring.go { animation: ringOut .95s var(--ease); }
  @keyframes ringOut { 0% { opacity: .75; transform: scale(.55); } 100% { opacity: 0; transform: scale(2.1); } }

  .changes { display: grid; gap: .3rem; margin-top: .55rem; }
  .change-row {
    display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: var(--text-dim);
    animation: slideDown .4s var(--ease) both; animation-delay: var(--d, 0ms);
  }
  .change-row .badge { font-size: .6rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; padding: .1rem .4rem; border-radius: 4px; }
  .change-row .badge.added { background: rgba(36,201,122,.2); color: #7fe8b3; }
  .change-row .badge.moved { background: rgba(226,183,85,.2); color: #f0d79a; }
  .change-row .badge.off,
  .change-row .badge.removed { background: rgba(255,77,94,.2); color: #ff9ba3; }

  /* ------------------------------------------------------------ table --- */

  .table-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow-x: auto; }
  table { width: 100%; border-collapse: collapse; font-size: .87rem; min-width: 660px; }
  /* The log shows tries and both bonus columns, so it needs more room
     before the numbers start colliding; the wrap scrolls it sideways. */
  table.log-table { min-width: 820px; }

  thead th {
    position: sticky; top: 0; z-index: 1; background: var(--surface-2);
    font-size: .645rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase;
    color: var(--text-faint); text-align: right; padding: .62rem .42rem; white-space: nowrap;
    border-bottom: 1px solid var(--line);
  }
  thead th:nth-child(1) { text-align: center; width: 44px; }
  thead th:nth-child(2) { text-align: left; }
  thead th.left { text-align: left; }
  thead th abbr { text-decoration: none; border-bottom: 1px dotted var(--text-faint); cursor: help; }

  tbody tr { animation: rowIn .4s var(--ease) both; animation-delay: var(--d, 0ms); }
  @keyframes rowIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }

  tbody td {
    padding: .58rem .42rem; text-align: right; border-bottom: 1px solid rgba(255,255,255,.038);
    font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: .84rem;
  }
  tbody tr:last-child td { border-bottom: none; }
  tbody tr:hover td { background: rgba(255,255,255,.026); }

  td.pos { text-align: center; color: var(--text-faint); font-size: .78rem; }
  td.club {
    text-align: left; font-family: var(--display); font-size: 1.02rem;
    font-weight: 600; text-transform: uppercase; letter-spacing: .015em;
  }
  td.club .cell { display: flex; align-items: center; gap: .6rem; }
  td.club img.logo, td.club span.logo { width: 22px; height: 22px; }
  td.pts { color: var(--text); font-weight: 700; }
  td.diff.pos-v { color: var(--green); }
  td.diff.neg-v { color: #ff8f98; }
  td.left { text-align: left; }
  /* Only meaningful in the stacked phone layout below. */
  td.rowbreak { display: none; }

  tr.qualify td.pos { color: var(--green); font-weight: 700; box-shadow: inset 3px 0 0 var(--green-deep); }
  tr.mine td { background: rgba(36,201,122,.07); }
  tr.mine td.club { font-weight: 600; }

  .form-strip { display: flex; gap: 2px; }
  .form-dot {
    width: 17px; height: 17px; border-radius: 4px; display: grid; place-items: center;
    font-family: var(--sans); font-size: .6rem; font-weight: 700; color: #fff;
    animation: popIn .3s var(--ease) both; animation-delay: var(--fd, 0ms);
  }
  @keyframes popIn { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: scale(1); } }
  /* --- the log on a narrow screen -------------------------------------
     Fifteen columns cannot fit a phone. Scrolling sideways was not an
     acceptable answer: on a 375px screen the table showed only #, TEAM, P and
     W, so PTS — the one number the table exists for — was off-screen with no
     sign it was there. Below 760px the log stops being a grid and each club
     becomes a block: position, crest and points on the first line, every
     remaining figure beneath it carrying its own label, and the form guide
     last. Nothing is hidden and nothing scrolls sideways.

     The breakpoint is 860px rather than a rounder number because the grid
     form of the log needs 820px plus the page's own gutter. At 760px there
     was a dead zone — a 768px tablet fell back to the grid, which then did not
     fit, and 86 elements ran past the edge (Allison, ALLISON-oct-006). */
  @media (max-width: 860px) {
    .table-wrap { overflow-x: visible; }
    table.stack-sm { min-width: 0; }
    .stack-sm thead { display: none; }
    .stack-sm tbody, .stack-sm tr, .stack-sm td { display: block; }

    .stack-sm tr {
      display: flex; flex-wrap: wrap; align-items: center;
      gap: .3rem .55rem; padding: .62rem .75rem;
      border-bottom: 1px solid rgba(255,255,255,.055);
    }
    .stack-sm tbody tr:last-child { border-bottom: none; }
    .stack-sm tbody td { border-bottom: none; padding: 0; }
    .stack-sm tbody tr:hover td { background: none; }

    /* Line one: the club and what it has earned. .club grows to fill the row,
       which is what pushes every remaining figure onto the next line. */
    .stack-sm td.pos { order: 1; min-width: 1.5rem; text-align: left; }
    .stack-sm td.club { order: 2; flex: 1 1 auto; }
    .stack-sm td.pts { order: 3; font-size: 1.05rem; }   /* log only */
    /* Ends the first line, so the figures below always start on a fresh one
       instead of trailing after the points and wrapping differently on every
       row. */
    .stack-sm td.rowbreak { display: block; order: 4; flex: 1 0 100%; height: 0; padding: 0; }
    .stack-sm td.pts::after {
      content: ' pts'; font-size: .62rem; font-weight: 600; letter-spacing: .08em;
      text-transform: uppercase; color: var(--text-faint); margin-left: .15rem;
    }

    /* Line two: everything else, each figure announcing what it is. */
    .stack-sm td[data-k]:not(.pos):not(.club):not(.pts):not([data-k="Form"]):not([data-k="Cards"]) {
      order: 5; font-size: .78rem; white-space: nowrap;
    }
    .stack-sm td[data-k]:not(.pos):not(.club):not(.pts):not([data-k="Form"]):not([data-k="Cards"])::before {
      content: attr(data-k); margin-right: .22rem;
      font-family: var(--sans); font-size: .62rem; font-weight: 700;
      letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint);
    }

    /* Richard, 7 Nov 2026: people were reading "P 5 W 4 D 1" as typing errors.
       Below 860px the header is display:none, so the <abbr> expansions are not
       rendered at all and there is nothing anywhere on the page that says what
       P or D mean (L-nov-011). The stacked layout has room for the word, so it
       uses it. Desktop keeps the abbreviations, where the header explains them.
       More specific than the data-k rule above, so it wins without !important. */
    .stack-sm td[data-k]:not(.pos):not(.club):not(.pts):not([data-k="Form"]):not([data-k="Cards"])[data-long]::before {
      /* The word is now a real <span class="cell-label"> in the document, so
         this cell must not generate a second copy. Cells that still have only
         a data-k and no span keep the generated short label above. */
      content: none;
    }

    /* Shown only in the stacked layout, where the header is display:none and
       there is otherwise nothing to say which figure is which. Styled exactly
       as the generated label it replaces. */
    .stack-sm .cell-label {
      display: inline;
      margin-right: .22rem;
      font-family: var(--sans); font-size: .62rem; font-weight: 700;
      letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint);
    }

    .skip {
      position: absolute; left: -9999px; top: 0; z-index: 100;
      padding: .6rem .9rem; border-radius: 0 0 6px 0;
      background: var(--green-deep, #0b1f17); color: #fff;
      font-family: var(--sans); font-size: .85rem; font-weight: 600;
      text-decoration: none;
    }
    .skip:focus { left: 0; outline: 2px solid var(--green, #24c97a); outline-offset: 2px; }
    #main:focus { outline: none; }

    /* NINA-idea-002: provenance, kept but made quiet. */
    .table-note {
      margin: .55rem 0 1.4rem; font-size: .78rem; color: var(--text-faint);
      line-height: 1.5;
    }

    /* --- the club panel ------------------------------------------------ */
    /* Every figure is real DOM text, so a screen reader reads "Played, 5".
       The label and value sit on one line with the value right-aligned. */
    .panel-hero { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
    .panel-hero img { width: 44px; height: 44px; object-fit: contain; }
    .panel-hero h2 { margin: 0; font-family: var(--display); font-size: 1.35rem; line-height: 1.1; }
    .panel-rank { margin: .15rem 0 0; font-size: .78rem; color: var(--text-dim); }
    .panel-points { display: flex; align-items: baseline; gap: .5rem; margin: 0 0 1.2rem; }
    .panel-points strong { font-family: var(--display); font-size: 2.6rem; line-height: 1; }
    .panel-points span { font-size: .82rem; color: var(--text-dim); }
    .stat-group { margin: 0 0 1.1rem; }
    .stat-group h3 {
      margin: 0 0 .35rem; font-family: var(--sans); font-size: .66rem; font-weight: 700;
      letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint);
    }
    .stat-line {
      display: flex; align-items: baseline; justify-content: space-between;
      gap: 1rem; padding: .3rem 0; border-bottom: 1px solid var(--hair);
    }
    .stat-line:last-child { border-bottom: 0; }
    .stat-label { font-size: .86rem; color: var(--text-dim); }
    .stat-value { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
    .stat-note { margin: .4rem 0 0; font-size: .78rem; color: var(--text-dim); line-height: 1.45; }
    .stat-note.warn { color: var(--amber, #e2b755); }

    /* The club name is a button now. It must not look like one. */
    button.club-open {
      background: none; border: 0; padding: 0; margin: 0; font: inherit;
      color: inherit; text-align: left; cursor: pointer;
      display: flex; align-items: center; gap: .5rem; width: 100%;
    }
    button.club-open:hover span { text-decoration: underline; }

    /* Line three: the form guide, given the full width. */
    /* The two strips are pictures, not figures: they get the full width, with
       the pip strip keeping its label alongside rather than stacked above it. */
    .stack-sm td[data-k="Form"],
    .stack-sm td[data-k="Cards"] {
      order: 6; flex: 1 0 100%; margin-top: .15rem;
      display: flex; align-items: center; gap: .4rem;
    }
    .stack-sm td[data-k="Cards"]::before {
      content: attr(data-k);
      font-family: var(--sans); font-size: .62rem; font-weight: 700;
      letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint);
    }

    /* The qualification marker moves to the edge of the whole block. */
    .stack-sm tr.qualify td.pos { box-shadow: none; }
    .stack-sm tr.qualify { box-shadow: inset 3px 0 0 var(--green-deep); }
    .stack-sm tr.mine td { background: none; }
    .stack-sm tr.mine { background: rgba(36,201,122,.07); }
  }

  /* L-nov-007. White on this green measured 2.83-2.90:1 on every surface the
     pill appears over — below even the 3.0 floor for non-text, on the most
     repeated glyph in the app. `.D` already solved it with a dark letter and
     `.W` was simply missed. Darkening the pill instead was measured and makes
     it worse: the pill itself then falls under the non-text floor. A dark
     letter on the same green measures 5.83-5.97:1. */
  .form-dot.W { background: rgba(36,201,122,.85); color: #04220f; }
  .form-dot.D { background: rgba(226,183,85,.8); color: #241c05; }
  .form-dot.L { background: rgba(255,77,94,.72); }

  .legend { margin: .65rem 0 0; font-size: .715rem; color: var(--text-faint); display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
  .legend .swatch { width: 3px; height: 12px; background: var(--green-deep); border-radius: 2px; }

  /* ------------------------------------------------------ card watch --- */

  .cardwatch-note { font-size: .78rem; color: var(--text-faint); margin: .2rem 0 .8rem; }
  .cw-bar { height: 3px; border-radius: 2px; background: rgba(255,255,255,.07); overflow: hidden; margin-top: .45rem; }
  .cw-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--green-deep), var(--green)); width: 0; transition: width .6s var(--ease); }

  .card-pips { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; }
  .pip { width: 8px; height: 12px; border-radius: 2px; }
  .pip.yellow { background: #f2c53d; }
  .pip.red { background: #e8434f; }
  .pip.more { width: auto; font-family: var(--mono); font-size: .64rem; color: var(--text-faint); padding-left: .2rem; }

  /* ------------------------------------------------------ match sheet --- */

  .sheet-backdrop {
    position: fixed; inset: 0; z-index: 90;
    background: rgba(3,5,9,.72); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    display: grid; place-items: center; padding: 1rem;
    animation: fadeIn .22s var(--ease) both;
  }
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

  .sheet {
    width: min(560px, 100%); max-height: min(86vh, 780px); overflow-y: auto;
    background: linear-gradient(165deg, var(--surface-2), var(--surface) 55%);
    border: 1px solid var(--line-strong); border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0,0,0,.6);
    animation: sheetIn .34s var(--ease) both;
  }
  @keyframes sheetIn { from { opacity: 0; transform: translateY(22px) scale(.97); } to { opacity: 1; transform: none; } }

  .sheet-head { padding: 1.1rem 1.2rem .95rem; border-bottom: 1px solid var(--line); position: relative; }
  .sheet-close {
    position: absolute; top: .8rem; right: .85rem; width: 30px; height: 30px; border-radius: 8px;
    background: rgba(255,255,255,.07); border: 1px solid var(--line);
    color: var(--text-dim); cursor: pointer; display: grid; place-items: center;
    transition: background .18s, color .18s;
  }
  .sheet-close:hover { background: rgba(255,255,255,.15); color: var(--text); }
  .sheet-close svg { width: 14px; height: 14px; }

  .sheet-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .8rem; margin-top: .3rem; }
  .sheet-team { display: flex; flex-direction: column; align-items: center; gap: .45rem; }
  .sheet-team img, .sheet-team .logo { width: 46px; height: 46px; }
  .sheet-team .nm { font-family: var(--display); font-size: 1rem; font-weight: 700; text-transform: uppercase; text-align: center; line-height: 1.1; }
  .sheet-score { font-family: var(--mono); font-size: 2.1rem; font-weight: 700; letter-spacing: -.03em; }

  .sheet-body { padding: 1rem 1.2rem 1.3rem; }
  .sheet-label { font-size: .655rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); margin: 1.1rem 0 .6rem; }
  .sheet-label:first-child { margin-top: 0; }

  .scorers { display: flex; flex-wrap: wrap; gap: .4rem; }
  .scorer {
    display: inline-flex; align-items: center; gap: .38rem;
    padding: .26rem .55rem .26rem .3rem; border-radius: 999px;
    background: rgba(36,201,122,.1); border: 1px solid rgba(36,201,122,.24);
    font-size: .8rem; color: #b6f2d4; animation: popIn .32s var(--ease) both;
  }

  .card-tally { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
  .tally { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; color: var(--text-dim); }
  .tally .chip { width: 13px; height: 18px; border-radius: 2px; }
  .tally .chip.yellow { background: #f2c53d; }
  .tally .chip.red { background: #e8434f; }

  /* timeline */
  .timeline { display: grid; gap: .1rem; }
  .ev {
    display: grid; grid-template-columns: 38px 26px 1fr auto; align-items: center; gap: .6rem;
    padding: .42rem 0; border-bottom: 1px solid rgba(255,255,255,.04);
    animation: cardIn .35s var(--ease) both; animation-delay: var(--d, 0ms);
  }
  .ev:last-child { border-bottom: none; }
  /* Away rows keep the same column order as home ones — mirroring swapped the
     minute and the running score between sides, which made the timeline hard
     to scan. The team is named on every row, so the side is a tint instead. */
  .ev.home { box-shadow: inset 2px 0 0 rgba(36,201,122,.45); padding-left: .5rem; }
  .ev.away { box-shadow: inset 2px 0 0 rgba(74,168,255,.5); padding-left: .5rem; }
  .ev .min { font-family: var(--mono); font-size: .74rem; font-weight: 700; color: var(--text-faint); text-align: center; }
  .ev .who { font-size: .855rem; font-weight: 500; }
  .ev .who .kind { display: block; font-size: .66rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
  .ev .ev-score { font-family: var(--mono); font-size: .74rem; font-weight: 700; color: var(--text-dim); font-variant-numeric: tabular-nums; }

  .half-rule {
    font-size: .62rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
    color: var(--text-faint); padding: .55rem 0 .3rem; margin-top: .2rem;
    border-top: 1px solid rgba(255,255,255,.05);
  }
  .timeline .half-rule:first-child { border-top: none; margin-top: 0; padding-top: 0; }

  .ev-icon { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; font-size: .62rem; font-weight: 700; }
  .ev-icon.try        { background: rgba(36,201,122,.2);  color: var(--green); }
  .ev-icon.conversion { background: rgba(74,168,255,.18); color: var(--sky); }
  .ev-icon.penalty    { background: rgba(74,168,255,.12); color: #9ccbff; }
  .ev-icon.drop       { background: rgba(155,120,255,.16); color: #b79dff; }
  /* Real card proportions, so a yellow reads as a yellow at a glance. */
  .ev-icon.yellow, .ev-icon.red { width: 15px; height: 21px; border-radius: 3px; }
  .ev-icon.yellow { background: #f2c53d; box-shadow: 0 2px 7px rgba(242,197,61,.42); }
  .ev-icon.red    { background: #e8434f; box-shadow: 0 2px 7px rgba(232,67,79,.42); }
  .ev-icon svg { width: 13px; height: 13px; }

  /* how it was won */
  .turn { display: grid; gap: .5rem; }
  .turn-row {
    display: flex; align-items: flex-start; gap: .6rem; padding: .6rem .75rem; border-radius: 10px;
    background: rgba(255,255,255,.035); border: 1px solid var(--line);
    font-size: .83rem; line-height: 1.45;
  }
  .turn-row .tag {
    flex: none; font-size: .58rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    padding: .2rem .4rem; border-radius: 4px; background: rgba(36,201,122,.16); color: #8fe9bd; margin-top: 1px;
  }
  .turn-row .tag.decisive { background: rgba(226,183,85,.16); color: #f0d79a; }
  .turn-row b { font-weight: 600; color: #fff; }

  /* line-ups */
  .lineups { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .lineup-team { font-family: var(--display); font-size: .95rem; font-weight: 700; text-transform: uppercase; margin-bottom: .35rem; }
  .lineup-label { font-size: .6rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); margin: .5rem 0 .25rem; }
  .player { display: grid; grid-template-columns: 20px 1fr auto; gap: .4rem; align-items: baseline; font-size: .79rem; padding: .1rem 0; }
  .player .num { font-family: var(--mono); font-size: .68rem; color: var(--text-faint); text-align: right; }
  .player .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .player .pos { font-size: .62rem; color: var(--text-faint); letter-spacing: .05em; }

  .sheet-meta { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .76rem; color: var(--text-faint); margin-top: 1rem; }
  .sheet-meta b { color: var(--text-dim); font-weight: 500; }

  /* team picker */
  .picker { width: min(420px, 100%); max-height: 76vh; overflow-y: auto; }
  .picker-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; padding: .9rem 1rem 1.1rem; }
  .picker-team {
    display: flex; align-items: center; gap: .5rem; text-align: left;
    padding: .5rem .6rem; border-radius: 10px; cursor: pointer;
    background: none; border: 1px solid var(--line); color: var(--text);
    font: inherit; font-size: .82rem;
    transition: background .16s, border-color .16s, transform .16s var(--ease);
  }
  .picker-team:hover { background: var(--surface-2); transform: translateY(-1px); }
  .picker-team[aria-pressed="true"] { border-color: rgba(36,201,122,.5); background: rgba(36,201,122,.12); }
  .picker-team img, .picker-team .logo { width: 22px; height: 22px; flex: none; }
  .picker-team span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .picker-clear { margin: 0 1rem 1rem; width: calc(100% - 2rem); justify-content: center; }

  /* ---------------------------------------------------------- states --- */

  .skel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); height: 88px; position: relative; overflow: hidden; }
  .skel::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.045), transparent);
    animation: sweep 1.4s infinite;
  }
  @keyframes sweep { 100% { transform: translateX(100%); } }

  .empty { text-align: center; padding: 3rem 1rem; color: var(--text-faint); border: 1px dashed var(--line); border-radius: var(--radius); }
  .empty svg { width: 30px; height: 30px; opacity: .3; margin-bottom: .55rem; }
  .empty p { margin: 0; font-size: .87rem; }
  .empty p.hint { margin-top: .32rem; font-size: .76rem; opacity: .72; max-width: 42ch; margin-inline: auto; }

  footer {
    border-top: 1px solid var(--line); padding: 1.15rem 0 2.4rem;
    font-size: .715rem; color: var(--text-faint);
    display: flex; gap: .5rem 1rem; flex-wrap: wrap; align-items: center;
  }

  /* Pushed to their own line so the disclaimer reads as a statement rather
     than trailing off the end of the kick-off note. */
  .foot-links { display: flex; gap: .9rem; margin-left: auto; }
  .foot-links a { color: var(--text-dim); text-decoration: none; }
  .foot-links a:hover { color: var(--text); text-decoration: underline; }
  .foot-links a:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 3px; }
  .foot-disclaimer { flex: 1 0 100%; line-height: 1.55; max-width: 62ch; }

  /* A cell's label is real text so assistive technology can read it, but on a
     desktop the table header already says what each column is, so it is hidden
     there rather than repeated in every cell. display:none keeps it out of the
     accessibility tree too, which is correct: the <th> is the label there. */
  .cell-label { display: none; }

  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

  /* ------------------------------------------------------ responsive --- */

  @media (max-width: 620px) {
    body { font-size: 14px; }
    .wrap { width: min(1120px, 100% - 1.4rem); }
    .brand h1 { font-size: 1.16rem; }
    .brand .sub { display: none; }
    /* .head-tools is width:100% here, so .top-inner MUST be allowed to wrap —
       without it the controls were laid over the competition title on a phone
       (Allison, ALLISON-urc-003). */
    .top-inner { flex-wrap: wrap; row-gap: .5rem; }
    .head-tools { width: 100%; justify-content: space-between; }

    /* All five tabs must be reachable without discovering that the strip
       scrolls sideways. On a 375px phone the Cards tab sat ~96px off-screen
       with no affordance, so it was effectively missing
       (Allison, ALLISON-urc-004). Wrapping shows every tab at once. */
    nav.tabs { flex-wrap: wrap; row-gap: .3rem; }
    .tab { font-size: .78rem; padding: .4rem .7rem; }
    .seg { padding: .26rem .48rem; font-size: .68rem; }
    .hero { padding: 1.15rem .95rem 1.05rem; border-radius: 18px; }
    .hero-logo { width: 56px; height: 56px; }
    .hero-name { font-size: 1rem; }
    .hero-score { font-size: 2.2rem; }
    .hero-kick { font-size: 1.4rem; }
    .hero-top .venue { white-space: normal; text-align: right; }
    .row { gap: .55rem; }
    .team-name { font-size: .86rem; }
    .score { font-size: 1.18rem; }
    .logo { width: 24px; height: 24px; }
    /* The venue used to be hidden here and the club name truncated to
       "Glasgow W...". Both are information the reader came for, so the name
       now wraps onto a second line and the venue stays, allowed to wrap. */
    .match-meta .venue { max-width: 100%; white-space: normal; text-align: right; }
    .team-name { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.22; }
    .lineups, .picker-grid { grid-template-columns: 1fr; }
    .foot-links { margin-left: 0; flex: 1 0 100%; }

    /* --- touch targets -------------------------------------------------
       Measured on a 375px screen: 140 interactive elements came in under
       44x44. The footer's legal links were 17px tall, below even the 24px
       floor WCAG 2.2 sets at AA, and the season toggle was 25px. Everything
       a finger has to hit is brought up here — by padding and min-height, so
       the type size and the look are unchanged (Allison, ALLISON-oct-007). */
    .tab { min-height: 44px; padding: .55rem .85rem; }
    .seg { min-height: 36px; padding: .5rem .75rem; }
    .foot-links { gap: .35rem 1.2rem; }
    .foot-links a { display: inline-flex; align-items: center; min-height: 44px; }
    .picker-team { min-height: 48px; }
    .btn, .filter-chip, .teambtn { min-height: 44px; }
    /* The calendar button keeps its small icon but gets a finger-sized area
       around it, which is what actually has to be 44px. */
    .cal-btn { min-width: 44px; min-height: 44px; display: inline-flex;
               align-items: center; justify-content: center; }
    .sheet-close { min-width: 44px; min-height: 44px; }
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
    .turf, .glow { animation: none !important; }
  }
