/* ==========================================================================
   Highway 7 Emergency Dental
   Token layer + components.

   Tokens are copied verbatim from Dental5/src/styles/global.css so this site
   stays visually related to dental5.group. Do not "tidy" the values.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  color-scheme: light;
  --d5-bg:#f7f6f2; --d5-band:#ffffff; --d5-surface:#ffffff; --d5-surface-2:#f7f5f0;
  --d5-ink:#12141d; --d5-ink-2:#363c4f; --d5-ink-3:#6b7080; --d5-body:#4b4b4b;
  --d5-border:#e6e3dc; --d5-border-soft:#efede7; --d5-border-strong:#d8d4cb;
  --d5-accent:#147a8b; --d5-accent-2:#0e5d6b; --d5-accent-soft:#e9f8f9; --d5-accent-ink:#ffffff; --d5-accent-glow:#58c8da;
  --d5-invert-bg:#171c2b; --d5-invert-plate:#1e2436; --d5-invert-border:rgba(255,255,255,.09);
  --d5-invert-ink:#ffffff; --d5-invert-body:rgba(255,255,255,.78); --d5-invert-muted:rgba(255,255,255,.62);
  --d5-invert-faint:rgba(255,255,255,.42); --d5-invert-fill:rgba(255,255,255,.09); --d5-invert-hatch:rgba(255,255,255,.045);
  --d5-stripe:rgba(18,20,29,.045); --d5-warn:#b4802a;
  --d5-glass:rgba(255,255,255,.78); --d5-glass-solid:rgba(255,255,255,.9); --d5-glass-border:rgba(18,20,29,.08);
  --d5-shadow:0 1px 2px rgba(18,20,29,.04), 0 10px 28px -16px rgba(18,20,29,.14);
  --d5-shadow-lg:0 2px 4px rgba(18,20,29,.05), 0 32px 60px -24px rgba(18,20,29,.26);
  --d5-shadow-accent:0 8px 20px -10px rgba(20,122,139,.7);
  --d5-shadow-accent-lg:0 12px 28px -10px rgba(20,122,139,.9);
  --d5-glow-dot:none; --d5-knob:var(--d5-ink-2); --d5-knob-shadow:inset -5px -3px 0 0 var(--d5-surface);

  --d5-shell:clamp(20px, 4vw, 56px);
  --d5-font-sans:"Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --d5-font-serif:"Playfair Display", Georgia, serif;
  --d5-font-mono:"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --d5-bg:#0f172a; --d5-band:#0b1220; --d5-surface:#141e33; --d5-surface-2:#1a2540;
  --d5-ink:#f8fafc; --d5-ink-2:#cbd5e1; --d5-ink-3:#8695ae; --d5-body:#a3aec2;
  --d5-border:rgba(148,163,184,.18); --d5-border-soft:rgba(148,163,184,.11); --d5-border-strong:rgba(148,163,184,.28);
  --d5-accent:#45c6db; --d5-accent-2:#7bdaea; --d5-accent-soft:rgba(69,198,219,.14); --d5-accent-ink:#06202a;
  --d5-invert-bg:#060b16; --d5-invert-plate:#0d1526; --d5-stripe:rgba(148,163,184,.07); --d5-warn:#d9a34a;
  --d5-glass:rgba(15,23,42,.72); --d5-glass-solid:rgba(20,30,51,.86); --d5-glass-border:rgba(148,163,184,.16);
  --d5-shadow:0 1px 2px rgba(0,0,0,.4), 0 10px 28px -16px rgba(0,0,0,.72);
  --d5-shadow-lg:0 2px 4px rgba(0,0,0,.4), 0 32px 60px -24px rgba(0,0,0,.72);
  --d5-shadow-accent:0 0 26px rgba(69,198,219,.34); --d5-shadow-accent-lg:0 0 40px rgba(69,198,219,.5);
  --d5-glow-dot:0 0 12px rgba(69,198,219,.9); --d5-knob:var(--d5-accent); --d5-knob-shadow:0 0 16px rgba(69,198,219,.75);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--d5-bg);
  color: var(--d5-body);
  font-family: var(--d5-font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--d5-font-serif);
  font-weight: 500;
  color: var(--d5-ink);
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0;
  text-wrap: balance;
}

h4, h5, h6, p, ul, ol, li, dl, dd, dt, figure { margin: 0; }
ul, ol { list-style: none; padding: 0; }

a { color: var(--d5-accent); text-decoration: none; }
a:hover { color: var(--d5-accent-2); }

img { max-width: 100%; }
button { font: inherit; }

[aria-current="page"] { color: var(--d5-accent) !important; }

:focus-visible {
  outline: 2px solid var(--d5-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 200;
  background: var(--d5-surface);
  color: var(--d5-ink);
  border: 1px solid var(--d5-border-strong);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 14.5px;
  font-weight: 600;
  transition: top 180ms;
}
.skip-link:focus { top: 16px; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   2b. Simplified Chinese

   Latin fonts stay first in each stack, so "Highway 7", "Dr.", "CDCP" and the
   numerals keep their Playfair / Jakarta shapes and only the CJK glyphs fall
   through. The tight tracking and 1.03 leading of the Latin ramp are wrong for
   Han characters — they are square, full-height, and need room to breathe.
   -------------------------------------------------------------------------- */

