/* extras.css: graphics, video embeds, publisher badge. Shared by both sites. */
:root { --x-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 18px rgba(0,0,0,.05); }

/* graphic card */
.gfx { margin: 8px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 22px 16px; box-shadow: var(--x-shadow); }
.gfx-title { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 4px; color: var(--ink); }
.gfx-sub { font-size: .9rem; color: var(--muted); margin: 0 0 18px; }
.gfx figcaption { font-size: .82rem; color: var(--muted); margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.gfx svg { display: block; width: 100%; height: auto; }
.gfx-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.gfx-hint { display: none; font-size: .8rem; color: var(--muted); margin: -8px 0 10px; }
@media (max-width: 640px) { .gfx-scroll svg { min-width: 620px; } .gfx-hint { display: block; } }
.xvideo { max-width: 760px; }

/* timeline */
.xt { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); position: relative; }
.xt::before { content: ""; position: absolute; left: 10%; right: 10%; top: 19px; height: 3px; background: linear-gradient(90deg, var(--accent-wash), var(--accent)); border-radius: 2px; }
.xt li { position: relative; text-align: center; padding: 0 6px; margin: 0; }
.xt .dot { width: 40px; height: 40px; border-radius: 50%; margin: 0 auto 10px; background: var(--surface); border: 3px solid var(--accent); display: grid; place-items: center; font-weight: 700; color: var(--accent-ink); font-size: .95rem; position: relative; }
.xt li:last-child .dot { background: var(--accent); color: var(--surface); }
.xt .k { display: block; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.xt .t { display: block; font-family: var(--font-display); font-size: 1.02rem; color: var(--ink); line-height: 1.2; }
.xt .d { display: block; font-size: .84rem; color: var(--muted); margin-top: 4px; line-height: 1.35; }
@media (max-width: 720px) {
  .xt { grid-template-columns: 1fr; gap: 14px; }
  .xt::before { left: 19px; right: auto; top: 20px; bottom: 20px; width: 3px; height: auto; background: linear-gradient(180deg, var(--accent-wash), var(--accent)); }
  .xt li { text-align: left; display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; padding: 0; }
  .xt .dot { margin: 0; grid-row: span 3; }
}

/* horizontal bars */
.xb { display: grid; gap: 12px; }
.xb-row { display: grid; grid-template-columns: minmax(110px, 32%) 1fr; align-items: center; gap: 12px; }
.xb-lab { font-size: .9rem; color: var(--ink); line-height: 1.25; }
.xb-lab small { display: block; color: var(--muted); font-size: .78rem; }
.xb-track { background: var(--accent-wash); border-radius: 6px; height: 28px; position: relative; }
.xb-fill { height: 100%; border-radius: 6px; background: var(--accent); min-width: 3px; }
.xb-fill.alt { background: color-mix(in srgb, var(--accent) 45%, var(--surface)); }
.xb-val { position: absolute; top: 50%; transform: translateY(-50%); font-weight: 700; font-size: .9rem; color: var(--ink); padding-left: 8px; white-space: nowrap; }
.xb-key { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .82rem; color: var(--muted); margin: 0 0 14px; }
.xb-key i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--accent); vertical-align: -1px; margin-right: 6px; }
.xb-key i.alt { background: color-mix(in srgb, var(--accent) 45%, var(--surface)); }

/* paired comparison panels */
.xpair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.xpair > div { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--bg); }
.xpair h4 { margin: 0 0 2px; font-size: .98rem; }
.xpair p.m { margin: 0 0 12px; font-size: .82rem; color: var(--muted); }
.xpair .verdict { margin: 12px 0 0; font-size: .86rem; font-weight: 600; color: var(--accent-ink); }
@media (max-width: 720px) { .xpair { grid-template-columns: 1fr; } }

/* icon cards */
.xcards { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 12px; list-style: none; margin: 0; padding: 0; }
.xcards li { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--bg); }
.xcards svg { width: 34px; height: 34px; color: var(--accent); margin-bottom: 8px; }
.xcards b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1rem; line-height: 1.2; color: var(--ink); margin-bottom: 4px; }
.xcards span { display: block; font-size: .85rem; line-height: 1.4; color: var(--muted); }
@media (max-width: 820px) { .xcards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .xcards { grid-template-columns: 1fr; } }

