/* Shared theme tokens. The inverse values are exact RGB complements of the original CSS literals. */
:root {
  --theme-color-598b32b7d9: #000;
  --theme-color-7bdc44be1f: #0009;
  --theme-color-69873d4ea1: #090302;
  --theme-color-d79a75a6e3: #0a0908;
  --theme-color-bba8743f1a: #0a0909;
  --theme-color-0bb7517422: #0b0807;
  --theme-color-a397ab7f7a: #0b0d10;
  --theme-color-972d81cd99: #0f0b0a;
  --theme-color-c590853aed: #131110;
  --theme-color-34d6dbd1aa: #1c0b07;
  --theme-color-adedd7c595: #1c1817d9;
  --theme-color-6b45c61067: #241f1d88;
  --theme-color-bbd7927232: #241f1daa;
  --theme-color-f7429790fa: #2722200a;
  --theme-color-814dc92b6b: #272322;
  --theme-color-b8197a9317: #27232226;
  --theme-color-3fac5d1d59: #27232266;
  --theme-color-a21a56d10c: #2a2624;
  --theme-color-d68cf3fcc0: #2b2625;
  --theme-color-385408f3e2: #41565a;
  --theme-color-eba2551ea6: #4a403c;
  --theme-color-9c47ba2856: #514845;
  --theme-color-c4b16bb21c: #534844;
  --theme-color-ef5162d448: #554963;
  --theme-color-9fa9d8100f: #625b58;
  --theme-color-fc436a9efc: #665e5b;
  --theme-color-aa17d42905: #6c615d;
  --theme-color-672cd65cd6: #735142;
  --theme-color-6bf6f186ba: #777;
  --theme-color-697d7030b4: #78706d;
  --theme-color-6e99e4efe5: #8a7c78;
  --theme-color-57164b64d4: #8b807d;
  --theme-color-8df9412053: #aea3a0;
  --theme-color-11d21e232d: #afa4a1;
  --theme-color-8fdbd7ebe2: #b4aaa6;
  --theme-color-5d285dcd6d: #b7aaa4;
  --theme-color-0a28b6a585: #b7aba7;
  --theme-color-897fa525c0: #b8aca8;
  --theme-color-d401724f09: #b9472c;
  --theme-color-10f4d1f781: #b9472c0d;
  --theme-color-d73800ade2: #b9b0ac;
  --theme-color-4d539fd0d6: #cb684e;
  --theme-color-d436045138: #ccc;
  --theme-color-7d27647f3d: #d6cfcd;
  --theme-color-247cf7759c: #dbd4d2;
  --theme-color-fa14fcba21: #dfded4;
  --theme-color-2cc27e6cfc: #e0c3bc33;
  --theme-color-c9f10b6111: #e1dcdb;
  --theme-color-2f46b8d88d: #e2a192;
  --theme-color-4626b88f50: #e6e2e1;
  --theme-color-1dbddf8751: #e7dddb;
  --theme-color-4820532af9: #e7e3e1;
  --theme-color-04cf4f05c0: #e7e4ed;
  --theme-color-0775a9cf34: #e7e6dc;
  --theme-color-e452470b35: #e8e7de;
  --theme-color-39c900773b: #ece5dc;
  --theme-color-a9eb4e55a7: #eeede5;
  --theme-color-117c11d60f: #eeede580;
  --theme-color-6e8fe94a74: #efeee7;
  --theme-color-49813a192b: #f0e6e4;
  --theme-color-28f3e03f35: #f3eae8;
  --theme-color-ece52c72b8: #f5f3ec;
  --theme-color-7b79ea2ea0: #f5f3eced;
  --theme-color-1af3fb2886: #f8e9e6;
  --theme-color-d14f901611: #fff;
  --theme-color-09762ae968: #ffffff03;
  --theme-color-71d042241d: #ffffff15;
  --theme-color-fbc55916a6: rgb(39 35 34 / 5%);
  --theme-color-4540c8a818: rgb(98 91 88 / 25%);
  --theme-color-eb22a8aca6: rgba(0, 0, 0, 0.24);
  --theme-color-325b8581b5: rgba(0, 0, 0, 0.28);
  --theme-color-487cf26cde: rgba(0, 0, 0, 0.32);
  --theme-color-8493165481: rgba(0, 0, 0, 0.34);
  --theme-color-c72f388f1a: rgba(0, 0, 0, 0.42);
  --theme-color-4db2deba6d: rgba(0, 0, 0, 0.54);
  --theme-color-1ae88974c6: rgba(0, 0, 0, 0.58);
  --theme-color-69a5a93a90: rgba(0, 0, 0, 0.6);
  --theme-color-2b40fd9c9b: rgba(0, 0, 0, 0.72);
  --theme-color-712130fab7: rgba(0, 0, 0, 0.76);
  --theme-color-d323dae99e: rgba(0, 0, 0, 0.82);
  --theme-color-a6ebffc33c: rgba(10,9,8,0.98);
  --theme-color-a14a102794: rgba(11, 13, 16, 0.3);
  --theme-color-1ec5e220fa: rgba(14, 10, 9, 0.94);
  --theme-color-4487e20f64: rgba(157, 141, 135, 0.1);
  --theme-color-c01f8cb1ab: rgba(157, 141, 135, 0.18);
  --theme-color-4137b2be75: rgba(185, 71, 44, 0);
  --theme-color-d0e994c6f4: rgba(185, 71, 44, 0.08);
  --theme-color-44dd08be16: rgba(185, 71, 44, 0.09);
  --theme-color-39bd54a9d4: rgba(185, 71, 44, 0.12);
  --theme-color-33b8e2233a: rgba(185, 71, 44, 0.14);
  --theme-color-d95734fd5b: rgba(185, 71, 44, 0.15);
  --theme-color-a76df91eb6: rgba(185, 71, 44, 0.16);
  --theme-color-5289c4bd4d: rgba(185, 71, 44, 0.18);
  --theme-color-0583ec9f67: rgba(185, 71, 44, 0.22);
  --theme-color-38bafeba74: rgba(185, 71, 44, 0.24);
  --theme-color-e8a81f3e2a: rgba(185, 71, 44, 0.25);
  --theme-color-19bec18b6c: rgba(185, 71, 44, 0.28);
  --theme-color-53576d271a: rgba(185, 71, 44, 0.3);
  --theme-color-5ab0ccd974: rgba(185, 71, 44, 0.34);
  --theme-color-44edc04d62: rgba(185, 71, 44, 0.36);
  --theme-color-cefbac401f: rgba(185, 71, 44, 0.38);
  --theme-color-feeb7c2f13: rgba(185, 71, 44, 0.42);
  --theme-color-d57b309ca9: rgba(185, 71, 44, 0.45);
  --theme-color-be15a0e470: rgba(185, 71, 44, 0.46);
  --theme-color-5e81ab8ea7: rgba(185, 71, 44, 0.5);
  --theme-color-fe86e5f7a1: rgba(185, 71, 44, 0.58);
  --theme-color-e90934d08b: rgba(185, 71, 44, 0.62);
  --theme-color-52f485af6e: rgba(185, 71, 44, 0.65);
  --theme-color-99270e926b: rgba(185, 71, 44, 0.72);
  --theme-color-6058dd8e69: rgba(185, 71, 44, 0.78);
  --theme-color-06b8b87093: rgba(192, 77, 51, 0.88);
  --theme-color-29db6df610: rgba(21, 19, 18, 0.62);
  --theme-color-8f12c6596d: rgba(21, 19, 18, 0.78);
  --theme-color-3661645906: rgba(214, 120, 99, 0.58);
  --theme-color-6b712038f6: rgba(218, 135, 116, 1);
  --theme-color-068697d81a: rgba(224, 155, 139, 0.82);
  --theme-color-eb07cc067b: rgba(255, 255, 255, 0.018);
  --theme-color-7ef9eb4aa9: rgba(255, 255, 255, 0.025);
  --theme-color-b3a3e8cf62: rgba(255, 255, 255, 0.08);
  --theme-color-536e662fd2: rgba(255, 255, 255, 0.1);
  --theme-color-e7d1bbbea9: rgba(255,255,255,0.035);
  --theme-color-2a0b7b6a66: rgba(26, 23, 22, 0.92);
  --theme-color-e1de02397d: rgba(5, 3, 2, 0.34);
  --theme-color-f6452a36cb: rgba(6, 4, 3, 0.94);
  --theme-canvas-accent-rgb: 185, 71, 44;
  --theme-canvas-pulse-rgb: 219, 138, 120;
  --theme-sculpture-rgb: 161, 62, 35;
  --theme-toggle-dark: #1b1b1b;
  --theme-toggle-light: #f5f3ec;
}

