/* =========================================================================
   ClinicZeo — Base + layout + components. Consumes tokens.css only.
   ========================================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  font-feature-settings: "cv05" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { padding: 0; list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-head);
  letter-spacing: var(--tr-head);
  text-wrap: balance;
}
h1 { font-size: var(--t-h1); line-height: var(--lh-tight); letter-spacing: var(--tr-display); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
h4 { font-size: var(--t-h4); font-weight: 600; letter-spacing: -0.01em; }
p  { text-wrap: pretty; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-hover); }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: var(--r-1);
}

::selection { background: var(--kelp-200); color: var(--kelp-950); }
:root[data-theme="dark"] ::selection { background: rgba(109,191,163,.3); color: var(--text); }

.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 200;
  background: var(--brand); color: var(--text-on-brand);
  padding: var(--s-3) var(--s-5); border-radius: var(--r-2); font-weight: 600;
  transition: top var(--dur-1) var(--ease);
}
.skip-link:focus-visible { top: var(--s-4); color: var(--text-on-brand); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------- Layout primitives ------------------------------------------- */
.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--s-5); }
.shell--wide { max-width: var(--shell-wide); }

.section { padding-block: clamp(var(--s-16), 9vw, var(--s-32)); position: relative; }
.section--tight { padding-block: clamp(var(--s-12), 6vw, var(--s-20)); }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section--ink {
  background: var(--bg-invert);
  /* A dark island inside a light page: re-declare the full surface/semantic set so
     nested components (inputs, chips, cards) inherit dark values, not light ones. */
  --bg: #0b1412; --bg-alt: #0e1614;
  --text: #eaf1ee; --text-2: #a9bcb5; --text-3: #8ba59d;
  --surface: rgba(255,255,255,.05);
  --surface-2: rgba(255,255,255,.085);
  --surface-sunk: rgba(0,0,0,.30);
  --border: rgba(197,226,216,.14);
  --border-strong: rgba(197,226,216,.30);
  --hairline: rgba(197,226,216,.10);
  --brand: #6dbfa3; --brand-hover: #8bd2b8;
  --brand-soft: rgba(109,191,163,.12); --brand-border: rgba(109,191,163,.28);
  --text-on-brand: #06120f;
  --accent: #e58f66; --accent-soft: rgba(229,143,102,.16); --accent-text: #e8a37f;
  --ok:   #6dbfa3; --ok-bg:   rgba(109,191,163,.16); --ok-text: #8fd4bb;
  --warn: #d9ab53; --warn-bg: rgba(217,171,83,.16);  --warn-text: #e2be74;
  --err:  #e08579; --err-bg:  rgba(224,133,121,.16); --err-text: #eda294;
  --info: #78b6d1; --info-bg: rgba(120,182,209,.16); --info-text: #93c8de;
  color: var(--text);
}

/* Section heading block — deliberately left-aligned & asymmetric */
.sec-head { max-width: 62ch; margin-bottom: var(--s-12); }
.sec-head--center { margin-inline: auto; text-align: center; }
.sec-head p { color: var(--text-2); font-size: var(--t-body-lg); margin-top: var(--s-4); }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-body);
  font-size: var(--t-micro); font-weight: 600;
  letter-spacing: var(--tr-eyebrow); text-transform: uppercase;
  color: var(--brand);
  margin-bottom: var(--s-4);
}
.eyebrow::before {
  content: ""; width: 18px; height: 1px; background: currentColor; opacity: .5;
}
.sec-head--center .eyebrow::before { display: none; }

.lede { font-size: var(--t-body-lg); color: var(--text-2); max-width: var(--prose); }

/* ---------- Buttons ------------------------------------------------------ */
.btn {
  --btn-bg: var(--brand); --btn-fg: var(--text-on-brand); --btn-bd: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-5);
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid var(--btn-bd); border-radius: var(--r-2);
  font-size: var(--t-sm); font-weight: 600; letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease),
              transform var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.btn:hover { --btn-bg: var(--brand-hover); --btn-bd: var(--brand-hover); color: var(--btn-fg); transform: translateY(-1px); box-shadow: var(--e-2); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--text); --btn-bd: var(--border-strong); }
.btn--ghost:hover { --btn-bg: var(--surface-2); --btn-bd: var(--brand); --btn-fg: var(--text); }

.btn--quiet { --btn-bg: transparent; --btn-fg: var(--text-2); --btn-bd: transparent; padding-inline: var(--s-3); }
.btn--quiet:hover { --btn-bg: var(--surface-2); --btn-fg: var(--text); --btn-bd: transparent; box-shadow: none; }

