/* Dr Sunit Pani — clean and calm: warm off-white and light grey, system type, pill buttons, flat cards. */

:root {
  /* Warm neutrals: never pure white or pure black behind the content. */
  --bg: #fbfaf8;
  --bg-alt: #f3f1ed;
  --surface: #fffefc;
  --ink: #1c1b19;
  --ink-2: #6a6761;
  --ink-3: #87837c;
  --line: #dbd7d0;
  --blue: #0071e3;
  --blue-hover: #0062c4;
  --link: #0066cc;
  --dark: #161513;
  --dark-card: #22201d;
  --dark-ink: #f4f2ee;
  --dark-ink-2: #a6a29b;
  --dark-link: #2997ff;
  --gold: #ffd60a;
  --fill: #ebe8e2;          /* grey of round buttons and photo backdrops */
  --fill-hover: #dfdcd5;
  --track: #e6e3dd;         /* grey behind pills and switches */
  --wa: #0d7a3e;            /* WhatsApp green */
  --wa-hover: #0a6533;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;   /* each device's own font; nothing downloaded */
  --max: 1120px;
  --gutter: 22px;
  --radius-lg: 16px;
  --radius: 12px;
  --pill: 980px;
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);       /* Apple's long, soft ease for reveals */
  --ease-ui: cubic-bezier(0.25, 1, 0.5, 1);         /* critically damped feel for controls */
  --section-pad: clamp(80px, 10vw, 140px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 56px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.016em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(0, 113, 227, 0.2); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--pill); }
.skip:focus { top: 8px; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: 860px; }

section { padding-block: var(--section-pad); }