/* Scoped to body, not bare :lang(zh). `lang` is inherited, so a bare :lang(zh)
   matches every element in the page and wins over inheritance — which would
   silently reset the heading face on any inline child, e.g. the <em> in the
   hero. Setting it once on body lets everything below inherit normally. */
body:lang(zh) {
  font-family: var(--d5-font-sans), "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
}
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3 {
  font-family: var(--d5-font-serif), "Noto Serif SC", "Songti SC", "STSong",
    "Source Han Serif SC", serif;
  letter-spacing: 0;
  line-height: 1.28;
  text-wrap: initial;
}
:lang(zh) .h1-hero { line-height: 1.2; letter-spacing: 0; }
:lang(zh) .card__title,
:lang(zh) .card__title--lg,
:lang(zh) .card__title--md,
:lang(zh) .card__title--sm { line-height: 1.35; letter-spacing: 0; }
:lang(zh) .logo__name,
:lang(zh) .footer-logo__name,
:lang(zh) .phone-xl { letter-spacing: -.015em; }

/* No CJK face here carries a true italic, so a browser fakes one by shearing
   the glyphs — which Chinese typography does not use for emphasis and which
   reads as a rendering fault. The accent colour already carries the emphasis
   the design wants on this line. */
:lang(zh) em, :lang(zh) .hero-em { font-style: normal; }

/* IBM Plex Mono carries no Han glyphs. Keep it for the Latin data — addresses,
   the phone number, coordinates — and hand CJK to the sans stack so eyebrows
   do not fall back to an arbitrary system serif. */
:lang(zh) .eyebrow,
:lang(zh) .tag,
:lang(zh) .stack__key,
:lang(zh) .footer-head,
:lang(zh) .notice__label,
:lang(zh) .placeholder__cap,
:lang(zh) .stat-card__small,
:lang(zh) .hours-list li {
  font-family: var(--d5-font-mono), "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: .08em;
}
:lang(zh) .logo__sub,
:lang(zh) .footer-logo__sub { letter-spacing: .16em; }

/* Han text has no spaces, so long strings break anywhere; keep them off the
   punctuation that must not start or end a line. */
:lang(zh) p, :lang(zh) li, :lang(zh) dd { line-break: strict; overflow-wrap: break-word; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */

.shell {
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--d5-shell);
}

.section { padding-block: clamp(48px, 6vw, 80px); }
.section--tall { padding-block: clamp(56px, 7vw, 96px); }
.section--hero { padding-block: clamp(48px, 7vw, 92px) clamp(40px, 5vw, 72px); }
.section--page-head { padding-block: clamp(48px, 7vw, 88px); }
.section--cta { padding-block: clamp(48px, 6vw, 76px); }
.section--cta-sm { padding-block: clamp(48px, 6vw, 72px); }

.band {
  background: var(--d5-band);
  border-top: 1px solid var(--d5-border-soft);
  border-bottom: 1px solid var(--d5-border-soft);
}
.band--open-bottom { border-bottom: 0; }

.invert { background: var(--d5-invert-bg); }

.grid { display: grid; gap: 16px; }
.grid--240 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--260 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--280 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--split {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(28px, 4vw, 56px);
}
.grid--split-320 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.grid--hero {
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.grid--media {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(28px, 4vw, 48px);
  align-items: center;
}
.grid--contact {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
}
.grid--start { align-items: start; }

.stack-col { display: flex; flex-direction: column; gap: 20px; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* --------------------------------------------------------------------------
   4. Type helpers
   -------------------------------------------------------------------------- */

.eyebrow {
  font-family: var(--d5-font-mono);
  font-size: 10.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--d5-ink-3);
}
.eyebrow--accent { color: var(--d5-accent); }
.eyebrow--glow { color: var(--d5-accent-glow); }
.eyebrow--sm { font-size: 10px; }

.tag {
  font-family: var(--d5-font-mono);
  font-size: 9.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--d5-accent);
}

