/* Myoepithelial carcinoma: a reference.
   Set like a printed report: paper and ink, a serif text face, rules instead
   of boxes, one accent colour, and nothing that moves. System fonts only. */

:root {
  color-scheme: light;
  --paper: #fbfaf6;
  --paper-2: #f2f0e9;
  --ink: #1c1b19;
  --ink-2: #47443e;
  --ink-3: #736e65;
  --rule: #d9d4c9;
  --accent: #0e4a5b;
  --on-accent: #ffffff;
  --link: #0e4a5b;
  --died: #6f6a61;
  --s1: #0e4a5b;
  --s2: #a8611f;
  --s3: #6f6a61;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 20px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--serif); font-size: 18px; line-height: 1.62;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
p { margin: 0 0 1.05em; }
strong { font-weight: 700; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.2; margin: 0; }
.data-table th, .quick dt, .toc h2, .kicker, .compare-col, .family dt, .calm-when, .filter-label, .coverage-tag, .ety-label, .pill {
  font-family: var(--sans); font-size: 12.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); font-weight: 600;
}
.page { max-width: 1140px; margin: 0 auto; padding: 0 28px; }

/* masthead */
.masthead { border-bottom: 1px solid var(--ink); }
.masthead .page { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding-top: 12px; padding-bottom: 10px; }
.site-name { font-family: var(--sans); font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: 0.01em; }
.site-nav { display: flex; gap: 20px; flex-wrap: wrap; font-family: var(--sans); font-size: 14px; }
.site-nav a { color: var(--ink-2); text-decoration: none; }
.site-nav a:hover { color: var(--ink); text-decoration: underline; }

/* title block */
.title-block { padding: 46px 0 30px; max-width: 50rem; }
.kicker { margin: 0 0 12px; }
.title-block h1 { font-size: clamp(38px, 6vw, 62px); letter-spacing: -0.015em; line-height: 1.04; }
.standfirst { font-size: 21px; line-height: 1.5; color: var(--ink-2); margin: 20px 0 16px; }
.standfirst strong { color: var(--ink); font-weight: 400; }
.start { font-size: 17px; margin: 0 0 14px; }
.meta-line { font-family: var(--sans); font-size: 13.5px; color: var(--ink-3); margin: 0; }
.open-note { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rule); color: var(--ink-2); line-height: 1.5; }
.open-note strong { color: var(--ink); }

/* two columns: contents and text */
.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; align-items: start; border-top: 1px solid var(--rule); padding-top: 28px; }
.sidebar { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding-bottom: 20px; }
.toc h2 { margin: 0 0 8px; }
.toc ol { list-style: none; counter-reset: toc; margin: 0; padding: 0; font-family: var(--sans); font-size: 14px; line-height: 1.35; }
.toc li { counter-increment: toc; margin: 0; }
.toc a { display: grid; grid-template-columns: 24px 1fr; padding: 4px 0; color: var(--ink-2); text-decoration: none; }
.toc a::before { content: counter(toc); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.toc a.current { color: var(--ink); font-weight: 700; }
.toc-details { display: none; }
.content { max-width: 46rem; min-width: 0; }

/* sections */
.section { padding: 0 0 12px; margin-top: 60px; border-top: 1px solid var(--ink); }
.section.quick { margin-top: 0; border-top: 0; }
.section-heading { font-size: clamp(27px, 3.4vw, 34px); padding-top: 14px; margin-bottom: 18px; letter-spacing: -0.005em; }
.sec-num { color: var(--ink-3); margin-right: 0.5em; font-variant-numeric: tabular-nums; }
.sub-heading { font-size: 22px; font-weight: 700; margin: 34px 0 10px; }
.deck { font-size: 21px; line-height: 1.45; font-style: italic; color: var(--ink-2); margin: -4px 0 20px; }
.byline { font-family: var(--sans); font-size: 14px; color: var(--ink-3); margin: -8px 0 18px; }
.chart-note, .fineprint { font-family: var(--sans); font-size: 13.5px; line-height: 1.5; color: var(--ink-3); }
.plain-list { padding-left: 1.15em; margin: 0 0 1.05em; }
.plain-list li { margin-bottom: 0.5em; }
.callout { border-left: 2px solid var(--ink); padding: 2px 0 2px 18px; margin: 22px 0; font-size: 17px; color: var(--ink-2); }
.callout strong { color: var(--ink); }

/* key facts */
.quick h2 { font-family: var(--sans); font-size: 12.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin: 0 0 6px; }
.quick dl { margin: 0; border-top: 2px solid var(--ink); }
.quick dt { padding: 12px 0 0; }
.quick dd { margin: 0; padding: 2px 0 12px; border-bottom: 1px solid var(--rule); font-size: 17px; line-height: 1.5; }
@media (min-width: 640px) {
  .quick dl { display: grid; grid-template-columns: 150px 1fr; }
  .quick dt { padding: 13px 16px 12px 0; border-bottom: 1px solid var(--rule); }
  .quick dd { padding: 10px 0 12px; }
}

/* figures in a row */
.stat-row, .stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); margin: 8px 0 24px; }
.stat-card, .stat { padding: 14px 16px 14px 0; display: flex; flex-direction: column; gap: 4px; }
.stat-card + .stat-card, .stat + .stat { padding-left: 16px; border-left: 1px solid var(--rule); }
.stat-num { font-family: var(--serif); font-size: 34px; line-height: 1.05; letter-spacing: -0.01em; }
.stat-label { font-family: var(--sans); font-size: 13px; line-height: 1.4; color: var(--ink-3); }
.stats-grid .stat:nth-child(n+5) { border-top: 1px solid var(--rule); }
.stats-grid .stat:nth-child(5) { padding-left: 0; border-left: 0; }

