/* Scoped mobile header repair and decorative neural signals only. */
.site-header .header-inner,
#contact .contact-info,
.site-footer,
.path-grid > .path-card {
  position: relative;
  isolation: isolate;
}
.neural-signals {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  color: var(--brand-gold, #b5852d);
}
.neural-signals__track {
  fill: none;
  stroke: currentColor;
  stroke-width: 0.7;
  opacity: 0.12;
  vector-effect: non-scaling-stroke;
}
.neural-signals__pulse {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 2 98;
  opacity: 0.42;
  vector-effect: non-scaling-stroke;
  animation: codegy-neural-signal 18s linear infinite;
  animation-play-state: paused;
}
.neural-signals.is-active .neural-signals__pulse { animation-play-state: running; }
.neural-signals__pulse:nth-of-type(4) { animation-delay: -6s; animation-duration: 22s; }
.neural-signals__pulse:nth-of-type(6) { animation-delay: -13s; animation-duration: 26s; }
#contact .neural-signals { color: #e8d6a5; }
.site-footer .neural-signals { color: #e8d6a5; }
.path-card--dark .neural-signals { color: #e8d6a5; }
@keyframes codegy-neural-signal { to { stroke-dashoffset: -100; } }

@media (max-width: 640px) {
  :root { --header-height: 122px; }
  .site-header .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 8px;
    padding: 7px 10px;
    min-height: 110px;
  }
  .site-header .brand-link {
    grid-area: 1 / 1;
    min-width: 0;
    gap: 8px;
  }
  .site-header .brand-word { display: grid; min-width: 0; gap: 1px; }
  .site-header .brand-word strong { font-size: 1.125rem; line-height: 1.3; }
  .site-header .brand-word small {
    font-size: 0.6875rem;
    line-height: 1.6;
    letter-spacing: 0;
    white-space: normal;
  }
  .site-header .header-actions { display: contents; }
  .site-header .menu-toggle { grid-area: 1 / 2; }
  .site-header .appearance-tools { grid-area: 2 / 1; justify-self: start; }
  .site-header .language-link { grid-area: 2 / 2; justify-self: end; }
}
@media (prefers-reduced-motion: reduce) {
  .neural-signals__pulse { animation: none; display: none; }
}
@media print { .neural-signals { display: none; } }

/* A short accent stays inside each card, clear of its content. */
#programs .program-short-signal {
  position: absolute;
  width: 48px;
  height: 2px;
  border-radius: 999px;
  background: var(--brand-gold, #b5852d);
  opacity: 0;
  pointer-events: none;
  animation: none;
}
#programs .program-short-signal.is-active { animation: program-short-signal 4s ease-in-out both; }
#programs .program-short-signal--0 { inset-block-start: 14px; inset-inline-start: 30px; }
#programs .program-short-signal--1 { inset-block-end: 14px; inset-inline-end: 32px; }
#programs .program-short-signal--2 { inset-block-start: 72px; inset-inline-start: 13px; width: 2px; height: 38px; }
#programs .program-short-signal--3 { inset-block-end: 64px; inset-inline-end: 13px; width: 2px; height: 38px; }
@keyframes program-short-signal {
  0%, 18%, 82%, 100% { opacity: 0; transform: scale(.65); }
  38%, 60% { opacity: .72; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce), print {
  #programs .program-short-signal, #programs .program-short-signal.is-active { display: none; animation: none; }
}
