/* World Cup 2026 Sweepstakes — main.css
   Editorial Command-Center aesthetic (dark, dense, Bebas Neue / DM Sans / JetBrains Mono).
   Mirrors admin.html design language. */

/* ── FWC 2026 Official Tournament Font ─────────────────────────── */
@font-face {
    font-family: 'FWC 2026';
    src: url('/static/fonts/FWC2026-NormalBlack.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* ── Design tokens ──────────────────────────────────────────────── */
:root {
    /* Backgrounds */
    --pub-bg:        #0a0e1a;
    --pub-surface:   #161a2b;
    --pub-border:    #262b40;

    /* Accent */
    --pub-gold:      #D4A537;
    --pub-amber:     #f59e0b;
    --pub-green:     #10b981;
    --pub-grey:      #64748b;
    --brand-green:   #1F7A52;

    /* Text */
    --pub-text:      #e8eaf0;
    --pub-muted:     #8892a4;
    --pub-dim:       #7a86a0;   /* was #4a5568 — brightened for daylight phone legibility */

    /* Hover */
    --pub-cell-hover: rgba(245,158,11,0.08);

    /* Fonts */
    --ff-display:   'Bebas Neue', sans-serif;
    --ff-body:      'DM Sans', system-ui, sans-serif;
    --ff-mono:      'JetBrains Mono', 'Courier New', monospace;
    --ff-fwc:       'FWC 2026', 'Bebas Neue', sans-serif;  /* official tournament face */

    /* Legacy aliases (admin.html uses these via .site-header) */
    --bg-dark:       #0a0e1a;
    --bg-card:       #161a2b;
    --border-color:  #262b40;
    --primary-gold:  #D4A537;
    --text-primary:  #e8eaf0;
    --text-secondary:#8892a4;
    --text-muted:    #4a5568;
}

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--ff-body);
    background: var(--pub-bg);
    color: var(--pub-text);
    min-height: 100vh;
    line-height: 1.55;
    font-size: 0.9rem;
}

/* ── Scrollbar ──────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--pub-bg); }
::-webkit-scrollbar-thumb { background: var(--pub-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--pub-grey); }

/* ── Site Header ────────────────────────────────────────────────── */
.site-header {
    background: var(--pub-surface);
    border-bottom: 1px solid var(--pub-border);
    padding: 0.65rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header-brand {
    text-decoration: none;
}

.site-title {
    font-family: 'FWC 2026', var(--ff-display);
    font-size: 1.2rem;
    letter-spacing: 0.06em;
    color: var(--pub-text);
    text-transform: uppercase;
    line-height: 1;
    display: inline-block;
    border-bottom: 2px solid var(--pub-gold);
    padding-bottom: 0.15em;
}

.site-nav {
    display: flex;
    gap: 1.5rem;
}

.site-nav a {
    font-family: var(--ff-body);
    color: var(--pub-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color .15s;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--pub-text); }
.site-nav a.active { color: var(--pub-text); border-bottom-color: var(--pub-gold); }

/* ── Container ──────────────────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer {
    background: var(--pub-surface);
    border-top: 1px solid var(--pub-border);
    color: var(--pub-muted);
    padding: 0.85rem 1.5rem;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pub-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
}

.pub-footer-brand {
    font-family: 'FWC 2026', var(--ff-display);
    color: var(--pub-gold);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
}

.pub-footer-sep {
    color: var(--pub-dim);
}

.pub-footer-text {
    color: var(--pub-muted);
}

/* ── Live dot (pulsing amber) ───────────────────────────────────── */
.live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pub-amber);
    animation: pulse-dot 2s ease-in-out infinite;
    vertical-align: middle;
    margin-right: 4px;
}
.live-dot-sm { width: 6px; height: 6px; }

#footer-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--pub-amber);
    font-size: 0.72rem;
    font-family: var(--ff-display);
    letter-spacing: 0.05em;
}

@keyframes pulse-dot {
    0%,100% { opacity:1; transform:scale(1); }
    50%      { opacity:.4; transform:scale(0.8); }
}

