:root {
  --bg: #0b0f14;
  --bg-elev: #10161d;
  --surface: #141b24;
  --surface-2: #1c2530;
  --border: #2a3544;
  --border-strong: #3a4a5c;
  --text: #e8eef4;
  --text-dim: #8b9aab;
  --text-faint: #6a7887;
  --accent: #3dd68c;
  --accent-dim: rgba(61, 214, 140, 0.16);
  --accent-ink: #062016;
  --blue: #5b9fd4;
  --gold: #e4b34a;
  --gold-dim: rgba(228, 179, 74, 0.16);
  --danger: #f07178;
  --danger-dim: rgba(240, 113, 120, 0.14);
  --warn: #e4b34a;
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  --mono: "Cascadia Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --max: 1120px;
  --header-h: 64px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; line-height: 1.5; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

.site-header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: var(--header-h);
  padding: 10px 22px;
  background: rgba(11, 15, 20, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand:hover { text-decoration: none; }
.logo {
  width: 32px; height: 32px; border-radius: 8px; background: var(--surface-2);
  border: 1px solid var(--border); display: grid; place-items: center;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: 0.01em; }
.brand-tag { font-size: 10px; color: var(--text-dim); letter-spacing: 0.08em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav > a { color: var(--text-dim); font-size: 14px; font-weight: 600; }
.site-nav > a:hover { color: var(--text); text-decoration: none; }
.site-nav a.btn-primary,
.site-nav > a.btn-primary,
.site-nav a.btn-primary:hover {
  color: var(--accent-ink);
}
.inline-form { display: inline; margin: 0; }

.btn, .icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); border-radius: 9px; min-height: 38px; padding: 0 14px;
  font-weight: 650; text-decoration: none;
}
.btn:hover, .icon-btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn-primary:hover { background: #54e09b; }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--danger-dim); color: var(--danger); border-color: transparent; }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; }

.wrap { width: min(var(--max), calc(100% - 36px)); margin: 0 auto; }
.hero { padding: 72px 0 48px; }
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.1rem);
  line-height: 1.05; letter-spacing: -0.03em; font-weight: 750; max-width: 16ch;
}
.hero .lede { margin-top: 18px; font-size: 1.15rem; color: var(--text-dim); max-width: 42rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }

.section { padding: 56px 0; border-top: 1px solid var(--border); }
.section h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.02em; margin-bottom: 10px; }
.section .intro { color: var(--text-dim); max-width: 40rem; margin-bottom: 28px; }

.feature-grid, .faq-list { display: grid; gap: 14px; }
@media (min-width: 720px) {
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .faq-list { grid-template-columns: 1fr 1fr; }
}
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p, .card li { color: var(--text-dim); font-size: 14px; }
.price-card { text-align: left; max-width: 440px; }
.price-card .amount { font-size: 3rem; font-weight: 750; letter-spacing: -0.04em; line-height: 1; }
.price-card .amount span { font-size: 1rem; color: var(--text-dim); font-weight: 600; letter-spacing: 0; }
.price-card ul { margin: 16px 0 0; padding: 0 0 0 18px; }
.price-card li { margin: 6px 0; }
.note { font-size: 13px; color: var(--text-dim); margin-top: 12px; }
.faq details {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
}
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin-top: 8px; color: var(--text-dim); font-size: 14px; }

.auth-card { width: min(440px, calc(100% - 32px)); margin: 48px auto 64px; }
.auth-card h1 { font-size: 1.6rem; margin-bottom: 8px; }
.form-grid { display: grid; gap: 12px; margin-top: 18px; }
label.fld { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text-dim); font-weight: 600; }
.fld input, .fld select, .fld textarea {
  min-height: 44px; padding: 8px 12px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--border); font-size: 16px;
}
.fld textarea { min-height: 120px; resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim);
}
.err, .flash, .notice {
  padding: 10px 12px; border-radius: 10px; font-size: 14px; margin: 12px 0;
}
.err { background: var(--danger-dim); color: var(--danger); }
.notice, .flash { background: var(--accent-dim); color: var(--accent); }
.warn { background: var(--gold-dim); color: var(--gold); padding: 10px 12px; border-radius: 10px; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 22px 28px;
  color: var(--text-faint); font-size: 13px; line-height: 1.6;
  margin-top: 40px;
}
.footer-grid { width: min(var(--max), 100%); margin: 0 auto 18px; display: grid; gap: 22px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.foot-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px; }
.copyright { width: min(var(--max), 100%); margin: 0 auto; font-size: 12px; }