.btn--lg { min-height: 52px; padding-inline: var(--s-6); font-size: var(--t-body); }
.btn--accent { --btn-bg: var(--accent); --btn-bd: var(--accent); --btn-fg: #fff; }
.btn--accent:hover { --btn-bg: var(--clay-600); --btn-bd: var(--clay-600); }
.btn .ico { width: 18px; height: 18px; flex: none; }

/* ---------- Chips / badges ---------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: var(--r-pill);
  font-size: var(--t-micro); font-weight: 600; letter-spacing: .02em;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
  white-space: nowrap;
}
.chip--ok   { background: var(--ok-bg);   color: var(--ok-text);   border-color: transparent; }
.chip--warn { background: var(--warn-bg); color: var(--warn-text); border-color: transparent; }
.chip--err  { background: var(--err-bg);  color: var(--err-text);  border-color: transparent; }
.chip--info { background: var(--info-bg); color: var(--info-text); border-color: transparent; }
.chip--brand{ background: var(--brand-soft); color: var(--brand); border-color: var(--brand-border); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

/* ---------- Header ------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.site-header[data-stuck="true"] { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; gap: var(--s-6); min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand__name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem;
  letter-spacing: -0.03em;
}
.brand__name span { color: var(--brand); }

.nav__links { display: flex; align-items: center; gap: var(--s-1); margin-left: var(--s-6); }
.nav__links a {
  display: block; padding: var(--s-2) var(--s-3); border-radius: var(--r-2);
  color: var(--text-2); text-decoration: none; font-size: var(--t-sm); font-weight: 500;
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.nav__links a:hover { color: var(--text); background: var(--surface-2); }
.nav__actions { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  background: transparent; border: 1px solid transparent; border-radius: var(--r-2);
  color: var(--text-2); cursor: pointer;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 19px; height: 19px; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
:root:not([data-theme="dark"]) .theme-toggle .sun { display: none; }

.nav__burger { display: none; }
@media (max-width: 900px) {
  .nav__links, .nav__actions .btn--ghost { display: none; }
  .nav { gap: var(--s-3); }
  .nav__burger { display: inline-grid; }
  .nav__actions { gap: var(--s-1); }
  .nav__actions .btn { padding-inline: var(--s-4); }
}
/* Small phones: the theme toggle yields to the primary CTA; the OS preference
   still drives the theme, and the menu carries the rest of the nav. */
@media (max-width: 560px) {
  .theme-toggle { display: none; }
  .brand__name { font-size: 1.05rem; }
}
.mobile-menu {
  display: none; border-top: 1px solid var(--border); background: var(--bg);
  padding: var(--s-4) var(--s-5) var(--s-6);
}
.mobile-menu[data-open="true"] { display: block; }
.mobile-menu a {
  display: block; padding: var(--s-3) var(--s-2); color: var(--text);
  text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--hairline);
}
.mobile-menu .btn { width: 100%; margin-top: var(--s-4); }

/* ---------- Hero ---------------------------------------------------------- */
.hero { position: relative; padding-top: clamp(var(--s-12), 6vw, var(--s-20)); padding-bottom: 0; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -30% auto -30%; height: 620px; z-index: -1;
  background:
    radial-gradient(58% 46% at 22% 0%, color-mix(in srgb, var(--kelp-200) 46%, transparent) 0%, transparent 62%),
    radial-gradient(40% 40% at 88% 6%, color-mix(in srgb, var(--clay-200) 34%, transparent) 0%, transparent 60%);
  opacity: .75;
}
:root[data-theme="dark"] .hero::before { opacity: .22; }

/* Faint clinical grid — replaces the default "gradient mesh" cliché */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--hairline) 1px, transparent 1px),
                    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 72%);
}
@media (max-width: 900px) {
  /* The grid is scenery, not content — it must not compete with the headline. */
  .hero::after { background-size: 56px 56px; mask-image: linear-gradient(to bottom, #000 0%, transparent 34%); }
  .hero::before { height: 420px; }
}

.hero__grid {
  display: grid; gap: var(--s-10);
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: start;
}
@media (max-width: 1040px) { .hero__grid { grid-template-columns: 1fr; gap: var(--s-8); } }

.hero__copy { padding-top: var(--s-6); max-width: 40rem; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent) 34%, transparent) 62%);
  padding-inline: 2px;
}
.hero .lede { margin-top: var(--s-5); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-8); }
.hero__note { margin-top: var(--s-4); font-size: var(--t-caption); color: var(--text-3); }

.hero__proof {
  display: flex; flex-wrap: wrap; gap: var(--s-6) var(--s-8);
  margin-top: var(--s-10); padding-top: var(--s-6); border-top: 1px solid var(--border);
}
.stat__num {
  font-family: var(--font-display); font-size: 1.75rem; font-weight: 700;
  letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums;
}
.stat__num .unit { font-size: 1rem; color: var(--brand); }
.stat__label { font-size: var(--t-caption); color: var(--text-3); margin-top: 6px; max-width: 20ch; }

/* ---------- App mock frame ------------------------------------------------ */
.frame {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-4); box-shadow: var(--e-4); overflow: hidden;
  container-type: inline-size;
}
.frame__bar {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 10px var(--s-4); background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.frame__dots { display: flex; gap: 6px; }
.frame__dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.frame__url {
  flex: 1; min-width: 0; font-family: var(--font-mono); font-size: var(--t-micro);
  color: var(--text-3); background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-1); padding: 4px 10px; text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hero__frame { position: relative; }
.hero__frame .frame { transform: perspective(1800px) rotateY(-3.2deg) rotateX(1.4deg); }
@media (max-width: 1040px) { .hero__frame .frame { transform: none; } }

/* Floating callout pinned to the mock — deliberate overlap, not a card grid */
.pin {
  position: absolute; z-index: 3;
  display: flex; align-items: center; gap: var(--s-3);
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-2); box-shadow: var(--e-3);
  padding: var(--s-3) var(--s-4); max-width: 260px;
}
.pin__title { font-size: var(--t-caption); font-weight: 600; }
.pin__sub { font-size: var(--t-micro); color: var(--text-3); }
.pin--a { left: -28px; bottom: -20px; }
.pin--b { right: -20px; top: -22px; border-left-color: var(--brand); }
@media (max-width: 1240px) { .pin--a { left: 0; } .pin--b { right: 0; } }
@media (max-width: 1040px) { .pin--b { top: -14px; } .pin--a { bottom: -14px; } }
@media (max-width: 620px) { .pin { display: none; } }

