/* theseouldental.co.kr - Korean column site of 더서울치과. Plan: docs/더서울치과_한글사이트/계획_v0.3_20261130.md §8.
   Look: theseoul.org (assets/theseoul-org/brand_tokens.json). Gold is decoration and background only, never
   the colour of text, headings or meaningful icons (white-on-gold 2.45:1 fails even the 3:1 large-text bar).
   Motion: transform and opacity only, the easings and durations below, end state under reduced motion.
   Nothing is hidden by default: a page reads fully without site.js, and the scroll entrance only plays on
   elements the observer actually reports (tests/test_kr_site_build.py checks these rules). */

:root {
  --ink: #222;
  --ink-soft: #383838;
  --muted: #666;
  --line: #e9e9e9;
  --line-strong: #d4d4d4;
  --gold: #cb9d6c;
  --gold-light: #ffc98f;
  --gold-pale: #ffe2c2;
  --wash: #fff8f0;
  --soft: #fafafa;
  --alt: #f1f1f1;
  --dark: #222;
  --on-dark: #fff;
  --on-dark-soft: #d4d4d4;
  --review: #3a2a12;
  --r-sm: 3px;
  --r-md: 10px;
  --r-lg: 30px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.25, 1);   /* drawing motion: a fill that grows (even speed reads as filling) */
  --dur-fast: 180ms;
  --dur-mid: 420ms;
  --dur-slow: 720ms;
  --move-step: 150ms;   /* drawing motion: one data-delay step */
  --measure: 44rem;
  --page: 68rem;
  --gutter: 1.25rem;
  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Smooth scrolling only for jumps inside a page that has settled (the contents list, the topic jumps):
   site.js sets the class after load and the web font. On <html> from the start, the browser's first jump
   to a #fragment was animated toward a spot fixed before the font arrived, and the font swap left a phone
   ~330 px past the drawing (review-r5, 2026-12-01). */
