/* The homepage's illustrated explanation of learning and change. */
.home-neurobiology {
  width: 100%;
  color: #c3dbe6;
  background: radial-gradient(ellipse at 95% 12%, #22453466, transparent 45%),
    radial-gradient(ellipse at 30% 40%, #143d5666, transparent 55%), #071923;
}
.home-neurobiology__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.25fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 4.5rem);
  max-width: 82rem;
  margin-inline: auto;
}
.home-neurobiology .eyebrow { color: #6deafe; }
.home-neurobiology h2 {
  max-width: 17ch; margin: 0 0 1.5rem; color: #fff;
  font-size: clamp(2.5rem, 4.3vw, 4.6rem); line-height: 1.08; text-wrap: balance;
}
.home-neurobiology__intro > p { line-height: 1.75; }
.home-neurobiology__intro .home-neurobiology__lead {
  margin-bottom: 1.25rem; color: #eaf7fd; font-size: clamp(1.1rem, 1.5vw, 1.3rem);
}
.neural-network { min-width: 0; width: 100%; margin: 0; }
.neural-network__svg { display: block; width: 100%; height: auto; overflow: visible; }
.neural-network__cluster { color: #6deafe; }
.neural-network__cluster--1, .neural-network__cluster--2 { color: #cbf79a; opacity: 0.45; transition: opacity 500ms ease; }
.neural-network__cluster--1 { color: #ef9693; opacity: 0.7; }
.neural-network__connection { fill: none; stroke: currentColor; stroke-width: 1.3; opacity: 0.28; }
.neural-network__cluster--0 .neural-network__connection,
.neural-network__cluster--1 .neural-network__connection { stroke-width: 1.6; stroke-linecap: round; opacity: 0.65; }
.neural-network__dendrite { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; opacity: 0.65; }
.neural-network__halo { fill: currentColor; opacity: 0.09; }
.neural-network__soma { fill: currentColor; opacity: 0.9; }
.neural-network__nucleus { fill: #fff; }
.neural-network__hit { fill: transparent; }
.neural-network__neuron:hover .neural-network__halo { opacity: 0.3; }
.neural-network__neuron:hover .neural-network__dendrite { stroke-width: 2; opacity: 1; }
.neural-network__signal { fill: none; stroke: #e8fcff; stroke-width: 2.2; stroke-linecap: round; opacity: 0; stroke-dasharray: 0.07 0.93; }
.neural-network__bridge {
  stroke: url(#neural-bridge-color); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0;
  transition: stroke-dashoffset 1.2s ease, opacity 500ms ease, stroke-width 500ms ease;
}
.neural-network__bridge--first { stroke: url(#neural-memory-color); }
.neural-network__bridge--support { stroke: url(#neural-support-color); }
.neural-network__integration-signal {
  fill: none; stroke: #ffe1dc; stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 0.055 0.945; opacity: 0;
}
.neural-network__integration-signal--support { stroke: #e4ffd2; }
[data-stage="1"] :is(.neural-network__bridge--first, .neural-network__bridge--support),
[data-stage="2"] .neural-network__bridge { stroke-dashoffset: 0; opacity: 0.85; }
[data-stage="2"] .neural-network__bridge { stroke-width: 3; }
[data-stage="1"] .neural-network__cluster--1,
[data-stage="2"] .neural-network__cluster--1,
[data-stage="2"] .neural-network__cluster--2 { opacity: 1; }
.home-neurobiology.is-integrated .neural-network__cluster--1 { color: #6deafe; opacity: 0.1; }
.home-neurobiology.is-integrated :is(.neural-network__bridge--first, .neural-network__bridge--support) { opacity: 0.1; }
.neural-network__legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0.25rem 0 1.75rem; font-size: 0.8rem; }
.neural-network__legend span { display: inline-flex; align-items: center; gap: 0.5rem; }
.neural-network__legend span::before { content: ''; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #6deafe; }
.neural-network__legend span:last-child::before { background: #cbf79a; }
.neural-network__legend .neural-network__legend-memory::before { background: #ef9693; }
.neural-network__prompt { margin-bottom: 0.75rem; color: #eaf7fd; font-size: 0.85rem; }
.neural-network__controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.55rem; }
.neural-network__controls button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem;
  width: 100%; min-height: 5.5rem; padding: 0.8rem; margin: 0; border: 1px solid #42616e;
  border-radius: 0.6rem; background: #ffffff05; color: #d2e2e9; box-shadow: none;
  font: inherit; font-size: 0.85rem; line-height: 1.4; text-align: left; white-space: normal;
  text-transform: none; letter-spacing: normal; justify-content: flex-start;
  cursor: pointer; transition: background 180ms ease, border-color 180ms ease;
}
.neural-network__controls button > span { color: #6deafe; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; }
.neural-network__step { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; width: 100%; }
.neural-network__click-hand { display: block; flex: 0 0 auto; width: 28px; height: 30px; pointer-events: none; }
.neural-network__controls button[aria-pressed="true"] { border-color: #6deafe; background: #6deafe12; color: #fff; }
.home-neurobiology .neural-network__controls button:hover:not(:disabled) {
  background: #6deafe1c; border-color: #6deafe; transform: none; box-shadow: none;
}
.neural-network__controls button::after { display: none; }
.home-neurobiology :is(button, a):focus-visible { outline: 3px solid #cbf79a; outline-offset: 4px; }
.neural-network__status { min-height: 5.5em; margin-top: 1rem; color: #d2e2e9; font-size: 0.95rem; line-height: 1.65; }
.neural-network__status p { line-height: inherit; }
.home-neurobiology [hidden] { display: none !important; }
.home-neurobiology__insights {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 3rem);
  max-width: 82rem; margin: clamp(2.5rem, 5vw, 5rem) auto 0;
}
.home-neurobiology__insights article { padding-top: 1.5rem; border-top: 1px solid #42616e; }
.home-neurobiology h3 { margin: 0 0 0.9rem; color: #fff; font-size: clamp(1.4rem, 2vw, 1.9rem); line-height: 1.2; text-wrap: balance; }
.home-neurobiology__insights p, .home-neurobiology__agency p { line-height: 1.8; }
.home-neurobiology__agency {
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr); gap: 1.5rem 3rem;
  max-width: 82rem; margin: 2.5rem auto 0; padding: 2rem 0 0; border-top: 1px solid #42616e;
}
.home-neurobiology__agency h3 { max-width: 20ch; color: #cbf79a; }
.home-neurobiology .text-link, .home-neurobiology .text-link:visited { display: inline-block; margin-top: 1.25rem; color: #6deafe; }
.home-neurobiology .text-link:hover { color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .home-neurobiology.is-animating .neural-network__signal { animation: neural-signal 2.6s ease-in-out var(--signal-delay) both; }
  .home-neurobiology.is-animating .neural-network__halo { animation: neural-breathe 3.2s ease-in-out; }
  .home-neurobiology.is-animating:not(.is-integrated):is([data-stage="1"], [data-stage="2"]) .neural-network__integration-signal {
    animation: neural-signal 2.2s ease-in-out 400ms both;
  }
  .home-neurobiology.is-animating:not(.is-integrated):is([data-stage="1"], [data-stage="2"]) .neural-network__cluster--1 {
    animation: neural-integrate 3.6s ease-in-out both;
  }
  .home-neurobiology.is-animating:not(.is-integrated):is([data-stage="1"], [data-stage="2"]) :is(.neural-network__bridge--first, .neural-network__bridge--support) {
    animation: neural-integrate-tether 3.6s ease-in-out both;
  }
}
@keyframes neural-integrate {
  0%, 70% { color: #ef9693; opacity: 1; }
  100% { color: #6deafe; opacity: 0.1; }
}
@keyframes neural-integrate-tether {
  0%, 70% { opacity: 0.85; }
  100% { opacity: 0.1; }
}
@keyframes neural-signal {
  0% { stroke-dashoffset: 1; opacity: 0; }
  20%, 70% { opacity: 0.85; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes neural-breathe { 50% { opacity: 0.25; } }
@media (max-width: 1050px) {
  .home-neurobiology__layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .home-neurobiology__intro { max-width: 42rem; }
  .home-neurobiology h2 { max-width: 23ch; }
  .neural-network { max-width: 44rem; margin-inline: auto; }
}
@media (max-width: 760px) {
  .home-neurobiology__insights, .home-neurobiology__agency { grid-template-columns: minmax(0, 1fr); }
  .home-neurobiology__agency { gap: 0.25rem; }
  .home-neurobiology__agency h3 { max-width: none; }
  .neural-network__controls button { padding: 0.65rem; font-size: 0.8rem; }
}
@media (max-width: 380px) {
  .neural-network__controls { grid-template-columns: minmax(0, 1fr); }
  .neural-network__controls button { flex-direction: row; align-items: center; gap: 0.6rem; min-height: 2.75rem; }
  .neural-network__step { flex: 0 0 auto; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .home-neurobiology *, .home-neurobiology *::before { animation: none !important; transition: none !important; }
}
