
:root {
  --bg: #faf7f2;
  --bg-elev: #ffffff;
  --ink: #1b1a19;
  --ink-2: #5b5752;
  --ink-3: #8a857e;
  --line: #e6dfd4;
  --accent: #1f3a5f;
  --accent-soft: #dde5ef;
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 14px;
  --gutter: 16px;
  --measure: 66ch;
  --shadow: 0 1px 2px rgba(20,16,12,.06), 0 8px 24px -12px rgba(20,16,12,.18);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141311;
    --bg-elev: #1d1b18;
    --ink: #ece7df;
    --ink-2: #b4ada3;
    --ink-3: #7d776f;
    --line: #2b2824;
    --accent: #8fb3e0;
    --accent-soft: #1b2535;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  --bg: #141311;
  --bg-elev: #1d1b18;
  --ink: #ece7df;
  --ink-2: #b4ada3;
  --ink-3: #7d776f;
  --line: #2b2824;
  --accent: #8fb3e0;
  --accent-soft: #1b2535;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 16px; background: var(--bg-elev); padding: 8px 12px; z-index: 10; }

/* header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; color: var(--ink); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; color: var(--accent); }
.nav { display: flex; gap: 4px 16px; flex-wrap: wrap; font-size: .95rem; }
.nav a { color: var(--ink-2); padding: 6px 0; } .nav a[aria-current="page"] { color: var(--ink); border-bottom: 2px solid var(--accent); }

/* sections */
main > section { padding: 48px 0; border-bottom: 1px solid var(--line); }
main > section:last-of-type { border-bottom: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.2rem; }
.eyebrow { font-family: var(--font-body); font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
p { margin: 0 0 1em; max-width: var(--measure); }
.lede { font-size: 1.2rem; color: var(--ink-2); max-width: 52ch; }
.muted { color: var(--ink-2); }
.small { font-size: .9rem; }

/* hero */
.hero { padding: 72px 0 56px; }
.hero h1 { max-width: 16ch; }
.hero .lede { margin-top: 16px; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: .95rem; border: 1px solid var(--accent); color: var(--accent); background: transparent; }
.btn.primary { background: var(--accent); color: #fff; }
.btn:hover { text-decoration: none; filter: brightness(1.05); }

/* grids and cards */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid.cols-2 { grid-template-columns: repeat(2, 1fr); } .grid.cols-3 { grid-template-columns: repeat(2, 1fr); } .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: 4px; }
.card p { font-size: .98rem; }
.card .meta { color: var(--ink-3); font-size: .85rem; margin-bottom: 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; letter-spacing: .02em; background: var(--accent-soft); color: var(--accent); text-transform: uppercase; }
.pill.shut_down, .pill.paused { background: var(--line); color: var(--ink-2); }
.outcome { border-left: 3px solid var(--accent); padding-left: 12px; color: var(--ink-2); font-size: .95rem; }

/* highlights */
.stat { padding: 20px 22px; }
.stat .value { font-family: var(--font-display); font-size: 2.1rem; font-weight: 500; line-height: 1.1; color: var(--ink); }
.stat .label { color: var(--ink-2); font-size: .9rem; margin-top: 6px; }
.stat .detail { color: var(--ink-3); font-size: .82rem; margin-top: 6px; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 28px 32px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
.timeline .period { color: var(--ink-3); font-size: .85rem; font-weight: 600; letter-spacing: .04em; }
.timeline h3 { margin: 2px 0 2px; }
.timeline .org { color: var(--ink-2); font-weight: 500; margin-bottom: 6px; }

/* skills */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 20px; padding: 0; list-style: none; }
.chips li { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .9rem; }
.skill-group h3 { font-family: var(--font-body); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }

/* lists */
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 14px 0; border-top: 1px solid var(--line); }
.plain li:first-child { border-top: 0; }
.row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.row .right { color: var(--ink-3); font-size: .9rem; white-space: nowrap; }

/* contact */
.contact-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .contact-grid { grid-template-columns: 1.1fr 1fr; } }
form.inquiry { display: grid; gap: 12px; }
form.inquiry label { display: grid; gap: 6px; font-size: .9rem; font-weight: 500; }
form.inquiry input, form.inquiry textarea, form.inquiry select { font: inherit; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-elev); color: var(--ink); width: 100%; }
form.inquiry textarea { min-height: 120px; resize: vertical; }
form.inquiry .hp { position: absolute; left: -9999px; opacity: 0; height: 0; }
.notice { font-size: .82rem; color: var(--ink-3); }

