:root { color-scheme: light; }
.theme-toggle { display: inline-grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--navy); background: #f7f9ff; }
.theme-toggle:hover { color: var(--blue); background: #eaf0fc; }
.theme-toggle svg { width: 20px; height: 20px; pointer-events: none; }
.theme-toggle .theme-sun { display: none; }
html[data-theme='dark'] .theme-toggle .theme-moon { display: none; }
html[data-theme='dark'] .theme-toggle .theme-sun { display: block; }
html[data-theme='dark'] { color-scheme: dark; --blue: #91b6ff; --navy: #e9f0ff; --ink: #dce6f5; --muted: #a9b9d0; --light: #111e32; --line: #2e3e56; }
html[data-theme='dark'] body { background: #0c1321; }
html[data-theme='dark'] .site-header,
html[data-theme='dark'] .nav { background: #101a2a; border-color: var(--line); }
html[data-theme='dark'] .section-light { background: #101b2d; }
html[data-theme='dark'] .card,
html[data-theme='dark'] .form-panel,
html[data-theme='dark'] .donation-panel,
html[data-theme='dark'] .pill,
html[data-theme='dark'] .hero-sticker,
html[data-theme='dark'] .btn-secondary,
html[data-theme='dark'] .menu-toggle,
html[data-theme='dark'] .skip { background: #152238; color: var(--ink); border-color: var(--line); }
html[data-theme='dark'] .service-block { background: #111d30; }
html[data-theme='dark'] .btn-primary,
html[data-theme='dark'] .brand-symbol,
html[data-theme='dark'] .step-number,
html[data-theme='dark'] .language-switch a[aria-current],
html[data-theme='dark'] .amount[aria-pressed='true'] { background: #315edb; color: #fff; }
html[data-theme='dark'] .btn-primary:hover { background: #3b6aeb; }
html[data-theme='dark'] .btn-lime { color: #182e28; }
html[data-theme='dark'] .btn-light { background: #e8efff; color: #1b46ad; }
html[data-theme='dark'] .cta-band { background: #234cbd; }
html[data-theme='dark'] .language-switch,
html[data-theme='dark'] .theme-toggle { background: #17243a; border-color: var(--line); }
html[data-theme='dark'] .language-switch a { color: var(--muted); }
html[data-theme='dark'] .language-switch a:hover:not([aria-current]),
html[data-theme='dark'] .theme-toggle:hover { background: #263956; color: #d9e7ff; }
html[data-theme='dark'] .hero { background: #0d1728; }
html[data-theme='dark'] .hero-media { filter: brightness(.76); }
html[data-theme='dark'] .hero:after { background: linear-gradient(90deg,#0d1728 0%,#0d1728 25%,#0d1728f5 34%,#0d1728b0 47%,#0d172810 70%); }
html[data-theme='dark'] .hero .lead,
html[data-theme='dark'] .hero-note,
html[data-theme='dark'] .service-list li { color: #bbcae0; }
html[data-theme='dark'] .notice,
html[data-theme='dark'] .donate-result,
html[data-theme='dark'] th { background: #192c46; border-color: #344b6c; color: #c5d6ed; }
html[data-theme='dark'] .card-meta span { background: #23324a; color: #c4d2e7; }
html[data-theme='dark'] .icon { background: #22385c; color: #a8c5ff; }
html[data-theme='dark'] .card:nth-child(2) .icon { background: #293c2c; color: #bbda9b; }
html[data-theme='dark'] .card:nth-child(3) .icon { background: #453720; color: #ecd08d; }
html[data-theme='dark'] input:not([type='checkbox']):not([type='radio']),
html[data-theme='dark'] textarea,
html[data-theme='dark'] select,
html[data-theme='dark'] .amount { background: #0e1a2c; border-color: #465a78; color: var(--ink); }
html[data-theme='dark'] .amount[aria-pressed='true'] { background: #315edb; border-color: #789cff; color: white; }
html[data-theme='dark'] input::placeholder,
html[data-theme='dark'] textarea::placeholder { color: #94a7c2; opacity: 1; }
input[type='checkbox'] { accent-color: #315edb; }
html[data-theme='dark'] .form-status:not(:empty) { background: #172d49; border-color: #34577e; color: #c5dcfb; }
html[data-theme='dark'] .form-status[data-state='success'] { color: #b5ebce; background: #14362b; border-color: #3e775e; }
html[data-theme='dark'] .form-status[data-state='error'] { color: #ffd0c9; background: #42272c; border-color: #94575e; }
html[data-theme='dark'] .hero-preview { background: #142136f7; border-color: #40526b; box-shadow: 0 16px 50px #0005; }
html[data-theme='dark'] .preview-heading,
html[data-theme='dark'] .preview-count,
html[data-theme='dark'] .lesson-panel p,
html[data-theme='dark'] .hero-preview .preview-tip { color: #b0c1da; }
html[data-theme='dark'] .lesson-visual,
html[data-theme='dark'] .preview-chevron { background: #203554; }
html[data-theme='dark'] .mini-app,
html[data-theme='dark'] .mini-document { background: #172941; border-color: #476181; }
html[data-theme='dark'] .visual-tag { color: #c4d9fb; }
html[data-theme='dark'] .visual-create { background: #2b3c2c; }
html[data-theme='dark'] .visual-create .mini-app { color: #c1dc98; border-color: #617b49; }
html[data-theme='dark'] .visual-create .visual-tag { color: #cfdfb6; }
html[data-theme='dark'] .visual-grow { background: #42351f; }
html[data-theme='dark'] .visual-grow .mini-app { color: #e7c67f; border-color: #846b3d; }
html[data-theme='dark'] .visual-grow .visual-tag { color: #ecd4a4; }
html[data-theme='dark'] .mini-portfolio i { background: #594628; }
html[data-theme='dark'] .mini-portfolio i:first-child { background: #c29f56; }
html[data-theme='dark'] .lesson-controls,
html[data-theme='dark'] .lesson-progress { background: #0d192b; }
html[data-theme='dark'] .lesson-controls button { color: #b7c8e0; }
html[data-theme='dark'] .lesson-controls button[aria-pressed='true'],
html[data-theme='dark'] .lesson-controls button:hover { background: #284064; color: #e4eeff; }
html[data-theme='dark'] .cosmic-wash { opacity: .25; background: radial-gradient(ellipse at 49% 1%,#8164d53b,transparent 45%),radial-gradient(ellipse at 5% 85%,#377fc73d,transparent 36%); }
html[data-theme='dark'] .celestial-halo { background: radial-gradient(circle,#94bdfc20 0,#7165ae24 25%,transparent 65%); }
html[data-theme='dark'] :focus-visible { outline-color: #90ccff; }
@media(max-width:780px) {
  html[data-theme='dark'] .hero:after { background: linear-gradient(180deg,#0d1728 0%,#0d172800 24%); }
}
@media(max-width:420px) {
  .header-tools { gap: 6px; }
  .theme-toggle { width: 36px; height: 36px; flex-basis: 36px; }
}
@media(max-width:360px) {
  .header-inner { gap: 6px; }
  .header-tools { gap: 4px; }
  .brand { gap: 6px; }
  .brand-name { font-size: 1.1rem; }
  .brand-sub { font-size: .43rem; }
  .menu-toggle { padding: 8px; }
}

html[data-theme="dark"] .btn-compact{--compact-shadow:#0003;--compact-hover-shadow:#0005}
