/* Health & Performance post theme.
   Category-wide: loaded for every post in health-performance.
   Light mode follows the current hub; dark mode keeps recognisable references. */

.dr-post-health-performance {
  --bg: #f2f8ec;
  --bg-raised: #fffdf5;
  --ink: #17372e;
  --ink-dim: #587168;
  --line: rgba(23, 55, 46, .18);
  --pulse: #d85f42;
  --leaf: #127f50;
  --leaf-dim: rgba(22, 139, 89, .28);
  --cyan: #117f7b;
  --water: #397abe;
  --citrus: #9ab72d;
  --mono: "DM Mono", "IBM Plex Mono", ui-monospace, monospace;
  --serif: "Playfair Display", "Newsreader", Georgia, serif;
  --body: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  width: min(calc(100% - 2rem), 1080px) !important;
  max-width: 1080px !important;
  margin: 0 auto;
  padding: 48px 24px 80px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.76;
}

.dr-post-health-performance .dr-post-body,
.dr-post-health-performance .dr-sources,
.dr-post-health-performance .dr-post-footer { width: 100% !important; max-width: 940px !important; margin-inline: auto !important; }
.dr-post-health-performance .dr-post-section > :where(p, ul, ol, blockquote) { max-width: 76ch; margin-inline: auto; }

/* The global post template also creates a JavaScript-powered slide-out TOC.
   Hide its empty inline rail for Health posts to avoid duplicate navigation. */