/* ── Live match banner ──────────────────────────────────────────── */
.live-banner {
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: 3px;
    padding: 0.55rem 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--pub-amber);
    font-size: 0.82rem;
    font-weight: 500;
}
.live-banner-text {
    font-family: var(--ff-display);
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}

/* ── Hero (index page) ──────────────────────────────────────────── */
.pub-hero {
    padding: 2rem 0 1.5rem;
    border-bottom: 1px solid var(--pub-border);
    margin-bottom: 1.75rem;
}

.pub-hero-title {
    font-family: 'FWC 2026', var(--ff-display);
    font-size: 3rem;
    letter-spacing: 0.06em;
    color: var(--pub-text);
    line-height: 1;
}

.pub-hero-sub {
    color: var(--pub-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    max-width: 640px;
}

/* ── Page header (inner pages) ──────────────────────────────────── */
.pub-page-header {
    padding: 1.25rem 0 0.9rem;
    border-bottom: 1px solid var(--pub-border);
    margin-bottom: 1.5rem;
}

.pub-page-title {
    font-family: 'FWC 2026', var(--ff-display);
    font-size: 2.4rem;
    letter-spacing: 0.06em;
    color: var(--pub-text);
    line-height: 1;
}

.pub-page-sub {
    color: var(--pub-muted);
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

/* ── Section label ──────────────────────────────────────────────── */
.pub-section-label {
    display: block;
    font-family: var(--ff-display);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    color: var(--pub-muted);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.pub-section { margin-top: 2rem; }

/* ── Tables (shared) ────────────────────────────────────────────── */
.pub-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--pub-border);
    border-radius: 3px;
    background: var(--pub-surface);
}

.pub-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.pub-table th {
    text-align: left;
    color: var(--pub-muted);
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--pub-border);
    font-family: var(--ff-display);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 400;
    white-space: nowrap;
}

.pub-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(38,43,64,0.6);
    color: var(--pub-muted);
    vertical-align: middle;
}

.pub-table tbody tr:last-child td { border-bottom: none; }
.pub-table tbody tr:hover { background: var(--pub-cell-hover); }

.pub-table-row-link { cursor: pointer; }

/* ── Shared cell types ──────────────────────────────────────────── */
.pub-name-cell {
    font-weight: 600;
    color: var(--pub-text);
}

.pub-player-link {
    color: var(--pub-text);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color .15s;
}
.pub-player-link:hover { color: var(--pub-gold); text-decoration: underline; }

.pub-row-link {
    color: var(--pub-muted);
    text-decoration: none;
    font-family: var(--ff-mono);
    font-size: 0.75rem;
    transition: color .15s;
}
.pub-row-link:hover { color: var(--pub-amber); }

.num-right  { text-align: right; }
.num-center { text-align: center; }

.mono-cell {
    font-family: var(--ff-mono);
    font-size: 0.8rem;
}

/* ── Badges ─────────────────────────────────────────────────────── */
.pub-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1rem 0.45rem;
    border-radius: 2px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--ff-display);
    white-space: nowrap;
}

.pub-badge-green    { background: rgba(16,185,129,.15);  color: var(--pub-green); }
.pub-badge-grey     { background: rgba(100,116,139,.12); color: var(--pub-grey); }
.pub-badge-amber    { background: rgba(245,158,11,.15);  color: var(--pub-amber); }
.pub-badge-final    { background: rgba(16,185,129,.15);  color: var(--pub-green); }
.pub-badge-scheduled { background: rgba(100,116,139,.12); color: var(--pub-grey); }
.pub-badge-tier     { background: rgba(245,158,11,.12);  color: var(--pub-amber); }
.pub-badge-active   { background: rgba(16,185,129,.12);  color: var(--pub-green); }
.pub-badge-inactive { background: rgba(100,116,139,.12); color: var(--pub-grey); }
.pub-badge-live {
    background: rgba(245,158,11,.2);
    color: var(--pub-amber);
}

