/* ===================================
   Road to Recovery
   Faithful recreation of the 2013 site
   =================================== */

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Accessibility utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 10000;
  background: #fff;
  color: #062130;
  padding: 10px 16px;
  font-family: "Georgia", serif;
  font-size: 16px;
  text-decoration: none;
  border: 2px solid #062130;
  border-radius: 4px;
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 8px;
  outline: 2px solid #ffbe0b;
  outline-offset: 2px;
}

/* Keyboard focus — only visible when navigating via keyboard */
:focus-visible {
  outline: 2px solid #ffbe0b;
  outline-offset: 2px;
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Replace the hover-to-play nerve regeneration GIF with the static storyboard */
  .nerve-regen-hover .nerve-regen-gif {
    display: none !important;
  }
}

/* Theme Styles */
body {
  text-shadow: none;
  background: #fff;
  padding: 0;
}

a {
  text-decoration: none;
  color: #000;
}

a:hover {
  text-decoration: none !important;
  color: #ADD626 !important;
}

p {
  font-size: 18px;
  line-height: 34px;
  font-family: "Georgia", serif;
  margin-bottom: 38px;
}

img {
  max-width: 100%;
  height: auto;
}

/* Container - 960px max like Bootstrap 2 */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

.span12 {
  width: 100%;
}

/* Color Swatches */
.col-white {
  color: #fff !important;
}
.col-black {
  color: #000 !important;
}
.col-red {
  color: #D82546;
}
.col-green {
  color: #26B1AA;
}
.col-blue {
  color: #64B2D6;
}

/* Selection color */
::selection {
  background: #ADD626;
  color: #000;
  text-shadow: none;
}
::-moz-selection {
  background: #ADD626;
  color: #000;
  text-shadow: none;
}

/* ===================================
   Navigation Header
   =================================== */
.masthead {
  background: #fff;
  width: 100%;
  height: 50px;
  position: fixed;
  padding-top: 14px;
  right: 0px;
  z-index: 100 !important;
  text-align: center;
}

.desktop-nav {
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 0;
}

.links a {
  font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
  font-size: 14px;
  font-weight: normal;
  width: 115px;
  margin-left: 10px;
  margin-right: 10px;
  padding-bottom: 5px;
  border-bottom: solid 1px #000;
  text-transform: uppercase;
  display: inline-block;
  text-align: center;
}

.links a:hover {
  border-bottom-color: #ADD626;
}

/* ===================================
   Page Sections
   =================================== */
.page {
  padding-top: 0;
  margin: 0;
  overflow: hidden;
}

/* Hero + Intro Section */
#hero-inner {
  background: #db8b05;
  background-image: url('images/NerveRoad_HeroBackground.jpg');
  background-size: cover;
  background-position: center;
  padding: 164px 0 80px;
  min-height: 100vh;
}

/* Intro text - right-aligned within hero */
.intro-text {
  max-width: 560px;
  margin-left: auto;
  margin-right: 0;
  padding-top: 40px;
  text-align: justify;
}

.intro-text p {
  color: #fff;
  text-shadow: 1px 1px 2px rgba(90, 55, 20, 0.45);
}


/* Neurons Section (About) */
#neurons.page {
  background: #5048a2;
}

#about {
  background: #5048a2;
  padding: 96px 0;
}


/* Hand Transplant (Features) */
#features {
  background: #d7f1e9;
  padding: 96px 0;
}

/* Peripheral Nerve Regen (Portfolio) */
#portfolio {
  background: #062130;
  padding: 96px 0;
}

#portfolio p {
  color: #7a9bb5;
}

#portfolio .sub-heading-three {
  opacity: 1;
  text-align: center;
}

#portfolio .image-block {
  margin-bottom: 50px;
}

/* Nerve regeneration hover-to-play GIF */
.nerve-regen-hover {
  position: relative;
  cursor: pointer;
}

.nerve-regen-hover .nerve-regen-gif {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nerve-regen-hover:hover .nerve-regen-gif,
.nerve-regen-hover.is-playing .nerve-regen-gif {
  opacity: 1;
}

.nerve-regen-hover:hover .nerve-regen-static,
.nerve-regen-hover.is-playing .nerve-regen-static {
  opacity: 0;
}

#portfolio .portfolio-text {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  text-align: justify;
}

#portfolio .def-link {
  color: #b93435 !important;
}

#portfolio .def-link:hover {
  color: #ADD626 !important;
}

#reintegration-inner {
  background: #fff;
  padding: 96px 0;
}

