/* ============================================================
   Account — Styles
   Palette: the hub's "paper + mango", NOT a pool's.
   ============================================================ */

/* This file began as a byte-for-byte copy of NFL/survivor/styles.css, which is
   why the account area looked like the survivor pool — reported 2026-08-16.
   An account is not a pool: it spans all of them, so it takes the hub's
   palette, the same reason Lib/nav.php renders it with an empty slug.

   VARIABLE NAMES ARE UNCHANGED on purpose. Roughly 120 rules below reference
   them; remapping the values recolours the whole page without touching a
   single rule, and keeps this diff reviewable.

   Every pair was measured before it was chosen (2026-08-16):
     cream on primary   15.90    text on bg          15.90
     text-light on bg    6.09    on white card        6.45   on zebra  5.45
     primary on white   16.85    cream on accent-2    5.85
     ink on mango        7.83  <- see .btn-accent below */
:root {
    /* DESIGN_SPEC.md section 3, matching design screen 2g Account - which is 19
       uses of #212529 and 12 of #5A6167, with pool colour appearing only on the
       entry rows that belong to a pool. Account spans every pool, so like the
       hub it has NO ACCENT OF ITS OWN.

       --accent therefore resolves to ink. Three rules used it in ways that
       break under that and are fixed individually below rather than by bending
       one variable into contradictory jobs: the banner subtext (light type on
       a dark ground), and two fills that carried white or cream type. */
    --primary: #212529;            /* ink — banner, table heads, buttons */
    --primary-mid: #343A40;        /* gradient middle; also .btn:hover */
    --primary-deep: #16191C;       /* gradient end — darkest */
    --accent: #212529;             /* no hub/account accent — ink does the work */
    --accent-2: #2E6B4F;           /* leaf — the one keeper: "alive" needs to
                                      read as alive, and it is 5.85:1 on cream */
    --gold-accent: #8A6408;        /* winner shimmer, text-safe on light */
    --cream: #F5F5F0;              /* light type on dark */
    --bg: #EAEBEE;                 /* page ground */
    --bg-alt: #F5F5F0;             /* zebra striping / tinted */
    --text: #212529;
    --text-light: #5A6167;
    --white: #FFFFFF;              /* surface */
    --border: #D4D4D4;             /* hairline */
    --shadow: rgba(33, 37, 41, 0.10);
    --row-hover: #F5F5F0;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

/* ---- Site Header ---- */
.site-header {
    background: var(--white);
    box-shadow: 0 2px 8px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.5rem;
    background: var(--primary);
    color: var(--cream);
}

.site-title {
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: 2px;
    white-space: nowrap;
}

/* ---- Hamburger ---- */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 110;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--cream);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---- Navigation ---- */
.nav {
    background: var(--white);
    border-bottom: 3px solid var(--primary);
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.nav-menu > li { position: relative; }

.nav-link {
    display: block;
    padding: 0.65rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary);
    color: var(--cream);
}

.nav-dropdown > .nav-link::after {
    content: ' \25BE';
    font-size: 0.7em;
    opacity: 0.6;
}

/* ---- Dropdown Menus ---- */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: var(--white);
    box-shadow: 0 4px 16px var(--shadow);
    border: 1px solid var(--border);
    border-radius: 0 0 6px 6px;
    list-style: none;
    padding: 0.3rem 0;
    z-index: 200;
    max-height: 70vh;
    overflow-y: auto;
}

.nav-dropdown:hover > .dropdown-menu { display: block; }

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text);
    transition: background 0.15s;
}

.dropdown-menu a:hover {
    background: var(--bg-alt);
    color: var(--primary);
}

.dropdown-divider {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-light);
    padding: 0.5rem 1rem 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    pointer-events: none;
}

/* ---- Banner ---- */
.banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 55%, var(--primary-deep) 100%);
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Was a football field — 10-yard lines and hash marks, inherited wholesale
   from NFL/survivor/styles.css. That, more than the colours, is what made the
   account area read as the survivor pool: an account spans every pool, so it
   cannot wear one sport's markings. Replaced with a quiet diagonal grain at a
   lower alpha than the field lines carried, so the banner keeps some texture
   without claiming a sport. */
.banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M-6 6L6 -6M0 24L24 0M18 30L30 18' stroke='rgba(251,246,236,0.07)' stroke-width='1'/%3E%3C/svg%3E") repeat;
    pointer-events: none;
}

.banner-text {
    display: block;
    font-size: clamp(1.1rem, 3vw, 1.8rem);
    font-weight: 800;
    color: var(--cream);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    position: relative;
}

/* Light type on the dark banner. --accent is ink now, so this cannot use it:
   ink on the ink banner is invisible. #C6C8CC is the spec's field-border
   neutral, which measures 8.6:1 on --primary and reads as a quieter second
   line without inventing a colour. */
.banner-subtext {
    display: block;
    font-size: clamp(0.7rem, 1.6vw, 0.9rem);
    font-weight: 500;
    color: #C6C8CC;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    position: relative;
}

.banner-social {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.social-label {
    font-size: clamp(0.6rem, 1.5vw, 0.75rem);
    font-weight: 600;
    color: rgba(251, 246, 236, 0.8);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.social-icons {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--white);
    border-radius: 50%;
    color: var(--primary);
    transition: transform 0.2s, box-shadow 0.2s;
}

.social-icons a:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.social-icons a svg { width: 15px; height: 15px; }

.social-divider {
    width: 1px;
    height: 18px;
    background: rgba(251, 246, 236, 0.4);
}

/* ---- Main Content ---- */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* ---- Pool Status Banner ---- */
.status-banner {
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.status-banner.pending  { background: #FFF3CD; color: #856404; }
.status-banner.active   { background: #d4edda; color: #155724; }
.status-banner.complete { background: #D1ECF1; color: #0C5460; }

/* A test contest must be impossible to mistake for the live pool. */
.status-banner.test {
    /* Amber stripes, ink type. Deliberately the ONE loud thing left in a neutral
       palette: a test contest must be impossible to mistake for the live pool,
       so this keeps a warning colour where the rest of the page gave one up.
       #DDA15E is the spec's own mode-signal amber (the ADMIN chip), and ink on
       it measures 8.72:1 against 2.19:1 for the white-on-orange original. */
    background: repeating-linear-gradient(45deg, #DDA15E, #DDA15E 12px, #B87F3F 12px, #B87F3F 24px);
    color: var(--text);
    font-weight: 800;
    letter-spacing: 2px;
}

/* ---- Stat strip (alive / out / pot / lock countdown) ---- */
.stat-strip {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0 auto 1.2rem;
}

.stat-tile {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 6px var(--shadow);
    padding: 0.6rem 1.1rem;
    text-align: center;
    min-width: 108px;
}

.stat-tile .stat-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.15rem;
}

.stat-tile .stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}

.stat-tile.accent .stat-value { color: var(--accent); }
.stat-tile.wide { min-width: 190px; }

/* ---- Countdown ---- */
.countdown {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 1rem;
    margin: 1rem auto 1.5rem;
    padding: 0.7rem 1rem;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 6px var(--shadow);
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.countdown-label {
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
}

.countdown-value {
    font-weight: 800;
    color: var(--accent);
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}

/* ---- Survivor board ---- */
.pool-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 2px 12px var(--shadow);
    background: var(--white);
}

.pool-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 900px;
    font-size: 0.82rem;
}

.pool-table thead th {
    background: var(--primary);
    color: var(--cream);
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.6rem 0.3rem;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}

.pool-table thead th:first-child {
    text-align: left;
    padding-left: 0.8rem;
    min-width: 150px;
}

/* The week currently being picked gets an ink rail so your eye lands on it.
   Was an orange fill with white type at 2.8:1; ink with cream is 14.6:1. */
.pool-table thead th.wk-current {
    background: var(--primary);
    color: var(--cream);
}

.pool-table tbody tr { transition: background 0.15s; }
.pool-table tbody tr:nth-child(even) { background: var(--bg-alt); }
.pool-table tbody tr:nth-child(odd)  { background: var(--white); }
.pool-table tbody tr:hover { background: var(--row-hover); }

.pool-table td {
    padding: 0.4rem 0.25rem;
    text-align: center;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: middle;
}

.pool-table tbody tr.is-eliminated { opacity: 0.6; }

.col-entry {
    text-align: left !important;
    padding-left: 0.8rem !important;
    font-weight: 700;
    white-space: nowrap;
}

.col-buyback {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 6px;
    background: var(--primary);
    color: var(--white);
    border-radius: 3px;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

/* ---- Team pills (one per week cell) ---- */
.team-pill {
    display: inline-block;
    padding: 2px 6px;
    min-width: 40px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.3px;
}

.team-pill.win     { background: #d4edda; border-color: #b6e0c5; color: #155724; }
.team-pill.loss    { background: #f8d7da; border-color: #f1c1c4; color: #721c24; text-decoration: line-through; }
.team-pill.push    { background: #D1ECF1; border-color: #bee5eb; color: #0C5460; }
.team-pill.pending { background: #FFF3CD; border-color: #FFE89A; color: #856404; }

/* Someone else's pick, before their game kicks off. */
.team-pill.hidden {
    background: #eee;
    border-color: #e0e0e0;
    color: #aaa;
    font-style: italic;
    letter-spacing: 2px;
}

/* An auto-assigned pick is flagged so nobody thinks the system picked for them silently. */
.team-pill.autopick { position: relative; }
.team-pill.autopick::after {
    content: 'A';
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-2);
    color: #fff;
    font-size: 0.5rem;
    font-weight: 800;
    line-height: 1;
    padding: 2px 3px;
    border-radius: 2px;
}

.pill-empty { color: #ccc; font-size: 0.9rem; }

.status-alive {
    color: var(--accent-2);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
}

.status-eliminated {
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
}

/* Winner rows */
.pool-table tbody tr.place-1 {
    background: linear-gradient(90deg, #FFD700 0%, #FFF8DC 30%, #FFFBE6 100%) !important;
}
.pool-table tbody tr.place-2 {
    background: linear-gradient(90deg, #C0C0C0 0%, #E8E8E8 30%, #F5F5F5 100%) !important;
}
.pool-table tbody tr.place-3 {
    background: linear-gradient(90deg, #CD7F32 0%, #E8C49A 30%, #FDF0E0 100%) !important;
}

.pool-table tbody tr[class*="place-"] td:first-child::before {
    content: attr(data-place);
    display: inline-block;
    color: var(--text);
    font-size: 0.6rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
    text-transform: uppercase;
}

/* ---- Pick distribution ---- */
.dist-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.4rem 1rem;
    margin-top: 0.6rem;
}

.dist-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
}

.dist-team { font-weight: 700; min-width: 44px; }

.dist-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-alt);
    border-radius: 4px;
    overflow: hidden;
}

.dist-fill { height: 100%; background: var(--accent-2); border-radius: 4px; }

.dist-pct {
    min-width: 62px;
    text-align: right;
    color: var(--text-light);
    font-variant-numeric: tabular-nums;
}

/* ---- Picks UI: game cards ---- */
.game-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.7rem;
    margin: 1rem 0;
}

.game-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
}

.game-card.locked { opacity: 0.5; background: #fafafa; }

.game-when {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 0.4rem;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.game-when .lock-flag { color: var(--accent); }

.game-teams { display: flex; align-items: center; gap: 0.4rem; }

.game-team {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.15s, border-color 0.15s;
}

.game-team:hover:not(.disabled) { background: var(--bg-alt); }

.game-team.selected {
    background: rgba(33, 37, 41, 0.08);
    border-color: var(--accent);
    font-weight: 800;
}

.game-team.disabled { opacity: 0.45; cursor: not-allowed; }
.game-team input[type="radio"] { accent-color: var(--accent); }

.game-team .team-spread {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-light);
    font-variant-numeric: tabular-nums;
}

.game-vs {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
}

.used-tag {
    margin-left: auto;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- Used-teams grid (all 32) ---- */
.team-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 0.35rem;
    margin: 0.8rem 0;
}

.team-chip {
    text-align: center;
    padding: 0.35rem 0.2rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--white);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
}

.team-chip.used {
    background: var(--bg-alt);
    color: #aaa;
    text-decoration: line-through;
    border-style: dashed;
}

.team-chip.this-week { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(33,37,41,0.18); }

.team-chip .chip-wk {
    display: block;
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--text-light);
    text-decoration: none;
    letter-spacing: 0.5px;
}

/* ---- Split-vote card ---- */
.split-card {
    background: #FFF8E7;
    border: 2px solid var(--gold-accent);
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin: 1rem auto;
    max-width: 760px;
}

.split-card h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.split-card .split-actions { display: flex; gap: 0.6rem; margin-top: 0.8rem; flex-wrap: wrap; }

.vote-yes { color: #155724; font-weight: 800; }
.vote-no  { color: #721c24; font-weight: 800; }
.vote-none { color: var(--text-light); font-weight: 600; }

/* ---- Footer ---- */
.site-footer {
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: 0.75rem;
    color: var(--text-light);
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.site-footer .last-updated { font-weight: 600; color: var(--text); }

/* ---- Rules / content sections ---- */
.rules-container { max-width: 800px; margin: 0 auto; }

.rules-section {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 6px var(--shadow);
    margin-bottom: 1.2rem;
    overflow: hidden;
}

.rules-section h2 {
    background: var(--primary);
    color: var(--cream);
    padding: 0.7rem 1.2rem;
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.rules-section .rules-body {
    padding: 1rem 1.2rem;
    font-size: 0.88rem;
    line-height: 1.7;
}

.rules-section .rules-body p  { margin-bottom: 0.8rem; }
.rules-section .rules-body p:last-child { margin-bottom: 0; }
.rules-section .rules-body ul { margin: 0.3rem 0 0.8rem 1.5rem; }
.rules-section .rules-body li { margin-bottom: 0.4rem; }

.payout-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.8rem 0;
    font-size: 0.85rem;
}

.payout-table th {
    background: var(--bg-alt);
    padding: 0.5rem 0.8rem;
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid var(--primary);
}

.payout-table td {
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid var(--border);
}

/* ---- Forms ---- */
.form-card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 6px var(--shadow);
    padding: 1.5rem;
    max-width: 540px;
    margin: 1rem auto;
}

.form-card h2 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-row { margin-bottom: 0.9rem; }

.form-row label {
    display: block;
    font-weight: 600;
    font-size: 0.82rem;
    margin-bottom: 0.3rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="number"],
.form-row input[type="password"],
.form-row input[type="datetime-local"],
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(33, 37, 41, 0.14);
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: var(--primary);
    color: var(--cream);
    border: none;
    border-radius: 4px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.15s;
}

.btn:hover { background: var(--primary-mid); }
.btn:disabled { background: var(--text-light); cursor: not-allowed; }

/* This was white-on-orange at 2.19:1 — the P4 defect DESIGN_SPEC logs. It then
   briefly became ink-on-mango at 7.83:1, and when --accent moved to ink for the
   neutral palette that rule would have rendered ink on ink: an invisible
   button. Caught before deploy. It is now the primary filled control — ink with
   cream type, 14.6:1 — which is what the 2g mock uses for the one action that
   is yours. */
.btn-accent { background: var(--primary); color: var(--cream); }
.btn-accent:hover { background: var(--primary-mid); }

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--primary);
}
.btn-secondary:hover { background: var(--bg-alt); }

.btn-danger { background: #BC4749; color: #fff; }
.btn-danger:hover { background: #9e3a3c; }

.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.7rem; letter-spacing: 0.5px; }

.note { font-size: 0.78rem; color: var(--text-light); font-style: italic; }

.flash {
    padding: 0.7rem 1rem;
    border-radius: 4px;
    margin: 0 auto 1rem;
    max-width: 760px;
    font-size: 0.85rem;
    font-weight: 600;
}

.flash.success { background: #d4edda; color: #155724; border: 1px solid #b6e0c5; }
.flash.error   { background: #f8d7da; color: #721c24; border: 1px solid #f1c1c4; }
.flash.info    { background: #D1ECF1; color: #0C5460; border: 1px solid #bee5eb; }
.flash.warn    { background: #FFF3CD; color: #856404; border: 1px solid #FFE89A; }

/* ---- Contest tabs (results.php) ---- */
.contest-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.contest-tab {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--white);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contest-tab.active { background: var(--primary); color: var(--cream); border-color: var(--primary); }
.contest-tab.live   { border-style: dashed; border-color: var(--gold-accent); }

/* ---- Admin ---- */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1rem;
    align-items: start;
}

.admin-log {
    background: #0d1117;
    color: #7ee787;
    font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
    font-size: 0.72rem;
    line-height: 1.5;
    padding: 0.8rem;
    border-radius: 6px;
    max-height: 460px;
    overflow: auto;
    white-space: pre-wrap;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.admin-table th {
    background: var(--bg-alt);
    padding: 0.4rem 0.5rem;
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid var(--primary);
    white-space: nowrap;
}

.admin-table td {
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid var(--border);
}

.admin-table input[type="text"],
.admin-table input[type="number"],
.admin-table select {
    padding: 0.25rem 0.4rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    font-family: inherit;
    font-size: 0.78rem;
    width: 100%;
}

/* ---- Responsive: Tablet ---- */
@media (max-width: 1024px) {
    .main-content { padding: 1rem 0.75rem; }
    .pool-table { min-width: 820px; }
    .pool-table thead th:first-child { min-width: 128px; }
}

/* ---- Responsive: Mobile ---- */
@media (max-width: 768px) {
    .hamburger { display: flex; }

    .nav {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
        border-bottom: none;
    }

    .nav.open {
        max-height: 100vh;
        border-bottom: 3px solid var(--primary);
        overflow-y: auto;
    }

    .nav-menu { flex-direction: column; }

    .nav-link {
        padding: 0.8rem 1.5rem;
        border-bottom: 1px solid #eee;
        font-size: 0.9rem;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: var(--bg);
        display: none;
        padding-left: 1rem;
    }

    .nav-dropdown.open > .dropdown-menu { display: block; }

    .dropdown-menu a { padding: 0.6rem 1.5rem; font-size: 0.82rem; }

    /* Sticky entry column so the name stays visible while scrolling 18 weeks */
    .pool-table .col-entry {
        position: sticky;
        left: 0;
        z-index: 5;
        background: inherit;
        box-shadow: 2px 0 4px rgba(0,0,0,0.08);
    }

    .pool-table thead th:first-child {
        position: sticky;
        left: 0;
        z-index: 15;
    }

    .pool-table { min-width: 760px; }

    .banner { padding: 1.5rem 1rem 1rem; }
    .banner-text { letter-spacing: 2px; }
    .main-content { padding: 1rem 0.5rem; }
    .game-list { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .site-title { font-size: 1.05rem; }
    .pool-table { font-size: 0.72rem; }
    .stat-tile { min-width: 92px; padding: 0.5rem 0.8rem; }
    .stat-tile .stat-value { font-size: 1.05rem; }
}

/* ============================================================
   Account area additions.
   Base is NFL Survivor's "Sunday Night" sheet, copied wholesale so the
   account pages look native to the newest pool rather than like a bolt-on.
   ============================================================ */

/* Big letter-spaced input for the six-digit sign-in code.
   inputmode/autocomplete are set on the element itself so iOS offers the code
   straight from the Mail notification banner — one tap, no app switch. */
.code-input {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    display: block;
    text-align: center;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.6rem;
    padding: 0.7rem 0.5rem 0.7rem 1.1rem;  /* extra left pad offsets the trailing letter-space */
    border: 2px solid var(--border);
    border-radius: 8px;
}
.code-input:focus { outline: none; border-color: var(--accent); }

.entry-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    margin-bottom: 0.6rem;
}
.entry-card .entry-main { flex: 1 1 220px; }
.entry-card .entry-name { font-weight: 800; color: var(--primary); }
.entry-card .entry-meta { font-size: 0.78rem; color: var(--text-light); }

.pill-alive { background:#d4edda; color:#155724; }
.pill-out   { background:#f8d7da; color:#721c24; }
.pill-test  { background:#FFF3CD; color:#856404; }
.mini-pill {
    display: inline-block; padding: 2px 8px; border-radius: 999px;
    font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;
}

.recovery-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem; margin: 1rem 0;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 1rem; font-weight: 700; letter-spacing: 1px;
}
.recovery-grid div {
    background: var(--bg-alt); border: 1px dashed var(--border);
    border-radius: 5px; padding: 0.5rem; text-align: center;
}

.setup-key {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 1rem; font-weight: 700; letter-spacing: 2px;
    background: var(--bg-alt); border: 1px solid var(--border);
    border-radius: 6px; padding: 0.8rem; word-break: break-all; text-align: center;
}
