/* Hip Replacement Explained accent: muted plum */
:root { --accent: #6A4C67; --accent-ink: #523A50; --accent-wash: #F2ECF1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --accent: #CDAFC9; --accent-ink: #E0CDDD; --accent-wash: #2E2530; } }
/* Explained sites design system: shared base. Site accent tokens are prepended per site. */
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 300 800; font-display: swap; src: url("fonts/newsreader-wght.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 300 800; font-display: swap; src: url("fonts/source-sans-3-wght.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 300 800; font-display: swap; src: url("fonts/source-sans-3-wght-italic.woff2") format("woff2"); }

:root {
  --bg: #F7F4EE;
  --bg-deep: #F0EBE1;
  --surface: #FFFFFF;
  --ink: #23221F;
  --ink-2: #3A3934;
  --muted: #5E5B54;
  --line: #E2DCD0;
  --line-strong: #CFC7B8;
  --clin: #3D6564;
  --clin-soft: #EAF1F0;
  --vac: #80601F;
  --vac-soft: #F5EEDF;
  --warn: #9A3B24;
  --warn-soft: #F7E9E3;
  --peek: #D8C9A3; --peek-edge: #9C8757; --ti: #A9B4BC; --ti-edge: #66737D; --pmma: #CFE6F2; --pmma-edge: #6FA3C0; --pe: #F1EEE6; --pe-edge: #A59F8E; --pe-dot: #C9C2AE; --ha: #EDE7DA; --ha-dot: #C2B497;
  --font-display: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: var(--font-body);
  --step--1: .875rem; --step-0: 1.0625rem; --step-1: 1.25rem; --step-2: 1.55rem; --step-3: clamp(1.7rem, 3vw, 2.1rem); --step-4: clamp(2.5rem, 5.4vw, 3.6rem);
  --radius: 6px; --radius-lg: 10px;
  --measure: 68ch;
  --page: 1160px;
  --shadow: 0 1px 2px rgba(35, 34, 31, .04), 0 4px 16px rgba(35, 34, 31, .04);
  --on-accent: #FFFFFF;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #1A1917; --bg-deep: #151412; --surface: #22211E; --ink: #EDE9E1; --ink-2: #D9D4CA; --muted: #ABA597; --line: #36342F; --line-strong: #4A4740;
  --clin: #8DBFBB; --clin-soft: #1E2A29; --vac: #D9B46A; --vac-soft: #2B2519; --warn: #EE9A80; --warn-soft: #34231D;
  --peek: #8C7B55; --peek-edge: #C4B184; --ti: #6C7883; --ti-edge: #AAB6C0; --pmma: #2C4D60; --pmma-edge: #7FB6D4; --pe: #4A4740; --pe-edge: #9A9484; --pe-dot: #6C6759; --ha: #514A3E; --ha-dot: #7E7360;
  --shadow: none; --on-accent: #1A1917; color-scheme: dark; } }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 84px; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: var(--step-0); line-height: 1.65; font-weight: 400; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent-ink, var(--accent)); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3, h4 { font-family: var(--font-display); text-wrap: balance; line-height: 1.15; margin: 0; color: var(--ink); font-weight: 500; letter-spacing: -.005em; }
h1 { font-weight: 500; letter-spacing: -.015em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-weight: 600; }
h4 { font-family: var(--font-body); font-weight: 600; }
p { margin: 0; }
strong { font-weight: 600; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: var(--radius); text-decoration: none; }
.skip:focus { top: 12px; }

/* quiet section labels, replacing monospaced uppercase */
.eyebrow { font-family: var(--font-body); font-size: var(--step--1); font-weight: 600; letter-spacing: .01em; text-transform: none; color: var(--accent); }
sup.c { line-height: 0; }
sup.c a { font-family: var(--font-body); font-size: .72em; font-weight: 600; text-decoration: none; padding: 0 1px; }
sup.c a:hover { text-decoration: underline; }
.num { font-variant-numeric: tabular-nums; }

.wrap { max-width: var(--page); margin: 0 auto; padding-inline: clamp(18px, 4vw, 32px); padding-block: 0 72px; }

/* ---------- header ---------- */
.sitebar { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.sitebar-inner { max-width: var(--page); margin: 0 auto; padding: 14px clamp(18px, 4vw, 32px); display: flex; gap: 12px 32px; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.22rem; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 22px; height: 22px; flex: none; display: block; }
.sitelinks { display: flex; flex-wrap: wrap; gap: 2px 26px; font-size: .97rem; font-weight: 500; }
.sitelinks a { color: var(--ink-2); text-decoration: none; padding: 6px 0; border-bottom: 1.5px solid transparent; }
.sitelinks a:hover { color: var(--ink); border-bottom-color: var(--line-strong); }
.sitelinks a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.menu-btn { display: none; font: 600 .95rem/1 var(--font-body); color: var(--ink); background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 9px 12px; cursor: pointer; align-items: center; gap: 8px; }
.menu-btn svg { width: 16px; height: 16px; }
@media (max-width: 760px) {
  .js .menu-btn { display: inline-flex; margin-left: auto; }
  .sitebar-inner { flex-wrap: wrap; gap: 10px 12px; }
  .brand { font-size: 1.08rem; }
  .js .sitelinks { display: none; width: 100%; flex-direction: column; gap: 0; padding: 6px 0 4px; border-top: 1px solid var(--line); margin-top: 4px; }
  .js .sitebar.open .sitelinks { display: flex; }
  .js .sitelinks a { padding: 12px 2px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .js .sitelinks a:last-child { border-bottom: 0; }
  .js .sitelinks a[aria-current="page"] { border-bottom-color: var(--line); color: var(--accent); }
}

/* ---------- footer ---------- */
.site-foot { background: var(--bg-deep); border-top: 1px solid var(--line); margin-top: 24px; }
.site-foot-inner { max-width: var(--page); margin: 0 auto; padding: 44px clamp(18px, 4vw, 32px) 48px; display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 32px 48px; font-size: .95rem; color: var(--muted); }
.site-foot .foot-brand { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.site-foot p { max-width: 60ch; }
.site-foot p + p { margin-top: 10px; }
.site-foot h2 { font-family: var(--font-body); font-size: .9rem; font-weight: 600; color: var(--ink); margin-bottom: 10px; letter-spacing: .01em; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-foot a { color: var(--ink-2); text-decoration: none; }
.site-foot a:hover { color: var(--accent); text-decoration: underline; }
.page-foot { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 20px; font-size: .92rem; color: var(--muted); display: grid; gap: 8px; max-width: var(--measure); }
.footlinks { display: flex; flex-wrap: wrap; gap: 6px 20px; }
@media (max-width: 760px) { .site-foot-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .site-foot-inner > :first-child { grid-column: 1 / -1; } }

/* ---------- buttons and links ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 1rem/1.2 var(--font-body); padding: 12px 20px; border-radius: var(--radius); text-decoration: none; border: 1px solid var(--accent); transition: background-color .15s, color .15s; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--on-accent); text-decoration: none; }
.btn-quiet { background: transparent; color: var(--accent-ink); border-color: var(--line-strong); }
.btn-quiet:hover { border-color: var(--accent); color: var(--accent-ink); text-decoration: none; }
a.more { font-weight: 600; text-decoration: none; }
a.more::after { content: " \2192"; }
a.more:hover { text-decoration: underline; }

/* ---------- homepage ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding-block: clamp(40px, 6vw, 72px) clamp(32px, 4vw, 56px); }
.hero-text { display: grid; gap: 20px; align-content: center; max-width: 34em; }
.hero h1 { font-size: var(--step-4); line-height: 1.04; }
.hero .lede { font-size: 1.2rem; line-height: 1.6; color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.hero-figure { margin: 0; border-radius: var(--radius-lg); overflow: hidden; background: #F4EFE6; border: 1px solid var(--line); }
.hero-figure picture, .hero-figure img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.hero-figure figcaption { font-size: .82rem; color: var(--muted); padding: 10px 14px; background: var(--surface); border-top: 1px solid var(--line); }
.ed-note { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .97rem; color: var(--ink-2); }
.ed-note strong { color: var(--ink); }
.ed-note .footlinks a { font-weight: 600; }

.home { display: grid; gap: clamp(56px, 7vw, 88px); padding-top: clamp(40px, 5vw, 64px); }
.sec-head { display: grid; gap: 8px; max-width: 46em; margin-bottom: 24px; }
.sec-head p { color: var(--muted); font-size: 1.05rem; }
.sec-head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 24px; margin-bottom: 24px; }
.sec-head-row .sec-head { margin-bottom: 0; }

.starts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.start { padding: 26px 28px 8px 0; display: grid; gap: 10px; align-content: start; }
.start + .start { padding-left: 28px; border-left: 1px solid var(--line); }
.start .n { font-family: var(--font-display); font-size: 1rem; color: var(--accent); font-weight: 600; }
.start h3 { font-size: 1.45rem; font-weight: 500; }
.start p { color: var(--muted); }
.start ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.start li a { font-weight: 600; text-decoration: none; }
.start li a::after { content: " \2192"; font-weight: 400; }
.start li a:hover { text-decoration: underline; }

.features { display: grid; grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(0, 1fr)); gap: 16px; }
.feature { display: grid; gap: 8px; align-content: start; padding: 24px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; color: var(--ink); transition: border-color .15s; }
.feature:hover { border-color: var(--accent); color: var(--ink); }
.feature .k { font-size: .85rem; font-weight: 600; color: var(--accent); }
.feature h3 { font-size: 1.35rem; font-weight: 500; }
.feature p { color: var(--muted); font-size: .98rem; }
.feature.lead { grid-row: span 2; background: var(--accent-wash); border-color: transparent; padding: 32px; align-content: end; }
.feature.lead::after { content: "Read the guide \2192"; font-weight: 600; color: var(--accent-ink); margin-top: 8px; }
.feature.lead h3 { font-size: 1.75rem; }
.more-guides { margin-top: 20px; font-size: .95rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 0; }
.more-guides span.lbl { font-weight: 600; color: var(--ink-2); margin-right: 10px; }
.more-guides a { color: var(--ink-2); }
.more-guides a + a::before { content: "\00B7"; display: inline-block; padding: 0 10px; color: var(--line-strong); text-decoration: none; }

.topic-index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; }
.topic-col h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.topic-col ul { list-style: none; margin: 0; padding: 0; }
.topic-col li a { display: grid; gap: 1px; padding: 11px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.topic-col li a:hover .t { color: var(--accent); text-decoration: underline; }
.topic-col .t { font-weight: 600; }
.topic-col .d { font-size: .92rem; color: var(--muted); }

.pro { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px); display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: 24px 48px; }
.pro .sec-head { margin: 0; align-content: start; }
.pro-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.pro-links a { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.pro-links a:hover .t { color: var(--accent); text-decoration: underline; }
.pro-links .t { font-weight: 600; }
.pro-links .d { font-size: .92rem; color: var(--muted); }

/* legacy hub, kept for safety */
.hub { display: grid; gap: 48px; padding-top: 40px; }
.hub-intro { max-width: var(--measure); display: grid; gap: 14px; font-size: 1.05rem; }
.tgroup { display: grid; gap: 16px; }
.tgroup > p { color: var(--muted); max-width: var(--measure); }
.tcards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.tcard a { display: grid; gap: 6px; height: 100%; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; color: var(--ink); }
.tcard a:hover { border-color: var(--accent); }
.tcard .tt { font-family: var(--font-display); font-weight: 500; font-size: var(--step-1); color: var(--ink); }
.tcard .tb { font-size: .95rem; color: var(--muted); }

/* ---------- reading lens ---------- */
.lens { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: none; border-bottom: 1px solid var(--line); padding-block: 10px; }
.lens-inner { max-width: var(--page); margin: 0 auto; padding-inline: clamp(18px, 4vw, 32px); display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.lens-label { font-size: .92rem; font-weight: 600; color: var(--ink-2); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.seg button { font: 500 .92rem/1 var(--font-body); color: var(--ink-2); background: transparent; border: 0; border-radius: 5px; padding: 8px 13px; cursor: pointer; }
.seg button:hover { color: var(--ink); background: var(--bg); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.lens-note { font-size: .9rem; color: var(--muted); }

/* ---------- topic layout ---------- */
.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); padding-top: 40px; }
.toc { position: sticky; top: 76px; align-self: start; font-size: .95rem; max-height: calc(100vh - 96px); overflow-y: auto; padding-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.toc .toc-h { font-size: .8rem; font-weight: 600; color: var(--muted); padding: 16px 12px 6px; letter-spacing: .02em; }
.toc .toc-h:first-child { padding-top: 0; }
.toc a { display: block; padding: 5px 12px; border-left: 2px solid var(--line); color: var(--ink-2); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--ink); border-color: var(--line-strong); background: var(--surface); }
.toc a[aria-current="page"] { color: var(--accent-ink); border-color: var(--accent); font-weight: 600; background: var(--accent-wash); }
main { min-width: 0; display: grid; gap: 64px; align-content: start; }
section { display: grid; gap: 18px; scroll-margin-top: 84px; }
section > h1 { font-size: clamp(2.2rem, 4.6vw, 3rem); line-height: 1.08; }
.prose { max-width: var(--measure); display: grid; gap: 16px; }
main > section > p, main > section > ul, main > section > ol:not(.refs) { max-width: var(--measure); }

/* layered audience blocks */
.layer { border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 10px; max-width: var(--measure); border: 1px solid transparent; }
.layer .tag { font-family: var(--font-body); font-size: .85rem; font-weight: 600; letter-spacing: .01em; text-transform: none; display: inline-flex; align-items: center; gap: 8px; }
.layer .tag::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: currentColor; }
.layer.clin { background: var(--clin-soft); border-color: color-mix(in srgb, var(--clin) 22%, transparent); }
.layer.clin .tag { color: var(--clin); }
.layer.vac { background: var(--vac-soft); border-color: color-mix(in srgb, var(--vac) 22%, transparent); }
.layer.vac .tag { color: var(--vac); }
.layer ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
body[data-aud="patient"] .clin, body[data-aud="patient"] .vac { display: none; }
body[data-aud="clinician"] .vac { display: none; }
body[data-aud="vac"] .clin { display: none; }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; max-width: var(--measure); counter-reset: s; }
.steps li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding-bottom: 20px; position: relative; }
.steps li::before { counter-increment: s; content: counter(s); font-family: var(--font-display); font-weight: 600; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); display: grid; place-items: center; font-size: .95rem; background: var(--bg); z-index: 1; }
.steps li::after { content: ""; position: absolute; left: 15px; top: 30px; bottom: 0; width: 1px; background: var(--line-strong); }
.steps li:last-child::after { display: none; }
.steps strong { display: block; }

/* materials */
.mat-grid { display: grid; gap: 18px; }
.mat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(18px, 3vw, 26px); display: grid; gap: 14px; scroll-margin-top: 84px; }
.mat-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; justify-content: space-between; }
.mat-head h3 { font-size: var(--step-2); font-weight: 500; }
.formats { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .8rem; font-weight: 600; padding: 3px 9px; border-radius: 4px; background: var(--accent-wash); color: var(--accent-ink); white-space: nowrap; }
.mat .what { max-width: var(--measure); }
.pc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.pc h4 { margin: 0 0 6px; font-size: .9rem; text-transform: none; letter-spacing: 0; color: var(--ink-2); font-weight: 600; }
.pc ul { margin: 0; padding-left: 1.1em; display: grid; gap: 5px; font-size: .98rem; }
.ctx { background: var(--bg); border-style: dashed; }

/* tables */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); -webkit-overflow-scrolling: touch; background-image: linear-gradient(to right, var(--surface) 30%, transparent), linear-gradient(to left, var(--surface) 30%, transparent), linear-gradient(to right, rgba(35,34,31,.08), transparent), linear-gradient(to left, rgba(35,34,31,.08), transparent); background-position: left center, right center, left center, right center; background-repeat: no-repeat; background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%; background-attachment: local, local, scroll, scroll; }
.table-scroll:focus-visible { outline-offset: 2px; }
table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 720px; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
thead th { font-family: var(--font-body); font-size: .85rem; letter-spacing: .01em; text-transform: none; color: var(--ink-2); font-weight: 600; background: var(--bg); position: sticky; top: 0; }
tbody th { font-weight: 600; white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:hover > * { background: color-mix(in srgb, var(--accent-wash) 45%, transparent); }
@media (max-width: 760px) { table { min-width: 620px; font-size: .92rem; } th, td { padding: 10px 12px; } tbody th, thead th:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; box-shadow: 1px 0 0 var(--line); } thead th:first-child { background: var(--bg); z-index: 2; } }
.table-hint { display: none; font-size: .85rem; color: var(--muted); }
@media (max-width: 760px) { .table-hint { display: block; } }

