/* RiconTop Footy dark mode. Applies when <html> has the class "dark" (set by theme.js: the visitor's
   choice, or their phone/computer setting). Works with both looks (classic and glass). */
html.dark { color-scheme: dark;
  --bg:#161616; --soft:#222222; --ink:#ececec; --muted:#a3a3a3; --line:#333333; --brand:#9db0ff; --live:#f87171;
  --d-card:#1f1f1f; --d-card2:#1a1a1a; --d-soft:#2a2a2a; --d-hi:#2b3150; --d-text:#ececec; --d-text2:#d4d4d4; --d-muted:#a3a3a3; }
html.dark, html.dark body { background:#161616; color:var(--d-text); }

/* surfaces that were white */
html.dark header, html.dark .comp, html.dark .shelf-btn, html.dark .game, html.dark section, html.dark .leader,
html.dark table.stats th, html.dark .card, html.dark button.adm, html.dark .mk-menu, html.dark .sugg .it button,
html.dark .btn, html.dark form.contact input, html.dark form.contact select, html.dark form.contact textarea,
html.dark .search .results, html.dark .filters select, html.dark .search input, html.dark .rtc-panel, html.dark .fx,
html.dark .rtc-form input, html.dark .alsolive a, html.dark .tile, html.dark .quick > *, html.dark .myclub select { background:var(--d-card) !important; color:var(--d-text); }
html.dark header { background:rgba(22,22,22,.9) !important; }
html.dark table.stats td { background:var(--d-card); }
html.dark table.stats tbody tr:nth-child(even) td, html.dark table.t tbody tr:nth-child(even) td { background:var(--d-card2) !important; }
html.dark .game:hover, html.dark a.tile.link:hover, html.dark .mk-menu button:hover { background:var(--d-soft) !important; }
html.dark .comp .seg, html.dark .pbar .q, html.dark .comptabs, html.dark .roundbar .arrow, html.dark .myclub,
html.dark .leader .lphoto, html.dark .hero .pphoto img, html.dark .btn-ghost { background:var(--d-soft) !important; }
html.dark .comp .seg a.on, html.dark .comptabs a.on { background:#383838 !important; color:#fff !important; }
html.dark button.adm.on, html.dark .mk-menu button.on, html.dark .sugg .it button.on, html.dark table.t tr.cur td { background:var(--d-hi) !important; }
/* tinted notes */
html.dark .sugg, html.dark .waitnote, html.dark .rtc-msg.bot { background:#241f0e !important; border-color:#5c4b16 !important; }
html.dark .sugg .it { border-color:#5c4b16 !important; }
html.dark .alsolive a { border-color:#5b2329 !important; }
html.dark .alsolive a:hover, html.dark td.pts .delta.down, html.dark .inbox .item.overdue { background:#2a1418 !important; }
html.dark .fx.live { background:linear-gradient(#1f1f1f, #261a1a) !important; border-color:#5b2329 !important; }
html.dark .nem { background:#10261a !important; }
html.dark .fav { background:#2a1424 !important; }
html.dark body.adm-picking table.stats tbody tr:hover td { background:#2b2610 !important; }
html.dark .chip.tag.upside { background:#3a2f0b !important; } html.dark .chip.tag.steady { background:#1e2a52 !important; }
html.dark .adm-bar { background:#111 !important; color:#fff; }
/* text */
html.dark .comp .seg a:hover, html.dark .shelf-btn, html.dark .pname, html.dark .fx-team .real b, html.dark .btn-ghost,
html.dark .roundbar .arrow, html.dark .myclub select, html.dark .rtc-panel { color:var(--d-text) !important; }
html.dark .lede, html.dark .chip, html.dark .why { color:var(--d-text2) !important; }
html.dark .comp .seg a, html.dark footer.site a, html.dark .kicker, html.dark .pmeta, html.dark .pproj small, html.dark .capteaser .opp,
html.dark .hero .pcredit, html.dark .comptabs a, html.dark .dayhead, html.dark .fx.final .fx-team:not(.win), html.dark .fx-team .real,
html.dark .fx-meta, html.dark .countdown small, html.dark .ft, html.dark .rtc-head .rtc-me, html.dark .rtc-close, html.dark .rtc-msg .t,
html.dark .rtc-empty, html.dark .rtc-note, html.dark .rtc-hint, html.dark .rtc-agree, html.dark .rtc-msg .x.rep, html.dark .muted { color:var(--d-muted) !important; }
html.dark a { color:#a5b8ff; }
html.dark .plink, html.dark .topnav a, html.dark .fx a.btn-live, html.dark .btn-live { color:inherit; }
html.dark .btn-live { color:#fff !important; }
/* lines */
html.dark *, html.dark *::before, html.dark *::after { border-color:var(--line); }
html.dark .rtc-head, html.dark .rtc-foot, html.dark .rtc-form input, html.dark .fx, html.dark .btn-ghost { border-color:var(--line) !important; }
html.dark hr { border-color:var(--line); }
/* bits that must stay light-on-dark or keep their colour */
html.dark .flag { box-shadow:0 0 0 1px rgba(255,255,255,.25); }
html.dark .pav.init span, html.dark .hero .pinit span { background:rgba(20,20,20,.85) !important; color:#fff !important; }
html.dark .strip .game.livecard::before { background: linear-gradient(var(--d-card), var(--d-card)) padding-box,
    conic-gradient(from var(--rt-a), rgba(255,255,255,.08) 0 55%, var(--c1, #dc2626) 70%, var(--c2, #93a8ff) 85%, rgba(255,255,255,.08) 100%) border-box !important; }
html.dark .fx.live::before { background: linear-gradient(#1f1f1f, #1f1f1f) padding-box,
    conic-gradient(from var(--rt-a), rgba(255,255,255,.08) 0 55%, var(--c1, #dc2626) 70%, var(--c2, #93a8ff) 85%, rgba(255,255,255,.08) 100%) border-box !important; }
html.dark img.icon, html.dark .icons img { filter: none; }
html.dark .leadbox .leaders.ringmode .leader { background:rgba(36,36,36,.97) !important; box-shadow:0 10px 28px rgba(0,0,0,.45); }
html.dark .leaders.ringmode .leader.zoomed { box-shadow:0 18px 40px rgba(0,0,0,.6), 0 0 0 1px rgba(147,168,255,.35); }
html.dark .leaders.ringmode .ldots i { background:#444; } html.dark .leaders.ringmode .ldots i.on { background:#93a8ff; }
html.dark .glide.glide.glide > a.on:not(.lit) { color:var(--d-muted) !important; }

/* ---- dark + glass: smoked glass over a deep tinted background ---- */
html.glass.dark { --glass: rgba(38,38,38,.42); --glass-solid: rgba(30,30,30,.9); --edge: rgba(255,255,255,.09); background:#101010; }
html.glass.dark body::before { background:
    radial-gradient(55% 40% at 10% 5%, var(--tint-a, rgba(120,120,120,.5)), transparent 70%),
    radial-gradient(50% 40% at 90% 35%, var(--tint-b, rgba(90,90,90,.45)), transparent 70%),
    radial-gradient(45% 40% at 20% 75%, rgba(255,255,255,.05), transparent 70%),
    #121212; filter: blur(30px) brightness(.32) saturate(.7); }
html.glass.dark header, html.glass.dark .fx, html.glass.dark .card, html.glass.dark .tile, html.glass.dark .comptabs, html.glass.dark .roundbar .arrow,
html.glass.dark .banner, html.glass.dark .strip .game, html.glass.dark .gamestats, html.glass.dark .matchhead, html.glass.dark .leadbox,
html.glass.dark .teams section, html.glass.dark footer.site, html.glass.dark .sugg, html.glass.dark .mk-menu, html.glass.dark .quick > *,
html.glass.dark .search input, html.glass.dark .rtc-panel, html.glass.dark .waitnote, html.glass.dark .myclub {
  background: var(--glass) !important; border-color: var(--edge) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 10px 30px rgba(0,0,0,.35) !important; }
html.glass.dark .fx::after, html.glass.dark .card::after, html.glass.dark .teams section::after {
  background: linear-gradient(135deg, rgba(255,255,255,.07) 0%, rgba(255,255,255,0) 40%); }
html.glass.dark table.stats th, html.glass.dark table.stats td { background: rgba(30,30,30,.2) !important; }
html.glass.dark table.stats tbody tr:nth-child(even) td { background: rgba(30,30,30,.4) !important; }
html.glass.dark .teams section h2 { background: rgba(30,30,30,.2) !important; }
html.glass.dark .leadbox .leader { background: rgba(40,40,40,.35) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.08) !important; border-color: rgba(255,255,255,.08) !important; }
html.glass.dark .fx.live { background: linear-gradient(rgba(38,38,38,.42), rgba(110,30,30,.3)) !important; }
html.glass.dark .btn-ghost, html.glass.dark .shelf-btn { background: rgba(255,255,255,.08) !important; }
html.glass.dark .comp .seg { background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
html.glass.dark .comp .seg a.on, html.glass.dark .comptabs a.on { background: rgba(255,255,255,.16) !important; box-shadow: none !important; }
html.glass.dark .strip .game.livecard::before { background: linear-gradient(rgba(32,32,32,.9), rgba(32,32,32,.9)) padding-box,
    conic-gradient(from var(--rt-a), rgba(255,255,255,.08) 0 55%, var(--c1, #dc2626) 70%, var(--c2, #93a8ff) 85%, rgba(255,255,255,.08) 100%) border-box !important; }
html.glass.dark .alsolive a { background: rgba(32,32,32,.6) !important; }
html.glass.dark .edge.top > i:nth-child(5) { background: linear-gradient(to bottom, rgba(16,16,16,.8), rgba(16,16,16,0)); }
html.glass.dark .edge.bottom > i:nth-child(5) { background: linear-gradient(to top, rgba(16,16,16,.75), rgba(16,16,16,0)); }
html.glass.dark .leader .lphoto, html.glass.dark .hero .pphoto img { box-shadow: 0 0 0 2px rgba(255,255,255,.2), 0 3px 10px rgba(0,0,0,.4); }
@media (max-width: 700px) {
  html.glass.dark body > .topnav { background: rgba(36,36,36,.6) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 14px 40px rgba(0,0,0,.5) !important; }
}
html.glass.dark body > .topnav { background: rgba(36,36,36,.55); }

/* the light / dark switch (theme.js adds it to the menu) */
.modebtn { flex:none; display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; margin-left:4px; border-radius:50%;
  border:0; background:transparent; color:var(--muted, #6b7280); cursor:pointer; padding:0; position:relative; z-index:1; }
.modebtn:hover { color:var(--ink, #111827); }
.modebtn svg { width:19px; height:19px; }
html.dark .modebtn { color:#cbd5e1; }
@media (max-width: 700px) { html.glass body > .topnav a { padding: 10px 13px !important; } }
@media (max-width: 440px) { .modebtn { width:28px; height:28px; margin-left:0; } .modebtn svg { width:17px; height:17px; } }

/* a soft fade when switching modes */
html.mode-fade, html.mode-fade * { transition: background-color .35s, color .35s, border-color .35s !important; }
html.glass.dark header, html.glass.dark .banner, html.glass.dark .matchhead, html.glass.dark .leadbox, html.glass.dark .gamestats, html.glass.dark footer.site {
  background-image: var(--grain) !important; background-size: 160px 160px !important; }

/* brand-blue numbers and labels: lighter so they read on dark */
html.dark .pproj b, html.dark .capteaser .proj, html.dark .fx-team .fp, html.dark .capteaser h2 span, html.dark .capteaser h2 { color:#93a8ff !important; }
html.dark .pbar .q { background:#2a2a2a !important; } html.dark .pbar .q i { background:#3b4a8a !important; } html.dark .pbar .q span { color:#e5e7eb !important; }
html.dark .chip.tag.safe { background:#123522 !important; color:#86efac !important; }
html.dark .chip.tag.upside { color:#fcd34d !important; } html.dark .chip.tag.steady { color:#c7d2fe !important; }
html.dark .hero { background:transparent !important; border-color:transparent !important; }
html.dark .rtc-btn { background:#1F3A93 !important; color:#fff !important; }

/* the banner's AFL / AFLW switch sits on the banner itself (no dark box behind it) */
html.glass.dark .comp, html.glass .comp { background: transparent !important; }