html.smooth-scroll { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
  background: #fff;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0; }
img { max-width: 100%; height: auto; }
::selection { background: var(--gold-pale); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.site-header :focus-visible, .clinic-band :focus-visible { outline-color: var(--on-dark); }

/* One frame on every page: content starts at the logo's line (the professor, 2026-12-01 KST). Long reading
   text keeps its own measure inside it (.column-main), so a line holds about 44 Korean characters. */
.wrap { width: min(100% - 2 * var(--gutter), var(--page)); margin-inline: auto; }
.ico { width: 1.05rem; height: 1.05rem; flex: none; }

/* ---------- top of every page */
.skip {
  position: absolute; left: 1rem; top: .5rem; z-index: 10;
  padding: .5rem .9rem; border-radius: var(--r-sm);
  background: #fff; color: var(--ink); font-weight: 700;
  transform: translateY(-160%);
}
.skip:focus { transform: none; }
.review-banner {
  background: var(--review); color: #fff;
  padding: .55rem var(--gutter); text-align: center;
  font-size: .875rem; font-weight: 700;
}
.review-banner small { font-weight: 400; margin-left: .6rem; font-variant-numeric: tabular-nums; }

.site-header { background: var(--dark); color: var(--on-dark); border-bottom: 3px solid var(--gold); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.75rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--on-dark); text-decoration: none; }
.brand img { display: block; height: 26px; width: auto; }
.brand-name { font-size: .95rem; font-weight: 700; padding-left: .75rem; border-left: 1px solid rgba(255, 255, 255, .3); }
.site-nav { display: flex; gap: 1.25rem; font-size: .9rem; }
.site-nav a { display: inline-flex; align-items: center; gap: .15rem; padding: .5rem 0; color: var(--on-dark-soft); text-decoration: none; }
.site-nav a:hover { color: var(--on-dark); text-decoration: underline; text-underline-offset: .3em; }
.site-nav .ico { width: .95rem; height: .95rem; }

/* ---------- shared section heading (home, list) */
.home-grid h2, .list .group h2, .tour h2 {
  font-size: 1.2rem; letter-spacing: -0.01em; margin-bottom: 1rem;
}
.home-grid h2::before, .tour h2::before {
  content: ""; display: block; width: 1.75rem; height: 3px; background: var(--gold); margin-bottom: .8rem;
}

/* ---------- lists of posts and topics */
.post-list, .topic-index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.post-link, .topic-link {
  display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 1rem;
  padding: 1.05rem .35rem; border-bottom: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
}
.post-link:hover, .topic-link:hover { background: var(--soft); }
.post-title { font-weight: 700; font-size: 1.05rem; line-height: 1.55; }
.post-sub { grid-column: 1; color: var(--muted); font-size: .92rem; line-height: 1.65; margin-top: .3rem; }
.post-link .ico { grid-column: 2; grid-row: 1 / span 2; }
.topic-link { grid-template-columns: 1fr auto auto; }
.topic-name { font-weight: 700; font-size: 1.08rem; }
.topic-count { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.post-link .ico, .topic-link .ico { color: var(--muted); transition: transform var(--dur-fast) var(--ease-out); }
.post-link:hover .ico, .topic-link:hover .ico { transform: translateX(4px); }
.post-link:hover .post-title, .topic-link:hover .topic-name {
  text-decoration: underline; text-decoration-color: var(--gold);
  text-decoration-thickness: 2px; text-underline-offset: .25em;
}
.more { margin-top: 1.25rem; }
.more a {
  display: inline-flex; align-items: center; gap: .35rem;
  color: var(--ink); font-weight: 700; text-decoration: none;
}
.more a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: .25em; }
.more .ico { transition: transform var(--dur-fast) var(--ease-out); }
.more a:hover .ico { transform: translateX(4px); }

/* ---------- home */
.intro {
  position: relative; overflow: hidden;
  background: var(--wash); border-bottom: 1px solid var(--line);
  /* top/bottom, not padding-block: the impeccable detector misreads padding-block as no inset */
  padding-top: clamp(3rem, 9vw, 5.75rem); padding-bottom: clamp(2.5rem, 6vw, 4rem);
}
.intro::after {   /* two thin gold rings, theseoul.org's circle motif; decoration only */
  content: ""; position: absolute; right: -7rem; top: -7rem;
  width: 21rem; height: 21rem; border-radius: 50%;
  border: 1px solid var(--gold-light);
  box-shadow: 0 0 0 2.25rem var(--wash), 0 0 0 calc(2.25rem + 1px) var(--gold-pale);
  pointer-events: none;
}
.intro .wrap { position: relative; z-index: 1; }
.intro h1 {
  font-size: clamp(2rem, 1.35rem + 3vw, 3.25rem); line-height: 1.2; letter-spacing: -0.035em;
  animation: title-in var(--dur-slow) var(--ease-out);
}
.intro h1::after {
  content: ""; display: block; width: 3.5rem; height: 3px; margin-top: 1.1rem;
  background: var(--gold); transform-origin: left center;
  animation: rule-in var(--dur-slow) var(--ease-out) 120ms backwards;
}
.lead { margin-top: 1.1rem; font-size: clamp(1.1rem, 1rem + .45vw, 1.3rem); color: var(--ink-soft); }
.counts { margin-top: .45rem; color: var(--muted); font-size: .95rem; font-variant-numeric: tabular-nums; }
.home-grid { display: grid; gap: 3rem; padding-block: 3.25rem 4.5rem; }
@media (min-width: 60rem) {
  .home-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); gap: 4.5rem; }
}
/* the clinic's interior photos (six): two in a row on a phone, three in a row from 40rem.
   Captions sit under the photos, never on them. */
.tour { padding-bottom: 4.5rem; }
.tour-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem .75rem;
}
.tour-grid figure { margin: 0; }
.tour-grid img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--r-md); background: var(--alt);
}
.tour-grid figcaption { margin-top: .55rem; font-size: .92rem; line-height: 1.5; color: var(--muted); }
@media (min-width: 40rem) {
  .tour-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
}