/* ---------- Generic app chrome used by all product screens ---------------- */
.app { display: grid; grid-template-columns: 208px minmax(0,1fr); background: var(--surface); font-size: var(--t-caption); }
/* Screens that are a full-width working surface (the page builder) ship without a
   sidebar — without this they inherit a 208px column reserved for nothing. */
.app:not(:has(.app__side)) { grid-template-columns: minmax(0, 1fr); }
@container (max-width: 700px) { .app { grid-template-columns: 1fr; } .app__side { display: none; } }

.app__side { background: var(--surface-2); border-right: 1px solid var(--border); padding: var(--s-4) var(--s-3); }
.app__side .brand { margin: 0 var(--s-2) var(--s-5); }
.app__side .brand__name { font-size: 1rem; }
.app__nav li a {
  display: flex; align-items: center; gap: 10px; padding: 7px var(--s-3);
  border-radius: var(--r-2); color: var(--text-2); text-decoration: none;
  font-size: var(--t-caption); font-weight: 500;
}
.app__nav li a:hover { background: var(--surface); color: var(--text); }
.app__nav li a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.app__nav svg { width: 15px; height: 15px; flex: none; opacity: .85; }
.app__nav .grp { font-size: var(--t-micro); text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); padding: var(--s-4) var(--s-3) var(--s-2); }

.app__main { min-width: 0; }
.app__top {
  display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap;
  padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border);
}
.app__title { font-family: var(--font-display); font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.02em; }
.app__crumb { font-size: var(--t-micro); color: var(--text-3); }
.app__tools { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; }
.mini {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--r-2); background: var(--surface);
  color: var(--text-2); font-size: var(--t-micro); font-weight: 600;
}
.mini--solid { background: var(--brand); border-color: var(--brand); color: var(--text-on-brand); }
.mini svg { width: 13px; height: 13px; }
.app__body { padding: var(--s-5); display: grid; gap: var(--s-4); }

/* KPI row */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--s-3); }
@container (max-width: 720px) { .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.kpi { border: 1px solid var(--border); border-radius: var(--r-3); padding: var(--s-3) var(--s-4); background: var(--surface); }
.kpi__k { font-size: var(--t-micro); color: var(--text-3); letter-spacing: .04em; text-transform: uppercase; }
.kpi__v { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.kpi__d { font-size: var(--t-micro); color: var(--text-3); display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.kpi__d b { color: var(--ok-text); font-weight: 600; }
.kpi__d b.down { color: var(--err-text); }

/* Data table */
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th {
  position: sticky; top: 0; z-index: 1;
  text-align: left; font-size: var(--t-micro); font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-3);
  padding: var(--s-2) var(--s-3); background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.tbl td { padding: 0 var(--s-3); height: 44px; border-bottom: 1px solid var(--hairline); color: var(--text-2); }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .who { display: flex; align-items: center; gap: var(--s-3); color: var(--text); font-weight: 600; }
.avatar {
  width: 28px; height: 28px; flex: none; border-radius: var(--r-2);
  display: grid; place-items: center; font-size: var(--t-micro); font-weight: 700;
  background: var(--brand-soft); color: var(--brand); border: 1px solid var(--brand-border);
  letter-spacing: .02em;
}
.avatar--clay { background: var(--accent-soft); color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.tbl-wrap { border: 1px solid var(--border); border-radius: var(--r-3); overflow: auto; max-height: 340px; background: var(--surface); }

/* ---------- Scheduler board (hero + screens tab 1) ------------------------ */
.sched { display: grid; grid-template-columns: 52px repeat(3, minmax(0,1fr)); border-top: 1px solid var(--border); }
.sched__col { border-right: 1px solid var(--hairline); min-width: 0; }
.sched__col:last-child { border-right: 0; }
.sched__head {
  padding: var(--s-3); border-bottom: 1px solid var(--border); background: var(--surface-2);
  display: flex; align-items: center; gap: var(--s-2); min-height: 54px; min-width: 0;
}
.sched__head > span:last-child { min-width: 0; }
.sched__head .avatar { width: 26px; height: 26px; }
.sched__doc, .sched__spec { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched__doc { font-size: var(--t-caption); font-weight: 600; line-height: 1.2; }
.sched__spec { font-size: var(--t-micro); color: var(--text-3); }
.sched__times { padding-top: 54px; }
.sched__time {
  height: 58px; padding-right: 8px; text-align: right;
  font-size: var(--t-micro); color: var(--text-3); font-variant-numeric: tabular-nums;
  border-bottom: 1px solid var(--hairline);
}
.sched__slots { position: relative; }
.slot { height: 58px; border-bottom: 1px solid var(--hairline); padding: 4px; }
.appt {
  height: 100%; border-radius: var(--r-2); padding: 6px 8px; overflow: hidden;
  background: var(--brand-soft); border: 1px solid var(--brand-border);
  border-left: 3px solid var(--brand);
  display: flex; flex-direction: column; justify-content: center;
}
.appt__name { font-size: var(--t-caption); font-weight: 600; color: var(--text); line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appt__meta { font-size: var(--t-micro); color: var(--text-3); display: flex; align-items: center; gap: 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appt--clay { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 32%, transparent); border-left-color: var(--accent); }
.appt--info { background: var(--info-bg); border-color: color-mix(in srgb, var(--info) 30%, transparent); border-left-color: var(--info); }
.appt--hold {
  background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 6px, var(--surface) 6px, var(--surface) 12px);
  border: 1px dashed var(--border-strong); border-left: 3px dashed var(--text-3);
}
.appt--ghost { background: transparent; border: 1px dashed var(--border); border-left: 1px dashed var(--border);
  color: var(--text-3); align-items: center; font-size: var(--t-micro); }
@container (max-width: 640px) { .sched { grid-template-columns: 44px repeat(2, minmax(0,1fr)); } .sched__col:nth-child(4) { display: none; } }

/* ---------- Product screens: tabs ---------------------------------------- */
/**
 * Nine screens do not fit on one row below ~1440px. The strip scrolls, and the
 * wrapper fades whichever edge still has tabs beyond it — a hidden scrollbar with
 * no affordance is just content nobody finds.
 */
.screens__scroller { position: relative; margin-bottom: var(--s-6); }
.screens__scroller::before,
.screens__scroller::after {
  content: ""; position: absolute; top: 0; bottom: 1px; width: 56px; z-index: 2;
  pointer-events: none; opacity: 0; transition: opacity var(--dur-2) var(--ease);
}
.screens__scroller::before { left: 0; background: linear-gradient(to right, var(--bg-alt), transparent); }
.screens__scroller::after { right: 0; background: linear-gradient(to left, var(--bg-alt), transparent); }
.screens__scroller[data-overflow="start"]::before,
.screens__scroller[data-overflow="both"]::before { opacity: 1; }
.screens__scroller[data-overflow="end"]::after,
.screens__scroller[data-overflow="both"]::after { opacity: 1; }

.screens__tabs {
  display: flex; gap: var(--s-1); overflow-x: auto; scrollbar-width: none;
  padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--border);
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--s-6);
}
.screens__tabs::-webkit-scrollbar { display: none; }
.tab { scroll-snap-align: start; }
.tab {
  /* flex: none is load-bearing — inside an overflowing flex row the browser will
     otherwise shrink each tab to fit, squashing the icons instead of scrolling. */
  flex: none;
  display: inline-flex; align-items: center; gap: var(--s-2); white-space: nowrap;
  min-height: 44px; padding: 0 var(--s-4); background: transparent;
  border: 1px solid transparent; border-radius: var(--r-2) var(--r-2) 0 0;
  color: var(--text-2); font-size: var(--t-sm); font-weight: 600; cursor: pointer;
  position: relative; transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab[aria-selected="true"] { color: var(--brand); }
.tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: var(--s-3); right: var(--s-3); bottom: -1px;
  height: 2px; background: var(--brand); border-radius: 2px 2px 0 0;
}
.tab svg { width: 16px; height: 16px; flex: none; }
.tab__i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: var(--r-1);
  background: var(--surface-2); font-size: var(--t-micro); font-weight: 700; }

.panel[hidden] { display: none; }
.panel__grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s-8); align-items: start; }
@media (max-width: 980px) { .panel__grid { grid-template-columns: 1fr; gap: var(--s-6); } }
.panel__notes h3 { margin-bottom: var(--s-3); }
.panel__notes p { color: var(--text-2); font-size: var(--t-sm); }
.checks { margin-top: var(--s-5); display: grid; gap: var(--s-3); }
.checks li { display: grid; grid-template-columns: 20px 1fr; gap: var(--s-3); font-size: var(--t-sm); color: var(--text-2); align-items: start; }
.checks svg { width: 18px; height: 18px; color: var(--brand); margin-top: 2px; }
.checks b { color: var(--text); font-weight: 600; }