/* ── Empty state ────────────────────────────────────────────────── */
.pub-empty {
    padding: 2.5rem 1.5rem;
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: 3px;
    text-align: center;
}

.pub-empty-label {
    display: block;
    font-family: var(--ff-display);
    font-size: 1.4rem;
    letter-spacing: 0.06em;
    color: var(--pub-muted);
    margin-bottom: 0.5rem;
}

.pub-empty p {
    color: var(--pub-dim);
    font-size: 0.85rem;
}

/* ── Leaderboard (group.html) ───────────────────────────────────── */
.leaderboard-table .lb-pos-cell {
    font-family: var(--ff-mono);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--pub-muted);
    text-align: right;
    width: 3rem;
}

.leaderboard-table .rank-1 .lb-pos-cell { color: #f59e0b; }
.leaderboard-table .rank-2 .lb-pos-cell { color: #94a3b8; }
.leaderboard-table .rank-3 .lb-pos-cell { color: #cd7f32; }

.leaderboard-table .lb-pts-cell {
    font-family: var(--ff-mono);
    font-size: 1rem;
    font-weight: 600;
    color: var(--pub-text);
    text-align: right;
    white-space: nowrap;   /* points + chevron stay on one line — the chevron
                              must never wrap under and push the number down */
}

.leaderboard-table .lb-row { cursor: pointer; }

.lb-teams-cell { white-space: nowrap; }

.team-code {
    display: inline-block;
    font-family: var(--ff-display);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--pub-muted);
    background: rgba(38,43,64,0.6);
    border: 1px solid var(--pub-border);
    border-radius: 2px;
    padding: 0.05rem 0.35rem;
    margin-right: 0.2rem;
}

.lb-players-cell {
    font-size: 0.78rem;
    color: var(--pub-muted);
}

/* Expandable breakdown row */
.breakdown-row { display: none; }
.breakdown-row.open { display: table-row; }

.breakdown-cell {
    background: var(--pub-bg);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--pub-border);
}

.breakdown-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.bd-stat {
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: 2px;
    padding: 0.5rem 0.85rem;
    text-align: center;
    min-width: 80px;
}

.bd-val {
    font-family: var(--ff-mono);
    font-size: 1rem;
    font-weight: 600;
    color: var(--pub-text);
}

.bd-lbl {
    font-family: var(--ff-display);
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--pub-muted);
    margin-top: 0.2rem;
}

.pub-live-ticker {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    font-size: 0.72rem;
    color: var(--pub-amber);
    font-family: var(--ff-display);
    letter-spacing: 0.05em;
}

/* ── Fixtures (fixtures.html) ───────────────────────────────────── */
.date-group { margin-bottom: 1.75rem; }

.date-heading {
    font-family: var(--ff-display);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pub-muted);
    margin-bottom: 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--pub-border);
}

/* ── Broadcaster lower-third fixture cards ─── */
.fixture-cards { display: flex; flex-direction: column; gap: 0.5rem; }

.fixture-card {
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: 3px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    transition: background .12s;
}
.fixture-card.fixture-live { border-color: rgba(245,158,11,0.35); background: rgba(245,158,11,0.03); }
.fixture-card:hover { background: var(--pub-cell-hover); }

.fix-time-col {
    width: 4rem;
    min-width: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ff-mono);
    font-size: 0.72rem;
    color: var(--pub-dim);
    padding: 0.5rem 0.25rem;
    border-right: 1px solid var(--pub-border);
    flex-shrink: 0;
}

.fix-teams-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.fix-team-row {
    display: flex;
    align-items: center;
    padding: 0.32rem 0.75rem;
    gap: 0.5rem;
}

.fix-team-row + .fix-team-row {
    border-top: 1px solid rgba(38,43,64,0.7);
}

.fix-code {
    font-family: var(--ff-display);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--pub-muted);
    width: 2.8rem;
    flex-shrink: 0;
}

.fix-name {
    flex: 1;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--pub-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fix-score-num {
    font-family: var(--ff-mono);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--pub-text);
    text-align: right;
    width: 1.6rem;
    flex-shrink: 0;
}

