/* Row 12.B20: Themes page (/themes/). Loaded after features.css (registered as toral-sales-themes). Reuses .phead
   .ghex .biz .pill .note; only the theme viewer lives here. The switcher = radio buttons + CSS (no JS needed). */

.tv{max-width:1040px;margin:34px auto 0}
.tv-r{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.tv-tabs{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-bottom:22px}
.tv-tab{display:inline-flex;align-items:center;gap:8px;padding:9px 16px;border-radius:999px;font-weight:800;font-size:14px;
  cursor:pointer;background:var(--surface2);border:1px solid var(--border);color:var(--muted);transition:border-color .15s,color .15s}
.tv-tab .dot{width:16px;height:16px;border-radius:50%;background:linear-gradient(135deg,var(--nav) 50%,var(--acc) 50%);
  box-shadow:0 0 0 2px rgba(255,255,255,.18)}
.tv-tab:hover{color:var(--text)}

.tv-shot{display:none;margin:0}
.tv-frame{position:relative;padding:0;overflow:hidden;border-radius:18px}
.tv-bar{display:flex;align-items:center;gap:6px;padding:8px 14px;background:rgba(255,255,255,.06);border-bottom:1px solid var(--border)}
.tv-bar i{width:10px;height:10px;border-radius:50%;background:rgba(255,255,255,.22)}
/* palette: the theme's three colours at the end of the frame bar */
.tv-pal{margin-inline-start:auto;display:flex;gap:6px}
.tv-pal b{width:16px;height:16px;border-radius:50%;box-shadow:0 0 0 2px rgba(255,255,255,.25)}
.tv-frame .th-img{display:block;width:100%;height:auto;aspect-ratio:16/10;object-fit:cover;object-position:top}
.tv-draw{display:grid;aspect-ratio:16/10;background:var(--pg)}
.tv-draw.side{grid-template-columns:20% 1fr}.tv-draw.top{grid-template-rows:14% 1fr}
.tv-draw span:first-child{background:var(--nav)}
.tv-draw span:last-child{margin:6%;border-radius:12px;background:var(--acc);opacity:.25}
.tv-shot figcaption{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;margin-top:16px}
.tv-shot figcaption b{font-size:18px;margin-inline-end:4px}
.tv .pill{background:var(--accent-soft);color:var(--text);border:1px solid var(--border);font-size:12px}
.tv>.note{margin:16px 0 0}

/* the chosen theme: its tab lit, its screenshot shown (keys = home_themes()) */
#tv-royal:checked~.tv-stage .k-royal,#tv-emerald:checked~.tv-stage .k-emerald,#tv-sunset:checked~.tv-stage .k-sunset,
#tv-goldenblack:checked~.tv-stage .k-goldenblack,#tv-darkenblue:checked~.tv-stage .k-darkenblue,
#tv-sapphire:checked~.tv-stage .k-sapphire{display:block}
#tv-royal:checked~.tv-tabs [for="tv-royal"],#tv-emerald:checked~.tv-tabs [for="tv-emerald"],
#tv-sunset:checked~.tv-tabs [for="tv-sunset"],#tv-goldenblack:checked~.tv-tabs [for="tv-goldenblack"],
#tv-darkenblue:checked~.tv-tabs [for="tv-darkenblue"],#tv-sapphire:checked~.tv-tabs [for="tv-sapphire"]{
  color:var(--on-primary);background:var(--grad);border-color:transparent}
#tv-royal:focus-visible~.tv-tabs [for="tv-royal"],#tv-emerald:focus-visible~.tv-tabs [for="tv-emerald"],
#tv-sunset:focus-visible~.tv-tabs [for="tv-sunset"],#tv-goldenblack:focus-visible~.tv-tabs [for="tv-goldenblack"],
#tv-darkenblue:focus-visible~.tv-tabs [for="tv-darkenblue"],#tv-sapphire:focus-visible~.tv-tabs [for="tv-sapphire"]{
  outline:2px solid var(--primary);outline-offset:3px}

#how .biz{margin-top:30px}

@media (max-width:560px){
  .tv-tab{padding:8px 12px;font-size:13px}
  .tv-frame{border-radius:12px}
  .tv-pal{gap:4px}.tv-pal b{width:12px;height:12px}
}
@media (prefers-reduced-motion:reduce){.tv-tab{transition:none}}