/* ---------- Bento feature grid -------------------------------------------- */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: var(--s-4); }
.bento > * { grid-column: span 2; }
.bento .b-lg { grid-column: span 3; }
.bento .b-wide { grid-column: span 4; }
@media (max-width: 1000px) { .bento { grid-template-columns: repeat(4, minmax(0,1fr)); } .bento > * { grid-column: span 2; } .bento .b-lg, .bento .b-wide { grid-column: span 4; } }
@media (max-width: 620px) { .bento { grid-template-columns: 1fr; } .bento > *, .bento .b-lg, .bento .b-wide { grid-column: span 1; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-3);
  padding: var(--s-6); display: flex; flex-direction: column; gap: var(--s-3);
  transition: border-color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.card:hover { border-color: var(--brand-border); transform: translateY(-2px); box-shadow: var(--e-2); }
.card h3 { font-size: 1.125rem; }
.card p { font-size: var(--t-sm); color: var(--text-2); }
.card__icon {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r-2);
  background: var(--brand-soft); color: var(--brand); border: 1px solid var(--brand-border);
}
.card__icon svg { width: 19px; height: 19px; }
.card--feature { background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%); }
.card--accent .card__icon { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.card__foot { margin-top: auto; padding-top: var(--s-4); border-top: 1px solid var(--hairline);
  font-size: var(--t-micro); color: var(--text-3); display: flex; gap: var(--s-2); flex-wrap: wrap; }

/* Inline mini-visual inside bento cards */
.mini-vis { border: 1px solid var(--border); border-radius: var(--r-2); background: var(--bg); padding: var(--s-3); display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 62px 1fr 34px; gap: 8px; align-items: center; font-size: var(--t-micro); color: var(--text-3); }
.bar { height: 7px; border-radius: var(--r-pill); background: var(--surface-sunk); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.bar i.clay { background: var(--accent); }

/* Chat / voice bubbles */
.convo { display: grid; gap: var(--s-2); }
.bub { max-width: 84%; padding: 8px 11px; border-radius: var(--r-3); font-size: var(--t-caption); line-height: 1.45; border: 1px solid var(--border); }
.bub.bub--in  { background: var(--surface-2); color: var(--text-2); border-bottom-left-radius: var(--r-1); }
.bub.bub--out { background: var(--brand); color: var(--text-on-brand); border-color: var(--brand); margin-left: auto; border-bottom-right-radius: var(--r-1); }
.bub__tag { display: block; font-size: var(--t-micro); opacity: .75; margin-bottom: 2px; letter-spacing: .04em; text-transform: uppercase; }

/* Waveform for the voice agent */
.wave { display: flex; align-items: center; gap: 3px; height: 34px; }
.wave i { width: 3px; border-radius: 2px; background: var(--brand); opacity: .8; animation: pulse 1.1s var(--ease) infinite; }
@keyframes pulse { 0%,100% { height: 22%; } 50% { height: 100%; } }

/* ---------- Steps / workflow --------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.step { padding: var(--s-6) var(--s-6) var(--s-6) 0; border-top: 2px solid var(--border); position: relative; }
.step + .step { padding-left: var(--s-6); }
@media (max-width: 900px) { .step + .step { padding-left: 0; } }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: -2px; left: 0; width: 44px; height: 2px; background: var(--brand);
}
.step__n { font-family: var(--font-mono); font-size: var(--t-micro); color: var(--brand); letter-spacing: .1em; }
.step h3 { font-size: 1.0625rem; margin: var(--s-3) 0 var(--s-2); }
.step p { font-size: var(--t-sm); color: var(--text-2); }

/* ---------- Feature index (dense list, deliberately different rhythm) ----- */
.index-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--s-10) var(--s-8); }
@media (max-width: 980px) { .index-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--s-8) var(--s-6); } }
@media (max-width: 620px) { .index-grid { grid-template-columns: 1fr; } }
.index-col h3 { font-size: var(--t-h4); font-weight: 600; letter-spacing: -0.01em; display: flex; align-items: center; gap: var(--s-2); padding-bottom: var(--s-3); border-bottom: 1px solid var(--border); }
.index-col h3 svg { width: 17px; height: 17px; color: var(--brand); }
.index-col ul { margin-top: var(--s-4); display: grid; gap: var(--s-3); }
.index-col li { font-size: var(--t-sm); color: var(--text-2); padding-left: var(--s-5); position: relative; }
.index-col li::before {
  content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 1px; background: var(--brand); opacity: .7;
}
.index-col li b { color: var(--text); font-weight: 600; }

