/* The same academy identity, with a quiet forest palette for night reading. */
.theme-toggle { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 1px solid var(--line); border-radius: 50%; padding: 10px; background: transparent; color: var(--ink); }
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { background: var(--beige); border-color: var(--gold); }
.theme-toggle .icon { width: 21px; height: 21px; stroke-width: 1.5; }
.theme-toggle .theme-sun { display: none; }
html[data-theme=dark] .theme-toggle .theme-sun { display: block; }
html[data-theme=dark] .theme-toggle .theme-moon { display: none; }
.header-actions { gap: 12px; }

html[data-theme=dark] {
  --green: #ffffff;
  --deep: #08271f;
  --ink: #ffffff;
  --gold: #d1b577;
  --gold-light: #e8ce92;
  --cream: #0b211b;
  --paper: #102b23;
  --beige: #142f26;
  --muted: #c6c6c6;
  --line: #344b3f;
}
html[data-theme=dark] ::selection { background: #d1b577; color: #14291f; }
.brand { position: relative; }
.brand .brand-dark { display: none; position: absolute; width: 160%; height: 160%; max-width: none; top: -40%; left: -30%; pointer-events: none; object-fit: cover; }
html[data-theme=dark] .brand { overflow: clip; }
html[data-theme=dark] .brand .brand-light { display: none; }
html[data-theme=dark] .brand .brand-dark { display: block; filter: url(#brand-dark-cutout); }
html[data-theme=dark] .announcement { background: #102e25; color: #ffffff; }
html[data-theme=dark] .site-header { background: #0b211bf5; border-color: var(--line); }
html[data-theme=dark] .desktop-nav { color: #ffffff; }
html[data-theme=dark] .skip-link { background: var(--paper); }
html[data-theme=dark] .btn-green,
html[data-theme=dark] .filter.active { background: var(--gold); color: #14291f; }
html[data-theme=dark] .btn-green:hover { background: #e5cc93; }
html[data-theme=dark] .btn-cream { background: #ffffff; color: #173b33; }
html[data-theme=dark] .btn-cream:hover { background: #f2f2f2; }
html[data-theme=dark] .hero h1 em,
html[data-theme=dark] .section h2 em,
html[data-theme=dark] .path-section h2 em,
html[data-theme=dark] .site-dialog h2 em { color: #ffffff; }
html[data-theme=dark] .tiny-check { border-color: #58705b; }
html[data-theme=dark] .hero-image-wrap { background: #173c30; }
html[data-theme=dark] .hero-float { border-color: var(--line); box-shadow: 0 8px 30px #00000016; }
html[data-theme=dark] .float-icon,
html[data-theme=dark] .dialog-icon { background: #203d2d; color: #d9cd9d; }
html[data-theme=dark] .program-art { background: #1c3b2e; }
html[data-theme=dark] .art-two { background: #39392b; }
html[data-theme=dark] .art-three { background: #1e3c34; }
html[data-theme=dark] .art-four { background: #2c3e2c; }
html[data-theme=dark] .program-icon,
html[data-theme=dark] .arabic-art { color: #ffffff; }
html[data-theme=dark] .program-number { color: #cccccc; }
html[data-theme=dark] .arch-motif { border-color: #8d996b55; }
html[data-theme=dark] .arch-motif:after { border-color: #8d996b33; }
html[data-theme=dark] .program-kicker { color: #d2bd89; }
html[data-theme=dark] .program-art:after { background: radial-gradient(ellipse at var(--glow-x,50%) var(--glow-y,50%),#d4c77a24,transparent 65%); }
html[data-theme=dark] .story-section { background: #0e3026; color: var(--ink); }
html[data-theme=dark] .closing { background: #113c2f; color: var(--ink); border: 1px solid #37523f; }
html[data-theme=dark] .steps:before { border-color: #746d4b; }
html[data-theme=dark] .step-no { border-color: #8f8055; }
html[data-theme=dark] .path-section,
html[data-theme=dark] .field select,
html[data-theme=dark] .path-result,
html[data-theme=dark] .site-dialog { border-color: var(--line); }
html[data-theme=dark] .dialog-checks,
html[data-theme=dark] .dialog-secondary,
html[data-theme=dark] .dialog-fit { color: #eeeeee; }
html[data-theme=dark] .site-dialog::backdrop { background: #020e0bc9; }
html[data-theme=dark] .whatsapp-float { background: #1a5943; border-color: #7c9c6c; box-shadow: 0 5px 24px #00000030; }

html[data-theme=dark] .community-strip { background: #142f26; border-color: #3e5141; }
html[data-theme=dark] .community-stat { border-color: #46533f; }
html[data-theme=dark] .community-country { color: #eeeeee; background: #0d251e; border-color: #3e5141; }
html[data-theme=dark] .community-hint { color: #bdbdbd; }
html[data-theme=dark] .community-controls button { border-color: #6f7956; }
html[data-theme=dark] .community-controls button:hover:not(:disabled) { background: #304b34; border-color: var(--gold); }
html[data-theme=dark] .community-country:before { background: var(--gold); }

html[data-theme=dark] .reviews-section { background: linear-gradient(180deg,#10291f,#0d251d); border-color: #344b3f; }
html[data-theme=dark] .review-source { color: #d1b577; }
html[data-theme=dark] .reviews-viewport { background: #173e30; color: var(--ink); border: 1px solid #476043; }
html[data-theme=dark] .review-quote { color: var(--ink); }
html[data-theme=dark] .review-arrow { border-color: #7c8964; background: #193c2e; color: #ffffff; }
html[data-theme=dark] .review-arrow:hover:not(:disabled) { background: #34503a; border-color: var(--gold); }
html[data-theme=dark] .review-arrow:disabled { background: #193c2e; }
html[data-theme=dark] .review-position { color: #ffffff; }
html[data-theme=dark] .review-position-total,
html[data-theme=dark] .reviews-hint,
html[data-theme=dark] .reviews-editorial-note { color: #bdbdbd; }
html[data-theme=dark] .review-position-divider { background: #6f7d58; }
html[data-theme=dark] .review-dot>span { background: #748666; }
html[data-theme=dark] .review-dot.is-active>span { background: var(--gold); }

.theme-transition body,
.theme-transition .site-header,
.theme-transition .program-card,
.theme-transition .hero-float,
.theme-transition .community-strip,
.theme-transition .community-country,
.theme-transition .theme-toggle,
.theme-transition .path-section { transition: background-color .2s ease,color .2s ease,border-color .2s ease; }

@media (max-width:1100px) {
  .desktop-nav { display: none; }
  .menu-toggle { display: block; }
}
@media (max-width:620px) {
  .site-header .brand { width: 168px; height: 47px; }
  .header-actions { gap: 4px; }
  .theme-toggle { width: 40px; height: 44px; border-color: transparent; padding: 9px; }
  .menu-toggle { width: 38px; }
}
@media (max-width:360px) {
  .site-header .brand { width: 126px; height: 36px; }
  .header-inner { gap: 6px; }
  .header-actions { gap: 2px; }
  .menu-toggle { width: 36px; }
}
@media (prefers-reduced-motion:reduce) {
  .theme-transition * { transition: none !important; }
}

/* Neutral reading colours keep the white lettering free of a warm tint. */
html[data-theme=dark] .hero-description,
html[data-theme=dark] .program-body p,
html[data-theme=dark] .story-intro,
html[data-theme=dark] .story-point p,
html[data-theme=dark] .story-signature,
html[data-theme=dark] .step p,
html[data-theme=dark] .path-copy>p:last-child,
html[data-theme=dark] .faq-answer,
html[data-theme=dark] .site-dialog>p:not(.eyebrow):not(.form-footnote),
html[data-theme=dark] .reviews-intro>p,
html[data-theme=dark] .closing>p:not(.eyebrow),
html[data-theme=dark] .story-left h2 em,
html[data-theme=dark] .closing h2 em,
html[data-theme=dark] .image-caption { color: #ffffff; }
html[data-theme=dark] .closing-note { color: #c6c6c6; }
