/* Harbor Dental Studio — "calm clinic" homepage (demo) */
:root {
  color-scheme: light;
  --paper: #fbf8f3;
  --paper-2: #f3ede3;
  --card: #fffdf9;
  --ink: #0b3b3a;
  --ink-2: #2c4745;
  --muted: #55635f;
  --teal: #0f766e;
  --teal-soft: #dcefe9;
  --line: #e3dbcd;
  --field: #847b6d;
  --apricot: #f6c39b;
  --apricot-hover: #f1ad7b;
  --apricot-soft: #fde8d6;
  --err: #b42318;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 18px;
  --shadow: 0 1px 0 rgb(11 59 58 / .04), 0 28px 56px -28px rgb(11 59 58 / .32);
}
@supports (color: oklch(0% 0 0)) {
  :root {
    --paper: oklch(98% 0.007 81);
    --paper-2: oklch(94.8% 0.015 81);
    --card: oklch(99.4% 0.006 85);
    --ink: oklch(32.1% 0.049 193);
    --ink-2: oklch(37.6% 0.033 190);
    --muted: oklch(48.7% 0.018 176);
    --teal: oklch(51.1% 0.086 186);
    --teal-soft: oklch(93.6% 0.022 175);
    --line: oklch(89.4% 0.021 82);
    --field: oklch(58.7% 0.024 79);
    --apricot: oklch(85.3% 0.079 60);
    --apricot-soft: oklch(94.3% 0.033 63);
    --err: oklch(50% 0.182 30);
  }
}
@supports (color: oklch(from red l c h)) {
  :root { --apricot-hover: oklch(from var(--apricot) calc(l - .05) calc(c + .025) h); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-block: 88px 24px; }
body { margin: 0; font: 1.0625rem/1.6 var(--sans); color: var(--ink); background: var(--paper); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; letter-spacing: -.015em; margin: 0 0 .45em; text-wrap: balance; }
h2 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--teal); text-underline-offset: .2em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
svg.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 60; padding: 12px 16px; border-radius: 10px; background: var(--ink); color: var(--paper); font-weight: 600; }
.skip-link:focus { top: 12px; color: var(--paper); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .65rem 1.25rem; border: 1.5px solid transparent; border-radius: 999px; font: inherit; font-weight: 650; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.btn--lg { min-height: 56px; padding-inline: 1.6rem; font-size: 1.0625rem; }
.btn--book { background: var(--apricot); color: var(--ink); }
.btn--book:hover { background: var(--apricot-hover); color: var(--ink); }
.btn--line { background: transparent; color: var(--ink); border-color: var(--field); }
.btn--line:hover { background: var(--card); border-color: var(--ink); color: var(--ink); }
.call-link { display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; font-weight: 650; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 2px; }
.call-link:hover { text-decoration-color: currentColor; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; background: rgb(251 248 243 / .94); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.header-inner { display: flex; align-items: center; gap: 12px 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; view-transition-name: brand; margin-right: auto; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-name { font-family: var(--serif); font-size: 1.3rem; letter-spacing: -.01em; white-space: nowrap; }
.brand-name small { font-size: 1em; font-style: italic; color: var(--teal); }
.header-actions { display: flex; align-items: center; gap: 8px 16px; }
.header-call { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; min-width: 48px; font-weight: 650; color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums; }
.header-call:hover { color: var(--teal); }
.menu-btn { display: inline-grid; place-items: center; width: 48px; height: 48px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; }

.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a { display: flex; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 550; }
.site-nav a:hover { color: var(--ink); background: var(--paper-2); }
.site-nav:popover-open { position: fixed; inset: 76px 12px auto auto; margin: 0; width: min(18rem, calc(100vw - 24px)); padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
@media (min-width: 1100px) {
  .site-nav, .site-nav:popover-open { display: block; position: static; inset: auto; width: auto; margin: 0 auto 0 0; padding: 0; border: 0; background: none; box-shadow: none; overflow: visible; }
  .site-nav ul { display: flex; gap: 2px; }
  .site-nav a { padding: 0 12px; font-size: .975rem; }
  .menu-btn { display: none; }
  .brand { margin-right: 16px; }
}
@media (max-width: 767px) {
  .hide-sm { display: none; }
  .header-inner { min-height: 64px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-name { font-size: 1.15rem; }
  .header-actions { gap: 4px; }
}

/* Hero */
.hero { padding-block: clamp(36px, 7vw, 96px) 8px; }
.hero-grid { display: grid; gap: 40px; align-items: end; }
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(32px, 4vw, 56px); }
  .hero-copy { padding-bottom: 8px; }
}
.kicker { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-weight: 550; margin-bottom: 1.25rem; }
.kicker::before { content: ""; width: 28px; height: 1.5px; background: var(--teal); }
#hero-title { font-size: clamp(2.75rem, 7vw, 5.5rem); line-height: 1.02; letter-spacing: -.025em; margin-bottom: .35em; view-transition-name: hero-title; }
#hero-title em { color: var(--teal); }
.lede { font-size: clamp(1.125rem, 1rem + .4vw, 1.3rem); color: var(--ink-2); max-width: 36ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 1.75rem; }

/* Next openings card */
.slots { background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 20px 8px 8px; }
.slots-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 0 16px 12px; }
.slots-head h2 { font-size: 1.6rem; margin: 0; }
.slots-note { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.slots-note::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.slot-list { list-style: none; margin: 0; padding: 0; }
.slot-list li + li { border-top: 1px solid var(--line); }
.slot { display: grid; grid-template-columns: 6.25rem 1fr auto; grid-template-areas: "when what end"; align-items: center; gap: 4px 12px; width: 100%; min-height: 72px; padding: 12px 16px; border: 0; border-radius: 14px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background-color .15s; }
.slot:hover { background: var(--paper-2); }
.slot-when { grid-area: when; display: grid; }
.slot-day { font-size: .875rem; color: var(--muted); }
.slot-time { font-family: var(--serif); font-size: 1.45rem; line-height: 1.15; font-variant-numeric: tabular-nums lining-nums; }
.slot-what { grid-area: what; font-size: .975rem; color: var(--ink-2); line-height: 1.35; }
.slot > svg { grid-area: end; color: var(--teal); }
.slot--next { grid-template-areas: "badge badge badge" "when what end"; background: var(--apricot-soft); margin-bottom: 4px; }
.slot--next:hover { background: var(--apricot-soft); box-shadow: inset 0 0 0 1.5px var(--apricot-hover); }
.badge { grid-area: badge; justify-self: start; padding: 3px 10px; border-radius: 999px; background: var(--apricot); color: var(--ink); font-size: .8125rem; font-weight: 700; }
.slots-foot { margin: 8px 16px 10px; font-size: .9375rem; color: var(--ink-2); }

/* Facts strip */
.facts { list-style: none; margin: clamp(40px, 6vw, 72px) 0 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.facts li { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.facts .ico { width: 26px; height: 26px; color: var(--teal); margin-top: 1px; }
.facts strong { display: block; font-weight: 650; }
.facts span { display: block; color: var(--muted); font-size: .9375rem; }
@media (min-width: 640px) { .facts { grid-template-columns: 1fr 1fr; column-gap: 32px; } }
@media (min-width: 1040px) { .facts { grid-template-columns: repeat(4, 1fr); } .facts li { border-bottom: 0; } }

/* Tooltips (popovers) — centred by default, anchored where supported */
.tip-btn { display: inline; padding: 2px 0; min-height: 24px; border: 0; background: none; color: var(--teal); font: inherit; font-size: .9375rem; font-weight: 600; text-decoration: underline dotted; text-underline-offset: .25em; cursor: pointer; }
.tip-btn:hover { color: var(--ink); }
.tip { width: min(22rem, calc(100vw - 32px)); padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); box-shadow: var(--shadow); font-size: .975rem; }
.tip p { margin: 0 0 .5em; }
.tip p:last-child { margin: 0; }
@media (max-width: 639px) { .tip::backdrop { background: rgb(11 59 58 / .25); } }
@supports (anchor-name: --a) {
  @media (min-width: 640px) {
    #ins-btn { anchor-name: --ins; }
    #deep-btn { anchor-name: --deep; }
    #tip-ins { position-anchor: --ins; }
    #tip-deep { position-anchor: --deep; }
    .tip { inset: auto; margin: 10px 0; position-area: block-end span-inline-end; position-try-fallbacks: flip-inline, flip-block, flip-block flip-inline; }
  }
}

/* Sections */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section--tint { background: var(--paper-2); }
.section-head { max-width: 40rem; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { font-size: 1.125rem; color: var(--ink-2); }
.fine { margin-top: 24px; font-size: .9375rem; color: var(--muted); }

/* Services — editorial numbered list */
.services-wrap { container-type: inline-size; }
.services { list-style: none; margin: 0; padding: 0; counter-reset: svc; display: grid; border-top: 1px solid var(--ink); }
.services > li { counter-increment: svc; position: relative; padding: 24px 0 24px 3.75rem; border-bottom: 1px solid var(--line); }
.services > li::before { content: counter(svc, decimal-leading-zero); position: absolute; left: 0; top: 26px; font-family: var(--serif); font-size: 1.25rem; color: var(--teal); font-variant-numeric: tabular-nums lining-nums; }
.services h3 { margin-bottom: .3em; }
.services p { color: var(--ink-2); margin-bottom: .75em; max-width: 44ch; }
.svc-meta { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0; font-variant-numeric: tabular-nums; }
.svc-meta div { display: flex; align-items: baseline; gap: 8px; }
.svc-meta dt { font-size: .8125rem; color: var(--muted); }
.svc-meta dd { margin: 0; font-weight: 600; }
.svc-meta div + div dd { font-family: var(--serif); font-size: 1.2rem; font-weight: 400; }
@container (min-width: 46rem) {
  .services { grid-template-columns: 1fr 1fr; column-gap: clamp(32px, 5cqi, 72px); }
}

/* First visit — three steps */
@media (min-width: 960px) { .steps-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; } .steps-grid .section-head { position: sticky; top: 120px; } }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: st; display: grid; gap: 12px; }
.steps li { counter-increment: st; display: grid; grid-template-columns: 3.5rem 1fr; column-gap: 20px; padding: 24px 0 24px 20px; border-left: 3px solid var(--teal); view-timeline-name: --step; }
.steps li::before { content: counter(st); grid-row: span 2; display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border: 1.5px solid var(--teal); border-radius: 50%; background: var(--teal); color: var(--paper); font-family: var(--serif); font-size: 1.6rem; font-variant-numeric: lining-nums; }
.steps h3 { margin: .2em 0 .25em; }
.steps p { margin: 0; color: var(--ink-2); }

/* Team — text portraits */
.team { display: grid; gap: 0 clamp(32px, 5vw, 72px); }
@media (min-width: 720px) { .team { grid-template-columns: 1fr 1fr; } }
.person { padding: 28px 0 32px; border-top: 1px solid var(--ink); }
.person h3 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem); letter-spacing: -.02em; margin-bottom: .15em; }
.person .role { color: var(--teal); font-weight: 650; margin-bottom: .6em; }
.person p { margin-bottom: .5em; color: var(--ink-2); }
.person .off { font-family: var(--serif); font-style: italic; font-size: 1.125rem; color: var(--ink); }
.person .off span { font-family: var(--sans); font-style: normal; font-size: .8125rem; color: var(--muted); margin-right: 6px; }

/* Reviews */
.quotes { display: grid; gap: 32px clamp(32px, 4vw, 56px); }
@media (min-width: 900px) { .quotes { grid-template-columns: repeat(3, 1fr); } }
.quotes figure { margin: 0; padding-top: 20px; border-top: 1px solid var(--line); }
.quotes blockquote { margin: 0 0 14px; font-family: var(--serif); font-size: 1.3rem; line-height: 1.4; }
.quotes blockquote p { margin: 0; }
.quotes blockquote p::before { content: "\201C"; color: var(--teal); }
.quotes blockquote p::after { content: "\201D"; color: var(--teal); }
.quotes figcaption { color: var(--muted); font-size: .9375rem; }

/* Visit */
.visit { display: grid; gap: 40px; }
@media (min-width: 900px) { .visit { grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; } }
.hours { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours caption { text-align: left; font-family: var(--serif); font-size: 1.5rem; margin-bottom: 10px; }
.hours th, .hours td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.hours td { text-align: right; color: var(--ink-2); }
.hours tr.is-today { background: var(--teal-soft); }
.hours tr.is-today th { font-weight: 650; }
.today { margin-left: 8px; font-size: .8125rem; font-weight: 700; color: var(--teal); }
address { font-style: normal; margin-top: 28px; }
address p { display: flex; gap: 12px; margin-bottom: 12px; }
address .ico { color: var(--teal); margin-top: 3px; }
.map { margin: 0; }
.map svg { display: block; width: 100%; height: auto; aspect-ratio: 640 / 420; border-radius: var(--radius); border: 1px solid var(--line); }
.map figcaption { margin-top: 8px; font-size: .875rem; color: var(--muted); }

/* FAQ */
@media (min-width: 960px) { .faq-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; } }
.faq { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; padding: 14px 0; font-family: var(--serif); font-size: 1.3rem; line-height: 1.3; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 1.5px solid var(--field); border-radius: 50%; font-family: var(--sans); font-size: 1.25rem; color: var(--teal); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0; padding: 0 48px 22px 0; color: var(--ink-2); }

/* Closing band */
.closing { background: var(--ink); color: var(--paper); padding-block: clamp(64px, 9vw, 112px); }
.closing h2 { font-size: clamp(2.5rem, 1.6rem + 4vw, 4.5rem); margin-bottom: .25em; }
.closing p { color: #c8d6d3; font-size: 1.125rem; }
.closing-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 1.5rem; }
.call-link--light { color: var(--paper); text-decoration-color: rgb(251 248 243 / .35); }
.call-link--light:hover { color: var(--paper); }
.closing :focus-visible { outline-color: var(--apricot); }

/* Footer */
.site-footer { padding-block: 48px; background: var(--paper-2); font-size: .9375rem; color: var(--ink-2); }
.footer-grid { display: grid; gap: 24px 48px; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr 1.4fr; } }
.footer-grid p { margin: 0 0 .5em; }
.footer-brand { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); }
.footer-demo strong { color: var(--ink); font-weight: 650; }