/* media */
.hero-grid { display: grid; gap: 28px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 760px) { .hero-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.hero h1 { overflow-wrap: anywhere; }
.hero .portrait img { width: min(100%, 360px); border-radius: var(--radius); box-shadow: var(--shadow); margin: 0 auto; object-fit: cover; aspect-ratio: 4 / 5; }
.media figure { margin: 0; }
.media figcaption, .media .tile figcaption { color: var(--ink-3); font-size: .88rem; margin-top: 10px; }
.media img { border-radius: var(--radius); box-shadow: var(--shadow); }
.media.full .wrap { max-width: 1280px; }
.media.full img { width: 100%; }
.media.inset img { width: 100%; max-width: 820px; margin: 0 auto; }
.media.portrait img { width: min(100%, 420px); margin: 0 auto; }
.gallery .tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.media video { width: 100%; max-width: 920px; border-radius: var(--radius); background: #000; display: block; margin: 0 auto; }
.embed { position: relative; width: 100%; max-width: 920px; margin: 0 auto; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #000; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.demo .demo-frame { position: relative; width: 100%; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; border: 1px solid rgba(0,0,0,.08); }
.demo .demo-frame iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.demo figure { margin: 0; }
.demo .demo-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; margin-top: 10px; color: var(--ink-3); font-size: .88rem; }
.demo .demo-foot figcaption, .demo .demo-card figcaption { color: var(--ink-3); font-size: .88rem; }
.demo .demo-open { font-size: .88rem; }
.demo.page-demo .wrap { max-width: 1400px; }
.demo.page-demo .demo-frame { height: calc(100vh - 180px); min-height: 480px; }
.demo .demo-card { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
dialog.demo-modal { width: min(96vw, 1400px); height: min(94vh, 1000px); padding: 0; border: 0; border-radius: var(--radius); box-shadow: 0 30px 80px rgba(0,0,0,.35); background: #fff; display: none; flex-direction: column; overflow: hidden; }
dialog.demo-modal[open] { display: flex; }
dialog.demo-modal::backdrop { background: rgba(10, 10, 12, .72); }
dialog.demo-modal .demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 8px 16px; border-bottom: 1px solid rgba(0,0,0,.1); font-size: .92rem; }
dialog.demo-modal .demo-title { font-weight: 600; }
dialog.demo-modal .demo-actions { display: flex; align-items: center; gap: 12px; }
dialog.demo-modal .demo-close { border: 0; background: transparent; font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 4px 8px; color: inherit; }
dialog.demo-modal .demo-frame { flex: 1; border-radius: 0; box-shadow: none; border: 0; }

/* forms and bookings */
form.inquiry .help { display: block; font-weight: 400; color: var(--ink-3); font-size: .82rem; }
form.inquiry .two { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
form.inquiry label.check { display: flex; align-items: center; gap: 10px; }
form.inquiry label.check input { width: auto; }
.form-section form.inquiry { max-width: 560px; }
.sent { display: none; background: var(--accent-soft); color: var(--ink); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 16px; max-width: 560px; }
.sent:target { display: block; }
.hours { border-collapse: collapse; width: 100%; max-width: 420px; margin: 0 0 12px; font-size: .95rem; }
.hours caption { text-align: left; font-weight: 600; margin-bottom: 8px; color: var(--ink-2); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.hours th { text-align: left; font-weight: 500; padding: 8px 12px 8px 0; color: var(--ink-2); white-space: nowrap; }
.hours td { padding: 8px 0; border-top: 1px solid var(--line); }
.hours tr:first-child td { border-top: 0; }

/* doctor specifics */
body.doctor .hero { background: var(--accent-soft); margin-top: 0; }
.disclaimer { background: var(--accent-soft); border-radius: var(--radius); padding: 14px 18px; font-size: .9rem; color: var(--ink-2); }

/* reviews */
.reviews-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 10px; color: var(--ink-2); font-size: .95rem; }
.reviews-summary + .reviews-summary { margin-top: -2px; }
.reviews-summary + .grid { margin-top: 18px; }
.reviews-summary strong { font-size: 1.1rem; color: var(--ink); }
.stars { color: #d9960b; letter-spacing: .06em; font-size: 1.05rem; line-height: 1; white-space: nowrap; }
.review .review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.review .avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; }
.review .avatar.initial { display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 1.1rem; }
.review .stars { display: block; margin-bottom: 8px; }
.review p { white-space: pre-line; margin-bottom: 0; }
.review-gallery { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.review-gallery img { width: 96px; height: 96px; object-fit: cover; border-radius: calc(var(--radius) / 2); }
.review-photos { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin-top: 20px; }
@media (min-width: 640px) { .review-photos { grid-template-columns: repeat(4, 1fr); } }
.review-photos figure { margin: 0; }
.review-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.review-photos figcaption { color: var(--ink-3); font-size: .8rem; margin-top: 6px; }
.reviews .notice { margin-top: 16px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--ink-3); font-size: .85rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-footer code { font-size: .8rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