.fix-score-num.empty { color: var(--pub-dim); font-size: 0.85rem; }

.fix-status-col {
    width: 5rem;
    min-width: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.5rem;
    border-left: 1px solid var(--pub-border);
    flex-shrink: 0;
}

/* ── Players table (players.html) ───────────────────────────────── */
.players-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color .12s;
}
.players-table th.sortable:hover { color: var(--pub-text); }
.players-table th.sortable.active { color: var(--pub-text); }

/* Pool Players tab: shrink-to-fit every column except Owner (4th), which
   absorbs the slack — stops Player/Team ballooning on wide screens. */
.pool-players-table th,
.pool-players-table td { white-space: nowrap; }
.pool-players-table th:not(:nth-child(4)),
.pool-players-table td:not(:nth-child(4)) { width: 1%; }
.pool-players-table td:nth-child(2) { padding-right: 1.5rem; }

.sort-ind { font-size: 0.65em; opacity: 0.7; }
.sortable.active .sort-ind { opacity: 1; }

.tier-badge {
    display: inline-block;
    background: rgba(245,158,11,.12);
    color: var(--pub-amber);
    border: 1px solid rgba(245,158,11,.2);
    border-radius: 2px;
    font-family: var(--ff-mono);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.05rem 0.4rem;
    text-align: center;
}

.tier-badge-1 {
    background: rgba(212,165,55,.18);
    color: var(--pub-gold);
    border-color: rgba(212,165,55,.35);
}

/* Filter bar */
.pub-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.pub-filter-input {
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: 3px;
    color: var(--pub-text);
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
    font-family: var(--ff-body);
    outline: none;
    width: 220px;
    transition: border-color .15s;
}
.pub-filter-input:focus { border-color: var(--pub-amber); }
.pub-filter-input::placeholder { color: var(--pub-dim); }

.pub-filter-count {
    font-family: var(--ff-mono);
    font-size: 0.72rem;
    color: var(--pub-muted);
}

/* ── Player detail (player.html) ────────────────────────────────── */
.player-profile {
    display: flex;
    gap: 2rem;
    padding: 1.5rem 0 1.5rem;
    border-bottom: 1px solid var(--pub-border);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.player-profile-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    flex: 0 0 auto;
}

.player-headshot {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid var(--pub-border);
}

.player-headshot-placeholder {
    width: 110px;
    height: 110px;
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-initials {
    font-family: var(--ff-display);
    font-size: 2.4rem;
    letter-spacing: 0.06em;
    color: var(--pub-muted);
}

.player-meta-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.player-team-label {
    font-family: var(--ff-display);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    color: var(--pub-muted);
    text-transform: uppercase;
}

.player-profile-right {
    flex: 1;
    min-width: 0;
}

.player-profile-name {
    font-family: 'FWC 2026', var(--ff-display);
    font-size: 2.8rem;
    letter-spacing: 0.04em;
    color: var(--pub-text);
    line-height: 1;
    margin-bottom: 1rem;
}

.player-stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.player-stat {
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: 2px;
    padding: 0.6rem 0.9rem;
    text-align: center;
    min-width: 80px;
}

.player-stat-val {
    font-family: var(--ff-mono);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--pub-text);
}

.player-stat-lbl {
    font-family: var(--ff-display);
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--pub-muted);
    margin-top: 0.2rem;
}

/* ── Breakdown icons ────────────────────────────────────────────── */
.bd-icon {
    display: block;
    height: 18px;
    width: auto;
    margin: 0 auto 0.2rem;
    filter: brightness(0) invert(0.55);
}