.h1-hero {
  font-size: clamp(2.6rem, 4.6vw, 4.25rem);
  line-height: 1.03;
  letter-spacing: -.025em;
  text-wrap: pretty;
}
.h1-page { font-size: clamp(2.2rem, 3.6vw, 3.25rem); }
.h2 { font-size: clamp(1.9rem, 3vw, 2.75rem); }
.h2--sm { font-size: clamp(1.9rem, 3vw, 2.5rem); }
.h2--cta { font-size: clamp(1.7rem, 2.6vw, 2.25rem); }

.lead {
  font-size: 1.1875rem;
  line-height: 1.6;
  max-width: 33em;
  text-wrap: pretty;
}
.lead--page { font-size: 1.125rem; line-height: 1.65; }
.lead--sm { font-size: 1.0625rem; line-height: 1.6; text-wrap: pretty; }

.prose { line-height: 1.65; }
.prose--roomy { line-height: 1.7; }

.on-invert { color: var(--d5-invert-ink); }
.on-invert-body { color: var(--d5-invert-body); }

.measure-24 { max-width: 24ch; }
.measure-30 { max-width: 30ch; }
.measure-34 { max-width: 34ch; }
.measure-38 { max-width: 38em; }
.measure-44 { max-width: 44ch; }
.measure-44em { max-width: 44em; }
.measure-46 { max-width: 46ch; }
.measure-46em { max-width: 46em; }
.measure-52em { max-width: 52em; }

.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-14 { margin-top: 14px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-22 { margin-top: 22px; }
.mt-26 { margin-top: 26px; }
.mt-28 { margin-top: 28px; }
.mt-30 { margin-top: 30px; }
.mt-32 { margin-top: 32px; }
.mt-34 { margin-top: 34px; }
.mt-40 { margin-top: 40px; }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  border-radius: 12px;
  font-weight: 650;
  white-space: nowrap;
  text-align: center;
  border: 0;
  cursor: pointer;
}

.btn--accent {
  background: var(--d5-accent);
  color: var(--d5-accent-ink);
  box-shadow: var(--d5-shadow-accent);
  transition: transform 180ms, box-shadow 180ms;
}
.btn--accent:hover {
  color: var(--d5-accent-ink);
  transform: translateY(-1px);
  box-shadow: var(--d5-shadow-accent-lg);
}

.btn--outline {
  border: 1px solid var(--d5-border-strong);
  background: var(--d5-surface);
  color: var(--d5-ink);
  font-weight: 600;
  transition: border-color 180ms, color 180ms;
}
.btn--outline:hover { border-color: var(--d5-accent); color: var(--d5-accent); }

.btn--invert {
  border: 1px solid var(--d5-invert-border);
  color: var(--d5-invert-ink);
  font-weight: 600;
  transition: border-color 180ms;
}
.btn--invert:hover { color: var(--d5-invert-ink); border-color: var(--d5-accent-glow); }

.btn--lg { padding: 16px 28px; font-size: 16px; }
.btn--lg-outline { padding: 15px 26px; font-size: 15px; }
.btn--md { padding: 14px 24px; font-size: 15px; }
.btn--sm { padding: 13px 22px; font-size: 14.5px; }
.btn--header { padding: 12px 22px; font-size: 14.5px; letter-spacing: -.005em; }
.btn--header-compact { padding: 10px 14px; font-size: 13px; }
.btn--self-start { align-self: flex-start; }

.link-arrow {
  display: inline-block;
  font-size: 15px;
  font-weight: 650;
  color: var(--d5-accent);
}
.link-arrow--sm { font-size: 14.5px; }

/* --------------------------------------------------------------------------
   6. Emergency banner
   -------------------------------------------------------------------------- */

.ebanner {
  background: var(--d5-invert-bg);
  color: var(--d5-invert-body);
  font-size: 13px;
}
.ebanner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 18px;
  padding-block: 9px;
}
.ebanner__tel {
  color: var(--d5-invert-ink);
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,.35);
}
.ebanner__tel:hover { color: var(--d5-invert-ink); }

