.atlas-intro {
  max-width: var(--chapter-width);
  margin: clamp(2rem, 5vw, 4rem) auto 0;
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  border-top: 1px solid var(--rule-strong);
}
.atlas-intro > p:not(.section-kicker) { max-width: 80ch; color: var(--ink-soft); font-size: 1rem; line-height: 1.64; }
.atlas-anatomy { margin-top: 1.5rem; padding: 1.2rem 1.4rem; border-left: 3px solid var(--terracotta); background: color-mix(in srgb, var(--paper-deep) 50%, transparent); }
.atlas-anatomy > span { display: block; margin-bottom: 0.5rem; color: var(--terracotta-text); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.atlas-anatomy ol { margin: 0; padding-left: 1.3rem; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.55; }
.atlas-anatomy li { margin-bottom: 0.3rem; }

.atlas-class { max-width: var(--chapter-width); margin: clamp(3rem, 7vw, 5rem) auto 0; scroll-margin-top: 76px; }
.atlas-class-head { display: flex; gap: 0.6rem 2rem; align-items: baseline; flex-wrap: wrap; padding-bottom: 1rem; border-bottom: 1px solid var(--rule-strong); }
.atlas-class-label { color: var(--terracotta-text); font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 400; }
.atlas-class-head > div b { font-size: 0.86rem; }
.atlas-class-head > div p { margin: 0.2rem 0 0; max-width: 62ch; color: var(--ink-soft); font-size: 0.82rem; line-height: 1.5; }

.drug-card { border-bottom: 1px solid var(--rule); scroll-margin-top: 76px; }
.drug-card:first-of-type { border-top: 1px solid var(--rule); margin-top: 0.5rem; }
.drug-card > summary { display: grid; grid-template-columns: auto minmax(0, 0.95fr) minmax(0, 1.05fr) auto; gap: 1rem; align-items: center; min-height: 84px; padding: 0.7rem 0; cursor: pointer; list-style: none; }
.drug-card > summary::-webkit-details-marker { display: none; }
.drug-card > summary:hover .drug-summary-main b { color: var(--terracotta-text); }
.drug-card > summary:focus-visible { outline: 3px solid var(--terracotta-text); outline-offset: 3px; }
.drug-class-badge { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--rule-strong); color: var(--terracotta-text); font-size: 0.62rem; font-weight: 700; }
.drug-summary-main b { display: block; font-family: var(--serif); font-size: 1.25rem; font-weight: 400; }
.drug-summary-main small { display: block; margin-top: 0.15rem; color: var(--ink-faint); font-size: 0.7rem; }
.drug-tagline { color: var(--ink-soft); font-size: 0.82rem; font-style: italic; }
.drug-toggle { width: 1.8rem; height: 1.8rem; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: 50%; color: var(--terracotta-text); }
.drug-card[open] .drug-toggle { transform: rotate(45deg); }

