/* Tinted glass keeps the scenery visible without fading text or controls. */
.workspace {
  --ink: #f5faee;
  --muted: #e0ebdd;
  --green: #d3ebbd;
  --line: #daebcb45;
  color: var(--ink);
}
.world-far {
  background: linear-gradient(120deg, #10261f35, #152e211a 65%, #182c2c38), var(--scene-image) center / cover;
  filter: blur(.5px);
}
.world-middle { background: radial-gradient(ellipse, #efcf8c24, transparent 66%); }
.world-near { background: radial-gradient(ellipse, #102b2870, transparent 68%); }

/* The navigation is a collection of floating tabs, with scenery between them. */
.sidebar {
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  border: 0;
  padding-top: 28px;
}
.brand {
  margin: 0 0 28px;
  padding: 15px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, #133b2cd9, #21473bbf);
  border: 1px solid #dcefc34d;
  backdrop-filter: blur(7px);
  box-shadow: 0 12px 25px -15px #051c1dcc;
}
.nav-caption { color: #f2f5df; text-shadow: 0 2px 5px #06231c; }
.main-nav { gap: 11px; padding: 0 4px; }
.main-nav button {
  color: #f5faed;
  background: linear-gradient(125deg, #173f33dd, #203f35bd);
  border: 1px solid #d8edbf57;
  border-radius: 11px;
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 22px -12px #071b21c9, inset 0 1px 0 #edffcf26;
  transform: perspective(950px) translateZ(12px);
}
.main-nav button:nth-child(3n):not([aria-selected=true]) {
  background: linear-gradient(125deg, #213e30c7, #193a35b8);
  transform: perspective(950px) translateZ(-18px) scale(.96);
  box-shadow: 0 5px 12px -8px #071b2180;
}
.main-nav button[aria-selected=true] {
  background: linear-gradient(135deg, #d6ebb6d6, #b6d0aabf);
  border-color: #f0ffd2bd;
  color: #173829;
  box-shadow: inset 0 1px 8px #244e2826, 0 4px 12px -5px #071b2173;
  transform: perspective(950px) translateZ(-30px) scale(.95);
}
.main-nav button:hover { border-color: #eafacd; box-shadow: 0 12px 22px -8px #071b21cc, 0 0 13px #bad6992e; }
.sidebar-bottom {
  margin: auto 0 0;
  padding: 15px 14px;
  border-radius: 11px;
  background: #163b2ac7;
  backdrop-filter: blur(7px);
  color: #e9f3df;
}
.sidebar-bottom p { margin-bottom: 15px; }
.prototype-label { color: #d0e0c5; }

/* Header surfaces sit farther into the scene than the main controls. */
.topbar {
  height: 70px;
  margin-top: 22px;
  background: linear-gradient(120deg, #133b31c9, #28463bbb);
  border: 1px solid #e5f4ce57;
  border-radius: 14px;
  backdrop-filter: blur(9px);
  box-shadow: 0 10px 22px -14px #061c21b3;
}
.breadcrumb, .breadcrumb strong, .breadcrumb span { color: #edf4e4; }
.view-control { color: #f0f5e7; }
.quiet-button, .quiet-button#animals-toggle[aria-pressed=false] { color: #f0f7e7; background: #122e2a9c; border: 1px solid #b9d5a841; border-radius: 8px; }
.quiet-button[aria-pressed=true], .quiet-button#animals-toggle[aria-pressed=true] { background: #d6eac4cc; color: #1d3c2d; border-color: #e2f5bd80; }
.avatar-button { background: #d6eac4cc; color: #18392c; border-color: #e2f5bd80; }
.page-heading {
  max-width: 92%;
  padding: 21px 25px;
  background: linear-gradient(110deg, #183c31cd, #24473dba);
  border-color: #e4f2d759;
  box-shadow: 0 9px 20px -13px #061b20b3;
  backdrop-filter: blur(8px);
  margin-bottom: 26px;
}
.page-heading .eyebrow, .eyebrow, .hero-kicker, .demo-badge { color: #daedbf; }
.page-heading h1 { margin-bottom: 9px; }
h1 span { color: #d2e5aa; }
.pill, .small-pill { color: #e6f3d5; border-color: #d6eeb954; background: #153b2a9e; }
.subnav { gap: 13px; margin-bottom: 32px; }
.subnav a, .subnav a:nth-child(even) {
  position: relative;
  z-index: 3;
  background: linear-gradient(140deg, #1d4737d9, #2c4c3cc4);
  color: #f6faed;
  border-color: #e4f2cd75;
  backdrop-filter: blur(7px);
  box-shadow: 0 11px 19px -9px #061b23b3, inset 0 1px 0 #efffd52e;
}
.subnav a:nth-child(4n):not(.is-midground) {
  z-index: 1;
  background: #204334bc;
  transform: perspective(1100px) translateY(5px) translateZ(-22px) scale(.95);
  box-shadow: 0 5px 10px -6px #061b2370;
}
.subnav a.is-midground {
  z-index: 2;
  background: #b7cfa9c9;
  border-color: #d6e7bf8c;
  color: #173926;
  box-shadow: inset 0 2px 5px #2445272e, 0 3px 8px #061b2340;
}
.subnav a:hover { border-color: #f2ffd6; }

/* Three distances use scale, placement, tinted alpha and different shadows. */
.info-card, .info-card:nth-child(3n+2), .info-card:nth-child(3n),
.practice-panel, .private-card, .inset-panel, .view-copy, .hero-content,
.section-heading, .explore-strip, .simple-picker, footer {
  background: linear-gradient(135deg, #153d32df, #1b3c30c7);
  border: 1px solid #e4f5cf70;
  color: var(--ink);
  backdrop-filter: blur(9px);
  box-shadow: 0 24px 40px -22px #061a21ed, inset 0 1px 0 #efffdc2e;
}
[data-layer=front] { --layer-scale: 1; --layer-z: 16px; --layer-y: -4px; position: relative; z-index: 3; }
[data-layer=middle] { --layer-scale: .975; --layer-z: -10px; --layer-y: 7px; position: relative; z-index: 2; }
[data-layer=back] { --layer-scale: .95; --layer-z: -27px; --layer-y: 15px; position: relative; z-index: 1; }
.info-card.depth-surface, .practice-panel.depth-surface, .private-card.depth-surface {
  transform: perspective(1400px) translateY(calc(var(--layer-y, 0px) + var(--lift))) translateZ(var(--layer-z, 0px)) scale(var(--layer-scale, 1)) rotateX(var(--rx)) rotateY(var(--ry));
  transform-origin: center center;
}
.info-card[data-layer=back], .private-card[data-layer=back], .section-heading[data-layer=back] {
  background: linear-gradient(135deg, #193e32c9, #274335bd);
  border-color: #dceac459;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 19px -12px #061a219c, inset 0 1px 0 #efffdc1a;
}
.info-card[data-layer=middle], .inset-panel {
  background: linear-gradient(140deg, #1d4537cd, #214333bf);
  border-color: #e4f5cf59;
  box-shadow: 0 13px 27px -18px #061a21cc;
}
.content-grid { gap: 26px; margin: 30px 0 36px; }
.hero-content, .view-copy { margin-left: 2%; width: 54%; max-width: 490px; }
.view-banner { min-height: 265px; margin: 10px 0 35px; }
.hero { margin: 9px 0 29px; }
.view-copy p, .hero p, .info-card p, .inset-panel p, .private-card p, .activity-summary p,
.area-copy, .explore-strip p, .form-help, .source-link small, .summary-list { color: #e7f0de; }
.info-card > .icon, .explore-strip .icon { color: #d2e9af; filter: drop-shadow(0 0 6px #d0eda829); }
.section-heading { max-width: 90%; margin-left: 3%; padding: 10px 17px; }
.section-heading > span { color: #e0eacd; }
.time-tile {
  background: linear-gradient(135deg, #244a37c9, #3a523bbf);
  border-color: #e4f5cf75;
  color: #f3f8e8;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 18px -12px #061a2180;
  transform: perspective(1000px) translateZ(-40px) scale(.92);
}
.time-tile > .icon, .time-tile p { color: #e8f0d9; }
.private-card .mini-icon { background: #dcedba21; }
.medical-note { max-width: 94%; background: #163a2acd; color: #e5efd9; border: 1px solid #dae9bf38; }
footer { margin-top: 22px; background: #173c2bcc; }
footer button, footer small { color: #e0ebd5; }

/* Practice tiles keep their text sharp; only the scene behind them softens. */
.intervention-tabs { perspective: none; gap: 17px; }
.area-card, .area-card:nth-child(2), .area-card:nth-child(3), .area-card:nth-child(4) {
  background: linear-gradient(145deg, #173f32dc, #214532c4);
  border-color: #ddecbe80;
  color: #f5f9eb;
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 30px -16px #061b23cc;
  transform: perspective(1300px) translateY(calc(var(--base) + var(--lift))) translateZ(16px) rotateX(var(--rx)) rotateY(var(--ry));
}
.area-card:nth-child(2), .area-card:nth-child(4) { --base: 17px; }
.area-card[aria-selected=true], .area-card:nth-child(3)[aria-selected=true] {
  background: linear-gradient(140deg, #9eb797e8, #bfd5a9db);
  color: #173b29;
  border-color: #e7f4caa1;
  box-shadow: inset 0 1px 8px #254b292e, 0 6px 14px -8px #061b2370;
  transform: perspective(1300px) translateY(calc(10px + var(--lift))) translateZ(-38px) scale(.94) rotateX(var(--rx)) rotateY(var(--ry));
}
.area-card[aria-selected=true] .area-copy { color: #264832; }
.area-number { color: #dae8c8; }
.area-card[aria-selected=true] .area-number { color: #284a32; }
.art-reading { color: #d2e7ad; }
.area-card[aria-selected=true] .art-reading { color: #486731; }
.art-vision .icon, .art-sound .icon { color: #c6e6aa; }
.area-card[aria-selected=true] .area-art .icon { color: #335a32; }

/* Controls have their own clear surface instead of inheriting panel opacity. */
.workspace .button, .workspace .button.light, .view-copy .button.light, .hero-content .button.light {
  background: #d4eab6ed; border-color: #e5f4c5a3; color: #16372b;
  box-shadow: 0 7px 15px -8px #031b1ba6;
}
.workspace .button:hover { background: #e7f4cd; }
.workspace .button.secondary { background: #123b2ce8; color: #f1f7e7; border-color: #d6e7bf70; }
.workspace .text-button { color: #edf5df; text-decoration-color: #c3ddaa; }
.workspace .text-button:hover { color: #fff; }
.workspace input:not([type=checkbox]):not([type=radio]), .workspace textarea, .workspace select {
  background: #102d27eb; color: #f3f8e9; border-color: #dbedc875; color-scheme: dark;
}
.workspace input::placeholder, .workspace textarea::placeholder { color: #c1d4be; opacity: 1; }
.workspace .view-control select { background: #d6e8c8e6; color: #18392c; color-scheme: light; }
.workspace select option { background: #14352b; color: #f3f8e9; }
.workspace .view-control select option { background: #f2f6e9; color: #18392c; }
.workspace .choice-row button { background: #173a2dcc; border-color: #d2e4b670; color: #f0f7e8; }
.workspace .choice-row button[aria-pressed=true] { background: #d5eac3d9; color: #17392b; }
.workspace .inline-note, .workspace .research-details { background: #153d2cd9; color: #f0f6e5; border-color: #d9eab385; }
.workspace .learning-flow li { background: #254936d6; border-color: #c5dfaa7a; }
.workspace .learning-flow li:nth-child(2n) { background: #163829cf; }
.workspace .learning-flow li + li::before { color: #e1edcc; }
.workspace .notes-list li { border-color: #d7e6c547; }
.workspace .notes-list time, .workspace .feedback { color: #dfedce; }
.workspace .source-link { color: #f3f8e7; }

/* Maps stay legible on their own light diagram surface. */
.route-map { --ink: #193c2c; --muted: #526d41; color: #193c2c; background: linear-gradient(145deg, #e4efd4ef, #ccddbbec); }
.route-step { background: #193d2dd9; border-color: #d8eabd70; color: #f3f8e9; backdrop-filter: blur(7px); }
.route-step[aria-pressed=true] { background: #c9dfb0e3; color: #193c2c; border-color: #ecf9d0a8; }
.route-step small { color: #e2ebd6; }
.route-step[aria-pressed=true] small { color: #345539; }
.guide-card { color: #f3f8e9; background: #193e2ecc; border-color: #d6e8b775; }
.guide-card p { color: #e1ebd5; }
.guide-card > svg { background: #b4cba6d9; }
.map-layout > div > h3 { display: inline-block; padding: 7px 12px; border: 1px solid #d7eabd59; border-radius: 8px; background: #173b2bd9; }

dialog {
  --ink: #f5faee;
  --muted: #e0ebdd;
  color: var(--ink);
  background: linear-gradient(130deg, #173d32f2, #214434e8);
  border-color: #e2f1cba1;
  backdrop-filter: blur(15px);
}
dialog::backdrop { background: #10291c59; backdrop-filter: blur(5px); }
dialog input:not([type=checkbox]):not([type=radio]), dialog textarea, dialog select { background: #102d27eb; color: #f3f8e9; border-color: #dbedc875; color-scheme: dark; }
dialog input::placeholder { color: #c1d4be; opacity: 1; }
dialog .button:not(.danger):not(.secondary) { background: #d4eab6ed; border-color: #e5f4c5a3; color: #16372b; }
dialog .source-link, dialog a, dialog .text-button { color: #eff7df; }
dialog .close-button { color: #193c2c; }
dialog .practice-stage { --ink: #193c2c; --muted: #526d41; color: #193c2c; background: #eaf1dff5; }
.workspace :focus-visible, .main-nav button:focus-visible, dialog :focus-visible { outline-color: #e2f5b9; outline-offset: 4px; }

@media (min-width: 1101px) {
  .content-grid:not(.two) { grid-template-columns: minmax(0, 1.04fr) minmax(0, .95fr) minmax(0, 1.01fr); }
  .content-grid.two { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); }
  .inset-panel:not(.mode-panel) { max-width: 94%; margin-left: 3%; }
}
@media (min-width: 1400px) {
  .content-grid:not(.two):has(> .info-card:last-child:nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 21px; }
}
@media (max-height: 850px) and (min-width: 961px) {
  .sidebar { padding-top: 18px; padding-bottom: 16px; overflow-y: auto; }
  .brand { margin-bottom: 18px; padding: 11px 12px; }
  .main-nav { gap: 7px; }
  .main-nav button { padding-top: 9px; padding-bottom: 9px; }
  .sidebar-bottom { margin-top: 20px; }
}
@media (max-width: 960px) {
  .sidebar { padding: 16px 16px 9px; background: #1338298f; backdrop-filter: blur(7px); }
  .brand { width: max-content; margin: 0 0 10px; padding: 7px 12px; }
  .main-nav { padding: 5px 3px 10px; gap: 9px; }
  .main-nav button, .main-nav button:nth-child(3n):not([aria-selected=true]) { transform: none; }
  .main-nav button[aria-selected=true] { transform: translateY(3px) scale(.95); }
  .topbar { margin-top: 15px; }
  .page-heading { max-width: 100%; }
  .content-grid { gap: 19px; }
}
@media (max-width: 650px) {
  .sidebar { padding-left: 10px; padding-right: 10px; }
  .topbar { min-height: 78px; height: auto; }
  .page-heading { padding: 21px 22px; }
  .hero-content { width: calc(100% - 82px); margin-left: 0; }
  .view-copy { width: calc(100% - 69px); margin-left: 0; }
  .section-heading { max-width: 96%; margin-left: 2%; }
  .subnav { gap: 11px; }
  .info-card.depth-surface, .practice-panel.depth-surface, .private-card.depth-surface { transform: translateY(var(--lift)) scale(1); }
  .info-card[data-layer=back] { margin-left: 9px; margin-right: 3px; }
  .practice-row { gap: 17px; }
  .medical-note { max-width: 100%; }
  .intervention-tabs { padding-bottom: 32px; }
}
.simple .info-card.depth-surface, .simple .practice-panel.depth-surface, .simple .private-card.depth-surface { transform: none; margin-left: 0; margin-right: 0; }
@media (prefers-reduced-motion: reduce) {
  .depth-surface, .subnav a, .main-nav button { transition: none !important; }
}
@media print {
  .workspace { --ink: #193c2c; --muted: #526d41; --green: #214f35; color: #193c2c; }
  #map * { color: #193c2c !important; }
  .route-map, .route-step, .guide-card, .inset-panel { background: white; border-color: #8ca67c; backdrop-filter: none; box-shadow: none; transform: none; }
}
