/* Phase 2C: coordinated dark / pearl / compact neural surfaces. */
.neural-surface { --nm-edge: #398eaf; --nm-core: #c4f6ff; position: relative; isolation: isolate; }
.neural-surface[data-neural-tone="dark"] { --nm-edge: #6eeaff; --nm-core: #edffff; }
.neural-surface[data-neural-level="B"] { background: linear-gradient(135deg,#fff 5%,#f6fcff 55%,#e9f4fa); border-color: #a9cddd; }
.nm-signal { fill: none; stroke-linecap: round; }
/* Approved comet geometry is cloned from the reference card, not reauthored. */
.nm-signal .comet-tail-far { stroke: var(--nm-edge,#319dcc); stroke-width: .9; stroke-dasharray: 0 95.4 1.8 2.8; opacity: .28; }
.nm-signal .comet-tail-mid { stroke: var(--nm-edge,#4bd5ef); stroke-width: 1.6; stroke-dasharray: 0 97.15 1.4 1.45; opacity: .46; }
.nm-signal .comet-tail-near { stroke: var(--nm-edge,#8cf7ff); stroke-width: 3; stroke-dasharray: 0 98.6 1.05 .35; opacity: .78; filter: drop-shadow(0 0 3px #56edff); }
.nm-signal .comet-spark { stroke: var(--nm-core,#e4ffff); stroke-width: 1.2; stroke-dasharray: 0 99.35 .18 .47; opacity: .82; }
.nm-signal .comet-halo { stroke: var(--nm-edge,#53dfff); stroke-width: 14; stroke-dasharray: .52 99.48; opacity: .12; filter: blur(2px); }
.nm-signal .comet-glow { stroke: var(--nm-edge,#6defff); stroke-width: 9.5; stroke-dasharray: .52 99.48; opacity: .28; filter: drop-shadow(0 0 4px #50e9ff); }
.nm-signal .comet-core { stroke: var(--nm-core,#edffff); stroke-width: 7; stroke-dasharray: .45 99.55; filter: drop-shadow(0 0 3px #73f7ff) drop-shadow(0 0 6px #45dfff88); }
.neural-surface:focus-visible, .neural-surface:focus-within { outline: 2px solid #2987a6; outline-offset: 4px; }
.neural-surface[data-neural-tone="dark"]:focus-visible,
.neural-surface[data-neural-tone="dark"]:focus-within { outline-color: #8cefff; }
/* The new surface controller owns activation, leaving approved audience cards alone. */
.neural-surface.neural-active, .neural-surface.neural-active > h3,
.neural-surface.neural-active > p, .neural-sequence.neural-active > .neural-surface,
.neural-sequence.neural-active .neural-surface h3,
.neural-sequence.neural-active .neural-surface > p { animation: none; }
.neural-surface.neural-feature::before { display: none; }
/* Preserve journey / response arrows: those families already use ::after. */
.verification-list > .neural-surface { border-radius: 8px; }
.workflow.neural-surface { border-radius: 15px; }
.hero-energy { position: absolute; inset: 0; width: 100%; height: auto; aspect-ratio: 840 / 680; pointer-events: none; overflow: visible; }
.hero-signal { --nm-edge: #53dfff; --nm-core: #efffff; }
.hero-signal .comet-core { stroke-width: 3.5; }
.hero-signal .comet-glow { stroke-width: 8; }
.hero-signal .comet-halo { stroke-width: 15; }
.hero-junction { fill: #56dfff; stroke: #a7f7ff; stroke-width: .7; filter: drop-shadow(0 0 5px #44cfff); }
/* Preserve the approved layered node/tail shapes; constrain expensive bloom
   to small moving circles instead of filtering card-sized SVG use bounds. */
.nm-signal .comet-core, .nm-signal .comet-glow,
.nm-signal .comet-halo, .nm-signal .comet-tail-near { filter: none; }
.nm-local-bloom { fill: var(--nm-edge,#64e8ff); opacity: .35; filter: blur(4px); }
.neural-expanded .hero-visual > .neural-route { display: none; }
.neural-motion-toggle { flex: none; align-self: center; margin-left: auto; border: 1px solid #4e8a9f; border-radius: 6px; padding: 9px 12px; min-height: 42px; background: #102f46; color: #d4f6ff; font: inherit; font-size: 13px; cursor: pointer; }
.neural-motion-toggle:focus-visible { outline: 3px solid #8cefff; outline-offset: 4px; }
.neural-motion-toggle[hidden] { display: none; }
/* The static control reserves its space before JS, avoiding a hero layout shift. */
body:not(.neural-expanded) .neural-motion-toggle { visibility: hidden; }
.hero-disclosure .neural-motion-toggle { margin-inline-end: max(0px, calc(225px - max(24px, (100vw - 1170px) / 2))); }
/* Readable navigation within the existing 84px header. */
.main-nav { gap: clamp(14px,1.5vw,23px); }
.main-nav a { font-size: clamp(14px,1.05vw,16px); min-height: 44px; display: inline-flex; align-items: center; }
.language-switch button { font-size: 13px; min-height: 38px; width: 38px; }
.main-nav a:focus-visible, .language-switch button:focus-visible { outline: 2px solid #8cefff; outline-offset: 4px; border-radius: 4px; }
.sources-grid p { font-size: clamp(15px,1.12vw,16px); line-height: 1.85; }
.sources-grid .author-role { font-size: 15px !important; }
.source-links a { font-size: clamp(15px,1.12vw,16px); line-height: 1.55; min-height: 48px; }
.source-links h3 { font-size: 21px; }
.source-links .source-footnote { font-size: clamp(14px,1.05vw,15px); line-height: 1.8; }
.sources-section .eyebrow { font-size: 13px; }
.footer-content strong { font-size: 14px; }
.footer-content p, .footer-content > div:last-child { font-size: clamp(14px,1.05vw,15px); line-height: 1.8; }
.footer-content > div:first-child { max-width: 630px; }
.footer-content > div:last-child { max-width: 430px; }
.footer-content a { font-size: 15px; display: inline-flex; align-items: center; min-height: 44px; }
/* Leave a clear landing area above the existing floating portfolio guide. */
.site-footer { padding-bottom: 90px; }
@media (min-width: 781px) and (max-width: 1100px) {
 .header-grid { grid-template-columns: minmax(170px,1fr) auto auto; gap: 13px; }
 .main-nav { gap: 12px; }
 .brand { gap: 8px; }
 .brand-mark { width: 32px; flex: none; }
 .brand strong { font-size: 11px; }
}
/* Switch to the existing compact menu before larger labels can collide. */
@media (min-width: 781px) and (max-width: 1000px) {
 .header-grid { grid-template-columns: 1fr auto auto; min-height: 73px; }
 .menu-button { display: inline-block; grid-column: 2; }
 .language-switch { grid-column: 3; }
 .main-nav { grid-column: 1 / -1; order: 5; display: none; flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 12px; }
 .main-nav.is-open { display: flex; }
 .main-nav a { padding: 13px 5px; border-top: 1px solid #25435b; }
}
@media (max-width: 780px) {
 .main-nav a { font-size: 15px; }
 .hero-disclosure { flex-wrap: wrap; }
 .hero-disclosure > [data-en] { flex: 1; min-width: 75%; }
 .neural-motion-toggle { margin-left: 30px; }
 .hero-disclosure .neural-motion-toggle { margin-inline-end: 0; }
}
@media (prefers-reduced-motion: reduce) {
 .nm-signal, .nm-dust, .nm-local-bloom, .hero-energy { display: none; }
 .neural-motion-toggle { display: none; }
}

/* One-time container entrance; base content is visible without JavaScript or IO.
   The existing text controllers own clip paths and carets independently. */
@media (prefers-reduced-motion: no-preference) {
 .content-card-entrance.card-waiting { opacity: 0; transform: translateY(18px); }
 .content-card-entrance.card-entering { animation: content-card-enter 800ms cubic-bezier(0.22,1,0.36,1) both; }
 @keyframes content-card-enter {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
 }
}