#reintegration .span12 {
  max-width: 720px;
  margin: 0 auto;
}

#reintegration .def-link {
  color: #be174d !important;
}

#reintegration .def-link:hover {
  color: #ADD626 !important;
}

.features-link:hover {
  color: #ADD626 !important;
}

/* Rehabilitation */
#rehabilitation {
  background: #cfeffb;
  padding: 96px 0;
}

#rehabilitation .span12 {
  max-width: 768px;
  margin: 0 auto;
}

#rehabilitation p {
  color: #27297f;
}

#rehabilitation .sub-heading-six {
  color: #ed145b;
}

#rehabilitation .def-link {
  color: #ed145b !important;
}

#rehabilitation .def-link:hover {
  color: #ADD626 !important;
}

/* Glossary */
#glossary {
  background: #2e3192;
  padding: 96px 0;
}

/* ===================================
   Headings
   =================================== */
.main-heading-two {
  font-family: "Georgia", serif;
  text-align: left;
  font-weight: normal;
  font-size: 84px;
  line-height: 84px;
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(90, 55, 20, 0.45);
  padding-left: 64px;
}

.main-heading-three {
  font-family: "Georgia", serif;
  text-align: left;
  font-weight: normal;
  font-size: 60px;
  line-height: 84px;
  color: #ffffff;
}

.main-heading-four {
  font-family: "Georgia", serif;
  text-align: left;
  font-weight: normal;
  font-size: 60px;
  line-height: 80px;
  color: #336699;
}

.main-heading-regen {
  font-family: "Georgia", serif;
  text-align: center;
  font-weight: normal;
  font-size: 60px;
  line-height: 80px;
  color: #7a9bb5;
  margin-bottom: 8px;
}

.main-heading-five {
  font-family: "Georgia", serif;
  text-align: left;
  font-weight: normal;
  font-size: 60px;
  line-height: 80px;
  color: #000000;
}

.main-heading-six {
  font-family: "Georgia", serif;
  text-align: left;
  font-weight: normal;
  font-size: 60px;
  line-height: 80px;
  color: #27297f;
}

.main-heading-seven {
  font-family: "Georgia", serif;
  text-align: left;
  font-weight: normal;
  font-size: 60px;
  line-height: 84px;
  color: #ffffff;
  text-shadow: 2px 2px 2px #0d004c;
}

/* ===================================
   Sub-headings
   =================================== */
.sub-heading {
  text-align: left;
  font-family: "Georgia", serif;
  font-style: italic;
  color: #ffde46;
  text-shadow: 1px 1px 2px rgba(90, 55, 20, 0.45);
  font-size: 28px;
  line-height: 39px;
  font-weight: normal;
  padding-top: 15px;
  padding-bottom: 5px;
  padding-left: 64px;
}

.sub-heading-one {
  text-align: left;
  font-family: "Georgia", serif;
  font-style: italic;
  color: #a69aff;
  font-size: 26px;
  line-height: 28px;
  font-weight: normal;
  padding-top: 15px;
  padding-bottom: 20px;
}

.sub-heading-two {
  text-align: left;
  font-family: "Georgia", serif;
  font-style: italic;
  color: #a69aff;
  font-size: 26px;
  line-height: 28px;
  font-weight: normal;
  padding-top: 15px;
  padding-bottom: 20px;
}

.sub-heading-three {
  text-align: left;
  font-family: "Georgia", serif;
  font-style: italic;
  color: #6699CC;
  opacity: 0.8;
  font-size: 26px;
  line-height: 28px;
  font-weight: normal;
  padding-top: 15px;
  padding-bottom: 20px;
}

.sub-heading-four {
  text-align: center;
  font-family: "Georgia", serif;
  font-style: italic;
  color: #d7f1e9;
  font-size: 28px;
  line-height: 39px;
  font-weight: normal;
  padding-top: 15px;
  padding-bottom: 20px;
}

.sub-heading-five-one {
  text-align: left;
  font-family: "Georgia", serif;
  font-style: italic;
  color: #8560a8;
  font-size: 26px;
  line-height: 28px;
  font-weight: normal;
  padding-top: 15px;
  padding-bottom: 20px;
}

.sub-heading-six {
  text-align: left;
  font-family: "Georgia", serif;
  font-style: italic;
  color: #ed145b;
  font-size: 26px;
  line-height: 28px;
  font-weight: normal;
  padding-top: 15px;
  padding-bottom: 20px;
}

/* ===================================
   Content Layout
   =================================== */
