.marrow-card {
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.marrow-card:hover {
  box-shadow: 0 0 18px 4px rgba(184, 84, 11, 0.45), 0 0 40px 8px rgba(184, 84, 11, 0.15);
  transform: translateY(-3px);
}

.pulse-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pulse-card:hover {
  transform: scale(1.03) translateY(-4px);
  box-shadow: 0 8px 24px rgba(13, 10, 8, 0.5);
}

.reflex-btn {
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
}

.reflex-btn:focus-visible {
  outline: 2px solid var(--chalk);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(184, 84, 11, 0.4);
}

.reflex-btn:active {
  transform: scale(0.96);
  box-shadow: inset 0 2px 6px rgba(13, 10, 8, 0.6);
}

.data-grid tr:nth-child(even) {
  background: var(--dusk);
}

.data-grid tr:nth-child(odd) {
  background: var(--marrow);
}

.data-grid tr:hover {
  background: var(--haze);
}

.data-grid th {
  background: var(--pitch);
  border-bottom: 2px solid var(--ember);
}

.cortex-link,
.corridor-link {
  position: relative;
  text-decoration: none;
  transition: color 0.25s ease;
}

.cortex-link::after,
.corridor-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--ember);
  transition: width 0.3s ease;
}

.cortex-link:hover::after,
.corridor-link:hover::after {
  width: 100%;
}

.cortex-link:hover,
.corridor-link:hover {
  color: var(--ember);
}

.specimen-footer a {
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

.specimen-footer a:hover {
  color: var(--ember);
  text-shadow: 0 0 8px rgba(184, 84, 11, 0.3);
}

.screen-gallery img {
  cursor: zoom-in;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.screen-gallery img:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(13, 10, 8, 0.6);
}

.nerve-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.nerve-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.nerve-slide-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.nerve-slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.nerve-slide-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.nerve-slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.chamber-section {
  transition: background 0.4s ease;
}

@media (min-width: 768px) and (max-width: 1024px) {
  .cortex-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .specimen-hero h1 {
    font-size: 2rem;
  }

  .marrow-card,
  .pulse-card {
    padding: 1.25rem;
  }

  .screen-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .corridor-nav {
    gap: 0.75rem;
  }

  .data-grid {
    font-size: 0.875rem;
  }

  .chamber-section {
    padding: 2rem 1.25rem;
  }
}

@media(max-width:768px){
  .nerve-banner{
    padding: 5px 0;
    line-height: 17px;
  }
}

@media print {
  * {
    color: #000 !important;
    background: #fff !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  .marrow-card,
  .pulse-card {
    border: 1px solid #333;
    page-break-inside: avoid;
    transform: none !important;
  }

  .reflex-btn,
  .corridor-nav,
  .specimen-footer {
    display: none !important;
  }

  .cortex-link::after,
  .corridor-link::after {
    display: none;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #555 !important;
  }

  .data-grid tr:nth-child(even) {
    background: #eee !important;
  }

  .data-grid th {
    background: #ccc !important;
    border-bottom: 2px solid #000;
  }

  .screen-gallery img {
    max-width: 100%;
    cursor: default;
  }

  .cortex-grid {
    grid-template-columns: 1fr;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }

  img {
    max-width: 100% !important;
  }
}