/* ---------- Marquee-free logo/trust strip -------------------------------- */
.trust { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-8); }
.trust__label { font-size: var(--t-micro); text-transform: uppercase; letter-spacing: var(--tr-eyebrow); color: var(--text-3); }
.trust__item { display: flex; align-items: center; gap: 8px; font-size: var(--t-sm); font-weight: 600; color: var(--text-2); }
.trust__item svg { width: 18px; height: 18px; color: var(--brand); }

/* ---------- Quotes -------------------------------------------------------- */
.quotes { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--s-4); }
@media (max-width: 980px) { .quotes { grid-template-columns: 1fr; } }
.quote { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-3); padding: var(--s-6); display: flex; flex-direction: column; }
.quote blockquote { font-family: var(--font-display); font-size: 1.0625rem; line-height: 1.5; letter-spacing: -0.015em; }
.quote figcaption { margin-top: auto; padding-top: var(--s-5); display: flex; align-items: center; gap: var(--s-3); }
.quote .name { display: block; font-size: var(--t-caption); font-weight: 600; }
.quote .role { display: block; font-size: var(--t-micro); color: var(--text-3); margin-top: 2px; }
.placeholder-note {
  margin-top: var(--s-5); font-size: var(--t-caption); color: var(--text-3);
  border-left: 2px solid var(--warn); padding-left: var(--s-3);
}

/* ---------- Pricing ------------------------------------------------------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--s-4); align-items: stretch; }
@media (max-width: 980px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-3); padding: var(--s-6); display: flex; flex-direction: column; }
.plan--hero { border-color: var(--brand); box-shadow: var(--e-3); position: relative; }
.plan--hero::before {
  content: "Most clinics start here"; position: absolute; top: -11px; left: var(--s-6);
  background: var(--brand); color: var(--text-on-brand); font-size: var(--t-micro);
  font-weight: 700; letter-spacing: .04em; padding: 3px 10px; border-radius: var(--r-1);
}
.plan__name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; }
.plan__for { font-size: var(--t-caption); color: var(--text-3); margin-top: 4px; }
.plan__price { margin: var(--s-5) 0 var(--s-2); display: flex; align-items: baseline; gap: 6px; }
.plan__price b { font-family: var(--font-display); font-size: 2.25rem; font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.plan__price span { font-size: var(--t-caption); color: var(--text-3); }
.plan ul { display: grid; gap: 10px; margin: var(--s-5) 0 var(--s-6); }
.plan li { display: grid; grid-template-columns: 16px 1fr; gap: 10px; font-size: var(--t-sm); color: var(--text-2); align-items: start; }
.plan li svg { width: 15px; height: 15px; color: var(--brand); margin-top: 4px; }
.plan .btn { margin-top: auto; width: 100%; }

/* ---------- FAQ ----------------------------------------------------------- */
.faq { max-width: 860px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-5) 0; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 14px; height: 14px;
  border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3);
  transform: rotate(45deg) translate(-3px, -3px); transition: transform var(--dur-2) var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq details[open] summary { color: var(--brand); }
.faq p { padding-bottom: var(--s-5); color: var(--text-2); max-width: var(--prose); font-size: var(--t-sm); }

