/* SubSyncer · warm theme, the Collections+ look. Loaded last on every page.
 * Dark = warm charcoal night (never pure black); light = warm sand paper (never pure white); one orange accent.
 * Tokens are written three times (:root:root:root) so they outrank mono.css and the older per-page palettes. */
:root:root:root{
 --paper:#0f1113;--bg:var(--paper);--panel:#16191c;--elevated:#1d2125;--hover:#23282d;
 --ink:#ece7dc;--muted:#b5b0a6;--line:#343a41;--soft-line:#252a2f;
 --accent:#ff8a3d;--accent-soft:rgba(255,138,61,.14);--on-accent:#1b0e04;--focus:var(--accent);
 --track:#343a41;--reference:#837f78;--success:#3ddc84;--error:#ff7d89;
 --frost:rgba(15,17,19,.74);
 --glow-a:rgba(255,138,61,.11);--glow-b:rgba(92,160,255,.08);--glow-c:rgba(120,220,150,.035);
 --grain:.06;--grain-blend:normal;
 color-scheme:dark;
}
:root:root:root[data-theme=light]{
 --paper:#f1ebdf;--bg:var(--paper);--panel:#e8e0d1;--elevated:#fdfaf4;--hover:#ddd3c2;
 --ink:#211d18;--muted:#574f45;--line:#cbbfab;--soft-line:#ddd3c2;
 --accent:#cf5a17;--accent-soft:rgba(207,90,23,.12);--on-accent:#fff7ef;
 --track:#cbbfab;--reference:#857b6d;--success:#1f6b3d;--error:#a3262f;
 --frost:rgba(241,235,223,.78);
 --glow-a:rgba(255,150,80,.22);--glow-b:rgba(110,150,255,.13);--glow-c:rgba(120,200,140,.08);
 --grain:.09;--grain-blend:multiply;
 color-scheme:light;
}

/* ---------- Atmosphere: soft glows behind everything, film grain above ---------- */
html{background:var(--paper)}
html body,html body.landing{background:transparent}
html::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
 background:
  radial-gradient(60vmax 45vmax at 12% 16%,var(--glow-a),transparent 60%),
  radial-gradient(55vmax 45vmax at 90% 88%,var(--glow-b),transparent 60%),
  radial-gradient(40vmax 30vmax at 55% 55%,var(--glow-c),transparent 60%)}
html::after{content:"";position:fixed;inset:0;z-index:60;pointer-events:none;opacity:var(--grain);mix-blend-mode:var(--grain-blend);
 background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}
::selection{background:var(--accent);color:var(--on-accent)}

/* Theme swaps fade instead of flashing (no circle reveal). */
html,body,body>header,.landing-header,.box,.card,.section,.wiz-choice,.ai-pick,.mini-seg,.faq-q,
#config :is(input:not([type=checkbox]):not([type=radio]),select,textarea){transition:background-color .35s ease,color .35s ease,border-color .35s ease}

/* ---------- Header: fixed, transparent at the top, frosted glass once the page scrolls ---------- */
body:not(.landing){box-sizing:border-box;padding-top:var(--header-h,88px)}
body:not(.landing)>header{position:fixed!important;top:0;left:0;right:0;z-index:40;width:auto!important;max-width:none!important;margin:0!important;
 padding-inline:max(24px,calc((100% - 1180px) / 2))!important;border-bottom:0!important;background:transparent!important;
 -webkit-backdrop-filter:none;backdrop-filter:none;
 transition:background-color .25s ease,-webkit-backdrop-filter .25s ease,backdrop-filter .25s ease}
.landing-header{position:fixed!important;top:0;left:0;right:0;background:transparent!important;
 transition:background-color .25s ease,-webkit-backdrop-filter .25s ease,backdrop-filter .25s ease}
body.landing main{padding-top:76px}
:is(body>header,.landing-header).scrolled{background:var(--frost)!important;-webkit-backdrop-filter:blur(14px) saturate(1.2);backdrop-filter:blur(14px) saturate(1.2)}
@media (max-width:580px){body:not(.landing)>header{padding-inline:16px!important}}
/* Anything that sticks or is scrolled to stops below the fixed header. */
html:not(:has(body.landing)){scroll-padding-top:var(--header-h,88px)}
.faq-topics{top:calc(var(--header-h,88px) + 16px)}
.install{top:calc(var(--header-h,88px) + 18px)}
@media (max-width:900px){.faq-topics{top:var(--header-h,88px)}.faq-group,.faq-page details.faq-q{scroll-margin-top:72px}}
@media (max-width:700px){body.landing main{padding-top:64px}}

/* ---------- Header tools: Ko-fi heart turns orange as it beats ---------- */
.kofi-link .kofi-heart{transition:transform 200ms var(--ease-out),color .2s ease}
@media (hover:hover) and (pointer:fine){.kofi-link:hover .kofi-heart{color:var(--accent)}}
dialog.kofi-dialog{border:1px solid var(--soft-line);box-shadow:0 18px 50px rgba(0,0,0,.45)}
dialog.kofi-dialog::backdrop{background:rgba(8,8,10,.6);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}

/* ---------- Panels: a hairline edge like Collections+ cards ---------- */
:is(.wiz-choice,.request-latest>section){box-shadow:inset 0 0 0 1px var(--soft-line)}

/* ---------- Orange accent: links, focus, switches, choices, progress ---------- */
:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible{outline-color:var(--accent)}
#config .getkey,.arrow-link:hover{color:var(--accent)}
#config :is(input:not([type=checkbox]):not([type=radio]),select,textarea):focus,.manifest-field:focus-within{border-color:var(--accent)!important}
#config .stream-switch input[type=checkbox]:checked{background:var(--accent)}
#config .stream-switch input[type=checkbox]:checked::after{background:#fff}
#config input[type=checkbox]:not([role=switch]):checked{background:var(--accent);border-color:var(--accent)}
.wiz-meter>span{background:var(--accent)}
.wiz-choice[aria-pressed=true]{background:var(--accent-soft)!important;color:var(--ink)!important;box-shadow:inset 0 0 0 1.5px var(--accent)}
.wiz-choice[aria-pressed=true] h3{color:var(--accent)}
#config .mini-seg button[aria-checked=true]{background:var(--ink);color:var(--paper)}
.top-nav a[aria-current=page]{box-shadow:inset 0 -2px var(--accent)!important}

/* ---------- Home timing demo: faded red while off, faded green once in sync ---------- */
.theatre{--sync-red:#fca5a5;--sync-red-soft:rgba(252,165,165,.16);--sync-green:#a7f3c0;--sync-green-soft:rgba(134,239,172,.16)}
.demo-state{background:var(--sync-red-soft);color:var(--sync-red);transition:background-color .3s ease,color .3s ease}
.demo-state.is-synced{background:var(--sync-green-soft);color:var(--sync-green)}
.lane-track .block{background:rgba(134,239,172,.38)}
.lane-shift .block{background:rgba(252,165,165,.55);transition:background-color .3s ease}
.theatre.is-synced .lane-shift .block{background:rgba(134,239,172,.55)}
.demo-actions button{background:var(--sync-red-soft);color:var(--sync-red);transition:background-color .2s ease,scale 160ms var(--ease-out)}
.demo-actions button.solid{background:var(--sync-green-soft);color:var(--sync-green)}
@media (hover:hover) and (pointer:fine){
 .demo-actions button:not(.solid):hover{background:rgba(252,165,165,.24)}
 .demo-actions button.solid:hover{background:rgba(134,239,172,.24)}
}

@media (prefers-reduced-motion:reduce){
 html,body,body>header,.landing-header{transition:none}
}
