@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500&family=Space+Mono:wght@400;700&display=swap');
* { box-sizing: border-box; margin: 0; padding: 0; }
.outer { background: #ffffff; border: 1px solid #d9d8d0; border-radius: 16px; padding: 2rem; font-family: 'DM Sans', sans-serif; }
.header { display: flex; align-items: center; gap: 14px; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid #e8e7e0; }
/* Header brand: bare logo (max-height scales proportional sticker artwork) */
.rx-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.rx-badge img {
  display: block;
  height: auto;
  width: auto;
  max-height: 60px; /* ~20% larger than prior 50px cap */
}
/* Right header: bare image like .rx-badge; 20% shorter cap than PedSMARxT (60px → 48px) */
.header-affiliate-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
}
.header-affiliate-logo img {
  display: block;
  height: auto;
  width: auto;
  max-height: 48px;
}
.header-title { font-family: 'Space Mono', monospace; font-size: 16px; font-weight: 700; color: #1a1a18; letter-spacing: 0.03em; }
.section-block + .section-block { margin-top: 1.5rem; }
/* Partials: #disease-* top margins live in styles/diseases.css (not adjacent .section-block siblings) */
.section-title { font-family: 'Space Mono', monospace; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: #1a1a18; margin-bottom: 0.75rem; padding-bottom: 0.5rem; border-bottom: 1px solid #e8e7e0; }
.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e8e7e0;
}
.section-title-row .section-title {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.section-review-note {
  flex-shrink: 0;
  margin-left: auto;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #a32d2d;
}
.section-title--review { color: #a32d2d; }
/* Per-disease .section-title margins + .card { overflow: visible } — styles/diseases.css */
.divider-dashed { height: 0; border: none; border-top: 1px dashed #c4c2ba; margin: 6px 0 4px; background: none; }
.np-pill-group { display: flex; flex-wrap: wrap; align-content: flex-start; align-items: flex-start; gap: 5px 6px; }
.np-pill {
  display: inline-flex; flex-direction: column; align-items: flex-start; align-self: flex-start;
  width: max-content; max-width: 100%;
  font-family: 'Space Mono', monospace; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 4px; border: 1px solid;
  cursor: pointer; position: relative; transition: box-shadow 0.2s ease; vertical-align: top;
}
.np-pill.is-open { z-index: 4; box-shadow: 0 4px 14px rgba(0,0,0,0.1); }
.np-pill-name { line-height: 1.2; white-space: nowrap; }
/* Combination "+" between pills — outside .np-pill borders so it stays visible when doses are collapsed */
.np-pill-join {
  align-self: center;
  flex-shrink: 0;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #6e6e68;
  line-height: 1;
  user-select: none;
  padding: 0 2px;
}
.np-pill-dose-clip {
  min-width: 0; max-width: 0; max-height: 0; overflow: hidden;
  align-self: flex-start;
  transition: max-width 0.25s ease, max-height 0.25s ease;
}
.np-pill.is-open .np-pill-dose-clip {
  max-width: min(18rem, 100vw);
  max-height: 6rem;
  overflow-y: auto;
}
.np-pill-dose {
  display: block; width: 100%;
  font-family: 'DM Sans', sans-serif; font-size: 9px; font-weight: 500; line-height: 1.4; color: #3d3d38;
  margin: 0; white-space: normal; word-wrap: break-word;
}
.np-pill.is-open .np-pill-dose { margin-top: 2px; }
.np-pill.np-teal { background: #E1F5EE; color: #085041; border-color: #5DCAA5; }
.np-pill.np-amber { background: #FAEEDA; color: #633806; border-color: #EF9F27; }
.np-pill.np-red { background: #FCEBEB; color: #791F1F; border-color: #F09595; }
.np-pill.np-blue { background: #E6F1FB; color: #0C447C; border-color: #85B7EB; }
.np-pill.np-gray { background: #F1EFE8; color: #444441; border-color: #B4B2A9; }
/* Necrotizing/toxin definitive rows: Clostridium (yellow) + GAS (orange); dark text on soft fills for contrast */
.np-pill.np-yellow { background: #FEFCE8; color: #5A4A08; border-color: #CA9A06; }
.np-pill.np-orange { background: #FFEDD5; color: #7C2D12; border-color: #E85D1A; }
/* minmax(0,1fr) + .grid > .card min-width: 0 — grid items default min-width:auto lets nowrap titles inflate tracks */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.grid > .card { min-width: 0; }
/* Dual-column grids + PO column align + card-head min-height bands — styles/diseases.css */
.card { background: #f9f8f4; border: 1px solid #e8e7e0; border-radius: 10px; overflow: hidden; }
.card-head { padding: 10px 14px 9px; border-bottom: 1px solid #e8e7e0; }
.sev-label { font-family: 'Space Mono', monospace; font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 2px; }
/* Shared max — index.html fitSevName() resets to this via computed font-size */
.sev-name {
  --sev-name-font-max: 17px;
  font-family: 'Space Mono', monospace;
  font-size: var(--sev-name-font-max);
  font-weight: 700;
}
/* Long pathway titles — initSevNameFit scales; Table 5 (--sev-name-font-max tweak) in styles/diseases.css */
.sev-name-wrap {
  min-width: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 1.18;
  letter-spacing: 0.01em;
}
.mild .card-head { background: #E1F5EE; border-bottom-color: #5DCAA5; }
.mild .sev-label { color: #0F6E56; }
.mild .sev-name { color: #085041; }
.mod .card-head { background: #FAEEDA; border-bottom-color: #EF9F27; }
.mod .sev-label { color: #854F0B; }
.mod .sev-name { color: #633806; }
.sev .card-head { background: #FCEBEB; border-bottom-color: #E24B4A; }
.sev .sev-label { color: #A32D2D; }
.sev .sev-name { color: #791F1F; }
.card-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
/* In-card subsection titles — sized to scan like .table-jump-hdr (diseases.css); was 9px gray */
.sec-label { font-family: 'Space Mono', monospace; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #11110f; margin-bottom: 5px; }
.sec-label span { font-family: 'DM Sans', sans-serif; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 12px; }
.check-row { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.check-row:last-child { margin-bottom: 0; }
.dot { width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dot-yes { background: #E1F5EE; border: 1px solid #5DCAA5; }
.dot-no { background: #FCEBEB; border: 1px solid #F09595; }
.check-text { font-size: 13px; color: #1a1a18; line-height: 1.3; }
.check-sub { color: #888780; font-size: 11px; }
.divider { height: 1px; background: #e8e7e0; }
.pill { display: inline-flex; align-items: center; font-family: 'Space Mono', monospace; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 4px; margin: 2px 3px 0 0; }
.p-teal { background: #E1F5EE; color: #085041; border: 1px solid #5DCAA5; }
.p-red { background: #FCEBEB; color: #791F1F; border: 1px solid #F09595; }
.p-blue { background: #E6F1FB; color: #0C447C; border: 1px solid #85B7EB; }
.p-gray { background: #F1EFE8; color: #444441; border: 1px solid #B4B2A9; }
.p-yellow { background: #FEFCE8; color: #5A4A08; border: 1px solid #CA9A06; }
.p-orange { background: #FFEDD5; color: #7C2D12; border: 1px solid #E85D1A; }
.italic-note { font-size: 11px; color: #888780; font-style: italic; margin-top: 4px; line-height: 1.5; }
/* .table-jump-* + .sheet-anchor — styles/diseases.css (non-purulent + bites-pyomyositis) */
.org-row { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
.org-row:last-child { margin-bottom: 0; }
/* Dropped unused .org-drug / .step-drugs; org rows use .pill / .np-pill (.step-card retired with purulent step-down markup) */
/* Native disclosure: collapsible blocks inside severity cards — opt-in via .card-disclosure */
.card-disclosure { border-radius: 0; }
.card-disclosure + .divider { flex-shrink: 0; }
/* Whole Procedures block collapsible — summary = label + peek rows; body = remainder */
.procedure-block-disclosure > .card-disclosure__summary > .sec-label:first-child {
  margin-bottom: 5px;
}
.procedure-block-disclosure > .card-disclosure__body {
  padding-left: 14px;
}
/* Orbital IV therapy — label + preview; NTM empirical reuses orbital body stacking via .orbital-therapy-disclosure + .ntm-empirical-disclosure peek */
.orbital-therapy-disclosure > .card-disclosure__summary > .sec-label:first-child {
  margin-bottom: 5px;
}
/* Pathway stacks + dashed dividers: body gap trims vertical band between orbital subsections */
.orbital-therapy-disclosure > .card-disclosure__body {
  padding-left: 14px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-top: 10px;
  padding-top: 6px;
}
/* Subsections only (.divider-dashed siblings stay single-line separators, not nested flex columns) */
.orbital-therapy-disclosure > .card-disclosure__body > div:not(.divider-dashed) {
  display: flex;
  flex-direction: column;
  align-self: flex-start;
  width: 100%;
  gap: 7px;
}
.orbital-therapy-disclosure > .card-disclosure__body > div:not(.divider-dashed) > .sec-label:first-child {
  margin-bottom: 6px;
}
.orbital-therapy-disclosure > .card-disclosure__body .check-row {
  margin-bottom: 0;
}
/* Extra margin-bottom so sec-label sits below dashed line (divider → title breathing room) */
.orbital-therapy-disclosure > .card-disclosure__body .divider-dashed {
  margin: 4px 0 14px;
}
/* italic footers under pills: subsection row-gap owns spacing vs .italic-note margin stacking */
.orbital-therapy-disclosure .orbital-therapy-footnote {
  margin-top: 0;
  margin-bottom: 0;
  line-height: 1.55;
}
/* .ntm-empirical-disclosure summary gap — styles/diseases.css */
.card-disclosure__summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 0 0 14px;
  position: relative;
  outline: none;
}
.card-disclosure__summary::-webkit-details-marker { display: none; }
.card-disclosure__summary::marker { content: ''; }
.card-disclosure__summary::before {
  content: '';
  position: absolute;
  left: 0;
  /* Nudge with taller .sec-label (12px vs 9px) */
  top: 0.32rem;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #888780;
  transform-origin: center 42%;
  transition: transform 0.15s ease;
  transform: rotate(-90deg);
}
.card-disclosure[open] > .card-disclosure__summary::before {
  transform: rotate(0deg);
  top: 0.46rem;
}
.card-disclosure__summary:hover .sec-label { color: #3d3d38; }
.card-disclosure__summary:focus-visible {
  outline: 2px solid #5DCAA5;
  outline-offset: 3px;
  border-radius: 4px;
}
.card-disclosure .sec-label { margin-bottom: 0; }
.card-disclosure__preview {
  margin-top: 0;
  margin-bottom: 0;
}
/* Preview = collapsed-only cue; hide while open so summary isn’t redundant with body */
.card-disclosure[open] > .card-disclosure__summary .card-disclosure__preview {
  display: none;
}
.card-disclosure__body {
  margin-top: 8px;
  padding-top: 2px;
}
@media print {
  .card-disclosure summary { break-inside: avoid; page-break-inside: avoid; }
  .card-disclosure summary::before { display: none; }
  /* Dual-column disease grids → 1 col: styles/diseases.css */
  /* .sev-name-wrap remeasured in beforeprint so titles refit to print column width */
  /* .sheet-jump hidden in print — styles/sheet-jump.css */
}

.footer { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #e8e7e0; display: flex; align-items: center; justify-content: space-between; }
.footer-tag { font-family: 'Space Mono', monospace; font-size: 10px; color: #b4b2a9; letter-spacing: 0.06em; }

/* In-sheet #hash targets: offset above title if a sticky header is added later */
#ntm-section-title,
[id^="section-"] {
  scroll-margin-top: 1.25rem;
}
