/* ============================================================
   CEEN Leagues — site styles
   Dark broadcast look: black, crimson rules, condensed caps.
   ============================================================ */
:root {
  --bg: #09090b;
  --bg2: #0f0f12;
  --panel: #15151a;
  --panel2: #1c1c23;
  --line: #2a2a33;
  --line2: #3a3a46;
  --text: #f4f4f6;
  --muted: #a8a8b3;
  --dim: #7a7a86;
  --prf: #dc143c;          /* CEEN crimson: brand + pressable */
  --prf-hi: #f0284f;
  --prf-text: #ff5574;     /* crimson for text on dark (AA) */
  --ok: #22c55e;
  --warn: #f5b301;
  --err: #f97316;
  --info: #4c9dff;
  --r: 10px;
  --r-sm: 6px;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --font-d: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.55 var(--font); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; }
img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-d); font-weight: 700; line-height: 1.08; margin: 0; letter-spacing: .005em; }
p { margin: 0 0 1em; }
code { background: rgba(255,255,255,.08); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
abbr { text-decoration: none; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--prf); color: #fff; padding: 10px 14px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }
.ic { width: 18px; height: 18px; flex: none; }

/* ---------- header ---------- */
.demo-bar { background: #2a1d00; color: #ffd76a; font-size: 13px; text-align: center; padding: 6px 16px; }
.demo-bar code { background: rgba(255,215,106,.12); }
.topbar { background: #000; border-bottom: 3px solid var(--prf); position: sticky; top: 0; z-index: 40; }
.topbar-in { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-mark { font: italic 800 28px/1 var(--font-d); background: var(--prf); color: #fff; padding: 6px 12px 5px; transform: skewX(-8deg); display: inline-block; letter-spacing: .02em; }
.brand-sub { font: 600 12px/1.15 var(--font-d); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; font: 600 16px/1 var(--font-d); text-transform: uppercase; letter-spacing: .04em; padding: 12px 10px; color: #e6e6ea; border-radius: 4px; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -3px 0 var(--prf); }
.nav .btn { margin-left: 8px; }
.icon-btn { background: none; border: 0; color: #fff; width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 8px; cursor: pointer; }
.icon-btn .ic { width: 24px; height: 24px; }
.menu-btn { display: none; }
@media (max-width: 980px) {
  .menu-btn { display: inline-grid; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: #000; border-bottom: 3px solid var(--prf); padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 8px; border-bottom: 1px solid var(--line); }
  .nav .btn { margin: 10px 0 0; justify-content: center; }
  .topbar-in { position: relative; }
}

/* ---------- ticker ---------- */
.ticker { background: var(--bg2); border-bottom: 1px solid var(--line); }
.ticker-in { display: flex; align-items: stretch; height: 40px; overflow: hidden; }
.ticker-label { background: var(--prf); color: #fff; font: 800 15px/40px var(--font-d); text-transform: uppercase; letter-spacing: .08em; padding: 0 14px; flex: none; }
.ticker-track { overflow: hidden; flex: 1; position: relative; mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.ticker-move { display: inline-flex; align-items: center; white-space: nowrap; height: 40px; animation: tick 60s linear infinite; padding-left: 16px; }
.ticker-move span[aria-hidden] { display: inline-flex; align-items: center; }
.ticker-track:hover .ticker-move, .ticker-track:focus-within .ticker-move { animation-play-state: paused; }
.ticker a { text-decoration: none; font-weight: 600; font-size: 14px; color: #e9e9ee; }
.ticker a:hover { color: #fff; text-decoration: underline; }
.dot { width: 6px; height: 6px; background: var(--prf); display: inline-block; margin: 0 18px; transform: rotate(45deg); }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-move { animation: none; } .ticker-track { overflow-x: auto; } }

/* ---------- buttons / form ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r-sm); border: 1px solid transparent; background: var(--prf); color: #fff; font: 700 16px/1 var(--font-d); text-transform: uppercase; letter-spacing: .05em; text-decoration: none; cursor: pointer; transition: background .15s, transform .1s; }
.btn:hover { background: var(--prf-hi); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 15px; }
.btn-ghost { background: transparent; border-color: var(--line2); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,.06); border-color: #555; }
.btn-quiet { background: transparent; color: var(--text); padding: 0 10px; }
.btn-quiet:hover { background: rgba(255,255,255,.06); }
.btn-danger { background: transparent; border-color: rgba(249,115,22,.5); color: #ffb07a; }
.btn-danger:hover { background: rgba(249,115,22,.12); }
.btn-ok { background: #15803d; }
.btn-ok:hover { background: #16a34a; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label, .label { font-weight: 600; font-size: 14px; }
.field .hint { color: var(--dim); font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=date], input[type=number], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; background: var(--bg2); color: var(--text); border: 1px solid var(--line2); border-radius: var(--r-sm); font: inherit;
}
textarea { min-height: 220px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--prf); outline-offset: 0; border-color: var(--prf); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--prf); }
.check { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; padding: 10px 0; cursor: pointer; }
.check input { margin-top: 2px; flex: none; }
.form-err { color: #ffb07a; font-size: 14px; margin: 0 0 12px; min-height: 0; }
.form-err:empty { display: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- sections ---------- */
.sec { margin: 36px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.sec-title { font: 800 26px/1 var(--font-d); text-transform: uppercase; letter-spacing: .02em; display: flex; align-items: center; gap: 10px; }
.sec-title::before { content: ""; width: 6px; height: 22px; background: var(--prf); transform: skewX(-12deg); }
.more { color: var(--prf-text); text-decoration: none; font: 700 15px/1 var(--font-d); text-transform: uppercase; letter-spacing: .05em; display: inline-flex; align-items: center; gap: 2px; min-height: 44px; }
.more:hover { text-decoration: underline; }
.kicker { font: 700 13px/1 var(--font-d); text-transform: uppercase; letter-spacing: .08em; color: var(--prf-text); }
.meta { color: var(--dim); font-size: 13px; }
.tag { display: inline-block; font: 800 13px/1 var(--font-d); text-transform: uppercase; letter-spacing: .08em; padding: 6px 8px 5px; border-radius: 3px; }
.tag-break { background: var(--prf); color: #fff; }
.notice { padding: 14px 16px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); margin: 16px 0; }
.notice.err { border-color: rgba(249,115,22,.5); color: #ffc49b; }
.notice.warn { border-color: rgba(245,179,1,.45); color: #ffe08a; }
.notice.ok { border-color: rgba(34,197,94,.45); color: #a6f0c2; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 40px 0; justify-content: center; }
.spinner { width: 20px; height: 20px; border: 3px solid var(--line2); border-top-color: var(--prf); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; border: 1px dashed var(--line2); border-radius: var(--r); }

/* ---------- media / art placeholder ---------- */
.media { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--panel2); }
.media img, .media video { width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; left: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%; background: var(--prf); display: grid; place-items: center; color: #fff; }
.play .ic { width: 16px; height: 16px; margin-left: 2px; }
.art { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, #17171d 0 14px, #1d1d25 14px 28px); display: flex; align-items: flex-end; padding: 14px; overflow: hidden; }
.art::after { content: ""; position: absolute; width: 28%; height: 220%; background: var(--prf); right: 18%; top: -60%; transform: rotate(22deg); opacity: .9; }
.art span { position: relative; z-index: 1; font: italic 800 20px/1 var(--font-d); text-transform: uppercase; color: rgba(255,255,255,.85); letter-spacing: .04em; }

/* ---------- crests ---------- */
.crest { --c1: #333; --c2: #fff; width: 40px; height: 40px; flex: none; display: inline-grid; place-items: center; background: var(--c1); color: var(--c2); font: 800 15px/1 var(--font-d); border-radius: 8px 8px 14px 14px; letter-spacing: .02em; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); }
.crest.sm { width: 28px; height: 28px; font-size: 12px; border-radius: 6px 6px 10px 10px; }
.crest.xs { width: 22px; height: 22px; font-size: 10px; border-radius: 5px 5px 8px 8px; }
.crest.lg { width: 96px; height: 96px; font-size: 36px; border-radius: 16px 16px 30px 30px; }

/* ---------- homepage ---------- */
.lead-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr); gap: 20px; margin-top: 24px; }
.lead { position: relative; display: block; text-decoration: none; border-radius: var(--r); overflow: hidden; background: var(--panel); min-height: 100%; }
.lead .media { aspect-ratio: 16/9; height: 100%; }
.lead-copy { position: absolute; left: 0; right: 0; bottom: 0; padding: 80px 24px 22px; background: linear-gradient(transparent, rgba(0,0,0,.85) 45%, #000); }
.lead-copy h1 { font-size: clamp(30px, 4vw, 50px); font-weight: 800; margin: 8px 0 10px; text-transform: uppercase; }
.lead-copy p { color: #d6d6dc; max-width: 62ch; margin-bottom: 8px; }
.lead-copy .tag { margin-right: 8px; }
.lead:hover h1 { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }
.top-list { background: var(--panel); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; }
.top-list .sec-title { font-size: 22px; margin-bottom: 8px; }
.top-item { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; align-items: start; }
.top-item:first-of-type { border-top: 0; }
.top-item .media { border-radius: 6px; }
.top-item h3 { font-size: 18px; margin: 4px 0; font-weight: 700; }
.top-item:hover h3 { text-decoration: underline; }
@media (max-width: 900px) {
  .lead-grid { grid-template-columns: 1fr; }
  .lead .media { aspect-ratio: 4/3; }
}
@media (max-width: 520px) { .lead .media { aspect-ratio: 3/4; } .lead-copy { padding: 60px 16px 16px; } }

.results-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.rc { scroll-snap-align: start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; text-decoration: none; display: flex; flex-direction: column; gap: 8px; border-top: 3px solid var(--prf); }
.rc:hover { border-color: var(--line2); background: var(--panel2); }
.rc-meta { font: 700 12px/1 var(--font-d); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.rc-row { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.rc-row .rc-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.rc-row b { font: 800 22px/1 var(--font-d); font-variant-numeric: tabular-nums; }
.rc-row.win { color: #fff; }
.rc-row.win .rc-name { font-weight: 700; }

.two-col { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 28px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; background: var(--panel); border-radius: var(--r); overflow: hidden; text-decoration: none; border: 1px solid transparent; transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--line2); transform: translateY(-2px); }
.card:hover h3 { text-decoration: underline; }
.card-body { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.card h3 { font-size: 21px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .card, .card:hover { transform: none; transition: none; } }

.snap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.snap { background: var(--panel); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; }
.snap-head { margin-bottom: 10px; }
.snap-head h3 { font-size: 22px; text-transform: uppercase; margin-top: 4px; }
.snap .more { margin-top: auto; align-self: flex-start; }

.cta { margin: 44px 0; background: linear-gradient(110deg, #1a0006, #3b0010 60%, var(--prf)); border-radius: var(--r); padding: 28px; display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta h2 { font-size: clamp(26px, 3vw, 36px); text-transform: uppercase; font-weight: 800; }
.cta p { margin: 6px 0 0; color: #f0d4da; max-width: 60ch; }
.cta .btn { background: #fff; color: #000; }
.cta .btn:hover { background: #f2f2f2; }
.cta .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.cta .btn-ghost:hover { background: rgba(255,255,255,.12); }
.lead .art span, .top-item .art span { display: none; }

/* ---------- fixtures ---------- */
.fx-list { display: flex; flex-direction: column; gap: 8px; }
.fx { background: var(--panel); border-radius: var(--r-sm); padding: 10px 12px; border-left: 3px solid var(--line2); }
.fx.played { border-left-color: var(--prf); }
.fx-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--dim); font: 600 12px/1.2 var(--font-d); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 8px; }
.fx-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.fx-team { display: flex; align-items: center; gap: 8px; text-decoration: none; min-width: 0; color: var(--muted); font-weight: 500; min-height: 36px; }
.fx-team span { overflow-wrap: anywhere; line-height: 1.25; }
.fx-team.home { justify-content: flex-end; text-align: right; }
.fx-team.win { color: #fff; font-weight: 700; }
.fx-team:hover span { text-decoration: underline; }
.fx:not(.played) .fx-team { color: var(--text); }
.fx-score { font: 800 22px/1 var(--font-d); background: #000; padding: 7px 10px; border-radius: 4px; min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
.fx-score i { font-style: normal; color: var(--dim); margin: 0 4px; }
.fx-score.vs { font-size: 15px; color: var(--muted); text-transform: uppercase; }
.round-head { font: 700 15px/1 var(--font-d); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 22px 0 10px; display: flex; gap: 10px; align-items: center; }
.round-head b { color: #fff; }
.round-head .pill { margin-left: auto; }
.pill { font: 700 12px/1 var(--font-d); text-transform: uppercase; letter-spacing: .07em; padding: 5px 8px; border-radius: 99px; background: var(--panel2); color: var(--muted); }
.pill.live { background: var(--prf); color: #fff; }

/* ---------- league table ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-sm); }
table.league { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 15px; }
table.league th { font: 700 13px/1 var(--font-d); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 10px 8px; text-align: center; border-bottom: 2px solid var(--prf); background: #000; }
table.league td { padding: 8px; text-align: center; border-bottom: 1px solid var(--line); }
table.league tbody tr:nth-child(odd) { background: rgba(255,255,255,.02); }
table.league tbody tr:hover { background: rgba(255,255,255,.05); }
table.league tr.me { background: rgba(220,20,60,.14) !important; }
table.league .tl { text-align: left; }
table.league .pos { width: 40px; color: var(--muted); font-weight: 700; }
table.league tbody tr:nth-child(1) .pos { color: #fff; box-shadow: inset 3px 0 0 var(--prf); }
table.league .pts { font-weight: 800; color: #fff; font-size: 16px; }
.team-cell { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; min-height: 36px; }
.team-cell span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.team-cell:hover span { text-decoration: underline; }
.form { display: inline-flex; gap: 3px; }
.form i { font: 800 11px/20px var(--font-d); font-style: normal; width: 20px; height: 20px; border-radius: 3px; display: inline-block; }
.form .fw { background: #15803d; color: #fff; }
.form .fl { background: #3a3a46; color: #ddd; }
.empty-row { color: var(--muted); padding: 24px !important; }
@media (max-width: 640px) { .form-col { display: none; } .team-cell span { max-width: 150px; } }

/* ---------- tabs / chips ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; margin-bottom: 18px; }
.tabs button, .tabs a { background: none; border: 0; color: var(--muted); font: 700 17px/1 var(--font-d); text-transform: uppercase; letter-spacing: .05em; padding: 14px 14px 12px; min-height: 48px; cursor: pointer; text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button:hover, .tabs a:hover { color: #fff; }
.tabs [aria-selected="true"], .tabs [aria-current="page"] { color: #fff; border-bottom-color: var(--prf); }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 3px; gap: 2px; }
.seg button { background: none; border: 0; color: var(--muted); padding: 0 16px; min-height: 40px; border-radius: 99px; font: 700 15px/1 var(--font-d); text-transform: uppercase; letter-spacing: .05em; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--prf); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--panel); border: 1px solid var(--line2); color: var(--text); border-radius: 99px; padding: 0 14px; min-height: 40px; font: 600 14px/1 var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"] { background: var(--prf); border-color: var(--prf); color: #fff; }

/* ---------- page heads ---------- */
.page-head { padding: 28px 0 12px; display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; }
.page-head h1 { font-size: clamp(34px, 5vw, 56px); text-transform: uppercase; font-weight: 800; }
.page-head p { color: var(--muted); margin: 6px 0 0; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 14px; margin-top: 10px; }
.facts span { display: inline-flex; align-items: center; gap: 6px; }
.league-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 28px; align-items: start; }
@media (max-width: 960px) { .league-layout { grid-template-columns: 1fr; } }
.legend { color: var(--dim); font-size: 13px; margin-top: 10px; }

/* ---------- article ---------- */
.article { max-width: 820px; margin: 0 auto; padding: 28px 0; }
.article h1 { font-size: clamp(34px, 5vw, 58px); font-weight: 800; text-transform: uppercase; margin: 10px 0 14px; }
.article .standfirst { font-size: 20px; color: #dcdce2; line-height: 1.5; }
.article .byline { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 14px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 18px 0 22px; }
.article .hero { aspect-ratio: 16/9; position: relative; border-radius: var(--r); overflow: hidden; background: var(--panel2); margin-bottom: 26px; }
.article .hero img, .article .hero video, .article .hero iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.article .body p { font-size: 18px; line-height: 1.75; color: #e7e7ec; margin-bottom: 1.2em; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; min-height: 44px; }
.back:hover { color: #fff; }

/* ---------- team page ---------- */
.team-hero { display: flex; gap: 22px; align-items: center; padding: 30px 0 22px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.team-hero h1 { font-size: clamp(34px, 5vw, 56px); text-transform: uppercase; font-weight: 800; }
.stat-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.stat { background: var(--panel); border-radius: var(--r-sm); padding: 10px 14px; min-width: 86px; }
.stat b { display: block; font: 800 28px/1 var(--font-d); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; list-style: none; padding: 0; margin: 0; }
.roster li { background: var(--panel); border-radius: var(--r-sm); padding: 12px 14px; display: flex; align-items: center; gap: 10px; font-weight: 600; }
.roster li::before { content: ""; width: 8px; height: 8px; background: var(--prf); transform: rotate(45deg); flex: none; }

/* ---------- auth / portal ---------- */
.auth { max-width: 520px; margin: 32px auto; background: var(--panel); border-radius: var(--r); padding: 26px; border-top: 4px solid var(--prf); }
.auth h1 { font-size: 38px; text-transform: uppercase; font-weight: 800; margin-bottom: 6px; }
.auth .lede { color: var(--muted); margin-bottom: 20px; }
.demo-accts { display: grid; gap: 8px; margin: 8px 0 20px; }
.demo-accts button { text-align: left; background: var(--bg2); border: 1px solid var(--line2); color: var(--text); border-radius: var(--r-sm); padding: 12px 14px; cursor: pointer; font: inherit; min-height: 44px; }
.demo-accts button:hover { border-color: var(--prf); }
.demo-accts b { display: block; font-family: var(--font-d); font-size: 18px; text-transform: uppercase; }
.demo-accts span { color: var(--muted); font-size: 13px; }
.portal-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 26px 0 8px; }
.portal-head h1 { font-size: clamp(30px, 4vw, 44px); text-transform: uppercase; font-weight: 800; }
.role-badge { background: var(--prf); color: #fff; font: 700 13px/1 var(--font-d); text-transform: uppercase; letter-spacing: .07em; padding: 6px 9px; border-radius: 4px; vertical-align: middle; margin-left: 8px; }
.panel { background: var(--panel); border-radius: var(--r); padding: 18px; margin-bottom: 16px; border: 1px solid var(--line); }
.panel h2 { font-size: 26px; text-transform: uppercase; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel h3 { font-size: 20px; text-transform: uppercase; margin-bottom: 8px; }
.panel-sub { color: var(--muted); margin-top: -6px; margin-bottom: 14px; }
.badge { font: 700 12px/1 var(--font-d); text-transform: uppercase; letter-spacing: .07em; padding: 5px 8px; border-radius: 4px; display: inline-block; }
.b-pending, .b-review { background: rgba(245,179,1,.15); color: #ffd76a; }
.b-approved, .b-published, .b-active { background: rgba(34,197,94,.15); color: #8ef0b4; }
.b-draft, .b-scheduled { background: var(--panel2); color: var(--muted); }
.b-rejected, .b-inactive { background: rgba(249,115,22,.15); color: #ffb07a; }
.b-played { background: rgba(220,20,60,.18); color: #ff9aae; }
.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.row:first-child { border-top: 0; }
.row-main { flex: 1; min-width: 200px; }
.row-main b { display: block; }
.row-main .meta { display: block; margin-top: 2px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; list-style: none; padding: 0; }
.tag-list li { background: var(--bg2); border: 1px solid var(--line2); border-radius: 99px; padding: 4px 4px 4px 14px; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; }
.tag-list button { background: none; border: 0; color: var(--muted); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.tag-list button:hover { background: rgba(249,115,22,.2); color: #fff; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input { flex: 1; min-width: 180px; }
.counter { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; }
.media-preview { border-radius: var(--r-sm); overflow: hidden; max-width: 420px; margin-top: 10px; position: relative; aspect-ratio: 16/9; background: var(--bg2); }
.media-preview img, .media-preview video, .media-preview iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; background: var(--prf); width: 0; transition: width .2s; }
.radio-row { display: flex; gap: 6px 18px; flex-wrap: wrap; margin-bottom: 8px; }
.radio-row label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.score-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: end; }
.score-grid .vs { padding-bottom: 14px; color: var(--muted); font: 700 18px var(--font-d); }
.lineup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 4px 12px; margin-bottom: 8px; }
.lineup-grid .check { padding: 8px 0; min-height: 40px; }
.discord-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.discord-box p { margin: 0; flex: 1; min-width: 220px; color: var(--muted); }
.temp-pass { font: 700 18px var(--font); letter-spacing: .04em; background: #000; padding: 10px 12px; border-radius: 6px; display: inline-block; }

/* ---------- dialog ---------- */
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line2); border-radius: var(--r); padding: 0; width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0,0,0,.7); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 10px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); }
.dlg-head h2 { font-size: 24px; text-transform: uppercase; }
.dlg-body { padding: 18px 20px; }
.dlg-foot { padding: 12px 20px 18px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- toasts ---------- */
#toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 32px)); }
.toast { background: #000; border: 1px solid var(--line2); border-left: 4px solid var(--ok); padding: 12px 14px; border-radius: 8px; box-shadow: var(--shadow); font-weight: 500; animation: up .2s ease-out; }
.toast.err { border-left-color: var(--err); }
@keyframes up { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* ---------- footer ---------- */
footer { background: #000; border-top: 3px solid var(--prf); margin-top: 48px; }
.foot-in { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; padding: 32px 16px; }
.foot-in p { color: var(--muted); margin-top: 14px; max-width: 42ch; }
.foot-in h2 { font-size: 16px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.foot-in nav { display: flex; flex-direction: column; }
.foot-in nav a { text-decoration: none; padding: 8px 0; min-height: 40px; }
.foot-in nav a:hover { text-decoration: underline; }
.foot-base { color: var(--dim); font-size: 13px; padding: 14px 16px 24px; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr; } }
@media (min-width: 961px) { .league-layout > section:first-child { position: sticky; top: 84px; } }
/* Grid children must be allowed to shrink, so wide tables scroll inside their box instead of being clipped */
.league-layout > *, .two-col > *, .lead-grid > *, .snap-grid > * { min-width: 0; }
@media (max-width: 640px) {
  table.league th, table.league td { padding-left: 5px; padding-right: 5px; }
  table.league .pos { width: 28px; }
  .team-cell { gap: 8px; }
  .team-cell span { max-width: 130px; }
}
