/* rs-dark.css · dark mode for /search (2026-11-10, his yes: "the theme should go with the device's or the browser's preferences").
   Follows prefers-color-scheme only, no switch. Same palette as the intro page (door-c2). The page's colors are variables, so the
   variables flip here & the few hardcoded light spots get their own rule below. */
:root{color-scheme:light dark}
@media (prefers-color-scheme:dark){
  :root{
    --ground:#0F1514; --ground-2:#0b1110; --surface:#161E1D; --surface-2:#1b2625;
    --ink:#e3ebe9; --ink-soft:#a3b5b1; --ink-faint:#8fa39f; --line:#2a3836;
    --brand:#5FBFB4; --brand-deep:#7FD0C6; --brand-tint:#1d3634;
    --clash:#ff6b5e; --clash-tint:#2A0F0F; --gold:#d9a94a; --gold-tint:#2b2410;
    --tab-rest:#1b2625; --ok:#5FBFB4; --dispute:#ff6b5e;
    --gold-ink:#d9a94a;  /* 2026-11-24: gold words; light mode uses a darker gold for them (home/index.html :root) */
    --shadow:0 20px 55px -24px rgba(0,0,0,.6);
  }
}
@media (prefers-color-scheme:dark){
  .rsc-tab{background:#223130;color:var(--ink)}
  .rsc-tab.on{background:var(--brand);color:#06201e}
  .rsc-gck{background:var(--surface-2);border-color:var(--line)}
  .rsc-grid td{border-bottom-color:var(--line)}
  .rsc-gd{border-color:#516664}
  .rsc-qd{background:#2f4140}
  .rsc-toast,.vclient-tip{background:#e3ebe9;color:#0F1514}
  .rsr-cdd .rsr-comm-txt{color:var(--ink-soft)}
}
/* buttons filled with the brand color keep dark text (the brand color is light in dark mode) */
@media (prefers-color-scheme:dark){
  .corrsave,.nbadd,.stadd,.fd-btn,.nbimpbtn,.btopt.is-active,a.cta,.cta,.rsfa-go{color:#06201e}
  .sm-gloss{background:var(--surface-2);color:var(--ink)}
}
/* 2026-11-19, his "colors are off in dark mode": the first-visit screen (#rsLadderHero), the dots line, "Show Organizing, Getting Paid &
   Fun" (#rsGoals), the step heading & the numbers row (#rsStatsBottom) were built after dark mode with light-only colors, so the headline
   & numbers were near-black on near-black and the sample questions were white boxes. Same palette as above, no new colors. The page's
   own rules load AFTER this file, so each rule starts "html:root" to win. */
@media (prefers-color-scheme:dark){
  html:root #rsLadderHero h1,html:root #rsStepHead h2,html:root #rsStatsBottom b,html:root .rs-ladder-dots .rs-lg,html:root #rsGoals summary{color:var(--ink)}
  html:root #rsLadderHero .rs-lh-try span,html:root .rs-ladder-dots,html:root .rs-ladder-who,html:root #rsStatsBottom span.l,html:root #rsLadderHero .rs-lh-all button,html:root #rsGoals .rg-all button,html:root #rsGoals .rg-row{color:var(--ink-soft)}
  html:root .rs-ladder-proof,html:root #rsGoals .rg-d,html:root #rsGoals summary::after{color:var(--ink-faint)}
  html:root #rsLadderHero .rs-lh-try button{background:var(--surface-2);border-color:var(--line);color:var(--ink)}
  html:root .rs-lh-links a,html:root #rsLadderHero .rs-lh-vid a,html:root #rsLadderHero .rs-lh-sub,html:root #rsStepHead p,html:root #rsStatsBottom b.hot,html:root .rs-ladder-join a,html:root .rs-ladder-all button,html:root #rsGoals>details.rg-out>summary,html:root #rsGoals>details.rg-out>summary::after,html:root #rsGoals .rg-out .rg-all button,html:root #rsGoals .rg-row a,html:root #rsGoals .rg-note{color:var(--brand)}
  html:root #rsGoals .rg-grp,html:root #rsGoals .rg-i{border-color:var(--brand);color:var(--brand)}
  html:root #rsLadderHero .rs-play,html:root .rs-new,html:root #rsGoals .rg-sw[aria-checked="true"]{background:var(--brand);color:#06201e}
  html:root #rsGoals details,html:root #rsStatsBottom{border-color:var(--line)}
  html:root #rsGoals .rg-infobox{background:var(--surface-2);border-color:var(--line);color:var(--ink)}
  html:root .plan.pop .cta,html:root .plan.co .cta{color:#06201e}
}
/* 2026-11-25 sweep (his "all pages follow the device" rule): creator clip pages (/clips/r/*) paint their answer boxes, summary and the
   "Wrong" tag with light-only colours that the palette variables do not reach, so the words went light on light in dark mode. */
@media (prefers-color-scheme:dark){
  .ai.bad{background:var(--clash-tint)}
  .sum{background:var(--gold-tint)}
  .bad .tag{background:#3d1a14;color:#ffb8ac}
  main.wrap .btn{background:transparent;color:var(--brand)}   /* the clip pages' outline button, kept outline (the rule below is for solid buttons) */
}
/* 2026-11-25 sweep: double-check pages fill their buttons & the "ask" panel with the brand colour, which is light in dark mode, so the
   white words washed out. Same fix as the list above: dark words on the light fill. The ghost button keeps brand-coloured words. */
@media (prefers-color-scheme:dark){
  .btn:not(.ghost),.box button,.ask,.ask h2{color:#06201e}
}