.content-row {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-top: 20px;
}

.content-row.reverse {
  flex-direction: row-reverse;
}

.text-col {
  flex: 1;
}

.image-col {
  flex: 0 0 400px;
}

.image-col img {
  width: 100%;
}

#about .content-row:first-of-type .image-col {
  flex: 0 0 600px;
  margin-left: -140px;
}

.nerve-anatomy-row .image-col {
  flex: 0 0 648px !important;
  margin-left: -140px;
}

.hover-hint {
  font-size: 14px;
  opacity: 0.7;
  margin-bottom: 0 !important;
}

.hover-toggle-wrapper {
  margin-top: 0;
  margin-bottom: 38px;
}

.hover-toggle {
  font-family: "Georgia", serif;
  font-size: 14px;
  color: #ffde46 !important;
  opacity: 0.7;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 222, 70, 0.4) !important;
}

.hover-toggle:hover {
  color: #ADD626 !important;
  opacity: 1;
}

/* Sensory text beside neuron diagrams */
.sensory-text {
  flex: 1;
  display: flex;
  align-items: center;
}

.sensory-text p {
  text-align: justify;
}

.image-block {
  margin: 20px 0 30px;
}

.image-block img {
  width: 100%;
}

.figure-with-caption {
  position: relative;
  text-align: center;
}

.figure-with-caption img {
  width: 75%;
  max-width: 75%;
}

.figure-with-caption .figure-caption {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, 8px);
  width: min(90%, 640px);
  background: #333;
  color: #fff;
  border-radius: 6px;
  padding: 10px 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-style: italic;
  line-height: 1.45;
  text-align: left;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 20;
}

.figure-with-caption:hover .figure-caption,
.figure-with-caption:focus-within .figure-caption {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 12px);
}

.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin: 30px 0 40px;
  background: #000;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Neuron diagrams side-by-side */
.neuron-diagrams {
  display: flex;
  justify-content: flex-start;
  padding-left: 40px;
  gap: 60px;
  margin: 50px 0;
}

.neuron-diagram {
  text-align: center;
  flex: 0 0 auto;
}

.neuron-diagram img {
  height: 500px;
  width: auto;
  filter: brightness(0) saturate(100%) invert(18%) sepia(30%) saturate(1500%) hue-rotate(220deg) brightness(80%);
  transition: filter 0.3s ease;
}

.neuron-diagram:hover img {
  filter: brightness(0) saturate(100%) invert(80%) sepia(60%) saturate(500%) hue-rotate(5deg) brightness(105%);
}

.diagram-label {
  font-family: "Georgia", serif;
  font-size: 18px;
  margin-top: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.neuron-diagram:hover .diagram-label {
  opacity: 1;
}

/* Brain diagram */
.brain-diagram {
  max-width: 560px;
  margin: 30px auto;
}

.brain-wrapper {
  position: relative;
}

.brain-wrapper object {
  width: 100%;
  height: auto;
  display: block;
}

.brain-label {
  position: absolute;
  font-family: "Georgia", serif;
  font-size: 16px;
  font-weight: bold;
  color: #333;
  background: rgba(255, 255, 255, 0.95);
  padding: 6px 14px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
  z-index: 10;
}


/* Sub-text colors */
.sub-text-one {
  padding-right: 150px;
  color: #336699;
}

.sub-text-two {
  padding-right: 150px;
  color: #000000;
}

.sub-text-three {
  padding-right: 150px;
  color: #27297f;
}

/* ===================================
   Link Styles per Section
   =================================== */
.def-link {
  color: #000 !important;
  font-weight: bold;
  border-bottom: none !important;
}

/* Definition tooltips */
.def-tooltip {
  display: none;
  position: fixed;
  background: #333 !important;
  color: #fff !important;
  font-size: 13px;
  line-height: 1.4;
  padding: 8px 12px;
  border-radius: 6px;
  max-width: 280px;
  z-index: 9999;
  pointer-events: none;
  font-weight: normal;
  font-family: "Georgia", serif;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.def-tooltip.visible {
  display: block !important;
}

.def-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #333;
}

.def-tooltip.below::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: #333;
}

[data-definition] {
  cursor: pointer;
}

.about-link {
  color: #ffd200 !important;
  font-weight: bold;
  border-bottom: none !important;
}

#about .text-col p {
  text-align: justify;
}

.services-link {
  color: #A01445 !important;
  font-weight: bold;
  border-bottom: none !important;
}

.features-link {
  color: #b93435 !important;
  font-weight: bold;
  border-bottom: none !important;
}