.banner { padding: 10px 16px; background: var(--accent-dim); color: var(--accent); font-size: 13px; font-weight: 600; text-align: center; }
.banner.warn { background: var(--gold-dim); color: var(--gold); }

.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 8px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.data-table th { color: var(--text-dim); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.data-table td.num { font-family: var(--mono); text-align: right; }
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.badge-arb { background: var(--accent-dim); color: var(--accent); }
.badge-low { background: var(--gold-dim); color: var(--gold); }
.badge-off { background: var(--danger-dim); color: var(--danger); }
.badge-ok { background: var(--accent-dim); color: var(--accent); }
.best { color: var(--accent); font-weight: 700; }

.avatar, .avatar-fallback {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  background: var(--surface-2); border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--accent); flex: 0 0 auto;
}
.avatar-lg { width: 96px; height: 96px; font-size: 28px; }
.author { display: flex; gap: 10px; align-items: center; }
.post { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin: 12px 0; }
.post-body { margin-top: 10px; }
.post-body p { margin: 0 0 8px; }
.post-meta { font-size: 12px; color: var(--text-dim); }
.pagination { display: flex; gap: 8px; margin: 16px 0; }

.legal { width: min(760px, calc(100% - 36px)); margin: 40px auto 64px; }
.legal h1 { font-size: 2rem; margin-bottom: 8px; }
.legal h2 { font-size: 1.15rem; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--text-dim); margin: 8px 0; }

.muted { color: var(--text-dim); font-size: 13px; }
.stack { display: grid; gap: 12px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.unreg { font-size: 10px; color: var(--gold); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; }
.toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; }
@media (max-width: 720px) {
  .hero { padding: 40px 0 28px; }
}