/* ---------- CTA + form ---------------------------------------------------- */
.cta-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0, 460px); gap: var(--s-12); align-items: start; }
@media (max-width: 980px) { .cta-grid { grid-template-columns: 1fr; gap: var(--s-8); } }
.form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-3); padding: var(--s-6); display: grid; gap: var(--s-4); }
.field { display: grid; gap: 6px; }
.field label { font-size: var(--t-caption); font-weight: 600; }
.field label .req { color: var(--err); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 10px var(--s-3);
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--r-2);
  font-size: var(--t-sm); transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.field textarea { min-height: 88px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--text-3); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.field .hint { font-size: var(--t-micro); color: var(--text-3); }
.field .err {
  display: none; align-items: center; gap: 6px; font-size: var(--t-micro); color: var(--err); font-weight: 600;
}
.field .err svg { width: 13px; height: 13px; flex: none; }
.field[data-invalid="true"] input, .field[data-invalid="true"] select { border-color: var(--err); background: var(--err-bg); }
.field[data-invalid="true"] .err { display: flex; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
@media (max-width: 520px) { .form__row { grid-template-columns: 1fr; } }
.form__ok {
  display: none; gap: var(--s-3); align-items: flex-start;
  background: var(--ok-bg); border: 1px solid color-mix(in srgb, var(--ok) 32%, transparent);
  border-radius: var(--r-2); padding: var(--s-4); font-size: var(--t-sm); color: var(--text);
}
.form[data-sent="true"] .form__ok { display: flex; }
.form[data-sent="true"] .form__fields { display: none; }
.form__fields { display: grid; gap: var(--s-4); }
.legal { font-size: var(--t-micro); color: var(--text-3); }
.cta-list { display: grid; gap: var(--s-4); margin-top: var(--s-8); }
.cta-list li { display: grid; grid-template-columns: 22px 1fr; gap: var(--s-3); font-size: var(--t-sm); color: var(--text-2); }
.cta-list svg { width: 20px; height: 20px; color: var(--brand); }

/* ---------- Footer -------------------------------------------------------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding-block: var(--s-16) var(--s-8); }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: var(--s-8); }
@media (max-width: 980px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-grid h2 { font-size: var(--t-micro); text-transform: uppercase; letter-spacing: var(--tr-eyebrow); color: var(--text-3); margin-bottom: var(--s-4); font-weight: 700; }
.foot-grid ul { display: grid; gap: 10px; }
.foot-grid a { color: var(--text-2); text-decoration: none; font-size: var(--t-sm); }
.foot-grid a:hover { color: var(--brand); }
.foot-about p { font-size: var(--t-sm); color: var(--text-2); margin-top: var(--s-4); max-width: 34ch; }
.foot-bottom {
  margin-top: var(--s-12); padding-top: var(--s-6); border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: var(--s-4); justify-content: space-between;
  font-size: var(--t-caption); color: var(--text-3);
}
.foot-bottom nav { display: flex; gap: var(--s-5); flex-wrap: wrap; }

/* ---------- Entrance motion (marketing only) ------------------------------ */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Inside-app building blocks (used by product screens) ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.split--even { grid-template-columns: repeat(2, minmax(0,1fr)); }
@container (max-width: 720px) { .split, .split--even { grid-template-columns: 1fr; } }

.pane { border: 1px solid var(--border); border-radius: var(--r-3); background: var(--surface); overflow: hidden; }
.pane__hd {
  display: flex; align-items: center; gap: var(--s-2);
  padding: 10px var(--s-4); border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.pane__hd h4 { font-family: var(--font-body); font-size: var(--t-caption); font-weight: 600; letter-spacing: 0; }
.pane__hd .mini { margin-left: auto; }
.pane__bd { padding: var(--s-4); display: grid; gap: var(--s-3); }
.pane__bd--flush { padding: 0; }

.rec-hd { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.rec-hd .avatar { width: 42px; height: 42px; font-size: var(--t-caption); border-radius: var(--r-3); }
.rec-hd__name { font-family: var(--font-display); font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.02em; }
.rec-hd__meta { font-size: var(--t-micro); color: var(--text-3); }
.rec-hd .chips { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }

.dl { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--s-3); }
@container (max-width: 720px) { .dl { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.dl div { border-left: 2px solid var(--border); padding-left: 10px; }
.dl dt { font-size: var(--t-micro); color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.dl dd { font-size: var(--t-caption); font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
.dl div.is-flag { border-left-color: var(--err); }
.dl div.is-flag dd { color: var(--err-text); }

.timeline { display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 74px 1fr; gap: var(--s-3); padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.timeline li:last-child { border-bottom: 0; }
.timeline time { font-size: var(--t-micro); color: var(--text-3); font-variant-numeric: tabular-nums; padding-top: 2px; }
.timeline b { font-size: var(--t-caption); font-weight: 600; display: block; }
.timeline span { font-size: var(--t-micro); color: var(--text-3); }

.rule-row {
  display: grid; grid-template-columns: 26px minmax(0,1fr) auto; gap: var(--s-3); align-items: center;
  padding: 10px var(--s-4); border-bottom: 1px solid var(--hairline);
}
.rule-row:last-child { border-bottom: 0; }
.rule-row__i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: var(--r-2); background: var(--brand-soft); color: var(--brand); }
.rule-row__i svg { width: 14px; height: 14px; }
.rule-row b { font-size: var(--t-caption); font-weight: 600; display: block; }
.rule-row span { font-size: var(--t-micro); color: var(--text-3); }
.switch { width: 34px; height: 19px; border-radius: var(--r-pill); background: var(--brand); position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; right: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; }
.switch--off { background: var(--border-strong); }
.switch--off::after { right: auto; left: 2px; }

.spark { display: flex; align-items: flex-end; gap: 4px; height: 76px; padding-top: var(--s-2); }
.spark i { flex: 1; background: var(--brand-soft); border: 1px solid var(--brand-border); border-bottom: 0; border-radius: var(--r-1) var(--r-1) 0 0; }
.spark i.hi { background: var(--brand); border-color: var(--brand); }
.spark-x { display: flex; justify-content: space-between; font-size: var(--t-micro); color: var(--text-3); margin-top: 6px; }

.donut { display: grid; grid-template-columns: 96px 1fr; gap: var(--s-4); align-items: center; }
.donut__ring {
  width: 96px; height: 96px; border-radius: 50%;
  background: conic-gradient(var(--brand) 0 62%, var(--accent) 62% 84%, var(--surface-sunk) 84% 100%);
  display: grid; place-items: center;
}
.donut__ring::after {
  content: ""; width: 62px; height: 62px; border-radius: 50%; background: var(--surface);
}
.legend { display: grid; gap: 8px; }
.legend li { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; font-size: var(--t-micro); color: var(--text-2); }
.legend i { width: 10px; height: 10px; border-radius: var(--r-1); background: var(--brand); }
.legend i.c2 { background: var(--accent); }
.legend i.c3 { background: var(--surface-sunk); border: 1px solid var(--border); }
.legend b { font-variant-numeric: tabular-nums; color: var(--text); }

.page-row { display: grid; grid-template-columns: 18px minmax(0,1fr) 90px 70px; gap: var(--s-3); align-items: center;
  padding: 9px var(--s-4); border-bottom: 1px solid var(--hairline); font-size: var(--t-caption); }
.page-row:last-child { border-bottom: 0; }
.page-row svg { width: 15px; height: 15px; color: var(--text-3); }
.page-row .path { font-family: var(--font-mono); font-size: var(--t-micro); color: var(--text-3); }
.page-row b { font-weight: 600; }

.call-hd { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4); border-bottom: 1px solid var(--border); }
.call-hd .avatar { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.call-hd__t { font-size: var(--t-caption); font-weight: 600; }
.call-hd__s { font-size: var(--t-micro); color: var(--text-3); font-variant-numeric: tabular-nums; }

/* Honeypot: off-screen for sighted users, hidden from assistive tech, still
   fillable by the bots that autocomplete every field they find. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__error[hidden] { display: none; }
.form__error {
  display: flex; align-items: flex-start; gap: var(--s-2);
  background: var(--err-bg); border: 1px solid color-mix(in srgb, var(--err) 30%, transparent);
  border-radius: var(--r-2); padding: var(--s-3) var(--s-4);
  font-size: var(--t-caption); color: var(--text);
}
.form__error svg { width: 16px; height: 16px; flex: none; color: var(--err); margin-top: 2px; }

/* ---------- CRM kanban board (product screen) ----------------------------- */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); align-items: start; }
@container (max-width: 760px) { .kanban { grid-template-columns: repeat(2, minmax(0,1fr)); } .kanban__col:nth-child(n+3) { display: none; } }

.kanban__col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-3); min-width: 0; }
.kanban__hd {
  display: flex; align-items: center; gap: 6px; padding: 9px var(--s-3);
  border-bottom: 1px solid var(--border);
  font-size: var(--t-micro); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3);
}
.kanban__hd b { margin-left: auto; color: var(--text-2); font-variant-numeric: tabular-nums; }
.kanban__hd i.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex: none; }
.kanban__hd i.dot.warn { background: var(--warn); }
.kanban__hd i.dot.ok { background: var(--ok); }
.kanban__hd i.dot.mute { background: var(--border-strong); }
.kanban__body { padding: var(--s-2); display: grid; gap: var(--s-2); }

