/* =============================================================================
   EDGEBOOK — dark trading theme (prematch odds comparison + matched betting)
   Ported from the product design reference; phone frame dropped in favour of a
   responsive single-column app shell.
   ========================================================================== */

:root{
  --bg:#121212;
  --bg-2:#1a1a1a;
  --row-div:#242424;
  --btn-bg:#242424;
  --btn-border:#333333;
  --pill-bg:#1e1e1e;
  --pill-border:#333333;
  --text:#f2f2f2;
  --text-dim:#9b9b9b;
  --text-faint:#6b6b6b;
  --gold:#E8B84B;
  --gold-ink:#1a1400;
  --green:#38C172;
  --red:#E5484D;
  --amber:#d9932b;
  --app-max:520px;
  font-family:"Helvetica Neue",-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
}

*{ box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body{ margin:0; padding:0; }
body{
  background:var(--bg); color:var(--text);
  min-height:100vh;
  max-width:var(--app-max); margin:0 auto;
  border-left:1px solid #262626; border-right:1px solid #262626;
  padding-bottom:150px;
}

/* ---------- Top bar ---------- */
.topbar{ padding:14px 14px 0; border-bottom:1px solid var(--row-div); }
.auth-row{ display:flex; align-items:center; justify-content:space-between; padding-bottom:12px; }
.menu-ico-btn{ display:flex; align-items:center; justify-content:center; color:var(--text); text-decoration:none; }
.menu-ico{ width:20px; height:20px; color:var(--text); }
.logo{ font-weight:800; font-size:15px; letter-spacing:-.01em; }
.logo span{ color:var(--gold); }
.auth-btns{ display:flex; gap:8px; }
.btn-outline{ padding:7px 14px; border-radius:999px; border:1px solid #4a4a4a; background:transparent; color:var(--text); font-size:12px; font-weight:700; font-family:inherit; }
.btn-gold{ padding:7px 16px; border-radius:999px; border:none; background:var(--gold); color:var(--gold-ink); font-size:12px; font-weight:800; font-family:inherit; }

.crumb-row{ display:flex; align-items:center; justify-content:space-between; padding:12px 0 10px; }
.crumb-left{ display:flex; align-items:center; gap:9px; }
.crumb-left svg{ width:17px; height:17px; color:var(--text-dim); }
.crumb-left a{ display:flex; }
.crumb-title{ font-size:14.5px; font-weight:800; letter-spacing:.01em; }

.pills-row{ display:flex; gap:7px; overflow-x:auto; padding:10px 0; scrollbar-width:none; }
.pills-row::-webkit-scrollbar{ display:none; }
.pill{ flex:0 0 auto; padding:6px 13px; border-radius:999px; background:var(--pill-bg); border:1px solid var(--pill-border); color:var(--text-dim); font-size:11.5px; font-weight:700; white-space:nowrap; font-family:inherit; line-height:1; cursor:pointer; }
.pill.active{ background:var(--gold); color:var(--gold-ink); border-color:var(--gold); }
.pill.disabled{ opacity:.4; }

.col-head{ display:flex; align-items:center; justify-content:flex-end; padding:2px 14px 8px; gap:8px; }
.col-head span{ width:58px; text-align:center; font-size:10.5px; font-weight:700; color:var(--text-faint); text-transform:uppercase; letter-spacing:.04em; }

/* ---------- Page body ---------- */
.page{ display:block; }
.section-label{ font-size:10.5px; letter-spacing:.06em; text-transform:uppercase; color:var(--text-faint); font-weight:700; margin:16px 14px 8px; }
.date-group{ padding:10px 14px 4px; font-size:10.5px; font-weight:800; color:var(--text-faint); letter-spacing:.06em; text-transform:uppercase; background:var(--bg-2); }
.empty-state{ padding:40px 20px; text-align:center; color:var(--text-faint); font-size:13px; }

/* ---------- Freshness / data-state ---------- */
.freshness-line{ padding:8px 14px; font-size:11px; color:var(--text-faint); border-bottom:1px solid var(--row-div); }
.freshness-line b{ color:var(--text-dim); font-weight:700; }
.data-warning{ margin:10px 14px; padding:10px 12px; border-radius:8px; background:rgba(229,72,77,.10); border:1px solid rgba(229,72,77,.35); color:#f0a9ab; font-size:11.5px; font-weight:600; }
.stale-badge{ display:inline-block; margin-left:6px; padding:1px 6px; border-radius:4px; font-size:9px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; color:var(--amber); background:rgba(217,147,43,.14); border:1px solid rgba(217,147,43,.4); }
.odds-closed{ font-size:11px; font-weight:700; color:var(--text-faint); }
.skeleton{ background:linear-gradient(90deg,#1c1c1c 25%,#242424 37%,#1c1c1c 63%); background-size:400% 100%; animation:sk 1.4s ease infinite; border-radius:6px; color:transparent!important; }
@keyframes sk{ 0%{background-position:100% 50%} 100%{background-position:0 50%} }

/* ---------- Match rows ---------- */
.match-row{ padding:11px 14px; border-bottom:1px solid var(--row-div); }
.row-flex{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.team-col{ flex:1; min-width:0; text-decoration:none; color:inherit; display:block; }
.team-line{ display:flex; align-items:center; gap:8px; padding:2.5px 0; }
.team-name{ font-size:13.5px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.meta-line{ display:flex; align-items:center; gap:6px; padding-top:5px; flex-wrap:wrap; }
.meta-time{ font-size:11px; color:var(--text-faint); font-weight:600; }
.league-badge{ font-size:10.5px; color:var(--text-faint); font-weight:700; }
.live-top{ display:flex; align-items:center; gap:6px; padding-bottom:5px; }
.live-dot{ width:5px; height:5px; border-radius:50%; background:var(--red); animation:pulse 1.3s infinite; }
@keyframes pulse{ 0%,100%{opacity:1} 50%{opacity:.25} }
.live-lbl{ font-size:10.5px; font-weight:800; color:var(--red); letter-spacing:.03em; }

.odds-col{ display:flex; gap:6px; flex:0 0 auto; }
.odd-btn{ width:58px; height:44px; border-radius:8px; background:var(--btn-bg); border:1px solid var(--btn-border); display:flex; align-items:center; justify-content:center; font-family:inherit; font-size:14px; font-weight:800; color:var(--gold); cursor:pointer; }
.odd-btn:active{ transform:scale(.96); }
.odd-btn.selected{ background:var(--gold); border-color:var(--gold); color:var(--gold-ink); }
.odd-btn[disabled]{ color:var(--text-faint); cursor:default; }
.odd-btn.stale{ border-color:var(--amber); color:var(--amber); }

/* ---------- League selector (home) ---------- */
.league-row{ display:flex; align-items:center; justify-content:space-between; padding:14px; border-bottom:1px solid var(--row-div); text-decoration:none; color:var(--text); }
.league-row-title{ font-size:13.5px; font-weight:700; }
.league-row-sub{ font-size:11px; color:var(--text-faint); font-weight:600; margin-top:2px; }
.chevron{ width:16px; height:16px; color:var(--text-faint); }
.league-group{ border:none; }
.league-group-head{ display:flex; align-items:center; gap:10px; padding:13px 14px; background:var(--bg-2); border-top:1px solid var(--row-div); border-bottom:1px solid var(--row-div); font-size:12.5px; font-weight:800; letter-spacing:.02em; text-transform:uppercase; color:var(--text-dim); cursor:pointer; list-style:none; }
.league-group-head::-webkit-details-marker{ display:none; }
.league-group-head span{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.league-group-chev{ transition:transform .15s; flex:0 0 auto; }
.league-group:not([open]) .league-group-chev{ transform:rotate(-90deg); }
.league-group .league-row:last-child{ border-bottom:none; }

/* ---------- Detail screen ---------- */
.back-row{ display:flex; align-items:center; gap:10px; padding:14px; border-bottom:1px solid var(--row-div); }
.icon-btn{ width:30px; height:30px; border-radius:8px; background:var(--pill-bg); border:1px solid var(--pill-border); display:flex; align-items:center; justify-content:center; color:var(--text); }
.icon-btn svg{ width:15px; height:15px; }
.back-title{ font-weight:800; font-size:14.5px; }

.detail-meta-block{ text-align:center; padding:16px 14px 12px; border-bottom:1px solid var(--row-div); }
.detail-matchup{ font-size:15px; font-weight:800; }
.detail-matchup span{ color:var(--text-faint); font-weight:600; font-size:12px; margin:0 6px; }
.detail-sub{ font-size:11.5px; color:var(--text-dim); font-weight:600; margin-top:4px; }

.cmp-table{ margin:0 14px; background:var(--bg-2); border:1px solid var(--row-div); border-radius:12px; overflow:hidden; }
.cmp-head{ display:grid; grid-template-columns:24px 1.4fr .8fr .8fr .8fr; gap:6px; padding:10px 13px; font-size:10px; font-weight:700; color:var(--text-faint); letter-spacing:.05em; text-transform:uppercase; border-bottom:1px solid var(--row-div); }
.cmp-head span{ text-align:center; } .cmp-head span:nth-child(2){ text-align:left; }
.cmp-row{ display:grid; grid-template-columns:24px 1.4fr .8fr .8fr .8fr; gap:6px; align-items:center; padding:10px 13px; border-bottom:1px solid var(--row-div); }
.cmp-row:last-child{ border-bottom:none; }
.cmp-check-wrap{ display:flex; align-items:center; justify-content:center; cursor:pointer; }
.cmp-check-wrap input{ position:absolute; opacity:0; width:0; height:0; }
.cmp-check{ width:18px; height:18px; border-radius:4px; border:1.5px solid var(--pill-border); background:var(--bg); flex:0 0 auto; position:relative; }
.cmp-check-wrap input:checked + .cmp-check{ background:var(--gold); border-color:var(--gold); }
.cmp-check-wrap input:checked + .cmp-check::after{ content:""; position:absolute; left:5px; top:1px; width:5px; height:10px; border:solid var(--gold-ink); border-width:0 2.5px 2.5px 0; transform:rotate(45deg); }
.cmp-check-wrap input:focus-visible + .cmp-check{ outline:2px solid var(--gold); outline-offset:2px; }
.book-name{ font-size:12px; font-weight:700; color:var(--text-dim); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.price{ text-align:center; font-size:13.5px; font-weight:700; color:var(--text-dim); }
.price.best{ color:var(--gold); font-weight:800; }
.price.empty{ color:var(--text-faint); }
.price.stale{ color:var(--amber); }

/* ---------- Qualifying-loss calculator ---------- */
.calc-card{ margin:14px 14px 0; background:var(--bg-2); border:1px solid var(--row-div); border-radius:12px; padding:14px; }
.calc-title{ font-size:12.5px; font-weight:800; margin-bottom:4px; }
.calc-sub{ font-size:10.5px; color:var(--text-faint); margin-bottom:10px; }
.calc-row{ display:flex; justify-content:space-between; padding:6px 0; font-size:12px; color:var(--text-dim); border-bottom:1px dashed var(--row-div); }
.calc-row:last-child{ border-bottom:none; padding-top:9px; }
.calc-row .num{ color:var(--text); font-weight:700; }
.calc-row.total .num{ color:var(--green); font-size:14.5px; font-weight:800; }
.calc-row.total.loss .num{ color:var(--red); }
.calc-row.total .label{ font-weight:700; color:var(--text); }
.calc-stake{ width:84px; background:var(--btn-bg); border:1px solid var(--btn-border); color:var(--text); font-family:inherit; font-size:12px; font-weight:700; border-radius:6px; padding:4px 6px; text-align:right; }

/* ---------- Matched bets ---------- */
.mb-toolbar{ display:flex; align-items:center; justify-content:space-between; padding:12px 14px 8px; }
.mb-row{ padding:12px 14px; border-bottom:1px solid var(--row-div); }
.mb-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.mb-teams{ font-size:13.5px; font-weight:700; line-height:1.3; color:inherit; text-decoration:none; display:block; }
.mb-meta{ display:flex; align-items:center; gap:6px; margin-top:3px; }
.mb-date{ font-size:11px; color:var(--text-faint); font-weight:600; }
.mb-tag{ font-size:9.5px; font-weight:800; text-transform:uppercase; letter-spacing:.03em; color:var(--text-dim); background:var(--pill-bg); border:1px solid var(--pill-border); padding:1.5px 6px; border-radius:4px; }
.mb-compare{ display:flex; align-items:center; gap:10px; margin-top:11px; }
.mb-side{ flex:1; min-width:0; }
.mb-side.back{ padding-right:10px; border-right:1px solid var(--row-div); }
.mb-side-lbl{ font-size:9.5px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; color:var(--text-faint); margin-bottom:3px; }
.mb-side-odd{ font-size:15px; font-weight:800; color:var(--text); }
.mb-side-book{ font-size:10.5px; color:var(--text-dim); font-weight:600; margin-top:1px; }
.mb-return{ flex:0 0 auto; text-align:center; padding:5px 9px; border-radius:7px; font-size:13px; font-weight:800; }
.mb-return.pos{ color:var(--green); background:rgba(56,193,114,.12); border:1px solid rgba(56,193,114,.35); }
.mb-return.neg{ color:var(--red); background:rgba(229,72,77,.12); border:1px solid rgba(229,72,77,.35); }
.mb-return .rl{ display:block; font-size:8px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; opacity:.75; margin-bottom:1px; }

/* ---------- Matched Bets: account filter ---------- */
.mb-filters{ display:flex; gap:8px; padding:2px 14px 10px; }
.mb-filter-chip{ flex:1; display:flex; align-items:center; justify-content:center; gap:5px; padding:8px 10px; border-radius:8px; background:var(--pill-bg); border:1px solid var(--pill-border); color:var(--text-dim); font-size:12px; font-weight:700; font-family:inherit; cursor:pointer; }
.mb-filter-chip.narrowed{ color:var(--gold); border-color:var(--gold); background:rgba(232,184,75,.08); }
.mb-filter-chip svg{ width:12px; height:12px; flex:0 0 auto; }
.mb-filter-count{ font-size:10px; font-weight:800; }

.fscrim{ position:fixed; inset:0; background:rgba(0,0,0,.6); opacity:0; pointer-events:none; transition:opacity .18s; z-index:25; }
.fscrim.open{ opacity:1; pointer-events:auto; }
.fsheet{ position:fixed; left:50%; transform:translate(-50%, 100%); bottom:0; width:100%; max-width:var(--app-max); max-height:72vh; background:var(--bg); border-top:1px solid var(--row-div); border-radius:16px 16px 0 0; transition:transform .22s ease; z-index:26; display:flex; flex-direction:column; }
.fsheet.open{ transform:translate(-50%, 0); }
.fsheet[inert]{ visibility:hidden; }
.fsheet.open[inert]{ visibility:visible; }
.fsheet-handle{ width:36px; height:4px; border-radius:2px; background:#333; margin:10px auto 4px; flex:0 0 auto; }
.fsheet-head{ display:flex; align-items:center; justify-content:space-between; padding:6px 16px 12px; border-bottom:1px solid var(--row-div); flex:0 0 auto; }
.fsheet-title{ font-size:14.5px; font-weight:800; }
.fsheet-toggle-all{ font-size:11.5px; color:var(--gold); font-weight:700; background:none; border:none; font-family:inherit; cursor:pointer; }
.fsheet-body{ overflow-y:auto; padding:2px 16px 8px; }
.fopt-row{ display:flex; align-items:center; gap:10px; padding:11px 0; border-bottom:1px solid var(--row-div); cursor:pointer; }
.fopt-row:last-child{ border-bottom:none; }
.fopt-name{ flex:1; min-width:0; font-size:13.5px; font-weight:700; }
.fopt-row input{ position:absolute; opacity:0; width:0; height:0; }
.fopt-check{ width:20px; height:20px; border-radius:5px; border:1.5px solid var(--pill-border); flex:0 0 auto; position:relative; }
.fopt-row input:checked + .fopt-check{ background:var(--gold); border-color:var(--gold); }
.fopt-row input:checked + .fopt-check::after{ content:""; position:absolute; left:6px; top:2px; width:5px; height:10px; border:solid var(--gold-ink); border-width:0 2.5px 2.5px 0; transform:rotate(45deg); }
.fopt-row input:focus-visible + .fopt-check{ outline:2px solid var(--gold); outline-offset:2px; }
.fsheet-foot{ padding:12px 16px calc(env(safe-area-inset-bottom,10px) + 12px); flex:0 0 auto; }
.fsheet-done{ width:100%; background:var(--gold); color:var(--gold-ink); border:none; border-radius:10px; padding:13px; font-size:14px; font-weight:800; font-family:inherit; cursor:pointer; }

/* ---------- Account ---------- */
.info-card{ margin:12px 14px; background:var(--bg-2); border:1px solid var(--row-div); border-radius:12px; padding:14px; }
.info-card h3{ margin:0 0 5px; font-size:13px; }
.info-card p{ margin:0; font-size:12px; color:var(--text-dim); line-height:1.5; }

.acct-intro{ margin:0 14px 8px; font-size:11.5px; color:var(--text-faint); line-height:1.5; }
.acct-form{ margin:0 14px; background:var(--bg-2); border:1px solid var(--row-div); border-radius:12px; overflow:hidden; }
.acct-group-label{ padding:10px 13px 6px; font-size:9.5px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--text-faint); background:var(--bg); border-bottom:1px solid var(--row-div); }
.acct-row{ display:flex; align-items:center; gap:10px; padding:11px 13px; border-bottom:1px solid var(--row-div); cursor:pointer; }
.acct-row:last-child{ border-bottom:none; }
.acct-name{ flex:1; min-width:0; font-size:12.5px; font-weight:700; color:var(--text-dim); }
.acct-row input{ position:absolute; opacity:0; width:0; height:0; }
.acct-check{ width:20px; height:20px; border-radius:5px; border:1.5px solid var(--pill-border); background:var(--bg); flex:0 0 auto; position:relative; }
.acct-row input:checked + .acct-check{ background:var(--gold); border-color:var(--gold); }
.acct-row input:checked + .acct-check::after{ content:""; position:absolute; left:6px; top:2px; width:5px; height:10px; border:solid var(--gold-ink); border-width:0 2.5px 2.5px 0; transform:rotate(45deg); }
.acct-row input:focus-visible + .acct-check{ outline:2px solid var(--gold); outline-offset:2px; }
.acct-save{ display:block; width:calc(100% - 26px); margin:12px 13px; background:var(--gold); color:var(--gold-ink); border:none; border-radius:8px; padding:11px; font-size:13px; font-weight:800; font-family:inherit; }

/* ---------- Bottom nav ---------- */
.bottom-nav{ position:fixed; left:50%; transform:translateX(-50%); bottom:0; width:100%; max-width:var(--app-max); background:#0c0c0c; border-top:1px solid var(--row-div); z-index:20; }
.bottom-nav-inner{ display:flex; padding:9px 4px calc(env(safe-area-inset-bottom,10px) + 6px); }
.nav-item{ flex:1; display:flex; flex-direction:column; align-items:center; gap:4px; color:var(--text-faint); font-size:10px; font-weight:700; padding:2px 0; text-decoration:none; }
.nav-item svg{ width:20px; height:20px; }
.nav-item.active{ color:var(--gold); }

/* ---------- Price dock (betslip) ---------- */
.dock{ position:fixed; left:50%; transform:translateX(-50%); bottom:60px; width:100%; max-width:var(--app-max); z-index:15; background:var(--bg-2); border-top:1px solid var(--row-div); border-radius:12px 12px 0 0; box-shadow:0 -6px 18px rgba(0,0,0,.35); max-height:70vh; display:flex; flex-direction:column; overflow:hidden; }
.dock[hidden]{ display:none; }
.dock-inner{ display:flex; flex-direction:column; min-height:0; }
.dock-collapsed{ display:flex; align-items:center; gap:10px; padding:10px 14px; }
.dock-toggle{ flex:1; min-width:0; display:flex; align-items:center; gap:10px; background:none; border:none; padding:0; font:inherit; color:inherit; text-align:left; cursor:pointer; }
.dock-badge{ width:22px; height:22px; border-radius:6px; background:var(--gold); color:var(--gold-ink); font-size:11.5px; font-weight:800; display:flex; align-items:center; justify-content:center; flex:0 0 auto; }
.dock-summary{ flex:1; min-width:0; font-size:12.5px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dock-summary b{ color:var(--gold); }
.dock-actions{ display:flex; align-items:center; gap:10px; flex:0 0 auto; }
.dock-icon-btn{ width:22px; height:22px; border-radius:6px; display:flex; align-items:center; justify-content:center; color:var(--text-faint); background:none; border:none; padding:0; font:inherit; cursor:pointer; }
.dock-chevron{ color:var(--text-dim); transition:transform .15s; }
.dock.expanded .dock-chevron{ transform:rotate(180deg); }
.dock-expanded{ display:none; overflow-y:auto; padding:0 14px 14px; border-top:1px solid var(--row-div); min-height:0; }
.dock.expanded .dock-expanded{ display:block; }

.dleg{ display:flex; align-items:center; justify-content:space-between; padding:9px 0; border-bottom:1px solid var(--row-div); gap:10px; }
.dleg-info{ min-width:0; }
.dleg-match{ font-size:11px; color:var(--text-faint); font-weight:600; }
.dleg-sel{ font-size:12.5px; font-weight:700; margin-top:1px; }
.dleg.unavailable .dleg-sel{ color:var(--red); }
.dleg-price{ display:flex; align-items:center; gap:8px; flex:0 0 auto; }
.dleg-book{ text-align:right; }
.dleg-book .odd{ font-size:13px; font-weight:800; color:var(--gold); }
.dleg-book .book{ font-size:10px; color:var(--text-faint); font-weight:600; }
.dleg-remove{ width:20px; height:20px; border-radius:50%; background:var(--pill-bg); border:1px solid var(--pill-border); display:flex; align-items:center; justify-content:center; color:var(--text-dim); flex:0 0 auto; cursor:pointer; font:inherit; font-size:10px; padding:0; }
.dleg-remove svg{ width:10px; height:10px; }

.dock-best{ margin-top:10px; background:var(--bg); border:1px solid var(--gold); border-radius:10px; padding:11px 13px; }
.dock-best.none{ border-color:var(--row-div); }
.dock-best-tag{ font-size:9.5px; font-weight:800; color:var(--gold-ink); background:var(--gold); padding:2px 7px; border-radius:5px; letter-spacing:.03em; }
.dock-best-row{ display:flex; justify-content:space-between; align-items:center; padding-top:8px; }
.dock-best-name{ font-size:14px; font-weight:800; }
.dock-best-odds{ font-size:13px; color:var(--text-dim); font-weight:700; }
.dock-legs{ margin-top:8px; }
.dock-legrow{ display:flex; justify-content:space-between; font-size:11px; color:var(--text-dim); padding:3px 0; }
.dock-go{ display:block; width:100%; margin-top:9px; background:var(--gold); color:var(--gold-ink); border:none; border-radius:8px; padding:10px; font-size:13px; font-weight:800; font-family:inherit; text-align:center; text-decoration:none; }
.dock-note{ font-size:10.5px; color:var(--text-faint); text-align:center; margin-top:8px; line-height:1.4; }
.dock-bestleg{ font-size:10.5px; color:var(--text-faint); margin-top:6px; }
.dock-bestleg b{ color:var(--text-dim); }

/* ---------- Home: Today's Football ---------- */
.home-head{ padding:12px 0 6px; }
.home-title{ font-size:16.5px; font-weight:800; letter-spacing:-.01em; }
.home-sub{ font-size:11.5px; color:var(--text-faint); font-weight:600; margin-top:2px; }

.comp-group{ border:none; }
.comp-header{
  display:flex; align-items:center; gap:9px; padding:11px 14px; cursor:pointer;
  background:var(--bg-2); border-top:1px solid var(--row-div); border-bottom:1px solid var(--row-div);
  list-style:none;
}
.comp-header::-webkit-details-marker{ display:none; }
.comp-name{ flex:1; min-width:0; font-size:12.5px; font-weight:800; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.comp-link{ font-size:10.5px; color:var(--gold); font-weight:700; display:flex; align-items:center; gap:1px; flex:0 0 auto; white-space:nowrap; text-decoration:none; }
.comp-link svg{ width:12px; height:12px; }
.comp-chev{ width:16px; height:16px; color:var(--text-faint); transition:transform .15s; flex:0 0 auto; }
.comp-group:not([open]) .comp-chev{ transform:rotate(-90deg); }

/* ---------- Search results ---------- */
.search-match{ display:block; padding:12px 14px; border-bottom:1px solid var(--row-div); text-decoration:none; color:var(--text); }
.search-match-title{ font-size:13.5px; font-weight:700; }
.search-match-sub{ font-size:11px; color:var(--text-faint); font-weight:600; margin-top:2px; }

/* ---------- A-Z drawer ---------- */
.menu-scrim{ position:fixed; inset:0; background:rgba(0,0,0,.6); opacity:0; pointer-events:none; transition:opacity .18s; z-index:30; }
.menu-scrim.open{ opacity:1; pointer-events:auto; }
.drawer{
  position:fixed; top:0; bottom:0;
  left:50%; margin-left:calc(min(100vw, var(--app-max)) / -2);
  width:min(82vw, 300px);
  background:var(--bg); border-right:1px solid var(--row-div); z-index:31;
  transform:translateX(-100%); transition:transform .22s ease;
  display:flex; flex-direction:column; overflow-y:auto;
}
.drawer.open{ transform:translateX(0); }
.drawer[inert]{ visibility:hidden; }
.drawer.open[inert]{ visibility:visible; } /* defensive: .open always wins */
.drawer-head{ display:flex; align-items:center; justify-content:space-between; padding:16px 14px 14px; border-bottom:1px solid var(--row-div); flex:0 0 auto; }
.drawer-search{ display:flex; align-items:center; gap:8px; margin:12px 14px 0; background:var(--bg-2); border:1px solid var(--row-div); border-radius:8px; padding:9px 12px; color:var(--text-faint); font-size:12.5px; flex:0 0 auto; }
.drawer-search svg{ width:14px; height:14px; flex:0 0 auto; }
.drawer-search input{ flex:1; min-width:0; background:transparent; border:none; outline:none; color:var(--text); font-family:inherit; font-size:12.5px; }
.drawer-search input::placeholder{ color:var(--text-faint); }
.az-list{ padding:2px 0 24px; }
.az-row{ display:flex; align-items:center; gap:10px; padding:11px 14px; border-bottom:1px solid var(--row-div); font-size:13px; font-weight:700; color:var(--text-dim); text-decoration:none; }
.az-row.active{ color:var(--gold); }
.az-row.az-disabled{ color:var(--text-faint); }
.az-soon{ margin-left:auto; font-size:8.5px; font-weight:800; color:var(--text-faint); border:1px solid var(--pill-border); border-radius:4px; padding:1.5px 5px; letter-spacing:.03em; }
.az-sub-row{ display:flex; align-items:center; gap:8px; padding:9px 14px 9px 34px; font-size:12px; color:var(--text-dim); font-weight:600; border-bottom:1px solid var(--row-div); text-decoration:none; }
.az-sub-row:hover{ color:var(--text); }
.az-group{ border-bottom:1px solid var(--row-div); }
.az-group-head{ display:flex; align-items:center; gap:10px; padding:11px 14px; font-size:13px; font-weight:700; color:var(--text-dim); cursor:pointer; list-style:none; }
.az-group-head::-webkit-details-marker{ display:none; }
.az-group-name{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.az-group[open] .az-group-head{ color:var(--text); }
.az-group-chev{ width:15px; height:15px; color:var(--text-faint); flex:0 0 auto; transition:transform .15s; }
.az-group:not([open]) .az-group-chev{ transform:rotate(-90deg); }
.az-group .az-sub-row:last-child{ border-bottom:none; }

:focus-visible{ outline:2px solid var(--gold); outline-offset:2px; }

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{ animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; }
}
