/* TrueText dark theme — overrides Tailwind v4 color variables when <html class="dark"> */
html.dark{
  color-scheme:dark;
  --color-white:#0B1120;
  --color-slate-50:oklch(16.5% .035 264);
  --color-slate-100:oklch(20.8% .042 265.755);
  --color-slate-200:oklch(27.9% .041 260.031);
  --color-slate-300:oklch(37.2% .044 257.287);
  --color-slate-400:oklch(55.4% .046 257.417);
  --color-slate-500:oklch(70.4% .04 256.788);
  --color-slate-600:oklch(80% .025 255);
  --color-slate-700:oklch(86.9% .022 252.894);
  --color-slate-800:oklch(92.9% .013 255.508);
  --color-slate-900:oklch(96.8% .007 247.896);
  --color-slate-950:oklch(98.4% .003 247.858);
  --color-indigo-50:oklch(25% .06 272);
  --color-indigo-100:oklch(30% .08 273);
  --color-indigo-200:oklch(38% .1 274);
  --color-violet-100:oklch(28% .07 294);
  --color-violet-200:oklch(36% .09 293);
  --color-cyan-50:oklch(24% .04 200);
  --color-emerald-50:oklch(24% .04 166);
  --color-emerald-100:oklch(29% .06 163);
  --color-emerald-200:oklch(36% .08 164);
  --color-amber-50:oklch(25% .04 95);
  --color-amber-100:oklch(30% .06 95);
  --color-amber-200:oklch(38% .08 95);
  --color-rose-50:oklch(24% .04 12);
  --color-rose-100:oklch(29% .06 12);
  --color-rose-200:oklch(36% .08 10);
}
/* keep intentionally dark blocks dark and their white text white */
html.dark .bg-slate-900{background-color:#111827}
html.dark .bg-slate-900\/50{background-color:#11182780}
html.dark .bg-slate-950{background-color:#020617}
html.dark .text-white{color:#fff}
html.dark .border-slate-800{border-color:#1f2937}
html.dark .bg-slate-900 .text-slate-100,html.dark .bg-slate-950 .text-slate-100{color:#f1f5f9}
html.dark .bg-slate-900 .text-slate-300,html.dark .bg-slate-950 .text-slate-300,html.dark .bg-slate-900 .text-slate-400,html.dark .bg-slate-950 .text-slate-400{color:#94a3b8}
/* header bar (inline light style) */
html.dark header[style],html.dark nav[style],html.dark div[style*="255,255,255,0.7"]{background:rgba(11,17,32,.75)!important;border-bottom-color:rgba(148,163,184,.15)!important}
html.dark .glass-panel{background-color:rgba(15,23,42,.6)}
html.dark input,html.dark textarea,html.dark select{color:var(--color-slate-900)}
html.dark ::placeholder{color:#64748b}

/* theme toggle */
#tt-theme-toggle{position:fixed;left:18px;bottom:18px;z-index:60;width:40px;height:40px;border-radius:999px;border:1px solid rgba(148,163,184,.35);
  background:rgba(255,255,255,.85);color:#0f172a;display:flex;align-items:center;justify-content:center;cursor:pointer;
  box-shadow:0 4px 14px rgba(15,23,42,.12);backdrop-filter:blur(8px);transition:transform .15s}
#tt-theme-toggle:hover{transform:scale(1.06)}
html.dark #tt-theme-toggle{background:rgba(15,23,42,.85);color:#e2e8f0;border-color:rgba(148,163,184,.25)}
#tt-theme-toggle svg{width:18px;height:18px}

/* Mobile: stop decorative background blobs from widening the page (iOS Safari ignores overflow on body alone) */
html, body { max-width: 100%; overflow-x: hidden; }
@supports (overflow-x: clip) { html, body { overflow-x: clip; } }
