/* AI Boss VIP Tool Vault - shared, user-controlled theme */
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
.theme-toggle {
  display: inline-flex !important; align-items: center; justify-content: center; gap: 7px;
  flex: 0 0 auto; width: auto !important; min-width: 112px;
  margin: 0 !important; padding: 9px 12px !important;
  border-radius: 999px !important; border: 1px solid #bda882 !important;
  background: #fffaf0 !important; color: #30271d !important;
  font: 800 12px/1.2 Inter,ui-sans-serif,system-ui,sans-serif !important;
  letter-spacing: normal !important; cursor: pointer; text-decoration: none;
}
.theme-toggle:hover { filter: brightness(.96); }
.theme-toggle:focus-visible { outline: 3px solid #e95a9a !important; outline-offset: 3px; }
.theme-icon { font-size: 15px; line-height: 1; }
.theme-loginrow { display:flex; justify-content:flex-end; margin: -8px 0 8px; }
html[data-theme="dark"] .theme-toggle {
  background: #302938 !important; border-color: #796985 !important;
  color: #fff1f9 !important;
}
@media(max-width:620px){ .theme-toggle { min-width: 0; padding: 9px 10px !important; } }
@media print { .theme-toggle,.theme-loginrow { display:none !important; } }

/* The original v6.1 pages use a light palette. These overrides provide the dark version. */
html[data-theme="dark"] {
  --line: #46414d; --cream: #292630; --muted: #c3bac6;
}
html[data-theme="dark"] body:not(.visual-remix) {
  background: linear-gradient(180deg,#16151c 0%,#1f1a25 100%) !important;
  color: #f7f3f8 !important;
}
html[data-theme="dark"] .hero:not(.remix-hero) {
  background: #28212f !important; color: #fff7fd !important;
  border: 1px solid #5a465c;
}
html[data-theme="dark"] .hero p {color:#e5dce7 !important}
html[data-theme="dark"] .eyebrow,html[data-theme="dark"] .category,
html[data-theme="dark"] .kicker,html[data-theme="dark"] .examples strong,
html[data-theme="dark"] .example-box strong {color:#f0c981 !important}
html[data-theme="dark"] :is(.note-card,.status-card,.tool-card,.info,.card,.panel,.start-card,.step-card,.result-card,.result-block,.help-card,.progress,.progress-wrap,.tool-demo,.box,.choice) {
  background: #25232c !important; color: #f7f3f8 !important;
  border-color: #514954 !important; box-shadow: 0 12px 30px #00000024;
}
html[data-theme="dark"] :is(.mini,.leave,.prompt,.examples,.example-box,.sample-result,.callout) {
  background: #32303b !important; color: #f5eff7 !important;
  border-color: #6a5c70 !important;
}
html[data-theme="dark"] :is(.note-card,.status-card,.tool-card,.info,.card,.panel,.start-card,.step-card,.result-card,.result-block,.help-card,.progress,.progress-wrap,.tool-demo,.box,.choice) p,
html[data-theme="dark"] :is(.card p,.tool-card .plain,.examples li,.example-box li,.note,.small,.foot,.row,.progress-row,.progress-wrap .progress-row) {
  color: #d2cbd5 !important;
}
html[data-theme="dark"] :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select) {
  background: #1c1b24 !important; color: #f9f5fb !important; border-color:#675e6c !important;
}
html[data-theme="dark"] :is(input,textarea)::placeholder {color:#aaa1b1 !important;opacity:1}
html[data-theme="dark"] :is(.nav a,.mini-nav a,.toplink,.ghost,.filter,.help-btn) {
  background: #36303e !important; color:#f8f2fb !important; border-color:#726476 !important;
}
html[data-theme="dark"] .filter.active {background:#e8c47d !important;color:#241822 !important}
html[data-theme="dark"] :is(.primary,.start,.open,.box form button[type="submit"],.box form button:not(.theme-toggle)) {
  background:#e6c789 !important; color:#251d25 !important;
}
html[data-theme="dark"] :is(.track){background:#514858 !important}
html[data-theme="dark"] :is(.live){background:#183e31 !important;color:#b5f1d2 !important;border-color:#548d73 !important}
html[data-theme="dark"] .badge {background:#3c3040 !important;color:#f6e4c0 !important;border-color:#c7a457 !important}
html[data-theme="dark"] .hero-btn.alt {background:#e7dfe8 !important;color:#241a26 !important}
html[data-theme="dark"] :is(.footer,.topbar) {border-color: #554b5a !important}
html[data-theme="dark"] :is(.error){color:#ffbed5 !important}
html[data-theme="dark"] :is(.error,.ai-panel){border-color:#84566a !important}
html[data-theme="dark"] :is(.status-card strong,.tool-card h3,.card h3,.result-block h3,h1,h2,h3){color:inherit}
html[data-theme="dark"] .hero h1 {color:#fff !important}

/* Visual Remix Studio has its own original dark design. The light overrides below preserve its layout. */
html[data-theme="light"] .visual-remix {
  --bg: #f7f5f1; --panel: #ffffff; --panel2: #eee8e9;
  --line: #d9d2d5; --text: #28212a; --muted: #635d65;
  --pink: #b72c75; --gold: #866026; --good: #176747;
  background: radial-gradient(ellipse at 86% -20%,#f4dce9 0,transparent 42%),var(--bg) !important;
  color: var(--text) !important;
}
html[data-theme="light"] .visual-remix .hero-right {background:#fff8fa;border-color:#dccad5}
html[data-theme="light"] .visual-remix .step {border-color:#d3c6d1;color:#5d5363}
html[data-theme="light"] .visual-remix .step.active {background:#fce6ef;color:#8b245a;border-color:#a73170}
html[data-theme="light"] .visual-remix .group :is(input:not([type="color"]),select,textarea) {
  background:#fbfafb !important;color:#27232b !important;border-color:#cfc3cd !important;
}
html[data-theme="light"] .visual-remix :is(input,textarea)::placeholder {color:#77717a !important;opacity:1}
html[data-theme="light"] .visual-remix .btn {background:#eee9ef;color:#3c3341;border-color:#c5b8c9}
html[data-theme="light"] .visual-remix .btn.primary {background:#ab2f70;color:#fff;border-color:#ab2f70}
html[data-theme="light"] .visual-remix .btn.gold {background:#85612b;color:#fff;border-color:#85612b}
html[data-theme="light"] .visual-remix .preview {border-color:#9b7593}
html[data-theme="light"] .visual-remix .brandmark {color:#25131e}
html[data-theme="light"] .visual-remix .pill {border-color:#b38a56;color:#715020}
html[data-theme="light"] .visual-remix .step.active {color:#8a1e54}
html[data-theme="light"] .visual-remix .stat {color:#705020}
html[data-theme="light"] .visual-remix .eyebrow {color:#9b235f}
html[data-theme="light"] .visual-remix .toggleline {color:#362d38}
html[data-theme="light"] .visual-remix .card {box-shadow: 0 8px 22px #44324510}
html[data-theme="light"] .visual-remix .preview {color:#fff}
html[data-theme="dark"] .visual-remix .theme-toggle {background:#302938!important;color:#fff1f9!important}
html[data-theme="light"] .visual-remix :is(.out,.variant,.library-item) {
  background: #faf8fa !important; color: #27202b !important; border-color: #d4cad3 !important;
}
html[data-theme="light"] .visual-remix .variant p {color:#4a414b !important}
html[data-theme="light"] .visual-remix .info {background:#f9f2e5 !important;color:#4b3b26 !important}
html[data-theme="light"] .visual-remix .tab {border-color:#c9bdc6 !important;color:#61535f !important}
html[data-theme="light"] .visual-remix .tab[aria-selected="true"] {background:#ac2d70 !important;color:#fff !important;border-color:#ac2d70 !important}
html[data-theme="light"] .visual-remix #toast {background:#fbf6fa !important;color:#2a212b !important;box-shadow:0 12px 40px #0003}