/* ---------- list page */
.wrap.list { padding-block: 2.75rem 4.5rem; }
.list-head h1 { font-size: clamp(1.8rem, 1.35rem + 2vw, 2.5rem); line-height: 1.25; letter-spacing: -0.03em; }
.jump ul { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.4rem 0 0; padding: 0; }
.jump a {
  display: inline-block; padding: .45rem .95rem;
  border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  color: var(--ink); font-size: .9rem; text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-out);
}
.jump a:hover { border-color: var(--gold); background: var(--wash); }
.jump a:active { transform: scale(.97); }
.group { margin-top: 3rem; scroll-margin-top: 1rem; }

/* ---------- search (unit H): home page and /columns, only with site.js (an inert template otherwise) */
/* The slot holds the empty form's height before site.js puts the form in, so nothing below moves; only
   where scripting is enabled, so a page without JavaScript has no gap. Label line + gap + input height. */
@media (scripting: enabled) {
  .search-slot { margin-top: 1.4rem; min-height: calc(.95rem * 1.5 + .45rem + 3rem); }
}
.search { max-width: 36rem; }
.search-label { display: block; font-size: .95rem; font-weight: 700; line-height: 1.5; }
.search-input {
  display: block; width: 100%; height: 3rem; margin-top: .45rem; padding: .65rem 1rem;
  border: 1px solid var(--muted); border-radius: var(--r-md); background: #fff;
  color: var(--ink); font: inherit; font-size: 1rem; line-height: 1.5;   /* 16px: phones do not zoom in */
}
.search-input::placeholder { color: var(--muted); }
.search-status { margin-top: .55rem; color: var(--muted); font-size: .92rem; line-height: 1.6; }
.search-status:empty { margin-top: 0; }
.search-results { margin-top: .75rem; }
.search-results:empty { margin-top: 0; border-top: 0; }
.group-count { margin-left: .35rem; color: var(--muted); font-size: .95rem; font-weight: 400; font-variant-numeric: tabular-nums; }

/* ---------- column page */
.page-post { padding-block: 1.5rem 4.5rem; font-size: 1.0625rem; line-height: 1.85; }
.crumbs ol {
  list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .55rem;
  margin: 0 0 1.75rem; padding: 0; font-size: .875rem; line-height: 1.6; color: var(--muted);
}
.crumbs li { display: inline-flex; align-items: center; gap: .55rem; }
.crumbs li + li::before {   /* drawn chevron */
  content: ""; width: .38rem; height: .38rem;
  border-top: 1.5px solid #8d8d8d; border-right: 1.5px solid #8d8d8d; transform: rotate(45deg);
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .25em; }
.column-head { padding-bottom: 1.6rem; margin-bottom: 1.75rem; border-bottom: 1px solid var(--line); }
.column-head h1 { font-size: clamp(1.65rem, 1.2rem + 2.1vw, 2.35rem); line-height: 1.34; letter-spacing: -0.025em; }
.column-head .sub { margin-top: .9rem; font-size: 1.06rem; line-height: 1.75; color: var(--ink-soft); }

.answer {
  margin-bottom: 2rem; padding: 1.25rem 1.4rem;
  background: var(--wash); border: 1px solid var(--gold-pale); border-radius: var(--r-md);
}
.answer-label { display: flex; align-items: center; gap: .5rem; margin-bottom: .45rem; font-size: .9rem; font-weight: 700; }
.answer-label::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--gold); }
.answer p + p { margin-top: .75rem; }

.column-main { max-width: var(--measure); }
/* Wide screens: the contents list moves into a rail right of the words and stays in view while reading.
   The rail spans the article's height, so the list stops at the article's end. */
@media (min-width: 64rem) {
  .column { position: relative; }
  .column-main { max-width: min(var(--measure), 100% - 22rem); }
  .toc-rail { position: absolute; top: 0; right: 0; bottom: 0; width: 18rem; }
  .toc {   /* a list taller than the window scrolls inside, so its last item can be reached (astra unit H r1) */
    position: sticky; top: 1.5rem;
    max-height: calc(100vh - 3rem); max-height: calc(100dvh - 3rem); overflow-y: auto;
  }
}
.toc { padding: 1.1rem 1.4rem; border: 1px solid var(--line); border-radius: var(--r-md); }
.toc-title { margin-bottom: .4rem; font-size: .9rem; font-weight: 700; }
.toc ol { margin: 0; padding-left: 1.4rem; font-size: .95rem; line-height: 1.8; }
.toc li::marker { color: var(--muted); font-variant-numeric: tabular-nums; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: .25em; }