/* --------------------------------------------------------------------------
   7. Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--d5-glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--d5-glass-border);
}
.site-header__inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.logo { display: flex; align-items: center; gap: 11px; flex-shrink: 0; color: inherit; }
.logo:hover { color: inherit; }
.logo__img { height: 34px; width: auto; display: block; }
.logo__text { display: flex; flex-direction: column; line-height: 1.05; }
.logo__name {
  font-family: var(--d5-font-serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.015em;
  color: var(--d5-ink);
}
.logo__sub {
  font-family: var(--d5-font-mono);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--d5-ink-3);
  margin-top: 3px;
}

.nav { margin-right: auto; }
.nav__list { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.nav__link {
  display: block;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--d5-ink-2);
  white-space: nowrap;
  transition: color 180ms, background-color 180ms;
}
.nav__link:hover { background: var(--d5-accent-soft); color: var(--d5-accent); }

.lang__list {
  display: flex;
  align-items: center;
  gap: 4px;
  border-right: 1px solid var(--d5-border);
  padding-right: 16px;
}
.lang__link {
  display: block;
  padding: 6px 9px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--d5-ink-3);
}
.lang__link.is-active {
  font-weight: 700;
  letter-spacing: .02em;
  background: var(--d5-accent-soft);
  color: var(--d5-accent);
}

.theme-toggle {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--d5-border);
  background: var(--d5-surface);
  border-radius: 999px;
  padding: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--d5-ink-2);
  cursor: pointer;
}
.theme-toggle__knob {
  display: block;
  height: 22px;
  width: 22px;
  border-radius: 999px;
  background-color: var(--d5-knob);
  box-shadow: var(--d5-knob-shadow);
  transition: background-color 300ms, box-shadow 300ms;
}

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--d5-border);
  background: var(--d5-surface);
  border-radius: 999px;
  padding: 7px 14px 7px 10px;
  margin-bottom: 28px;
}
.pill__dot {
  display: block;
  height: 6px;
  width: 6px;
  border-radius: 999px;
  background: var(--d5-accent);
  box-shadow: var(--d5-glow-dot);
}

.hero-em { color: var(--d5-accent); }

.trust {
  margin-top: 42px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  border-top: 1px solid var(--d5-border-soft);
  padding-top: 26px;
}
.trust li { display: flex; align-items: center; gap: 9px; }
.trust__dot {
  display: block;
  height: 4px;
  width: 4px;
  border-radius: 999px;
  background: var(--d5-accent);
  flex-shrink: 0;
}
.trust span:last-child { font-size: 12.5px; font-weight: 500; color: var(--d5-ink-3); }

.hero-media { position: relative; padding-bottom: 56px; }
.hero-media__inset {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 46%;
  overflow: hidden;
  border-radius: 16px;
  border: 5px solid var(--d5-bg);
  box-shadow: var(--d5-shadow-lg);
}

.stat-card {
  position: absolute;
  top: 36px;
  right: -8px;
  border-radius: 14px;
  border: 1px solid var(--d5-glass-border);
  background: var(--d5-glass-solid);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  padding: 16px 20px;
  box-shadow: var(--d5-shadow);
}
.stat-card__big {
  font-family: var(--d5-font-serif);
  font-size: 26px;
  line-height: 1.05;
  font-weight: 500;
  color: var(--d5-ink);
}
.stat-card__small {
  margin-top: 7px;
  font-family: var(--d5-font-mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--d5-ink-3);
}

/* The parent site drops its equivalent at narrow widths for the same reason:
   below this the card crowds the composition rather than decorating it. */
@media (max-width: 639px) {
  .stat-card { display: none; }
}

.hero-invert {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--d5-invert-bg);
}
.hero-invert__hatch {
  position: absolute;
  inset: 0;
  opacity: .25;
  background-color: var(--d5-invert-plate);
  background-image: repeating-linear-gradient(135deg, transparent 0 8px, var(--d5-invert-hatch) 8px 9px);
}
.hero-invert__inner { position: relative; }

/* --------------------------------------------------------------------------
   9. Cards, plates, chips
   -------------------------------------------------------------------------- */

