/* ── SSA design system — shared token block (docs/DESIGN_SYSTEM.md §1).
   Copied verbatim; do not edit values here. ──────────────────────────────── */
:root {
  /* ── Surfaces ────────────────────────────────────────────────────────── */
  --bg:            #0b0f16;  /* page background                            */
  --bg-elev:       #161b22;  /* cards, nav bar, table headers              */
  --bg-row:        #1d2129;  /* table rows, inset panels                   */
  --border:        #2a2f3a;
  --border-subtle: #22262f;

  /* ── Text ────────────────────────────────────────────────────────────── */
  --text:          #e8eaef;  /* headings + body                            */
  --text-dim:      #9aa0aa;  /* secondary                                  */
  --text-muted:    #8b929d;  /* captions, timestamps, footnotes            */

  /* ── Brand / chrome ──────────────────────────────────────────────────── */
  --accent:        #58a6ff;  /* THE brand accent. All chrome.              */
  --accent-dim:    #2f6fd6;  /* hover + pressed FILLS ONLY — never text    */
  --text-disabled: #6b727d;  /* recessive but legible; NOT --text-muted */
  --accent-wash:   rgba(88, 166, 255, 0.14);  /* translucent accent fills */
  --accent-2:      #a78bfa;  /* secondary highlight (All-Access, badges)   */

  /* ── Data semantics — NEVER used for chrome ──────────────────────────── */
  --good:          #3fb950;  /* win, cover, +EV, positive delta            */
  --bad:           #f85149;  /* loss, no-cover, -EV, negative delta        */
  --warn:          #e6c26b;  /* push, stale data, caution                  */

  /* ── Type ────────────────────────────────────────────────────────────── */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                 Roboto, sans-serif;
}

/* League identity — legal in charts, team badges and hero art only; never in
   nav, buttons or focus rules (DESIGN_SYSTEM.md §1 "Per-league tint"). */
:root { --league-tint: #4ade80; }

/* ── Repo-specific data colours ───────────────────────────────────────────
   These encode DATA meaning, so they sit outside the shared block. */
:root {
    --rising-green: #4CAF50;  /* mock-draft stock rising */
    --falling-red: #F44336;   /* mock-draft stock falling */
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
    background: var(--bg);
    color: var(--text-dim);
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
}

/* ── Sign-in gate (static/js/app.js :: _renderSignInGate) ──────────────── */
.admin-locked {
    background: var(--bg-row); padding: 24px; border-radius: 6px;
    border: 1px dashed var(--border); text-align: center;
}
button.primary {
    background: var(--accent); border: 1px solid var(--accent); color: var(--bg);
    border-radius: 4px; font-family: var(--font-family); font-size: 14px;
    font-weight: 600;
}
button.primary:hover { filter: brightness(1.12); }

/* ── Site nav (standardized across SSA portfolio) ────────────────────── */
.site-nav {
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    padding: 8px 20px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.site-nav-brand {
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.3px;
}
.site-nav-divider {
    width: 1px;
    height: 18px;
    background: var(--border);
}
.site-nav-link {
    text-decoration: none;
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 500;
}
.site-nav-link:hover { color: var(--text); }
.site-nav-link.active {
    color: var(--accent);
    font-size: 15px;
    font-weight: 600;
}
.site-nav-link.disabled { color: var(--text-muted); cursor: not-allowed; }
/* ── Sub-header (Level 2: NFL tools within this domain) ─────────────────────
   Sits directly under the top sports row (.site-nav). Uses the page base
   background so it reads as a distinct, recessed second tier. */
.subsite-nav {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 20px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}
.subsite-nav-link {
    text-decoration: none;
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 500;
}
.subsite-nav-link:hover { color: var(--text); }
.subsite-nav-link.active { color: var(--accent); font-weight: 600; }
/* ── Page Nav ──────────────────────────────────────────────────────────── */
.page-nav {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    flex-wrap: wrap;
}
.page-nav-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-family);
    transition: all 0.15s;
}
.page-nav-btn:hover { border-color: var(--text-muted); }
.page-nav-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}
.refresh-btn { min-width: auto; padding: 8px 12px; }