.lead-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-2);
  padding: 9px 10px; display: grid; gap: 5px;
  border-left: 3px solid var(--border-strong);
}
.lead-card--hot { border-left-color: var(--accent); }
.lead-card--warm { border-left-color: var(--brand); }
.lead-card__top { display: flex; align-items: center; gap: 6px; }
.lead-card__name { font-size: var(--t-caption); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-card__score {
  margin-left: auto; flex: none; font-size: var(--t-micro); font-weight: 700;
  font-variant-numeric: tabular-nums; padding: 1px 6px; border-radius: var(--r-1);
  background: var(--brand-soft); color: var(--brand);
}
.lead-card__score.hot { background: var(--accent-soft); color: var(--accent-text); }
.lead-card__meta {
  font-size: var(--t-micro); color: var(--text-3);
  display: flex; align-items: center; gap: 5px; min-width: 0;
}
.lead-card__meta > :not(.src) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-card__meta .src {
  padding: 1px 5px; border-radius: var(--r-1); background: var(--surface-2);
  border: 1px solid var(--border); font-weight: 600; letter-spacing: .02em;
}
.lead-card__owner { display: flex; align-items: center; gap: 5px; font-size: var(--t-micro); color: var(--text-3); }
.lead-card__owner .avatar { width: 17px; height: 17px; font-size: 8px; border-radius: 50%; }

/* ---------- Website builder (product screen) ------------------------------ */
.builder { display: grid; grid-template-columns: 176px minmax(0,1fr) 192px; gap: 0; min-height: 330px; }
@container (max-width: 900px) { .builder { grid-template-columns: 176px minmax(0,1fr); } .builder__props { display: none; } }
@container (max-width: 640px) { .builder { grid-template-columns: 1fr; } .builder__palette { display: none; } }

.builder__palette { border-right: 1px solid var(--border); padding: var(--s-3); background: var(--surface-2); }
.builder__props { border-left: 1px solid var(--border); padding: var(--s-3); background: var(--surface-2); }
.builder__label {
  font-size: var(--t-micro); text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-3); font-weight: 700; margin-bottom: var(--s-2);
}
.palette-item {
  display: flex; align-items: center; gap: 7px; padding: 6px 8px; margin-bottom: 4px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-2);
  font-size: var(--t-micro); font-weight: 600; color: var(--text-2); cursor: grab;
}
.palette-item svg { width: 13px; height: 13px; color: var(--brand); flex: none; }
.palette-item--drag { border-style: dashed; border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

.canvas { padding: var(--s-4); background: var(--bg); display: grid; gap: var(--s-2); align-content: start; }
.canvas__block {
  position: relative; border: 1px solid var(--border); border-radius: var(--r-2);
  background: var(--surface); padding: var(--s-3) var(--s-4);
}
.canvas__block[data-selected="true"] { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.canvas__tag {
  position: absolute; top: -8px; left: 10px; font-size: 9px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; padding: 1px 6px; border-radius: var(--r-1);
  background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border);
}
.canvas__block[data-selected="true"] .canvas__tag { background: var(--brand); color: var(--text-on-brand); border-color: var(--brand); }
.canvas__h { font-family: var(--font-display); font-size: 1rem; font-weight: 600; letter-spacing: -0.02em; }
.canvas__p { font-size: var(--t-micro); color: var(--text-3); margin-top: 3px; }
.canvas__row { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.canvas__pill { font-size: var(--t-micro); padding: 3px 9px; border-radius: var(--r-1); background: var(--brand); color: var(--text-on-brand); font-weight: 600; }
.canvas__pill--ghost { background: transparent; color: var(--text-2); border: 1px solid var(--border-strong); }
.canvas__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.canvas__cols span { height: 26px; border-radius: var(--r-1); background: var(--surface-2); border: 1px solid var(--hairline); }

.prop-field { margin-bottom: 9px; }
.prop-field label { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); font-weight: 700; margin-bottom: 3px; }
.prop-field .val {
  font-size: var(--t-micro); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-1); padding: 4px 7px; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.prop-field .val--focus { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); color: var(--text); }
