/* The light design remains the default. This sheet only adds the theme control
   and overrides colors when a visitor explicitly selects dark mode. */
:root { color-scheme: light; }
.theme-logo-dark { display: none !important; }
.theme-toggle {
  position: fixed; z-index: 40; right: max(18px, env(safe-area-inset-right));
  top: 98px; bottom: auto; width: 46px; height: 46px;
  display: grid; place-items: center; padding: 0; border: 1px solid #d4dce2;
  border-radius: 14px; background: #e4f1fb; color: #243f56;
  box-shadow: 0 4px 20px #162b3a22; cursor: pointer;
  transition: background .18s, border-color .18s;
}
.theme-toggle:hover { background: #d4e8f8; border-color: #a8c8df; }
.theme-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .theme-sun { opacity: 0; transform: rotate(-100deg) scale(.4); }
.theme-toggle .theme-moon { opacity: 1; transform: rotate(0) scale(1); }

html[data-theme="dark"] {
  color-scheme: dark;
  --red: #d20000;
  --ink: #eff3f6; --muted: #b7c4ce; --line: #35424d;
  --paper: #11181f; --sky-surface: #192630; --red-surface: #302127;
}
html[data-theme="dark"] .theme-logo-light { display: none !important; }
html[data-theme="dark"] .theme-logo-dark { display: block !important; }
html[data-theme="dark"] .footer-logo .theme-logo-dark { width: 124.776%; left: -11.94%; top: -187.5%; }
html[data-theme="dark"] .theme-toggle { color: #f5e0aa; background: #24313d; border-color: #536372; box-shadow: 0 4px 20px #0005; }
html[data-theme="dark"] .theme-toggle:hover { background: #303f4c; }
html[data-theme="dark"] .theme-toggle .theme-moon { opacity: 0; transform: rotate(75deg) scale(.4); }
html[data-theme="dark"] .theme-toggle .theme-sun { opacity: 1; transform: rotate(0) scale(1); }
html[data-theme="dark"] .site-header { background: #11181ff5; }
html[data-theme="dark"] .menu-toggle { color: var(--ink); }
html[data-theme="dark"] .navigation #primary-nav,
html[data-theme="dark"] #primary-nav .nav-dropdown { background: #17222b; border-color: var(--line); }
/* Keep desktop navigation transparent; mobile menus keep an opaque surface. */
@media(min-width:1101px) { html[data-theme="dark"] .navigation #primary-nav { background: transparent; } }
html[data-theme="dark"] #primary-nav > a,
html[data-theme="dark"] #primary-nav .nav-trigger { color: var(--ink); }
html[data-theme="dark"] #primary-nav > a.active,
html[data-theme="dark"] #primary-nav .nav-trigger.active { background: #2b3945; color: #fff; }
html[data-theme="dark"] #primary-nav > a:hover,
html[data-theme="dark"] #primary-nav .nav-trigger:hover { color: var(--red); }
html[data-theme="dark"] #primary-nav > a[href="/#community"] { background: transparent; border-color: #a8b8c5; color: var(--ink); }
html[data-theme="dark"] #primary-nav > a[href="/#community"]:hover { background: #263540; color: #fff; }
html[data-theme="dark"] #primary-nav .nav-dropdown > .dropdown-parent { background: #1c2a35; color: #fff; border-color: #b2bec8; }
html[data-theme="dark"] #primary-nav .dropdown-branches a { color: var(--ink); }
html[data-theme="dark"] #primary-nav .dropdown-branches a[aria-current=page],
html[data-theme="dark"] #primary-nav .nav-dropdown > .dropdown-parent[aria-current=page] { background: #2b3a46; }
html[data-theme="dark"] #primary-nav .nav-dropdown > .dropdown-parent:hover,
html[data-theme="dark"] #primary-nav .nav-dropdown > .dropdown-parent:focus-visible,
html[data-theme="dark"] #primary-nav .dropdown-branches a:hover,
html[data-theme="dark"] #primary-nav .dropdown-branches a:focus-visible { background: #432c32; }
html[data-theme="dark"] .page-banner { background: linear-gradient(110deg, #192b38, #1a2630 48%, #35232b); border-color: var(--line); }
html[data-theme="dark"] .page-banner::before { opacity: .2; }
html[data-theme="dark"] .page-banner::after { opacity: .35; }
html[data-theme="dark"] .page-banner .page-description { color: #c2cdd5; }
html[data-theme="dark"] .mission-section { background: #17232d; }
html[data-theme="dark"] .mission-section::before { opacity: .45; }
html[data-theme="dark"] .explore-section { background: #11181f; border-color: var(--line); }
html[data-theme="dark"] .news-section { background: #16232d; border-color: var(--line); }
html[data-theme="dark"] .news-card { background: #1c2a35; border-color: #627381; }
html[data-theme="dark"] .news-copy p { color: var(--ink); }
html[data-theme="dark"] .community-section { background: linear-gradient(115deg, #34232a, #25232a); border-color: #4f343c; }
html[data-theme="dark"] .community h2 { color: #fff; }
html[data-theme="dark"] .community p.community-question,
html[data-theme="dark"] .community p:not(.eyebrow):not(.community-question) { color: #edf1f4; }
html[data-theme="dark"] .topic-card,
html[data-theme="dark"] .member-card,
html[data-theme="dark"] .chair-section-surface .member-card,
html[data-theme="dark"] .observations-team-surface .member-card,
html[data-theme="dark"] .engineering-team-surface .member-card { background: #1c2a35; border-color: #435562; }
html[data-theme="dark"] .topic-card:nth-child(2) { background: #1b2c39; }
html[data-theme="dark"] .topic-card:nth-child(3) { background: #2c252d; }
html[data-theme="dark"] .page-card:hover { background: #342a32; border-color: var(--red); }
html[data-theme="dark"] .station-spec,
html[data-theme="dark"] .simple-note,
html[data-theme="dark"] .snee-dashboard-link { background: #20313d; border-color: #435766; }
html[data-theme="dark"] .station-id,
html[data-theme="dark"] .eligibility-tag,
html[data-theme="dark"] .page-banner .eligibility-tag { background: #462a31; color: var(--red); }
html[data-theme="dark"] .page-intro .team-links a { background: #22323e; border-color: #465865; }
html[data-theme="dark"] .team-links a:hover { background: #304350; color: #fff; }
html[data-theme="dark"] .membership-notice { background: #34262d; }
html[data-theme="dark"] .resource-graphic { background-color: #223947; }
html[data-theme="dark"] .data-tabs { background: #14212a; border-color: var(--line); }
html[data-theme="dark"] .data-tabs button[aria-selected=true] { background: #314655; color: #fff; }
html[data-theme="dark"] .data-tabs button:hover { color: var(--red); }
html[data-theme="dark"] main .eyebrow,
html[data-theme="dark"] .mission-label,
html[data-theme="dark"] .member-role,
html[data-theme="dark"] .text-link,
html[data-theme="dark"] .program-copy a,
html[data-theme="dark"] .observation-links [aria-current=page] { color: var(--red); }
html[data-theme="dark"] .text-link > span { color: inherit; }
html[data-theme="dark"] .hero-immersive .text-link,
html[data-theme="dark"] .hero-immersive .text-link > span { color: #fff; }
html[data-theme="dark"] .button,
html[data-theme="dark"] .parent-org-link { background: var(--red); color: #fff; border-color: var(--red); }
html[data-theme="dark"] .button:hover,
html[data-theme="dark"] .parent-org-link:hover { background: #981919; }
html[data-theme="dark"] .cocorahs-display-actions .display-secondary { background: transparent; color: var(--red); border-color: var(--red); }
html[data-theme="dark"] .cocorahs-display-actions .display-secondary:hover { background: #3d2a30; }
html[data-theme="dark"] .wxchallenge-copy .button { background: transparent; color: #fff; border-color: #ffffffbb; }
html[data-theme="dark"] .wxchallenge-copy .button:hover { background: #ffffff18; }
html[data-theme="dark"] .site-footer { background: #101b24; color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .footer-base { color: #afbfcb; border-color: var(--line); }
html[data-theme="dark"] .footer-socials a { background: #24343f; border-color: #4a5f6d; }
html[data-theme="dark"] .footer-socials a:hover { color: var(--red); background: #3e2a31; }
/* Preserve the official black-lettered college logo on a white surface. */
html[data-theme="dark"] .footer-eas { background: #fff; border-color: #dfe4e8; }
html[data-theme="dark"] .station-embed,
html[data-theme="dark"] .booking-calendar { border-color: #455a69; background: #fff; }
html[data-theme="dark"] iframe { color-scheme: light; }
@media(max-width:480px) { .theme-toggle { right: 12px; top: 88px; bottom: auto; width: 44px; height: 44px; } }

/* A little celestial motion, with reduced-motion support. */
.theme-toggle { overflow: hidden; }
.theme-toggle svg { position: absolute; transition: opacity .35s, transform .5s cubic-bezier(.2,.8,.2,1); }
.theme-toggle .theme-star { transform-box: fill-box; transform-origin: center; animation: theme-twinkle 3s ease-in-out infinite; }
.theme-toggle .theme-star-small { animation-delay: 1s; }
.theme-sun-rays { transform-origin: 12px 12px; }
.theme-toggle:hover .theme-sun-rays { animation: theme-rays 8s linear infinite; }
@keyframes theme-twinkle { 0%,100% { opacity: .45; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes theme-rays { to { transform: rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .theme-toggle svg, .theme-toggle .theme-star, .theme-toggle .theme-sun-rays { animation: none !important; transition: none !important; } }
