:root{color-scheme:light}
.theme-toggle{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:62px;padding:7px 10px;border:1px solid #aaa194;border-radius:2px;background:transparent;color:#202522;font:700 10px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:.09em;white-space:nowrap;flex:0 0 auto;cursor:pointer;transition:background .15s,border-color .15s,color .15s}
nav .nav-links a,body>nav>div:last-child>a{white-space:nowrap;flex-shrink:0}
.theme-toggle::before{content:"";width:7px;height:7px;background:#202522;border:1px solid currentColor}
.theme-toggle:hover{background:#fffdf8;border-color:#8f8679}
.theme-toggle:focus-visible{outline:2px solid #c64b25;outline-offset:3px}
.theme-toggle--fixed{position:fixed;top:24px;right:28px;z-index:60;background:#fffdf8}

html[data-theme="dark"]{
  color-scheme:dark;
  --bg:#171613;--bg-2:#1d1b18;--surface:#24211d;--surface-2:#2b2722;--surface-3:#1d1b18;
  --border:#3d3932;--border-2:#554e43;--border-3:#706658;--text:#f2eee5;
  --text-2:#c0b8aa;--text-3:#91897e;--accent:#e06a3e;--accent-2:#f08a61;
  --gold:#d3a354;--good:#54b58a;--bad:#e07a72;--read:#d2cbbf;
}
html[data-theme="dark"],html[data-theme="dark"] body{background:#171613;color:#f2eee5}
html[data-theme="dark"] body::before{background:#e06a3e}
html[data-theme="dark"] body::after{display:none}

html[data-theme="dark"] nav,
html[data-theme="dark"] .topbar{background:rgba(23,22,19,.96);border-color:#3d3932;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
html[data-theme="dark"] .logo,
html[data-theme="dark"] .logo-wordmark,
html[data-theme="dark"] nav .logo,
html[data-theme="dark"] nav .logo-wordmark{color:#f2eee5}
html[data-theme="dark"] .logo:hover,
html[data-theme="dark"] nav .logo:hover{color:#e06a3e}
html[data-theme="dark"] .logo-mark rect:first-child{fill:#24211d;stroke:#554e43}
html[data-theme="dark"] .logo-mark circle{stroke:#e06a3e}
html[data-theme="dark"] .logo-mark circle+circle{stroke:#e7b39f}
html[data-theme="dark"] .logo-mark path{stroke:#54b58a}
html[data-theme="dark"] .logo-wordmark>span,
html[data-theme="dark"] nav .logo-wordmark>span{background:none;-webkit-text-fill-color:#e06a3e;color:#e06a3e}
html[data-theme="dark"] nav .nav-links a,
html[data-theme="dark"] nav a.back,
html[data-theme="dark"] .topbar .user{color:#c0b8aa}
html[data-theme="dark"] nav .nav-links a:hover,
html[data-theme="dark"] nav a.back:hover{color:#f2eee5}

html[data-theme="dark"] .theme-toggle{background:transparent;color:#f2eee5;border-color:#554e43}
html[data-theme="dark"] .theme-toggle::before{background:#e06a3e}
html[data-theme="dark"] .theme-toggle:hover{background:#2b2722;border-color:#706658}
html[data-theme="dark"] .theme-toggle--fixed{background:#24211d}

html[data-theme="dark"] .hero h1,
html[data-theme="dark"] .how-it-works h2,
html[data-theme="dark"] .features h2,
html[data-theme="dark"] .faq h2,
html[data-theme="dark"] .pricing h2,
html[data-theme="dark"] .cta-section h2,
html[data-theme="dark"] .page-title h1,
html[data-theme="dark"] article h1,
html[data-theme="dark"] .profile-main h1,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] strong{color:#f2eee5}
html[data-theme="dark"] .hero h1 span{color:#e06a3e;-webkit-text-fill-color:#e06a3e}
html[data-theme="dark"] p,
html[data-theme="dark"] li,
html[data-theme="dark"] .hero p,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .auth-note{color:#c0b8aa}
html[data-theme="dark"] a{color:#e98560;text-decoration-color:#89503b}
html[data-theme="dark"] a:hover{color:#f3a081;text-decoration-color:#e06a3e}

html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .btn-sm.btn-primary,
html[data-theme="dark"] .admin-tier.active,
html[data-theme="dark"] .cta-card .btn{background:#e06a3e;color:#171613;border-color:#e06a3e;box-shadow:none}
html[data-theme="dark"] .btn-primary:hover,
html[data-theme="dark"] .btn-sm.btn-primary:hover,
html[data-theme="dark"] .admin-tier.active:hover,
html[data-theme="dark"] .cta-card .btn:hover{background:#f08057;color:#171613;box-shadow:none}
html[data-theme="dark"] .btn-outline,
html[data-theme="dark"] .btn-sm,
html[data-theme="dark"] .admin-tier{background:transparent;color:#f2eee5;border-color:#554e43;backdrop-filter:none}
html[data-theme="dark"] .btn-outline:hover,
html[data-theme="dark"] .btn-sm:hover,
html[data-theme="dark"] .admin-tier:hover{background:#2b2722;color:#f2eee5;border-color:#706658}
html[data-theme="dark"] .btn-white{background:#f2eee5;color:#171613}
html[data-theme="dark"] .btn-gold{background:#d3a354;color:#171613}

html[data-theme="dark"] .live-bar,
html[data-theme="dark"] .product-preview,
html[data-theme="dark"] .step,
html[data-theme="dark"] .fcard,
html[data-theme="dark"] .tier,
html[data-theme="dark"] .faq details,
html[data-theme="dark"] .post-card,
html[data-theme="dark"] .intro-block,
html[data-theme="dark"] .tldr,
html[data-theme="dark"] .faqs details,
html[data-theme="dark"] .cta-card,
html[data-theme="dark"] .related-card,
html[data-theme="dark"] .note,
html[data-theme="dark"] .auth-panel,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .admin-bar,
html[data-theme="dark"] .stat-box,
html[data-theme="dark"] .controls-shell,
html[data-theme="dark"] .upgrade-banner,
html[data-theme="dark"] .trust-bar,
html[data-theme="dark"] .stat{background:#24211d;color:#f2eee5;border-color:#3d3932;box-shadow:none}
html[data-theme="dark"] .product-preview,
html[data-theme="dark"] .tier.popular,
html[data-theme="dark"] .post-card:hover,
html[data-theme="dark"] .cta-card,
html[data-theme="dark"] .auth-panel{box-shadow:8px 8px 0 #0e0d0b}
html[data-theme="dark"] .preview-head,
html[data-theme="dark"] .preview-legend,
html[data-theme="dark"] article th,
html[data-theme="dark"] th,
html[data-theme="dark"] thead th:first-child{background:#2b2722;color:#a9a092;border-color:#554e43}
html[data-theme="dark"] .preview-grid .head{background:#201e1a;color:#91897e}
html[data-theme="dark"] .preview-grid div,
html[data-theme="dark"] td{color:#ddd6ca;border-color:#3d3932}
html[data-theme="dark"] .preview-grid .good,
html[data-theme="dark"] .profit-green{color:#6bc59c}
html[data-theme="dark"] .preview-grid .risk,
html[data-theme="dark"] .profit-red{color:#ed8d85}
html[data-theme="dark"] .preview-grid .edge{color:#ddb56a}
html[data-theme="dark"] .tag-pill.tag-steady,
html[data-theme="dark"] .execution-badge.theoretical{background:#2b2722;color:#c0b8aa;border-color:#3d3932}
html[data-theme="dark"] .tag-pill.tag-edge{background:#3a3020;color:#e3bd74;border-color:#665334}
html[data-theme="dark"] .tag-pill.tag-risk,
html[data-theme="dark"] .tag-pill.tag-stale{background:#3d2522;color:#ef9890;border-color:#70433e}
html[data-theme="dark"] .fcard .icon{background:#2b2722;border-color:#3d3932;color:#e06a3e}
html[data-theme="dark"] .compare-table tr:hover td{background:#2b2722}

html[data-theme="dark"] .plan-free{background:#2b2722;color:#c0b8aa;border-color:#3d3932}
html[data-theme="dark"] .plan-starter,
html[data-theme="dark"] .plan-pro{background:#3b2720;color:#f0a083;border-color:#754a3a}
html[data-theme="dark"] .plan-premium{background:#39301f;color:#e5bd73;border-color:#6f5a33}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] .controls input[type="search"],
html[data-theme="dark"] .controls select,
html[data-theme="dark"] .planner-slot input{background:#1d1b18;color:#f2eee5;border-color:#554e43}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] .planner-slot input:focus{border-color:#e06a3e;box-shadow:0 0 0 3px rgba(224,106,62,.18)}
html[data-theme="dark"] .locked-control,
html[data-theme="dark"] .auth-error,
html[data-theme="dark"] .notice.error{background:#3d2522;color:#ef9890;border-color:#70433e}
html[data-theme="dark"] .table-wrap{background:#24211d;border-color:#554e43;box-shadow:8px 8px 0 #0e0d0b}
html[data-theme="dark"] th:first-child,
html[data-theme="dark"] td:first-child{background:#24211d;box-shadow:1px 0 0 #3d3932}
html[data-theme="dark"] thead th:first-child{background:#2b2722}
html[data-theme="dark"] tr:hover td,
html[data-theme="dark"] tr:hover td:first-child{background:#2b2722}
html[data-theme="dark"] .edge-row td,
html[data-theme="dark"] .edge-row td:first-child{background:#30291d}
html[data-theme="dark"] .edge-row:hover td,
html[data-theme="dark"] .edge-row:hover td:first-child{background:#3a3020}
html[data-theme="dark"] .edge-badge{background:#d3a354;color:#171613}
html[data-theme="dark"] .souvenir-badge{background:#4f8795;color:#111}
html[data-theme="dark"] .execution-summary,
html[data-theme="dark"] .execution-metric,
html[data-theme="dark"] .inputs-rule,
html[data-theme="dark"] .planner-summary,
html[data-theme="dark"] .build-card{background:#201e1a;border-color:#3d3932}
html[data-theme="dark"] .inputs-action{background:#3b2720;color:#f0a083;border-color:#754a3a}
html[data-theme="dark"] .inputs-trigger:hover .inputs-action,
html[data-theme="dark"] .inputs-trigger:focus-visible .inputs-action{background:#4a2f25;color:#f3a081;border-color:#e06a3e}
html[data-theme="dark"] .inputs-dialog{background:#24211d;color:#f2eee5;border-color:#554e43;box-shadow:10px 10px 0 #0e0d0b}
html[data-theme="dark"] .inputs-dialog::backdrop{background:rgba(0,0,0,.68)}
html[data-theme="dark"] .inputs-head,
html[data-theme="dark"] .inputs-tabs{background:#24211d;border-color:#3d3932}
html[data-theme="dark"] .inputs-close{background:transparent;color:#c0b8aa;border-color:#554e43}
html[data-theme="dark"] .inputs-close:hover{background:#2b2722;color:#f2eee5;border-color:#706658}
html[data-theme="dark"] .freshness-banner,
html[data-theme="dark"] .upgrade-banner.free,
html[data-theme="dark"] .upgrade-banner.starter,
html[data-theme="dark"] .upgrade-banner.pro{background:#24211d;color:#c0b8aa}
html[data-theme="dark"] .freshness-banner{border-color:#70433e;border-left-color:#e07a72;color:#ef9890}
html[data-theme="dark"] .stat-box.snapshot{background:#2d201d;border-color:#70433e}
html[data-theme="dark"] .upgrade-banner.free{border-color:#754a3a;border-left-color:#e06a3e}
html[data-theme="dark"] .upgrade-banner.starter,
html[data-theme="dark"] .upgrade-banner.pro{border-color:#6f5a33;border-left-color:#d3a354}
html[data-theme="dark"] .upgrade-banner span{color:#c0b8aa}

html[data-theme="dark"] .post-card .tag,
html[data-theme="dark"] .tag{background:#3b2720;color:#f0a083;border-color:#754a3a}
html[data-theme="dark"] article blockquote{background:#2b2722;color:#c0b8aa}
html[data-theme="dark"] article code,
html[data-theme="dark"] code{background:#2b2722;color:#f0a083;border-color:#3d3932}
html[data-theme="dark"] article pre{background:#11100e;border-color:#3d3932}
html[data-theme="dark"] article pre code{background:transparent;color:#eee8dc}
html[data-theme="dark"] article table{background:#24211d;border-color:#554e43}
html[data-theme="dark"] article td{border-color:#3d3932;color:#d2cbbf}
html[data-theme="dark"] .faqs details[open],
html[data-theme="dark"] .faq details[open]{background:#24211d;border-color:#e06a3e}

html[data-theme="dark"] .auth-existing{background:#3b2720;color:#e8b29f;border-color:#754a3a}
html[data-theme="dark"] .auth-existing b,
html[data-theme="dark"] .panel h3,
html[data-theme="dark"] .muted b{color:#f2eee5}
html[data-theme="dark"] .profile-nav a{color:#c0b8aa}
html[data-theme="dark"] .profile-nav a:hover{background:#2b2722;color:#f2eee5;border-color:#3d3932}
html[data-theme="dark"] .status.ok,
html[data-theme="dark"] .notice.success,
html[data-theme="dark"] .trust-state.fresh{background:#20352c;color:#78caa5;border-color:#38624f}
html[data-theme="dark"] .status.warn{background:#39301f;color:#e5bd73;border-color:#6f5a33}
html[data-theme="dark"] .notice,
html[data-theme="dark"] .status{border-radius:2px}

html[data-theme="dark"] footer{border-color:#3d3932;color:#91897e}

@media(max-width:560px){.theme-toggle--fixed{top:18px;right:18px}.theme-toggle{min-width:56px;padding:7px 8px}}
