/* babyscan.clinic prototype: the one stylesheet.
   Mobile first. Breakpoints: 480, 768, 1024, 1280. Markup for every component is in README.md.
   Sections: 1 tokens, 2 reset and type, 3 layout utilities, 4 prototype-only parts, 5 public header and footer,
   6 dashboard shell, 7 components, 8 booking flow, 9 public page sections, 10 motion and print. */

/* ---------------------------------------------------------------- 1. tokens */
:root {
  --ink: #1F2937;
  --muted: #6B7280;
  --bg: #FFF8F6;
  --surface: #FFFFFF;
  --line: #EADFDC;
  --primary: #C96A7A;
  --primary-dark: #A94F60;
  --accent: #2E8B8B;
  --success: #2F855A;
  --warning: #B7791F;
  --danger: #C53030;
  --info: #2B6CB0;

  /* derived shades: text on white must reach 4.5:1, so filled buttons use --primary-dark and text uses the -dark tones */
  --primary-darker: #8E3F4F;
  --primary-tint: #FBEDEF;
  --primary-soft: #F6DDE1;
  --accent-dark: #22706F;
  --accent-tint: #E4F2F2;
  --ink-soft: #374151;
  --line-strong: #D9C8C4;
  --surface-warm: #FDF4F2;
  --footer-bg: #2A2125;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(31, 41, 55, .04), 0 6px 20px rgba(169, 79, 96, .07);
  --shadow-hover: 0 2px 4px rgba(31, 41, 55, .05), 0 14px 32px rgba(169, 79, 96, .12);
  --shadow-lg: 0 24px 64px rgba(31, 41, 55, .22);
  --focus-ring: 0 0 0 3px rgba(169, 79, 96, .32);

  --proto-h: 0px;         /* 36px while the prototype bar shows (set by proto.js) */
  --header-h: 64px;
}
.has-proto-bar { --proto-h: 36px; }

/* ---------------------------------------------------------------- 2. reset and type */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--proto-h) + var(--header-h) + 12px); }
body {
  margin: 0; padding-top: var(--proto-h);
  font: 400 16px/1.55 var(--font-body); color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-wrap: break-word;
}
img, svg, video { display: block; max-width: 100%; }
svg { flex: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
p, ul, ol, dl, figure, blockquote { margin: 0 0 1em; }
:where(ul[class], ol[class]) { list-style: none; padding: 0; margin: 0; }
dd { margin: 0; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }

h1, h2, h3, h4, .h1, .h2, .h3 {
  font-family: var(--font-display); font-weight: 600; line-height: 1.2; letter-spacing: -.01em;
  color: var(--ink); margin: 0 0 .5em; font-optical-sizing: auto;
}
h1, .h1 { font-size: 32px; }
h2, .h2 { font-size: 24px; }
h3, .h3 { font-size: 20px; }
h4 { font-size: 17px; }
@media (min-width: 768px) {
  h1, .h1 { font-size: 40px; }
  h2, .h2 { font-size: 28px; }
}

a { color: var(--primary-dark); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--primary-darker); }
strong, b { font-weight: 600; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
hr, .divider { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

:focus-visible { outline: 3px solid var(--primary-dark); outline-offset: 2px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1200; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); }
.skip-link:focus { top: calc(var(--proto-h) + 8px); color: #fff; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }

/* text helpers */
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--primary-dark); margin-bottom: 10px; }
.lead { font-size: 18px; color: var(--ink-soft); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0 !important; } .mt-8 { margin-top: 8px !important; } .mt-16 { margin-top: 16px !important; } .mt-24 { margin-top: 24px !important; } .mt-32 { margin-top: 32px !important; }
.mb-0 { margin-bottom: 0 !important; } .mb-8 { margin-bottom: 8px !important; } .mb-16 { margin-bottom: 16px !important; } .mb-24 { margin-bottom: 24px !important; }

/* ---------------------------------------------------------------- 3. layout utilities */
.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 16px; }
.container-narrow { max-width: 800px; }
@media (min-width: 768px) { .container { padding-inline: 24px; } }

/* stack: vertical rhythm between children; set --stack to change the gap */
.stack > * + * { margin-top: var(--stack, 16px); }
.stack-sm { --stack: 8px; }
.stack-lg { --stack: 32px; }
.stack > * { margin-bottom: 0; }

/* cluster: a wrapping row with a gap; set --gap to change it */
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, 12px); }
.cluster-between { justify-content: space-between; }
.cluster-end { justify-content: flex-end; }
.items-start { align-items: start; }
.push { margin-left: auto; }