/* Mobile action bar */
.mbar { display: none; }
@media (max-width: 767px) {
  html { scroll-padding-block: 80px 96px; }
  body { padding-bottom: 76px; }
  .mbar { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; position: fixed; inset: auto 0 0; z-index: 30; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgb(251 248 243 / .97); border-top: 1px solid var(--line); }
  .mbar .btn { min-height: 52px; }
}

/* Booking dialog */
.book { width: min(36rem, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 22px; background: var(--card); color: var(--ink); box-shadow: 0 40px 80px -24px rgb(11 59 58 / .45); overscroll-behavior: contain; }
.book::backdrop { background: rgb(11 59 58 / .5); }
@media (max-width: 599px) { .book { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 22px 22px 0 0; max-height: 94dvh; } }
.book-inner { padding: 20px clamp(20px, 4vw, 32px) 28px; }
.book-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.book-head h2 { font-size: 2rem; margin: 0; }
.x { display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--paper-2); color: var(--ink); cursor: pointer; }
.x:hover { background: var(--line); }

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { font-weight: 650; padding: 0; }
.opt { font-weight: 400; color: var(--muted); }
.field input:not([type="radio"]), .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--field); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; }
.field textarea { field-sizing: content; min-height: calc(3lh + 24px); max-height: 12lh; resize: vertical; }
.field :is(input, select, textarea):focus-visible { outline-offset: 1px; border-color: var(--teal); }
.err, .form-alert { display: none; color: var(--err); font-size: .9375rem; font-weight: 600; margin: 0; }
.form-alert { padding: 10px 14px; border-radius: 12px; background: #fdecea; }
.field input:user-invalid, .was-submitted .field input:invalid { border-color: var(--err); }
.field input:user-invalid ~ .err, .was-submitted .field input:invalid ~ .err { display: block; }
.form:has(:user-invalid) .form-alert, .form.was-submitted:has(:invalid) .form-alert { display: block; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chips label { position: relative; font-weight: 500; }
.chips input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chips span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--field); border-radius: 999px; font-variant-numeric: tabular-nums; }
.chips input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chips input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 4px; }
.form-foot p { margin: 0; font-size: .9375rem; line-height: 1.45; }
.thanks { padding: 8px 0; }
.thanks:focus { outline: none; }
.thanks h3 { font-size: 1.75rem; }
.thanks-ico { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 16px; border-radius: 50%; background: var(--teal-soft); color: var(--teal); }
.thanks-ico svg { width: 28px; height: 28px; stroke-width: 2; }