.column section { margin-top: 3.25rem; scroll-margin-top: 1.25rem; }
.column h2 { margin-bottom: 1rem; font-size: clamp(1.28rem, 1.1rem + .7vw, 1.5rem); line-height: 1.45; letter-spacing: -0.02em; }
.column h2::before { content: ""; display: block; width: 1.75rem; height: 3px; margin-bottom: .9rem; background: var(--gold); }
/* Manuscript body = the <section id="sN"> blocks; the site's own sections (ask, faq, related, src) have no id.
   Body defaults sit in :where() (no specificity), so component rules (.answer, .when, .steps, .myth) win. */
:where(.column) p + p { margin-top: 1rem; }
.column strong { font-weight: 700; }
.column section[id] a:not([class]), .answer a, .faq .a a, .ask a {
  color: var(--ink); text-decoration: underline;
  text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: .22em;
}
.column section[id] a:not([class]):hover, .answer a:hover, .faq .a a:hover, .ask a:hover { text-decoration-color: var(--ink); }
:where(.column section[id] ul, .column section[id] ol) { margin: 0; padding-left: 1.3rem; }
:where(.column section[id] p + ul, .column section[id] p + ol,
       .column section[id] ul + p, .column section[id] ol + p, .column section[id] dl + p, .column section[id] div + p) { margin-top: 1rem; }
:where(.column section[id] li + li) { margin-top: .45rem; }
:where(.column section[id] li)::marker { color: var(--muted); }

ol.steps { list-style: none; counter-reset: step; margin: 1.5rem 0; padding: 0; }
ol.steps > li { counter-increment: step; position: relative; margin: 0; padding: 0 0 1.5rem 3.25rem; }
ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: .1rem;
  display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--gold-pale); color: var(--ink); font-size: .95rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
ol.steps > li:not(:last-child)::after {
  content: ""; position: absolute; left: 1.05rem; top: 2.55rem; bottom: .45rem; width: 1px; background: var(--gold-light);
}
.steps .what { display: block; margin-bottom: .2rem; font-weight: 700; }

