@font-face {
  font-family: Manrope;
  src: url("manrope-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("dm-sans-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
:root {
  --accent: #c4dc9e;
  --ink: #eae9df;
  --muted: #9aab96;
  --panel: #171e19;
  --line: #ffffff18;
}
body {
  font-family: "DM Sans", sans-serif;
  background: #101412;
  color: var(--ink);
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent) !important;
  outline-offset: 3px;
}
#brain-container {
  background: #101412;
}
#brain-container > canvas {
  position: absolute;
  inset: 0;
  display: block;
}
#species-nav {
  top: 24px;
  left: 28px;
  right: auto;
  transform: none;
  gap: 8px;
  z-index: 110;
  display: flex;
}
#species-nav .nav-pill {
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #9ba995;
  padding: 10px 14px;
  font-size: 12px;
}
#species-nav .nav-pill:first-child {
  font:
    500 18px Manrope,
    sans-serif;
  letter-spacing: -0.7px;
  color: #eae9df;
  margin-right: 20px;
  padding-left: 0;
}
#species-nav .nav-pill:first-child .icon {
  color: var(--accent);
  font-size: 25px;
}
#species-nav .nav-pill.active {
  border-color: #b3cb8d40;
  color: var(--accent);
  background: #c4dc9e0c;
  box-shadow: none;
}
#header {
  top: 92px;
  left: 30px;
  pointer-events: none;
}
#header h1 {
  font:
    500 31px Manrope,
    sans-serif;
  letter-spacing: -1.3px;
  color: var(--ink);
}
#header p {
  font-size: 10px;
  color: #8b9d85;
  letter-spacing: 0.5px;
  margin-top: 8px;
}
#controls {
  top: 165px;
  bottom: 55px;
  left: 28px;
  width: 260px;
  min-width: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #59684a transparent;
  background: #171e19e8;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  backdrop-filter: blur(15px);
}
.control-group {
  margin-bottom: 20px;
}
.control-group label {
  font-size: 9px;
  letter-spacing: 1.4px;
  color: #99a88e;
}
.btn {
  border: 1px solid #ffffff22;
  background: #ffffff04;
  border-radius: 4px;
  color: #bdc5b4;
  font-size: 10px;
  padding: 8px 11px;
}
.btn:hover {
  border-color: #a9c085;
  color: var(--accent);
  background: #a9c0850e;
}
.btn.active {
  background: #b9d3951a;
  border-color: #b9d39566;
  color: var(--accent);
  box-shadow: none;
}
.btn-group {
  gap: 6px;
  flex-wrap: wrap;
}
input[type="range"] {
  background: #45513c;
  accent-color: var(--accent);
  width: 100%;
  min-width: 0;
}
input[type="range"]::-webkit-slider-thumb {
  background: var(--accent);
  box-shadow: none;
  width: 12px;
  height: 12px;
}
input[type="range"]::-moz-range-thumb {
  background: var(--accent);
  border: 0;
  border-radius: 50%;
  width: 12px;
  height: 12px;
}
input[type="checkbox"] {
  accent-color: var(--accent);
}
#mode-indicator {
  color: #b5c99a !important;
  font-size: 9px !important;
}
#sim-preset {
  background: #20281e !important;
  border-color: #48573b !important;
  color: var(--ink) !important;
  font-size: 10px !important;
  line-height: 1.5;
}
#preset-description {
  color: #a2b293 !important;
  line-height: 1.7;
}
#info-panel {
  top: 375px;
  right: 28px;
  bottom: auto;
  width: 265px;
  max-height: calc(100vh - 440px);
  overflow-y: auto;
  background: #171e19ed;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  backdrop-filter: blur(15px);
}
.region-header h2 {
  font:
    500 20px/1.3 Manrope,
    sans-serif;
  color: var(--ink);
}
.lobe-badge {
  font-size: 9px;
}
.functions-section h3 {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #9ba88e;
}
.functions-section li {
  font-size: 11px;
  line-height: 1.6;
  border-color: var(--line);
  color: #c5ccb9;
}
.functions-section li:before {
  background: var(--accent);
  box-shadow: none;
}
#legend {
  display: none;
}
#tooltip {
  background: #172017f5;
  border-color: #82985e;
  border-radius: 4px;
  box-shadow: 0 8px 30px #0004;
  font-size: 11px;
}
#tooltip small {
  color: #a3b095;
}
#credits-footer {
  border-top: 1px solid var(--line);
  background: #101412d9;
  color: #6f806a;
  font-size: 9px;
  height: 35px;
  padding: 10px 28px;
  justify-content: center;
}
#credits-footer a {
  color: #a9b79c;
}
#loading-overlay {
  background: radial-gradient(ellipse, #263120, #101412 65%);
}
#loading-text {
  font:
    500 22px Manrope,
    sans-serif;
  color: var(--ink);
}
#loading-bar {
  height: 2px;
  background: #34412d;
  width: 240px;
}
#loading-progress {
  background: var(--accent);
  box-shadow: 0 0 12px #a3bf7244;
}
#controls-toggle {
  background: #1d281b;
  border: 1px solid #81965f66;
  color: var(--accent);
  border-radius: 5px;
  font-size: 11px;
  box-shadow: none;
}
.explorer-panel {
  position: absolute;
  right: 28px;
  top: 92px;
  width: 265px;
  background: #171e19ed;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  z-index: 100;
  backdrop-filter: blur(15px);
}
.explorer-eyebrow {
  font-size: 8px;
  letter-spacing: 1.7px;
  color: #98ab86;
  margin-bottom: 12px;
}
.explorer-panel h2 {
  font:
    500 22px Manrope,
    sans-serif;
  letter-spacing: -0.7px;
  margin-bottom: 13px;
}
.region-search {
  width: 100%;
  border: 1px solid #68795466;
  border-radius: 5px;
  padding: 11px 12px;
  background: #0f160f;
  color: var(--ink);
  font-size: 11px;
}
.region-search::placeholder {
  color: #819075;
}
.search-results {
  max-height: 180px;
  overflow: auto;
  scrollbar-width: thin;
}
.search-results:empty {
  display: none;
}
.search-results button {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  text-align: left;
  background: none;
  color: #ced6c2;
  font-size: 10px;
  line-height: 1.5;
}
.search-results small {
  display: block;
  color: #819573;
  font-size: 9px;
}
.search-results p {
  font-size: 11px;
  color: #9fae92;
  padding-top: 12px;
}
.explorer-actions {
  display: flex;
  gap: 7px;
  margin-top: 13px;
}
.explorer-actions button {
  flex: 1;
  border: 1px solid #ffffff22;
  background: #c4dc9e09;
  color: #b9ca9e;
  border-radius: 4px;
  padding: 9px 5px;
  font-size: 10px;
}
.explorer-actions button.active {
  background: #c4dc9e22;
  border-color: #a9bd7f;
}
.explorer-hint {
  font-size: 9px;
  line-height: 1.7;
  color: #86997b;
  margin-top: 13px;
}
.studio-tools {
  position: absolute;
  left: 50%;
  bottom: 58px;
  transform: translateX(-50%);
  border: 1px solid #8da46b38;
  background: #171e19ed;
  backdrop-filter: blur(12px);
  border-radius: 7px;
  padding: 6px;
  display: flex;
  gap: 5px;
  z-index: 100;
}
.studio-tools button {
  border: 0;
  border-radius: 4px;
  background: transparent;
  padding: 10px 14px;
  color: #bac8ac;
  font-size: 10px;
  white-space: nowrap;
}
.studio-tools button:hover,
.studio-tools button.active {
  background: #c4dc9e18;
  color: var(--accent);
}
.tour-status {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 105;
  text-align: center;
  border: 1px solid #81985e44;
  border-radius: 6px;
  background: #172017e8;
  padding: 13px 20px;
  max-width: 320px;
  min-width: 200px;
  backdrop-filter: blur(12px);
}
.tour-status[hidden] {
  display: none;
}
.tour-status small {
  display: block;
  font-size: 8px;
  color: #94a67d;
  letter-spacing: 1.4px;
  margin-bottom: 6px;
}
.tour-status strong {
  font:
    500 17px Manrope,
    sans-serif;
}
.tour-status p {
  font-size: 10px;
  line-height: 1.6;
  color: #a8b698;
  margin-top: 6px;
}
.atlas-note {
  position: absolute;
  bottom: 105px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  letter-spacing: 1px;
  color: #7e9073;
  white-space: nowrap;
  pointer-events: none;
}
#controls .control-group[style] {
  border-color: #ffffff18 !important;
}
#controls label[style] {
  color: #aabc98 !important;
}
#brain-container > canvas {
  touch-action: none;
}
@media (max-width: 1100px) {
  #controls {
    width: 230px;
    padding: 17px;
  }
  #info-panel,
  .explorer-panel {
    width: 230px;
    right: 20px;
  }
  #header {
    left: 22px;
  }
  #species-nav {
    left: 22px;
  }
  .studio-tools button {
    padding: 10px;
  }
  .atlas-note {
    font-size: 7px;
  }
}
@media (max-width: 760px) {
  #species-nav {
    top: 12px;
    left: 16px;
    right: 16px;
    justify-content: flex-start;
    gap: 5px;
  }
  #species-nav .nav-pill {
    font-size: 10px;
    padding: 8px 10px;
  }
  #species-nav .nav-pill:first-child {
    font-size: 15px;
    margin-right: auto;
  }
  #species-nav .nav-pill:first-child .icon {
    font-size: 20px;
  }
  #header {
    top: 68px;
    left: 18px;
  }
  #header h1 {
    font-size: 23px;
  }
  #header p {
    font-size: 8px;
  }
  #controls-toggle {
    display: block;
    top: 123px;
    left: 18px;
    bottom: auto;
    right: auto;
    padding: 9px 12px;
    z-index: 120;
  }
  #controls {
    display: none;
    top: 163px;
    left: 16px;
    bottom: 88px;
    max-height: none;
    width: 235px;
    padding: 18px;
    z-index: 120;
  }
  #controls.visible {
    display: block;
  }
  .explorer-panel {
    top: 123px;
    right: 16px;
    width: 170px;
    padding: 12px;
  }
  .explorer-eyebrow {
    font-size: 7px;
    letter-spacing: 1px;
    margin-bottom: 7px;
  }
  .explorer-panel h2 {
    display: none;
  }
  .region-search {
    font-size: 10px;
    padding: 8px;
  }
  .explorer-actions {
    gap: 4px;
    margin-top: 8px;
  }
  .explorer-actions button {
    font-size: 8px;
    padding: 7px 3px;
  }
  .explorer-hint {
    display: none;
  }
  .search-results {
    max-height: 150px;
  }
  #info-panel {
    top: auto;
    bottom: 116px;
    right: 16px;
    width: 200px;
    max-height: 200px;
    padding: 15px;
    z-index: 110;
  }
  .region-header h2 {
    font-size: 16px;
  }
  .functions-section {
    margin-top: 12px;
  }
  .functions-section li {
    font-size: 10px;
    padding: 5px 0;
  }
  .studio-tools {
    bottom: 27px;
    width: max-content;
    max-width: calc(100% - 24px);
    gap: 0;
    padding: 4px;
  }
  .studio-tools button {
    padding: 10px 12px;
    font-size: 9px;
  }
  .atlas-note {
    bottom: 82px;
    max-width: 90%;
    white-space: normal;
    text-align: center;
    line-height: 1.6;
    font-size: 7px;
  }
  #credits-footer {
    display: none;
  }
  .tour-status {
    top: 252px;
    max-width: 210px;
    min-width: 160px;
    padding: 10px;
  }
  .tour-status strong {
    font-size: 14px;
  }
  .tour-status p {
    font-size: 9px;
  }
  .explorer-panel:focus-within {
    z-index: 125;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

#info-content {
  padding: 0;
}
.lobe-filter,
.category-filter {
  background: #ffffff04;
  border: 1px solid #ffffff22;
  color: #9eac91;
  border-radius: 4px;
  font-size: 9px;
  padding: 7px 9px;
}
.lobe-filter.active,
.category-filter.active {
  background: #c4dc9e18;
  color: var(--accent);
  border-color: #a9be7b88;
  box-shadow: none;
}

@media (max-width: 760px) {
  #species-nav .nav-pill span {
    display: inline;
  }
  #controls {
    transform: none;
  }
  #info-panel {
    max-height: 220px;
  }
  #info-panel:not(.visible) {
    pointer-events: none;
  }
}

.atlas-about {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.75;
  color: var(--muted);
}
.atlas-about summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 10px;
}
.atlas-about p {
  margin: 10px 0;
}
.atlas-about a {
  color: var(--accent);
}
.no-script-notice {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #101412;
  color: #eae9df;
  padding: 15vh 12vw;
  font-size: 18px;
  line-height: 1.8;
}
.no-script-notice a {
  display: block;
  color: #c4dc9e;
  margin-top: 20px;
}