/* word parts */
.etymology { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 14px; margin: 26px 0 8px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 14px 0; }
.ety-frag { font-size: 24px; font-style: italic; }
.ety-label { margin: 0 0 4px; }
.ety-meaning { font-size: 15px; color: var(--ink-2); line-height: 1.45; }
.ety-plus { align-self: center; color: var(--ink-3); }

/* tables */
.table-wrap { overflow-x: auto; margin: 10px 0 24px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.45; min-width: 480px; border-top: 2px solid var(--ink); }
.data-table th { text-align: left; padding: 8px 14px 7px 0; border-bottom: 1px solid var(--ink); vertical-align: bottom; }
.data-table td { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.data-table td:last-child, .data-table th:last-child { padding-right: 0; }
.data-table .num { font-family: var(--sans); font-size: 14.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill { font-size: 11.5px; white-space: nowrap; }
.pill.live { color: var(--ink); }
.pill.live::before { content: "● "; color: var(--accent); }

.cta-box { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 20px 0; }
.cta-box h3 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }

/* links that act as buttons */
.btn { display: inline-block; font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--ink); border: 1px solid var(--ink); padding: 7px 14px; text-decoration: none; background: transparent; cursor: pointer; }
.btn:hover, .btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 6px; }

/* bar lists */
.bars { margin: 12px 0 24px; display: grid; gap: 7px; font-family: var(--sans); }
.bar-row { display: grid; grid-template-columns: 190px 1fr 56px; align-items: center; gap: 12px; font-size: 14px; }
.bars.wide .bar-row { grid-template-columns: 320px 1fr 56px; }
.bar-label { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 11px; border-left: 1px solid var(--ink-3); }
.bar-fill { height: 100%; background: var(--accent); border-radius: 0 2px 2px 0; min-width: 2px; }
.bar-row:hover .bar-label { color: var(--ink); }
.bar-count { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }

/* parts of a whole */
.segbar { display: flex; gap: 2px; height: 26px; margin: 12px 0 8px; font-family: var(--sans); }
.seg-part { color: #fff; font-size: 12px; font-weight: 600; padding: 0 8px; display: flex; align-items: center; overflow: hidden; white-space: nowrap; min-width: 0; border-radius: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; font-family: var(--sans); font-size: 13px; color: var(--ink-2); margin-bottom: 14px; }
.legend .key { display: inline-block; width: 10px; height: 10px; margin-right: 7px; border-radius: 2px; }

/* papers per year */
.chart { margin: 8px 0 6px; position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .gridline { stroke: var(--rule); stroke-width: 1; }
.chart .axis { stroke: var(--ink-3); stroke-width: 1; }
.chart .tick { fill: var(--ink-3); font-size: 11px; font-family: var(--sans); font-variant-numeric: tabular-nums; }
.chart .col { fill: var(--accent); }
.chart .col.partial { opacity: 0.4; }
.chart .hit { fill: transparent; }
.chart .hit:hover + .col { fill: var(--ink); }
.chart .dlabel { fill: var(--ink); font-size: 11px; font-weight: 600; font-family: var(--sans); }
.tooltip { position: absolute; pointer-events: none; background: var(--ink); color: var(--paper); font-family: var(--sans); padding: 4px 8px; font-size: 12px; white-space: nowrap; transform: translate(-50%, -115%); opacity: 0; z-index: 5; }
.tooltip.on { opacity: 1; }
details.table-view { margin: 4px 0 22px; font-family: var(--sans); font-size: 13px; color: var(--ink-3); }
details.table-view summary { cursor: pointer; }
details.table-view .data-table { min-width: 0; margin-top: 8px; font-size: 14px; }

.coverage { margin: 12px 0 22px; }
.coverage-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.coverage-num { font-size: 34px; line-height: 1.15; }
.coverage-num .denom { font-family: var(--sans); font-size: 14px; color: var(--ink-3); }
.coverage-pct { font-size: 34px; }

/* timeline: year in the margin */
.tl-legend { display: none; }
.timeline { margin: 12px 0 22px; border-top: 2px solid var(--ink); }
.tl-item { display: grid; grid-template-columns: 76px 1fr; column-gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.tl-year { grid-row: 1 / span 2; font-family: var(--sans); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); padding-top: 3px; }
.tl-title { font-weight: 700; font-size: 18px; line-height: 1.35; }
.tl-desc { font-size: 16.5px; color: var(--ink-2); }

/* ranked list */
.rankings { margin: 12px 0 22px; border-top: 2px solid var(--ink); }
.rank { display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.rank-pos { font-family: var(--sans); font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rank-name { font-size: 17px; line-height: 1.4; }
.rank-detail { font-family: var(--sans); font-size: 13px; color: var(--ink-3); }
.rank-metric { font-family: var(--sans); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.rank-metric small { font-weight: 400; color: var(--ink-3); margin-left: 5px; font-size: 12px; }

.faq-item { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.faq-item:first-child { border-top: 2px solid var(--ink); }
.faq-item h3 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.faq-item p { margin: 0; font-size: 17px; }

.glossary { margin: 10px 0 22px; border-top: 2px solid var(--ink); }
.glossary dt { font-weight: 700; padding-top: 10px; }
.glossary dd { margin: 0; padding: 0 0 10px; border-bottom: 1px solid var(--rule); font-size: 17px; color: var(--ink-2); }
@media (min-width: 640px) {
  .glossary { display: grid; grid-template-columns: 210px 1fr; }
  .glossary dt { padding: 10px 16px 10px 0; border-bottom: 1px solid var(--rule); }
  .glossary dd { padding: 10px 0; }
}

/* references */
.fn { font-family: var(--sans); font-size: 0.62em; line-height: 0; margin-left: 1px; }
.fn a { text-decoration: none; padding: 0 1px; }
.fn a:hover { text-decoration: underline; }
.references ol { padding-left: 1.6em; font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.references li { margin-bottom: 8px; }
.references li:target { background: var(--paper-2); outline: 6px solid var(--paper-2); }
.ref-back { margin-left: 6px; text-decoration: none; }

/* told and found */
.compare { margin: 24px 0; border-top: 2px solid var(--ink); }
.compare-row { display: grid; grid-template-columns: 120px 1fr 1fr; column-gap: 20px; border-bottom: 1px solid var(--rule); }
.compare-head { border-bottom: 1px solid var(--ink); }
.compare-col { padding: 8px 0 7px; }
.compare-topic { padding: 14px 0; font-weight: 700; }
.compare-cell { padding: 14px 0; font-size: 17px; line-height: 1.5; }
.compare-cell.then { font-style: italic; color: var(--ink-3); }

/* first-steps guide */
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); margin: 8px 0 14px; }
.step3 { padding: 14px 18px 12px 0; }
.step3 + .step3 { padding-left: 18px; border-left: 1px solid var(--rule); }
.step3-n { font-size: 30px; line-height: 1; color: var(--ink-3); margin-bottom: 8px; }
.step3-t { font-weight: 700; font-size: 19px; line-height: 1.3; margin-bottom: 6px; }
.step3 p { font-size: 16px; line-height: 1.5; margin: 0; color: var(--ink-2); }

.plan { list-style: none; counter-reset: plan; margin: 12px 0 24px; padding: 0; border-top: 2px solid var(--ink); }
.plan li { counter-increment: plan; display: grid; grid-template-columns: 44px 1fr; padding: 13px 0; border-bottom: 1px solid var(--rule); }
.plan li::before { content: counter(plan); grid-row: 1 / span 2; font-size: 30px; line-height: 1.05; color: var(--ink-3); }
.plan-t { font-weight: 700; font-size: 19px; line-height: 1.3; }
.plan-d { font-size: 17px; color: var(--ink-2); margin-top: 3px; }

.checklist { list-style: none; padding: 8px 0 0; margin: 10px 0 24px; columns: 2; column-gap: 36px; border-top: 2px solid var(--ink); }
.checklist li { position: relative; padding: 6px 0 6px 30px; font-size: 17px; line-height: 1.4; break-inside: avoid; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 10px; width: 14px; height: 14px; border: 1.5px solid var(--ink-2); }

.calm { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); margin: 10px 0 20px; }
.calm-item { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; }
.calm-arrow { display: none; }
.calm-do { font-size: 20px; font-style: italic; }

/* benign to malignant */
.spectrum { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 14px; margin: 22px 0; }
.spec-card { border-top: 2px solid var(--ink); padding-top: 10px; }
.spec-card.malignant { border-top-width: 5px; padding-top: 7px; }
.spec-name { font-weight: 700; font-size: 19px; line-height: 1.25; margin: 4px 0 6px; }
.spec-card p { font-size: 16px; line-height: 1.5; margin: 0; color: var(--ink-2); }
.spectrum-arrow { align-self: center; color: var(--ink-3); font-family: var(--sans); }

.families { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin: 18px 0 22px; }
.family { border-top: 2px solid var(--ink); padding-top: 10px; }
.family-name { font-weight: 700; font-size: 20px; margin-bottom: 8px; }
.family dl { margin: 0 0 10px; }
.family dt { margin-top: 8px; }
.family dd { margin: 0; font-size: 16px; line-height: 1.45; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 5px 6px; align-items: center; }
.chips .filter-label { margin-right: 4px; }
.chip { font-family: var(--sans); font-size: 12.5px; font-weight: 600; border: 1px solid var(--rule); padding: 1px 6px; }

/* survival as 100 people */
.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin: 12px 0 10px; border-top: 2px solid var(--ink); padding-top: 18px; }
.people-fig { margin: 0; }
.people-fig svg { display: block; width: 100%; max-width: 180px; height: auto; margin: 0 0 12px; }
.people-fig circle.on { fill: var(--accent); }
.people-fig circle.off { fill: none; stroke: var(--ink-3); stroke-width: 1.2; }
.people-fig figcaption { font-family: var(--sans); font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.people-fig figcaption strong { display: block; font-family: var(--serif); font-size: 26px; font-weight: 400; color: var(--ink); }
.people-fig figcaption span { display: block; font-size: 12.5px; color: var(--ink-3); }
.legend .key.dot-on { background: var(--accent); border-radius: 50%; }
.legend .key.dot-off { background: transparent; border: 1.2px solid var(--ink-3); border-radius: 50%; }

.series { display: grid; gap: 12px; margin: 6px 0 22px; font-family: var(--sans); }
.series-row { display: grid; grid-template-columns: 230px 1fr; gap: 14px; align-items: center; }
.series-name { font-size: 14px; font-weight: 600; line-height: 1.35; }
.series-name small { display: block; font-size: 12.5px; color: var(--ink-3); font-weight: 400; }
.series-bar { display: flex; gap: 2px; height: 26px; }
.series-died, .series-alive { display: flex; align-items: center; padding: 0 8px; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; min-width: 44px; border-radius: 2px; }
.series-died { background: var(--died); color: #fff; }
.series-alive { background: var(--accent); color: var(--on-accent); }

/* directory page */
.dir-controls { position: sticky; top: 0; z-index: 20; background: var(--paper); padding: 12px 0 10px; border-bottom: 1px solid var(--ink); font-family: var(--sans); }
.dir-search { width: 100%; background: var(--paper); border: 1px solid var(--ink-2); color: var(--ink); font-size: 16px; padding: 9px 12px; font-family: var(--sans); border-radius: 0; }
.filter-row { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 9px; align-items: center; }
.filter-label { margin-right: 6px; }
.filter-btn { background: transparent; border: 1px solid var(--rule); color: var(--ink-2); padding: 3px 9px; font-size: 13px; cursor: pointer; font-family: var(--sans); text-decoration: none; border-radius: 0; }
.filter-btn:hover { border-color: var(--ink); color: var(--ink); }
.filter-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.dir-count { font-size: 13px; color: var(--ink-3); margin: 9px 0 0; }
.year-group h2 { font-size: 26px; margin: 34px 0 6px; padding-top: 10px; border-top: 1px solid var(--ink); display: flex; align-items: baseline; gap: 12px; }
.year-group h2 small { font-family: var(--sans); font-size: 12.5px; color: var(--ink-3); }
.paper { padding: 8px 0; border-bottom: 1px solid var(--rule); }
.paper-title { font-size: 17px; line-height: 1.4; }
.paper-meta { font-family: var(--sans); color: var(--ink-3); font-size: 13px; line-height: 1.45; }
.tag::before { content: " · "; }
.directory-main { max-width: 52rem; }
[hidden] { display: none !important; }

footer { border-top: 1px solid var(--ink); margin-top: 72px; padding: 22px 0 48px; font-family: var(--sans); font-size: 13.5px; color: var(--ink-3); }
footer p { margin: 0 0 4px; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .sidebar { display: none; }
  .toc-details { display: block; border-bottom: 1px solid var(--rule); padding: 0 0 14px; margin-bottom: 26px; font-family: var(--sans); }
  .toc-details summary { cursor: pointer; font-weight: 600; font-size: 15px; }
  .toc-details ol { margin-top: 10px; columns: 2; column-gap: 24px; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .page { padding: 0 18px; }
  .site-nav { gap: 14px; }
  .title-block { padding: 30px 0 22px; }
  .standfirst { font-size: 19px; }
  .stat-row, .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card:nth-child(odd), .stat:nth-child(odd) { padding-left: 0; border-left: 0; }
  .stat-card:nth-child(n+3), .stat:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .etymology, .spectrum { grid-template-columns: 1fr; }
  .ety-plus, .spectrum-arrow { display: none; }
  .families, .people, .steps3 { grid-template-columns: 1fr; gap: 0; }
  .step3 + .step3 { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .family + .family { margin-top: 22px; }
  .people-fig { display: grid; grid-template-columns: 104px 1fr; gap: 16px; align-items: center; padding-bottom: 14px; }
  .people-fig svg { margin: 0; }
  .compare-row { grid-template-columns: 1fr; }
  .compare-head { display: none; }
  .compare-topic { padding-bottom: 0; }
  .compare-cell.then { padding-bottom: 0; }
  .compare-cell.then::before { content: "In 2021: "; font-style: normal; font-weight: 700; }
  .checklist { columns: 1; }
  .calm { grid-template-columns: 1fr 1fr; }
  .bar-row, .bars.wide .bar-row { grid-template-columns: 112px 1fr 44px; gap: 8px; font-size: 13px; }
  .series-row { grid-template-columns: 1fr; gap: 5px; }
  .rank { grid-template-columns: 26px 1fr; }
  .rank-metric { grid-column: 2; text-align: left; }
  .tl-item { grid-template-columns: 58px 1fr; }
  .coverage-head { flex-direction: column; align-items: flex-start; }
  .toc-details ol { columns: 1; }
}
@media print {
  .masthead, .sidebar, .toc-details, .dir-controls, .hero-actions { display: none; }
  body { font-size: 11pt; background: #fff; color: #000; }
  .layout { display: block; }
  a { color: inherit; }
}

/* ---- site-wide navigation and the pages beyond the main reference ---- */
.masthead .page { align-items: flex-start; }
.site-name { padding-top: 2px; white-space: nowrap; }
.site-nav { gap: 3px 28px; justify-content: flex-end; }
.nav-group { display: flex; flex-wrap: wrap; gap: 2px 13px; align-items: baseline; }
.nav-label { font-size: 11.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }

.site-index-wrap { margin-top: 26px; border-top: 0; }
.site-index { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 28px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); padding: 12px 0 8px; }
.site-index h3 { font-family: var(--sans); font-size: 12.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 6px; }
.site-index ul { list-style: none; margin: 0; padding: 0; font-family: var(--sans); font-size: 13.5px; line-height: 1.4; color: var(--ink-3); }
.site-index li { padding: 5px 0; }
.site-index li a:first-child { display: block; font-family: var(--serif); font-size: 17px; color: var(--link); }

/* the first section of a sub-page sits directly under the title rule */
.content > .toc-details + .section { margin-top: 0; border-top: 0; }
.content > .toc-details + .section > .section-heading { padding-top: 0; }
.content > .hero-actions { margin: 0 0 26px; }

/* published cases */
.case-head { font-weight: 700; font-size: 17px; line-height: 1.35; }
.case-head + .paper-title { font-size: 15.5px; color: var(--ink-2); }
.content .dir-controls { top: 0; }

/* a pathology report, annotated */
.report-paper { border: 1px solid var(--ink-3); background: #fff; padding: 22px 24px; margin: 14px 0 18px; font-family: "Courier New", Courier, monospace; font-size: 15px; line-height: 1.55; color: #1c1b19; }
.report-paper > div { margin-bottom: 12px; }
.report-paper > div:last-child { margin-bottom: 0; }
.rp-title { font-weight: 700; text-align: center; letter-spacing: 0.04em; }
.rp-diag { font-weight: 700; }
.mk { display: inline-block; min-width: 1.5em; height: 1.5em; line-height: 1.45em; margin: 0 2px; text-align: center; border: 1px solid var(--accent); border-radius: 50%; font-family: var(--sans); font-size: 11.5px; font-weight: 700; color: var(--accent); background: var(--paper); vertical-align: 0.1em; }
.report-notes { margin: 0 0 24px; padding: 0; list-style: none; counter-reset: note; border-top: 2px solid var(--ink); }
.report-notes li { counter-increment: note; display: grid; grid-template-columns: 34px 1fr; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 17px; }
.report-notes li::before { content: counter(note); width: 1.6em; height: 1.6em; line-height: 1.55em; text-align: center; border: 1px solid var(--accent); border-radius: 50%; font-family: var(--sans); font-size: 12px; font-weight: 700; color: var(--accent); margin-top: 3px; }

/* the form on the printable summary */
.form-lines { border-top: 2px solid var(--ink); margin: 10px 0 20px; }
.form-line { border-bottom: 1px solid var(--ink-3); min-height: 2.5em; padding-top: 4px; }
.form-line span { font-family: var(--sans); font-size: 12.5px; color: var(--ink-3); }

@media (max-width: 900px) {
  .masthead .page { flex-direction: column; gap: 6px; }
  .site-nav { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .site-index { grid-template-columns: 1fr; }
  .site-index > div + div { border-top: 1px solid var(--rule); margin-top: 8px; padding-top: 10px; }
  .report-paper { padding: 16px; font-size: 13.5px; }
}
@media print {
  .title-block { padding: 0 0 10px; }
  .title-block h1 { font-size: 22pt; }
  .standfirst { font-size: 11pt; margin: 6px 0; }
  .section { margin-top: 14px; }
  .section-heading { font-size: 14pt; margin-bottom: 6px; padding-top: 6px; }
  .glossary dd, .glossary dt { font-size: 9.5pt; padding-top: 3px; padding-bottom: 3px; }
  .references ol { font-size: 7.5pt; }
  #patient { break-before: page; }
  .form-line { min-height: 2.9em; }
  footer { display: none; }
}

/* ---- search box, languages, and search results ---- */
.mast-left { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.mast-search input { font-family: var(--sans); font-size: 13px; width: 150px; padding: 3px 7px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); border-radius: 0; }
.mast-search input:focus { border-color: var(--ink); outline: none; }
.mast-langs { font-family: var(--sans); font-size: 12.5px; }
.mast-langs a { color: var(--ink-3); text-decoration: none; margin-right: 8px; }
.mast-langs a:hover { color: var(--ink); text-decoration: underline; }
.search-form { margin: 0 0 6px; }
#search-results .year-group h2 { font-size: 22px; margin-top: 26px; }
@media (max-width: 900px) {
  .mast-left { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
}

/* ---- colour and feel, and a compact wiki-style top (2026-11-11) ----
   Two colours on warm paper: a deep teal for structure and an ochre for
   emphasis, with two pale tints of them for bands and boxes. */
:root {
  --accent: #0e4a5b;
  --accent-deep: #0a3947;
  --ochre: #b4601f;
  --tint-teal: #e7eff0;
  --tint-teal-line: #c6d8db;
  --tint-warm: #f6efe1;
  --link: #0d5a70;
}

/* masthead: one coloured bar with three menus */
.masthead { background: var(--accent); border-bottom: 3px solid var(--ochre); }
.masthead .page.mast { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 0 14px; padding-top: 0; padding-bottom: 0; min-height: 46px; }
.site-name { font-family: var(--serif); font-size: 19px; font-weight: 400; color: #fff; margin-right: auto; padding: 0; letter-spacing: 0; }
.menus { display: flex; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; padding: 13px 12px; color: #e3eef0; font-family: var(--sans); font-size: 14px; font-weight: 600; white-space: nowrap; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: "\25BE"; font-size: 11px; margin-left: 6px; opacity: 0.8; }
.menu summary:hover, .menu[open] summary { background: rgba(255, 255, 255, 0.14); color: #fff; }
.menu-panel { position: absolute; top: 100%; left: 0; min-width: 250px; background: var(--paper); border: 1px solid var(--tint-teal-line); border-top: 0; box-shadow: 0 8px 20px rgba(28, 27, 25, 0.16); padding: 6px 0; z-index: 60; }
.menu-panel a { display: block; padding: 7px 16px; font-family: var(--sans); font-size: 14px; color: var(--ink); text-decoration: none; }
.menu-panel a:hover { background: var(--tint-teal); color: var(--accent-deep); }
.mast-search input { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.4); color: #fff; width: 140px; padding: 4px 8px; }
.mast-search input::placeholder { color: #cfe0e3; }
.mast-search input:focus { background: #fff; color: var(--ink); border-color: #fff; }
.mast-langs a { color: #cfe0e3; margin: 0 0 0 10px; }
.mast-langs a:hover { color: #fff; }

/* the top of each page sits on a tinted band */
.hero-band { background: var(--tint-teal); border-bottom: 1px solid var(--tint-teal-line); }
.title-block { padding: 22px 0 22px; max-width: none; }
.kicker { color: var(--accent); margin-bottom: 4px; }
.kicker a { color: var(--accent); }
.title-block h1 { font-size: clamp(32px, 4.4vw, 46px); line-height: 1.08; }
.standfirst { font-size: 19px; line-height: 1.5; margin: 10px 0 10px; max-width: 46rem; color: var(--ink); }
.meta-line { color: var(--ink-2); }
.open-note { border-top: 0; padding-top: 0; margin-top: 4px; }
.lead-grid { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 40px; align-items: start; }
.site-index { display: block; border: 0; padding: 0; margin: 14px 0 0; border-top: 1px solid var(--tint-teal-line); padding-top: 10px; }
.site-index p { margin: 0 0 5px; font-family: var(--sans); font-size: 14px; line-height: 1.65; color: var(--ink-2); }
.site-index a { margin-right: 12px; white-space: nowrap; }
.idx-label { display: inline-block; min-width: 108px; font-size: 11.5px; letter-spacing: 0.07em; text-transform: uppercase; font-weight: 700; color: var(--ochre); }

.infobox { background: var(--paper); border: 1px solid var(--tint-teal-line); font-family: var(--sans); margin-top: -34px; }
.infobox-title { background: var(--accent); color: #fff; font-family: var(--serif); font-size: 18px; padding: 8px 14px; text-align: center; }
.infobox-fig { margin: 0; padding: 10px 12px 8px; border-bottom: 1px solid var(--rule); background: #fff; }
.infobox-fig svg { display: block; width: 100%; height: auto; }
.infobox-fig figcaption { font-size: 12px; line-height: 1.4; color: var(--ink-3); margin-top: 4px; }
.infobox dl { margin: 0; display: grid; grid-template-columns: 104px 1fr; font-size: 13.5px; line-height: 1.4; }
.infobox dt { padding: 6px 8px 6px 12px; font-weight: 700; color: var(--accent); border-top: 1px solid var(--rule); }
.infobox dd { margin: 0; padding: 6px 12px 6px 0; border-top: 1px solid var(--rule); color: var(--ink); }
.infobox dt:first-of-type, .infobox dt:first-of-type + dd { border-top: 0; }

.layout { border-top: 0; padding-top: 30px; }
.sidebar .toc { border-left: 3px solid var(--tint-teal); padding-left: 14px; }
.toc h2 { color: var(--accent); }
.toc a.current { color: var(--accent-deep); }
.toc a.current::before { color: var(--ochre); }

/* sections */
.section { border-top: 3px solid var(--accent); margin-top: 52px; }
.sec-num { color: var(--ochre); }
.sub-heading { color: var(--accent-deep); }
.deck { color: var(--accent); }
.byline { color: var(--ochre); font-weight: 600; }
.callout { background: var(--tint-warm); border-left: 4px solid var(--ochre); padding: 14px 18px; }
.cta-box { background: var(--tint-teal); border: 0; border-left: 4px solid var(--accent); padding: 18px 20px; }

/* two sections get a band of their own */
#first-steps { background: var(--tint-warm); border-top: 3px solid var(--ochre); margin-left: -26px; margin-right: -26px; padding: 4px 26px 16px; }
#first-steps .callout { background: var(--paper); }
#why { background: var(--tint-teal); margin-left: -26px; margin-right: -26px; padding: 4px 26px 16px; }

/* tables and rules take the accent */
.data-table { border-top: 2px solid var(--accent); }
.data-table th { color: var(--accent); background: var(--tint-teal); border-bottom: 1px solid var(--accent); padding-left: 10px; }
.data-table td { padding-left: 10px; }
.data-table tbody tr:nth-child(even) td { background: rgba(14, 74, 91, 0.035); }
.stat-row, .stats-grid { border-top: 3px solid var(--ochre); }
.stat-num, .coverage-num, .coverage-pct { color: var(--accent); }
.glossary, .timeline, .rankings, .plan, .checklist, .calm, .compare, .people, .steps3, .form-lines, .report-notes { border-top-color: var(--accent); }
.faq-item:first-child { border-top-color: var(--accent); }
.compare-head { border-bottom-color: var(--accent); background: var(--tint-teal); }
.compare-col { padding-left: 10px; color: var(--accent); }
.compare-cell.now { background: rgba(14, 74, 91, 0.04); padding-left: 10px; padding-right: 10px; }
.family, .spec-card { border-top-color: var(--accent); }
.spec-card.malignant { border-top-color: var(--ochre); }
.plan li::before, .step3-n, .tl-year, .rank-pos { color: var(--ochre); }
.calm-do { color: var(--accent-deep); }
.case-head { color: var(--accent-deep); }
.report-paper { border-color: var(--accent); border-top: 4px solid var(--accent); }
.year-group h2 { border-top: 2px solid var(--accent); }
.etymology { border-color: var(--tint-teal-line); }
.ety-frag { color: var(--accent); }

.btn { border-color: var(--accent); color: var(--accent); }
.btn:hover, .btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--ochre); border-color: var(--ochre); color: #fff; }
.filter-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.dir-search:focus { border-color: var(--accent); }

footer { background: var(--accent); border-top: 3px solid var(--ochre); color: #d6e4e7; margin-top: 64px; padding: 22px 0 40px; }
footer a { color: #fff; }

@media (max-width: 980px) {
  .lead-grid { grid-template-columns: 1fr; gap: 18px; }
  .infobox { margin-top: 0; max-width: 520px; }
}
@media (max-width: 900px) {
  .masthead .page.mast { padding-top: 6px; padding-bottom: 4px; }
  .site-name { width: 100%; margin-right: 0; }
  .menu summary { padding: 9px 12px 9px 0; }
  .menu-panel { min-width: 230px; }
  .menu:last-child .menu-panel { left: auto; right: 0; }
}
@media (max-width: 640px) {
  #first-steps, #why { margin-left: -18px; margin-right: -18px; padding-left: 18px; padding-right: 18px; }
  .idx-label { display: block; }
  .mast-search input { width: 110px; }
}
@media print {
  .hero-band { background: none; border: 0; }
  #first-steps, #why { background: none; margin: 0; padding: 0; }
  footer { background: none; color: #000; }
}

/* infobox kept short so the top of the page stays compact */
.infobox dl { grid-template-columns: 96px 1fr; }
.infobox dt, .infobox dd { padding-top: 5px; padding-bottom: 5px; }
.infobox-fig { padding: 8px 12px 6px; }
.infobox-fig svg { max-width: 300px; margin: 0 auto; }
.idx-label { min-width: 0; margin-right: 10px; }
.site-index p { margin-bottom: 4px; }

@media (max-width: 640px) {
  .standfirst { font-size: 17px; }
  .title-block { padding: 16px 0 18px; }
}