.card {
  border: 1px solid var(--d5-border-soft);
  border-radius: 20px;
  background: var(--d5-surface);
  padding: 24px;
  box-shadow: var(--d5-shadow);
}
.card--roomy { padding: 26px 24px; }
.card--roomier { padding: 28px 26px; }
.card--lift { transition: transform 250ms, border-color 250ms; }
.card--lift:hover { transform: translateY(-4px); border-color: var(--d5-accent); }
.card--service {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
}
.card--col { display: flex; flex-direction: column; }

.card__title {
  margin-top: 12px;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.card__title--lg { font-size: 1.4rem; margin-top: 0; }
.card__title--md { margin-top: 14px; font-size: 1.35rem; line-height: 1.2; letter-spacing: -.01em; }
.card__title--sm { margin-top: 14px; font-size: 1.3rem; line-height: 1.2; letter-spacing: -.01em; }
.card__body { margin-top: 9px; font-size: 13.5px; line-height: 1.6; }
.card__body--14 { margin-top: 10px; font-size: 14px; line-height: 1.65; }
.card__body--135 { margin-top: 10px; font-size: 13.5px; line-height: 1.6; }
.card__foot { margin-top: 22px; }

.plate {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--d5-border-soft);
  box-shadow: var(--d5-shadow-lg);
}
.plate--flat { box-shadow: var(--d5-shadow); }

.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px;
  background-color: var(--d5-surface-2);
  background-image: repeating-linear-gradient(135deg, transparent 0 8px, var(--d5-stripe) 8px 9px);
}
.placeholder--invert {
  padding: 12px;
  background-color: var(--d5-invert-plate);
  background-image: repeating-linear-gradient(135deg, transparent 0 8px, var(--d5-invert-hatch) 8px 9px);
}
.placeholder__cap {
  font-family: var(--d5-font-mono);
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--d5-ink-3);
  line-height: 1.55;
}
.placeholder--invert .placeholder__cap { color: var(--d5-invert-body); line-height: 1.5; }

.ph--hero { height: clamp(340px, 40vw, 500px); }
.ph--inset { height: 150px; }
.ph--portrait { height: clamp(300px, 32vw, 420px); }
.ph--portrait-tall { height: clamp(340px, 38vw, 480px); }
.ph--operatory { height: clamp(260px, 28vw, 340px); }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border-radius: 10px;
  background: var(--d5-accent-soft);
  color: var(--d5-accent);
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.chip--tight { padding: 8px 14px; }

/* --------------------------------------------------------------------------
   10. Hairline stacks and bullet lists
   -------------------------------------------------------------------------- */

.stack {
  display: grid;
  gap: 1px;
  background: var(--d5-border-soft);
  border: 1px solid var(--d5-border-soft);
  border-radius: 20px;
  overflow: hidden;
}
.stack__row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  justify-content: space-between;
  background: var(--d5-surface);
  padding: 18px 22px;
}
.stack__key {
  font-family: var(--d5-font-mono);
  font-size: 10.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--d5-ink-3);
}
.stack__val {
  font-family: var(--d5-font-mono);
  font-size: 13px;
  color: var(--d5-ink-2);
}
.stack__val a { font-family: var(--d5-font-mono); font-size: 13px; color: var(--d5-accent); }

.steps { display: flex; flex-direction: column; }
.steps .stack__row {
  justify-content: flex-start;
  gap: 18px;
  align-items: flex-start;
  padding: 22px 24px;
  flex-wrap: nowrap;
}
.steps__n {
  font-family: var(--d5-font-serif);
  font-size: 26px;
  color: var(--d5-accent);
  line-height: 1;
  flex-shrink: 0;
}
.steps__title { display: block; font-weight: 650; color: var(--d5-ink); font-size: 16px; }
.steps__body { display: block; margin-top: 6px; font-size: 14px; line-height: 1.6; }

.bullets { display: flex; flex-direction: column; gap: 14px; }
.bullets li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-bottom: 1px solid var(--d5-border-soft);
  padding-bottom: 14px;
}
.bullets li:last-child { border-bottom: 0; padding-bottom: 0; }
.bullets__dot {
  display: block;
  height: 5px;
  width: 5px;
  border-radius: 999px;
  background: var(--d5-accent);
  flex-shrink: 0;
  margin-top: 9px;
}
.bullets span:last-child { line-height: 1.65; }

/* --------------------------------------------------------------------------
   11. Hospital notice
   -------------------------------------------------------------------------- */

