/* Local review draft. Original layout, content and light palette are retained. */
html { color-scheme: light; }
.theme-toggle {
  flex: 0 0 44px; position: relative; display: grid; place-items: center;
  width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%;
  color: #454d63; border: 1px solid #5d709c40;
  background: linear-gradient(140deg,#ffffffac,#ffffff3b);
  box-shadow: inset 0 1px 1px #fff9; backdrop-filter: blur(18px);
  transition: background .24s, color .24s, border-color .24s;
}
.theme-toggle:hover { background: #374154; color: #fff; border-color: #ffffff6b; }
.theme-toggle svg { width: 18px; height: 18px; display: block; }
.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; }
.journey-dock .theme-toggle { margin-left: 3px; }
.journey-dock[data-tone="dark"] .theme-toggle { color: #e4e7f0; background: #ffffff10; border-color: #bac5df4f; }
.dark-atmosphere { display: none; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.space-universe { display: none; position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
html[data-theme="dark"] .space-universe { display: block; }
/* The local sphere canvases are texture sources, not separate background scenes. */
.dark-atmosphere { visibility: hidden; }
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e4e7f0; --night: #06090e; --paper: #0b0f17; --muted: #acb3c3; --teal: #b7bfce;
  --sphere-text-gradient: linear-gradient(105deg,#a4d5e4 3%,#afbce6 44%,#cfabd0 76%,#d5b5c9 100%);
  --journey-accent: #b5c1dd; --journey-line: #a8b8d22c;
  --glass-surface: linear-gradient(135deg,#5a6d8430,#1b223264 55%,#63517024);
  --glass-shadow: inset 0 1px 1px #edf4ff36,inset 0 -1px 2px #8c9dbd16,0 16px 45px #0003;
  --glass-active: linear-gradient(135deg,#899bb94f,#75628061);
  background: #06090e;
}
html[data-theme="dark"] body { isolation: isolate; background: transparent; color: var(--ink); }
html[data-theme="dark"] ::selection { background: #bbc6df; color: #10141e; }
html[data-theme="dark"] :is(a,button,summary,[tabindex]):focus-visible { outline: 2px solid #c8d4f5; outline-offset: 4px; }
html[data-theme="dark"] .reading-progress { background: linear-gradient(90deg,#8cadc8,#a9bbdc 42%,#c69abd 73%,#dac3a1); }
html[data-theme="dark"] :is(.scroll-experience.experience,.experience-frame,.journey-outro,.outro-frame) { background: transparent; color: var(--ink); }
html[data-theme="dark"] .dark-atmosphere { display: block; }
html[data-theme="dark"] .scroll-experience .experience-grain { opacity: 0; }
html[data-theme="dark"] .hero-viewport-background { background: transparent; }
html[data-theme="dark"] .scroll-experience :is(.site-header,.worlds-heading) { color: #e4e7f0; }
html[data-theme="dark"] .scroll-experience :is(.wordmark small,.intro-copy>.eyebrow,.worlds-heading>.eyebrow) { color: #b2bacb; }
html[data-theme="dark"] .scroll-experience .brand-star { color: #b9c0cd; }
html[data-theme="dark"] .scroll-experience .desktop-nav {
  background: linear-gradient(140deg,#26324691,#0b1019b8); border-color: #aebcdb4d;
  box-shadow: inset 0 1px 1px #eef5ff26,0 8px 32px #0003;
}
html[data-theme="dark"] .scroll-experience .desktop-nav a:hover { background: #dce6ff14; }
html[data-theme="dark"] :is(.theme-toggle,.scroll-experience .language) { background: var(--glass-surface); border-color: #aebcdb52; color: #dce3f1; box-shadow: var(--glass-shadow); }
html[data-theme="dark"] :is(.theme-toggle,.scroll-experience .language):hover { background: #080c17e8; border-color: #e3e8ff94; color: #fff; }
html[data-theme="dark"] .scroll-experience .contact-link { color: #e7eaf4; background: linear-gradient(135deg,#63718a66,#43405088); box-shadow: inset 0 1px 1px #f2f3ff38,0 0 0 1px #bac6dc45; }
html[data-theme="dark"] .scroll-experience .contact-link:hover { background: #090d18; }
html[data-theme="dark"] .scroll-experience .intro-description { color: #b6bfce; }
html[data-theme="dark"] .scroll-experience .status-dot { background: #b9c9e4; box-shadow: 0 0 12px #bbc9e84d; }
html[data-theme="dark"] .scroll-experience .enter-world { color: #e0e6f2; background: var(--glass-surface); border-color: #bac9e65c; box-shadow: var(--glass-shadow); }
html[data-theme="dark"] .scroll-experience .enter-world:is(:hover,:focus-visible) { background: linear-gradient(145deg,#0b1124eb,#030712ed); border-color: #b4bfdd9c; color: #fff; }
html[data-theme="dark"] .scroll-experience :is(.intro-bottom,.skip-intro,.scroll-invitation,.worlds-bottom) { color: #b4bdcd; }
html[data-theme="dark"] .scroll-experience :is(.skip-intro,.replay) { border-color: #a7b4d244; }
html[data-theme="dark"] .scroll-experience :is(.replay,.worlds-bottom>a) { color: #c0bddb; }
html[data-theme="dark"] .scroll-track { background: #e6ecff08; border-color: #b1bfd45c; }
html[data-theme="dark"] .scroll-track i { background: #c3cbe2; }
html[data-theme="dark"] .scroll-experience :is(.sphere-halo,.sphere-shadow),
html[data-theme="dark"] .sphere-stage:before,
html[data-theme="dark"] :is(.outro-shadow,.outro-caustic) { visibility: hidden; }
html[data-theme="dark"] .scroll-experience .sphere-fallback {
  background: radial-gradient(ellipse at 31% 30%,#c9deef63,transparent 15%),radial-gradient(ellipse at 80% 40%,#d6dcf325,transparent 12%),radial-gradient(circle at 43% 43%,#090e1500 35%,#6b819628 83%,#c0cede30);
  box-shadow: inset 2px 1px 16px #bbcfdf1f,inset -5px -3px 14px #99aaca16;
}
html[data-theme="dark"] .scroll-experience.experience .world-card { box-shadow: inset 0 0 0 1px #becce43b,0 16px 55px #0004; }
html[data-theme="dark"] :is(.world-project,.world-copy>a) { border-color: #c7d1e761; }
html[data-theme="dark"] .journey-manifesto { background: radial-gradient(ellipse at 78% 43%,#1a25302b,transparent 56%),#080c1333; }
html[data-theme="dark"] .manifesto-line { color: color-mix(in srgb,#e4e7f0 var(--line-reveal),#485265); }
html[data-theme="dark"] .manifesto-line:last-child { background: linear-gradient(105deg,color-mix(in srgb,#a4d5e4 var(--line-reveal),#485265),color-mix(in srgb,#afbce6 var(--line-reveal),#485265) 44%,color-mix(in srgb,#cfabd0 var(--line-reveal),#485265) 76%,color-mix(in srgb,#d5b5c9 var(--line-reveal),#485265)); background-clip: text; -webkit-background-clip: text; }
html[data-theme="dark"] :is(.chapter-note,.manifesto-bottom p,.gallery-bottom,.art-credit) { color: #acb5c8; }
html[data-theme="dark"] .manifesto-bottom .manifesto-caption { color: #d9dfeb; }
html[data-theme="dark"] :is(.journey-manifesto,.journey-gallery,.journey-making,.journey-pi,.journey-network) .eyebrow { color: #b8bdd1; }
html[data-theme="dark"] .chapter-rule { background: #a1b4d02b; }
html[data-theme="dark"] .chapter-rule i { background: var(--sphere-text-gradient); }
html[data-theme="dark"] .idea-ring { border-color: #a9bfdf30; box-shadow: 0 0 65px #7397c20e,inset 0 0 70px #89a8dd0a; }
html[data-theme="dark"] .idea-orbit:after { border-color: #c6b4db28; }
html[data-theme="dark"] .idea-orbit>span { color: #a8b3cf77; }
html[data-theme="dark"] .journey-gallery { background: radial-gradient(ellipse at 90% 20%,#30263835,transparent 56%),linear-gradient(140deg,#0b101933,#11162122 60%,#13121d33); }
html[data-theme="dark"] :is(.gallery-heading h2,.making-content h2,.pi-story h2,.network-intro h2) { color: #e4e7f0; }
html[data-theme="dark"] .gallery-window { box-shadow: 0 0 0 1px #b2c2de33,0 18px 65px #0004; }
html[data-theme="dark"] .gallery-meter { background: #a4b3d029; }
html[data-theme="dark"] :is(.gallery-tabs,.making-tabs,.pi-value-tabs,.journey-dock,.making-content,.network-detail) { border-color: #b5c7e347; background: var(--glass-surface); box-shadow: var(--glass-shadow); }
html[data-theme="dark"] :is(.gallery-tabs button,.making-tabs button,.pi-value-tabs button,.journey-dock a,.journey-dock .dock-home) { color: #bfc7d9; }
html[data-theme="dark"] :is(.gallery-tabs button,.making-tabs button,.pi-value-tabs button,.journey-dock a):hover { color: #eef3ff; background: #d4e2ff12; }
html[data-theme="dark"] :is(.gallery-tabs button,.making-tabs button,.pi-value-tabs button)[aria-selected="true"],
html[data-theme="dark"] .journey-dock a[aria-current="location"] { background: var(--glass-active); color: #fff; border-color: #dbe6ff6b; box-shadow: inset 0 1px 1px #e5efff36,0 3px 10px #0002; }
html[data-theme="dark"] .journey-dock { background: linear-gradient(135deg,#263043dd,#171b29ed); }
html[data-theme="dark"] .journey-making { background: radial-gradient(ellipse at 85% 56%,#3431492b,transparent 55%),radial-gradient(ellipse at 8% 20%,#1b3a4a21,transparent 60%),#090e1633; }
html[data-theme="dark"] :is(.making-panel h3,.pi-value-panels h3) { color: #dce2ee; }
html[data-theme="dark"] :is(.making-panel p,.pi-value-panels p) { color: #b1bbcd; }
html[data-theme="dark"] .journey-network { background: radial-gradient(ellipse at 24% 62%,#284d632e,transparent 48%),radial-gradient(ellipse at 90% 28%,#5139582b,transparent 50%),#0c111b22; color: #dce2ee; border-color: #b5c7e325; }
html[data-theme="dark"] .network-constellation svg { stroke: #a4b4d246; }
html[data-theme="dark"] .network-constellation .network-active-path { stroke: #b9aed9; }
html[data-theme="dark"] .network-node { color: #a8b3c9; }
html[data-theme="dark"] .network-node i { background: #8998b3; outline-color: #adbdda38; }
html[data-theme="dark"] .network-node[aria-pressed="true"] { color: #e5e7f6; }
html[data-theme="dark"] .network-node[aria-pressed="true"] i { background: #c5b3dd; box-shadow: 0 0 0 10px #b3badd16,0 0 24px #ad91cf3f; }
html[data-theme="dark"] .network-detail h3 { color: #e0e6f3; }
html[data-theme="dark"] .network-detail .node-role { color: #bfb0d5; }
html[data-theme="dark"] .network-detail p:not(.node-role) { color: #afbbcd; }
html[data-theme="dark"] .journey-pi { background: radial-gradient(ellipse at 12% 54%,#2235482b,transparent 52%),#080d1522; }
html[data-theme="dark"] .pi-watermark { color: #c1cbea0b; }
html[data-theme="dark"] .pi-subtitle { color: #bdb0ce; }
/* The source Little Pi artwork has a white background: retain the original pixels. */
html[data-theme="dark"] .pi-portrait { mix-blend-mode: normal; border-radius: 28px; overflow: hidden; box-shadow: 0 0 70px #b7c9ff0b; }
html[data-theme="dark"] .journey-connect { background: radial-gradient(ellipse at 85% 60%,#503c5e33,transparent 52%),radial-gradient(ellipse at 10% 0%,#2f4b6129,transparent 55%),#10152033; }
html[data-theme="dark"] .group-profile { color: #e0e6f3; background: linear-gradient(118deg,#0b10194d 14%,#1115224d 65%,#15131e4d); }
html[data-theme="dark"] :is(.profile-heading .eyebrow,.profile-overview h3,.profile-location,.profile-specialism,.profile-purpose) { color: #abb7cd; }
html[data-theme="dark"] :is(.profile-overview p,.profile-description) { color: #b1bbce; }
html[data-theme="dark"] .profile-overview .profile-lead { color: #dde3ef; }
html[data-theme="dark"] :is(.profile-brands,.profile-brand) { border-color: #a4b5d329; }
html[data-theme="dark"] .profile-brand h3 a:hover { color: #c4d6ee; }
html[data-theme="dark"] :is(.outro-brand,.outro-brand span,.outro-scroll,.outro-cities) { color: #b3b9ce; }
html[data-theme="dark"] .outro-find { color: #e0e6f2; border-color: #b5c7e34f; }
html[data-theme="dark"] .outro-find:hover { background: #080d18ed; color: #fff; }
html[data-theme="dark"] .journey-addresses { background: linear-gradient(#080c1322,#0d111a44); border-color: #a4b5d329; }
html[data-theme="dark"] :is(.addresses-heading h2,.address-grid h3) { color: #e1e7f4; }
html[data-theme="dark"] :is(.addresses-heading>a,.address-number,.address-grid h3>span) { color: #c4b6d5; }
html[data-theme="dark"] .address-grid p { color: #b4bfd2; }
html[data-theme="dark"] .address-grid>div { border-color: #a4b5d334; }
html[data-theme="dark"] body>footer { background: #080b1233; border-color: #a4b5d329; }
html[data-theme="dark"] .project-dialog { background: #131b29; color: #e4e7f0; border-color: #b5c7e352; box-shadow: 0 30px 100px #000a,inset 0 1px 1px #e4eeff24; }
html[data-theme="dark"] .project-dialog::backdrop { background: #030711d9; }
html[data-theme="dark"] .dialog-image { background: #0a101a; }
html[data-theme="dark"] .dialog-close { background: #172132ed; color: #e8edf6; box-shadow: inset 0 1px 1px #e4efff59; }
html[data-theme="dark"] .dialog-close:hover { background: #030813; }
html[data-theme="dark"] .dialog-copy>p:not(.eyebrow) { color: #b8c1d2; }
html[data-theme="dark"] .company-link { border-color: #bcc7dd66; }
html[data-theme="dark"] .company-link:hover { color: #e3cff0; border-color: #d0bada; }
@media(max-width:760px) {
  .header-actions { gap: 8px; }
  .journey-dock .theme-toggle { flex-basis: 40px; width: 40px; margin-left: 1px; border-color: transparent; background: transparent; box-shadow: none; }
}
@media(max-width:360px) {
  .journey-dock a { padding-left: 5px; padding-right: 5px; }
  .journey-dock .dock-home { padding-left: 5px; padding-right: 5px; }
  .journey-dock .theme-toggle { flex-basis: 36px; width: 36px; }
}
@media(prefers-reduced-motion:reduce) {
  html[data-theme="dark"] .manifesto-line { --line-reveal:100%!important; color: #e4e7f0!important; }
  .theme-toggle { transition: none; }
}