body.dr-cluster-health .dr-post-rail { display: none !important; }
body.dr-cluster-health .dr-post-toc { width: 100%; max-width: 940px; margin-inline: auto; }
body.dr-cluster-health .dr-post-toc a { color: #127f50; }

html[data-theme="sepia"] body.dr-cluster-health,
html[data-theme="light"] body.dr-cluster-health {
  --dr-bg: #f2f8ec;
  --dr-bg-alt: #eef7f1;
  --dr-bg-soft: #f8fbef;
  --dr-panel: rgba(255, 253, 245, .94);
  --dr-panel-strong: #fffdf5;
  --dr-border: rgba(23, 55, 46, .18);
  --dr-border-soft: rgba(23, 55, 46, .12);
  --dr-text: #17372e;
  --dr-text-soft: #36594e;
  --dr-text-muted: #587168;
  --dr-accent: #127f50;
  --dr-accent-2: #117f7b;
  --dr-page-glow: rgba(190, 219, 77, .15);
  --dr-page-grid: rgba(22, 139, 89, .055);
}

html[data-theme="dark"] .dr-post-health-performance {
  --bg: #101914;
  --bg-raised: #17231d;
  --ink: #eef5ec;
  --ink-dim: #b4c5bb;
  --line: rgba(213, 235, 218, .17);
  --pulse: #ef7454;
  --leaf: #77d6a4;
  --leaf-dim: rgba(119, 214, 164, .3);
  --cyan: #72d8d2;
  --water: #79ade5;
  --citrus: #bedb4d;
}

html[data-theme="dark"] body.dr-cluster-health {
  --dr-bg: #101914;
  --dr-bg-alt: #142019;
  --dr-bg-soft: #17231d;
  --dr-panel: rgba(23, 35, 29, .94);
  --dr-panel-strong: #1b2922;
  --dr-border: rgba(213, 235, 218, .17);
  --dr-border-soft: rgba(213, 235, 218, .1);
  --dr-text: #eef5ec;
  --dr-text-soft: #d5e4d8;
  --dr-text-muted: #b4c5bb;
  --dr-accent: #77d6a4;
  --dr-accent-2: #72d8d2;
  --dr-page-glow: rgba(119, 214, 164, .1);
  --dr-page-grid: rgba(114, 216, 210, .045);
}

.dr-post-health-performance :where(h1, h2, h3, strong) { color: var(--ink) !important; }
.dr-health-research-signal { position: relative; isolation: isolate; overflow: hidden; margin: 0 auto 42px; padding: clamp(28px, 5vw, 52px); border: 1px solid var(--line); border-radius: 1.5rem; background: linear-gradient(135deg, rgba(255,253,245,.96), rgba(224,246,229,.86)); box-shadow: 0 1.5rem 4rem rgba(23,55,46,.08); }
.dr-health-research-signal::before { content: ""; position: absolute; z-index: -1; width: 18rem; height: 18rem; right: -6rem; top: -8rem; border-radius: 50%; background: radial-gradient(circle, rgba(190,219,77,.38), rgba(21,158,153,.12) 45%, transparent 70%); animation: drHealthSignalBreath 7s ease-in-out infinite; }
.dr-health-research-signal::after { content: ""; position: absolute; z-index: -1; inset: 0; opacity: .32; background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.85) 50%, transparent 62%); transform: translateX(-120%); animation: drHealthSignalSweep 9s ease-in-out infinite; }
.dr-health-research-signal__label { margin: 0 0 .75rem; color: var(--leaf); font: 500 .68rem/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.dr-health-research-signal h2 { max-width: 22ch; margin: 0 0 1rem; color: var(--ink); font: 600 clamp(2rem, 4.5vw, 3.5rem)/1.06 var(--serif); letter-spacing: -.025em; }
.dr-health-research-signal p:last-child { max-width: 62ch; margin: 0; color: var(--ink-dim); }
.dr-evidence-ladder, .dr-system-layers, .dr-neuron-compare { display: grid; gap: 1rem; margin: 1.5rem auto 2.5rem; }
.dr-evidence-ladder { grid-template-columns: repeat(3, 1fr); }
.dr-evidence-card, .dr-layer-card, .dr-neuron-card { padding: 1.25rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--bg-raised); transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.dr-evidence-card:hover, .dr-layer-card:hover, .dr-neuron-card:hover, .dr-system-map__node:hover { transform: translateY(-3px); border-color: var(--leaf-dim); box-shadow: 0 .9rem 2rem rgba(23,55,46,.08); }
.dr-evidence-card span, .dr-layer-card span, .dr-neuron-card span, .dr-educational-label { display: block; margin-bottom: .45rem; color: var(--leaf); font: 500 .64rem/1.5 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.dr-evidence-card strong, .dr-layer-card strong, .dr-neuron-card strong { display: block; margin-bottom: .45rem; font-size: 1.03rem; }
.dr-evidence-card p, .dr-layer-card p, .dr-neuron-card p { margin: 0; color: var(--ink-dim); font-size: .9rem; }
.dr-system-map { margin: 1.5rem auto 2.5rem; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--line); border-left: 3px solid var(--cyan); border-radius: 1rem; background: linear-gradient(135deg, var(--bg-raised), color-mix(in srgb, var(--cyan) 8%, var(--bg-raised))); }
.dr-system-map__flow { display: flex; align-items: stretch; justify-content: center; gap: .6rem; }
.dr-system-map__node { flex: 1; display: grid; place-items: center; min-height: 5rem; padding: .8rem; border: 1px solid var(--line); border-radius: .8rem; background: var(--bg-raised); color: var(--ink); text-align: center; font-weight: 650; transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.dr-system-map__arrow { display: grid; place-items: center; color: var(--cyan); font: 1.25rem/1 var(--mono); }
.dr-system-map figcaption { margin-top: 1rem; color: var(--ink-dim); font-size: .82rem; }
.dr-neuron-compare { grid-template-columns: 1fr 1fr; }
.dr-neuron-card--baseline { border-top: 3px solid var(--leaf); }.dr-neuron-card--stress { border-top: 3px solid var(--pulse); }
.dr-evidence-note, .dr-medical-boundary { margin: 1.5rem auto 2.5rem; padding: 1.15rem 1.25rem; border-left: 3px solid var(--citrus); background: color-mix(in srgb, var(--citrus) 10%, var(--bg-raised)); color: var(--ink-dim); }
.dr-post-health-performance blockquote { margin: 1.5rem auto; padding: 1rem 1.25rem; border-left: 3px solid var(--cyan); background: var(--bg-raised); color: var(--ink); font-size: 1.08rem; font-style: italic; }
.dr-post-health-performance .dr-sources h3 { margin-top: 1.5rem; font-size: 1rem; }

html[data-theme="dark"] .dr-health-research-signal { background: linear-gradient(135deg, rgba(23,35,29,.98), rgba(20,47,39,.94)); }
html[data-theme="dark"] body.dr-cluster-health .dr-post-toc a { color: #77d6a4; }

@keyframes drHealthSignalBreath { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: .9; transform: scale(1.12); } }
@keyframes drHealthSignalSweep { 0%, 68%, 100% { transform: translateX(-120%); } 82% { transform: translateX(120%); } }
.dr-post-kicker { margin-bottom: 14px; color: var(--leaf); font: 11.5px/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.dr-post-title { margin-bottom: 18px; color: var(--ink); font: 600 clamp(2rem, 5vw, 3rem)/1.08 var(--serif); letter-spacing: -.01em; }
.dr-post-dek { max-width: 56ch; margin-bottom: 20px; color: var(--ink-dim); font-size: 1.15rem; font-style: italic; }
.dr-post-meta { margin-bottom: 36px; padding-bottom: 28px; border-bottom: 1px solid var(--line); color: var(--ink-dim); font: 11px/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.dr-meta-dot { margin: 0 8px; opacity: .5; }
.dr-post-body { counter-reset: dr-health-section; }
.dr-post-section { counter-increment: dr-health-section; position: relative; margin: 2.5rem auto; padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid var(--line); border-radius: 1.35rem; background: color-mix(in srgb, var(--bg-raised) 88%, var(--cyan) 12%); box-shadow: 0 1rem 3rem rgba(23,55,46,.045); }
.dr-post-section:nth-of-type(even) { background: color-mix(in srgb, var(--bg-raised) 91%, var(--citrus) 9%); }
.dr-post-section h2 { max-width: 24ch; margin: 0 0 1.6rem !important; color: var(--ink); font: 600 clamp(1.65rem, 3vw, 2.25rem)/1.18 var(--serif); letter-spacing: -.015em; text-align: left !important; }
.dr-post-section h2::before { content: counter(dr-health-section, decimal-leading-zero) " · "; display: block; margin-bottom: .6rem; color: var(--leaf); font: 500 .68rem/1.5 var(--mono); letter-spacing: .12em; }
.dr-post-section h3 { max-width: 76ch; margin: 2rem auto .8rem !important; color: var(--ink); font: 650 1.2rem/1.35 var(--body); text-align: left !important; }
.dr-post-section p { margin-bottom: 1.25em; color: var(--ink); }
.dr-post-section p:last-child { margin-bottom: 0; }
.dr-post-section em { color: var(--ink); font-style: italic; }
.dr-post-section strong { color: var(--ink); font-weight: 700; }
.dr-takeaway, .dr-why-matters { margin: 8px 0 34px; padding: 22px 24px; border: 1px solid var(--line); border-left: 3px solid var(--leaf); background: var(--bg-raised); box-shadow: 0 1rem 2.5rem rgba(23,55,46,.055); font-size: 16px; }
.dr-why-matters { border-left-color: var(--cyan); }
.dr-takeaway-label, .dr-why-matters-label { margin-bottom: 10px; color: var(--leaf); font: 10.5px/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.dr-why-matters-label { color: var(--cyan); }
.dr-takeaway p:last-child, .dr-why-matters p:last-child { margin-bottom: 0; color: var(--ink-dim); }
.dr-sources { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); color: var(--ink-dim); font: 12.5px/1.65 var(--mono); }
.dr-sources-label { margin-bottom: 14px; color: var(--pulse); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
.dr-sources ul { margin: 0 0 14px; padding: 0; list-style: none; }
.dr-sources li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.dr-sources li:last-child { border-bottom: 0; }
.dr-sources a, .dr-nav-back { color: var(--cyan); text-decoration-color: color-mix(in srgb, var(--cyan) 45%, transparent); text-underline-offset: .18em; }
.dr-sources a:hover, .dr-sources a:focus-visible, .dr-nav-back:hover, .dr-nav-back:focus-visible { color: var(--leaf); }
.dr-post-footer { margin-top: 48px; }
.dr-post-cta { margin-bottom: 24px; padding: 22px 24px; border: 1px solid var(--leaf-dim); background: color-mix(in srgb, var(--leaf) 7%, var(--bg-raised)); color: var(--ink-dim); font-size: 16px; }
.dr-post-nav { font: 12px/1.5 var(--mono); letter-spacing: .04em; }
.dr-post-health-performance a:focus-visible { outline: 2px solid var(--leaf); outline-offset: 4px; }

.dr-health-quiz { margin: 3rem auto 1rem; padding: clamp(1.4rem, 4vw, 2.75rem); border: 1px solid var(--leaf-dim); border-left: 4px solid var(--leaf); border-radius: 1.35rem; background: linear-gradient(145deg, var(--bg-raised), color-mix(in srgb, var(--leaf) 9%, var(--bg-raised))); box-shadow: 0 1.4rem 3.5rem rgba(23,55,46,.08); }
.dr-health-quiz__head h2 { margin: .35rem 0 .6rem; font: 600 clamp(1.75rem, 3.4vw, 2.6rem)/1.12 var(--serif); }
.dr-health-quiz__head p { max-width: 62ch; margin: 0; color: var(--ink-dim); }
.dr-health-quiz__status { display: flex; justify-content: space-between; gap: 1rem; margin: 1.5rem 0; padding: .7rem 1rem; border-block: 1px solid var(--line); color: var(--leaf); font: 500 .7rem/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.dr-health-quiz__question { margin-top: 1rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: 1rem; background: color-mix(in srgb, var(--bg-raised) 94%, var(--cyan) 6%); }
.dr-health-quiz__number { color: var(--leaf); font: 500 .65rem/1.5 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.dr-health-quiz__question h3 { margin: .45rem 0 1rem; font: 650 1.08rem/1.4 var(--body); }
.dr-health-quiz__answers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.dr-health-quiz__answers button, .dr-health-quiz__finish button { min-height: 3.25rem; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--bg-raised); color: var(--ink); font: 600 .88rem/1.35 var(--body); cursor: pointer; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.dr-health-quiz__answers button:hover:not(:disabled), .dr-health-quiz__answers button:focus-visible, .dr-health-quiz__finish button:hover, .dr-health-quiz__finish button:focus-visible { transform: translateY(-2px); border-color: var(--cyan); outline: 2px solid transparent; }
.dr-health-quiz__answers button.is-correct { border-color: var(--leaf); background: color-mix(in srgb, var(--leaf) 18%, var(--bg-raised)); }
.dr-health-quiz__answers button.is-wrong { border-color: var(--pulse); background: color-mix(in srgb, var(--pulse) 15%, var(--bg-raised)); }
.dr-health-quiz__answers button:disabled { cursor: default; opacity: .72; }.dr-health-quiz__answers button.is-correct:disabled, .dr-health-quiz__answers button.is-wrong:disabled { opacity: 1; }
.dr-health-quiz__feedback { min-height: 1.5em; margin: .75rem 0 0; color: var(--ink-dim); font-size: .88rem; }
.dr-health-quiz__finish { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; }.dr-health-quiz__finish p { margin: 0; color: var(--ink-dim); }.dr-health-quiz__finish button { border-color: var(--leaf); }

/* Keep the shared smooth mouse glow; remove the old yellow dot and ring. */
body.dr-cluster-health .dr-cursor-dot,
body.dr-cluster-health .dr-cursor-ring { display: none !important; }
body.dr-cluster-health .dr-cursor-glow {
  width: 38rem;
  height: 38rem;
  background: radial-gradient(circle, rgba(190,219,77,.15), rgba(21,158,153,.08) 34%, transparent 70%);
  mix-blend-mode: multiply;
}
html[data-theme="dark"] body.dr-cluster-health .dr-cursor-glow {
  background: radial-gradient(circle, rgba(119,214,164,.12), rgba(114,216,210,.055) 36%, transparent 70%);
  mix-blend-mode: screen;
}

@media (max-width: 600px) {
  .dr-post-health-performance { padding: 36px 18px 60px; font-size: 16.5px; }
  .dr-post-section h2 { font-size: 1.3rem; }
}

@media (max-width: 720px) {
  .dr-evidence-ladder, .dr-neuron-compare { grid-template-columns: 1fr; }
  .dr-system-map__flow { flex-direction: column; }.dr-system-map__arrow { transform: rotate(90deg); min-height: 1.25rem; }
  .dr-health-quiz__answers { grid-template-columns: 1fr; }
  .dr-health-quiz__finish { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  body.dr-cluster-health .dr-cursor-glow { display: none !important; }
  .dr-health-research-signal::before, .dr-health-research-signal::after { animation: none !important; }
  .dr-evidence-card, .dr-layer-card, .dr-neuron-card, .dr-system-map__node, .dr-health-quiz__answers button, .dr-health-quiz__finish button { transition: none !important; }
}