.notice {
  border: 1px solid var(--d5-warn);
  border-radius: 20px;
  background: var(--d5-surface);
  padding: 26px 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  align-items: flex-start;
}
.notice__label {
  font-family: var(--d5-font-mono);
  font-size: 10.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--d5-warn);
  padding-top: 4px;
}
.notice__body { flex: 1; min-width: 280px; line-height: 1.65; }

/* --------------------------------------------------------------------------
   12. Map
   -------------------------------------------------------------------------- */

.map {
  display: grid;
  min-height: 340px;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--d5-border-soft);
  box-shadow: var(--d5-shadow);
  position: relative;
}
.map--short { min-height: 280px; }
.map__canvas { display: none; min-height: inherit; z-index: 0; }
.map.is-live .map__canvas { display: block; }
.map.is-live .placeholder { display: none; }

/* OSM tiles are drawn for light UI; dim them rather than shipping a second
   tile provider. */
:root[data-theme="dark"] .leaflet-tile { filter: brightness(.72) contrast(1.05) saturate(.85); }
.leaflet-container { background: var(--d5-surface-2); font: inherit; }
.leaflet-popup-content { font-family: var(--d5-font-sans); font-size: 13px; }

/* Leaflet's own chrome ships hard-coded white; bind it to the token layer so
   the map does not glare in dark mode. */
.leaflet-bar a,
.leaflet-bar a:hover {
  background: var(--d5-surface);
  color: var(--d5-ink-2);
  border-bottom-color: var(--d5-border);
}
.leaflet-bar a:hover { color: var(--d5-accent); }
.leaflet-bar { border: 1px solid var(--d5-border); box-shadow: var(--d5-shadow); }
.leaflet-control-attribution {
  background: var(--d5-glass-solid) !important;
  color: var(--d5-ink-3);
  font-size: 10.5px;
}
.leaflet-control-attribution a { color: var(--d5-accent); }
.leaflet-popup-content-wrapper,
.leaflet-popup-tip { background: var(--d5-surface); color: var(--d5-ink-2); box-shadow: var(--d5-shadow); }

/* --------------------------------------------------------------------------
   13. Contact panel and form
   -------------------------------------------------------------------------- */

.panel {
  border: 1px solid var(--d5-border-soft);
  border-radius: 20px;
  background: var(--d5-surface);
  box-shadow: var(--d5-shadow);
  overflow: hidden;
}
.panel__sec { padding: 24px 26px; border-bottom: 1px solid var(--d5-border-soft); }
.panel__sec:last-child { border-bottom: 0; }
.panel--pad { padding: clamp(24px, 3vw, 34px); overflow: visible; }

.phone-xl {
  display: block;
  margin-top: 10px;
  font-family: var(--d5-font-serif);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -.02em;
  color: var(--d5-accent);
}

.address-mono {
  margin-top: 10px;
  font-style: normal;
  font-family: var(--d5-font-mono);
  font-size: 15px;
  line-height: 1.7;
  color: var(--d5-ink-2);
}

.hours-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.hours-list li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-family: var(--d5-font-mono);
  font-size: 13px;
  color: var(--d5-ink-2);
}

.form { margin-top: 26px; display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field__label { font-size: 13px; font-weight: 600; color: var(--d5-ink-2); }
.field input,
.field textarea {
  border: 1px solid var(--d5-border);
  border-radius: 12px;
  background: var(--d5-surface-2);
  padding: 13px 14px;
  font-size: 15px;
  color: var(--d5-ink);
  font-family: inherit;
  width: 100%;
}
.field textarea { resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: var(--d5-ink-3); }
.field.is-invalid input,
.field.is-invalid textarea { border-color: var(--d5-warn); }
.field__error {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--d5-warn);
}
.field__error:empty { display: none; }

.form__note { font-size: 12.5px; line-height: 1.6; color: var(--d5-ink-3); }
.form__note a { font-weight: 650; }

.form__status {
  font-size: 14px;
  line-height: 1.6;
  border-radius: 12px;
  padding: 13px 14px;
  border: 1px solid var(--d5-border);
  background: var(--d5-surface-2);
  color: var(--d5-ink-2);
}
.form__status:empty { display: none; }
.form__status--error { border-color: var(--d5-warn); color: var(--d5-ink); }
.form__status--ok { border-color: var(--d5-accent); color: var(--d5-ink); }

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   14. Footer
   -------------------------------------------------------------------------- */

.site-footer { background: var(--d5-invert-bg); color: var(--d5-invert-muted); }
.site-footer__inner { padding-block: clamp(56px, 6vw, 80px) 40px; }

