/* soccer-hub front-door — minimal dark theme, Premier-League-family purple accent.
   Only the front-door surfaces live here (tools directory + coming-soon); the
   league dashboards (e.g. /epl) ship their own CSS. Palette mirrors
   epl-elo-model/static/css/style.css so the hub and the subsites feel like one
   site. */

/* ── 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: #7c3aed; }   /* SSA soccer purple */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text);
    font-family: var(--font-family);
    font-size: 14px; line-height: 1.5; min-height: 100vh;
}
body { display: flex; flex-direction: column; }
a { color: var(--text); text-decoration: none; }

/* ── 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;
    /* E17 (wave 3): the L1 row sticks to the viewport top. z-index 30 clears
       every in-page sticky cell (the data grids use 3/4); the account
       dropdown (z 100) lives INSIDE this stacking context so it still
       paints above. */
    position: sticky;
    top: 0;
    z-index: 30;
    /* One fixed row height so .subsite-nav can stick exactly beneath: the
       account-stub button makes a public L1 ~51px tall while a stub-less
       internal L1 is ~40px, and a sticky offset needs one constant. 52px =
       the tallest natural state (8+34+8 + 1px border), border-box so the
       number means the same everywhere. */
    min-height: 52px;
    box-sizing: border-box;
}
.site-nav-brand { 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 { 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; }

/* Nav-right (Help + Account control), shared by landing + coming-soon. */
.nav-right { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.nav-right-link { color: var(--text-muted); 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);
    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-dim); display: flex; justify-content: space-between; gap: 12px; }
.account-stub-menu .item.header { color: var(--text); font-weight: 600; border-bottom: 1px solid var(--border-subtle); padding-bottom: 12px; margin-bottom: 4px; }
.account-stub-menu .item .badge { font-size: 11px; color: var(--text-muted); background: var(--border-subtle); padding: 2px 8px; border-radius: 4px; font-weight: 500; }
.account-stub-menu .item.action { cursor: pointer; color: var(--text); }
.account-stub-menu .item.action:hover { background: var(--border-subtle); }

/* ── Sub-header (Level 2: leagues within Soccer) ─────────────
   Sits directly under the top sports row (.site-nav). Uses the page
   base background so it reads as a distinct, recessed second tier.
   Canonical block — mirrors epl-elo-model/static/css/style.css. */
.subsite-nav {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 20px; display: flex; gap: 20px; flex-wrap: wrap; align-items: center;
    /* E17 (wave 3): sticks directly beneath the fixed-height L1 row (see
       .site-nav). z-index 29 = under the L1, above every in-page sticky
       cell. When a squeezed L1 wraps to two rows (~601-768px) it is taller
       than the constant and the L2 simply rides beneath the opaque L1 —
       degraded, never overlapping content. */
    position: sticky;
    top: 52px;
    z-index: 29;
}
.subsite-nav-link { font-size: 13px; color: var(--text-dim); font-weight: 500; text-decoration: none; }
.subsite-nav-link:hover { color: var(--text); }
.subsite-nav-link.active { color: var(--accent); font-weight: 600; }

/* ── Skip link (E18, wave 3) — first element of <body>, visually parked
   off-screen until keyboard focus lands on it. Filled control → dark label
   (white on --accent fails AA; DESIGN_SYSTEM.md §1). ─────────────────────── */
.skip-link {
    position: absolute;
    top: -9999px;
    left: 16px;
    z-index: 40;               /* above the sticky .site-nav (30) */
    background: var(--accent);
    color: var(--bg);
    padding: 8px 14px;
    border-radius: 0 0 8px 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.skip-link:focus { top: 0; }

/* E18: keyboard focus ring on the chrome links (mouse clicks stay clean —
   :focus-visible). */
.site-nav-link:focus-visible,
.subsite-nav-link:focus-visible,
.nav-right-link:focus-visible,
.site-footer-links a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ── Landing hero (internal tools directory) ─────────────────────────── */
.hero { max-width: 1000px; margin: 0 auto; padding: 64px 24px 8px; text-align: center; }
.hero .kicker { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 12px; }
.hero h1 { font-size: 32px; line-height: 1.15; margin: 0 0 14px; color: var(--text); }
.hero .lede { color: var(--text-dim); line-height: 1.6; font-size: 15px; max-width: 620px; margin: 0 auto; }

/* Card grid (mirrors nfl-mock-draft-scraper landing). */
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; max-width: 780px; margin: 40px auto; padding: 0 24px; width: 100%; }
.card { background: linear-gradient(135deg, var(--bg-elev) 0%, var(--bg-row) 100%); border: 1px solid var(--border); border-radius: 12px; padding: 28px; transition: all 0.25s ease; text-decoration: none; color: inherit; display: block; }
.card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 30px rgba(88, 166, 255, 0.12); }
.card-icon { font-size: 2rem; margin-bottom: 14px; display: block; }
.card h2 { font-size: 1.2rem; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.card p { font-size: 0.9rem; color: var(--text-dim); line-height: 1.5; margin-bottom: 14px; }
.card-badge { display: inline-block; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; padding: 3px 10px; border-radius: 20px; background: var(--accent-wash); color: var(--accent); }
/* E45 (wave 3): one badge set on the three surfaces that render availability
   badges (apex, NFL landing, here). Base .card-badge is the live look; .soon
   and .archive are the muted states. */
.card-badge.soon,
.card-badge.archive { background: var(--border-subtle); color: var(--text-muted); }

/* ── Public coming-soon surface ──────────────────────────────────────── */
.public-main { max-width: 920px; margin: 0 auto; padding: 32px 20px 64px; width: 100%; }
.public-hero { margin-bottom: 28px; }
.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; }
.public-lede { color: var(--text-dim); line-height: 1.6; font-size: 15px; max-width: 660px; margin: 0; }
.public-footer { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); }
.public-footer p { color: var(--text-dim); font-size: 12px; line-height: 1.6; margin: 0; }

footer { text-align: center; padding: 48px 20px 30px; margin-top: auto; color: var(--text-muted); font-size: 0.8rem; }
footer a { color: inherit; }

/* ── Mobile ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .hero { padding: 48px 16px 8px; }
    .hero h1 { font-size: 26px; }
    .tools { padding: 0 16px; }
    .public-main { padding: 22px 14px 48px; }
    .public-hero h1 { font-size: 24px; }
    /* E23 (wave 3): single-row horizontal scroll instead of wrapping. The
       edge fade is a sticky final flex item pinned to the scrollport's
       right edge (it returns to its flow position — the end of the row —
       at full scroll, so the affordance disappears exactly when there is
       nothing more to reach). Fade colour = --bg-elev, the nav's own
       surface. */
    .site-nav {
        gap: 14px;
        padding: 8px 14px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .site-nav::-webkit-scrollbar { display: none; }
    .site-nav::after {
        content: "";
        position: sticky;
        right: 0;
        flex: none;
        align-self: stretch;
        width: 28px;
        margin-left: -28px;
        z-index: 1;
        pointer-events: none;
        background: linear-gradient(to left, var(--bg-elev), transparent);
    }
    .site-nav-brand, .site-nav-link, .nav-right-link { white-space: nowrap; }
    .site-nav-divider, .nav-right { flex: none; }
    /* The scroll container clips absolutely-positioned descendants, so the
       account dropdown escapes it as position: fixed, just below the
       sticky L1 row. */
    .account-stub-menu { position: fixed; top: 54px; right: 10px; }
}

/* ── 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; }