.drug-body { display: grid; gap: 1rem; padding: 0.5rem 0 2.2rem; }
.drug-field > span { display: block; margin-bottom: 0.35rem; color: var(--terracotta-text); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.drug-field > p { margin: 0; max-width: 84ch; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.6; }
.drug-harm { padding: 1rem 1.15rem; border-left: 3px solid var(--danger); background: var(--danger-soft); }
.drug-harm > span { color: var(--danger); }
.drug-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border: 1px solid var(--rule); background: var(--rule); }
.drug-grid .drug-field { padding: 1.1rem 1.2rem; background: var(--paper); }
.drug-lenses { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; border: 1px solid var(--rule); background: var(--rule); }
.drug-lenses article { padding: 1.1rem; background: color-mix(in srgb, var(--paper-deep) 40%, transparent); }
.drug-lenses b { display: block; margin-bottom: 0.35rem; color: var(--terracotta-text); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.drug-lenses p { margin: 0; color: var(--ink-soft); font-size: 0.8rem; line-height: 1.5; }
.drug-foot { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.drug-foot span { display: block; margin-bottom: 0.3rem; color: var(--ink-faint); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.drug-foot p { margin: 0; color: var(--ink-soft); font-size: 0.82rem; line-height: 1.55; }
.drug-dosing { padding-left: 1.5rem; border-left: 1px solid var(--rule); }

@media (max-width: 820px) {
  .drug-card > summary { grid-template-columns: auto 1fr auto; }
  .drug-tagline { grid-column: 2 / -1; }
  .drug-grid, .drug-lenses, .drug-foot { grid-template-columns: 1fr; }
  .drug-dosing { padding-left: 0; border-left: 0; padding-top: 1rem; border-top: 1px solid var(--rule); }
}

@media print {
  .drug-toggle { display: none !important; }
  .drug-card:not([open]) > .drug-body { display: grid !important; }
  .drug-grid .drug-field, .drug-lenses article { background: #fff !important; }
  .drug-card, .atlas-class { break-inside: avoid; }
}

/* Decision drills — commit-then-reveal cards. Each drill is a form; committing unhides
   every option's own feedback (not just the chosen one) plus the shared explanation. */
.atlas-drills { max-width: none; }
.drill-score {
  display: inline-flex;
  align-items: center;
  margin-top: 1rem;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 600;
}
.drill-set { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
.drill {
  display: block;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--paper-deep) 36%, transparent);
}
.drill-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.drill-setting { color: var(--terracotta-text); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.drill-count { color: var(--ink-faint); font-size: 0.72rem; font-weight: 600; }
.drill h3 { margin: 0.6rem 0 0.5rem; font-family: var(--serif); font-size: 1.3rem; font-weight: 400; }
.drill-stem { max-width: 78ch; margin: 0; color: var(--ink-soft); font-size: 0.9rem; line-height: 1.6; }
.drill fieldset { display: grid; gap: 0.6rem; margin: 1rem 0; padding: 0; border: 0; }
.drill legend { margin-bottom: 0.4rem; font-size: 0.82rem; font-weight: 600; }
.drill-option { display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; align-items: start; padding: 0.75rem 0.85rem; border: 1px solid var(--rule); border-radius: 8px; color: var(--ink-soft); font-size: 0.88rem; line-height: 1.5; cursor: pointer; }
.drill-option:hover { border-color: var(--terracotta); }
.drill-option input { margin-top: 0.24rem; accent-color: var(--terracotta); }
.drill-option-fb { grid-column: 2; margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--rule); color: var(--ink-faint); font-size: 0.8rem; line-height: 1.5; }
.drill-option.is-answer { box-shadow: inset 3px 0 0 var(--moss); }
.drill-option.is-selected.is-answer { border-color: var(--moss); background: var(--moss-soft); }
.drill-option.is-wrong { border-color: var(--danger); background: var(--danger-soft); }
.drill-actions { margin-top: 0.4rem; }
.drill-explain { margin-top: 1rem; padding: 1rem 1.1rem; border-left: 3px solid var(--terracotta); background: var(--paper); font-size: 0.9rem; }
.drill-explain p { margin: 0; color: var(--ink-soft); }

/* Assessment — mirrors .assessment-item's grid, but every option carries its own
   hidden feedback and each item exposes a single rationale block once scored. */
.atlas-assessment { display: grid; gap: 1rem; }
.atlas-q { display: grid; grid-template-columns: 70px 1fr; gap: 1.5rem; padding: clamp(1.2rem, 3vw, 2rem); border: 1px solid var(--rule); border-radius: var(--radius); background: color-mix(in srgb, var(--paper-deep) 36%, transparent); }
.atlas-q.is-correct { border-color: color-mix(in srgb, var(--moss) 55%, var(--rule)); }
.atlas-q.is-incorrect { border-color: color-mix(in srgb, var(--danger) 55%, var(--rule)); }
.atlas-q-num { color: var(--ink-faint); font-family: var(--serif); font-size: 1.5rem; }
.atlas-q-body fieldset { display: grid; gap: 0.6rem; margin: 0; padding: 0; border: 0; }
.atlas-q-body legend { margin-bottom: 1rem; font-family: var(--serif); font-size: 1.3rem; line-height: 1.35; }
.atlas-q-option { display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; align-items: start; padding: 0.72rem 0.8rem; border: 1px solid var(--rule); border-radius: 8px; color: var(--ink-soft); font-size: 0.9rem; line-height: 1.5; cursor: pointer; }
.atlas-q-option:hover { border-color: var(--terracotta); }
.atlas-q-option input { margin-top: 0.24rem; accent-color: var(--terracotta); }
.atlas-q-fb { grid-column: 2; margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--rule); color: var(--ink-faint); font-size: 0.82rem; line-height: 1.5; }
.atlas-q-option.is-answer { box-shadow: inset 3px 0 0 var(--moss); }
.atlas-q-option.is-selected.is-answer { border-color: var(--moss); background: var(--moss-soft); }
.atlas-q-option.is-wrong { border-color: var(--danger); background: var(--danger-soft); }
.atlas-q-rationale { margin-top: 1rem; padding: 1rem 1.1rem; border-left: 3px solid var(--terracotta); background: var(--paper); font-size: 0.9rem; }
.atlas-q-rationale p { margin: 0; color: var(--ink-soft); }
.atlas-assessment-submit { display: flex; justify-content: space-between; align-items: center; gap: 2rem; margin-top: 1rem; padding: 1.4rem; border-top: 1px solid var(--rule-strong); }
.atlas-assessment-submit span { display: block; color: var(--ink-faint); font-size: 0.65rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.atlas-assessment-submit strong { display: block; font-family: var(--serif); font-size: 1.6rem; font-weight: 400; }

@media (max-width: 760px) {
  .atlas-q { grid-template-columns: 1fr; gap: 0.6rem; }
  .atlas-assessment-submit { flex-direction: column; align-items: flex-start; }
  .drill-head { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
}

@media print {
  .drill-score, .drill-actions, .atlas-assessment-submit { display: none !important; }
  .drill-option-fb[hidden], .drill-explain[hidden], .atlas-q-fb[hidden], .atlas-q-rationale[hidden] { display: block !important; }
  .drill, .atlas-q { break-inside: avoid; }
}

/* Use-dependence figure — one kinetic idea (Ic climbs with rate, III climbs as
   rate falls) drawn as two crossing curves. Colors ride the brand tokens, so
   light/dark and print follow automatically. The SVG carries the shape; the
   clinical consequences live in themeable HTML beside it. */
.atlas-usedep { max-width: var(--chapter-width); margin: clamp(3rem, 7vw, 5rem) auto 0; }
.usedep-fig { margin: 0; padding: clamp(1.4rem, 4vw, 2.6rem); border: 1px solid var(--rule-strong); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--paper-deep) 45%, transparent); }
.usedep-caption { max-width: 74ch; }
.usedep-caption h2 { margin: 0.3rem 0 0.7rem; font-family: var(--serif); font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 400; line-height: 1.12; }
.usedep-caption > p:not(.section-kicker) { margin: 0; color: var(--ink-soft); font-size: 0.98rem; line-height: 1.62; }

.usedep-plot { margin: 1.6rem 0 0.4rem; }
.usedep-plot svg { display: block; width: 100%; height: auto; max-width: 720px; margin: 0 auto; }
.usedep-plot text { font-family: var(--sans); }
.usedep-axis { stroke: var(--rule-strong); stroke-width: 1.5; fill: none; }
.usedep-axis-fill { fill: var(--rule-strong); }
.usedep-curve { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.usedep-ic { stroke: var(--terracotta-text); }
.usedep-iii { stroke: var(--purple); }
.usedep-ic-fill { fill: var(--terracotta-text); }
.usedep-iii-fill { fill: var(--purple); }
.usedep-dot { stroke: none; }
.usedep-cross { fill: var(--paper); stroke: var(--ink-soft); stroke-width: 1.5; }
.usedep-connector { stroke: var(--rule-strong); stroke-width: 1; }
.usedep-axislabel { fill: var(--ink-faint); font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.usedep-yaxis { letter-spacing: 0.13em; }
.usedep-curvelabel { font-size: 15px; font-weight: 600; }
.usedep-curvesub { font-size: 11.5px; letter-spacing: 0.01em; }

.usedep-legend { margin: 1.2rem 0 0; padding: 1.1rem 0 0; border-top: 1px solid var(--rule); list-style: none; display: grid; gap: 0.55rem; }
.usedep-legend li { display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; align-items: start; color: var(--ink-soft); font-size: 0.86rem; line-height: 1.5; }
.usedep-legend li b { color: var(--ink); }
.usedep-swatch { width: 1.5rem; height: 0.28rem; margin-top: 0.5rem; border-radius: 2px; }
.usedep-swatch-ic { background: var(--terracotta-text); }
.usedep-swatch-iii { background: var(--purple); }
.usedep-legend-note { grid-template-columns: 1fr; color: var(--ink-faint); font-size: 0.8rem; font-style: italic; }

.usedep-ends { margin-top: 1.4rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.usedep-end { padding: 1rem 1.15rem; border-radius: var(--radius-sm); background: var(--paper); }
.usedep-end b { display: block; margin-bottom: 0.35rem; font-size: 0.92rem; }
.usedep-end p { margin: 0; color: var(--ink-soft); font-size: 0.85rem; line-height: 1.55; }
.usedep-end-fast { border-left: 3px solid var(--terracotta-text); }
.usedep-end-fast b { color: var(--terracotta-text); }
.usedep-end-slow { border-left: 3px solid var(--purple); }
.usedep-end-slow b { color: var(--purple); }

.usedep-detail { margin-top: 1.3rem; border-top: 1px solid var(--rule); }
.usedep-detail > summary { padding: 0.95rem 0 0; color: var(--terracotta-text); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; }
.usedep-detail > summary:focus-visible { outline: 3px solid var(--terracotta-text); outline-offset: 3px; }
.usedep-detail > div { padding-top: 0.6rem; }
.usedep-detail p { margin: 0.7rem 0 0; max-width: 82ch; color: var(--ink-soft); font-size: 0.9rem; line-height: 1.6; }
.usedep-detail p b { color: var(--ink); }
.usedep-boundary { color: var(--ink-faint) !important; font-size: 0.82rem !important; font-style: italic; }

@media (max-width: 640px) {
  .usedep-ends { grid-template-columns: 1fr; }
}

@media print {
  .usedep-fig { break-inside: avoid; border-color: var(--rule-strong); }
  .usedep-detail > div { display: block !important; }
  .usedep-detail > summary { list-style: none; }
}