.footer-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.footer-logo__name {
  font-family: var(--d5-font-serif);
  font-size: 21px;
  font-weight: 600;
  color: var(--d5-invert-ink);
}
.footer-logo__sub {
  font-family: var(--d5-font-mono);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--d5-invert-faint);
  margin-top: 4px;
}
.footer-logo__img { height: 30px; width: auto; display: block; }
.footer-desc { margin-top: 18px; max-width: 30em; font-size: 14px; line-height: 1.65; }

.footer-head {
  font-family: var(--d5-font-mono);
  font-size: 10px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--d5-invert-faint);
  font-weight: 400;
}
.footer-links { margin-top: 18px; display: flex; flex-direction: column; gap: 11px; }
.footer-links a { font-size: 14px; color: var(--d5-invert-body); }
.footer-links a:hover { color: var(--d5-invert-ink); }
.footer-mono,
.footer-links a.footer-mono { font-family: var(--d5-font-mono); font-size: 13px; }
.footer-mono--block { display: block; line-height: 1.6; }

.lang--invert { margin-top: 22px; }
.lang--invert .lang__list { border-right: 0; padding-right: 0; gap: 8px; }
.lang--invert .lang__link { padding: 7px 12px; color: var(--d5-invert-muted); }
.lang--invert .lang__link.is-active { background: var(--d5-invert-fill); color: var(--d5-invert-ink); }

.footer-bottom {
  margin-top: 48px;
  border-top: 1px solid var(--d5-invert-border);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
.footer-bottom a { color: var(--d5-invert-muted); }
.footer-bottom a:hover { color: var(--d5-invert-ink); }

/* --------------------------------------------------------------------------
   15. Mobile call bar + the one load-bearing breakpoint
   -------------------------------------------------------------------------- */

.callbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 120;
  display: flex;
  gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: var(--d5-glass-solid);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-top: 1px solid var(--d5-glass-border);
}
.callbar__call { flex: 2; padding: 15px 12px; font-size: 16px; font-weight: 700; }
.callbar__dir { flex: 1; padding: 14px 12px; font-size: 15px; font-weight: 600; }

/* 1160px is measured, not chosen: logo 154 + nav 472 + language 99 + toggle 34
   + CTA 205 + gaps 80 + padding ~= 1135px. Lowering it re-introduces a wrapped
   two-row header with an orphaned CTA on 1024 and 1152px laptops. If the nav
   gains an item, re-measure. */
@media (max-width: 1159px) {
  [data-desktop-only] { display: none !important; }
  body { padding-bottom: 104px; }

  /* Below the desktop row the nav cannot share a line with the logo, the
     toggle and the CTA. Rather than let it wrap into an unpredictable three-
     row sticky header, drop it to its own full-width row that scrolls
     sideways — the header is then exactly two rows tall at every width down
     to 375px. No hamburger: the design uses no icon set. */
  .site-header__inner { padding-bottom: 8px; row-gap: 4px; }
  .logo { margin-right: auto; }

  /* A zero-height full-width flex item forces the line break, so the nav and
     the language switcher share row two instead of the switcher landing on a
     third row. A visitor who needs 中文 needs it on a phone most of all — the
     header switcher is not desktop-only. */
  .site-header__inner::before { content: ""; flex-basis: 100%; order: 9; height: 0; }
  .site-header .lang { order: 11; flex-shrink: 0; }
  .site-header .lang__list {
    border-right: 0;
    padding-right: 0;
    border-left: 1px solid var(--d5-border);
    padding-left: 12px;
  }
  .nav {
    order: 10;
    flex: 1 1 0;
    min-width: 0;
    margin-right: 0;
    margin-left: calc(var(--d5-shell) * -1);
    padding-left: var(--d5-shell);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* Fade the trailing edge so a clipped nav item reads as scrollable. */
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav__list { flex-wrap: nowrap; }
  .nav__link { padding-inline: 12px; }
}
@media (min-width: 1160px) {
  [data-mobile-only] { display: none !important; }
}

/* --------------------------------------------------------------------------
   16. Print
   -------------------------------------------------------------------------- */

@media print {
  .site-header, .callbar, .ebanner, .theme-toggle, .skip-link { display: none !important; }
  body { padding-bottom: 0; background: #fff; color: #000; }
  .card, .panel, .plate { box-shadow: none; }
}