/* Draft-class badge — states which cycle the page is showing, so two draft
   classes can never be confused for one another. Text is written at runtime by
   constants.js :: DraftYear.paintLabels() from what the API reported serving,
   and the element stays [hidden] until then rather than asserting a year the
   frontend only assumed. Green-on-green-wash pill: this is DATA (which cycle
   is live), not chrome — .collapsible-tag.free is neutral grey now. */
.draft-year-badge {
    margin-left: auto;
    align-self: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--good);
    background: rgba(63, 185, 80, 0.14);
    border-radius: 10px;
    padding: 4px 10px;
    white-space: nowrap;
}
.draft-year-badge[hidden] { display: none; }

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0 20px;
}

/* ── Page Containers ───────────────────────────────────────────────────── */
.page-container {
    display: none;
    padding: 20px;
}
.page-container.active { display: block; }

/* ── Page Layout (filters + content) ───────────────────────────────────── */
.page-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
}
@media (max-width: 900px) {
    .page-layout {
        grid-template-columns: 1fr;
    }
}

/* ── Filter Panel ──────────────────────────────────────────────────────── */
.filter-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.filter-panel h3 {
    color: var(--text);
    font-size: 16px;
    margin-bottom: 4px;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.filter-group label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.filter-group select,
.filter-group input[type="date"],
.filter-group input[type="range"] {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-family: var(--font-family);
    width: 100%;
}
.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--accent);
}
.filter-group select[multiple] {
    height: 120px;
}

/* Checkbox + radio toggle group */
.toggle-group {
    display: flex;
    gap: 4px;
}
.toggle-group button {
    flex: 1;
    padding: 6px 10px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-family: var(--font-family);
    transition: all 0.15s;
}
.toggle-group button.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.checkbox-group input[type="checkbox"] {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
}
.checkbox-group label {
    text-transform: none;
    font-size: 13px;
    color: var(--text-dim);
    cursor: pointer;
}

.slider-value {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
}

/* ── Filter Divider ────────────────────────────────────────────────────── */
.filter-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 4px 0;
}

/* ── Metric Cards ──────────────────────────────────────────────────────── */
.metrics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
.metric-card {
    background: linear-gradient(135deg, var(--bg-elev) 0%, var(--bg-row) 100%);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
}
.metric-card .metric-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.metric-card .metric-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

/* ── Content Area ──────────────────────────────────────────────────────── */
.content-area {
    min-width: 0; /* prevent grid blowout */
}

/* ── Section Headers ───────────────────────────────────────────────────── */
.section-header {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}
.section-caption {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* ── Movers Grid ───────────────────────────────────────────────────────── */
.movers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}
@media (max-width: 700px) {
    .movers-grid { grid-template-columns: 1fr; }
}
.movers-col h3 {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 4px;
}
.movers-col .movers-caption {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.mover-entry {
    margin-bottom: 10px;
}
.mover-entry .mover-change {
    font-weight: 700;
    font-size: 1.15em;
}
.mover-entry .mover-change.rising { color: var(--rising-green); }
.mover-entry .mover-change.falling { color: var(--falling-red); }
.mover-entry .mover-name {
    font-weight: 600;
    color: var(--text);
}
.mover-entry .mover-detail {
    font-size: 12px;
    color: var(--text-muted);
}

/* ── Player Selector ───────────────────────────────────────────────────── */
.player-selector {
    margin-bottom: 20px;
}
.player-selector label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.player-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.player-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 12px;
    color: var(--text-dim);
}
.player-chip .chip-color {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.player-chip .chip-remove {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1;
}
.player-chip .chip-remove:hover { color: var(--bad); }

.player-search-wrapper {
    position: relative;
}
.player-search {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-family: var(--font-family);
    width: 100%;
    max-width: 400px;
}
.player-search:focus { outline: none; border-color: var(--accent); }
.player-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-width: 400px;
    max-height: 250px;
    overflow-y: auto;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 6px 6px;
    z-index: 100;
    display: none;
}
.player-dropdown.visible { display: block; }
.player-dropdown-item {
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-dim);
}
.player-dropdown-item:hover { background: var(--border-subtle); }
.player-dropdown-item .player-pos {
    color: var(--text-muted);
    font-size: 11px;
}