.section-title {
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.07;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
}
.section-sub {
  font-size: clamp(19px, 1.6vw, 21px);
  line-height: 1.38;
  color: var(--ink-2);
  text-align: center;
  max-width: 640px;
  margin: 14px auto 0;
  letter-spacing: -0.01em;
}

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 22px;
  border: 0; border-radius: var(--pill);
  background: var(--blue); color: #fff;
  font-size: 17px; font-weight: 400; line-height: 1.3; letter-spacing: -0.02em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease, transform 120ms ease-out;
}
.btn:active { transform: scale(0.97); }
.btn-ghost { background: transparent; color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.btn-lg { padding: 14px 30px; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--blue-hover); }
  .btn-ghost:hover { background: var(--blue); color: #fff; }
}
.ctas { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.more { color: var(--link); text-decoration: none; display: inline-flex; align-items: center; }
.more::after {
  content: ""; width: 0.5em; height: 0.5em; margin-left: 0.3em;
  border-right: 1.6px solid currentColor; border-top: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(1px); transition: transform 200ms var(--ease-ui);
}
@media (hover: hover) and (pointer: fine) {
  .more:hover { text-decoration: underline; }
}

/* ---------- Global nav (translucent) ---------- */
.gnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 248, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  transition: box-shadow 200ms ease;
}
.gnav.scrolled { box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08); }
.gnav-in { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); height: 52px; display: flex; align-items: center; gap: 24px; }
.gnav-brand { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; margin-right: auto; }
.gnav-links { display: flex; gap: 30px; }
.gnav-links a { font-size: 12px; letter-spacing: -0.01em; text-decoration: none; color: var(--ink); opacity: 0.8; transition: opacity 200ms ease; }
@media (hover: hover) and (pointer: fine) { .gnav-links a:hover { opacity: 1; } }
.gnav-book {
  font-size: 12px; text-decoration: none; color: #fff; background: var(--blue);
  padding: 5px 13px; border-radius: var(--pill); transition: background-color 200ms ease;
}
@media (hover: hover) and (pointer: fine) { .gnav-book:hover { background: var(--blue-hover); } }
.gnav-wa {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; text-decoration: none;
  color: #fff; background: var(--wa); padding: 5px 12px 5px 10px; border-radius: var(--pill); transition: background-color 200ms ease, transform 120ms ease-out;
}
.gnav-wa svg { width: 14px; height: 14px; fill: currentColor; flex: none; }
@media (hover: hover) and (pointer: fine) { .gnav-wa:hover { background: var(--wa-hover); } }
.gnav-wa:active { transform: scale(0.96); }
.gnav-in .gnav-wa + .gnav-book { margin-left: -14px; }
.gnav-menu { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; margin-right: -12px; }
.gnav-menu span { position: absolute; left: 14px; width: 17px; height: 1.5px; background: var(--ink); border-radius: 2px; transition: transform 320ms var(--ease-ui); }
.gnav-menu span:first-child { top: 18px; }
.gnav-menu span:last-child { top: 25px; }
.gnav-menu[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.gnav-menu[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.mobile-menu {
  padding: 12px var(--gutter) 32px;
  /* Never taller than the screen below the nav bar, so every link can be reached on short screens and in landscape. */
  max-height: calc(100vh - 52px); max-height: calc(100dvh - 52px); overflow-y: auto; overscroll-behavior: contain;
}
.mobile-menu a { display: block; padding: 8px 0; font-size: 28px; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; }
.mobile-menu:not([hidden]) a { animation: menu-in 420ms var(--ease-ui) both; }
.mobile-menu a:nth-child(2) { animation-delay: 30ms; }
.mobile-menu a:nth-child(3) { animation-delay: 60ms; }
.mobile-menu a:nth-child(4) { animation-delay: 90ms; }
.mobile-menu a:nth-child(5) { animation-delay: 120ms; }
.mobile-menu a:nth-child(6) { animation-delay: 150ms; }
.mobile-menu a:nth-child(7) { animation-delay: 180ms; }
.mobile-menu a:nth-child(8) { animation-delay: 210ms; }
.mobile-menu a:nth-child(9) { animation-delay: 240ms; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(48px, 7vw, 96px) clamp(72px, 9vw, 120px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero-title { font-size: clamp(48px, 6.4vw, 84px); line-height: 1.04; font-weight: 700; letter-spacing: -0.03em; }
.hero-sub { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.17; font-weight: 600; letter-spacing: -0.02em; margin-top: 14px; }
.hero-meta { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.4; color: var(--ink-2); margin-top: 16px; max-width: 34ch; }
.hero .ctas { margin-top: 32px; }
.hero-creds { font-size: 14px; color: var(--ink-2); margin-top: 28px; letter-spacing: -0.01em; }
.hero-media { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 5; background: #cdcac4; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }

/* ---------- Highlights ---------- */
.highlights { background: var(--bg-alt); }
.hl-list { max-width: 1000px; margin: 56px auto 0; padding: 0; list-style: none; counter-reset: hl; border-top: 1px solid var(--line); }
.hl-item { counter-increment: hl; display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1.2fr); gap: 6px 32px; align-items: baseline; padding: 30px 0; border-bottom: 1px solid var(--line); }
.hl-item::before { content: counter(hl, decimal-leading-zero); font-size: 15px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.hl-big { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.1; font-weight: 700; letter-spacing: -0.025em; }
.nowrap { white-space: nowrap; }
.hl-medal { display: inline-block; width: auto; height: 1.05em; vertical-align: -0.12em; margin-left: 0.12em; }
.hl-rating { display: flex; align-items: center; gap: 12px; }
.g-stars { display: inline-flex; }
.g-stars svg { display: block; width: 120px; height: 24px; }
@media (max-width: 734px) { .g-stars svg { width: 100px; height: 20px; } }
.hl-text h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.hl-text p { font-size: 16px; color: var(--ink-2); margin-top: 6px; line-height: 1.45; }

/* ---------- Treatment tiles ---------- */
.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 56px; }
.tile {
  background: var(--bg-alt); border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column; text-align: center;
  padding: 52px 40px 0; min-height: 600px;
}
.tile h3 { font-size: clamp(32px, 3.4vw, 44px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; }
.tile-copy p { font-size: 19px; line-height: 1.4; max-width: 30ch; margin: 10px auto 14px; letter-spacing: -0.015em; }
.tile-media { margin-top: auto; padding-top: 32px; display: flex; justify-content: center; align-items: flex-end; flex: 1; }
.plate img { mix-blend-mode: multiply; filter: grayscale(1) contrast(1.12); }
.tile-media.plate img { height: 320px; width: auto; transition: transform 700ms var(--ease); }
.tile-photo { padding-bottom: 40px; }
.tile-photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); filter: grayscale(1); transition: transform 700ms var(--ease); }
.tile-dark { background: var(--dark); color: var(--dark-ink); }
.tile-dark .more { color: var(--dark-link); }
.tile-dark .tile-photo img, .tile-photo img.keep-colour { filter: none; }
.tile-photo img.pos-troch { object-position: 50% 45%; }

/* ---------- Injury explorer ---------- */
.explorer { background: var(--bg-alt); }
.segmented {
  position: relative; display: flex; width: fit-content; margin: 40px auto 0;
  background: var(--track); border-radius: var(--pill); padding: 4px;
}
.segmented button {
  position: relative; z-index: 1; border: 0; background: none; cursor: pointer;
  padding: 10px 24px; border-radius: var(--pill); font-size: 15px; font-weight: 500; color: #55524d;
  transition: color 200ms ease;
}
.segmented button[aria-selected="true"] { color: var(--ink); }
.seg-thumb {
  position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: var(--pill);
  background: var(--surface); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 1px 1px rgba(0, 0, 0, 0.04);
}
.segmented.is-ready .seg-thumb { transition: transform 250ms var(--ease-ui), width 250ms var(--ease-ui); }
.ex-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 20px; margin-top: 32px; align-items: start; }
.ex-fig { background: var(--surface); border-radius: var(--radius-lg); padding: 36px 28px 24px; display: grid; justify-items: center; gap: 16px; }
.ex-stage { position: relative; }
.ex-stage img { height: min(62vh, 560px); width: auto; transition: opacity 240ms ease; }
.ex-fig figcaption { font-size: 12px; color: var(--ink-2); }
.ex-fig.is-xray { background: #000; }
.ex-fig.is-xray img { mix-blend-mode: normal; filter: none; border-radius: var(--radius); max-width: 100%; height: auto; max-height: min(62vh, 560px); width: auto; }
.ex-fig.is-xray figcaption { color: #a1a1a6; }
.spots { position: absolute; inset: 0; }
.spot {
  position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; padding: 0; border: 0; border-radius: 50%;
  background: var(--surface); cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  transition: transform 300ms var(--ease-ui), background-color 200ms ease;
}
.spot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); transition: background-color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .spot:hover { transform: scale(1.12); } }
.spot.is-on { background: var(--blue); transform: scale(1.15); }
.spot.is-on::before { background: var(--surface); }
.ex-body { display: grid; gap: 16px; }
.parts { display: flex; flex-wrap: wrap; gap: 8px; }
.parts button {
  border: 0; cursor: pointer; background: var(--surface); border-radius: var(--pill); padding: 10px 18px;
  font-size: 15px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease, transform 120ms ease-out;
}
@media (hover: hover) and (pointer: fine) { .parts button:hover { box-shadow: inset 0 0 0 1px var(--ink-3); } }
.parts button:active { transform: scale(0.97); }
.parts button[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.readout { background: var(--surface); border-radius: var(--radius-lg); padding: 36px; display: grid; gap: 24px; }
.readout h3 { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.14; }
.readout dl { display: grid; gap: 18px; }
.readout dt { font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 2px; }
.readout dd { font-size: 17px; }
.readout .btn { justify-self: start; }
.readout-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.readout-actions .more { font-size: 15px; }
.readouts { display: grid; gap: 16px; }
.readout { scroll-margin-top: 72px; }
.ex-group { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin-top: 24px; }
/* With scripts on, the tool shows one injury at a time; without them, everything is readable in one list. */
.js .ex-group, .js .readout:not(.is-on) { display: none; }
html:not(.js) .segmented, html:not(.js) .ex-fig, html:not(.js) .parts { display: none; }
html:not(.js) .ex-grid { grid-template-columns: 1fr; }
.ex-note { font-size: 12px; color: var(--ink-2); padding-inline: 8px; }

/* ---------- Training (dark) ---------- */
/* ---------- About me: a short first-person story, with a card of places and languages ---------- */
.about { background: var(--bg-alt); }
.about-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.about-title { font-size: clamp(32px, 4.4vw, 56px); line-height: 1.07; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 24px; }
.about-copy p { font-size: clamp(17px, 1.4vw, 19px); line-height: 1.55; max-width: 62ch; }
.about-copy p + p { margin-top: 16px; }
.about-card { background: var(--surface); border-radius: var(--radius-lg); padding: 32px; margin-top: 8px; }
.about-card h3 { font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 12px; }
.about-card h3:not(:first-child) { margin-top: 26px; }
.about-card p { font-size: 17px; }
.about-places { display: grid; gap: 12px; }
.about-places li { display: flex; align-items: flex-start; gap: 12px; font-size: 17px; }
.about-places img { flex: none; width: 21px; height: auto; border-radius: 2px; margin-top: 5px; }
.about-places img.about-flag-np { width: 12px; margin-inline: 4.5px; border-radius: 0; }
.about-place-note { display: block; font-size: 15px; color: var(--ink-2); }   /* its own line under the city */
.about-langs-h { border-top: 1px solid var(--line); padding-top: 22px; }
.about-langs { display: flex; flex-wrap: wrap; gap: 8px; }
.about-langs li { font-size: 15px; padding: 6px 14px; border-radius: var(--pill); background: var(--bg); border: 1px solid var(--line); }
@media (max-width: 834px) { .about-grid { grid-template-columns: 1fr; } .about-card { margin-top: 0; } }
@media (max-width: 734px) { .about-card { padding: 24px; border-radius: var(--radius-lg); } }

/* ---------- Homepage: one line to the injury checker, and a peek at the gallery ---------- */
.treat-links { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; }
.treat-links p { font-size: 16px; line-height: 1.45; color: var(--ink-2); margin-top: 12px; }
@media (max-width: 734px) { .treat-links { grid-template-columns: 1fr; gap: 28px; } }
.gal-preview .alb-grid { margin-top: 48px; }
.gal-more { text-align: center; margin-top: 36px; font-size: clamp(17px, 1.5vw, 19px); }
.gal-more .more { font-size: inherit; }
@media (max-width: 1068px) { .alb-grid-preview .alb:nth-child(3) { display: none; } }

/* ---------- Injury checker page ---------- */
.explorer-page .conf-title { text-align: center; }

.training { background: var(--dark); color: var(--dark-ink); }
.training .section-sub { color: var(--dark-ink-2); }
.train-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 56px; }
.train-card { background: var(--dark-card); border-radius: var(--radius-lg); padding: 40px 36px; }
.train-when { font-size: 14px; font-weight: 600; color: var(--dark-link); margin-bottom: 12px; }
.flag { display: inline-block; height: 0.95em; width: auto; vertical-align: -0.12em; margin-left: 0.3em; border-radius: 2px; }
.flag-np { height: 1.4em; vertical-align: -0.32em; border-radius: 0; }
.train-card-photo { display: grid; grid-template-columns: 1.1fr 1fr; column-gap: 44px; align-content: center; padding: 20px 44px 20px 20px; }
.train-card-photo { grid-template-rows: 1fr auto auto auto 1fr; }
.train-card-photo .train-photo { grid-row: 1 / -1; }
.train-card-photo > .train-when { grid-row: 2; }
.train-card-photo > h3 { grid-row: 3; }
.train-card-photo > p:last-child { grid-row: 4; }
.train-photo { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; align-self: center; }

.train-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.train-photo img.pos-low { object-position: 50% 62%; }
.train-photo[data-gallery] { position: relative; overflow: visible; }
.train-photo[data-gallery] img { border-radius: var(--radius); }
/* Photo dots sit under the picture, not over the people in it. */
.train-card .train-photo[data-gallery] { margin-bottom: 44px; }
.train-photo .conf-dots { top: calc(100% + 10px); bottom: auto; background: rgba(255, 255, 255, 0.12); }
.train-photo[data-gallery] img { position: absolute; inset: 0; opacity: 0; transition: opacity 600ms var(--ease); }
.train-photo[data-gallery] img.is-on { opacity: 1; }
.train-photo[data-count] { cursor: pointer; }
.train-card-photo.flip { grid-template-columns: 1fr 1.1fr; padding: 20px 20px 20px 44px; }
.train-card-photo.flip .train-photo { grid-column: 2; }
.train-card-photo.flip > :not(.train-photo) { grid-column: 1; }
.train-card h3 { font-size: clamp(22px, 2.2vw, 28px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.train-card p:last-child { color: var(--dark-ink-2); margin-top: 12px; }
.train-more { display: grid; grid-template-columns: 1fr 1.4fr 1.4fr; gap: 32px; margin-top: 56px; padding-top: 40px; border-top: 1px solid #47443f; }
.train-more h3 { font-size: 14px; font-weight: 600; color: var(--ink-3); margin-bottom: 10px; }
.train-more p { font-size: 15px; line-height: 1.6; }

/* ---------- Faculty scroller ---------- */
.scroller {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 56px max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))) 12px;
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
}
.scroller::-webkit-scrollbar { display: none; }
.scroller:focus-visible { outline-offset: -4px; }
.fac-card {
  flex: 0 0 clamp(280px, 30vw, 360px); min-height: 340px; scroll-snap-align: start;
  background: var(--bg-alt); border-radius: var(--radius-lg); padding: 36px 32px;
  display: flex; flex-direction: column;
}
.fac-tag { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.fac-card h3 { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.14; margin: 10px 0 14px; }
.fac-card p:last-child { color: var(--ink-2); margin-top: auto; }
.fac-card-dark { background: var(--dark); color: var(--dark-ink); }
.fac-card-dark .fac-tag { color: var(--gold); }
.fac-card-dark p:last-child { color: var(--dark-ink-2); }
.paddles { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 20px; }
.paddles-link { margin-right: auto; }
.paddle {
  width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--fill); cursor: pointer; padding: 0;
  display: grid; place-items: center; transition: background-color 200ms ease, opacity 200ms ease, transform 120ms ease-out;
}
.paddle svg { width: 36px; height: 36px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (pointer: fine) { .paddle:hover { background: var(--fill-hover); } }
.paddle:active { transform: scale(0.94); }
.paddle:disabled { opacity: 0.4; cursor: default; }

/* ---------- Research ---------- */
.research { background: var(--bg-alt); }
.paper-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 56px; }
.paper {
  background: var(--surface); border-radius: var(--radius-lg); padding: 36px; display: flex; flex-direction: column; gap: 10px;
}
.paper-journal { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.paper h3 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.17; }
.paper p:not(.paper-journal) { color: var(--ink-2); }
.paper .more { margin-top: auto; padding-top: 8px; }

/* ---------- Reviews ---------- */
.reviews { text-align: center; }
.rv-score { font-size: clamp(80px, 9vw, 120px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.rv-stars { display: flex; justify-content: center; margin-top: 12px; }   /* same partial fifth star as the highlights */
.rv-stars svg { display: block; width: 150px; height: 30px; }
.rv-h { font-size: clamp(19px, 1.8vw, 24px); font-weight: 600; letter-spacing: -0.02em; margin-top: 12px; }
.rv-sub { font-size: clamp(21px, 2vw, 28px); font-weight: 600; letter-spacing: -0.02em; text-align: left; margin-top: clamp(56px, 6vw, 80px); }
.rv-scroller { padding-top: 28px; text-align: left; }
.rv-card {
  flex: 0 0 clamp(290px, 31vw, 380px); scroll-snap-align: start;
  background: var(--bg-alt); border-radius: var(--radius-lg); padding: 32px 30px;
  display: flex; flex-direction: column; gap: 18px;
}
.rv-card blockquote { margin: 0; }
.rv-card blockquote p { font-size: 19px; line-height: 1.42; letter-spacing: -0.015em; }
.rv-card-who { margin-top: auto; font-weight: 600; display: grid; gap: 2px; }
.rv-card-who span { font-size: 14px; font-weight: 400; color: var(--ink-2); }
.rv-note { margin-right: auto; font-size: 12px; color: var(--ink-2); }
@media (max-width: 734px) {
  .rv-card { flex-basis: 84vw; border-radius: var(--radius-lg); padding: 28px 24px; }
  .rv-card blockquote p { font-size: 17px; }
}

/* ---------- FAQ ---------- */
.faq { background: var(--bg-alt); }
.acc { margin-top: 48px; border-top: 1px solid var(--line); }
.acc details { border-bottom: 1px solid var(--line); }
.acc summary {
  list-style: none; cursor: pointer; padding: 26px 0; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  font-size: clamp(19px, 1.8vw, 24px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: "+"; flex: none; font-size: 28px; font-weight: 300; line-height: 1; color: var(--ink-2);
  transition: transform 250ms var(--ease-ui);
}
.acc details[open] summary::after { transform: rotate(45deg); }
.acc details p { color: var(--ink-2); padding: 0 0 28px; max-width: 64ch; }
.acc details p:not(:last-child) { padding-bottom: 12px; }   /* paragraphs within one answer sit closer */
.acc details[open] p { animation: acc-in 420ms var(--ease-ui); }
@keyframes acc-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Clinics & booking ---------- */
.clinic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 56px; }
.clinic-card { background: var(--bg-alt); border-radius: var(--radius-lg); padding: 40px; display: flex; flex-direction: column; }
.clinic-card h3 { font-size: clamp(28px, 2.8vw, 36px); font-weight: 600; letter-spacing: -0.025em; }
.clinic-addr { margin-top: 12px; max-width: 34ch; }
.clinic-hours { color: var(--ink-2); margin-top: 4px; }
.clinic-card .ctas { margin-top: 28px; }
.clinic-links { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; font-size: 15px; }
.clinic-num { color: var(--ink-2); }
.book { margin-top: 20px; background: var(--bg-alt); border-radius: var(--radius-lg); padding: 40px; }
.book-head h3 { font-size: clamp(24px, 2.4vw, 32px); font-weight: 600; letter-spacing: -0.02em; }
.book-head p { color: var(--ink-2); margin-top: 6px; }
.book-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 28px 0; }
.book label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.book input, .book select {
  width: 100%; height: 52px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  font-size: 17px; font-weight: 400; color: var(--ink);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.book input:focus, .book select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.18); }
.book-msg { font-size: 15px; color: var(--ink-2); margin-top: 16px; }

/* ---------- Patient guides ---------- */
.guide-hero { text-align: center; padding-bottom: clamp(40px, 5vw, 64px); }
.guide-byline { font-size: 14px; line-height: 1.45; color: var(--ink-2); text-align: center; margin-top: 16px; }
.guide-byline a { color: inherit; }
.guide-switch { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 36px; background: var(--track); border-radius: var(--pill); }
.guide-switch a { padding: 9px 22px; border-radius: var(--pill); font-size: 15px; font-weight: 500; color: #55524d; text-decoration: none; transition: background-color 200ms ease, color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .guide-switch a:hover { color: var(--ink); } }
.guide-switch a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 1px 1px rgba(0, 0, 0, 0.04); }
.chipnav { position: sticky; top: 52px; z-index: 40; background: rgba(251, 250, 248, 0.88); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06); }
.chipnav-in { max-width: var(--max); margin-inline: auto; padding: 10px var(--gutter); display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; justify-content: center; }
.chipnav-in::-webkit-scrollbar { display: none; }
.chipnav a { flex: none; padding: 7px 16px; border-radius: var(--pill); font-size: 14px; font-weight: 500; text-decoration: none; color: var(--ink); background: var(--bg-alt); transition: background-color 200ms ease, color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .chipnav a:hover { background: var(--fill); } }
.chipnav a[aria-current] { background: var(--ink); color: #fff; }
@media (hover: hover) and (pointer: fine) { .chipnav a[aria-current]:hover { background: var(--ink); color: #fff; } }
.guide-group { padding-top: clamp(56px, 7vw, 96px); padding-bottom: 0; }
.guide-group:last-of-type { padding-bottom: var(--section-pad); }
.guide-group-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.guide-group-head h2 { font-size: clamp(32px, 4vw, 48px); font-weight: 600; letter-spacing: -0.03em; }
.guide-plate { flex: none; }
.guide-plate img { height: 88px; width: auto; }
.guide-item { padding: 44px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 120px; }
.guide-item h3 { font-size: clamp(26px, 2.8vw, 34px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.12; }
.guide-what { font-size: clamp(19px, 1.6vw, 21px); line-height: 1.4; color: var(--ink-2); margin-top: 10px; max-width: 46ch; }
.guide-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 40px; margin-top: 28px; }
.guide-facts dt { font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.guide-facts dd { font-size: 17px; line-height: 1.5; }
.guide-note { margin-top: 28px; padding: 18px 22px; background: var(--bg-alt); border-radius: var(--radius); max-width: 72ch; }
.guide-note strong { font-weight: 600; }
.guide-cta { background: var(--bg-alt); text-align: center; }
.guide-cta-btns { justify-content: center; margin-top: 32px; }
.guide-disclaimer { font-size: 12px; color: var(--ink-2); margin-top: 32px; }

/* Fracture guide */
.fx-emergency { padding-top: 0; padding-bottom: clamp(56px, 7vw, 96px); }
.fx-em-card { background: #fff0f0; border-radius: var(--radius-lg); padding: 36px 40px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px 48px; align-items: center; }
.fx-em-card h2 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; letter-spacing: -0.02em; color: #8a1c1c; }
.fx-em-card h2 a { color: inherit; }
.fx-flags { margin-top: 16px; display: grid; gap: 8px; }
.fx-flags li { padding-left: 22px; position: relative; font-size: 17px; }
.fx-flags li::before { content: ""; position: absolute; left: 4px; top: 0.6em; width: 8px; height: 8px; border-radius: 50%; background: #c62828; }
.fx-em-note { font-size: 15px; color: #6b3a3a; }
.fx-em-note a { color: #8a1c1c; font-weight: 600; }
.fx-firstaid { background: var(--bg-alt); }
.fx-steps { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.fx-step { background: var(--surface); border-radius: var(--radius); padding: 28px; }
.fx-step-n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.fx-step h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.fx-step p { color: var(--ink-2); margin-top: 6px; font-size: 16px; }
.fx-donts { margin-top: 20px; background: var(--surface); border-radius: var(--radius); padding: 28px 32px; }
.fx-donts h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 12px; }
.fx-donts ul { display: grid; gap: 10px; }
.fx-donts li { padding-left: 26px; position: relative; }
.fx-donts li::before { content: "×"; position: absolute; left: 2px; top: -1px; font-size: 20px; font-weight: 600; color: #c62828; }
.fx-why { background: var(--dark); color: var(--dark-ink); }
.fx-why .section-sub { color: var(--dark-ink-2); max-width: 680px; }
.fx-why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 56px; }
.fx-why-card { background: var(--dark-card); border-radius: var(--radius-lg); padding: 32px 28px; }
.fx-why-card h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.fx-why-card p { color: var(--dark-ink-2); margin-top: 10px; font-size: 16px; }
.fx-after-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.fx-h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.08; }
.fx-after-list { grid-template-columns: 1fr 1fr; }
.fx-warn { background: #fff7e6; border-radius: var(--radius-lg); padding: 32px; }
.fx-warn h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; color: #7a4a00; }
.fx-warn ul { margin-top: 14px; display: grid; gap: 10px; }
.fx-warn li { padding-left: 22px; position: relative; }
.fx-warn li::before { content: ""; position: absolute; left: 4px; top: 0.6em; width: 8px; height: 8px; border-radius: 50%; background: #e09000; }
.fx-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; text-align: left; }
.fx-contact-card { background: var(--surface); border-radius: var(--radius-lg); padding: 32px; }
.fx-contact-card h3 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 18px; }
@media (max-width: 1068px) {
  .guide-facts { grid-template-columns: 1fr 1fr; }
  .fx-steps { grid-template-columns: 1fr 1fr; }
  .fx-why-grid { grid-template-columns: 1fr 1fr; }
  .chipnav-in { justify-content: flex-start; }
}
@media (max-width: 734px) {
  .chipnav { top: 48px; }
  .guide-group-head h2 { font-size: 30px; }
  .guide-plate img { height: 64px; }
  .guide-item { padding: 36px 0; }
  .guide-facts, .fx-steps, .fx-why-grid, .fx-after-grid, .fx-after-list, .fx-contact, .fx-em-card { grid-template-columns: 1fr; }
  .fx-em-card, .fx-donts, .fx-warn, .fx-contact-card { padding: 26px 22px; border-radius: var(--radius-lg); }
  .fx-contact-card .ctas .btn { flex: 1; }
  .guide-switch a { padding: 8px 16px; font-size: 14px; }
}

/* ---------- Connect ---------- */
.connect { background: var(--bg-alt); }
.connect-group { margin-top: 56px; }
.connect-group + .connect-group { margin-top: 40px; }
.connect-label { font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 14px; }
.connect-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.connect-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1068px) { .connect-grid-4 { grid-template-columns: repeat(2, 1fr); } }
.connect-card {
  display: grid; gap: 4px; height: 100%; padding: 28px 28px 26px; text-decoration: none;
  background: var(--surface); border-radius: var(--radius); transition: transform 120ms ease-out;
}
.connect-logo { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px; border-radius: var(--radius); background: var(--brand, var(--ink)); }
.connect-logo img { display: block; width: 24px; height: 24px; }
.connect-name { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.connect-handle { font-size: 15px; color: var(--ink-2); }
.connect-card .more { margin-top: 14px; font-size: 15px; }
.connect-card:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) {
  .connect-card:hover .more { text-decoration: underline; }
}
@media (max-width: 834px) {
  .connect-grid, .connect-grid-4 { grid-template-columns: 1fr; gap: 12px; }
  .connect-card { grid-template-columns: auto 1fr auto; align-items: center; column-gap: 14px; row-gap: 2px; padding: 18px 20px; }
  .connect-logo { grid-row: 1 / span 2; width: 40px; height: 40px; margin: 0; border-radius: 11px; }
  .connect-logo img { width: 22px; height: 22px; }
  .connect-name { font-size: 20px; grid-column: 2; }
  .connect-handle { grid-column: 2; }
  .connect-card .more { grid-column: 3; grid-row: 1 / span 2; align-self: center; margin-top: 0; }
}
@media (max-width: 480px) {
  .connect-card { grid-template-columns: auto 1fr; }
  .connect-card .more { grid-column: 2; grid-row: auto; margin-top: 8px; }
}

/* ---------- Footer ---------- */
.foot { background: var(--bg-alt); color: var(--ink-2); font-size: 12px; line-height: 1.4; padding: 32px 0 24px; letter-spacing: -0.01em; }
.foot-note { padding-bottom: 18px; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 0 0 28px; }
.foot-cols h3 { font-size: 12px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.foot-cols li { margin-bottom: 8px; }
.foot-cols a { color: #47443f; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .foot-cols a:hover { text-decoration: underline; } }
.foot-legal { display: flex; justify-content: space-between; gap: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.foot-legal a { color: #47443f; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .foot-legal a:hover { text-decoration: underline; } }
.foot-legal-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.book-privacy { font-size: 13px; line-height: 1.45; color: var(--ink-2); margin-top: 14px; }
.book-privacy a { color: var(--link); }

/* ---------- Privacy and terms pages ---------- */
.legal { padding-top: 0; }
.legal .wrap { max-width: 760px; }
.legal h2 { font-size: clamp(21px, 2vw, 24px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; margin-top: 44px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { font-size: 17px; line-height: 1.55; }
.legal p { margin-top: 12px; }
.legal ul { margin-top: 12px; padding-left: 1.2em; list-style: disc; }
.legal li + li { margin-top: 8px; }
.legal a { color: var(--link); }
.legal .legal-contact { list-style: none; padding-left: 0; }

/* ---------- Conferences page ---------- */
.gnav-links a[aria-current="page"] { opacity: 1; font-weight: 600; }
.mobile-menu a[aria-current="page"] { color: var(--ink-2); }
.conf-hero { text-align: center; padding-bottom: clamp(48px, 6vw, 72px); }
.conf-title { font-size: clamp(44px, 6vw, 80px); line-height: 1.05; font-weight: 700; letter-spacing: -0.03em; }
.conf-stats { display: flex; justify-content: center; gap: clamp(32px, 7vw, 96px); margin-top: 56px; flex-wrap: wrap; }
.conf-stats li { display: grid; gap: 6px; max-width: 180px; }
.conf-stat-num { font-size: clamp(44px, 5vw, 64px); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.conf-stat-label { font-size: 15px; color: var(--ink-2); line-height: 1.35; }
.conf-list { padding-top: 0; }
.conf-filter { margin-top: 0; }
.conf-year { margin-top: 64px; }
.conf-year[hidden] { display: none; }
.conf-year-h { font-size: clamp(28px, 3vw, 40px); font-weight: 600; letter-spacing: -0.025em; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.conf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.conf-card {
  background: var(--bg-alt); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column;
  transition: opacity 300ms ease;
}
.conf-card[hidden] { display: none; }
.conf-photo { position: relative; aspect-ratio: 16 / 10; background: var(--fill); overflow: hidden; margin: 0; }
.conf-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 600ms var(--ease), transform 700ms var(--ease);
}
.conf-photo img.is-on { opacity: 1; }
.conf-photo img.pos-top { object-position: 50% 25%; }
.conf-photo img.pos-bottom { object-position: 50% 80%; }
.conf-photo img.fit-contain { object-fit: contain; background: #111; }
.conf-card-gold .conf-photo { background: #111; }
.conf-photo[data-count] { cursor: pointer; }
.conf-dots {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 1;
  display: flex; gap: 6px; padding: 6px 10px; border-radius: var(--pill);
  background: rgba(0, 0, 0, 0.35); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.conf-dots button {
  width: 7px; height: 7px; padding: 0; border: 0; border-radius: var(--pill); cursor: pointer;
  background: rgba(255, 255, 255, 0.55); transition: width 400ms var(--ease-ui), background-color 200ms ease;
}
.conf-dots button[aria-current="true"] { width: 20px; background: #fff; }
.conf-dots button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.conf-card-feature { grid-column: 1 / -1; flex-direction: row; }
.conf-card-feature .conf-photo { flex: 0 0 56%; aspect-ratio: auto; min-height: 420px; }
.conf-card-feature .conf-body { padding: 44px 40px; justify-content: center; }
.conf-body { padding: 32px 32px 36px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.conf-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.pill { font-size: 12px; font-weight: 600; letter-spacing: -0.005em; padding: 5px 11px; border-radius: var(--pill); background: var(--track); color: var(--ink); }
.pill-blue { background: #e1ecfb; color: #0058b0; }
.pill-gold { background: var(--gold); color: var(--ink); }
.conf-card h3 { font-size: clamp(22px, 2.2vw, 28px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.conf-where { font-size: 15px; font-weight: 500; color: var(--ink-2); }
.conf-what { margin-top: 6px; }
.conf-org { font-size: 14px; color: var(--ink-2); margin-top: auto; padding-top: 12px; }
.conf-card-gold { background: var(--dark); color: var(--dark-ink); }
.conf-card-gold .pill:not(.pill-gold) { background: #35332f; color: var(--dark-ink); }
.conf-card-gold .conf-where, .conf-card-gold .conf-org { color: var(--dark-ink-2); }
.conf-empty { text-align: center; color: var(--ink-2); margin-top: 48px; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
}
@media (prefers-reduced-motion: no-preference) {
  .conf-card.is-entering { animation: rise 500ms var(--ease-ui) both; }
}
@media (max-width: 734px) {
  .conf-grid { grid-template-columns: 1fr; gap: 14px; }
  .conf-card-feature { flex-direction: column; }
  .conf-card-feature .conf-photo { flex: none; aspect-ratio: 16 / 10; min-height: 0; }
  .conf-card-feature .conf-body { padding: 26px 24px 28px; }
  .conf-body { padding: 26px 24px 28px; }
  .conf-card { border-radius: var(--radius-lg); }
  .conf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 40px; }
  .conf-stats li { max-width: none; }
  .conf-stat-label { font-size: 13px; }
  .conf-year { margin-top: 48px; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* Hero arrives softly on load. */
  .js .hero-copy > * { opacity: 0; transform: translateY(20px); animation: rise 1000ms var(--ease) forwards; }
  .js .hero-copy > :nth-child(2) { animation-delay: 80ms; }
  .js .hero-copy > :nth-child(3) { animation-delay: 160ms; }
  .js .hero-copy > :nth-child(4) { animation-delay: 240ms; }
  .js .hero-copy > :nth-child(5) { animation-delay: 320ms; }
  .js .hero-media { opacity: 0; transform: scale(0.96); animation: settle-in 1300ms var(--ease) 100ms forwards; }

  /* Sections fade up once as they enter. */
  .js .reveal { opacity: 0; transform: translateY(32px); transition: opacity 300ms var(--ease), transform 300ms var(--ease); transition-delay: var(--d, 0ms); }
  .js .reveal.in { opacity: 1; transform: none; }

  .spot { animation: spot-in 420ms var(--ease-ui) both; animation-delay: var(--d, 0ms); }
  .spot.is-on::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--blue); animation: ring 900ms var(--ease-ui) both; pointer-events: none; }
  .readout.swap h3, .readout.swap dl > div, .readout.swap .readout-actions { animation: rise 500ms var(--ease-ui) both; }
  .readout.swap dl > div:nth-child(1) { animation-delay: 50ms; }
  .readout.swap dl > div:nth-child(2) { animation-delay: 100ms; }
  .readout.swap dl > div:nth-child(3) { animation-delay: 150ms; }
  .readout.swap .readout-actions { animation-delay: 200ms; }

}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes settle-in { to { opacity: 1; transform: none; } }
@keyframes spot-in { from { opacity: 0; scale: 0.6; } to { opacity: 1; scale: 1; } }
@keyframes ring { from { opacity: 0.9; transform: scale(0.8); } to { opacity: 0; transform: scale(1.9); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .seg-thumb { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .gnav { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1068px) {
  .tile { min-height: 540px; padding: 44px 28px 0; }
  .tile-media.plate img { height: 260px; }
  .book-fields { grid-template-columns: 1fr 1fr; }
  .train-more { grid-template-columns: 1fr 1fr; }
  .fac-card h3 { font-size: 24px; }
}

/* ---------- Phone ---------- */
@media (max-width: 1060px) {
  .gnav-links { gap: 22px; }
}
@media (max-width: 960px) {
  .gnav-in .gnav-wa + .gnav-book { margin-left: -2px; }
  .gnav-links { display: none; }
  .gnav-menu { display: block; }
  .gnav-in { gap: 8px; }
}
@media (max-width: 369px) {
  .gnav-wa span { display: none; }
  .gnav-wa { width: 36px; height: 32px; padding: 0; justify-content: center; }
  .gnav-in .gnav-wa + .gnav-book { margin-left: 6px; }
  .gnav-wa svg { width: 16px; height: 16px; }
}
@media (max-width: 734px) {
  :root { --gutter: 20px; }
  body { font-size: 17px; }
  .gnav-in { height: 48px; }
  .mobile-menu { max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); }

  .hero { text-align: center; padding-top: 32px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-meta { margin-inline: auto; }
  .hero .ctas { justify-content: center; }
  .hero-media { max-width: 440px; width: 100%; margin-inline: auto; border-radius: var(--radius-lg); }

  .hl-list { margin-top: 40px; }
  .hl-item { grid-template-columns: 34px minmax(0, 1fr); padding: 24px 0; row-gap: 10px; }
  .hl-text { grid-column: 2; }
  .hl-big { font-size: 28px; margin-bottom: 10px; }

  .tile-grid, .ex-grid, .train-grid, .paper-grid, .clinic-grid { grid-template-columns: 1fr; gap: 14px; margin-top: 40px; }
  .tile { min-height: 0; padding: 40px 24px 0; border-radius: var(--radius-lg); }
  .tile-media.plate img { height: 240px; }
  .tile-photo { padding-bottom: 24px; }

  .segmented button { padding: 9px 16px; font-size: 14px; }
  .ex-stage img { height: 52vh; max-height: 440px; }
  .ex-fig, .readout { padding: 24px; border-radius: var(--radius-lg); }
  .readout h3 { font-size: 24px; }

  .train-card { padding: 32px 24px; border-radius: var(--radius-lg); }
  .train-card-photo, .train-card-photo.flip { grid-template-columns: 1fr; padding: 16px 16px 32px; }
  .train-card-photo.flip .train-photo, .train-card-photo.flip > :not(.train-photo) { grid-column: 1; }
  .train-card-photo { grid-template-rows: none; }
  .train-card-photo .train-photo, .train-card-photo > .train-when, .train-card-photo > h3, .train-card-photo > p:last-child { grid-row: auto; }
  .train-card-photo .train-photo { margin-bottom: 8px; }
  .train-card-photo > :not(.train-photo) { padding-inline: 8px; }
  .train-card-photo .train-when { margin-top: 16px; }
  .train-more { grid-template-columns: 1fr; gap: 24px; margin-top: 40px; }

  .scroller { padding-top: 40px; }
  .fac-card { flex-basis: 82vw; min-height: 300px; border-radius: var(--radius-lg); }

  .paper { padding: 28px 24px; border-radius: var(--radius-lg); }
  .clinic-card, .book { padding: 32px 24px; border-radius: var(--radius-lg); }
  .clinic-card .ctas .btn { flex: 1; }
  .book-fields { grid-template-columns: 1fr; }
  .book .btn { width: 100%; }

  .foot-cols { grid-template-columns: 1fr 1fr; }
  .foot-legal { flex-direction: column; }
}

/* ---------- Gallery page: a shelf of small albums, and a full-screen album viewer ---------- */
.alb-list { padding-top: 0; }
.alb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.alb { margin: 0; }
.alb-link { display: flex; flex-direction: column; height: 100%; padding: 30px 28px 26px; border-radius: var(--radius-lg); background: var(--tint, var(--bg-alt)); color: var(--ink); text-decoration: none; transition: transform 500ms var(--ease-ui); }
.alb-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }

/* The stack: three pages, the cover on top, fanned a little like prints on a table. */
.alb-stack { position: relative; display: block; aspect-ratio: 4 / 3; margin: 6px 14px 28px; }
.pg { position: absolute; inset: 0; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 5px solid var(--surface);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.13), 0 1px 3px rgba(0, 0, 0, 0.08); transition: transform 550ms var(--ease-ui); }
.pg img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 7px; }
.pg-blank { background: linear-gradient(180deg, var(--surface), var(--bg-alt)); }
.pg-1 { transform: rotate(-1.5deg); }
.pg-2 { transform: translate(8px, 3px) rotate(4.5deg); }
.pg-3 { transform: translate(-9px, 6px) rotate(-6.5deg); }
.alb-sticker, .alb-flag { position: absolute; z-index: 2; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.16); transition: transform 550ms var(--ease-ui); }
.alb-sticker { right: -12px; top: -12px; padding: 6px 12px; border-radius: var(--pill); background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; letter-spacing: -0.01em; transform: rotate(6deg); }
.alb-sticker-gold { background: var(--gold); color: var(--ink); }
.alb-flag { left: -12px; top: -12px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); transform: rotate(-8deg); }
.alb-flag img { display: block; border-radius: 2px; }
.alb-flag + .alb-sticker { top: auto; bottom: -12px; }
.alb-title { font-size: 21px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
.alb-blurb { font-size: 15px; line-height: 1.45; color: var(--ink-2); margin-top: 6px; }
.alb-meta { font-size: 13px; color: var(--ink-2); margin-top: auto; padding-top: 12px; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .alb-link:hover .pg-1 { transform: translateY(-8px) rotate(0deg) scale(1.03); }
  .alb-link:hover .pg-2 { transform: translate(34px, 2px) rotate(10deg); }
  .alb-link:hover .pg-3 { transform: translate(-34px, 8px) rotate(-12deg); }
  .alb-link:hover .alb-sticker { transform: rotate(-4deg) scale(1.08); }
  .alb-link:hover .alb-flag { transform: rotate(6deg) scale(1.08); }
}
@media (prefers-reduced-motion: no-preference) {
  .alb-link:active { transform: scale(0.98); transition-duration: 120ms; }
}
@media (max-width: 1068px) { .alb-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .alb-grid { gap: 14px; }
  .alb-link { padding: 20px 14px 16px; border-radius: var(--radius-lg); }
  .alb-stack { margin: 4px 8px 18px; }
  .pg { border-width: 3px; border-radius: 9px; }
  .pg img { border-radius: 6px; }
  .alb-title { font-size: 16px; }
  .alb-blurb { display: none; }
  .alb-meta { font-size: 12px; padding-top: 6px; }
  .alb-place { display: none; }
  .alb-sticker { font-size: 11px; padding: 4px 9px; right: -8px; top: -10px; }
  .alb-flag { width: 32px; height: 32px; left: -8px; top: -10px; }
  .alb-flag img { width: 17px; height: auto; }
  .alb-flag + .alb-sticker { bottom: -10px; }
}

/* Album viewer: album name on top, the photo, its caption, and a strip of thumbnails. */
.lb { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #000; color: var(--dark-ink); overscroll-behavior: contain; }
.lb::backdrop { background: #000; }
.lb-in { height: 100%; display: flex; flex-direction: column; gap: 14px; padding: 14px 20px 18px; }
.lb-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lb-album { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.lb-count { font-size: 13px; color: var(--dark-ink-2); margin-top: 2px; }
.lb-stage { position: relative; flex: 1; min-height: 0; }
.lb-img { position: absolute; inset: 0; margin: auto; width: auto; height: auto; max-width: 100%; max-height: 100%; border-radius: var(--radius); }
.lb-cap { text-align: center; font-size: 15px; line-height: 1.45; color: var(--dark-ink); max-width: 60ch; margin-inline: auto; min-height: 1.45em; }
.lb-thumbs { display: flex; gap: 8px; justify-content: center; overflow-x: auto; padding: 4px; scrollbar-width: none; }
.lb-thumbs button { flex: none; width: 60px; height: 45px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: #222; opacity: 0.45; cursor: pointer; transition: opacity 200ms ease, transform 300ms var(--ease-ui); }
.lb-thumbs button img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lb-thumbs button[aria-current="true"] { opacity: 1; outline: 2px solid #fff; outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .lb-thumbs button:hover { opacity: 0.85; } }
.lb-thumbs button:focus-visible { outline: 2px solid var(--dark-link); outline-offset: 2px; opacity: 1; }
.lb-btn { width: 44px; height: 44px; display: grid; place-items: center; flex: none; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: #fff; cursor: pointer; transition: background 200ms ease; }
@media (hover: hover) and (pointer: fine) { .lb-btn:hover { background: rgba(255, 255, 255, 0.26); } }
.lb-btn:focus-visible { outline: 2px solid var(--dark-link); outline-offset: 2px; }
.lb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-prev, .lb-next { position: absolute; top: 50%; margin-top: -22px; background: rgba(0, 0, 0, 0.45); }
@media (hover: hover) and (pointer: fine) { .lb-prev:hover, .lb-next:hover { background: rgba(0, 0, 0, 0.7); } }
.lb-prev { left: 8px; }
.lb-next { right: 8px; }
.lb-single .lb-prev, .lb-single .lb-next, .lb-single .lb-thumbs { display: none; }
.lb-open, .lb-open body { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .lb[open] { animation: lb-in 240ms var(--ease-ui); }
  @keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
  .lb-img.is-turning { animation: lb-turn 320ms var(--ease-ui); }
  @keyframes lb-turn { from { opacity: 0; transform: translateX(var(--from, 24px)); } to { opacity: 1; transform: none; } }
}
@media (max-width: 734px) {
  .lb-in { padding: 10px 12px 14px; }
  .lb-thumbs { justify-content: flex-start; }
  .lb-thumbs button { width: 52px; height: 39px; }
}

/* ---------- Touch targets: bigger hit areas on touch screens, same look ---------- */
@media (pointer: coarse), (max-width: 734px) {
  .gnav-brand, .gnav-book, .gnav-wa, .more, .foot-legal a, .conf-dots button, .rv-note + .paddle { position: relative; }
  .gnav-brand::after, .gnav-book::after, .gnav-wa::after, .more::before, .foot-legal a::after {
    content: ""; position: absolute; left: -6px; right: -6px; top: 50%; height: 44px; transform: translateY(-50%);
  }
  .conf-dots button { width: 9px; height: 9px; }
  .conf-dots button[aria-current="true"] { width: 24px; }
  .conf-dots button::after { content: ""; position: absolute; left: -11px; right: -11px; top: 50%; height: 40px; transform: translateY(-50%); }
  .conf-dots { gap: 22px; padding: 8px 14px; }
  .spot { width: 38px; height: 38px; margin: -19px 0 0 -19px; }
  .spot::before { width: 12px; height: 12px; }
  /* Footer links: each one is its own 44 px row, so neighbouring tap areas touch but never overlap. */
  .foot-cols li { margin-bottom: 0; }
  .foot-cols a { display: inline-flex; align-items: center; min-height: 44px; }
  .foot-legal a { align-self: flex-start; }
  .paddle { width: 44px; height: 44px; }
  .paddle svg { width: 44px; height: 44px; }
}

/* ---------- Section rhythm: related sections sit closer, big topics get a longer pause ---------- */
.treat { padding-bottom: calc(var(--section-pad) * 0.7); }
.about { padding-block: calc(var(--section-pad) * 0.8); }
.gal-preview { padding-top: calc(var(--section-pad) * 0.7); }
.training { padding-block: calc(var(--section-pad) * 1.2); }
.faq { padding-block: calc(var(--section-pad) * 0.85); }
.clinic { padding-top: calc(var(--section-pad) * 1.2); }

/* Some headings sit on the left beside their content, so not every section is centred. */
.treat .section-title, .treat .section-sub,
.faculty .section-title, .faculty .section-sub,
.research .section-title { text-align: left; margin-left: 0; }
@media (min-width: 835px) {
  .faq .wrap-narrow { max-width: var(--max); display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.6fr); gap: 56px; align-items: start; }
  .faq .section-title { text-align: left; position: sticky; top: 96px; }
  .faq .acc { margin-top: 0; }
}

/* ---- 404 page ---- */
.nf { padding-top: clamp(72px, 12vw, 140px); padding-bottom: clamp(96px, 14vw, 180px); }
.nf .section-sub { max-width: 34em; margin-inline: auto; }
.nf-ctas { justify-content: center; margin-top: 32px; }

/* ---- Own photos: no long-press menu on iPhone, no dragging or selecting (protect.js covers right-click).
   Free-licence images (Gray's Anatomy, X-rays, knee incisions) stay saveable; keep this list in step with protect.js. ---- */
img:not([src*="assets/gray-"]):not([src*="assets/xrays/"]):not([src*="knee-arthroscopy-incisions"]) {
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}