.label { display: block; margin-bottom: .4rem; font-size: .9rem; font-weight: 700; color: var(--ink); }
.limit {
  margin: 1.5rem 0 0; padding: 1.1rem 1.3rem; font-size: .97rem;
  background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-md);
}
.when { display: grid; gap: .9rem; margin-top: 1rem; }
.when > div { padding: 1.1rem 1.3rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.when > div.urgent { background: var(--wash); border-color: var(--gold); }
.when ul { margin: 0; padding-left: 1.15rem; }
.when li + li { margin-top: .35rem; }
@media (min-width: 48rem) {
  .when { grid-template-columns: 1fr 1fr; }
  .when > div.full { grid-column: 1 / -1; }
}

dl.pairs { margin: 1.25rem 0 0; border-top: 1px solid var(--ink); }
dl.pairs > div { padding: 1rem 0; border-bottom: 1px solid var(--line); }
dl.pairs dt { font-weight: 700; line-height: 1.65; }
dl.pairs dd { margin: .35rem 0 0; }
.tag, .myth .q::before, .myth .a::before {
  display: inline-block; margin-right: .5rem; padding: .05rem .45rem;
  border-radius: var(--r-sm); font-size: .75rem; font-weight: 700; line-height: 1.6; vertical-align: .12em;
}
.tag { color: var(--ink-soft); background: var(--alt); }
.myth { margin: 1rem 0 0; padding: 1.1rem 1.3rem; border: 1px solid var(--line); border-radius: var(--r-md); }
.myth .q { margin: 0 0 .6rem; font-weight: 700; }
.myth .a { margin: 0; }
.myth .q::before { content: "오해"; color: var(--ink); border: 1px solid var(--ink-soft); }
.myth .a::before { content: "사실"; color: var(--ink); background: var(--gold-pale); }

.tablewrap { margin: 1.5rem 0 0; overflow-x: auto; }
table.stack { width: 100%; border-collapse: collapse; font-size: .93rem; line-height: 1.65; font-variant-numeric: tabular-nums; }
table.stack caption { margin-bottom: .6rem; text-align: left; font-size: .95rem; font-weight: 700; }
table.stack th, table.stack td { padding: .7rem .6rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
table.stack thead th { font-size: .85rem; background: var(--soft); border-top: 1px solid var(--ink); }
table.stack tbody th { font-weight: 700; white-space: nowrap; }
@media (max-width: 40rem) {
  table.stack, table.stack caption, table.stack tbody, table.stack tr, table.stack th, table.stack td { display: block; width: 100%; }
  table.stack { position: relative; }
  table.stack thead {   /* off screen but kept for screen readers; each cell also shows its data-label */
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  table.stack tr { margin-bottom: .8rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--r-md); }
  table.stack tbody th { padding: 0 0 .35rem; border: 0; font-size: 1.02rem; white-space: normal; }
  table.stack td { padding: .35rem 0; border: 0; }
  table.stack td::before { content: attr(data-label); display: block; font-size: .78rem; font-weight: 700; color: var(--muted); }
}

/* ---------- process drawing (plan §6). Without site.js every step shows in order; site.js adds the
   step controls (.ex-nav) and the hidden attribute on the other steps, and nothing plays by itself. */
.explainer {
  margin: 2rem 0 0; padding: 1.15rem 1.25rem 1rem; scroll-margin-top: 1rem;
  border: 1px solid var(--line); border-radius: var(--r-md); background: #fff;
}
.ex-cap { display: flex; align-items: center; gap: .5rem; font-size: 1rem; font-weight: 700; line-height: 1.5; }
.ex-cap::before { content: ""; flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: var(--gold); }
.ex-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.ex-steps { list-style: none; margin: 1rem 0 0; padding: 0; }
.ex-step + .ex-step { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.ex-step[hidden] { display: none; }
.ex-art svg { display: block; width: 100%; height: auto; }
.ex-text { margin-top: .8rem; }
.ex-title { display: flex; align-items: flex-start; gap: .6rem; font-weight: 700; line-height: 1.55; }
.ex-num {
  display: grid; place-items: center; flex: none; width: 1.7rem; height: 1.7rem;
  border-radius: 50%; background: var(--gold-pale); color: var(--ink);
  font-size: .85rem; line-height: 1; font-variant-numeric: tabular-nums;
}
.ex-body { margin-top: .45rem; font-size: .97rem; line-height: 1.8; }
.ex-note { margin-top: 1rem; font-size: .85rem; color: var(--muted); }
@media (min-width: 48rem) {
  .ex-step { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.5rem; align-items: center; }
  .ex-text { margin-top: 0; }
}
.explainer.is-live .ex-step + .ex-step { margin-top: 0; padding-top: 0; border-top: 0; }
.explainer.is-moved .ex-step:not([hidden]) { animation: rise var(--dur-mid) var(--ease-out); }
.ex-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .9rem; }
.ex-btn {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; padding: .5rem 1.05rem;
  border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: #fff;
  color: var(--ink); font: inherit; font-size: .92rem; font-weight: 700; line-height: 1.4; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out);
}
.ex-btn:hover { border-color: var(--gold); background: var(--wash); }
.ex-btn:active { transform: scale(.97); }
.ex-prev::before, .ex-next::after {   /* drawn chevrons */
  content: ""; width: .45rem; height: .45rem; border-top: 2px solid currentColor; border-right: 2px solid currentColor;
}
.ex-prev::before { transform: rotate(-135deg); }
.ex-next::after { transform: rotate(45deg); }
.ex-btn[aria-disabled="true"] { color: var(--muted); border-color: var(--line); background: #fff; cursor: default; }
.ex-btn[aria-disabled="true"]:active { transform: none; }
.ex-dots { display: flex; justify-content: center; }
.ex-dot { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; padding: 0; border: 0; background: none; cursor: pointer; }
.ex-dot::before {
  content: ""; width: .62rem; height: .62rem; border-radius: 50%; border: 1.5px solid #8d8d8d;
  transition: transform var(--dur-fast) var(--ease-out);
}
.ex-dot:hover::before { border-color: var(--ink); }
.ex-dot[aria-current="step"]::before { background: var(--ink); border-color: var(--ink); transform: scale(1.2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 40rem) {
  .explainer { padding-inline: .9rem; }
  .ex-dots { order: -1; flex-basis: 100%; }
}

/* drawing motion (unit G): parts of a step marked data-move play once, for a moment, when a person moves
   to that step (site.js adds .is-moved on the first move). The drawn state is the end state: keyframes give
   only the start frame, so without site.js, under reduced motion, or once a move ends, the step looks as
   drawn. data-delay N starts a part N x --move-step later (at most 6). */
.explainer.is-moved .ex-step:not([hidden]) [data-move] { transform-box: fill-box; transform-origin: center; }
.explainer.is-moved .ex-step:not([hidden]) [data-move="fade"] { animation: ex-fade var(--dur-slow) var(--ease-out) backwards; }
.explainer.is-moved .ex-step:not([hidden]) [data-move="fade-out"] { animation: ex-fade-out var(--dur-slow) var(--ease-out) backwards; }
.explainer.is-moved .ex-step:not([hidden]) [data-move="drop"] { animation: ex-drop var(--dur-slow) var(--ease-out) backwards; }
.explainer.is-moved .ex-step:not([hidden]) [data-move="slide"] { animation: ex-slide var(--dur-slow) var(--ease-out) backwards; }
.explainer.is-moved .ex-step:not([hidden]) [data-move="drift"] { animation: ex-drift var(--dur-slow) var(--ease-out) backwards; }
.explainer.is-moved .ex-step:not([hidden]) [data-move="grow-down"] { transform-origin: top; animation: ex-grow var(--dur-slow) var(--ease-in-out) backwards; }
.explainer.is-moved .ex-step:not([hidden]) [data-move="grow-up"] { transform-origin: bottom; animation: ex-grow var(--dur-slow) var(--ease-in-out) backwards; }
.explainer.is-moved .ex-step:not([hidden]) [data-move][data-delay="1"] { animation-delay: var(--move-step); }
.explainer.is-moved .ex-step:not([hidden]) [data-move][data-delay="2"] { animation-delay: calc(var(--move-step) * 2); }
.explainer.is-moved .ex-step:not([hidden]) [data-move][data-delay="3"] { animation-delay: calc(var(--move-step) * 3); }
.explainer.is-moved .ex-step:not([hidden]) [data-move][data-delay="4"] { animation-delay: calc(var(--move-step) * 4); }
.explainer.is-moved .ex-step:not([hidden]) [data-move][data-delay="5"] { animation-delay: calc(var(--move-step) * 5); }
.explainer.is-moved .ex-step:not([hidden]) [data-move][data-delay="6"] { animation-delay: calc(var(--move-step) * 6); }

/* 3D model (unit G): the box exists only when site.js found WebGL; the stage, controls and legend come in
   after the model loaded (m3d.js). */
.m3d { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.m3d-title { font-weight: 700; line-height: 1.55; }
.m3d-text { margin-top: .45rem; font-size: .97rem; line-height: 1.8; }
.m3d-open { margin-top: .9rem; }
.m3d-open[aria-disabled="true"] { color: var(--muted); border-color: var(--line); cursor: progress; }
.m3d-status { margin-top: .6rem; font-size: .9rem; color: var(--muted); }
.m3d-status:empty { margin-top: 0; }
.m3d-stage { margin-top: .9rem; aspect-ratio: 1 / 1; border-radius: var(--r-md); background: var(--soft); overflow: hidden; }
@media (min-width: 40rem) { .m3d-stage { aspect-ratio: 4 / 3; } }
.m3d-stage canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
.m3d-stage canvas:active { cursor: grabbing; }
.m3d-controls { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.m3d-split[aria-pressed="true"] { border-color: var(--ink); background: var(--wash); }
.m3d-legend { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; margin: .85rem 0 0; padding: 0; list-style: none; font-size: .9rem; line-height: 1.6; }
.m3d-legend li { display: flex; align-items: center; gap: .45rem; }
.m3d-swatch { flex: none; width: .85rem; height: .85rem; border-radius: 50%; border: 1px solid #8d8d8d; background: var(--soft); }

.ask ul { list-style: none; padding: 0; }
.ask li { margin-top: .5rem; padding: .8rem 1.1rem; background: var(--soft); border-radius: var(--r-md); }

.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--ink); }
.faq summary { position: relative; padding: 1.05rem 2.5rem 1.05rem 0; font-weight: 700; line-height: 1.6; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after {   /* drawn plus / minus */
  content: ""; position: absolute; right: .45rem; top: 50%;
  width: .9rem; height: 2px; margin-top: -1px; background: var(--ink-soft);
  transition: transform var(--dur-mid) var(--ease-out);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq summary:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: .25em; }
.faq .a { padding: 0 0 1.15rem; }
.faq details[open] .a { animation: rise var(--dur-mid) var(--ease-out); }

.related .post-title { font-size: 1rem; }
.src { font-size: .88rem; line-height: 1.75; color: var(--muted); }
.src h2 { color: var(--ink); }
.src ol { padding-left: 1.2rem; }
.src a { color: var(--ink-soft); text-decoration-color: var(--line-strong); text-underline-offset: .2em; }
.note { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .88rem; line-height: 1.75; color: var(--muted); }

/* ---------- 404 */
.lost { padding-block: 4rem 5rem; }
.lost h1 { font-size: clamp(1.6rem, 1.3rem + 1.5vw, 2.1rem); margin-bottom: .8rem; }

/* ---------- clinic band and footer (every page) */
.clinic-band { background: var(--dark); color: var(--on-dark); border-top: 3px solid var(--gold); }
.band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2.5rem; padding-block: 2.5rem; }
.band-name { font-size: 1.25rem; font-weight: 700; }
.band-addr { margin-top: .4rem; font-size: .95rem; line-height: 1.7; color: var(--on-dark-soft); }
.band-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 3rem; padding: .7rem 1.25rem;
  border-radius: var(--r-lg); font-size: .95rem; font-weight: 700; line-height: 1.4; text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-out);
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn-solid { background: var(--gold); color: var(--ink); }
.btn-solid:hover { background: var(--gold-light); }
.btn-line { color: var(--on-dark); border: 1px solid rgba(255, 255, 255, .55); }
.btn-line:hover { background: rgba(255, 255, 255, .08); }
.btn .ico { width: 1.1rem; height: 1.1rem; }

.site-footer { background: var(--soft); border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; line-height: 1.75; }
.foot { padding-block: 2rem 2.75rem; }
.site-footer p + p { margin-top: .15rem; }
.site-footer .name { margin-bottom: .35rem; font-size: 1rem; font-weight: 700; color: var(--ink); }
.site-footer a { color: var(--ink-soft); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: .2em; }
.site-footer a:hover { text-decoration-color: var(--ink); }
.sep { display: inline-block; width: 1px; height: .8em; margin: 0 .7rem; vertical-align: -.05em; background: var(--line-strong); }

/* ---------- small screens */
@media (max-width: 40rem) {
  .brand-name { display: none; }   /* the logo already names the clinic; the nav needs the room */
  .site-nav { gap: 1rem; }
  .band-actions, .btn { width: 100%; }
  .intro::after { right: -11rem; top: -10rem; }
  .btn { justify-content: center; }
}

/* ---------- motion: entrances start from a nearly finished frame; content is never hidden by default */
@keyframes title-in { from { transform: translateY(12px); } }
@keyframes rule-in { from { transform: scaleX(0); } }
@keyframes rise { from { opacity: .55; transform: translateY(12px); } }
@keyframes ex-fade { from { opacity: 0; } }
@keyframes ex-fade-out { from { opacity: 1; } }
@keyframes ex-drop { from { opacity: 0; transform: translateY(-28px); } }
@keyframes ex-slide { from { opacity: 0; transform: translate(24px, -24px); } }
@keyframes ex-drift { from { opacity: 0; transform: translate(-7px, -14px); } }
@keyframes ex-grow { from { transform: scaleY(0); } }
.is-revealed { animation: rise var(--dur-slow) var(--ease-out); }

@media (prefers-reduced-motion: reduce) {
  html, html.smooth-scroll { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