/* ── Charts ────────────────────────────────────────────────────────────── */
.chart-container {
    margin-bottom: 24px;
}

/* ── Collapsible sections ──────────────────────────────────────────────── */
.collapsible-header {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 0;
    user-select: none;
}
.collapsible-header h3 {
    font-size: 15px;
    color: var(--text);
}
.collapsible-arrow {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.2s;
}
.collapsible-header.open .collapsible-arrow {
    transform: rotate(90deg);
}
.collapsible-body {
    display: none;
}
.collapsible-body.open {
    display: block;
}

/* ── Data Tables ───────────────────────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.data-table th {
    background: var(--bg-elev);
    color: var(--text-muted);
    text-align: left;
    padding: 8px 10px;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 1;
}
.data-table td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-dim);
}
.data-table tr:hover td {
    background: var(--border-subtle);
}
.table-scroll {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 6px;
}

/* Status line for a finished draft cycle. Informational, not an error — the
   board below it is still real content, just historical. */
.archive-note {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.55;
    margin: 0 0 16px;
    padding: 10px 14px;
    border-left: 2px solid var(--good);
    background: rgba(63, 185, 80, 0.07);
    border-radius: 0 6px 6px 0;
}

/* ── Info / Empty State ────────────────────────────────────────────────── */
.info-msg {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* ── Loading Overlay ───────────────────────────────────────────────────── */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 15, 22, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
}
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.loading-text {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

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

/* ── Public paywall module view (2026-07-31) ───────────────────────────── */
/* The public /mockdrafts customer surface (mockdrafts-public.html +
   js/public.js). Ported from cfl-elo-dashboard's "Public paywall module
   view" block, renamed onto this repo's palette variables. The tabbed
   surface reuses the internal .page-nav / .page-container pattern plus the
   internal table styles; these are only the paywall-specific bits. */
.public-main { max-width: 1280px; margin: 0 auto; padding: 28px 20px 48px; width: 100%; }
.public-hero { margin-bottom: 20px; }
.public-hero .kicker {
    font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--text-muted); margin: 0 0 10px;
}
.public-hero h1 { font-size: 30px; line-height: 1.15; margin: 0 0 12px; color: var(--text); }
.public-lede { color: var(--text-muted); line-height: 1.6; font-size: 15px; max-width: 660px; margin: 0; }
.section-note { color: var(--text-muted); font-size: 13px; line-height: 1.55; margin: 4px 0 16px; }

/* Free/Subscribers chips on the tab buttons */
.collapsible-tag {
    font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
    padding: 3px 8px; border-radius: 10px;
}
.collapsible-tag.free { color: var(--text-muted); background: var(--bg-row); }
.collapsible-tag.locked { color: var(--accent); background: var(--accent-wash); }
/* Inside an accent-filled active tab the translucent wash composites to
   accent-on-accent (1.00:1) and the pill disappears — force it opaque. */
.page-nav-btn.active .collapsible-tag.locked { background: var(--bg); }
.page-nav .collapsible-tag { margin-left: 6px; font-size: 10px; padding: 2px 6px; }