/* ── Stagger animations ─────────────────────────────────────────── */
@keyframes row-enter {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lb-row {
    opacity: 0;
    animation: row-enter 0.25s ease forwards;
    animation-delay: calc(var(--row-i, 0) * 30ms);
}

.group-card-anim {
    opacity: 0;
    animation: row-enter 0.25s ease forwards;
    animation-delay: calc(var(--card-i, 0) * 40ms);
}

.date-group {
    margin-bottom: 1.75rem;
    opacity: 0;
    animation: row-enter 0.3s ease forwards;
    animation-delay: calc(var(--group-i, 0) * 60ms);
}

/* ── Prize allocations card (Final Standings) ───────────────────── */
.prize-allocations-card {
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: 3px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.prize-allocations-card .pub-section-label {
    color: var(--brand-green);
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
}

/* ── Team flag images (shared) ──────────────────────────────────── */
.team-flag-sm {
    width: 22px;
    height: 15px;
    object-fit: contain;
    border: 1px solid rgba(38,43,64,0.6);
    border-radius: 1px;
    vertical-align: middle;
    margin-right: 0.35rem;
    flex-shrink: 0;
}

.players-team-cell {
    white-space: nowrap;
}
/* Bold + dark like the player name signals the link; everything else in the
   row stays grey. No box, normal table-cell so the gridline stays consistent. */
.players-team-link {
    color: var(--pub-text);
    font-weight: 600;
    text-decoration: none;
    transition: color .12s;
}
.players-team-link:hover { color: var(--pub-gold); }
.players-owner-cell { color: var(--pub-muted); }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .container { padding: 1rem 0.75rem 2rem; }
    .pub-hero-title { font-size: 2.2rem; }
    .pub-page-title { font-size: 1.8rem; }
    .site-nav { gap: 1rem; }
    .player-profile { flex-direction: column; }
    .player-profile-left { flex-direction: row; align-items: flex-start; }
    .player-meta-stack { align-items: flex-start; }
}

@media (max-width: 600px) {
    /* (legacy 5-col "hide Players column" rule removed 2026-06-06 — in the
       4-col layout nth-child(4) was hiding the PTS header on every phone) */

    /* Fixtures: ensure status badge stays aligned */
    .fixture-card { position: relative; }
    .fix-name { font-size: 0.78rem; }
    .fix-time-col { width: 3.2rem; min-width: 3.2rem; font-size: 0.65rem; }
    .fix-status-col { width: 4rem; min-width: 4rem; }
}

@media (max-width: 480px) {
    .site-title { font-size: 0.9rem; }
    .site-nav a { font-size: 0.8rem; }
    .pub-hero-title { font-size: 1.8rem; }
    .player-profile-name { font-size: 2rem; }
}

/* ══════════════════════════════════════════════════════════
   PER-POOL TABS (Leaderboard / Fixtures / Players / Groups)
   ══════════════════════════════════════════════════════════ */
.pool-tabs {
    display: flex; gap: 0.25rem; margin: -0.5rem 0 1.5rem;
    border-bottom: 1px solid var(--pub-border);
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.pool-tab {
    flex: 0 0 auto; padding: 0.55rem 1rem; text-decoration: none;
    color: var(--pub-muted); font-family: var(--ff-display);
    letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.82rem;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
}
.pool-tab:hover { color: var(--pub-text); }
.pool-tab.active { color: #D4A537; border-bottom-color: #D4A537; }

/* ── Pool fixtures (with owners + attackers in play) ── */
.pf-card {
    background: var(--pub-surface); border: 1px solid var(--pub-border);
    border-radius: 6px; padding: 0.7rem 0.9rem; margin-bottom: 0.6rem;
}
.pf-card.pf-live { border-color: rgba(245,158,11,.5); }
.pf-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.pf-time { font-family: var(--ff-mono); font-size: 0.8rem; color: var(--pub-muted); }
.pf-match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0; }
.pf-team { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.pf-team--home { justify-content: flex-end; text-align: right; padding-right: 0.6rem; }
.pf-team--away { justify-content: flex-start; text-align: left; padding-left: 0.6rem; }
.pf-team-av { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; background: #0c1120; border: 1px solid var(--pub-border); display: inline-flex; }
.pf-team-av img { width: 100%; height: 100%; object-fit: cover; }
.pf-team-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pf-team--away .pf-team-info { align-items: flex-start; }
.pf-team--home .pf-team-info { align-items: flex-end; }
.pf-team-name { font-weight: 600; color: var(--pub-text); font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pf-owner-chip {
    display: inline-block; font-size: 0.66rem; font-weight: 600;
    color: #cdd6e3; background: rgba(31,122,82,.18); border: 1px solid rgba(31,122,82,.4);
    border-radius: 3px; padding: 0.02rem 0.35rem; white-space: nowrap;
}
.pf-score { font-family: var(--ff-mono); font-size: 1.05rem; font-weight: 700; color: var(--pub-text); flex: 0 0 auto; }
.pf-score.empty { color: var(--pub-muted); }
.pf-vs { font-size: 0.7rem; color: var(--pub-muted); font-weight: 700; flex: 0 0 auto; }
.pf-stakes {
    display: flex; align-items: center; gap: 0.4rem 0.5rem; flex-wrap: wrap;
    margin-top: 0.55rem; padding-top: 0.5rem; border-top: 1px solid rgba(38,43,64,.6);
}
.pf-stakes-lbl { font-family: var(--ff-display); font-size: 0.65rem; letter-spacing: .08em; text-transform: uppercase; color: var(--pub-dim, #6b748c); }
.pf-stake { font-size: 0.78rem; color: var(--pub-text); }
.pf-stake a { color: var(--pub-text); text-decoration: none; font-weight: 600; }
.pf-stake a:hover { color: #D4A537; }
.pf-stake em { font-style: normal; color: var(--pub-muted); font-size: 0.72rem; }
.pf-stake em::before { content: '· '; }

/* Mobile: each side keeps its strict mirror-justification toward the centre
   "v" — names WRAP (two lines) instead of ellipsizing away, and the wrapped
   text stays right-aligned on the home side / left-aligned on the away side. */
@media (max-width: 600px) {
    .pf-card { padding: 0.65rem 0.7rem; }
    .pf-team--home { padding-right: 0.45rem; }
    .pf-team--away { padding-left: 0.45rem; }
    .pf-team { gap: 0.4rem; }
    .pf-team-av { width: 22px; height: 22px; }
    .pf-team-name {
        white-space: normal;          /* wrap, don't vanish into an ellipsis */
        overflow: visible;
        text-overflow: clip;
        font-size: 0.82rem;
        line-height: 1.2;
    }
    .pf-team--home .pf-team-name { text-align: right; }
    .pf-team--away .pf-team-name { text-align: left; }
    .pf-score { font-size: 0.95rem; }
}

/* ── Pool groups (WC A-L ownership board) ── */
.grp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.9rem; }
.grp-card {
    background: var(--pub-surface); border: 1px solid var(--pub-border);
    border-radius: 8px; padding: 0.85rem 0.95rem;
    animation: grpFade .4s ease both; animation-delay: calc(var(--card-i, 0) * 0.04s);
}
@keyframes grpFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.grp-head h4 {
    margin: 0 0 0.6rem; font-family: var(--ff-display); letter-spacing: .06em;
    text-transform: uppercase; font-size: 0.95rem; color: #D4A537;
    border-bottom: 1px solid var(--pub-border); padding-bottom: 0.45rem;
}
.grp-team { display: flex; align-items: center; gap: 0.55rem; padding: 0.32rem 0; }
.grp-team-av { width: 24px; height: 24px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; background: #0c1120; border: 1px solid var(--pub-border); display: inline-flex; }
.grp-team-av img { width: 100%; height: 100%; object-fit: cover; }
.grp-team-main { display: flex; flex-direction: column; gap: 1px; flex: 1 1 0; min-width: 0; }
.grp-team-name { font-weight: 600; color: var(--pub-text); font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grp-team-tag { font-size: 0.62rem; letter-spacing: .04em; text-transform: uppercase; font-weight: 700; }
.grp-team-tag.fav { color: #e8893c; }
.grp-team-tag.und { color: #1F7A52; }
.grp-owner { font-size: 0.75rem; color: #cdd6e3; font-weight: 600; flex: 0 0 auto; white-space: nowrap; }
.grp-attackers { margin-top: 0.6rem; padding-top: 0.55rem; border-top: 1px solid rgba(38,43,64,.6); }
.grp-sub-lbl { font-family: var(--ff-display); font-size: 0.63rem; letter-spacing: .08em; text-transform: uppercase; color: var(--pub-dim, #6b748c); margin-bottom: 0.35rem; }
.grp-att { display: flex; align-items: center; gap: 0.5rem; padding: 0.2rem 0; font-size: 0.8rem; }
.grp-att-name { color: var(--pub-text); text-decoration: none; font-weight: 600; }
.grp-att-name:hover { color: #D4A537; }
.grp-att-team { color: var(--pub-muted); font-size: 0.72rem; flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Group standings table (Groups tab) ── */
.grp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.grp-head h4 { margin: 0; }
.grp-final-badge { font-size: 0.6rem; color: #10b981; font-family: var(--ff-display); letter-spacing: .05em; text-transform: uppercase; }
.grp-standings { width: 100%; border-collapse: collapse; font-size: 0.7rem; margin-bottom: 0; }
.grp-standings th {
    color: var(--pub-dim, #6b748c); padding: 0.22rem 0.3rem;
    text-align: right; font-family: var(--ff-display); font-size: 0.6rem;
    letter-spacing: .05em; border-bottom: 1px solid var(--pub-border); font-weight: 400;
}
.grp-standings th.grp-st-team { text-align: left; }
.grp-standings td { padding: 0.25rem 0.3rem; text-align: right; border-bottom: 1px solid rgba(38,43,64,.35); vertical-align: middle; }
.grp-standings tbody tr:last-child td { border-bottom: none; }
/* Qualification separator: bottom border on the 2nd row */
.grp-standings tr.grp-qualify-last td { border-bottom: 1px solid rgba(212,165,55,.35); }
/* Dim non-qualifying rows slightly */
.grp-standings tbody tr:not(.grp-qualify) { opacity: 0.72; }
.grp-st-gd { font-variant-numeric: tabular-nums; }
.grp-standings td strong { color: var(--pub-text); }
/* Team cell */
.grp-st-team-cell { text-align: left !important; display: flex; align-items: center; gap: 0.4rem; }
.grp-st-team-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 0; }
.grp-st-name-row { display: flex; align-items: baseline; gap: 0.3rem; min-width: 0; }
.grp-st-name-row .grp-team-name { font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80px; }
.grp-st-name-row .grp-team-tag { font-size: 0.55rem; }
.grp-st-owner { font-size: 0.66rem; color: #9aa4ba; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Card padding adjustment — remove default card padding so table goes edge-to-edge */
.grp-card { padding: 0; }
.grp-card .grp-head { padding: 0.65rem 0.8rem 0.45rem; border-bottom: 1px solid var(--pub-border); margin-bottom: 0; }
.grp-card .grp-attackers { margin: 0; padding: 0.5rem 0.75rem; }

/* ── Keyboard focus visibility (one rule, site-wide) ─────────────────── */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible,
input:focus-visible, select:focus-visible {
    outline: 2px solid var(--pub-gold, #D4A537);
    outline-offset: 2px;
}

/* ── Header brand icon (official FWC 26 mark, left of the title) ──────── */
.site-header-brand { display: inline-flex; align-items: center; gap: .55rem; }
.site-brand-icon { width: 23px; height: 35px; object-fit: contain; flex: 0 0 auto; }
/* The FWC face sits high in its em-box and the gold underline adds height
   below — nudge the title down so it reads optically centred on the mark. */
.site-header-brand .site-title { transform: translateY(2px); }
@media (max-width: 600px) {
    .site-brand-icon { width: 19px; height: 29px; }
    .site-header-brand .site-title { font-size: 1.05rem; }
}


/* ── Footer link to the overall leaderboard ───────────────────────────── */
.footer-overall {
    margin-left: auto;
    font-family: var(--ff-display);
    font-size: 0.78rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--pub-gold);
    text-decoration: none;
    white-space: nowrap;
}
.footer-overall:hover { color: #e8c468; }