html[data-theme="inverse"][data-page-fade] { background: var(--theme-color-ece52c72b8); }

html[data-theme="inverse"] {
  --theme-color-598b32b7d9: #ffffff;
  --theme-color-7bdc44be1f: #ffffff99;
  --theme-color-69873d4ea1: #f6fcfd;
  --theme-color-d79a75a6e3: #f5f6f7;
  --theme-color-bba8743f1a: #f5f6f6;
  --theme-color-0bb7517422: #f4f7f8;
  --theme-color-a397ab7f7a: #f4f2ef;
  --theme-color-972d81cd99: #f0f4f5;
  --theme-color-c590853aed: #eceeef;
  --theme-color-34d6dbd1aa: #e3f4f8;
  --theme-color-adedd7c595: #e3e7e8d9;
  --theme-color-6b45c61067: #dbe0e288;
  --theme-color-bbd7927232: #dbe0e2aa;
  --theme-color-f7429790fa: #d8dddf0a;
  --theme-color-814dc92b6b: #d8dcdd;
  --theme-color-b8197a9317: #d8dcdd26;
  --theme-color-3fac5d1d59: #d8dcdd66;
  --theme-color-a21a56d10c: #d5d9db;
  --theme-color-d68cf3fcc0: #d4d9da;
  --theme-color-385408f3e2: #bea9a5;
  --theme-color-eba2551ea6: #b5bfc3;
  --theme-color-9c47ba2856: #aeb7ba;
  --theme-color-c4b16bb21c: #acb7bb;
  --theme-color-ef5162d448: #aab69c;
  --theme-color-9fa9d8100f: #9da4a7;
  --theme-color-fc436a9efc: #99a1a4;
  --theme-color-aa17d42905: #939ea2;
  --theme-color-672cd65cd6: #8caebd;
  --theme-color-6bf6f186ba: #888888;
  --theme-color-697d7030b4: #878f92;
  --theme-color-6e99e4efe5: #758387;
  --theme-color-57164b64d4: #747f82;
  --theme-color-8df9412053: #515c5f;
  --theme-color-11d21e232d: #505b5e;
  --theme-color-8fdbd7ebe2: #4b5559;
  --theme-color-5d285dcd6d: #48555b;
  --theme-color-0a28b6a585: #485458;
  --theme-color-897fa525c0: #475357;
  --theme-color-d401724f09: #46b8d3;
  --theme-color-10f4d1f781: #46b8d30d;
  --theme-color-d73800ade2: #464f53;
  --theme-color-4d539fd0d6: #3497b1;
  --theme-color-d436045138: #333333;
  --theme-color-7d27647f3d: #293032;
  --theme-color-247cf7759c: #242b2d;
  --theme-color-fa14fcba21: #20212b;
  --theme-color-2cc27e6cfc: #1f3c4333;
  --theme-color-c9f10b6111: #1e2324;
  --theme-color-2f46b8d88d: #1d5e6d;
  --theme-color-4626b88f50: #191d1e;
  --theme-color-1dbddf8751: #182224;
  --theme-color-4820532af9: #181c1e;
  --theme-color-04cf4f05c0: #181b12;
  --theme-color-0775a9cf34: #181923;
  --theme-color-e452470b35: #171821;
  --theme-color-39c900773b: #131a23;
  --theme-color-a9eb4e55a7: #11121a;
  --theme-color-117c11d60f: #11121a80;
  --theme-color-6e8fe94a74: #101118;
  --theme-color-49813a192b: #0f191b;
  --theme-color-28f3e03f35: #0c1517;
  --theme-color-ece52c72b8: #0a0c13;
  --theme-color-7b79ea2ea0: #0a0c13ed;
  --theme-color-1af3fb2886: #071619;
  --theme-color-d14f901611: #000000;
  --theme-color-09762ae968: #00000003;
  --theme-color-71d042241d: #00000015;
  --theme-color-fbc55916a6: rgb(216 220 221 / 5%);
  --theme-color-4540c8a818: rgb(157 164 167 / 25%);
  --theme-color-eb22a8aca6: rgba(255, 255, 255, 0.24);
  --theme-color-325b8581b5: rgba(255, 255, 255, 0.28);
  --theme-color-487cf26cde: rgba(255, 255, 255, 0.32);
  --theme-color-8493165481: rgba(255, 255, 255, 0.34);
  --theme-color-c72f388f1a: rgba(255, 255, 255, 0.42);
  --theme-color-4db2deba6d: rgba(255, 255, 255, 0.54);
  --theme-color-1ae88974c6: rgba(255, 255, 255, 0.58);
  --theme-color-69a5a93a90: rgba(255, 255, 255, 0.6);
  --theme-color-2b40fd9c9b: rgba(255, 255, 255, 0.72);
  --theme-color-712130fab7: rgba(255, 255, 255, 0.76);
  --theme-color-d323dae99e: rgba(255, 255, 255, 0.82);
  --theme-color-a6ebffc33c: rgba(245, 246, 247, 0.98);
  --theme-color-a14a102794: rgba(244, 242, 239, 0.3);
  --theme-color-1ec5e220fa: rgba(241, 245, 246, 0.94);
  --theme-color-4487e20f64: rgba(98, 114, 120, 0.1);
  --theme-color-c01f8cb1ab: rgba(98, 114, 120, 0.18);
  --theme-color-4137b2be75: rgba(70, 184, 211, 0);
  --theme-color-d0e994c6f4: rgba(70, 184, 211, 0.08);
  --theme-color-44dd08be16: rgba(70, 184, 211, 0.09);
  --theme-color-39bd54a9d4: rgba(70, 184, 211, 0.12);
  --theme-color-33b8e2233a: rgba(70, 184, 211, 0.14);
  --theme-color-d95734fd5b: rgba(70, 184, 211, 0.15);
  --theme-color-a76df91eb6: rgba(70, 184, 211, 0.16);
  --theme-color-5289c4bd4d: rgba(70, 184, 211, 0.18);
  --theme-color-0583ec9f67: rgba(70, 184, 211, 0.22);
  --theme-color-38bafeba74: rgba(70, 184, 211, 0.24);
  --theme-color-e8a81f3e2a: rgba(70, 184, 211, 0.25);
  --theme-color-19bec18b6c: rgba(70, 184, 211, 0.28);
  --theme-color-53576d271a: rgba(70, 184, 211, 0.3);
  --theme-color-5ab0ccd974: rgba(70, 184, 211, 0.34);
  --theme-color-44edc04d62: rgba(70, 184, 211, 0.36);
  --theme-color-cefbac401f: rgba(70, 184, 211, 0.38);
  --theme-color-feeb7c2f13: rgba(70, 184, 211, 0.42);
  --theme-color-d57b309ca9: rgba(70, 184, 211, 0.45);
  --theme-color-be15a0e470: rgba(70, 184, 211, 0.46);
  --theme-color-5e81ab8ea7: rgba(70, 184, 211, 0.5);
  --theme-color-fe86e5f7a1: rgba(70, 184, 211, 0.58);
  --theme-color-e90934d08b: rgba(70, 184, 211, 0.62);
  --theme-color-52f485af6e: rgba(70, 184, 211, 0.65);
  --theme-color-99270e926b: rgba(70, 184, 211, 0.72);
  --theme-color-6058dd8e69: rgba(70, 184, 211, 0.78);
  --theme-color-06b8b87093: rgba(63, 178, 204, 0.88);
  --theme-color-29db6df610: rgba(234, 236, 237, 0.62);
  --theme-color-8f12c6596d: rgba(234, 236, 237, 0.78);
  --theme-color-3661645906: rgba(41, 135, 156, 0.58);
  --theme-color-6b712038f6: rgba(37, 120, 139, 1);
  --theme-color-068697d81a: rgba(31, 100, 116, 0.82);
  --theme-color-eb07cc067b: rgba(0, 0, 0, 0.018);
  --theme-color-7ef9eb4aa9: rgba(0, 0, 0, 0.025);
  --theme-color-b3a3e8cf62: rgba(0, 0, 0, 0.08);
  --theme-color-536e662fd2: rgba(0, 0, 0, 0.1);
  --theme-color-e7d1bbbea9: rgba(0, 0, 0, 0.035);
  --theme-color-2a0b7b6a66: rgba(229, 232, 233, 0.92);
  --theme-color-e1de02397d: rgba(250, 252, 253, 0.34);
  --theme-color-f6452a36cb: rgba(249, 251, 252, 0.94);
  --theme-canvas-accent-rgb: 70, 184, 211;
  --theme-canvas-pulse-rgb: 36, 117, 135;
  --theme-sculpture-rgb: 94, 193, 220;
  --theme-toggle-dark: #e4e8ef;
  --theme-toggle-light: #0a0c13;
}