.features-text {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  text-align: justify;
}

#features .image-block {
  max-width: 1225px;
  margin-left: -100px;
}

#features p {
  color: #336699;
}

.contact-link {
  color: #ffd200 !important;
  font-weight: bold;
  border-bottom: none !important;
  text-shadow: 1px 1px 2px rgba(90, 55, 20, 0.45);
}

.contact-link:hover {
  color: #ADD626 !important;
  text-shadow: 1px 1px 2px rgba(90, 55, 20, 0.45);
}


/* ===================================
   Glossary Styles
   =================================== */
.glossary-1 {
  font-size: 18px;
  font-weight: bold;
  color: #ffd200;
  line-height: 34px;
  font-family: "Georgia", serif;
}

.glossary-list p {
  color: #fff;
  margin-bottom: 12px;
}

.glossary-list .col-white {
  font-size: 14px;
  line-height: 22px;
}

#glossary .sub-heading-four {
  text-align: left;
}

/* ===================================
   Quiz Launch Button
   =================================== */
.quiz-launch-btn {
  display: block;
  margin: 28px auto 40px;
  height: 56px;
  padding: 0 36px;
  font-family: "Georgia", serif;
  font-size: 18px;
  color: #2e3192;
  background: #fff;
  border: 2px solid #fff;
  border-radius: 28px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.quiz-launch-btn:hover {
  color: #fff;
  background: #2e3192;
  border-color: #fff;
}

/* ===================================
   Quiz Modal Overlay
   =================================== */
.quiz-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.quiz-overlay.active {
  display: flex;
}

.quiz-modal {
  position: relative;
  background: #ececec;
  border-radius: 28px;
  width: 100%;
  max-width: 620px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 48px 40px 40px;
  color: #000;
  font-family: "Georgia", serif;
}

.quiz-close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  font-size: 32px;
  line-height: 1;
  color: #555;
  cursor: pointer;
  transition: color 0.2s;
}

.quiz-close:hover {
  color: #000;
}

/* Progress bar */
.quiz-progress-bar {
  width: 100%;
  height: 8px;
  background: #ccc;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.quiz-progress-fill {
  height: 100%;
  background: #2e3192;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.quiz-progress-label {
  font-size: 13px;
  color: #777;
  margin-bottom: 24px;
}

/* Question */
.quiz-question-label {
  font-size: 14px;
  color: #555;
  margin-bottom: 6px;
  font-style: italic;
}

.quiz-question {
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 24px;
  color: #000;
}

.quiz-def {
  color: #6a3dac;
}