.swatches { display: flex; gap: 5px; }
.swatches i { width: 20px; height: 20px; border-radius: var(--r-1); border: 1px solid var(--border); }

/* ---------- Chatbot settings (product screen) ----------------------------- */
.toggle-card {
  display: grid; grid-template-columns: 1fr auto; gap: var(--s-3); align-items: center;
  padding: var(--s-3) var(--s-4); border: 1px solid var(--border); border-radius: var(--r-3);
  background: var(--surface);
}
.toggle-card--on { border-color: var(--brand-border); background: var(--brand-soft); }
.toggle-card b { font-size: var(--t-caption); font-weight: 600; display: block; }
.toggle-card span { font-size: var(--t-micro); color: var(--text-3); }
.switch--lg { width: 42px; height: 24px; }
.switch--lg::after { width: 20px; height: 20px; top: 2px; right: 2px; }
.switch--lg.switch--off::after { left: 2px; right: auto; }

.kb-row {
  display: grid; grid-template-columns: 92px minmax(0,1fr) auto; gap: var(--s-3); align-items: baseline;
  padding: 9px var(--s-4); border-bottom: 1px solid var(--hairline); font-size: var(--t-caption);
}
.kb-row:last-child { border-bottom: 0; }
.kb-row .intent {
  font-family: var(--font-mono); font-size: 10px; color: var(--brand);
  background: var(--brand-soft); border: 1px solid var(--brand-border);
  border-radius: var(--r-1); padding: 1px 5px; justify-self: start;
}
.kb-row .a { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-row .hits { font-size: var(--t-micro); color: var(--text-3); font-variant-numeric: tabular-nums; }

.guard-list { display: grid; gap: 7px; }
.guard-list li { display: grid; grid-template-columns: 15px 1fr; gap: 8px; font-size: var(--t-micro); color: var(--text-2); align-items: start; }
.guard-list svg { width: 13px; height: 13px; color: var(--brand); margin-top: 2px; }

/* ---------- Section-end CTA rails ---------------------------------------- */
/* Placed at the natural end of a section, where a reader has just finished a
   block of evidence — not floated mid-argument. */
.cta-rail {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3);
  margin-top: var(--s-7); padding-top: var(--s-5);
  border-top: 1px solid var(--border);
}
.cta-rail__text { flex: 1 1 260px; min-width: 0; }
.cta-rail__text b { display: block; font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; }
.cta-rail__text span { font-size: var(--t-caption); color: var(--text-3); }
.cta-rail__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* Phone CTA — for a lot of Indian clinic owners this is the preferred channel. */
.btn--call { gap: var(--s-2); }
.btn--call svg { width: 15px; height: 15px; }

/* ---------- Mobile sticky action bar -------------------------------------- */
/* The page is long. Past the hero there was previously nothing to tap until
   pricing, ~6000px later. */
.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: none; gap: var(--s-2); padding: var(--s-2) var(--s-3);
  padding-bottom: calc(var(--s-2) + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-top: 1px solid var(--border);
  transform: translateY(110%); transition: transform var(--dur-2) var(--ease);
}
.mobile-cta[data-visible="true"] { transform: none; }
.mobile-cta .btn { flex: 1; min-height: 46px; }
.mobile-cta .btn--ghost { flex: 0 0 auto; padding-inline: var(--s-4); }

@media (max-width: 720px) {
  .mobile-cta { display: flex; }
  /* Keep the sticky bar from covering the last of the footer. */
  body { padding-bottom: 62px; }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-cta { transition: none; }
}