/* grid: one column on phones, more as the screen grows */
.grid { display: grid; gap: var(--gap, 16px); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 480px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 768px) {
  .grid { --gap: 20px; }
  .grid-2, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .grid { --gap: 24px; }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .grid-aside { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
}

.section { padding-block: 56px; }
.section-white { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 32px; }
.section-head.center { margin-inline: auto; }
.section-head p { color: var(--ink-soft); }
@media (min-width: 768px) { .section { padding-block: 80px; } }

/* ---------------------------------------------------------------- 4. prototype-only parts */
.proto-bar {
  position: fixed; inset: 0 0 auto 0; z-index: 1000; height: 36px;
  display: flex; align-items: center; gap: 10px; padding: 0 6px 0 12px;
  background: #111827; color: #F9FAFB; font-size: 12.5px; line-height: 1;
}
.proto-bar-label { white-space: nowrap; font-weight: 700; letter-spacing: .02em; }
.proto-bar-label span { font-weight: 400; color: #D1D5DB; }
.proto-bar-links { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.proto-bar-links::-webkit-scrollbar { display: none; }
.proto-bar-links a { color: #E5E7EB; text-decoration: none; padding: 6px 8px; border-radius: 6px; white-space: nowrap; }
.proto-bar-links a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.proto-bar-links a[aria-current="true"] { background: #F9FAFB; color: #111827; font-weight: 600; }
.proto-bar-close { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #E5E7EB; }
.proto-bar-close:hover { background: rgba(255, 255, 255, .12); }
.proto-bar :focus-visible { outline-color: #fff; outline-offset: 0; }
@media (max-width: 599px) { .proto-bar-label span { display: none; } }
@media (max-width: 479px) {
  .proto-bar { gap: 6px; font-size: 12px; }
  .proto-bar-links a { padding: 6px 5px; }
}

/* state switcher: dotted panel at the top of a detail page */
.state-switch {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px;
  padding: 10px 12px; border: 2px dotted #9CA3AF; border-radius: 12px; background: #F9FAFB; font-size: 13.5px;
}
.state-switch-label { font-weight: 600; color: #4B5563; margin-right: 4px; }
.state-switch button {
  min-height: 32px; padding: 0 12px; border-radius: var(--radius-pill);
  border: 1px solid #D1D5DB; background: #fff; color: #374151; font-weight: 500; font-size: 13.5px;
}
.state-switch button:hover { border-color: #6B7280; }
.state-switch button[aria-pressed="true"] { background: #374151; border-color: #374151; color: #fff; }

/* prototype note: explains something that is not part of the product */
.proto-note {
  display: block; padding: 10px 12px; border: 2px dotted #9CA3AF;
  border-radius: 12px; background: #F9FAFB; color: #4B5563; font-size: 13.5px;
}
.proto-note::before { content: "Prototype"; flex: none; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: #374151; color: #fff; padding: 3px 6px; border-radius: 5px; display: inline-block; margin-right: 8px; vertical-align: 1px; }
.proto-note a { color: #1F2937; font-weight: 600; }

/* "example" tag: marks a number that is still an open decision */
.tag-example, .tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 6px;
  font: 700 10.5px/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; vertical-align: middle;
}
.tag-example { color: #7A5210; background: #FDF3E1; border: 1px dashed #D69E2E; }
.tag { color: #4B5563; background: #F3F4F6; border: 1px solid #E5E7EB; }
.tag-pending { color: #1E4E8C; background: #E8F1FB; border: 1px dashed #7EA6D8; }

/* ---------------------------------------------------------------- 5. public header and footer */
.wordmark {
  display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -.015em; white-space: nowrap;
}
.wordmark:hover { color: var(--ink); }
.wordmark-mark { width: 30px; height: 30px; }
.wordmark-text span { color: var(--primary-dark); }

.site-header {
  position: sticky; top: var(--proto-h); z-index: 50;
  background: rgba(255, 248, 246, .94); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
}
.site-header-inner { position: relative; display: flex; align-items: center; gap: 12px; min-height: var(--header-h); }
.site-header .header-cta { display: none; margin-left: auto; }
.nav-toggle {
  margin-left: auto; width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--ink);
}
.nav-toggle .icon-close, .nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.site-nav { display: none; }
.site-nav.is-open {
  display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
  padding: 8px 16px 20px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 16px 32px rgba(31, 41, 55, .08);
  animation: drop-in .18s ease-out;
}
.site-nav a:not(.btn) { display: block; padding: 13px 4px; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 500; text-decoration: none; }
.site-nav a[aria-current="page"]:not(.btn) { color: var(--primary-dark); }
.site-nav .btn { margin-top: 16px; }
@media (min-width: 480px) {
  .site-header .header-cta { display: inline-flex; }
  .header-cta + .nav-toggle { margin-left: 0; }
  .site-nav .btn { display: none; }
}
@media (min-width: 768px) { .site-nav.is-open { padding-inline: 24px; } }
@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.is-open {
    display: flex; flex-direction: row; align-items: center; gap: 2px; position: static; margin-left: auto;
    padding: 0; background: none; border: 0; box-shadow: none; animation: none;
  }
  .site-nav a:not(.btn) { padding: 8px 12px; border: 0; border-radius: var(--radius-pill); font-size: 15px; }
  .site-nav a:not(.btn):hover { background: var(--primary-tint); color: var(--primary-darker); }
  .site-header .header-cta { margin-left: 12px; }
}

/* booking-flow header: wordmark, help line, exit */
.site-header-flow .flow-help { margin-left: auto; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 14px; font-weight: 500; text-decoration: none; }
.site-header-flow .flow-help:hover { color: var(--primary-dark); }
.flow-help-text { display: none; }
@media (max-width: 479px) {
  .site-header-flow .flow-help { width: 40px; height: 40px; justify-content: center; border: 1px solid var(--line-strong); border-radius: 50%; }
  .flow-help-num { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (min-width: 768px) { .flow-help-text { display: inline; } }

.site-footer { background: var(--footer-bg); color: #EADCD8; padding: 56px 0 28px; font-size: 15px; }
.site-footer a { color: #F6ECEA; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .wordmark { color: #fff; }
.site-footer .wordmark-text span { color: #F2B8C2; }
.footer-grid { display: grid; gap: 32px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-brand { grid-column: 1 / -1; max-width: 360px; }
.footer-brand p { color: #CDBDB9; margin: 14px 0 18px; }
.footer-col h2 { font-family: var(--font-body); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #CDBDB9; margin-bottom: 12px; }
.footer-col li + li { margin-top: 8px; }
.footer-social { display: flex; gap: 8px; }
.footer-social button {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .22); background: transparent; color: #F6ECEA;
}
.footer-social button:hover { background: rgba(255, 255, 255, .1); }
.footer-social :focus-visible, .site-footer a:focus-visible { outline-color: #F2B8C2; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .14); display: grid; gap: 6px; font-size: 13.5px; color: #CDBDB9; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); }
  .footer-brand { grid-column: auto; }
}
.site-footer-slim { padding: 24px 0; }
.site-footer-slim .cluster { --gap: 8px 20px; font-size: 13.5px; }

/* ---------------------------------------------------------------- 6. dashboard shell */
.shell { min-height: calc(100vh - var(--proto-h)); }
.sidebar {
  position: sticky; top: var(--proto-h); z-index: 40;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.sidebar-head { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 12px 0 16px; }
.sidebar-head .wordmark { font-size: 18px; }
.sidebar-head .wordmark-mark { width: 28px; height: 28px; }
.sidebar-toggle {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface); font-size: 14px; font-weight: 600;
}
.sidebar-toggle .icon-close, .sidebar-toggle[aria-expanded="true"] .icon-open { display: none; }
.sidebar-toggle[aria-expanded="true"] .icon-close { display: block; }
.sidebar-body { display: none; padding: 4px 12px 16px; max-height: calc(100vh - var(--proto-h) - 60px); overflow-y: auto; border-top: 1px solid var(--line); }
.sidebar-body.is-open { display: block; animation: drop-in .18s ease-out; }

.role-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--accent-tint); color: #1D6464; font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.role-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.role-badge-admin { background: var(--primary-tint); color: var(--primary-darker); }
.role-badge-admin::before { background: var(--primary); }

.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; }
.side-nav-label { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 6px; }
.side-nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--ink-soft); font-size: 15px; font-weight: 500; text-decoration: none;
}
.side-nav a .icon { color: var(--muted); }
.side-nav a:hover { background: var(--surface-warm); color: var(--ink); }
.side-nav a.is-active { background: var(--primary-tint); color: var(--primary-darker); font-weight: 600; }
.side-nav a.is-active .icon { color: var(--primary-dark); }
.side-nav .count { margin-left: auto; font-size: 12px; font-weight: 700; background: var(--primary-dark); color: #fff; border-radius: var(--radius-pill); padding: 1px 7px; }

.sidebar-user { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 14px 8px 4px; border-top: 1px solid var(--line); margin-top: 8px; }
.sidebar-user > div { flex: 1; min-width: 0; }
.sidebar-user-name { display: block; font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.sidebar-user-role { display: block; font-size: 12.5px; color: var(--muted); }
.sidebar-user .btn { flex: 1 0 100%; justify-content: flex-start; padding-left: 46px; }

.avatar {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary-darker); font-size: 13px; font-weight: 700;
}
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }

@media (max-width: 479px) {
  .sidebar-head .wordmark-text { display: none; }
}
@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); }
  .sidebar {
    height: calc(100vh - var(--proto-h)); display: flex; flex-direction: column; overflow-y: auto;
    border-bottom: 0; border-right: 1px solid var(--line); padding: 20px 12px 16px;
  }
  .sidebar-head { flex-direction: column; align-items: flex-start; gap: 14px; min-height: 0; padding: 0 8px 12px; }
  .sidebar-toggle { display: none; }
  .sidebar-body, .sidebar-body.is-open { display: flex; flex-direction: column; flex: 1; padding: 0; max-height: none; overflow: visible; border-top: 0; animation: none; }
  .sidebar-user { margin-top: auto; }
}

.dash-main { min-width: 0; }
.topbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.topbar-title { font-size: 24px; margin: 0; }
.topbar-search { position: relative; order: 3; flex: 1 1 100%; }
.topbar-search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.topbar-search .input { padding-left: 42px; min-height: 42px; border-radius: var(--radius-pill); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
@media (min-width: 768px) {
  .topbar { padding: 16px 24px; flex-wrap: nowrap; }
  .topbar-search { order: 0; flex: 0 1 340px; margin-left: auto; }
  .topbar-actions { margin-left: 0; }
}
@media (min-width: 1024px) {
  .topbar { position: sticky; top: var(--proto-h); z-index: 30; background: rgba(255, 248, 246, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); padding: 18px 32px; }
  .topbar-title { font-size: 26px; }
}
.content { padding: 16px; display: flex; flex-direction: column; gap: 20px; }
.content > * { margin: 0; }
@media (min-width: 768px) { .content { padding: 24px; gap: 24px; } }
@media (min-width: 1024px) { .content { padding: 28px 32px 48px; } }
@media (min-width: 1280px) { .content { max-width: 1320px; } }
.page-intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.page-intro p { margin: 0; }

/* ---------------------------------------------------------------- 7. components */
/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border: 1px solid transparent; border-radius: var(--radius-pill); font: 600 15px/1.2 var(--font-body);
  text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn-primary { background: var(--primary-dark); color: #fff; }
.btn-primary:hover { background: var(--primary-darker); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-warm); border-color: #C9B4AF; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--primary-dark); }
.btn-ghost:hover { background: var(--primary-tint); color: var(--primary-darker); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #9B2C2C; color: #fff; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 16.5px; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; cursor: not-allowed; }
.icon-btn {
  position: relative; width: 40px; height: 40px; display: inline-grid; place-items: center; flex: none;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink-soft);
}
.icon-btn:hover { border-color: var(--line-strong); color: var(--ink); }
.icon-btn-dot { position: absolute; top: 7px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); border: 2px solid var(--surface); }
.link-btn { padding: 0; border: 0; background: none; color: var(--primary-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.arrow-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.arrow-link:hover .icon { transform: translateX(2px); }
.arrow-link .icon { transition: transform .15s; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 16px; }
.card-title { font-size: 19px; margin: 0; }
.card-sub { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.card-flush { padding: 0; overflow: hidden; }
.card-flush > .card-head { padding: 18px 20px 0; }
.card-foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.card-flush > .card-foot { margin: 0; padding: 14px 20px; }
a.card { display: block; color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s, border-color .15s; }
a.card:hover { box-shadow: var(--shadow-hover); border-color: var(--line-strong); transform: translateY(-2px); color: inherit; }
@media (min-width: 768px) {
  .card { padding: 24px; }
  .card-flush { padding: 0; }
  .card-flush > .card-head { padding: 20px 24px 0; }
  .card-flush > .card-foot { padding: 14px 24px; }
}

/* stat tiles: put them in .stats (2 per row on phones, 4 from 1024) */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1024px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 13.5px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.stat-value { font-family: var(--font-display); font-size: 26px; font-weight: 600; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-meta { font-size: 13.5px; color: var(--muted); }
.stat-up { color: var(--success); font-weight: 600; }
@media (max-width: 479px) { .stat { padding: 14px 16px; } }
@media (min-width: 768px) { .stat-value { font-size: 32px; } }
.stat-down { color: var(--danger); font-weight: 600; }

/* key and value list */
.kv { display: grid; gap: 10px; margin: 0; }
.kv > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { font-weight: 500; }

/* divided rows: <ul class="rows"><li> time-block, row-body, action */
.rows > li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.rows > li:first-child { border-top: 0; padding-top: 0; }
.rows > li:last-child { padding-bottom: 0; }
.row-body { flex: 1; min-width: 0; }
.row-body > strong { display: block; }
.row-sub { display: block; font-size: 14px; color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.time-block { flex: none; width: 64px; padding: 8px 0; border-radius: 12px; background: var(--primary-tint); text-align: center; line-height: 1.2; }
.time-block strong { display: block; font-size: 17px; font-variant-numeric: tabular-nums; color: var(--primary-darker); }
.time-block span { font-size: 12px; color: var(--muted); }

/* tables: wrap in .table-wrap; the header sticks while the wrap scrolls (max 70vh) */
.table-wrap { overflow: auto; max-height: 70vh; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.table th {
  position: sticky; top: 0; z-index: 1; background: #FBF4F2; text-align: left; white-space: nowrap;
  font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
  padding: 11px 14px; border-bottom: 1px solid var(--line);
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; background: var(--surface); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #FFF6F4; }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.table .right { text-align: right; }
.table tfoot td { font-weight: 700; background: #FBF4F2; border-top: 1px solid var(--line-strong); border-bottom: 0; }
.cell-main { font-weight: 600; white-space: nowrap; }
.cell-sub { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; }
@media (min-width: 768px) {
  .table th:first-child, .table td:first-child { padding-left: 24px; }
  .table th:last-child, .table td:last-child { padding-right: 24px; }
}

/* status pills */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 12.5px; font-weight: 600; line-height: 1.4; white-space: nowrap; background: #F1ECEB; color: #4B5563;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-booked, .pill-info, .pill-opening-soon, .pill-new, .pill-invited { background: #E8F1FB; color: #1E4E8C; }
.pill-attended, .pill-success, .pill-active, .pill-live { background: #E6F4EC; color: #22663F; }
.pill-paid, .pill-accent { background: var(--accent-tint); color: #1D6464; }
.pill-no-show, .pill-warning, .pill-contacted { background: #FDF3E1; color: #7A5210; }
.pill-pending { background: #FFFBF2; color: #7A5210; box-shadow: inset 0 0 0 1px #E8C377; }
.pill-unpaid, .pill-danger, .pill-suspended, .pill-failed { background: #FDECEC; color: #9B2C2C; }
.pill-refunded, .pill-primary { background: var(--primary-tint); color: var(--primary-darker); }
.pill-cancelled, .pill-neutral, .pill-closed, .pill-deactivated, .pill-draft { background: #F1F1F3; color: #4B5563; }

/* tabs */
.tabs-list { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin-bottom: 20px; }
.tabs-list::-webkit-scrollbar { display: none; }
.tab {
  flex: none; padding: 10px 14px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none;
  color: var(--muted); font-size: 15px; font-weight: 600; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--primary-dark); border-bottom-color: var(--primary-dark); }

/* filter chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500;
}
.chip:hover { border-color: #C9B4AF; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-count { font-size: 12px; font-weight: 700; padding: 0 7px; border-radius: var(--radius-pill); background: rgba(31, 41, 55, .08); }
.chip[aria-pressed="true"] .chip-count { background: rgba(255, 255, 255, .2); }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.filters .field { flex: 1 1 160px; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.label .optional { font-weight: 400; color: var(--muted); }
.hint { font-size: 13.5px; color: var(--muted); margin: 0; }
.input {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 16px; line-height: 1.4; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: #9CA3AF; }
.input:hover { border-color: #C9B4AF; }
.input:focus { outline: none; border-color: var(--primary-dark); box-shadow: var(--focus-ring); }
.input:disabled, .input[readonly] { background: #FAF6F5; color: var(--ink-soft); }
textarea.input { min-height: 110px; resize: vertical; }
select.input {
  appearance: none; -webkit-appearance: none; padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
input[type="date"].input, input[type="time"].input { min-width: 0; }
.input-affix { position: relative; }
.input-affix > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 500; pointer-events: none; }
.input-affix > .input { padding-left: 30px; }
.field.has-error .input, .input[aria-invalid="true"] { border-color: var(--danger); background: #FFF8F8; }
.field.has-error .input:focus, .input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(197, 48, 48, .22); }
.field-error { display: flex; align-items: center; gap: 6px; margin: 0; color: #9B2C2C; font-size: 13.5px; font-weight: 600; }
.field-error::before { content: "!"; flex: none; width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; }
.form-row { display: grid; gap: 16px; }
@media (min-width: 768px) {
  .form-row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.fieldset legend { padding: 0; margin-bottom: 10px; font-size: 14.5px; font-weight: 600; }

/* checkbox and radio: native controls, brand tinted */
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--primary-dark); cursor: pointer; }
.check-card { padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.check-card:has(input:checked) { border-color: var(--primary-dark); background: var(--primary-tint); box-shadow: inset 0 0 0 1px var(--primary-dark); }

/* toggle switch: a checkbox with role="switch" */
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; position: relative; }
.toggle input { position: absolute; opacity: 0; width: 44px; height: 26px; margin: 0; cursor: pointer; }
.toggle-track { position: relative; flex: none; width: 44px; height: 26px; border-radius: var(--radius-pill); background: #CDBFBC; transition: background-color .15s; }
.toggle-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.toggle input:checked + .toggle-track { background: var(--accent-dark); }
.toggle input:checked + .toggle-track::after { transform: translateX(18px); }
.toggle input:focus-visible + .toggle-track { box-shadow: var(--focus-ring); }

/* alerts */
.alert { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid; border-radius: 12px; font-size: 15px; }
.alert > .icon { margin-top: 1px; }
.alert p { margin: 0; }
.alert-title { display: block; font-weight: 600; }
.alert a { color: inherit; font-weight: 600; }
.alert-body { flex: 1 1 220px; min-width: 0; }
.alert > .btn { margin-left: 32px; }
@media (min-width: 768px) { .alert > .btn { margin-left: 0; align-self: center; } }
.alert-info { background: #EEF5FC; border-color: #C9DDF3; color: #1E3A5F; }
.alert-info > .icon { color: var(--info); }
.alert-warning { background: #FDF6E7; border-color: #F0D9A8; color: #5C3F0C; }
.alert-warning > .icon { color: var(--warning); }
.alert-danger { background: #FDF0F0; border-color: #F2C5C5; color: #7A1F1F; }
.alert-danger > .icon { color: var(--danger); }
.alert-success { background: #EEF7F1; border-color: #C4E3CF; color: #1C4D33; }
.alert-success > .icon { color: var(--success); }

/* modal: a native <dialog>; proto.js opens it with data-modal-open="id" */
.modal {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 18px;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); overflow: auto;
}
.modal-sm { width: min(440px, calc(100vw - 32px)); }
.modal::backdrop { background: rgba(31, 41, 55, .5); }
.modal[open] { animation: modal-in .2s ease-out; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 24px 0; }
.modal-title { font-size: 22px; margin: 0; }
.modal-body { padding: 16px 24px; }
.modal-body > :last-child { margin-bottom: 0; }
.modal-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 8px 24px 22px; }

/* toast: window.protoToast("text") */
.toast-region {
  position: fixed; left: 50%; bottom: 24px; z-index: 1100; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px; width: max-content; max-width: calc(100vw - 32px); pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff;
  font-size: 14.5px; font-weight: 500; box-shadow: var(--shadow-lg); animation: toast-in .22s ease-out; transition: opacity .25s, transform .25s;
}
.toast::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #6EE7B7; }
.toast.is-leaving { opacity: 0; transform: translateY(8px); }

/* empty state */
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 20px; text-align: center; }
.empty-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: var(--primary-tint); color: var(--primary-dark); }
.empty-title { font-size: 20px; margin: 0; }
.empty p { max-width: 400px; margin: 0; color: var(--muted); }

/* pagination */
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.pagination-pages { display: flex; gap: 4px; }
.page-link {
  min-width: 36px; height: 36px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none;
}
.page-link:hover { border-color: var(--line-strong); color: var(--ink); }
.page-link[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.page-link[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* breadcrumb */
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); list-style: none; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary-dark); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 500; }

/* photo placeholder: no real images in the prototype */
.photo {
  position: relative; display: grid; place-items: center; min-height: 160px; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: var(--radius); color: var(--primary-dark);
  background:
    radial-gradient(circle at 22% 24%, rgba(255, 255, 255, .75) 0 14%, transparent 15%),
    radial-gradient(circle at 78% 70%, rgba(255, 255, 255, .45) 0 20%, transparent 21%),
    linear-gradient(135deg, #F6DDE1 0%, #FBEDEF 48%, #DDEFEF 100%);
}
.photo > .icon { width: 40px; height: 40px; opacity: .55; }
.photo-caption {
  position: absolute; left: 12px; bottom: 12px; max-width: calc(100% - 24px); padding: 4px 10px; border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .88); color: var(--ink-soft); font-size: 12.5px; font-weight: 500;
}
.photo-wide { aspect-ratio: 16 / 9; }
.photo-square { aspect-ratio: 1 / 1; }
.photo-tall { aspect-ratio: 4 / 5; }
.photo-map {
  color: var(--accent-dark);
  background:
    radial-gradient(circle at 60% 45%, rgba(46, 139, 139, .16) 0 9%, transparent 10%),
    linear-gradient(rgba(0, 0, 0, .045) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(0, 0, 0, .045) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(160deg, #EAF3F1 0%, #F6F1EA 100%);
}

/* bar chart: inline SVG, width 100%, bar widths in percent so labels never scale */
.chart { display: block; width: 100%; overflow: visible; font-family: var(--font-body); }
.chart-label { font-size: 13.5px; font-weight: 500; fill: var(--ink); }
.chart-value { font-size: 13.5px; font-weight: 700; fill: var(--ink); font-variant-numeric: tabular-nums; }
.chart-tick { font-size: 12px; fill: var(--muted); }
.chart-track { fill: #F5EDEB; }
.chart-bar { fill: var(--primary); }
.chart-bar-alt { fill: var(--accent); }
.chart-bar-muted { fill: #D6C7C3; }
.chart-grid { stroke: var(--line); stroke-dasharray: 3 4; }
.chart-axis { stroke: var(--line-strong); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); margin-top: 12px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--swatch, var(--primary)); }

/* calendar grid for the clinic app: rooms as columns, 15-minute rows */
.timegrid-scroll { overflow: auto; max-height: 75vh; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.timegrid {
  display: grid; position: relative; min-width: max-content;
  grid-template-columns: 60px repeat(var(--cols, 3), minmax(var(--col-w, 140px), 1fr));
  grid-template-rows: auto repeat(var(--rows, 40), 22px);
}
.timegrid-head {
  position: sticky; top: 0; z-index: 3; grid-row: 1; padding: 10px 8px; text-align: center;
  background: #FBF4F2; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); font-size: 13px; font-weight: 600;
}
.timegrid-head small { display: block; font-weight: 500; color: var(--muted); }
.timegrid-corner { grid-column: 1; border-left: 0; left: 0; z-index: 4; }
.timegrid-row { grid-column: 1 / -1; border-top: 1px solid #F4ECEA; }
.timegrid-row.is-hour { border-top-color: var(--line); }
.timegrid-row span { display: block; width: 60px; padding-right: 8px; text-align: right; font-size: 11.5px; color: var(--muted); transform: translateY(-8px); background: var(--surface); }
.cal-block {
  z-index: 1; margin: 1px 4px; padding: 4px 8px; overflow: hidden; border-radius: 8px; border-left: 3px solid var(--primary-dark);
  background: var(--primary-tint); color: var(--ink); font-size: 12.5px; line-height: 1.3; text-decoration: none;
}
.cal-block strong { display: block; font-size: 12.5px; }
.cal-block:hover { box-shadow: var(--shadow-hover); color: var(--ink); }
.cal-block.is-attended { background: #E6F4EC; border-color: var(--success); }
.cal-block.is-no-show { background: #FDF3E1; border-color: var(--warning); }
.cal-block.is-cancelled { background: #F1F1F3; border-color: #9CA3AF; color: var(--muted); text-decoration: line-through; }
.cal-closure {
  z-index: 1; margin: 1px 4px; padding: 6px 8px; border-radius: 8px; border: 1px dashed var(--line-strong);
  background: repeating-linear-gradient(135deg, #F5EEEC 0 7px, #FFFFFF 7px 14px); color: var(--muted); font-size: 12px; font-weight: 600;
}

/* ---------------------------------------------------------------- 8. booking flow */
.flow { padding: 20px 0 40px; }
.flow-steps { margin-bottom: 24px; }
.flow-layout { display: grid; gap: 24px; align-items: start; }
.flow-main { min-width: 0; }
.flow-main > h1 { margin-bottom: 6px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 12px; color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; }
.back-link:hover { color: var(--primary-dark); }
.flow-actions {
  position: sticky; bottom: 0; z-index: 20; display: flex; gap: 10px; align-items: center; margin: 20px -16px 0; padding: 12px 16px;
  background: rgba(255, 248, 246, .96); border-top: 1px solid var(--line); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.flow-actions .btn-primary { flex: 1; min-width: 0; white-space: normal; text-align: center; padding-inline: 16px; }
@media (min-width: 768px) {
  .flow { padding: 32px 0 64px; }
  .flow-actions { position: static; margin: 24px 0 0; padding: 0; background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .flow-actions .btn-primary { flex: none; margin-left: auto; }
}
@media (min-width: 1024px) {
  .flow-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; }
  .summary { position: sticky; top: calc(var(--proto-h) + var(--header-h) + 24px); }
}

/* stepper: <ol class="stepper">; proto.js marks done, current and to-do from body data-step */
.stepper { display: flex; counter-reset: step; }
.stepper li { position: relative; flex: 1; counter-increment: step; text-align: center; }
.stepper li + li::before {
  content: ""; position: absolute; top: 15px; left: calc(-50% + 20px); width: calc(100% - 40px); height: 2px; border-radius: 2px; background: var(--line-strong);
}
.stepper a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 500; text-decoration: none; }
.stepper a::before {
  content: counter(step); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line-strong); color: var(--muted); font-size: 14px; font-weight: 700;
}
.stepper .is-done a { color: var(--ink); }
.stepper .is-done a::before { content: "\2713"; background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.stepper .is-done a:hover { color: var(--accent-dark); }
.stepper .is-done + li::before, .stepper .is-current::before { background: var(--accent-dark); }
.stepper .is-current a { color: var(--ink); font-weight: 700; }
.stepper .is-current a::before { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; box-shadow: 0 0 0 4px var(--primary-soft); }
.stepper a[aria-disabled="true"] { pointer-events: none; }
@media (min-width: 768px) { .stepper a { font-size: 14px; } }

/* booking calendar: a 7-column month-style grid of day buttons */
.cal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cal-month { font-size: 19px; margin: 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow { padding-bottom: 2px; text-align: center; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.cal-day {
  min-height: 52px; padding: 6px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink);
  font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; transition: border-color .15s, background-color .15s;
}
.cal-day small { font-size: 10.5px; font-weight: 600; color: var(--accent-dark); white-space: nowrap; }
.cal-day:hover:not(:disabled) { border-color: var(--primary-dark); }
.cal-day.is-today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-day[aria-pressed="true"] { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; box-shadow: none; }
.cal-day[aria-pressed="true"] small { color: #fff; }
.cal-day:disabled { background: transparent; border-style: dashed; color: #A8999A; cursor: not-allowed; }
.cal-day:disabled small { color: var(--muted); }
@media (max-width: 479px) {
  .slot-picker.card { padding: 16px 14px; }
  .cal-grid { gap: 5px; }
  .cal-day small { font-size: 10px; letter-spacing: -.01em; }
}
@media (min-width: 768px) { .cal-grid { gap: 8px; } .cal-day { min-height: 64px; font-size: 18px; } .cal-day small { font-size: 11.5px; } }

/* slot chips */
.slot-panel { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.slot-day { font-size: 18px; margin: 0 0 14px; }
.slot-group + .slot-group { margin-top: 16px; }
.slot-group-title { margin: 0 0 8px; font-family: var(--font-body); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 8px; }
.slot {
  min-height: 44px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface); color: var(--ink);
  font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; transition: border-color .15s, background-color .15s, color .15s;
}
.slot:hover { border-color: var(--primary-dark); color: var(--primary-dark); }
.slot[aria-pressed="true"] { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.hold { margin-top: 20px; }
.hold-timer { font-variant-numeric: tabular-nums; font-weight: 700; }

/* sticky order summary */
.summary-card { padding: 20px; }
.summary-clinic { font-size: 20px; margin: 0 0 4px; }
.summary-lines { margin: 16px 0 0; border-top: 1px solid var(--line); }
.summary-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; font-variant-numeric: tabular-nums; }
.summary-lines .summary-total { border-bottom: 0; padding-top: 14px; font-size: 17px; font-weight: 700; }
.summary-policy { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--accent-tint); color: #1D4F4F; font-size: 13.5px; }

/* ---------------------------------------------------------------- 9. public page sections */
.hero { padding: 32px 0 48px; overflow: hidden; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
.hero h1 { font-size: 34px; line-height: 1.12; margin-bottom: 14px; }
.hero h1 em { font-style: italic; color: var(--primary-dark); }
.hero .lead { max-width: 560px; margin-bottom: 24px; }
.hero-visual { position: relative; }
.hero-visual .photo { aspect-ratio: 5 / 4; border-radius: 24px; }
.hero-badge {
  position: absolute; left: 12px; top: 12px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px;
  background: var(--surface); box-shadow: var(--shadow-hover); font-size: 13.5px; line-height: 1.3;
}
.hero-badge strong { display: block; font-size: 15px; }
@media (min-width: 768px) { .hero { padding: 56px 0 72px; } .hero h1 { font-size: 48px; } }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; } .hero h1 { font-size: 56px; } }

.postcode-card { padding: 20px; max-width: 560px; }
.postcode-form { display: grid; gap: 10px; }
.postcode-form .input { min-height: 52px; font-size: 17px; text-transform: uppercase; }
.postcode-form .input::placeholder { text-transform: none; }
.postcode-form .btn { min-height: 52px; }
@media (min-width: 480px) { .postcode-form { grid-template-columns: minmax(0, 1fr) auto; } .postcode-form .label { grid-column: 1 / -1; } }

.trust-row { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 20px; font-size: 14px; color: var(--ink-soft); }
.trust-row li { display: inline-flex; align-items: center; gap: 6px; }
.trust-row .icon { color: var(--accent-dark); width: 18px; height: 18px; }

.icon-circle { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--primary-tint); color: var(--primary-dark); }
.icon-circle-accent { background: var(--accent-tint); color: var(--accent-dark); }

.step-card { position: relative; }
.step-num { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--primary-dark); margin-bottom: 14px; display: block; }
.step-card h3 { margin-bottom: 6px; }
.step-card p { margin: 0; color: var(--ink-soft); }

.scan-card { display: flex; flex-direction: column; gap: 10px; height: 100%; }
.scan-card h3 { margin: 0; }
.scan-card p { margin: 0; color: var(--ink-soft); font-size: 15px; flex: 1; }
.scan-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--muted); }
.scan-meta span { display: inline-flex; align-items: center; gap: 5px; }
.scan-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.price { font-family: var(--font-display); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }

.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature h3 { font-size: 19px; margin-bottom: 4px; }
.feature p { margin: 0; color: var(--ink-soft); }

.review-card { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.review-card blockquote { margin: 0; flex: 1; font-size: 15.5px; }
.review-by { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.review-by strong { display: block; }
.stars { color: #C98A1F; letter-spacing: 2px; font-size: 16px; line-height: 1; }
.reviews-strip { display: grid; gap: 16px; grid-auto-flow: column; grid-auto-columns: minmax(280px, 85%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.reviews-strip > * { scroll-snap-align: start; }
@media (min-width: 768px) { .reviews-strip { grid-auto-columns: minmax(300px, 45%); } }
@media (min-width: 1024px) { .reviews-strip { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; } }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 16.5px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
  background: var(--primary-tint); color: var(--primary-dark); font-size: 20px; font-weight: 500; line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 18px; color: var(--ink-soft); max-width: 720px; }
.faq details > div > :last-child { margin-bottom: 0; }

.cta-band { border-radius: 24px; padding: 36px 24px; background: linear-gradient(135deg, var(--primary-dark) 0%, #B95E70 55%, #3A8F8C 140%); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #FCEDEF; max-width: 560px; margin: 0 auto 24px; }
.cta-band .btn-primary { background: #fff; color: var(--primary-darker); }
.cta-band .btn-primary:hover { background: #FCEDEF; }
.cta-band .btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.cta-band .btn-secondary:hover { background: rgba(255, 255, 255, .12); }
.cta-band :focus-visible { outline-color: #fff; }
@media (min-width: 768px) { .cta-band { padding: 56px 40px; } }

/* map of the prototype: one li per page, a tick when built, a pending tag until then */
.page-list li { padding: 12px 0; border-top: 1px solid var(--line); }
.page-list li:first-child { border-top: 0; padding-top: 0; }
.page-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.page-line a { font-weight: 600; }
.page-line code { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.page-built { color: var(--success); stroke-width: 2.6; }
.page-list p { margin: 2px 0 0; font-size: 14px; color: var(--ink-soft); }

/* error page */
.error-page { padding: 64px 0 88px; text-align: center; }
.error-code { font-family: var(--font-display); font-size: 88px; font-weight: 600; line-height: 1; color: var(--primary-soft); margin-bottom: 8px; }

/* ---------------------------------------------------------------- 10. motion and print */
@keyframes drop-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.pulse { animation: pulse 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
  .proto-bar, .state-switch, .proto-note, .site-header, .sidebar, .topbar, .site-footer, .toast-region { display: none !important; }
  body { padding: 0; background: #fff; }
  .shell { display: block; }
  .card, .stat { box-shadow: none; }
}