/* Choices */
.quiz-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.quiz-choice {
  text-align: left;
  padding: 14px 18px;
  font-family: "Georgia", serif;
  font-size: 15px;
  line-height: 1.4;
  color: #000;
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.quiz-choice:hover {
  border-color: #2e3192;
}

.quiz-choice.selected {
  border-color: #2e3192;
  background: #e8e6f5;
}

.quiz-choice.correct {
  border-color: #2d8a4e;
  background: #d4edda;
  color: #1a5c32;
}

.quiz-choice.incorrect {
  border-color: #c0392b;
  background: #fce4e4;
  color: #922;
}

/* Submit / Next button */
.quiz-submit-btn {
  display: block;
  width: 100%;
  height: 50px;
  font-family: "Georgia", serif;
  font-size: 16px;
  color: #fff;
  background: #000;
  border: 2px solid #000;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quiz-submit-btn:hover:not(:disabled) {
  color: #000;
  background: #fff;
  border-color: #000;
}

.quiz-submit-btn:active:not(:disabled) {
  color: #666;
  background: #aaa;
  border-color: #aaa;
}

.quiz-submit-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Results screen */
.quiz-results-heading {
  font-size: 28px;
  text-align: center;
  margin: 16px 0 8px;
}

.quiz-results-score {
  font-size: 20px;
  text-align: center;
  margin-bottom: 16px;
}

.quiz-results-msg {
  text-align: center;
  font-size: 16px;
  margin-bottom: 24px;
  font-style: italic;
}

.quiz-pass { color: #2d8a4e; }
.quiz-fail { color: #c0392b; }

/* Attempt history */
.quiz-attempts {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #ccc;
}

.quiz-attempts-heading {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 10px;
}

.quiz-attempt {
  font-size: 14px;
  margin-bottom: 4px;
  padding: 6px 0;
}

.quiz-attempt-pass { color: #2d8a4e; }
.quiz-attempt-fail { color: #922; }

/* ===================================
   Footer
   =================================== */
.mastfoot {
  background: #2e3192;
  width: 100%;
  padding: 20px 0;
  text-align: center;
}

.foot-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

#foot-logo > img {
  width: 96px;
  height: 96px;
}

#hopkins-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 10px 14px;
}

#hopkins-logo > img {
  height: 76px;
  width: auto;
  display: block;
}

.mastfoot p {
  font-size: 14px;
  margin-top: 10px;
}

/* ===================================
   Pseudo-element spacing for anchors
   (offset for fixed header)
   =================================== */
#peripheralNerves:before, #peripheralNervesBack:before,
#neurons:before, #motorNeuron:before, #sensoryNeuron:before, #cellBody:before,
#dendrites:before, #axon:before, #axonTerminal:before,
#upperMotorNeuron:before, #lowerMotorNeuron:before,
#myelinSheath:before, #schwannCells:before,
#handTransplant:before, #nerveRegeneration:before, #wallerianDegeneration:before,
#corticalReintegration:before, #pmc:before, #psc:before,
#phantomLimb:before, #homunculus:before, #fMRI:before, #TMS:before,
#postopSplint:before, #epm:before, #prom:before, #craneSplint:before, #antiClaw:before {
  content: "";
  display: block;
  height: 50px;
  margin: -30px 0 0;
}

/* ===================================
   Responsive
   =================================== */
@media only screen and (max-width: 767px) {
  /* Prevent horizontal overflow on real devices */
  html, body {
    overflow-x: hidden;
  }

  .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* Hero title — remove desktop padding, center on mobile */
  .main-heading-two {
    font-size: 42px;
    line-height: 48px;
    padding-left: 0 !important;
    text-align: left;
    font-weight: bold;
  }

  .sub-heading {
    padding-left: 0 !important;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
  }

  /* Hero background — mobile-specific image, pinned to top */
  #hero-inner {
    background-image: url('images/NerveRoad_HeroBackgroundMobile.jpg');
    background-position: top center;
    background-repeat: no-repeat;
    background-size: contain;
    background-color: #db8b05;
    padding: 100px 0 60px;
  }

  /* Intro text — full width on mobile */
  .intro-text {
    max-width: 100%;
    margin: 0;
    padding-top: 30px;
  }

  /* Section headings */
  .main-heading-three,
  .main-heading-four,
  .main-heading-five,
  .main-heading-six,
  .main-heading-seven,
  .main-heading-regen {
    font-size: 32px;
    line-height: 40px;
  }

  /* Stack content rows vertically */
  .content-row,
  .content-row.reverse {
    flex-direction: column;
  }

  /* Reset all image column overrides for mobile */
  .image-col,
  #about .content-row:first-of-type .image-col,
  .nerve-anatomy-row .image-col {
    flex: none !important;
    width: 100% !important;
    margin-left: 0 !important;
  }

  .image-col img {
    width: 100%;
    max-width: 100%;
  }

  /* Hand illustration — reset desktop overrides */
  #features .image-block {
    max-width: 100%;
    margin-left: 0;
  }

  /* Neuron diagrams — side by side, centered on mobile */
  .neuron-diagrams {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    padding-left: 0;
    gap: 10px;
  }

  .neuron-diagram img {
    height: 300px;
  }

  /* Sensory text — full width below diagrams on mobile */
  .sensory-text {
    flex: 0 0 100%;
    width: 100%;
  }

  /* Sub-text — remove right padding on mobile */
  .sub-text-one,
  .sub-text-two,
  .sub-text-three {
    padding-right: 0;
  }

  /* Features text — full width */
  .features-text {
    max-width: 100%;
  }

  /* Portfolio text — full width */
  #portfolio .portfolio-text {
    max-width: 100%;
  }

  /* Reintegration — full width */
  #reintegration .span12 {
    max-width: 100%;
  }

  /* Rehabilitation — full width */
  #rehabilitation .span12 {
    max-width: 100%;
  }

  /* Quiz button — full width on mobile */
  .quiz-launch-btn {
    width: 100%;
    height: 56px;
    font-size: 16px;
    padding: 0 20px;
  }

  /* Nav — allow height to grow for wrapped items */
  .masthead {
    height: auto;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .desktop-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .links a {
    width: auto;
    font-size: 10px;
    margin: 2px 5px;
    border-bottom: none;
    padding-bottom: 2px;
  }

  /* Brain diagram — full width */
  .brain-diagram {
    max-width: 100%;
  }
}
