/* Radio Site Maker Platform — Theme System */

/* ===== Theme Variables ===== */
:root {
    --dash-bg: #0a0a0a;
    --dash-sidebar: #080808;
    --dash-surface: #141414;
    --dash-surface-light: #1a1a1a;
    --dash-border: #2a2a2a;
    --dash-text: #f5f5f5;
    --dash-text-secondary: #a1a1aa;
    --dash-text-muted: #71717a;
    --dash-input-bg: #141414;
    --dash-input-border: #2a2a2a;
    --dash-input-placeholder: #666;
    --dash-hover: rgba(255,255,255,0.04);
    --dash-hover-strong: rgba(255,255,255,0.06);
    --dash-scrollbar-track: #0a0a0a;
    --dash-scrollbar-thumb: #333;
    --dash-toggle-bg: #333;
    --dash-stat-shadow: rgba(0,0,0,0.3);
    --dash-card-shadow: 0 1px 3px rgba(0,0,0,0.4);
    --dash-ring-dot: #080808;
    --dash-table-hover: rgba(239, 68, 68, 0.05);
    --dash-badge-neutral-bg: rgba(255,255,255,0.08);
    --dash-badge-neutral-text: #a1a1aa;
    --dash-spinner-track: rgba(255,255,255,0.2);
    --dash-code-bg: rgba(255,255,255,0.06);
    --dash-overlay: rgba(0,0,0,0.6);
}

[data-theme="light"] {
    --dash-bg: #f1f5f9;
    --dash-sidebar: #ffffff;
    --dash-surface: #ffffff;
    --dash-surface-light: #f8fafc;
    --dash-border: #e2e8f0;
    --dash-text: #1e293b;
    --dash-text-secondary: #475569;
    --dash-text-muted: #94a3b8;
    --dash-input-bg: #f8fafc;
    --dash-input-border: #cbd5e1;
    --dash-input-placeholder: #94a3b8;
    --dash-hover: rgba(0,0,0,0.04);
    --dash-hover-strong: rgba(0,0,0,0.07);
    --dash-scrollbar-track: #f1f5f9;
    --dash-scrollbar-thumb: #cbd5e1;
    --dash-toggle-bg: #cbd5e1;
    --dash-stat-shadow: rgba(0,0,0,0.06);
    --dash-card-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --dash-ring-dot: #ffffff;
    --dash-table-hover: rgba(239, 68, 68, 0.04);
    --dash-badge-neutral-bg: rgba(0,0,0,0.06);
    --dash-badge-neutral-text: #64748b;
    --dash-spinner-track: rgba(0,0,0,0.1);
    --dash-code-bg: rgba(0,0,0,0.05);
    --dash-overlay: rgba(0,0,0,0.4);
}