/* Customizable select, native select elsewhere */
.o-sub { color: var(--muted); }
@supports (appearance: base-select) {
  #f-reason, #f-reason::picker(select) { appearance: base-select; }
  #f-reason { display: flex; align-items: center; cursor: pointer; }
  #f-reason::picker-icon { color: var(--teal); }
  #f-reason::picker(select) { margin-top: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
  #f-reason option { min-height: 44px; padding: 8px 12px; border-radius: 10px; gap: 10px; }
  #f-reason option:hover, #f-reason option:focus-visible { background: var(--paper-2); }
  #f-reason option:checked { background: var(--teal-soft); font-weight: 650; }
  #f-reason option::checkmark { color: var(--teal); }
  #f-reason selectedcontent .o-sub { display: none; }
}

/* Motion: three moments only, all opt-in */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  html { scroll-behavior: smooth; }

  /* 1. booking dialog */
  .book, .book::backdrop { transition: opacity .28s ease, translate .28s ease, display .28s allow-discrete, overlay .28s allow-discrete; }
  .book { opacity: 0; translate: 0 24px; }
  .book[open] { opacity: 1; translate: 0 0; }
  .book::backdrop { opacity: 0; }
  .book[open]::backdrop { opacity: 1; }
  @starting-style {
    .book[open] { opacity: 0; translate: 0 24px; }
    .book[open]::backdrop { opacity: 0; }
  }

  /* 2. first-visit steps light up as they scroll into view */
  @supports (animation-timeline: view()) {
    .steps li { animation: step-rule linear both; animation-timeline: --step; animation-range: entry 40% cover 50%; }
    .steps li::before { animation: step-dot linear both; animation-timeline: --step; animation-range: entry 40% cover 50%; }
  }

  /* FAQ height polish where supported */
  @supports (interpolate-size: allow-keywords) {
    :root { interpolate-size: allow-keywords; }
    .faq details::details-content { height: 0; overflow: clip; transition: height .3s ease, content-visibility .3s allow-discrete; }
    .faq details[open]::details-content { height: auto; }
  }
}
@keyframes step-rule { from { border-left-color: var(--line); } }
@keyframes step-dot { from { background: transparent; color: var(--teal); } }

/* 3. cross-document view transition timing */
::view-transition-group(brand), ::view-transition-group(hero-title) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
