/* Light / dark theme. Light is the default; html[data-theme=dark] is set by js/theme.js */
.theme-tg{background:transparent;border:1.5px solid var(--line-night);color:var(--on-night);border-radius:50%;width:34px;height:34px;display:inline-grid;place-items:center;padding:0;flex:none}
.theme-tg:hover{border-color:var(--sun);color:var(--sun)}
.theme-tg svg{width:17px;height:17px}
.theme-tg .i-sun{display:none}
html[data-theme=dark] .theme-tg .i-sun{display:block}
html[data-theme=dark] .theme-tg .i-moon{display:none}

html[data-theme=dark]{
  color-scheme:dark;
  --white:#1B150F; --soft:#241B13; --meadow:#1F2A1E;
  --ink:#F2EBE1; --muted:#B8AB9B; --line:#3A2C21;
  --danger:#FF8A7A;
}
html[data-theme=dark] body{background:#100C08;color:var(--ink)}
html[data-theme=dark] .eyebrow,
html[data-theme=dark] .link,
html[data-theme=dark] .chip,
html[data-theme=dark] .st.verified,
html[data-theme=dark] .steps .done,
html[data-theme=dark] .status-track span.past,
html[data-theme=dark] table.cmp tr.cmp-section td,
html[data-theme=dark] .flash.ok{color:#8FD9A8}
html[data-theme=dark] input[type=text],html[data-theme=dark] input[type=email],html[data-theme=dark] input[type=password],
html[data-theme=dark] input[type=url],html[data-theme=dark] input[type=number],html[data-theme=dark] input[type=date],
html[data-theme=dark] input[type=datetime-local],html[data-theme=dark] input[type=tel],html[data-theme=dark] input[type=search],
html[data-theme=dark] select,html[data-theme=dark] textarea{border-color:#4A3A2C}
html[data-theme=dark] ::placeholder{color:#8F8273}
html[data-theme=dark] .flash.ok{background:#1B2E22}
html[data-theme=dark] .flash.error{background:#3A1A16}
html[data-theme=dark] .flash.info,html[data-theme=dark] .verify-bar,html[data-theme=dark] .chip.warn,html[data-theme=dark] .st.pending{background:#3A2E12;color:#FFD98A}
html[data-theme=dark] .chip.bad{background:#3A1A16}
html[data-theme=dark] .st.unclaimed{background:#3A2616;color:#FFB878}
html[data-theme=dark] .claim{background:#2E2412;border-color:#5A4520}
html[data-theme=dark] .res.winner{background:#2E2412}
html[data-theme=dark] .choice label:has(input:checked){background:#3A2616}
html[data-theme=dark] .nv-panel,html[data-theme=dark] .nv-sub{background:#1B150F;border:1px solid var(--line)}
html[data-theme=dark] .nav .nv-panel a:hover{background:#2E2219;color:var(--ink)}
html[data-theme=dark] .m.nom,html[data-theme=dark] .bi.nom,html[data-theme=dark] .medal i.nom,
html[data-theme=dark] .res .pz,html[data-theme=dark] .tt .st{color:#F0B93A;border-color:#F0B93A}
html[data-theme=dark] .qr-stub{background:#fff!important;color:#1B1712!important}
html[data-theme=dark] .site-h{border-bottom-color:#2E2219}
html[data-theme=dark] img.logo-inv{filter:none}

/* Language picker: the popup list must stay readable in both light and dark */
#pfa-lang{color:#fff;background:#14181f;border:1px solid rgba(255,255,255,.35);border-radius:8px;padding:6px 10px;font:600 14px/1.2 inherit;color-scheme:dark}
#pfa-lang option{color:#111;background:#fff;font-size:15px}
html[data-theme=dark] #pfa-lang option{color:#f2f2f2;background:#1c2029}