/* ===== Section Title Override banner heading ===== */
.section-override-title { color: #fef3c7; } /* amber-100 — readable on dark backgrounds */
[data-theme="light"] .section-override-title { color: #78350f; } /* amber-900 — readable on light backgrounds */
.section-override-subtitle { color: rgba(253,230,138,0.7); } /* amber-200/70 — readable on dark */
[data-theme="light"] .section-override-subtitle { color: #92400e; } /* amber-800 — readable on light */

/* ===== Dashboard notices =====
   Tailwind's `text-amber-400 bg-amber-500/10` reads well on the dark theme but
   washes out to near-invisible on the light one, where the tint background is
   almost white. Each notice therefore carries its own foreground per theme,
   same approach as .section-override-title above. */
.dash-notice {
    border-width: 1px;
    border-style: solid;
}
.dash-notice a { color: inherit; }

.dash-notice-warn    { background: rgba(245,158,11,0.10); border-color: rgba(245,158,11,0.20); color: #fcd34d; }
.dash-notice-success { background: rgba(34,197,94,0.10);  border-color: rgba(34,197,94,0.20);  color: #86efac; }
.dash-notice-error   { background: rgba(239,68,68,0.10);  border-color: rgba(239,68,68,0.20);  color: #fca5a5; }

[data-theme="light"] .dash-notice-warn    { background: #fffbeb; border-color: #fcd34d; color: #78350f; }
[data-theme="light"] .dash-notice-success { background: #f0fdf4; border-color: #86efac; color: #14532d; }
[data-theme="light"] .dash-notice-error   { background: #fef2f2; border-color: #fca5a5; color: #7f1d1d; }

/* Status pills and inline status text — same washout problem as the notices:
   a 10%-opacity tint is nearly white on the light theme. */
.dash-badge-success { background: rgba(34,197,94,0.10); color: #86efac; }
.dash-badge-warn    { background: rgba(245,158,11,0.10); color: #fcd34d; }
.dash-badge-error   { background: rgba(239,68,68,0.10); color: #fca5a5; }
.dash-text-success  { color: #4ade80; }
.dash-text-error    { color: #f87171; }

[data-theme="light"] .dash-badge-success { background: #dcfce7; color: #14532d; }
[data-theme="light"] .dash-badge-warn    { background: #fef3c7; color: #78350f; }
[data-theme="light"] .dash-badge-error   { background: #fee2e2; color: #7f1d1d; }
[data-theme="light"] .dash-text-success  { color: #15803d; }
[data-theme="light"] .dash-text-error    { color: #b91c1c; }

/* ===== Artwork picker =====
   Replaces the native file input, which cannot be styled and shows a stale
   "No file chosen" beside an image that is already saved. */
.artwork-thumb{
  flex:0 0 auto; width:56px; height:56px; border-radius:12px; overflow:hidden;
  display:inline-flex; align-items:center; justify-content:center;
  background:var(--dash-input-bg); border:1px solid var(--dash-border);
  color:var(--dash-text-muted);
}
.artwork-thumb img{width:100%; height:100%; object-fit:cover; display:block}
.artwork-thumb svg{width:22px; height:22px}
.artwork-btn{
  display:inline-flex; align-items:center; gap:6px; cursor:pointer;
  padding:8px 14px; border-radius:12px; white-space:nowrap;
  font-size:13px; font-weight:600;
  background:var(--dash-border); color:var(--dash-text);
  transition:opacity .15s ease;
}
.artwork-btn:hover{opacity:.8}
/* The input is visually hidden but still focusable, so the ring has to come
   from the label it lives in. */
.artwork-btn:focus-within{outline:2px solid #ef4444; outline-offset:2px}
/* platform.css loads after tailwind.css, so .artwork-btn's display would win
   over the .hidden utility on equal specificity. Two classes settles it. */
.artwork-btn.hidden{display:none}
.artwork-btn-danger{background:rgba(239,68,68,0.12); color:#f87171}
[data-theme="light"] .artwork-btn-danger{background:#fee2e2; color:#b91c1c}
.artwork-btn-danger:focus-visible{outline:2px solid #ef4444; outline-offset:2px}

/* ===== Base ===== */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--dash-bg);
    color: var(--dash-text);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', system-ui, sans-serif;
}

/* ===== Smooth transitions ===== */
*, *::before, *::after {
    transition-property: color, background-color, border-color, opacity, box-shadow, transform;
    transition-duration: 150ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dash-scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--dash-scrollbar-thumb); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #ef4444; }

/* ===== Selection ===== */
::selection { background: #ef4444; color: white; }

/* ===== Dashboard sidebar scrollbar ===== */
#dashboard-sidebar::-webkit-scrollbar { width: 4px; }
#dashboard-sidebar::-webkit-scrollbar-track { background: transparent; }
#dashboard-sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 2px; }
[data-theme="light"] #dashboard-sidebar::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.12); }

/* ===== Form inputs ===== */
input[type="text"], input[type="email"], input[type="password"], input[type="url"],
input[type="number"], input[type="tel"], input[type="search"], input[type="date"],
input[type="time"], input[type="datetime-local"], textarea, select {
    background-color: var(--dash-input-bg) !important;
    color: var(--dash-text) !important;
    border-color: var(--dash-input-border) !important;
}
input::placeholder, textarea::placeholder { color: var(--dash-input-placeholder) !important; }

/* ===== Form focus — red glow ===== */
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.4);
    border-color: #ef4444 !important;
}

/* ===== Toggle switch ===== */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--dash-toggle-bg);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}
.toggle-switch.active { background: #ef4444; }
.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.toggle-switch.active::after { transform: translateX(20px); }

/* ===== Color picker ===== */
input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    width: 48px;
    height: 48px;
    border: 2px solid var(--dash-input-border);
    border-radius: 12px;
    cursor: pointer;
    padding: 2px;
    background: var(--dash-surface-light);
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 8px; }

/* ===== Stat card hover ===== */
.stat-card {
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    border-radius: 16px;
    box-shadow: var(--dash-card-shadow);
}
.stat-card:hover {
    transform: translateY(-2px);
    border-color: #ef4444;
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.15);
}

/* ===== Table ===== */
.table-row:hover { background: var(--dash-table-hover); }

/* ===== Wizard step animation ===== */
.wizard-step {
    animation: slideIn 0.3s ease forwards;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== Loading spinner ===== */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--dash-spinner-track);
    border-top-color: #ef4444;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Badge styles ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
}
.badge-success { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.badge-warning { background: rgba(251, 191, 36, 0.15); color: #d97706; }
.badge-error { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge-info { background: rgba(0, 229, 255, 0.15); color: #00b8d4; }
.badge-neutral { background: var(--dash-badge-neutral-bg); color: var(--dash-badge-neutral-text); }

[data-theme="light"] .badge-success { background: rgba(34, 197, 94, 0.12); color: #16a34a; }
[data-theme="light"] .badge-warning { background: rgba(251, 191, 36, 0.12); color: #b45309; }
[data-theme="light"] .badge-error { background: rgba(239, 68, 68, 0.12); color: #dc2626; }
[data-theme="light"] .badge-info { background: rgba(0, 229, 255, 0.12); color: #0891b2; }

/* ===== Equalizer animation bars ===== */
.eq-bar {
    display: inline-block;
    width: 3px;
    background: #ef4444;
    border-radius: 2px;
    animation: eq-pulse 0.8s ease-in-out infinite;
}
.eq-bar:nth-child(1) { animation-delay: 0s; height: 12px; }
.eq-bar:nth-child(2) { animation-delay: 0.15s; height: 20px; }
.eq-bar:nth-child(3) { animation-delay: 0.3s; height: 16px; }
.eq-bar:nth-child(4) { animation-delay: 0.45s; height: 24px; }
.eq-bar:nth-child(5) { animation-delay: 0.1s; height: 18px; }
@keyframes eq-pulse {
    0%, 100% { transform: scaleY(0.4); }
    50% { transform: scaleY(1); }
}

/* ===== Noise texture overlay ===== */
.noise-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* ===== Glow effects ===== */
.glow-red { text-shadow: 0 0 20px rgba(239, 68, 68, 0.5); }
.glow-cyan { text-shadow: 0 0 20px rgba(0, 229, 255, 0.5); }

/* ===== Card hover glow ===== */
.card-glow:hover {
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.1), 0 8px 30px var(--dash-stat-shadow);
}

/* ===== Form inputs (themed) ===== */
.form-input {
    background: var(--dash-input-bg);
    border: 1px solid var(--dash-input-border);
    color: var(--dash-text);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    width: 100%;
}
.form-input::placeholder { color: var(--dash-input-placeholder); }

/* ===== Dashboard theme-aware text utilities ===== */
.dt { color: var(--dash-text); }
.dt-secondary { color: var(--dash-text-secondary); }
.dt-muted { color: var(--dash-text-muted); }
.db { background-color: var(--dash-bg); }
.ds { background-color: var(--dash-surface); }
.ds-light { background-color: var(--dash-surface-light); }
.db-border { border-color: var(--dash-border); }
.db-hover:hover { background-color: var(--dash-hover); }
.db-hover-strong:hover { background-color: var(--dash-hover-strong); }

/* ===== Site preview modal ===== */
.preview-modal {
    backdrop-filter: blur(8px);
    background: var(--dash-overlay);
}
.preview-frame {
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    border-radius: 12px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
}

/* ===== Theme toggle button ===== */
.theme-toggle {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--dash-border);
    background: var(--dash-surface);
    color: var(--dash-text-secondary);
    transition: all 0.2s;
}
.theme-toggle:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: var(--dash-hover-strong);
}
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { position: absolute; transition: opacity 0.2s, transform 0.3s; }
.theme-toggle .icon-sun { opacity: 0; transform: rotate(-90deg) scale(0.5); }
.theme-toggle .icon-moon { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="light"] .theme-toggle .icon-sun { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="light"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(90deg) scale(0.5); }

/* ── RadioHost Studio cross-sell card (content hubs) ────────────────────
   Lives here rather than on utility classes because the card sits next to
   .article-prose, whose `a { color:#ef4444; text-decoration:underline }`
   (specificity 0,1,1) beat Tailwind's .text-white (0,1,0) and rendered the
   button label as underlined red-on-red. Every rule below is 0,2,0 or has an
   explicit element, so it wins wherever the card is placed. */
.studio-cta {
    margin: 3rem 0;
    border-radius: 1rem;
    background: #0f172a;
    border: 1px solid rgba(239, 68, 68, .28);
    overflow: hidden;
}
.studio-cta .studio-cta-inner { padding: 2.5rem; }
.studio-cta .studio-cta-eyebrow {
    display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.5rem;
}
.studio-cta .studio-cta-chip {
    display: inline-flex; align-items: center; padding: .3rem .8rem; border-radius: 9999px;
    font-size: .75rem; font-weight: 600; letter-spacing: .01em;
    background: rgba(239, 68, 68, .14); border: 1px solid rgba(239, 68, 68, .35); color: #fca5a5;
}
.studio-cta .studio-cta-suite { font-size: .8125rem; color: #94a3b8; }
.studio-cta h3 {
    font-size: 1.5rem; line-height: 1.25; font-weight: 700; letter-spacing: -.015em;
    color: #f8fafc; margin: 0 0 .875rem;
}
.studio-cta p {
    font-size: 1rem; line-height: 1.65; color: #cbd5e1; margin: 0 0 1.75rem; max-width: 60ch;
}
.studio-cta .studio-cta-actions {
    display: flex; align-items: center; flex-wrap: wrap; gap: 1.25rem;
}
/* 0,2,0 — beats `.article-prose a` (0,1,1) even if the card is nested inside it. */
.studio-cta .studio-cta-btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .8125rem 1.5rem; border-radius: .75rem;
    background: #dc2626;                 /* white on #dc2626 = 4.83:1, passes WCAG AA */
    color: #fff; font-weight: 600; font-size: 1rem; line-height: 1;
    text-decoration: none;
    transition: background .2s ease, transform .2s ease;
}
.studio-cta .studio-cta-btn:hover {
    background: #b91c1c; color: #fff; text-decoration: none; transform: translateY(-1px);
}
.studio-cta .studio-cta-btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.studio-cta .studio-cta-note { font-size: .875rem; color: #94a3b8; }
@media (max-width: 640px) {
    .studio-cta .studio-cta-inner { padding: 1.75rem 1.5rem; }
    .studio-cta h3 { font-size: 1.3125rem; }
    .studio-cta .studio-cta-btn { width: 100%; justify-content: center; }
}

/* ── Live product specimens (/ui-preview/ iframes in articles and tools) ── */
.spec { margin: 2rem 0; border: 1px solid var(--dash-border); border-radius: 1rem; overflow: hidden; background: var(--dash-surface); }
.spec .spec-bar { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; padding: .6rem .9rem; border-bottom: 1px solid var(--dash-border); background: var(--dash-surface-light); }
.spec .spec-dot { width: .6rem; height: .6rem; border-radius: 9999px; background: var(--dash-border); }
.spec .spec-label { margin-left: .5rem; font-size: .75rem; font-weight: 600; color: var(--dash-text-secondary); letter-spacing: .01em; }
.spec .spec-themes { display: flex; flex-wrap: wrap; gap: .35rem; margin-left: auto; }
.spec .spec-chip { font-size: .7rem; font-weight: 600; padding: .2rem .55rem; border-radius: 9999px; cursor: pointer;
    border: 1px solid var(--dash-border); background: transparent; color: var(--dash-text-secondary); }
.spec .spec-chip::before { content: ''; display: inline-block; width: .5rem; height: .5rem; border-radius: 9999px; background: var(--chip); margin-right: .35rem; vertical-align: middle; }
.spec .spec-chip.is-on { color: var(--dash-text); border-color: var(--chip); }
.spec .spec-chip:focus-visible { outline: 2px solid #ef4444; outline-offset: 2px; }
.spec .spec-stage { position: relative; width: 100%; overflow: hidden; background: #000; }
.spec .spec-stage iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; }
.spec.spec-mobile .spec-stage { max-width: 390px; margin: 1rem auto; border-radius: 1.75rem; border: 8px solid #111; box-sizing: content-box; }
.spec figcaption { padding: .7rem .9rem; font-size: .8125rem; line-height: 1.5; color: var(--dash-text-secondary); border-top: 1px solid var(--dash-border); }
.spec .spec-note { color: var(--dash-text-muted); }
.article-prose .spec figcaption { margin: 0; }

/* Decision router ("what are you replacing?") */
.decide { margin: 2.5rem 0; padding: 1.5rem; border-radius: 1rem; border: 1px solid var(--dash-border); background: var(--dash-surface); }
.decide .decide-q { font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 700; font-size: 1.2rem; color: var(--dash-text); margin: 0 0 1rem; }
.decide .decide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .75rem; }
.decide .decide-opt, .article-prose .decide .decide-opt { display: flex; flex-direction: column; gap: .35rem; padding: 1rem; border-radius: .75rem;
    border: 1px solid var(--dash-border); background: var(--dash-surface-light); text-decoration: none; color: var(--dash-text-secondary); transition: border-color .15s, transform .15s; }
.decide .decide-opt:hover { border-color: #ef4444; transform: translateY(-1px); }
.decide .decide-opt strong { color: var(--dash-text); font-size: 1rem; }
.decide .decide-opt span { font-size: .875rem; line-height: 1.5; }
.decide .decide-opt em { font-style: normal; font-size: .75rem; font-weight: 600; color: #ef4444; margin-top: auto; }

/* CTA secondary link + sources list */
.studio-cta .studio-cta-link { color: #e2e8f0; font-weight: 600; font-size: .9375rem; text-decoration: underline; text-underline-offset: 3px; }
.studio-cta .studio-cta-link:hover { color: #fff; }
.fact-ref a { text-decoration: none !important; font-size: .7em; color: var(--dash-text-muted) !important; margin-left: .1em; }
.fact-sources { margin: 3rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--dash-border); font-size: .875rem; color: var(--dash-text-secondary); }
.fact-sources h2 { font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 700; font-size: 1.125rem; color: var(--dash-text); margin: 0 0 .5rem; }
.fact-sources ol { padding-left: 2.25rem; margin: .75rem 0 0; }
.fact-sources li { list-style: decimal; margin-bottom: .45rem; line-height: 1.55; }
.fact-sources a { color: #ef4444; text-decoration: underline; }
.tool-embed { margin: 2rem 0; }
.tool-embed-more { font-size: .875rem; margin-top: .5rem; }

/* ── /tools/ shared UI ── */
.tl-card { background: var(--dash-surface); border: 1px solid var(--dash-border); border-radius: 1rem; padding: 1.5rem; }
.tl-row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-start; }
.tl-row > .mk-field { flex: 1 1 18rem; }
.tl-checks { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .6rem; }
.tl-check { display: flex; gap: .75rem; padding: .8rem 1rem; border-radius: .75rem; background: var(--dash-surface-light); border: 1px solid var(--dash-border); }
.tl-check .tl-icon { flex: none; width: 1.5rem; height: 1.5rem; border-radius: 9999px; display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: #fff; background: #64748b; }
.tl-check.is-pass .tl-icon { background: #16a34a; }
.tl-check.is-fail .tl-icon { background: #dc2626; }
.tl-check.is-warn .tl-icon { background: #d97706; }
.tl-check strong { display: block; color: var(--dash-text); font-size: .9375rem; }
.tl-check p { margin: .2rem 0 0; font-size: .875rem; line-height: 1.55; color: var(--dash-text-secondary); word-break: break-word; }
.tl-summary { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.tl-pill { font-size: .75rem; font-weight: 600; padding: .25rem .65rem; border-radius: 9999px; background: var(--dash-surface-light); border: 1px solid var(--dash-border); color: var(--dash-text-secondary); }
.tl-next { margin-top: 1.25rem; padding: 1.1rem 1.25rem; border-radius: .9rem; border: 1px solid rgba(239,68,68,.35); background: rgba(239,68,68,.07); }
.tl-next p { margin: 0 0 .75rem; color: var(--dash-text); }
.tl-code { width: 100%; font: 500 .8rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; padding: .8rem; border-radius: .6rem;
    background: #0b0b0b; color: #e5e7eb; border: 1px solid var(--dash-border); resize: vertical; min-height: 5.5rem; }
.tl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; }
.tl-tile { display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem; border-radius: 1rem; background: var(--dash-surface); border: 1px solid var(--dash-border); text-decoration: none; transition: border-color .15s, transform .15s; }
.tl-tile:hover { border-color: #ef4444; transform: translateY(-2px); }
.tl-tile strong { color: var(--dash-text); font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 1.05rem; }
.tl-tile span { color: var(--dash-text-secondary); font-size: .875rem; line-height: 1.55; }
.tl-tile em { font-style: normal; font-size: .75rem; font-weight: 600; color: #ef4444; margin-top: auto; }
.tl-spinner { display: inline-block; width: 1rem; height: 1rem; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: tlspin .8s linear infinite; }
@keyframes tlspin { to { transform: rotate(360deg); } }
.tl-swatches { display: flex; flex-wrap: wrap; gap: .5rem; }
.tl-swatch { padding: .4rem .75rem; border-radius: 9999px; font-size: .8rem; font-weight: 600; cursor: pointer; border: 1px solid var(--dash-border); background: var(--dash-surface-light); color: var(--dash-text-secondary); }
.tl-swatch.is-on { border-color: #ef4444; color: var(--dash-text); }
.tl-names { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .6rem; margin-top: 1rem; }
.tl-name { text-align: left; padding: .8rem 1rem; border-radius: .75rem; background: var(--dash-surface-light); border: 1px solid var(--dash-border); color: var(--dash-text); font-weight: 600; cursor: pointer; }
.tl-name small { display: block; font-weight: 400; font-size: .75rem; color: var(--dash-text-muted); margin-top: .15rem; }
.tl-name.is-on, .tl-name:hover { border-color: #ef4444; }
.tl-out { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .75rem; margin-top: 1rem; }
.tl-out div { padding: 1rem; border-radius: .75rem; background: var(--dash-surface-light); border: 1px solid var(--dash-border); }
.tl-out b { display: block; font-size: 1.4rem; font-family: 'Space Grotesk', system-ui, sans-serif; color: var(--dash-text); }
.tl-out span { font-size: .78rem; color: var(--dash-text-secondary); }