/* scalp-layer diagram colours */
.sl-skin { fill: #E9C9B0; } .sl-sub { fill: #F3E1C7; } .sl-galea { fill: #D8C3A5; } .sl-loose { fill: #F7EEDF; }
.sl-peri { fill: #C99A7C; } .sl-bone { fill: #EFE7D6; stroke: #B9AC92; } .sl-dura { fill: #9DB7C9; } .sl-brain { fill: #E8D3D8; }
.sl-imp { fill: #8DA3B5; } .sl-txt { fill: var(--ink); font: 500 13px var(--font-body); } .sl-mut { fill: var(--muted); font: 400 12px var(--font-body); }
.sl-line { stroke: var(--muted); stroke-width: 1; fill: none; } .sl-plane { stroke: var(--accent); stroke-width: 3; stroke-dasharray: 7 5; fill: none; }
.sl-head { fill: var(--ink); font: 600 15px var(--font-display); }

/* video */
.xvideo { margin: 8px 0; }
.xvideo-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; background: #111; border: 1px solid var(--line); }
.xvideo-frame iframe, .xvideo-frame button, .xvideo-frame img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.xvideo-frame img { object-fit: cover; opacity: .82; }
.xvideo-frame button { cursor: pointer; background: transparent; display: grid; place-items: center; padding: 0; }
.xvideo-frame button:hover img { opacity: .95; }
.xvideo-play { position: relative; z-index: 1; width: 74px; height: 74px; border-radius: 50%; background: rgba(0,0,0,.66); display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.xvideo-play svg { width: 30px; height: 30px; margin-left: 4px; fill: #fff; }
.xvideo-frame button:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.xvideo figcaption { font-size: .85rem; color: var(--muted); margin-top: 10px; line-height: 1.45; }
.xlinks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.xlinks li { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--surface); }
.xlinks a { font-weight: 600; }
.xlinks span { display: block; font-size: .85rem; color: var(--muted); margin-top: 2px; }

/* publisher badge */
.pub { display: flex; align-items: center; gap: 10px; margin-top: 16px; text-decoration: none; color: var(--muted); font-size: .86rem; }
.pub svg { width: 30px; height: 30px; flex: none; }
.pub b { display: block; color: var(--ink); font-family: var(--font-display); font-weight: 600; font-size: 1rem; letter-spacing: -.005em; }
.pub:hover b { text-decoration: underline; }
.pub-card { display: flex; gap: 18px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; background: var(--surface); }
.pub-card svg { width: 64px; height: 64px; flex: none; }
.pub-card p { margin: 0; }
@media print { .xvideo { display: none; } }

/* Informed Surgery band */
.parentbar { background: var(--bg-deep, var(--bg)); border-bottom: 1px solid var(--line); }
.parentbar-inner { max-width: var(--page); margin: 0 auto; padding: 10px clamp(18px, 4vw, 32px); display: flex; align-items: center; justify-content: flex-start; gap: 6px 18px; }
.parentbar-tag { font-size: .82rem; color: var(--muted); letter-spacing: .01em; margin-left: auto; }
.parentbar-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); order: -1; }
.parentbar-brand svg { width: 42px; height: 42px; flex: none; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.pb-word { display: flex; flex-direction: column; line-height: 1; }
.pb-word b { font-family: var(--font-display); font-weight: 600; font-size: 1.42rem; letter-spacing: -.01em; color: var(--ink); }
.pb-word small { font-family: var(--font-body); font-weight: 600; font-size: .7rem; letter-spacing: .28em; text-transform: uppercase; color: #3E6A5C; margin-top: 4px; }
.parentbar-brand:hover .pb-word b { text-decoration: underline; text-underline-offset: 3px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pb-word small { color: #8FC1B0; } }
@media (max-width: 560px) { .parentbar-tag { display: none; } .parentbar-inner { justify-content: flex-start; padding-block: 8px; } .pb-word b { font-size: 1.24rem; } .parentbar-brand svg { width: 36px; height: 36px; } }
@media print { .parentbar { display: none; } }

/* content photos */
.photo { margin: 8px 0; }
.photo img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); }
.photo figcaption { font-size: .85rem; color: var(--muted); margin-top: 10px; line-height: 1.45; }

/* implant material illustrations */
.mat-figs { display: grid; grid-template-columns: repeat(var(--n, 1), minmax(0, 1fr)); gap: 12px; max-width: calc(var(--n, 1) * 300px); }
.mat-figs figure { margin: 0; }
.mat-figs img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.mat-figs figcaption { font-size: .8rem; color: var(--muted); margin-top: 6px; line-height: 1.35; }
.mat-note { font-size: .85rem; color: var(--muted); margin: 0 0 10px; }
@media (max-width: 700px) { .mat-figs { grid-template-columns: 1fr 1fr; max-width: none; } .mat-figs[style*="--n:1"] { grid-template-columns: 1fr; max-width: 360px; } }

/* before/after photo hero */
.hero-figure.hero-photo { background: var(--surface); align-self: center; }
.hero-ba { position: relative; }
.hero-figure.hero-photo picture, .hero-figure.hero-photo img { aspect-ratio: 1740 / 853; object-fit: cover; }
.ba-tag { position: absolute; bottom: 10px; font-size: .78rem; font-weight: 600; letter-spacing: .01em; color: #22211E; background: rgba(255,255,255,.88); border-radius: 999px; padding: 4px 10px; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.ba-l { left: 10px; } .ba-r { left: calc(50% + 10px); }
@media (max-width: 420px) { .ba-tag { font-size: .7rem; padding: 3px 8px; bottom: 7px; } }

/* image at the top of the lead guide card */
.feature.lead { align-content: start; overflow: hidden; }
.feature-media { display: block; margin: -32px -32px 14px; }
.feature-media img { display: block; width: 100%; height: auto; aspect-ratio: 800 / 420; object-fit: cover; }
.feature.lead:hover .feature-media img { filter: saturate(1.08); }
@media (max-width: 820px) { .feature-media { margin: -32px -32px 12px; } }

/* knee X-ray hero */
.hero-figure.hero-xray { background: #111; }
.hero-figure.hero-xray picture, .hero-figure.hero-xray img { aspect-ratio: 712 / 742; object-fit: cover; }

/* keep article grids from growing past the screen */
main.article { grid-template-columns: minmax(0, 1fr); }
main.article > *, .article section > *, .article .gfx > *, .pub-card > * { min-width: 0; }
.pub-card { flex-wrap: wrap; }
h1, h2, .lede { overflow-wrap: break-word; }
.article ul.xlinks { padding-left: 0; max-width: var(--measure); }

/* robotic systems page */
.sy-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 4px; }
.sy-jump a { border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 14px; text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--accent-ink); background: var(--surface); }
.sy-jump a:hover { background: var(--accent-wash); }
.sy-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 22px 22px 18px; display: grid; gap: 14px; scroll-margin-top: 90px; }
.sy-card header { display: grid; gap: 2px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.sy-card h3 { font-size: 1.6rem; margin: 0; }
.sy-maker { margin: 0; color: var(--muted); font-weight: 600; }
.sy-track { margin: 4px 0 0; font-size: .92rem; color: var(--accent-ink); }
.sy-cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; }
.sy-card h4 { margin: 0 0 8px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-family: var(--font-body); }
.sy-card ul { margin: 0; padding-left: 1.15em; display: grid; gap: 8px; }
.sy-trade { margin: 12px 0 0; font-size: .92rem; background: var(--bg); border-radius: var(--radius); padding: 10px 12px; }
.sy-tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-left: 2px solid var(--accent-wash); }
.sy-tl li { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 0 0 12px 14px; position: relative; font-size: .93rem; line-height: 1.4; }
.sy-tl li::before { content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.sy-yr { font-weight: 700; color: var(--accent-ink); }
@media (max-width: 720px) { .sy-cols { grid-template-columns: 1fr; } .sy-card { padding: 18px 16px 14px; } }
.qs-why { list-style: none; counter-reset: q; padding: 0; margin: 0; display: grid; gap: 14px; max-width: var(--measure); }
.qs-why > li { counter-increment: q; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 16px 18px 14px 58px; position: relative; }
.qs-why > li::before { content: counter(q); position: absolute; left: 16px; top: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--surface); font-weight: 700; display: grid; place-items: center; font-size: .9rem; }
.qs-why .q { display: block; font-family: var(--font-display); font-size: 1.15rem; line-height: 1.3; color: var(--ink); }
.qs-why .why { margin: 8px 0 0; color: var(--ink-2); font-size: .97rem; }
.qs-why .why b { color: var(--accent-ink); }

/* sy-minw */
#content > *, #robotic-systems > * { min-width: 0; }

/* news page */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.news-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.news-filters button { font: inherit; font-size: .9rem; font-weight: 600; border: 1px solid var(--line-strong); background: var(--surface); color: var(--accent-ink); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.news-filters button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.news-list { max-width: none !important; list-style: none; margin: 0; padding: 0 !important; display: grid; gap: 16px !important; }
.news-item { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 18px 20px; display: grid; gap: 8px; max-width: none !important; }
.news-item[hidden] { display: none; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .85rem; color: var(--muted); }
.news-tag { font-weight: 700; font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-wash); border-radius: 999px; padding: 3px 9px; }
.news-item h3 { font-size: 1.22rem; line-height: 1.3; margin: 0; }
.news-item p { margin: 0; }
.news-why { background: var(--bg); border-radius: var(--radius); padding: 10px 12px; font-size: .95rem; }
.news-src { font-size: .88rem; color: var(--muted); }
.news-src a { overflow-wrap: anywhere; }
.news-home { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.news-home a { display: grid; gap: 6px; height: 100%; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 16px 18px; text-decoration: none; color: var(--ink); }
.news-home a:hover { border-color: var(--line-strong); }
.news-home .d { font-size: .82rem; color: var(--muted); }
.news-home strong { font-family: var(--font-display); font-size: 1.08rem; line-height: 1.3; font-weight: 600; }
@media (max-width: 760px) { .news-home { grid-template-columns: 1fr; } }

/* Informed Surgery social links */
.pb-social { display: inline-flex; gap: 4px; align-items: center; }
.parentbar-tag + .pb-social { margin-left: 4px; }
.pb-soc, .fs-soc { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; color: var(--muted); }
.pb-soc:hover, .fs-soc:hover { color: var(--ink); background: var(--line); }
.foot-social { display: flex; align-items: center; gap: 4px; margin-top: 12px; }
.foot-social span { font-size: .86rem; color: var(--muted); margin-right: 6px; }
@media (max-width: 560px) { .parentbar-inner .pb-social { margin-left: auto; } }

/* 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; }