/* Member app */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 18px; }
.tabs button { border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.tabs button[aria-selected="true"], .tabs button.active { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.panel { display: none; }
.panel.active { display: block; }
.calc-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table th { color: var(--text-dim); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.kpi-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 20px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; min-width: 140px; }
.kpi .lbl { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.kpi .val { font-size: 1.25rem; font-weight: 700; }
.result-box { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-top: 14px; }
.result-box.error { border-color: var(--danger); }
.tag-unreg { color: var(--danger); font-size: 11px; font-weight: 600; }
.tag-region { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; background: #243044; color: #9db0c8; vertical-align: middle; }
.tag-region-ab { background: #1d3a2a; color: #3dd68c; }
.tag-region-on { background: #1d2f3a; color: #6ec8ff; }
.tag-region-us { background: #3a2a1d; color: #e0b06a; }
.money-pos { color: var(--accent); }
.money-neg { color: var(--danger); }
.odds-actions { display: flex; flex-wrap: wrap; gap: 6px; }
#app-root h2 { font-size: 1.25rem; margin: 0 0 10px; }
#app-root .toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 14px; }

/* Shared utilities used in place of inline style="" (CSP: style-src 'self'). */
.page { padding: 28px 0 64px; }
.page-narrow { max-width: 640px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.err { color: #f87171; }
.ok { color: #3dd68c; }
.muted { color: #9aa6b2; }
.inline-form { display: inline; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.toolbar-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: flex-start; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 16px 0; }
.chk-row { display: flex; align-items: center; gap: 8px; }
.form-grid { display: grid; gap: 12px; padding: 16px; }
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; }
.tag-pin, .tag-expired { font-size: 0.75rem; padding: 2px 8px; border-radius: 999px; }
.tag-pin { background: #1d3a2a; color: #3dd68c; }
.tag-expired { background: #2a1d1d; color: #f87171; }

.promo-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.promo-card { padding: 16px; }
.promo-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.promo-value { font-size: 1.1rem; margin: 8px 0; }
.promo-card.is-expired { opacity: 0.7; }

.nav-toggle {
  display: none;
  background: transparent;
  color: inherit;
  border: 1px solid #2a3542;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

/* Mobile: stack nav, prevent 390px horizontal overflow. */
@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    padding: 10px 14px;
  }
  header.site-header,
  .site-header {
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav.is-open > a,
  .site-nav.is-open a,
  .site-nav.is-open button,
  .site-nav.is-open .btn {
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
    min-height: 44px;
    box-sizing: border-box;
  }
  .site-nav a,
  .site-nav button,
  .site-nav .btn {
    width: 100%;
    text-align: left;
  }
  .site-nav .inline-form { display: block; width: 100%; }
  table { display: block; overflow-x: auto; max-width: 100%; }
  .odds-table, .tracker-table, pre { max-width: 100%; overflow-x: auto; }
  img, svg, video, canvas { max-width: 100%; height: auto; }
  input, select, textarea, button { max-width: 100%; }
  body { overflow-x: hidden; }
}

@media (max-width: 390px) {
  .wrap, .page { padding-left: 12px; padding-right: 12px; }
  h1 { font-size: 1.45rem; word-wrap: break-word; }
}

.page-narrow { max-width: 640px; }
.page-mid { max-width: 800px; }
.page-comfort { padding: 48px 0; }
.card-block { margin-top: 16px; }
.card-tight { margin: 16px 0; }
.card-center { max-width: 560px; margin: 0 auto; }
.card-link { display: block; margin-top: 12px; color: inherit; text-decoration: none; }
.author-gap { gap: 16px; }
.mt-8 { margin-top: 8px; }
.mt-14 { margin-top: 14px; }
.mt-16 { margin-top: 16px; }
.mt-18 { margin-top: 18px; }
.mt-20 { margin-top: 20px; }
.mb-14 { margin-bottom: 14px; }
.mb-16 { margin-bottom: 16px; }
.market-label { margin: 8px 0 4px; }
.table-wrap { overflow: auto; max-width: 100%; }
.best-price { font-weight: 700; }
.fld-inline { flex-direction: row; align-items: center; gap: 8px; margin-top: 22px; }

/* Phase 3: promo playbook, alert feed, mobile tab bar, odds cards */
.playbook-steps { margin: 0; padding-left: 1.2rem; display: grid; gap: 10px; }
.playbook-steps li { margin: 0; }
.alert-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.alert-card { padding: 14px 16px; }
.alert-card.is-unread { border-color: var(--accent); }
.alert-type { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); }
.tab-badge {
  display: inline-flex; min-width: 1.15rem; height: 1.15rem; padding: 0 5px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; align-items: center; justify-content: center;
  margin-left: 4px;
}
.desktop-only { display: block; }
.mobile-only { display: none; }
.odds-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.odds-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px;
}
.odds-card-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.odds-card-best { font-weight: 700; }
.odds-card-books { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; font-size: 13px; }
.odds-card-books li { display: flex; justify-content: space-between; gap: 8px; }
.tabs-sub { display: none; }

@media (max-width: 720px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: block; }
  body.is-app .tabs-top { display: none; }
  body.is-app .tabs-sub {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 8px 0 16px;
    -webkit-overflow-scrolling: touch;
  }
  body.is-app .tab-bar {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    margin: 0;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: rgba(11, 15, 20, 0.96);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(14px);
    justify-content: space-around;
    gap: 4px;
    flex-wrap: nowrap;
  }
  body.is-app .tab-bar button {
    flex: 1 1 0;
    flex-direction: column;
    border-radius: 10px;
    padding: 8px 4px;
    font-size: 11px;
    min-height: 48px;
    gap: 0;
  }
  body.is-app main.page,
  body.is-app main.wrap {
    padding-bottom: 96px;
  }
  body.is-app .site-footer { margin-bottom: 72px; }
  .odds-cards.mobile-only { display: grid; }
}

@media (min-width: 721px) {
  .tab-bar, .tabs-sub { display: none !important; }
  .mobile-only { display: none !important; }
  .desktop-only { display: block; }
  .table-wrap.desktop-only { display: block; }
}

.promo-card, .promo-value, .promo-card p, .card, .page, .wrap, .alert-card {
  overflow-wrap: anywhere;
  word-break: break-word;
}
input, select, textarea, button { max-width: 100%; }
input[type="file"] { width: 100%; max-width: 100%; }

/* Community page */
.community-rules {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 8px;
}
.community-rules a { overflow-wrap: anywhere; }
.invite-box { margin-top: 8px; }

/* Skip link and focus */
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  border-radius: 8px; padding: 8px 12px; font-weight: 700;
}
.skip-link:focus { top: 12px; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px; display: block; flex: 0 0 auto;
  background: var(--surface-2); border: 1px solid var(--border);
}

/* Visual polish */
.lede-sm { margin: 6px 0 16px; color: var(--text-dim); max-width: 40rem; }
.empty-state { text-align: center; padding: 32px 20px; }
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { color: var(--text-dim); }
.page-kicker { margin-bottom: 8px; }
.card { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset; }
.btn { transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease; }
h1, h2, h3 { letter-spacing: -0.02em; }

/* Member shell + Edgexa-style left sidebar */
:root {
  --sidebar-w: 248px;
  --sidebar-collapsed: 76px;
}
.app-topbar {
  position: sticky; top: 0; z-index: 30;
  display: none;
  align-items: center; gap: 10px;
  min-height: var(--header-h);
  padding: 8px 18px;
  background: rgba(11, 15, 20, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
body.is-member .app-topbar { display: flex; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar-link { color: var(--text-dim); font-size: 13px; font-weight: 600; }
.topbar-link:hover { color: var(--text); text-decoration: none; }

.sidebar-open,
.sidebar-collapse,
.sidebar-close {
  display: none;
  background: transparent;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 40px; min-width: 40px;
  padding: 6px 10px;
  cursor: pointer;
  font-weight: 700;
}
.sidebar-collapse { display: inline-flex; align-items: center; justify-content: center; }
body.sidebar-collapsed .sidebar-collapse span { display: inline-block; transform: rotate(180deg); }

.app-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  z-index: 45;
  display: none;
  flex-direction: column;
  background: #0d131a;
  border-right: 1px solid var(--border);
  overflow: hidden;
}
body.is-member .app-sidebar { display: flex; }
.sidebar-head {
  display: flex; align-items: center; gap: 8px;
  min-height: var(--header-h);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  color: inherit; text-decoration: none; min-width: 0; flex: 1;
}
.sidebar-brand:hover { text-decoration: none; }
.sidebar-brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.sidebar-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 10px 8px 16px;
}
.sidebar-foot {
  flex: 0 0 auto;
  padding: 10px 12px 16px;
  border-top: 1px solid var(--border);
}
.sidebar-foot-label { font-size: 11px; line-height: 1.45; margin: 0 0 10px; }
.sidebar-signout { margin: 0; }

.nav-group { display: grid; gap: 2px; margin: 0 0 14px; }
.nav-group-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-faint);
  padding: 6px 10px 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  min-height: 40px; padding: 6px 10px;
  border-radius: 9px;
  color: var(--text-dim); font-size: 13px; font-weight: 600;
  text-decoration: none;
}
.nav-item:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.nav-item.is-active,
.nav-item[aria-current="page"] {
  background: var(--accent-dim); color: var(--accent);
}
.nav-icon { flex: 0 0 auto; }
.nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0; z-index: 44;
  background: rgba(0, 0, 0, 0.52);
}

body.is-member .app-shell,
body.is-member .site-footer,
body.is-member .app-topbar {
  margin-left: var(--sidebar-w);
}
body.is-member .site-footer { margin-top: 24px; }

/* Collapsed (desktop icons only) */
body.is-member.sidebar-collapsed .app-sidebar { width: var(--sidebar-collapsed); }
body.is-member.sidebar-collapsed .app-shell,
body.is-member.sidebar-collapsed .site-footer,
body.is-member.sidebar-collapsed .app-topbar { margin-left: var(--sidebar-collapsed); }
body.is-member.sidebar-collapsed .nav-label,
body.is-member.sidebar-collapsed .nav-group-label,
body.is-member.sidebar-collapsed .sidebar-brand-text,
body.is-member.sidebar-collapsed .sidebar-foot-label,
body.is-member.sidebar-collapsed .sidebar-signout { display: none; }
body.is-member.sidebar-collapsed .nav-item { justify-content: center; padding-left: 0; padding-right: 0; }
body.is-member.sidebar-collapsed .sidebar-head { justify-content: center; padding-left: 8px; padding-right: 8px; }
body.is-member.sidebar-collapsed .sidebar-brand { justify-content: center; }

/* Member desktop: sidebar is primary nav, hide in-page tool tab lists */
@media (min-width: 961px) {
  body.is-member .tabs-top { display: none; }
  body.is-member .app-topbar .brand-text { display: none; }
}

/* Mobile / narrow: off-canvas drawer */
@media (max-width: 960px) {
  body.is-member .sidebar-open { display: inline-flex; align-items: center; justify-content: center; }
  body.is-member .sidebar-collapse { display: none; }
  body.is-member .sidebar-close { display: inline-flex; align-items: center; justify-content: center; }
  body.is-member .app-sidebar {
    width: min(var(--sidebar-w), 86vw);
    transform: translateX(-110%);
    transition: transform 0.2s ease;
    box-shadow: none;
  }
  body.is-member.sidebar-open .app-sidebar { transform: translateX(0); box-shadow: 8px 0 32px rgba(0, 0, 0, 0.35); }
  body.is-member.sidebar-open .sidebar-backdrop { display: block; }
  body.is-member .app-shell,
  body.is-member .site-footer,
  body.is-member .app-topbar { margin-left: 0; }
  body.is-member.sidebar-collapsed .app-sidebar { width: min(var(--sidebar-w), 86vw); }
  body.is-member.sidebar-collapsed .nav-label,
  body.is-member.sidebar-collapsed .nav-group-label,
  body.is-member.sidebar-collapsed .sidebar-brand-text,
  body.is-member.sidebar-collapsed .sidebar-foot-label,
  body.is-member.sidebar-collapsed .sidebar-signout { display: unset; }
  body.is-member.sidebar-collapsed .sidebar-signout { display: block; }
  body.is-member.sidebar-collapsed .nav-item { justify-content: flex-start; padding: 6px 10px; }
}

@media (max-width: 375px) {
  .wrap, .page { padding-left: 12px; padding-right: 12px; }
  .app-topbar { padding-left: 10px; padding-right: 10px; }
  .hero { padding: 32px 0 24px; }
  .auth-card { margin-top: 28px; }
}

@media (min-width: 1440px) {
  body.is-public { --max: 1200px; }
}

/* Prevent member footer sitting under the mobile tool tab bar */
@media (max-width: 720px) {
  body.is-app.is-member .site-footer { margin-bottom: 72px; }
}

/* Refer & Earn share row (/account/referrals) */
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0 10px; }
.share-row .ref-share-url { flex: 1 1 260px; min-width: 0; }
.ref-share-status { min-height: 1.5em; font-weight: 600; color: var(--accent); }
.ref-share-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Sportsbook picker + EV finder */
.book-picker summary { cursor: pointer; }
.book-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 14px; margin-top: 8px; }
.book-pick { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.my-book { background: rgba(61, 214, 140, 0.08); }
.tag-mine { color: #f5c542; font-size: 12px; }
.ev-pos { color: #3dd68c; font-weight: 700; }
.th-sort { background: none; border: 0; color: inherit; font: inherit; font-weight: 700; cursor: pointer; padding: 0; }
.th-sort.active { text-decoration: underline; }
.rg-note p { margin: 4px 0; font-size: 13px; }