/* Theme changes are animated for color-bearing properties only; transforms and keyframes keep their existing timing. */
html.theme-transition,
html.theme-transition body,
html.theme-transition body * {
  transition-property: color, background-color, border-color, box-shadow, fill, stroke, opacity !important;
  transition-duration: 300ms !important;
  transition-timing-function: ease !important;
}
@media (prefers-reduced-motion: reduce) {
  html.theme-transition,
  html.theme-transition body,
  html.theme-transition body * { transition: none !important; }
}

/* Small, shared theme control. */
.theme-switcher { position: relative; display: inline-flex; flex: 0 0 auto; align-items: center; }
.theme-trigger { display: inline-grid; place-items: center; width: 25px; height: 32px; padding: 0; color: var(--muted); border: 0; background: transparent; opacity: 0.48; }
.theme-trigger:hover, .theme-trigger:focus-visible, .theme-switcher.is-open .theme-trigger { color: var(--accent, var(--red)); opacity: 0.9; }
.theme-trigger:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }
.theme-trigger__icon { display: block; width: 13px; height: 13px; border: 1px solid currentColor; border-radius: 50%; background: linear-gradient(90deg, var(--theme-toggle-dark) 0 50%, var(--theme-toggle-light) 50% 100%); box-shadow: 0 0 0 1px color-mix(in srgb, currentColor 12%, transparent); }
.theme-menu { position: absolute; top: calc(100% + 9px); left: 0; z-index: 40; display: grid; min-width: 112px; padding: 5px; border: 1px solid var(--border); border-radius: 10px; background: color-mix(in srgb, var(--surface, var(--paper)) 88%, transparent); box-shadow: var(--shadow); opacity: 0; transform: translateY(-5px) scale(0.98); pointer-events: none; visibility: hidden; transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms; backdrop-filter: blur(14px); }
.theme-switcher.is-open .theme-menu { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; visibility: visible; transition-delay: 0s; }
.theme-menu button { width: 100%; padding: 7px 9px; color: var(--text, var(--ink)); font: 12px/1.3 var(--font-body); text-align: left; border: 0; border-radius: 6px; background: transparent; }
.theme-menu button:hover, .theme-menu button:focus-visible, .theme-menu button[aria-checked="true"] { color: var(--accent, var(--red)); background: color-mix(in srgb, var(--accent, var(--red)) 10%, transparent); outline: 0; }
.theme-menu button[aria-checked="true"]::after { content: "·"; float: right; font-size: 18px; line-height: 10px; }
.header-left { display: flex; min-width: 0; align-items: center; gap: 12px; }
@media (max-width: 600px) { .header-left { gap: 7px; } .theme-menu { left: -4px; } }
@media (prefers-reduced-motion: reduce) { .theme-menu { transition: none; } }
.legacy-page .theme-switcher { margin-left: 2px; }
.legacy-page .theme-menu { --surface: var(--surface-strong); --text: var(--text); --border: var(--border); --accent: var(--accent); }

/* These two media frames keep their original paper/black backing in the blue inverse UI. */
html[data-theme="inverse"] .project-visual.project-visual--image { background: #fff; }
html[data-theme="inverse"] .research-figure { background: #fff; }
html[data-theme="inverse"] .play-card .play-image--chartflow { background: #000; }