/* stats */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; max-width: 760px; }
.stat { border-top: 1px solid var(--accent); padding-top: 12px; }
.stat .v { font-family: var(--font-display); font-size: var(--step-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.stat .l { font-size: .92rem; color: var(--muted); }

/* findings */
.findings { display: grid; gap: 0; max-width: 76ch; }
.finding { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.finding .k { font-family: var(--font-body); font-size: .88rem; font-weight: 600; color: var(--accent-ink); text-transform: none; letter-spacing: 0; padding-top: 2px; }

.qs { margin: 0; padding-left: 1.3em; display: grid; gap: 10px; max-width: var(--measure); }
dl.gloss { display: grid; grid-template-columns: minmax(0, 210px) minmax(0, 1fr); gap: 0 28px; margin: 0; max-width: 860px; }
dl.gloss dt, dl.gloss dd { padding: 12px 0; border-bottom: 1px solid var(--line); }
dl.gloss dt { font-weight: 600; }
dl.gloss dd { margin: 0; color: var(--ink-2); }

/* sources */
ol.refs { margin: 0; padding-left: 1.8em; display: grid; gap: 10px; font-size: .93rem; max-width: 90ch; color: var(--ink-2); }
ol.refs li { scroll-margin-top: 84px; padding: 2px 6px; margin-left: -6px; border-radius: 4px; }
ol.refs li::marker { color: var(--muted); font-variant-numeric: tabular-nums; }
ol.refs li:target { background: var(--accent-wash); box-shadow: inset 2px 0 0 var(--accent); }
.doi { font-family: var(--font-body); font-size: .88rem; word-break: break-word; overflow-wrap: anywhere; }
#sources, .page-sources { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(18px, 3vw, 28px); }
#sources h2, .page-sources h2 { font-size: var(--step-2); }

.callout { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; max-width: var(--measure); background: var(--surface); }
.callout.warn { border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: var(--warn-soft); display: grid; gap: 6px; }
.callout.warn h3 { color: var(--warn); font-size: 1.05rem; font-family: var(--font-body); }

/* patient journey */
.phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.phase { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; display: grid; gap: 12px; align-content: start; }
.phase-head { display: grid; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.phase-k { font-family: var(--font-body); font-size: .88rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--accent); }
.phase ul { margin: 0; padding-left: 1.05em; display: grid; gap: 8px; font-size: .98rem; }
.journey-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.tips, .helmet { display: grid; gap: 12px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checks li { position: relative; padding-left: 26px; }
.checks li::before { content: ""; position: absolute; left: 2px; top: .42em; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.helmet { background: var(--accent-wash); border-radius: var(--radius-lg); padding: 20px; }
.helmet ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; font-size: .98rem; }
.helmet-svg { width: 140px; height: auto; }

/* manufacturers */
.fine { font-size: .92rem; color: var(--muted); }
.filter { display: flex; flex-wrap: wrap; gap: 8px; }
.filter button { font: 500 .92rem/1 var(--font-body); padding: 9px 13px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.filter button:hover { border-color: var(--accent); color: var(--ink); }
.filter button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.makers { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.maker { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; display: grid; grid-template-rows: auto auto auto 1fr auto; gap: 10px; }
.ill { display: flex; gap: 6px; background: var(--bg); border-radius: var(--radius); padding: 12px 10px 8px; justify-content: center; }
.ill figure { margin: 0; flex: 1 1 0; min-width: 0; max-width: 130px; text-align: center; }
.ill svg { width: 100%; height: auto; display: block; }
.ill figcaption { font-family: var(--font-body); font-size: .78rem; color: var(--muted); margin-top: 4px; }
.maker h3 { font-size: var(--step-1); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.prod { font-weight: 600; color: var(--accent-ink); font-size: .95rem; font-family: var(--font-body); }
.maker dl { margin: 0; display: grid; gap: 6px; font-size: .94rem; align-content: start; }
.maker dt { font-family: var(--font-body); font-size: .82rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
.maker dd { margin: 0 0 4px; }
.links { display: flex; flex-wrap: wrap; gap: 6px 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .92rem; font-weight: 600; }
.links a::after { content: " \2197"; font-weight: 400; }

/* recovery supplies */
.disclosure { border: 1px solid var(--line); border-left: 3px solid var(--vac); border-radius: var(--radius); padding: 14px 18px; display: grid; gap: 8px; max-width: 76ch; font-size: .97rem; background: var(--surface); }
.supplies { display: grid; gap: 32px; }
.sup-cat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 24px; padding-top: 26px; border-top: 1px solid var(--line); }
.sup-cat:first-child { border-top: 0; padding-top: 4px; }
.sup-info { display: grid; gap: 10px; align-content: start; }
.sup-info h3 { font-size: var(--step-2); font-weight: 500; }
.sup-info .lf-h { font-family: var(--font-body); font-size: .88rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.sup-info ul { margin: 0; padding-left: 1.1em; display: grid; gap: 5px; font-size: .97rem; }
.sup-caution { font-size: .93rem; background: var(--vac-soft); border-radius: var(--radius); padding: 10px 12px; }
.sup-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; align-content: start; }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; display: grid; grid-template-rows: auto auto 1fr auto; gap: 8px; }
.item h4 { margin: 0; font-size: 1.02rem; font-weight: 600; }
.item .gf { font-size: .88rem; color: var(--muted); }
.item p.why { margin: 0; font-size: .95rem; }
.item .badge { justify-self: start; font-family: var(--font-body); font-size: .78rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 4px; padding: 2px 8px; }
.item.draft { border-style: dashed; }
.buy { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 12px; border-radius: var(--radius); background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: .95rem; text-decoration: none; }
.buy:hover { background: var(--accent-ink); color: var(--on-accent); }
.buy[aria-disabled="true"] { background: var(--line); color: var(--muted); cursor: default; }
.buy-note { font-size: .8rem; color: var(--muted); text-align: center; }
.sup-empty { font-size: .95rem; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); padding: 14px; }

/* pager and resources */
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 28px; border-top: 1px solid var(--line); }
.pager a { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); text-decoration: none; color: var(--ink); }
.pager a:hover { border-color: var(--accent); }
.pager .k { font-family: var(--font-body); font-size: .85rem; letter-spacing: 0; text-transform: none; color: var(--muted); }
.pager .t { font-weight: 600; color: var(--accent-ink); }
.pager .next { text-align: right; grid-column: 2; }
.res-group { display: grid; gap: 14px; margin-top: 16px; }
.res-group h2 { font-size: var(--step-2); }
.res-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.res-list li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; display: grid; gap: 4px; align-content: start; }
.res-t { font-weight: 600; }
.res-t::after { content: " \2197"; font-weight: 400; }
.res-org { font-family: var(--font-body); font-size: .85rem; letter-spacing: 0; color: var(--muted); }
.res-list p { font-size: .96rem; }
.mobile-topics { display: none; }

/* labeled diagram figure (moved from homepage) */
.diagram { margin: 0; max-width: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 18px 12px; }
.diagram svg { width: 100%; height: auto; display: block; }
.diagram figcaption { font-size: .88rem; color: var(--muted); margin-top: 8px; }

/* ---------- article pages ---------- */
.article { max-width: 760px; margin: 0 auto; padding-inline: clamp(18px, 4vw, 32px); padding-block: clamp(36px, 5vw, 56px) 72px; display: grid; gap: 44px; }
.article-head { display: grid; gap: 14px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.article-head h1 { font-size: clamp(2.2rem, 5vw, 3.1rem); line-height: 1.06; }
.article-head .lede { font-size: 1.22rem; line-height: 1.55; color: var(--ink-2); }
.meta { font-size: .92rem; color: var(--muted); }
.article section { display: grid; gap: 16px; }
.article section > h2 { font-size: var(--step-3); }
.article p, .article li { max-width: var(--measure); }
.article ul, .article ol:not(.refs) { margin: 0; padding-left: 1.25em; display: grid; gap: 8px; }
.article h3 { font-size: 1.25rem; }
.toc-inline { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 20px; background: var(--surface); font-size: .97rem; }
.toc-inline ol { margin: 6px 0 0; }
.keybox { background: var(--accent-wash); border-radius: var(--radius-lg); padding: 20px 24px; display: grid; gap: 10px; border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent); }
.keybox > p:first-child strong { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
.keybox ul { gap: 8px; }
.guide-list, .article .guide-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.guide-list li, .article .guide-list li { padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; max-width: none; }
.guide-list a.title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 500; text-decoration: none; color: var(--ink); line-height: 1.25; }
.guide-list a.title:hover { color: var(--accent); text-decoration: underline; }
.guide-list p { color: var(--ink-2); }
.soon { color: var(--muted); font-size: .95rem; }
.article .sup-items { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.article > footer, main > footer { border-top: 1px solid var(--line); padding-top: 20px; font-size: .92rem; color: var(--muted); display: grid; gap: 8px; }
.related { border-top: 1px solid var(--line); padding-top: 28px; }
.related h2 { font-size: var(--step-2); }
.related ul { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 0 !important; }
.related li { border-bottom: 1px solid var(--line); }
.related a { display: block; padding: 11px 0; font-weight: 600; text-decoration: none; }
.related a::after { content: " \2192"; font-weight: 400; }
.related a:hover { text-decoration: underline; }
.article table { min-width: 520px; }
#disclosure { background: var(--bg-deep); border-radius: var(--radius-lg); padding: 18px 20px; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding-top: 28px; }
  .toc { display: none; }
  .mobile-topics { display: block; font-size: .98rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 12px 16px; }
  .mobile-topics summary { cursor: pointer; font-weight: 600; color: var(--accent-ink); }
  .mobile-topics ol { margin: 10px 0 4px; padding-left: 1.3em; display: grid; gap: 6px; }
  .phases { grid-template-columns: minmax(0, 1fr); }
  .journey-grid { grid-template-columns: minmax(0, 1fr); }
  .sup-cat { grid-template-columns: minmax(0, 1fr); }
  .pro { grid-template-columns: minmax(0, 1fr); }
  .topic-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-figure { max-width: 520px; }
  .starts { grid-template-columns: minmax(0, 1fr); }
  .start { padding: 22px 0 18px !important; border-left: 0 !important; border-bottom: 1px solid var(--line); }
  .features { grid-template-columns: minmax(0, 1fr); }
  .feature.lead { grid-row: auto; }
}
@media (max-width: 600px) {
  .pc { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .finding { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  dl.gloss { grid-template-columns: minmax(0, 1fr); }
  dl.gloss dt { border-bottom: 0; padding-bottom: 0; }
  dl.gloss dd { padding-top: 4px; }
  .lens { position: static; }
  .lens-note { width: 100%; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager .next { grid-column: 1; text-align: left; }
  .topic-index { grid-template-columns: minmax(0, 1fr); }
  .pro-links { grid-template-columns: minmax(0, 1fr); }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero .lede { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .implant { animation: seat 1.6s ease-out .3s both; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .sitebar, .lens, .toc, .mobile-topics, .menu-btn, .site-foot, .pager { display: none !important; }
  body { background: #fff; }
  .clin, .vac { display: grid !important; }
}

/* insurance and costs page */
.cost-table.money td { white-space: nowrap; }
.cost-table tr.total th, .cost-table tr.total td { font-weight: 700; border-top: 2px solid var(--line); }
.cost-note { font-size: .9rem; color: var(--muted); max-width: var(--measure); margin-top: 10px; }
.calc { max-width: var(--measure); margin: 18px 0; }
.calc .callout { display: grid; gap: 6px; }
.calc .callout p { margin: 0; }
.pdf-dl { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }

/* Added for the Informed Surgery sites: publisher banner, news, training */
.pub-banner { background: var(--accent-wash); border-bottom: 1px solid var(--line); font-size: var(--step--1); color: var(--ink-2); }
.pub-inner { max-width: var(--page); margin: 0 auto; padding: 6px clamp(18px, 4vw, 32px); display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: flex-end; }
.pub-inner a { font-weight: 600; color: var(--accent-ink); }
.news-mini, .news-list, .article .news-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.news-mini li, .news-list li, .article .news-list li { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; max-width: none; }
.news-mini a.title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; text-decoration: none; color: var(--ink); line-height: 1.3; }
.news-mini a.title:hover { color: var(--accent); text-decoration: underline; }
.news-meta { display: flex; gap: 10px; align-items: center; font-size: .9rem; color: var(--muted); }
.news-list h3 { font-family: var(--font-display); font-size: var(--step-2); font-weight: 500; line-height: 1.25; }
.news-list .why-it { color: var(--ink-2); }
.news-src { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .95rem; font-weight: 600; }
.news-filter { margin: 8px 0 24px; }
@media (min-width: 821px) {
  .starts:has(> .start:nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .starts:has(> .start:nth-child(4)) > .start:nth-child(3) { padding-left: 0; border-left: 0; }
  .starts:has(> .start:nth-child(4)) > .start:nth-child(n+3) { border-top: 1px solid var(--line); padding-top: 26px; margin-top: 18px; }
}