/* Lock cards (gated tab placeholders) */
.lock-card {
    text-align: center; padding: 48px 24px;
    border: 1px dashed var(--border); border-radius: 10px; background: var(--bg-elev);
}
.lock-card .lock-icon { color: var(--accent); margin-bottom: 12px; }
.lock-card h3 { margin: 0 0 8px; font-size: 16px; color: var(--text); }
.lock-card p { margin: 0 auto 18px; max-width: 460px; color: var(--text-muted); font-size: 14px; line-height: 1.55; }
.lock-card .cta {
    display: inline-block; background: var(--accent); color: var(--bg);
    border: 1px solid var(--accent); border-radius: 6px;
    padding: 9px 20px; font-size: 14px; font-weight: 600; text-decoration: none;
}
.lock-card .cta:hover { filter: brightness(1.1); }
.lock-card .cta-secondary {
    display: inline-block; margin-left: 14px; color: var(--text-muted);
    font-size: 13px; text-decoration: none;
    border-bottom: 1px dotted var(--text-muted); padding-bottom: 1px;
}
.lock-card .cta-secondary:hover { color: var(--text); }

/* Nav-right (Pricing/Help + account widget) — landing.html shares these rules
   via the linked stylesheet (its former inline copy was removed 2026-08-08). */
.nav-right { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.nav-right-link { color: var(--text-dim); text-decoration: none; font-size: 13px; font-weight: 500; }
.nav-right-link:hover { color: var(--text); }
.account-stub { position: relative; }
/* Signed-out state: account.js replaces the stub button with a bare <a>,
   which otherwise inherits UA link colors on pages without a global a rule. */
.account-stub > a { color: var(--text-dim); text-decoration: none; font-size: 13px; font-weight: 500; }
.account-stub > a:hover { color: var(--text); }
.account-stub button {
    background: transparent; border: 1px solid var(--border); color: var(--text-dim);
    font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 6px;
    cursor: pointer; display: flex; align-items: center; gap: 6px;
}
.account-stub button:hover { border-color: var(--accent); }
.account-stub-menu {
    display: none; position: absolute; right: 0; top: calc(100% + 6px);
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px;
    min-width: 240px; padding: 8px 0; box-shadow: 0 8px 30px rgba(0,0,0,0.4); z-index: 100;
}
.account-stub-menu.open { display: block; }
.account-stub-menu .item {
    padding: 8px 16px; font-size: 13px; color: var(--text-muted);
    display: flex; justify-content: space-between; gap: 12px;
}
.account-stub-menu .item.header {
    color: var(--text-dim); font-weight: 600;
    border-bottom: 1px solid var(--border-subtle); padding-bottom: 12px; margin-bottom: 4px;
}
.account-stub-menu a.item { text-decoration: none; }
.account-stub-menu a.item:hover,
.account-stub-menu .item.action:hover { background: var(--border-subtle); color: var(--text); }
.account-stub-menu .item.action { cursor: pointer; color: var(--text-dim); }
.acct-btn-avatar {
    width: 18px; height: 18px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--bg);
    font-size: 10px; font-weight: 700; display: inline-flex;
    align-items: center; justify-content: center; overflow: hidden;
}
.acct-btn-avatar img { width: 100%; height: 100%; object-fit: cover; }

.public-footer { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); }
.public-footer p { color: var(--text-muted); font-size: 12px; line-height: 1.6; margin: 0; }

@media (max-width: 600px) {
    .public-main { padding: 22px 14px 48px; }
    .public-hero h1 { font-size: 24px; }
    .public-lede { font-size: 14px; }
    .site-nav { gap: 14px; padding: 8px 14px; }
}

/* ── Site footer — the legal footer block (DESIGN_SYSTEM.md §3, 2026-08-13).
   Byte-identical markup on every SSA page; CSS copied verbatim from apex
   tokens.css. Chrome tokens only — no data colours here. */
.site-footer {
  text-align: center;
  padding: 40px 20px 28px;
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
}
.site-footer p { margin: 0 auto 8px; max-width: 760px; }
.site-footer-legal {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}
.site-footer-links {
  color: var(--text-muted);
  font-size: 12.5px;
  padding-top: 4px;
}
.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer-copy { color: var(--text-muted); font-size: 12px; padding-top: 2px; }
