/* Shared theme tokens. The existing forest palette remains the first-visit default. */
:root {
  --flow-bg: #061c17;
  --flow-surface: #061c17;
  --flow-card: #0a281f;
  --flow-border: #2b5541;
  --flow-ink: #e6f5ec;
  --flow-muted: #8eafa0;
  --flow-accent: #83ddba;
  --flow-line: #37644c;
  --flow-grid: #3f8c6429;
  --flow-shadow: 0 18px 50px #00000024;
}
.theme-toggle {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #406253;
  border-radius: 50%;
  background: #0b281e;
  color: #c4e9d7;
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s;
}
.theme-toggle:hover { background: #164333; border-color: #77c9a9; color: #fff; }
.theme-toggle:focus-visible { outline: 2px solid #36bded; outline-offset: 4px; }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle [data-theme-icon="moon"], .theme-toggle .theme-icon-moon { display: none; }
[data-theme="light"] .theme-toggle [data-theme-icon="sun"],
[data-theme="light"] .theme-toggle .theme-icon-sun { display: none; }
[data-theme="light"] .theme-toggle [data-theme-icon="moon"],
[data-theme="light"] .theme-toggle .theme-icon-moon { display: block; }

:root[data-theme="light"] {
  color-scheme: light;
  --forest: #f4f7f3;
  --ink: #17392e;
  --muted: #4a695d;
  --mint: #076b51;
  --cyan: #007ca9;
  --border: #c7d8ce;
  --bg: #f4f7f3;
  --white: #17392e;
  --teal: #087e71;
  --input: #f4f8f5;
  --line: #c3d5ca;
  --flow-bg: #edf4ee;
  --flow-surface: #f6f8f3;
  --flow-card: #fff;
  --flow-border: #bcd1c2;
  --flow-ink: #163d32;
  --flow-muted: #5d756a;
  --flow-accent: #087653;
  --flow-line: #b0beb4;
  --flow-grid: #c2d3c6;
  --flow-shadow: 0 16px 40px #244b3110;
}
[data-theme="light"] body { background: #f4f7f3; color: #17392e; }
[data-theme="light"] :is(button, a, input):focus-visible { outline-color: #007b8a; }
[data-theme="light"] .theme-toggle { background: #fff; border-color: #adc8b8; color: #275a44; }
[data-theme="light"] .theme-toggle:hover { background: #e6f1e8; border-color: #5c9879; color: #123c2a; }

/* Platform navigation and hero. */
[data-theme="light"] .nav-shell { background: #f4f7f3ef; border-color: #d3e0d7; }
[data-theme="light"] .nav-links { color: #486559; }
[data-theme="light"] .nav-links a:hover { color: #076b51; }
[data-theme="light"] .nav-login { background: #fff; border-color: #b7cdbf; color: #214a36; }
[data-theme="light"] .nav-login:hover { background: #e4f0e6; border-color: #6caa86; }
[data-theme="light"] .hero:before { background: radial-gradient(ellipse, #a2ddbc42, transparent 69%); }
[data-theme="light"] .hero h1 span,
[data-theme="light"] .intro h1 span { background-image: linear-gradient(100deg, #087552, #157b7d 65%, #087ba3); }
[data-theme="light"] :is(.eyebrow, .hero-context, .stage-note) { color: #466c59; }
[data-theme="light"] .status-dot { background: #258950; box-shadow: 0 0 10px #25895025; }
[data-theme="light"] .hero-description { color: #46665a; }
[data-theme="light"] .text-link { color: #21654c; }
[data-theme="light"] .text-link:hover { color: #123f2b; }
[data-theme="light"] .button-primary { background: #116f50; border-color: #0d6546; color: #fff; box-shadow: 0 5px 20px #196a4514; }
[data-theme="light"] .button-primary:hover { background: #085c3e; }
[data-theme="light"] .grid-visual { background: linear-gradient(145deg, #ffffff, #e9f4eb); border-color: #bdd5c5; box-shadow: 0 20px 60px #214d3510; }
[data-theme="light"] .visual-topline,
[data-theme="light"] .visual-topline span:first-child { color: #456e57; }
[data-theme="light"] .map-canvas { background-image: radial-gradient(#46826032 .7px, transparent .7px); }
[data-theme="light"] .map-node { background: #f9fcf8f7; border-color: #a9c8b4; box-shadow: 0 5px 14px #244b3110; }
[data-theme="light"] .map-node:hover { background: #e5f0e7; border-color: #4e9971; }
[data-theme="light"] .map-node > svg { color: #2a7853; }
[data-theme="light"] .map-node small { color: #456a55; }
[data-theme="light"] .warehouse-core > span { color: #244f38; }
[data-theme="light"] .warehouse-core > small { color: #55735f; }
[data-theme="light"] .warehouse-core > svg { filter: drop-shadow(0 7px 18px #174e2c15); }
[data-theme="light"] .map-caption { color: #416b51; border-color: #c2d6c8; }
[data-theme="light"] .map-caption > span:last-child { color: #57705f; }

/* Sections, workspace navigation and cards. */
[data-theme="light"] .principles-strip { background: #e9f1e9; border-color: #ccdccc; }
[data-theme="light"] .principles-strip p { color: #3e6c4e; }
[data-theme="light"] .principles-strip strong { color: #1a492f; }
[data-theme="light"] .principles-strip .wrap > span { color: #506d58; border-color: #bcd1bf; }
[data-theme="light"] :is(.section-heading h2 span, .people-section h2 span, .closing-section h2 span) { color: #377752; }
[data-theme="light"] :is(.section-heading > p, .module-description, .people-statement > p:not(.eyebrow), .people-principles p, .day-panel p) { color: #4b6957; }
[data-theme="light"] .workspace-tabs { border-color: #c0d5c3; scrollbar-color: #a2bea8 transparent; }
[data-theme="light"] .workspace-tab { border-color: #c8d9ca; color: #355d42; }
[data-theme="light"] .workspace-tab:hover { background: #e9f2e9; color: #184c2d; }
[data-theme="light"] .workspace-tab.active { background: linear-gradient(90deg, #d8eddb, #edf5ec); color: #173f26; }
[data-theme="light"] .workspace-tab.active:before { background: #2b8a55; box-shadow: 0 0 12px #2b8a5525; }
[data-theme="light"] :is(.workspace-tab .tab-number, .workspace-tab.active .tab-number) { color: #40754f; }
[data-theme="light"] :is(.workspace-tab small, .workspace-tab.active small) { color: #4c6d56; }
[data-theme="light"] :is(.workspace-tab > svg, .workspace-tab.active > svg) { color: #2c7650; }
[data-theme="light"] .module-panel { background: radial-gradient(ellipse at 90% 0%, #cae7d433, transparent 55%), #fff; border-color: #b7d1bd; }
[data-theme="light"] .module-icon { background: #e3f0e5; border-color: #a9cdb4; color: #2d8155; }
[data-theme="light"] .planned-badge { background: #f3f8f2; border-color: #bfd1be; color: #4d6b4e; }
[data-theme="light"] .module-features > div { border-color: #d4e2d2; }
[data-theme="light"] .module-features > div > span { color: #4b7953; }
[data-theme="light"] .module-features h4 { color: #264f31; }
[data-theme="light"] .module-features p { color: #506d54; }
[data-theme="light"] .module-bottom { border-color: #cadcc9; }
[data-theme="light"] .module-bottom p { color: #436d4b; }
[data-theme="light"] .module-bottom button { background: #f4f9f2; border-color: #a8c4aa; color: #357548; }
[data-theme="light"] .module-bottom button:hover { background: #deefdb; }
[data-theme="light"] .capability-note { color: #4e7053; }
[data-theme="light"] .connected-section { background: #eaf2e8; border-color: #c8d9c3; }
[data-theme="light"] .day-switch { border-color: #c1d3ba; }
[data-theme="light"] .day-switch button { color: #597354; }
[data-theme="light"] .day-switch button.active { color: #25582e; }
[data-theme="light"] .day-switch button.active:after { background: #418f49; }
[data-theme="light"] .day-index { color: #41864a; }
[data-theme="light"] .day-index > span { color: #5a7c55; }
[data-theme="light"] .day-tags i { color: #4b7c45; }
[data-theme="light"] .day-graphic path:last-of-type { stroke: #25824d; }
[data-theme="light"] .people-statement > .text-link { color: #27683b; }
[data-theme="light"] .people-principles article { border-color: #c4d8c3; }
[data-theme="light"] .people-principles article > span { color: #4c7e51; }
[data-theme="light"] .closing-section { background: radial-gradient(ellipse at 100% 50%, #bee1c338, transparent 70%), #e9f3e7; border-color: #b3cfaf; }
[data-theme="light"] .home-footer { border-color: #c5d9c2; color: #527250; }
[data-theme="light"] .home-footer .powered { color: #486f49; }
[data-theme="light"] .powered strong { color: #254b2b; }

/* Bubble names use their own readable light palette without background chips. */
[data-theme="light"] .workspace-word--bubble {
  background: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

/* Login and authenticated account surfaces share the saved preference. */
[data-theme="light"] .app-frame { background: #f1f7f2; border-color: #c6d8cc; box-shadow: 0 12px 40px #244b3112; }
[data-theme="light"] .app-frame .atmosphere { background: radial-gradient(ellipse at 51% 1%, #cae3d6a6, transparent 35%), radial-gradient(ellipse at 50% 56%, #c4e7e83d, transparent 62%), linear-gradient(123deg, #f7faf6, #eaf4ed 58%, #f1f7f0); }
[data-theme="light"] .app-frame .diagonal-texture { opacity: .14; }
[data-theme="light"] .app-frame .ambient-orb { opacity: .06; }
[data-theme="light"] .intro h1 { color: #254e3d; text-shadow: none; }
[data-theme="light"] :is(.login-card, .account-card) { background: #a9c9b7; box-shadow: 0 15px 50px #244b3118; }
[data-theme="light"] :is(.card-content, .account-card-content) { background: linear-gradient(150deg, #fff, #fbfdf9 75%); }
[data-theme="light"] .card-heading h2 { color: #193f30; }
[data-theme="light"] .card-heading p { color: #4e6d60; }
[data-theme="light"] .field-group label { color: #476758; }
[data-theme="light"] .input-wrap { background: #f3f8f3; border-color: #c0d3c4; box-shadow: 0 2px 6px #244b3105; }
[data-theme="light"] .input-wrap:focus-within { border-color: #167f76; box-shadow: 0 0 0 3px #16847513; }
[data-theme="light"] .field-icon { color: #567466; }
[data-theme="light"] input { color: #193c2d; caret-color: #087b68; }
[data-theme="light"] input::placeholder { color: #687e71; }
[data-theme="light"] input:-webkit-autofill { -webkit-box-shadow: 0 0 0 100px #f3f8f3 inset; -webkit-text-fill-color: #193c2d; }
[data-theme="light"] .icon-button { color: #557565; }
[data-theme="light"] .password-toggle:hover { color: #096d54; background: #e2efe5; }
[data-theme="light"] .text-button { color: #356a53; }
[data-theme="light"] .text-button:hover { color: #064e36; }
[data-theme="light"] .field-error { color: #a13f2d; }
[data-theme="light"] .input-wrap:has(input[aria-invalid="true"]) { border-color: #bd5947; }
[data-theme="light"] .login-button { color: #fff; background: linear-gradient(100deg, #087d78, #087c71 52%, #086e7b); border-color: #096d68; box-shadow: 0 4px 18px #096d6812; }
[data-theme="light"] .google-button { background: #fff; border-color: #b7cebe; color: #264d38; }
[data-theme="light"] .google-button:hover { background: #eaf3e9; border-color: #75a583; }
[data-theme="light"] .divider span { background: #cfddcf; }
[data-theme="light"] .divider p { color: #607e68; }
[data-theme="light"] .site-footer { color: #547761; }
[data-theme="light"] .site-footer strong { color: #315e42; }
[data-theme="light"] dialog { background: #fbfdf9; border-color: #a5c4ac; color: #20432d; box-shadow: 0 20px 90px #244b3138; }
[data-theme="light"] dialog::backdrop { background: #1735295c; }
[data-theme="light"] dialog p { color: #506f59; }
[data-theme="light"] .dialog-symbol { background: #e2f0e2; border-color: #a8caaa; color: #23794b; }
[data-theme="light"] .dialog-close:hover { background: #e7f0e4; }
[data-theme="light"] .script-note { color: #884b2d; }
[data-theme="light"] .account-access { background: #e7f3e9; border-color: #accbb3; color: #396b4a; }
[data-theme="light"] .account-avatar { background: linear-gradient(135deg, #d8efdd, #e3f3e9); border-color: #9bc7aa; color: #276143; box-shadow: none; }
[data-theme="light"] .account-intro :is(.eyebrow, .account-subtitle) { color: #53765d; }
[data-theme="light"] .account-intro h1 { color: #214d31; }
[data-theme="light"] .account-details { background: #f1f7ef; border-color: #c1d5bd; }
[data-theme="light"] .account-details > div { border-color: #ccddc5; }
[data-theme="light"] .account-details dt { color: #53714f; }
[data-theme="light"] .account-details dd { color: #25462a; }
[data-theme="light"] .account-role { background: #e1efdb; border-color: #afcba5; color: #386333; }
[data-theme="light"] .account-status { color: #32733e !important; }
[data-theme="light"] .workspace-note-icon { background: #e5f0df; border-color: #bbd2b1; color: #47803e; }
[data-theme="light"] .workspace-note h2 { color: #2c512d; }
[data-theme="light"] .workspace-note p { color: #577653; }
[data-theme="light"] .account-signout { background: #eff7e9; border-color: #b3cda5; color: #3a6736; }
[data-theme="light"] .account-signout:hover { background: #deedcf; border-color: #86ad70; }
[data-theme="light"] .account-signout svg { color: #527d42; }

/* Brand gallery retains a forest showcase behind its white-letter logo. */
[data-theme="light"] body.brand-gallery { background: #f4f7f3; color: #244730; }
[data-theme="light"] .brand-gallery .top { border-color: #c2d6c3; }
[data-theme="light"] .brand-gallery .top > a:last-child { color: #416c4c; }
[data-theme="light"] .brand-gallery header p { color: #4b7057; }
[data-theme="light"] .brand-gallery .sample { background: #fff; border-color: #bed2bc; }
[data-theme="light"] .brand-gallery .downloads a { background: #e5f1df; border-color: #a9c89e; color: #345f2c; }
[data-theme="light"] .brand-gallery .downloads a:hover { background: #d8eaca; }
[data-theme="light"] .brand-gallery footer { color: #50764c; }
[data-theme="light"] .brand-gallery footer strong { color: #2c5628; }
@media (max-width: 600px) {
  .navigation { gap: 10px; }
  .navigation .nav-actions { gap: 10px; }
}
@media (max-width: 400px) {
  .navigation .brand-lockup > img { width: 160px; }
  .navigation .nav-login { padding-right: 10px; padding-left: 10px; gap: 10px; }
}
@media (max-width: 350px) {
  .navigation { gap: 8px; }
  .navigation .nav-actions { gap: 8px; }
  .navigation .brand-lockup > img { width: 140px; }
  .navigation .nav-login { padding-right: 8px; padding-left: 8px; font-size: 9px; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .theme-toggle { transition: none; }
}
/* Readable secondary English copy in either appearance. */
:root{--flow-muted:#b2cec0}
[data-theme=light]{--flow-muted:#3f624f}
[data-theme=light] .home-page,[data-theme=light] .suite-page,[data-theme=light] .contact-page{--text-muted:#3f624f;--text-secondary:#294d3d}
