/* K11: MS page. Notes, sources, and the nerve fibre figure (shares .mfig, .tbi__alert and .tbi__prep from K07) */
.ms__note { max-width: 44rem; margin-top: 1.5rem; font-size: var(--text-small); line-height: 1.65; color: var(--color-text-2); }
.ms__note a, .ms__science a, .ms__refs a { text-decoration: underline; text-underline-offset: 3px; }
.ms__list-title { margin-bottom: 1rem; font-size: var(--text-small); font-weight: 600; color: var(--color-text-2); }
.ms__pull { max-width: 46rem; margin: 2rem 0 0; padding-left: 1.25rem; border-left: 3px solid var(--color-ember); font-family: var(--font-display); font-style: italic; font-size: clamp(1.25rem, 2.2vw, 1.5rem); line-height: 1.4; letter-spacing: var(--tracking-display); color: var(--color-red); }
.ms__unknown .aud__card { padding: 1.1rem 1.25rem; }
@media (min-width: 768px) { .aud__grid.ms__science, .aud__grid.ms__unknown { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ms__refs { display: grid; gap: .75rem; max-width: 50rem; margin: 0; padding-left: 1.25rem; font-size: var(--text-small); line-height: 1.6; color: var(--color-text-2); }
.ms__refs a { white-space: nowrap; }

/* Nerve fibre figure: myelin is stripped, alkaloids arrive, repair cells glow (driven by js/ms-motion.js) */
.msm { --strip: 0; --iboga: 1; --repair: 1; }
.msm .mfig__notes { padding-bottom: 1.1rem; }

/* Head inset: where it happens */
.msm__where .msm__where-title { fill: #ffd29a; }
.msm__head { fill: rgba(255,214,180,.06); stroke: rgba(255,214,180,.5); stroke-width: 1.6; stroke-linejoin: round; }
.msm__head-brain { fill: rgba(255,170,120,.1); stroke: rgba(255,214,180,.25); stroke-dasharray: 3 4; }
.msm__cord { fill: none; stroke: rgba(255,214,180,.45); stroke-width: 5; stroke-linecap: round; }
.msm__zoom { fill: none; stroke: rgba(255,179,71,.35); stroke-width: 1; stroke-dasharray: 4 5; }
.msm__spot { fill: #c98bd8; filter: drop-shadow(0 0 6px rgba(200,140,220,.9)); transform-box: fill-box; transform-origin: center; animation: msm-spot 2.4s ease-in-out infinite; }
.msm__spot:nth-of-type(2) { animation-delay: .8s; }
.msm__spot:nth-of-type(3) { animation-delay: 1.6s; }
@keyframes msm-spot { 50% { opacity: .55; transform: scale(1.35); } }

/* The nerve: cell body, axon, myelin segments */
.msm__vessel { fill: none; stroke: #b4462b; stroke-width: 6; stroke-linecap: round; opacity: calc(.25 + .45 * var(--iboga)); }
.msm__axon, .msm__terminal { fill: none; stroke: #ffc27a; stroke-width: 3; stroke-linecap: round; opacity: .75; }
.msm__body { fill: #ffd29a; stroke: #120a08; stroke-width: 2; filter: drop-shadow(0 0 6px rgba(255,170,70,.7)); }
.msm__myelin rect { fill: #f3d9b8; stroke: rgba(255,240,220,.55); stroke-width: 1; opacity: .9; }
.msm__myelin .is-stripped { opacity: calc(.9 - .82 * var(--strip)); stroke-dasharray: 6 calc(10px * var(--strip)); }
.msm__lesions { opacity: calc(var(--strip) * (1 - .3 * var(--repair))); }
.msm__rewrap rect { fill: none; stroke: #ffd166; stroke-width: 1.6; stroke-dasharray: 5 5; opacity: calc(.85 * var(--repair)); }
.msm__repair { opacity: var(--repair); }
.msm__repair > g { transform-box: fill-box; }
.msm__repair path { fill: none; stroke: #ffd166; stroke-width: 1.6; stroke-linecap: round; opacity: .8; }
.msm__repair circle:last-child { fill: #ffd29a; stroke: #120a08; stroke-width: 1.5; filter: drop-shadow(0 0 6px rgba(255,209,102,.9)); }

/* Moving parts built by the script */
.msm__pulses circle:first-child { fill: rgba(255,196,110,.3); }
.msm__pulses circle:last-child { fill: #fff3d6; }
.msm__immune .msm__cell-wall { fill: #8c5a9c; stroke: #d6b3e2; stroke-width: 1.6; stroke-dasharray: 2.5 2.5; }
.msm__immune .msm__cell-core { fill: #3b2142; }
.msm__molecules polygon { fill: none; stroke: #9fe3d0; stroke-width: 1.6; }
.msm__molecules circle { fill: #9fe3d0; }

/* Labels: plain word on top, the science term underneath */
.msm__labels text, .msm__meter text, .msm__where text, .msm__feel text { fill: rgba(255,232,210,.8); font-family: var(--font-sans); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.msm__labels .msm__sub, .msm__where .msm__sub, .msm__feel .msm__sub { font-size: 12px; text-transform: none; letter-spacing: .02em; opacity: .62; }
.msm__label-immune { fill: #d6b3e2 !important; opacity: var(--strip); }
.msm__label-blood { fill: #9fe3d0 !important; opacity: 0; transition: opacity var(--duration-normal); }
.msm[data-stage="2"] .msm__label-blood, .msm[data-stage="3"] .msm__label-blood { opacity: 1; }
.msm__label-repair { fill: #ffd29a !important; opacity: var(--repair); }
.msm__label-gold { fill: #ffd166 !important; }
.msm__label-gold .msm__sub { opacity: .8; }

/* Bottom strip: what the person notices */
.msm__panel { fill: rgba(255,214,180,.05); stroke: rgba(255,214,180,.12); }
.msm__steps ellipse { fill: #ffd29a; }
.msm__feel-state .msm__sub { fill: #ffd29a; opacity: .85; }
.msm__meter-track { fill: rgba(255,214,180,.15); }
.msm__meter-fill { fill: #ffb347; }
.msm__meter-ghost { fill: none; stroke: #ffd166; stroke-width: 1; stroke-dasharray: 3 3; opacity: var(--repair); }
.msm__meter-note { fill: rgba(255,214,150,.75) !important; font-size: 12px !important; text-transform: none !important; letter-spacing: .02em !important; opacity: var(--repair); }

/* Key under the figure */
.msm__key { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 1rem 0 0; padding: 0 1.5rem; list-style: none; font-size: var(--text-small); line-height: 1.4; color: var(--color-text-2); }
.msm__key li { display: flex; align-items: center; gap: .5rem; }
.msm__key svg { flex: none; width: 20px; height: 20px; }

@media (max-width: 600px) {
  .msm__labels text, .msm__meter text, .msm__where text, .msm__feel text { font-size: 19px; }
  .msm__sub, .msm__meter-note { font-size: 15px !important; }
  .msm__key { flex-direction: column; padding: 0 1.2rem; }
}
@media (min-width: 601px) { .msm .mfig__notes p { min-height: 7.5rem; } }
@media (prefers-reduced-motion: reduce) { .msm__label-blood { transition: none; } .msm__spot { animation: none; } }
