/* === [System] — design tokens === */
:root {
  --bg: #F7F5F0;
  --bg-alt: #F2EFE7;
  --surface: #FFFFFF;
  --surface-2: #FBFAF6;
  --border: #E8E3D7;
  --border-strong: #D6D0C0;
  --text: #1A1814;
  --text-muted: #6B6760;
  --text-faint: #A39E92;
  --accent: oklch(0.42 0.06 175);
  --accent-2: oklch(0.55 0.05 175);
  --accent-soft: oklch(0.96 0.018 175);
  --accent-border: oklch(0.88 0.03 175);
  --warm: oklch(0.62 0.13 45);
  --warm-soft: oklch(0.95 0.03 45);
  --danger: oklch(0.55 0.16 27);
  --shadow-xs: 0 1px 1px rgba(20,18,12,0.03);
  --shadow-sm: 0 1px 2px rgba(20,18,12,0.04), 0 0 0 1px rgba(20,18,12,0.04);
  --shadow-md: 0 2px 4px rgba(20,18,12,0.04), 0 8px 24px -8px rgba(20,18,12,0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 999px;
  --rail-w: 280px;
  --content-max: 760px;
  --rail-w-mobile: 86vw;
  --content-pad-mobile: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Geist', 'Söhne', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #FFFFFF;
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'ss02', 'cv11';
}

.serif { font-family: 'Source Serif 4', 'Iowan Old Style', Georgia, serif; font-feature-settings: normal; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* === App shell === */
.app {
  height: 100vh;
  display: flex;
  overflow: hidden;
}
.app--collapsed { --rail-w: 56px; }


/* Default SVG sizing — prevents default 300x150 fallback */
svg { width: 1em; height: 1em; display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* === Main header (Search ⌄ + Share) === */
.main__header {
  height: 56px;
  flex: 0 0 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
.main__mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}
.main__mode:hover { background: var(--bg-alt); }
.main__mode-caret { color: var(--text-muted); }
.main__mode-caret svg { width: 14px; height: 14px; }
.main__share {
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
}
.main__share:hover { background: var(--surface-2); }

/* === Chat header (sticky over scroll area) === */
.chat-header {
  flex: 0 0 56px;
  height: 56px;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(160px, 1fr);
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 5;
}
.chat-header__left {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  position: relative;
  justify-self: start;
}
.chat-header__name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  padding: 4px 4px 4px 6px;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-header__more {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  border-radius: 6px;
  cursor: pointer;
}
.chat-header__more:hover { background: var(--bg-alt); color: var(--text-muted); }
.chat-header__more--open { background: var(--bg-alt); color: var(--text); }
.chat-header__more svg { width: 16px; height: 16px; }

.chat-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 4px;
  z-index: 20;
}
.chat-menu__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  font-size: 13.5px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
}
.chat-menu__item:hover { background: var(--bg-alt); }
.chat-menu__item--danger { color: oklch(0.5 0.18 25); }
.chat-menu__divider { height: 1px; background: var(--border); margin: 4px 2px; }

/* Faceted tabs (Answer / Doctors / Locations / Services / Pages) — matches landing .search-tabs */
.chat-header__tabs {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  height: 100%;
  justify-self: center;
}
.chat-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 100%;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
  transition: color 120ms;
}
.chat-tab:hover { color: var(--text-muted); }
.chat-tab--active {
  color: var(--text);
  font-weight: 500;
}
.chat-tab--active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}
.chat-tab__icon {
  display: grid;
  place-items: center;
  color: currentColor;
}
.chat-tab__icon svg { width: 14px; height: 14px; }
.chat-tab__count {
  font-size: 10.5px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-faint);
  font-weight: 400;
}
.chat-tab--active .chat-tab__count { color: var(--text-muted); }

/* === Inline tabs (live below the AI summary) — matches landing .search-tabs === */
.inline-tabs {
  display: flex;
  align-items: stretch;
  gap: 24px;
  margin: 18px 0 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.inline-tabs::-webkit-scrollbar { display: none; }
.inline-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 2px 8px;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  font-size: 13.5px;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: color 120ms;
}
.inline-tab:hover { color: var(--text-muted); }
.inline-tab--active {
  color: var(--text);
  font-weight: 500;
}
.inline-tab--active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}
.inline-tab__icon {
  display: grid;
  place-items: center;
  color: currentColor;
}
.inline-tab__icon svg { width: 14px; height: 14px; }
.inline-tab__count {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-faint);
  font-weight: 400;
}
.inline-tab--active .inline-tab__count { color: var(--text-muted); }

/* === Tab empty state === */
.tab-empty {
  margin: 28px 0 8px;
  padding: 28px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  text-align: center;
}
.tab-empty__icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--bg-alt);
  color: var(--text-muted);
}
.tab-empty__icon svg { width: 22px; height: 22px; }
.tab-empty__title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}
.tab-empty__body {
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.55;
}

/* Role selector ("I'm a Patient") */
.chat-header__right {
  position: relative;
  justify-self: end;
}
.landing-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 10px 16px 0;
  flex-shrink: 0;
}
.role-wrap { position: relative; }

.role-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 12px;
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 13.5px;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
}
.role-select:hover { background: var(--bg-alt); }
.role-select--open { background: var(--bg-alt); }
.role-select__caret { display: grid; place-items: center; color: var(--text-muted); }
.role-select__caret svg { width: 14px; height: 14px; }

.role-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 6px;
  z-index: 20;
}
.role-menu__header {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 6px 8px 4px;
}
.role-menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  font-size: 13.5px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
}
.role-menu__item:hover { background: var(--bg-alt); }
.role-menu__item--active { background: var(--bg-alt); font-weight: 500; }
.role-menu__check { display: grid; place-items: center; color: var(--text); }
.role-menu__check svg { width: 14px; height: 14px; }
.role-menu__footer {
  font-size: 11.5px;
  color: var(--text-muted);
  padding: 6px 8px 4px;
  line-height: 1.4;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.icon-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 0; background: transparent;
  border-radius: 6px;
  color: var(--text-muted);
}
.icon-btn:hover { background: var(--bg-alt); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

/* Collapsed-rail tooltip — single floating bubble shown next to the hovered
   rail item. Uses position: fixed so it escapes the rail's overflow clip. */
.rail-tip {
  position: fixed;
  transform: translateY(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  letter-spacing: 0.01em;
}
.rail-tip::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -4px;
  transform: translateY(-50%) rotate(45deg);
  width: 8px; height: 8px;
  background: var(--text);
  border-radius: 1px;
}

/* === Left rail === */
.rail {
  width: var(--rail-w);
  flex-shrink: 0;
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 14px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
  transition: width 220ms cubic-bezier(0.4, 0, 0.2, 1);
}
.rail__header {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 2px;
}
.rail--collapsed .rail__header {
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.rail--collapsed .rail__brand {
  flex: none;
  width: 100%;
}
.rail__brand {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  background: transparent;
  padding: 6px 7px;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  flex-shrink: 1;
}
.rail__brand:hover { background: var(--bg-alt); }
.rail__brand-mark {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
  flex-shrink: 0;
}
.rail__brand-mark svg { width: 14px; height: 14px; }

.rail__icon-btn {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border: 0; background: transparent;
  border-radius: 6px;
  color: var(--text);
}
.rail__icon-btn:hover { background: var(--bg-alt); }
.rail__icon-btn svg { width: 17px; height: 17px; }

/* Collapsible labels */
.rail__text {
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 140ms ease;
  flex: 1;
  min-width: 0;
}

/* Collapsed-state overrides */
.rail--collapsed .rail__text { opacity: 0; }
.rail--collapsed .rail__section--recent { display: none; }
.rail--collapsed .rail__section-head { display: none; }
.rail--collapsed .signin-callout { display: none; }
.rail--collapsed .rail__item-trail { display: none; }
.rail--collapsed .rail__user-text,
.rail--collapsed .rail__user-action { display: none; }
/* Dividers hidden entirely in collapsed state */
.rail__divider--header { display: none; }
.rail--collapsed .rail__divider { display: none; }
.rail__item--login { display: none; }
.rail--collapsed .rail__item--login { display: flex; }
.rail--collapsed .user-menu { left: 4px; right: auto; min-width: 200px; }

.rail__section {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.rail__divider {
  height: 1px;
  background: var(--border);
  margin: 10px 8px;
}

.rail__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 9px;
  border: 0;
  background: transparent;
  border-radius: 7px;
  font-size: 14px;
  color: var(--text);
  text-align: left;
  width: 100%;
  font-weight: 400;
  position: relative;
}
.rail__item:hover { background: var(--bg-alt); }
.rail__item-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: var(--text);
  flex-shrink: 0;
}
.rail__item-icon svg { width: 18px; height: 18px; }
.rail__item-trail {
  margin-left: auto;
  color: var(--text-faint);
  width: 18px; height: 18px;
  display: grid; place-items: center;
}
.rail__item-trail svg { width: 17px; height: 17px; }
.rail__item-trail:hover { color: var(--text); }

/* Disabled rail item (logged-out gated features) + hover promo card */
.rail__locked { position: relative; }
.rail__item--locked {
  color: var(--text-faint);
  cursor: default;
  opacity: 0.7;
}
.rail__item--locked .rail__item-icon { color: var(--text-faint); opacity: 0.7; }
.rail__item--locked:hover { background: var(--bg-alt); }

/* Collapsed mode: trail lock is hidden, so show a tiny lock badge overlaid
   on the icon corner instead — keeps the locked state legible. */
.rail--collapsed .rail__locked .rail__item-icon { position: relative; }
.rail--collapsed .rail__locked .rail__item-icon::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a6640' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='11' width='18' height='11' rx='2'/><path d='M7 11V7a5 5 0 0 1 10 0v4'/></svg>");
  background-size: 7px 7px;
  background-repeat: no-repeat;
  background-position: center;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.rail__item-trail--lock {
  opacity: 0;
  transition: opacity 120ms ease;
  pointer-events: none;
  color: var(--text-faint);
}
.rail__locked:hover .rail__item-trail--lock,
.rail__item--locked-hover .rail__item-trail--lock { opacity: 0.9; }
.rail__locked:hover .rail__item--locked,
.rail__item--locked-hover { color: var(--text-muted); }
.rail__promo {
  position: fixed;
  width: 240px;
  padding: 12px 13px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.06);
  z-index: 1000;
  animation: rail-promo-in 120ms ease both;
}
@keyframes rail-promo-in {
  from { opacity: 0; transform: translateX(-4px); }
  to   { opacity: 1; transform: translateX(0); }
}
.rail__promo-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.rail__promo-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 10px;
}
.rail__promo-btn {
  width: 100%;
  padding: 6px 10px;
  background: var(--text);
  color: var(--bg);
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}
.rail__promo-btn:hover { background: #2a2620; }

.rail__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 8px 10px 6px;
}

.rail__recent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 10px;
  border: 0;
  background: transparent;
  border-radius: 7px;
  font-size: 13.5px;
  color: var(--text-muted);
  text-align: left;
  width: 100%;
  cursor: pointer;
}
.rail__recent:hover { background: var(--bg-alt); color: var(--text); }
.rail__recent--active { background: var(--bg-alt); color: var(--text); }
.rail__recent-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.rail__recent-more {
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 4px;
  color: var(--text-muted);
  opacity: 0;
  flex-shrink: 0;
}
.rail__recent:hover .rail__recent-more,
.rail__recent--active .rail__recent-more { opacity: 1; }
.rail__recent-more:hover { background: var(--surface); color: var(--text); }
.rail__recent-more svg { width: 14px; height: 14px; }

.rail__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px 8px 3px;
  margin-top: 8px;
  border-radius: 8px;
  cursor: pointer;
}
.rail__user:hover { background: var(--bg-alt); }
.rail__user--open { background: var(--bg-alt); }
.rail__user-wrap { position: relative; }

/* User menu popup */
.user-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 4px;
  display: flex;
  flex-direction: column;
  z-index: 30;
  animation: menuPop 140ms ease-out;
}
@keyframes menuPop {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.user-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.user-menu__item:hover { background: var(--bg-alt); }
.user-menu__icon { display: grid; place-items: center; color: var(--text-muted); flex-shrink: 0; }
.user-menu__icon svg { width: 16px; height: 16px; }
.user-menu__trail {
  margin-left: auto;
  color: var(--text-faint);
  font-size: 12px;
}
.user-menu__divider { height: 1px; background: var(--border); margin: 4px 4px; }
.user-menu__item--danger { color: var(--danger); }
.user-menu__item--danger .user-menu__icon { color: var(--danger); }

/* Sign-in callout (sidebar, logged-out) */
.signin-callout {
  margin-top: 8px;
  padding: 14px 14px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.signin-callout__title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.signin-callout__desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 10px;
}
.signin-callout__actions {
  display: flex;
  gap: 6px;
}
.signin-callout__primary {
  flex: 1;
  padding: 7px 10px;
  background: var(--text);
  color: var(--bg);
  border: 0;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
}
.signin-callout__primary:hover { background: #2a2620; }
.signin-callout__secondary {
  flex: 1;
  padding: 7px 10px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
}
.signin-callout__secondary:hover { background: var(--bg-alt); }

/* === Auth modal (Log in / Sign up) === */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: rgba(10, 8, 4, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 24px;
  animation: auth-backdrop-in 160ms ease both;
}
@keyframes auth-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
.auth-modal__card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #1A1814;
  color: #F2EFE7;
  border-radius: 22px;
  padding: 36px 32px 28px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6), 0 8px 24px rgba(0,0,0,0.4);
  animation: auth-card-in 180ms cubic-bezier(.2,.8,.2,1) both;
}
@keyframes auth-card-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.auth-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #B8B2A4;
  border-radius: 8px;
  cursor: pointer;
}
.auth-modal__close:hover { background: rgba(255,255,255,0.06); color: #fff; }
.auth-modal__close svg { width: 18px; height: 18px; }
.auth-modal__back {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #B8B2A4;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
}
.auth-modal__back:hover { background: rgba(255,255,255,0.06); color: #fff; }
.auth-modal__mark {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
  color: #F2EFE7;
}
.auth-modal__mark svg {
  width: 36px;
  height: 36px;
}
.auth-modal__title {
  text-align: center;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 8px 0 12px;
}
.auth-modal__sub {
  text-align: center;
  font-size: 14.5px;
  color: #A39E92;
  line-height: 1.5;
  margin: 0 auto 28px;
  max-width: 320px;
}
.auth-modal__providers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.auth-provider {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #100E0B;
  color: #F2EFE7;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms, border-color 120ms;
}
.auth-provider:hover {
  background: #15130F;
  border-color: rgba(255,255,255,0.14);
}
.auth-provider__icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
}
.auth-modal__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 500;
  color: #6B6760;
  margin: 6px 0 16px;
}
.auth-modal__divider::before,
.auth-modal__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}
.auth-modal__email {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
.auth-modal__input {
  width: 100%;
  padding: 13px 18px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  font-size: 14.5px;
  color: #F2EFE7;
  outline: none;
  font-family: inherit;
  transition: border-color 120ms, box-shadow 120ms;
}
.auth-modal__input::placeholder { color: #6B6760; }
.auth-modal__input:focus {
  border-color: rgba(255,255,255,0.4);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
}
.auth-modal__continue {
  width: 100%;
  padding: 13px 18px;
  background: #F2EFE7;
  color: #1A1814;
  border: 0;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 120ms;
}
.auth-modal__continue:hover { background: #fff; }
.auth-modal__continue:disabled {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.35);
  cursor: not-allowed;
}
.auth-modal__sso {
  display: block;
  margin: 0 auto;
  background: transparent;
  border: 0;
  color: #B8B2A4;
  font-size: 13.5px;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 4px 8px;
}
.auth-modal__sso:hover { color: #fff; }
.auth-modal__legal {
  margin-top: 18px;
  text-align: center;
  font-size: 11.5px;
  color: #6B6760;
  line-height: 1.5;
}
.auth-modal__legal a { color: #B8B2A4; text-decoration: underline; text-underline-offset: 2px; }
.auth-modal__legal a:hover { color: #fff; }

@media (max-width: 480px) {
  .auth-modal__card { padding: 28px 22px 22px; border-radius: 18px; }
  .auth-modal__title { font-size: 22px; }
}

/* Landing sign-in banner */
.landing__banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--text);
  margin-bottom: 32px;
  transition: all 120ms;
  cursor: pointer;
}
.landing__banner:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.landing__banner-icon { color: var(--text); display: grid; place-items: center; }
.landing__banner-icon svg { width: 14px; height: 14px; }
.landing__banner-text strong { font-weight: 600; }
.landing__banner-arrow { color: var(--text-muted); display: grid; place-items: center; }
.landing__banner-arrow svg { width: 14px; height: 14px; }
.rail__user-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.rail__user-text { flex: 1; min-width: 0; }
.rail__user-name { font-size: 13.5px; font-weight: 500; line-height: 1.2; }
.rail__user-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.rail__user-action {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  border-radius: 4px;
}
.rail__user-action:hover { background: var(--surface); color: var(--text); }
.rail__user-action svg { width: 14px; height: 14px; }

.jump {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
}
.jump:hover { color: var(--text); background: var(--bg-alt); }
.jump--active { color: var(--text); font-weight: 500; }
.jump--active::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.jump__num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-faint);
  width: 14px;
}
.jump--active .jump__num { color: var(--accent); }

/* === Main column === */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  position: relative;
}
.main__scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 32px 160px 32px;
  scroll-behavior: smooth;
}
.col {
  max-width: var(--content-max);
  margin: 0 auto;
  padding-top: 36px;
}

/* === Landing === */
.landing {
  max-width: 820px;
  margin: 0 auto;
  padding: 26vh 0 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* When the rail is collapsed, main flexes wider but its left edge is offset
   by the rail width. Use a dedicated animation that preserves a -rail-w/2
   translateX so the title + input stay centered on the true viewport center.
   (Can't use a static transform — .landing's fade-in animation resets it.) */
.app--collapsed .landing.fade-in {
  animation: fadeUpCentered 380ms ease-out both;
}
@keyframes fadeUpCentered {
  from { opacity: 0; transform: translate(calc(var(--rail-w) / -2), 6px); }
  to   { opacity: 1; transform: translate(calc(var(--rail-w) / -2), 0); }
}
.landing__title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0 0 36px;
  white-space: nowrap;
  text-align: center;
  color: var(--text);
}
.landing__input {
  width: 100%;
  max-width: 820px;
  position: relative;
}

/* === Search suggestion / recommendation panel === */
.search-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  z-index: 20;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
}
.search-panel__heading {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 16px 6px;
}
.search-panel__group {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  padding: 10px 16px 2px;
}
.search-panel__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 16px;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: background 150ms ease;
}
.search-panel__item:hover {
  background: rgba(0,0,0,0.04);
  transition: background 150ms ease;
}
.search-panel--minimal { padding: 4px 0; }
.search-panel__item-icon {
  color: var(--text-faint);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.search-panel__item-icon svg { width: 14px; height: 14px; }
.search-panel__item-text strong { font-weight: 600; }
.search-panel__divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* Quick action chips below input */
.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
}
.quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  color: var(--text);
  transition: all 120ms ease;
  font-weight: 400;
}
.quick-chip:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.quick-chip__icon {
  width: 16px; height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.quick-chip__icon svg { width: 16px; height: 16px; }

/* === Agent screen (Check symptoms etc.) === */
.agent {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 0 80px;
}
.agent__head {
  margin-bottom: 40px;
}
.agent__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin-bottom: 18px;
}
.agent__badge-icon { display: grid; place-items: center; }
.agent__badge-icon svg { width: 13px; height: 13px; }
.agent__title {
  font-size: 34px;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 14px;
}
.agent__sub {
  font-size: 15.5px;
  color: var(--text-muted);
  margin: 0;
  max-width: 600px;
  line-height: 1.55;
}

.agent__section {
  margin-bottom: 32px;
}
.agent__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  font-weight: 500;
}

.body-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.body-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: left;
  transition: all 120ms;
  cursor: pointer;
}
.body-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.body-card--active {
  border-color: var(--text);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--text);
}
.body-card__label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}
.body-card__sub {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.agent__input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 150ms, box-shadow 150ms;
}
.agent__input:focus-within {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px var(--bg-alt);
}
.agent__input .input__textarea {
  padding: 14px 16px;
  font-size: 15px;
}

.agent__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.agent__note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 420px;
}
.agent__note svg { width: 16px; height: 16px; color: var(--danger); flex-shrink: 0; margin-top: 1px; }
.agent__begin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px 11px 22px;
  background: var(--text);
  color: var(--bg);
  border: 0;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 120ms;
}
.agent__begin:hover:not(:disabled) { background: #2a2620; }
.agent__begin:disabled {
  background: var(--bg-alt);
  color: var(--text-faint);
  cursor: not-allowed;
}
.agent__begin svg { width: 15px; height: 15px; }

@media (max-width: 720px) {
  .body-grid { grid-template-columns: repeat(2, 1fr); }
  .agent__actions { flex-direction: column; align-items: stretch; }
}

/* === Search preferences (care profile) === */
.prefs {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 0 80px;
}
.prefs__head { margin-bottom: 40px; }
.prefs__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 18px;
}
.prefs__badge-icon { display: grid; place-items: center; color: var(--text-muted); }
.prefs__badge-icon svg { width: 13px; height: 13px; }
.prefs__title {
  font-size: 34px;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 14px;
}
.prefs__sub {
  font-size: 15.5px;
  color: var(--text-muted);
  margin: 0;
  max-width: 620px;
  line-height: 1.55;
}

.prefs__section { margin-bottom: 36px; }
.prefs__section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.prefs__section-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}
.prefs__section-title {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0;
}
.prefs__section-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.prefs__row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.prefs__row > * { flex: 1; min-width: 0; }
.prefs__field--grow { flex: 2; }

.prefs__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.prefs__field-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.005em;
}
.prefs__field-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.prefs__input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  outline: 0;
  transition: border-color 150ms, box-shadow 150ms;
}
.prefs__input:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px var(--bg-alt);
}
.prefs__input--textarea {
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
  line-height: 1.5;
}

.prefs__radio-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.prefs__radio {
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: all 120ms;
}
.prefs__radio:hover {
  border-color: var(--border-strong);
}
.prefs__radio--active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.prefs__chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.prefs__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: all 120ms;
}
.prefs__chip:hover {
  border-color: var(--border-strong);
}
.prefs__chip--active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.prefs__chip-check {
  display: grid;
  place-items: center;
}
.prefs__chip-check svg { width: 12px; height: 12px; }

.prefs__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}
.prefs__footer-note {
  font-size: 12.5px;
  color: var(--text-muted);
  max-width: 420px;
  line-height: 1.5;
}
.prefs__footer-actions {
  display: flex;
  gap: 8px;
}
.prefs__btn-secondary {
  padding: 10px 18px;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
}
.prefs__btn-secondary:hover { background: var(--bg-alt); }
.prefs__btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px 10px 16px;
  background: var(--text);
  color: var(--bg);
  border: 0;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
}
.prefs__btn-primary:hover { background: #2a2620; }
.prefs__btn-primary svg { width: 14px; height: 14px; }

@media (max-width: 720px) {
  .prefs__row { flex-direction: column; }
  .prefs__footer { flex-direction: column; align-items: stretch; }
  .prefs__footer-actions { justify-content: stretch; }
  .prefs__footer-actions > * { flex: 1; text-align: center; }
}

/* === Message === */
.message {
  margin-bottom: 56px;
  scroll-margin-top: 24px;
}
.message + .message { border-top: 1px solid var(--border); padding-top: 36px; }

.query {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 28px;
}

/* === Tabs === */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 14px;
  border: 0; background: transparent;
  font-size: 13.5px;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  font-weight: 500;
}
.tab:hover { color: var(--text); }
.tab--active { color: var(--text); border-bottom-color: var(--text); }
.tab__count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-faint);
  padding: 1px 5px;
  background: var(--bg-alt);
  border-radius: 4px;
}
.tab svg { width: 14px; height: 14px; }

/* === Answer body === */
.answer-block { margin-bottom: 36px; }

.summary {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 19px;
  line-height: 1.55;
  color: var(--text);
  letter-spacing: -0.005em;
}
.summary p { margin: 0 0 12px; }
.summary p:last-child { margin-bottom: 0; }

.cite {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 4px;
  margin: 0 1px;
  vertical-align: super;
  font-size: 9.5px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: all 100ms;
}
.cite:hover { background: var(--accent); color: white; border-color: var(--accent); }

/* === Section === */
.section {
  margin-bottom: 40px;
  scroll-margin-top: 24px;
}
.section__head {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 16px;
}
.section__num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}
.section__title {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0;
}

.section__body { font-size: 15.5px; line-height: 1.65; color: var(--text); }
.section__body p { margin: 0 0 12px; }

/* === Lists === */
.bullet-list { margin: 0; padding: 0; list-style: none; }
.bullet-list li {
  display: grid;
  grid-template-columns: minmax(0, 35%) 1fr;
  column-gap: 28px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.bullet-list li:first-child { padding-top: 0; }
.bullet-list li:last-child { border-bottom: 0; }
.bullet-list__label { font-weight: 500; min-width: 0; }
.bullet-list__desc { color: var(--text-muted); font-size: 15px; min-width: 0; }

/* Callout */
.callout {
  margin: 20px 0;
  padding: 14px 16px;
  background: var(--warm-soft);
  border: 1px solid oklch(0.86 0.05 45);
  border-radius: var(--radius-md);
  display: flex; gap: 12px;
  font-size: 14.5px;
}
.callout--danger {
  background: oklch(0.96 0.03 27);
  border-color: oklch(0.86 0.06 27);
}
.callout__icon { color: var(--warm); flex-shrink: 0; margin-top: 2px; width: 20px; height: 20px; display: grid; place-items: center; }
.callout__icon svg { width: 18px; height: 18px; }
.callout--danger .callout__icon { color: var(--danger); }
.callout__title { font-weight: 600; margin: 0 0 2px; }
.callout__body { color: var(--text-muted); }

/* === Provider carousel === */
.carousel {
  display: flex; gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 -32px 0 -32px;
  padding: 4px 32px;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.provider-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  transition: all 150ms;
}
.provider-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.provider-card__head { display: flex; gap: 12px; align-items: flex-start; }
.provider-photo {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--bg-alt);
  flex-shrink: 0;
  display: grid; place-items: center;
  border: 1px solid var(--border);
}
.provider-photo svg { width: 38px; height: 38px; color: var(--text-faint); }
.provider-card__name { font-weight: 500; margin: 0 0 2px; font-size: 15px; }
.provider-card__role { font-size: 13px; color: var(--text-muted); margin: 0; }
.provider-card__meta { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.meta-row { display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.meta-row svg { width: 13px; height: 13px; color: var(--text-faint); }
.meta-row strong { color: var(--text); font-weight: 500; }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.rating__stars { color: var(--warm); }
.rating__num { font-weight: 500; }
.rating__count { color: var(--text-faint); font-size: 12px; }

.provider-card__actions { display: flex; gap: 6px; margin-top: 4px; }
.btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
}
.btn:hover { background: var(--surface-2); }
.btn--primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn--primary:hover { background: #2a2620; }
.btn--accent {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn--accent:hover { background: #2a2620; }

/* Comparison table */
.compare-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
}
.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.compare th, .compare td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.compare th {
  font-weight: 500;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface-2);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.compare tbody tr:last-child td { border-bottom: 0; }
.compare__name { font-weight: 500; }
.compare__sub { color: var(--text-muted); font-size: 12.5px; margin-top: 2px; }
.tag {
  display: inline-block;
  padding: 2px 7px;
  font-size: 11.5px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}
.tag--neutral { background: var(--bg-alt); color: var(--text-muted); }

/* === Sources (compact horizontal card) === */
.sources-compact {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 28px 0 8px;
  transition: all 120ms;
}
.sources-compact:hover { border-color: var(--border-strong); }
.sources-compact__avatars {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding-right: 4px;
}
.sources-compact__fav {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px solid var(--surface);
  display: grid;
  place-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  position: relative;
}
.sources-compact__body {
  flex: 1;
  min-width: 0;
}
.sources-compact__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.sources-compact__desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.45;
}
.sources-compact__more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  padding: 4px 6px 4px 10px;
  border-radius: 6px;
  flex-shrink: 0;
}
.sources-compact__more:hover { background: var(--bg-alt); }
.sources-compact__caret {
  display: grid;
  place-items: center;
  transform: rotate(-90deg);
}
.sources-compact__caret svg { width: 14px; height: 14px; }

/* === Actions row (👍 👎 Copy Retry + disclaimer note) === */
.actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0 28px;
  padding: 0 2px;
}
.actions-row__buttons {
  display: flex;
  align-items: center;
  gap: 2px;
}
.action-btn {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 0;
  background: transparent;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 120ms;
}
.action-btn:hover { background: var(--bg-alt); color: var(--text); }
.action-btn--active { color: var(--text); background: var(--bg-alt); }
.action-btn svg { width: 16px; height: 16px; }

.actions-row__note {
  font-size: 12px;
  color: var(--text-faint);
}

/* === Suggested follow-ups (light, secondary) === */
.followups {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.followups__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  margin-bottom: 6px;
  background: transparent;
  border: 0;
  padding: 4px 0;
  cursor: pointer;
  transition: color 120ms;
}
.followups__label:hover { color: var(--text-muted); }
.followups__chevron {
  display: grid;
  place-items: center;
  transition: transform 160ms ease;
}
.followups__chevron svg { width: 12px; height: 12px; }
.followups.is-collapsed .followups__chevron { transform: rotate(-90deg); }
.followups.is-collapsed { margin-top: 16px; padding-top: 10px; }
.followups.is-collapsed .followups__label { margin-bottom: 0; }
.followups__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.followups__list[hidden] { display: none; }
.followups__list li {
  border-bottom: 1px dashed var(--border);
}
.followups__list li:last-child { border-bottom: none; }
.followup-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  padding: 9px 4px 9px 0;
  background: transparent;
  border: 0;
  font-size: 13.5px;
  color: var(--text-muted);
  text-align: left;
  cursor: pointer;
  transition: color 120ms;
}
.followup-link:hover { color: var(--text); }
.followup-link__icon {
  display: grid;
  place-items: center;
  color: var(--text-faint);
  flex-shrink: 0;
}
.followup-link__icon svg { width: 14px; height: 14px; }
.followup-link:hover .followup-link__icon { color: var(--text-muted); }

/* Section icon (if used) */
.section__head svg { width: 16px; height: 16px; color: var(--text-faint); }

.tab__count + svg, .tab svg { width: 14px; height: 14px; }

/* Tools icons */
.input__tools svg { width: 16px; height: 16px; }
.input__send svg { width: 16px; height: 16px; }
.btn svg { width: 14px; height: 14px; }
.meta-row svg { width: 13px; height: 13px; }
.provider-photo svg { width: 38px; height: 38px; }
.followup svg { width: 16px; height: 16px; }
.chip__icon svg { width: 14px; height: 14px; }
.category-card__icon svg { width: 18px; height: 18px; }
.landing__mark svg { width: 32px; height: 32px; }
.logo__mark svg { width: 16px; height: 16px; }
.icon-btn svg { width: 18px; height: 18px; }
.thinking svg { width: 14px; height: 14px; }
.rating__stars svg { width: 12px; height: 12px; }

/* === Input bar === */
.composer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 16px 32px 20px;
  background: #FFFFFF;
  pointer-events: none;
  z-index: 10;
}
.composer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  pointer-events: auto;
}
/* Soft, warm upward shadow so the floating composer lifts off the page as
   content scrolls behind it. Layered: a tight near-shadow for the edge plus
   a wider ambient one tinted by the warm off-white palette. */
.composer .input-shell {
  box-shadow:
    0 -1px 0 rgba(214, 208, 192, 0.45),
    0 -6px 16px rgba(122, 102, 64, 0.06),
    0 -18px 40px rgba(122, 102, 64, 0.05),
    0 2px 6px rgba(122, 102, 64, 0.04);
}
.composer .input-shell:focus-within {
  box-shadow:
    0 0 0 3px var(--bg-alt),
    0 -1px 0 rgba(214, 208, 192, 0.55),
    0 -8px 22px rgba(122, 102, 64, 0.08),
    0 -22px 48px rgba(122, 102, 64, 0.06),
    0 2px 6px rgba(122, 102, 64, 0.05);
}
.input__textarea-wrap {
  position: relative;
}

/* Deprecated — markup hooks removed when the tab row replaced them. */
.input__ghost,
.input__inline-chips,
.input__scope-chip,
.scope-pills { display: none !important; }

/* Category tabs — sit above the search input, with an underline indicator
   under the active tab. The first tab ("All") has no icon. */
.search-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  margin: -16px 0 18px;
  position: relative;
  z-index: 1;
}
.search-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 2px 8px;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 400;
  cursor: pointer;
  position: relative;
  transition: color 120ms;
}
.search-tab:hover { color: var(--text-muted); }
.search-tab__icon {
  display: grid;
  place-items: center;
  color: currentColor;
}
.search-tab__icon svg { width: 14px; height: 14px; }
.search-tab__label {
  padding-bottom: 1px;
  transition: color 120ms;
}
.search-tab--active {
  color: var(--text);
  font-weight: 500;
}
.search-tab--active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

/* Default suggestions list — shown below the input when the draft is empty.
   Visually matches the typeahead rows for continuity. */
.default-suggestions {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
}
.default-suggestions__item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--text);
  transition: background 120ms;
}
.default-suggestions__item:hover { background: var(--bg-alt); }
.default-suggestions__icon {
  display: grid;
  place-items: center;
  color: var(--text-faint);
}
.default-suggestions__icon svg { width: 16px; height: 16px; }
.default-suggestions__text { line-height: 1.3; }

/* Dropdown sits above the input baseline */
.search-panel--unboxed { position: relative; z-index: 2; }

/* Ghost-text completion overlay — visually completes the top suggestion in
   place, with a small Tab key affordance. Sits behind the textarea caret;
   the typed portion is transparent so the user's own text shows through. */
.input__ghost {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 10px 18px 2px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-faint);
  pointer-events: none;
  white-space: pre;
  overflow: hidden;
  display: flex;
  align-items: baseline;
  min-height: 36px;
}
.input-shell--large .input__ghost { padding: 14px 20px 2px; min-height: 44px; font-size: 15px; }
.input__ghost-typed { color: transparent; }
.input__ghost-rest { color: var(--text-faint); }
.input__ghost-key {
  margin-left: 10px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-alt);
  color: var(--text-muted);
  align-self: center;
  font-family: 'JetBrains Mono', monospace;
}

/* Inline prompt chips shown inside the input when a scope is picked but the
   draft is empty — replaces the dropdown for the empty-but-scoped state.
   Positioned absolutely over the placeholder area so the textarea doesn't
   add dead space above them; chips themselves stay clickable. */
.input__inline-chips {
  position: absolute;
  top: 10px;
  left: 14px;
  right: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  pointer-events: none;
  z-index: 2;
}
.input-shell--large .input__inline-chips { top: 14px; left: 16px; right: 16px; }
.input__inline-chip {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background 120ms, border-color 120ms, color 120ms;
}
.input__inline-chip:hover {
  background: var(--surface);
  border-color: var(--border-strong);
}
.input__ph-anim {
  position: absolute;
  top: 10px;
  left: 18px;
  right: 18px;
  pointer-events: none;
  font-size: 15px;
  color: var(--text-faint);
  line-height: 1.5;
  transition: opacity 300ms ease-in-out;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.input-shell--large .input__ph-anim { top: 14px; left: 20px; right: 20px; }

.input-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: border-color 150ms, box-shadow 150ms;
}
.input-shell:focus-within {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px var(--bg-alt), var(--shadow-sm);
}
.input-shell--large .input__textarea { min-height: 44px; padding: 14px 20px 2px; font-size: 15px; }
.input__textarea {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  resize: none;
  padding: 10px 18px 2px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
  min-height: 36px;
}
.input__textarea::placeholder { color: var(--text-faint); }
.input__row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 6px 6px 8px;
}
.input__tools { display: flex; align-items: center; gap: 0; color: var(--text-muted); }
.input__tools .icon-btn { width: 32px; height: 32px; }
.input__tools .icon-btn svg { width: 17px; height: 17px; }
.icon-btn.icon-btn--active { background: var(--bg-alt); color: var(--text); }

/* Scope chip inside toolbar */
.input__scope-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  padding: 4px 6px 4px 10px;
  height: 28px;
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  border-radius: 999px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  transition: background-color 120ms, border-color 120ms;
}
.input__scope-chip:hover { background: oklch(0.94 0.025 175); }
.input__scope-chip-icon { display: grid; place-items: center; }
.input__scope-chip-icon svg { width: 14px; height: 14px; }
.input__scope-chip-x {
  display: grid;
  place-items: center;
  width: 18px; height: 18px;
  border-radius: 999px;
  color: var(--accent);
  opacity: 0.7;
}
.input__scope-chip-x svg { width: 11px; height: 11px; }
.input__scope-chip:hover .input__scope-chip-x { opacity: 1; }

/* Scope pills row (below input shell on landing) */
.scope-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.scope-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  transition: border-color 120ms, background-color 120ms, color 120ms;
}
.scope-pill:hover {
  border-color: var(--border-strong);
  background: var(--bg-alt);
}
.scope-pill__icon { display: grid; place-items: center; color: var(--text-muted); }
.scope-pill__icon svg { width: 15px; height: 15px; }
.scope-pill__label { font-weight: 500; }

/* Unboxed search panel \u2014 used when showing scope-filtered recs in flow */
.search-panel--unboxed {
  position: static;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin-top: 8px;
  padding: 4px 0;
  width: 100%;
  display: block;
}
.search-panel--unboxed .search-panel__item { width: 100%; }
.search-panel--unboxed .search-panel__item-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === Typeahead variant (clean inline list under the input) === */
.search-panel--typeahead.search-panel--unboxed {
  margin-top: 4px;
  padding: 6px 0 2px;
}
.search-panel--typeahead .search-panel__item {
  padding: 9px 12px 9px 6px;
  border-radius: 8px;
  font-size: 15px;
  gap: 12px;
}
.search-panel--typeahead .search-panel__item:hover { background: var(--bg-alt); }
.search-panel--typeahead .search-panel__item:hover .search-panel__cat { color: var(--text-muted); }
.search-panel--typeahead .search-panel__item-icon { color: var(--text-muted); }
.search-panel--typeahead .search-panel__item-icon svg { width: 16px; height: 16px; }
.search-panel--typeahead .search-panel__item-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-panel__match { color: var(--text-muted); font-weight: 400; }
.search-panel__rest  { color: var(--text); font-weight: 500; }

/* Right-aligned category label (e.g. "Doctor", "Condition") */
.search-panel__cat {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}
.search-panel__cat--scope {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 500;
}
.search-panel__cat-icon { display: inline-flex; align-items: center; color: var(--text-muted); }
.search-panel__cat-icon svg { width: 12px; height: 12px; }

/* Pinned "Search 'query' in [Scope]" row — explicit escape hatch */
.search-panel__item--pinned {
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  margin: 0 0 4px;
  padding-bottom: 11px;
}
.search-panel__item--pinned .search-panel__item-text { color: var(--text); }
.search-panel__pinned-q { font-style: italic; color: var(--text); }

/* === Scoped variant (header + category pills + suggestions) === */
.search-panel--scoped.search-panel--unboxed {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-top: 10px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.04);
}
.search-panel__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.search-panel__header-icon { display: grid; place-items: center; color: var(--text-muted); }
.search-panel__header-icon svg { width: 15px; height: 15px; }

.search-panel__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 14px 6px;
}
.search-panel__pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  color: var(--text-muted);
  font-family: inherit;
  cursor: pointer;
  transition: background-color 120ms, color 120ms, border-color 120ms;
}
.search-panel__pill:hover { background: var(--bg-alt); color: var(--text); }
.search-panel__pill--active {
  background: var(--bg-alt);
  border-color: var(--border-strong);
  color: var(--text);
  font-weight: 500;
}
.search-panel__pill-icon { display: grid; place-items: center; }
.search-panel__pill-icon svg { width: 14px; height: 14px; }

.search-panel__items { padding: 6px 6px 10px; }
.search-panel__item--scoped {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14.5px;
  color: var(--text);
}
.search-panel__item--scoped:hover { background: var(--bg-alt); }

.input__right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.input__mode-wrap { position: relative; }
.input__mode {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 4px 6px 10px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
  cursor: pointer;
}
.input__mode:hover,
.input__mode--open { background: var(--bg-alt); color: var(--text); }
.input__mode-caret { display: grid; place-items: center; }
.input__mode-caret svg { width: 14px; height: 14px; }
.input__mode-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  min-width: 200px;
  z-index: 30;
  overflow: hidden;
  padding: 3px;
}
.input__mode-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  border-radius: 7px;
  text-align: left;
  cursor: pointer;
  gap: 1px;
}
.input__mode-item:hover { background: var(--bg-alt); }
.input__mode-item-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.input__mode-item--active .input__mode-item-label { color: var(--accent); }
.input__mode-item-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* "+" add menu in the input toolbar — opens upward, anchored left */
.input__add-wrap { position: relative; display: inline-flex; }
.icon-btn--open { background: var(--bg-alt); color: var(--text); }
.input__add-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08), 0 8px 24px -8px rgba(0,0,0,0.12);
  min-width: 220px;
  z-index: 30;
  overflow: hidden;
  padding: 4px;
  animation: menuPop 140ms ease-out;
  transform-origin: bottom left;
}
.input__add-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  background: transparent;
  border-radius: 7px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}
.input__add-item:hover { background: var(--bg-alt); }
.input__add-item-icon {
  display: grid; place-items: center;
  width: 18px; height: 18px;
  color: var(--text-muted);
  flex: 0 0 18px;
}
.input__add-item-icon svg { width: 16px; height: 16px; }
.input__add-item-label { font-size: 13.5px; color: var(--text); }
.input__add-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 2px;
}
.input__add-section {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  padding: 6px 10px 4px;
}

/* Attachment chips above the input row */
.input__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 4px 2px;
}
.input__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px 4px 10px;
  font-size: 12.5px;
  color: var(--text);
  max-width: 220px;
}
.input__chip-icon {
  display: grid; place-items: center;
  color: var(--text-muted);
  flex: 0 0 14px;
}
.input__chip-icon svg { width: 14px; height: 14px; }
.input__chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.input__chip-x {
  display: grid; place-items: center;
  width: 18px; height: 18px;
  border: 0;
  background: transparent;
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  flex: 0 0 18px;
}
.input__chip-x:hover { background: rgba(0,0,0,0.06); color: var(--text); }
.input__chip-x svg { width: 12px; height: 12px; }

.input__send {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 6px;
  background: var(--bg-alt);
  color: var(--text-muted);
  transition: all 120ms;
}
.input__send:disabled { background: var(--bg-alt); color: var(--text-faint); cursor: not-allowed; }
.input__send:not(:disabled) { background: oklch(0.78 0.04 80); color: var(--text); }
.input__send:not(:disabled):hover { background: oklch(0.72 0.05 80); }
.input__send svg { width: 14px; height: 14px; }

/* === Streaming === */
.streaming-pulse {
  display: inline-block;
  width: 9px; height: 16px;
  background: var(--accent);
  border-radius: 2px;
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.thinking {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0;
  font-size: 14px;
  color: var(--text-muted);
}
.thinking__dots { display: flex; gap: 3px; }
.thinking__dots span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: dot 1.4s infinite ease-in-out;
}
.thinking__dots span:nth-child(2) { animation-delay: 0.16s; }
.thinking__dots span:nth-child(3) { animation-delay: 0.32s; }
@keyframes dot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

.fade-in {
  animation: fadeUp 380ms ease-out both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Landing intro — staged first-load entrance === */
@keyframes introRise      { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes introRiseSmall { from { opacity: 0; transform: translateY(6px); }  to { opacity: 1; transform: translateY(0); } }

.landing.landing--intro                { animation: none; }
.landing--intro .landing__title        { animation: introRise      600ms cubic-bezier(0.2, 0.7, 0.2, 1) 0ms    both; }
.landing--intro .landing__banner       { animation: introRiseSmall 520ms cubic-bezier(0.2, 0.7, 0.2, 1) 1400ms both; }
.landing--intro .search-tabs           { animation: introRiseSmall 520ms cubic-bezier(0.2, 0.7, 0.2, 1) 1400ms both; }
.landing--intro .landing__input        { animation: introRiseSmall 520ms cubic-bezier(0.2, 0.7, 0.2, 1) 1550ms both; }
.landing--intro .default-suggestions   { animation: introRiseSmall 480ms cubic-bezier(0.2, 0.7, 0.2, 1) 1700ms both; }
.landing--intro .scope-tags            { animation: introRiseSmall 480ms cubic-bezier(0.2, 0.7, 0.2, 1) 1700ms both; }

/* Chrome around the landing — rail + persona header rise with the search input */
.app--intro .rail,
.app--intro .landing-header            { animation: introRiseSmall 520ms cubic-bezier(0.2, 0.7, 0.2, 1) 1550ms both; }

/* Collapsed-rail variant: replace the fadeUpCentered animation with a static
   transform so per-child intros aren't reset by a wrapper animation. */
.app--collapsed .landing.landing--intro {
  animation: none;
  transform: translateX(calc(var(--rail-w) / -2));
}

@media (prefers-reduced-motion: reduce) {
  .landing--intro, .landing--intro *,
  .app--intro .rail, .app--intro .landing-header { animation: none !important; }
}

.shimmer {
  background: linear-gradient(
    90deg,
    var(--bg-alt) 0%,
    var(--surface-2) 50%,
    var(--bg-alt) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
  border-radius: 4px;
  height: 14px;
}
.shimmer + .shimmer { margin-top: 8px; }
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* === Status pills === */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px;
  font-size: 11.5px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  background: var(--accent-soft);
  color: var(--accent);
}
.pill__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--ok { background: oklch(0.95 0.05 145); color: oklch(0.42 0.1 145); }
.pill--neutral { background: var(--bg-alt); color: var(--text-muted); }
.pill--accent { background: var(--accent-soft); color: var(--accent); }

/* Tweaks toggle slot adjustments */
.tweaks-toggle { z-index: 100; }

@media (max-width: 900px) {
  :root { --rail-w: 0px; }
  .app { grid-template-columns: 1fr; height: 100vh; }
  .rail { display: none; }
  .main__scroll { padding: 24px 18px 160px; }
  .composer { padding: 14px 18px 18px; }
  .landing__title { font-size: 28px; }
  .query { font-size: 22px; }
  .landing__categories { grid-template-columns: 1fr; }
}

/* === Timeline stepper === */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline__step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding-bottom: 24px;
  position: relative;
}
.timeline__step:not(:last-child) .timeline__rail::after {
  content: '';
  position: absolute;
  top: 36px; bottom: -8px; left: 50%;
  width: 1.5px;
  background: var(--border-strong);
  transform: translateX(-50%);
}
.timeline__rail {
  position: relative;
  display: flex;
  justify-content: center;
}
.timeline__dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  display: grid; place-items: center;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  z-index: 1;
}
.timeline__when {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4px;
  font-weight: 500;
}
.timeline__title {
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.timeline__detail { color: var(--text-muted); font-size: 14.5px; line-height: 1.55; }
.timeline__list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: flex; flex-direction: column; gap: 6px;
}
.timeline__list li {
  position: relative;
  padding: 6px 12px 6px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
}
.timeline__list li::before {
  content: '';
  position: absolute;
  left: 12px; top: 50%;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%);
}

/* === Coverage card === */
.coverage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.coverage__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.coverage__plan-name {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-top: 2px;
}
.coverage__status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
}
.coverage__status svg { width: 16px; height: 16px; }
.coverage__status--ok {
  background: oklch(0.95 0.05 145);
  color: oklch(0.42 0.1 145);
  border: 1px solid oklch(0.85 0.07 145);
}
.coverage__status--no {
  background: oklch(0.96 0.03 27);
  color: var(--danger);
  border: 1px solid oklch(0.86 0.06 27);
}
.coverage__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  border-bottom: 1px solid var(--border);
}
.coverage__stat {
  padding: 16px 20px;
  border-right: 1px solid var(--border);
}
.coverage__stat:last-child { border-right: 0; }
.coverage__stat-label {
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 6px;
}
.coverage__stat-value {
  font-size: 26px;
  font-weight: 400;
  font-family: 'Source Serif 4', Georgia, serif;
  letter-spacing: -0.02em;
  line-height: 1;
}
.coverage__stat-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}
.coverage__network {
  padding: 14px 20px;
  display: flex; align-items: center; gap: 12px;
}

/* === Urgent care list === */
.urgent-list { display: flex; flex-direction: column; gap: 12px; }
.urgent-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 140px;
  grid-template-rows: auto auto;
  gap: 14px 18px;
}
.urgent-card__main { grid-column: 1; grid-row: 1; }
.urgent-card__chart { grid-column: 2; grid-row: 1 / span 2; align-self: stretch; }
.urgent-card__actions { grid-column: 1; grid-row: 2; display: flex; gap: 6px; }
.urgent-card--compact { grid-template-columns: 1fr; }
.urgent-card--compact .urgent-card__chart { display: none; }
.urgent-card__head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.urgent-card__name { font-size: 16px; font-weight: 500; margin: 0; letter-spacing: -0.01em; }
.urgent-card__meta { display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.urgent-card__chart {
  display: flex; flex-direction: column; gap: 4px;
  padding: 8px 10px;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.urgent-card__chart-label {
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}
.urgent-bars {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 50px;
  margin-top: 4px;
}
.urgent-bar {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  position: relative;
}
.urgent-bar__fill {
  width: 100%;
  background: var(--border-strong);
  border-radius: 1.5px;
  min-height: 2px;
}
.urgent-bar--now .urgent-bar__fill { background: var(--accent); }
.urgent-bar--now::after {
  content: '';
  position: absolute;
  top: -6px; left: 50%;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
}
.urgent-card__chart-axis {
  display: flex; justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--text-faint);
}

/* === Provider hero === */
.prov-hero { display: flex; flex-direction: column; gap: 10px; }
.prov-hero__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: grid;
  grid-template-columns: 64px 1fr 140px;
  gap: 16px;
  align-items: flex-start;
}
.prov-hero__card--featured {
  border-color: var(--border-strong);
  background: var(--surface);
}
.prov-hero__photo {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  display: grid; place-items: center;
}
.prov-hero__photo svg { width: 40px; height: 40px; color: var(--text-faint); }
.prov-hero__name {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 2px;
}
.prov-hero__role { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.prov-hero__row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.prov-hero__dot { color: var(--text-faint); }
.prov-hero__avail {
  display: flex; flex-direction: column; gap: 6px;
}
.prov-hero__slots { display: flex; gap: 6px; flex-wrap: wrap; }
.prov-hero__slot {
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
}
.prov-hero__slot:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.prov-hero__slot--more { background: transparent; border-style: dashed; color: var(--text-muted); }
.prov-hero__actions { display: flex; flex-direction: column; gap: 6px; }

@media (max-width: 720px) {
  .prov-hero__card { grid-template-columns: 1fr; }
  .prov-hero__actions { flex-direction: row; }
  .urgent-card { grid-template-columns: 1fr; }
  .urgent-card__chart { grid-column: 1; grid-row: auto; height: 80px; }
  .coverage__grid { grid-template-columns: repeat(2, 1fr); }
  .coverage__stat { border-bottom: 1px solid var(--border); }
}

/* === Inline tab hint (Refine / Sign in) — for low/gated confidence === */
.inline-tab__hint {
  font-size: 10.5px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-faint);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  font-weight: 400;
  line-height: 1.4;
}
.inline-tab--active .inline-tab__hint { color: var(--text-muted); }
.inline-tab--soft .inline-tab__label { color: var(--text-faint); }
.inline-tab--soft.inline-tab--active .inline-tab__label { color: var(--text); }

/* === Sources subhead (per-tab caption) === */
.sources-compact__title-sub {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  font-size: 11px;
  color: var(--text-faint);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  margin-left: 6px;
}

/* === Tab refinement state === */
.tab-refine {
  margin: 26px 0 8px;
  padding: 24px 24px 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.tab-refine__head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 11.5px;
  font-family: 'JetBrains Mono', monospace;
  text-transform: lowercase;
  letter-spacing: 0.04em;
}
.tab-refine__icon { display: grid; place-items: center; color: var(--text); }
.tab-refine__icon svg { width: 13px; height: 13px; }
.tab-refine__title {
  margin: 14px 0 6px;
  font-family: 'Source Serif 4', serif;
  font-weight: 500;
  font-size: 22px;
  line-height: 1.25;
  color: var(--text);
  letter-spacing: -0.005em;
}
.tab-refine__body {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.55;
  max-width: 62ch;
}
.tab-refine__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tab-refine__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: all 120ms;
}
.tab-refine__chip:hover { border-color: var(--text); background: var(--surface); }
.tab-refine__chip-plus {
  display: grid;
  place-items: center;
  color: var(--text-faint);
}
.tab-refine__chip-plus svg { width: 13px; height: 13px; }

/* === Appointment slot cards === */
.slots { margin: 4px 0; }
.slots__gate {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-alt);
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.slots__gate-icon {
  display: grid; place-items: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  flex-shrink: 0;
}
.slots__gate-icon svg { width: 14px; height: 14px; }
.slots__gate-text { flex: 1; }
.slots__gate-text strong { color: var(--text); font-weight: 500; }
.slots__gate-btn {
  flex-shrink: 0;
  padding: 7px 14px;
  border: 1px solid var(--text);
  background: var(--text);
  color: var(--bg);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.slots__gate-btn:hover { opacity: 0.85; }

.slots__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 1100px) {
  .slots__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .slots__gate { flex-wrap: wrap; }
}
.slot {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color 120ms, background 120ms;
}
.slot:hover { border-color: var(--border-strong); background: var(--bg); }
.slot__when {
  display: flex;
  flex-direction: column;
  padding-right: 14px;
  border-right: 1px solid var(--border);
}
.slot__when-day {
  font-size: 10.5px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.slot__when-time {
  font-family: 'Source Serif 4', serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-top: 1px;
  line-height: 1.1;
}
.slot__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.slot__loc {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slot__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 0;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.3;
}
.slot__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.slot__meta-item svg { width: 12px; height: 12px; color: var(--text-faint); flex-shrink: 0; }
.slot__meta-item--muted { color: var(--text-faint); }
.slot__meta-dot { color: var(--text-faint); margin: 0 8px; }
.slot__cta {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--text);
  background: var(--text);
  color: var(--bg);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 120ms;
  white-space: nowrap;
  flex-shrink: 0;
}
.slot__cta:hover { opacity: 0.86; }
.slot__cta svg { width: 13px; height: 13px; }
.slot__cta--gated {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border-strong);
  border-style: dashed;
}
.slot__cta--gated:hover { background: var(--surface); border-style: solid; opacity: 1; }
.slot--gated { background: var(--bg); }
.slot--gated .slot__when-time { color: var(--text-muted); }

/* Live (not gated) banner — informational only */
.slots__live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 10px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--bg-alt);
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}
.slots__live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: oklch(0.62 0.14 145);
  box-shadow: 0 0 0 3px oklch(0.62 0.14 145 / 0.18);
  flex-shrink: 0;
  animation: livePulse 1.8s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 3px oklch(0.62 0.14 145 / 0.18); }
  50%      { box-shadow: 0 0 0 6px oklch(0.62 0.14 145 / 0.04); }
}

/* === Page results (Pages tab — site-search list) === */
.page-results {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.page-result {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 0 16px;
  border-bottom: 1px solid var(--border);
}
.page-result:last-child { border-bottom: none; padding-bottom: 0; }
.page-result__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}
.page-result__kind { color: var(--text-muted); white-space: nowrap; }
.page-result__sep { opacity: 0.5; }
.page-result__url { color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.page-result__title {
  font-family: 'Source Serif 4', serif;
  font-size: 19px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin-top: 2px;
}
.page-result__title:hover { text-decoration: underline; text-underline-offset: 3px; }
.page-result__snippet {
  margin: 4px 0 0;
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 70ch;
}
.page-result__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-faint);
}
.page-result__meta-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.page-result__meta-item:not(:last-child)::after {
  content: '·';
  margin: 0 8px;
  color: var(--text-faint);
  opacity: 0.6;
}

/* === Inline citation popover === */
.cite-pop {
  position: fixed;
  z-index: 100;
  width: 320px;
  padding: 14px 14px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 36px -12px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.05);
  font-size: 13px;
  color: var(--text);
  animation: citePopIn 140ms ease-out;
}
@keyframes citePopIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cite-pop__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.cite-pop__num {
  display: inline-grid;
  place-items: center;
  width: 20px; height: 20px;
  background: var(--text);
  color: var(--bg);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  flex-shrink: 0;
}
.cite-pop__source {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cite-pop__close {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: transparent;
  border: 0;
  display: grid;
  place-items: center;
  color: var(--text-faint);
  cursor: pointer;
  flex-shrink: 0;
}
.cite-pop__close:hover { background: var(--bg-alt); color: var(--text); }
.cite-pop__close svg { width: 12px; height: 12px; }
.cite-pop__title {
  font-family: 'Source Serif 4', serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--text);
  margin-bottom: 8px;
}
.cite-pop__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-faint);
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.cite-pop__open {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
}
.cite-pop__open:hover { color: var(--text); }

/* === Care profile === */
.care-profile {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 40px 20px 80px;
}
.care-profile__head { margin-bottom: 32px; }
.care-profile__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.care-profile__badge svg { width: 13px; height: 13px; }
.care-profile__title {
  font-family: 'Source Serif 4', serif;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 12px;
}
.care-profile__sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  max-width: 580px;
}

/* Completion banner */
.completion {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 28px;
}
.completion__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.completion__label { font-size: 13px; font-weight: 500; color: var(--text); }
.completion__pct { font-size: 13px; font-weight: 600; color: var(--accent); font-family: 'JetBrains Mono', monospace; }
.completion__bar {
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 12px;
}
.completion__fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}
.completion__hints { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.completion__hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  padding: 2px 0;
  cursor: pointer;
  text-align: left;
}
.completion__hint:hover { color: var(--text); }
.completion__plus { display: grid; place-items: center; color: var(--accent); }
.completion__plus svg { width: 12px; height: 12px; }

/* Tab nav */
.care-profile__tabnav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  padding-bottom: 0;
}
.ptab-btn {
  background: transparent;
  border: 0;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: pointer;
  position: relative;
  transition: color 0.15s;
}
.ptab-btn:hover { color: var(--text); background: var(--bg-alt); }
.ptab-btn--active {
  color: var(--text);
}
.ptab-btn--active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--text);
  border-radius: var(--radius-pill);
}

/* Tab body */
.ptab { padding-top: 4px; }
.ptab__helper {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding: 12px 14px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.ptab__notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.ptab__notice svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; color: var(--accent-2); }

/* Profile read-only rows */
.prow-grid { display: flex; flex-direction: column; gap: 0; }
.prow {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.prow:last-child { border-bottom: 0; }
.prow__label {
  font-size: 13px;
  color: var(--text-muted);
  flex: 0 0 180px;
}
.prow__value { font-size: 14px; color: var(--text); }
.prow__value--empty { color: var(--text-faint); font-style: italic; }

/* Form layout */
.pform { display: flex; flex-direction: column; gap: 20px; }
.pform__row { display: flex; gap: 16px; }
.pform__row > * { flex: 1; min-width: 0; }

/* Field components */
.pfield {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pfield--row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.pfield--row:last-child { border-bottom: 0; }
.pfield__text { flex: 1; min-width: 0; }
.pfield__hint {
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.4;
}
.pf-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.pf-badge {
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 400;
  text-transform: uppercase;
}
.pf-badge--req {
  background: oklch(0.94 0.04 27);
  color: oklch(0.45 0.13 27);
}
.pf-badge--opt {
  background: var(--bg-alt);
  color: var(--text-faint);
}

/* Inputs */
.pinput {
  width: 100%;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.pinput:focus { border-color: var(--accent-2); box-shadow: 0 0 0 2px var(--accent-soft); }
.pinput--ta { resize: vertical; min-height: 72px; line-height: 1.5; }

/* Radios */
.pradio-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}
.pradio-row--wrap { flex-wrap: wrap; }
.pradio {
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.pradio:hover { border-color: var(--text-faint); color: var(--text); }
.pradio--on {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

/* Chips */
.pchip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.pchip:hover { border-color: var(--text-faint); color: var(--text); }
.pchip--on { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent); }
.pchip__check { display: grid; place-items: center; }
.pchip__check svg { width: 11px; height: 11px; }

/* Toggle */
.ptoggle {
  flex-shrink: 0;
  width: 40px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
  border: 0;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
  padding: 0;
}
.ptoggle--on { background: var(--accent); }
.ptoggle__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  transition: transform 0.2s;
  display: block;
}
.ptoggle--on .ptoggle__knob { transform: translateX(18px); }

/* Tab toolbar */
.tab-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 20px;
}
.tab-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}
.tab-edit-btn:hover { background: var(--bg-alt); color: var(--text); border-color: var(--border-strong); }
.tab-edit-btn svg { width: 13px; height: 13px; }

/* Insurance status */
.ins-status-row { margin-bottom: 16px; }
.ins-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
}
.ins-badge svg { width: 13px; height: 13px; }
.ins-badge--ok { background: oklch(0.93 0.04 145); color: oklch(0.36 0.1 145); }
.ins-badge--warn { background: var(--warm-soft); color: var(--warm); }
.ins-badge--neutral { background: var(--bg-alt); color: var(--text-muted); }

/* Upload button */
.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.upload-btn:hover { border-color: var(--accent-border); color: var(--accent); background: var(--accent-soft); }
.upload-btn svg { width: 14px; height: 14px; }

/* Privacy tab */
.privacy-block { padding: 20px 0; border-bottom: 1px solid var(--border); }
.privacy-block--last { border-bottom: 0; }
.privacy-block__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 10px;
}
.privacy-block__body { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin: 0; }
.privacy-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.privacy-list li { padding-left: 12px; position: relative; }
.privacy-list li::before { content: '–'; position: absolute; left: 0; color: var(--text-faint); }
.privacy-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.privacy-btn--danger { color: var(--danger) !important; border-color: oklch(0.88 0.05 27) !important; }
.privacy-btn--danger:hover { background: oklch(0.96 0.02 27) !important; }

/* Account profile */
.account-id {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.account-id__avatar {
  width: 56px; height: 56px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  display: grid; place-items: center;
  font-weight: 500;
  font-size: 18px;
  flex-shrink: 0;
}
.account-id__text { flex: 1; min-width: 0; }
.account-id__name {
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
}
.account-id__email { font-size: 13.5px; color: var(--text-muted); }

.account-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.account-row:last-child { border-bottom: 0; }
.account-row__text { flex: 1; min-width: 0; }
.account-row__label { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 2px; }
.account-row__hint { font-size: 12.5px; color: var(--text-muted); }

.pform__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

/* Prefs additions for new SearchPreferences */
.prefs__field--row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.prefs__field--row:last-child { border-bottom: 0; }
.prefs__field--row .prefs__field-label { margin-bottom: 0; }
.prefs__link {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: inherit;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}
.prefs__link:hover { color: var(--accent-2); }

@media (max-width: 640px) {
  .pform__row { flex-direction: column; }
  .prow__label { flex: 0 0 120px; }
  .care-profile { padding: 24px 16px 60px; }
}

/* === Instruction cards (colonoscopy / procedure prep) === */
.instr-cards { display: flex; flex-direction: column; gap: 12px; }
.instr-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.instr-card__title {
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.instr-card__body { padding: 14px 16px; }
.instr-card__list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 7px;
}
.instr-card__list li {
  font-size: 13px;
  color: var(--text-muted);
  padding-left: 14px;
  position: relative;
  line-height: 1.45;
}
.instr-card__list li::before { content: '–'; position: absolute; left: 0; color: var(--text-faint); }
.instr-card__prose { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin: 0; }

/* Q&A two-column list */
.qa-list { display: flex; flex-direction: column; }
.qa-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 28px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.qa-row:last-child { border-bottom: 0; }
.qa-row__q { font-size: 14px; font-weight: 500; color: var(--text); }
.qa-row__a { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
@media (max-width: 560px) {
  .qa-row { grid-template-columns: 1fr; gap: 4px; }
}

/* === Procedure location cards === */
.proc-locs { display: flex; flex-direction: column; gap: 12px; }
.proc-loc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.proc-loc__main { flex: 1; min-width: 0; }
.proc-loc__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}
.proc-loc__meta { display: flex; flex-direction: column; gap: 5px; }
.proc-loc__actions { display: flex; flex-direction: column; gap: 7px; flex-shrink: 0; }
.proc-loc__note {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 14px;
  font-style: italic;
}
@media (max-width: 600px) {
  .proc-loc { flex-direction: column; }
  .proc-loc__actions { flex-direction: row; }
}
.cite-pop__open svg { width: 11px; height: 11px; }

/* === Benefit steps (PT coverage — How to use) === */
.coverage-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
  line-height: 1.5;
}
.benefit-steps {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.benefit-step {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.benefit-step:last-of-type { border-bottom: 0; }
.benefit-step__body { flex: 1; min-width: 0; }
.benefit-step__title { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 4px; }
.benefit-step__copy { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.benefit-step__cta { flex-shrink: 0; align-self: center; }
.benefit-step__note {
  font-size: 12px;
  color: var(--text-faint);
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  line-height: 1.5;
}
@media (max-width: 560px) {
  .benefit-step { flex-direction: column; gap: 10px; }
  .benefit-step__cta { align-self: flex-start; }
}

/* ============================================================ */
/* === Saved + Projects ======================================= */
/* ============================================================ */

/* Page wrapper — matches the width/padding of other agent pages */
.saved-page, .projects-page, .project-detail {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 20px 24px 80px;
  width: 100%;
}

.saved-page__head, .projects-page__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.saved-page__title, .projects-page__title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 28px;
  font-weight: 500;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.saved-page__subtitle, .projects-page__subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* Saved tabs */
.saved-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.saved-tabs__btn {
  background: transparent;
  border: 0;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 120ms, border-color 120ms;
}
.saved-tabs__btn:hover { color: var(--text); }
.saved-tabs__btn--active {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* Section blocks */
.saved-section, .project-section { margin-bottom: 28px; }
.saved-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.saved-section__title, .project-section__title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.saved-section__count {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: 1px 7px;
  border-radius: var(--radius-pill);
}
.saved-section__seeall {
  background: transparent;
  border: 0;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
}
.saved-section__seeall:hover { color: var(--text); }

/* Card grids */
.saved-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

/* Saved card — extends .provider-card with hover unsave + foot */
.saved-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: box-shadow 140ms, border-color 140ms, transform 140ms;
}
.saved-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.saved-card--provider { display: flex; flex-direction: column; gap: 10px; }

.saved-card__unsave {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 120ms, color 120ms, background 120ms;
  z-index: 2;
  padding: 0;
}
.saved-card:hover .saved-card__unsave,
.saved-page-row:hover .saved-card__unsave,
.saved-chat-row:hover .saved-card__unsave {
  opacity: 1;
}
.saved-card__unsave:hover { color: var(--danger); background: var(--bg-alt); }
.saved-card__unsave svg { width: 14px; height: 14px; }
.saved-card__unsave--static { opacity: 1; }

.saved-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
}
.saved-card__foot--inline {
  border-top: 0;
  padding-top: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.saved-card__when { font-size: 12px; color: var(--text-faint); }

/* Project chip — appears on saved cards that belong to a project */
.project-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px 10px 3px 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 120ms, color 120ms, border-color 120ms;
  max-width: 100%;
}
.project-chip:hover { color: var(--text); border-color: var(--border-strong); }
.project-chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
  flex-shrink: 0;
}
.project-chip__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.project-chip--warm     .project-chip__dot { background: var(--warm); }
.project-chip--accent   .project-chip__dot { background: var(--accent); }
.project-chip--accent-2 .project-chip__dot { background: var(--accent-2); }
.project-chip--neutral  .project-chip__dot { background: var(--text-faint); }

/* Saved pages — site-search style list */
.saved-pages-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.saved-page-row {
  position: relative;
  padding: 14px 44px 14px 16px;
  border-radius: var(--radius-md);
  transition: background 120ms;
}
.saved-page-row:hover { background: var(--surface-2); }
.saved-page-row + .saved-page-row { border-top: 1px solid var(--border); border-radius: 0; }
.saved-page-row .saved-card__foot--inline { gap: 10px; }

/* Saved chats list */
.saved-chats-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.saved-chat-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 44px 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: border-color 120ms, background 120ms;
}
.saved-chat-row:hover { border-color: var(--border-strong); background: var(--surface-2); }
.saved-chat-row__icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  color: var(--text-muted);
  flex-shrink: 0;
}
.saved-chat-row__icon svg { width: 16px; height: 16px; }
.saved-chat-row__body { min-width: 0; flex: 1; }
.saved-chat-row__query {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
}

/* ============================================================ */
/* === Projects =============================================== */
/* ============================================================ */

.projects-page__new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.projects-page__new svg { width: 16px; height: 16px; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: border-color 140ms, box-shadow 140ms, transform 140ms;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.project-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.project-card--featured {
  margin-bottom: 18px;
  padding: 22px;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
}

.project-card__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.project-card__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  background: var(--bg-alt);
  color: var(--text);
}
.project-card__icon svg { width: 22px; height: 22px; }
.project-card__icon--warm     { background: var(--warm-soft);     color: var(--warm); }
.project-card__icon--accent   { background: var(--accent-soft);   color: var(--accent); }
.project-card__icon--accent-2 { background: var(--accent-soft);   color: var(--accent-2); }
.project-card__icon--neutral  { background: var(--bg-alt);        color: var(--text-muted); }

.project-card__featured-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--warm);
  background: var(--warm-soft);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-bottom: 6px;
}

.project-card__name {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 19px;
  font-weight: 500;
  margin: 0 0 6px;
  letter-spacing: -0.005em;
}
.project-card--featured .project-card__name { font-size: 22px; }
.project-card__summary {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.project-card__dates {
  display: flex;
  gap: 14px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.project-keydate { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.project-keydate__date {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.project-keydate__label {
  font-size: 12px;
  color: var(--text-muted);
}

.project-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  gap: 12px;
}
.project-card__meta { flex: 1; min-width: 0; }
.project-card__updated { color: var(--text-faint); }
.project-card__cta { font-weight: 500; color: var(--text); }

/* ============================================================ */
/* === Project detail ========================================= */
/* ============================================================ */

.project-detail__back {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: 13px;
  padding: 0 0 12px;
  cursor: pointer;
}
.project-detail__back:hover { color: var(--text); }

.project-detail__head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.project-detail__icon { width: 52px; height: 52px; }
.project-detail__icon svg { width: 26px; height: 26px; }
.project-detail__name {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 30px;
  font-weight: 500;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.project-detail__updated {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.project-summary {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 24px;
}
.project-summary__head {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.project-summary__body {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}

.project-keydates {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.project-keydates__item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
}
.project-keydates__date {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--warm);
}
.project-keydates__label { color: var(--text-muted); }

.project-empty {
  padding: 28px;
  text-align: center;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}

/* ============================================================ */
/* === New project modal ====================================== */
/* ============================================================ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 12, 0.32);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 24px;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
}
.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.modal__close {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
}
.modal__close:hover { background: var(--bg-alt); color: var(--text); }
.modal__close svg { width: 16px; height: 16px; }
.modal__body { padding: 18px 20px; }
.modal__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.modal__input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 120ms;
}
.modal__input:focus { border-color: var(--text); }
.modal__colors { display: flex; gap: 8px; }
.modal__color {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--bg-alt);
  cursor: pointer;
  padding: 0;
  transition: transform 120ms;
}
.modal__color:hover { transform: scale(1.06); }
.modal__color--warm     { background: var(--warm); }
.modal__color--accent   { background: var(--accent); }
.modal__color--accent-2 { background: var(--accent-2); }
.modal__color--neutral  { background: var(--text-faint); }
.modal__color--active {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--surface) inset;
}
.modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

/* === Schedule Appointment agent — two-pane layout === */
.schedule {
  max-width: 1180px;
  padding: 40px 0 80px;
}
.schedule .agent__head { margin-bottom: 28px; }
.schedule .agent__title {
  font-size: 28px;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.schedule .agent__sub {
  font-size: 14.5px;
  max-width: 560px;
}

/* === Schedule wizard — single-column, one question per step === */
.wizard {
  max-width: 560px;
}
.wizard__steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}
.wizard__step-dot {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.wizard__step-dot svg { width: 13px; height: 13px; stroke-width: 3; }
.wizard__step-dot--active {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}
.wizard__step-dot--done {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}
.wizard__step-bar {
  width: 22px;
  height: 1px;
  background: var(--border-strong);
  flex-shrink: 0;
}
.wizard__step-count {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.wizard__q {
  font-family: 'Source Serif 4', serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 16px;
}
.wizard__q--sub {
  font-size: 18px;
  margin-top: 26px;
}
.wizard__hint {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 14px 0 8px;
}
.wizard__more {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.wizard__more > summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wizard__more > summary::-webkit-details-marker { display: none; }
.wizard__more > summary::before {
  content: '+';
  font-size: 15px;
  color: var(--text-faint);
}
.wizard__more[open] > summary::before { content: '\2013'; }
.wizard__more-opt {
  font-size: 11px;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
}
.wizard__more .agent__input { margin-top: 12px; }
.wizard__nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
}
.wizard__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.wizard__next {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}
.wizard__next svg { width: 14px; height: 14px; }
.wizard__next:disabled { opacity: 0.45; cursor: not-allowed; }
.wizard__result-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  padding: 0;
  margin-bottom: 16px;
  font: inherit;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}
.wizard__result-back:hover { color: var(--text); }

/* Reason-for-visit chip row. Reuses .choice-chip styling. */
.reason-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.reason-chip {
  font-size: 12.5px;
}

/* Result alternates — light secondary rows under the recommended card. */
.schedule__alts { margin-top: 20px; }
.schedule__alt {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 120ms, background 120ms;
}
.schedule__alt + .schedule__alt { margin-top: 6px; }
.schedule__alt:hover { border-color: var(--border-strong); background: var(--surface-2); }
.schedule__alt-when { display: flex; flex-direction: column; gap: 1px; }
.schedule__alt-day {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.schedule__alt-time { font-size: 15px; font-weight: 600; color: var(--text); }
.schedule__alt-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.schedule__alt-loc { font-size: 13px; font-weight: 500; color: var(--text); }
.schedule__alt-meta { font-size: 12px; color: var(--text-muted); }
.schedule__alt-cta { display: grid; place-items: center; color: var(--text-faint); }
.schedule__alt-cta svg { width: 14px; height: 14px; transition: transform 120ms, color 120ms; }
.schedule__alt:hover .schedule__alt-cta svg { color: var(--text); transform: translateX(2px); }
.schedule__empty-cta { margin-top: 14px; }

/* Mobile-only sticky pill that scrolls down to the slot results. Lives at
   the top of .schedule and is hidden on desktop. */
.schedule-mobile-chip {
  display: none;
}

.schedule__results {
  position: sticky;
  top: 24px;
  align-self: start;
  min-width: 0;
}
.schedule__results-panel {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.schedule__results-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  margin-bottom: 12px;
}
.schedule__results-inner { display: block; }
.schedule__results-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 14px;
}
.schedule__results-count strong {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.schedule__results-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: oklch(0.62 0.10 152);
  box-shadow: 0 0 0 3px oklch(0.62 0.10 152 / 0.16);
  flex-shrink: 0;
  animation: livePulse 1.8s ease-in-out infinite;
}
.schedule__results .slots__grid { grid-template-columns: 1fr; gap: 6px; }
/* Slot cards sit on the tinted panel background, so flip their surface to
   white for contrast with the panel. */
.schedule__results .slot { background: var(--surface); }
.schedule__results .slot {
  grid-template-columns: 76px 1fr auto;
  padding: 12px 14px;
  border-radius: 10px;
}
.schedule__results .slot__when-time { font-size: 19px; }
.schedule__results .slot__cta {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
  font-weight: 500;
}
.schedule__results .slot__cta:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  opacity: 1;
}
.schedule__results .slot__cta svg { color: var(--text-muted); transition: color 120ms; }
.schedule__results .slot__cta:hover svg { color: var(--bg); }

.schedule__empty {
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 24px 22px;
  background: transparent;
  text-align: left;
}
.schedule__empty-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}
.schedule__empty-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Who you'd like to see — radio-style stacked rows (renamed from
   provider-card to avoid collision with the carousel provider-card above). */
.who-picks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.who-pick {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms, background 120ms;
  font: inherit;
  color: inherit;
}
.who-pick:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.who-pick--active {
  border-color: var(--text);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--text);
}
.who-pick--disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.who-pick__avatar {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.who-pick--active .who-pick__avatar--initials {
  background: var(--text);
  color: var(--bg);
}
.who-pick__avatar--any {
  background:
    radial-gradient(circle at 30% 30%, var(--border-strong) 0 1px, transparent 1.5px) 0 0 / 6px 6px,
    var(--bg-alt);
  background-blend-mode: normal;
}
.who-pick--active .who-pick__avatar--any {
  background:
    radial-gradient(circle at 30% 30%, var(--bg) 0 1px, transparent 1.5px) 0 0 / 6px 6px,
    var(--text);
}
.who-pick__avatar--ghost {
  background: transparent;
  border: 1px dashed var(--border-strong);
}
.who-pick__body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.who-pick__name { font-size: 13.5px; font-weight: 500; color: var(--text); line-height: 1.3; }
.who-pick__meta { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.who-pick__soon {
  font-size: 11px;
  color: var(--text-faint);
  background: var(--bg-alt);
  border-radius: 999px;
  padding: 3px 8px;
  flex-shrink: 0;
}

/* When/Where chip groups — single-select */
.choice-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.choice-chip {
  padding: 7px 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: border-color 120ms, background 120ms, color 120ms;
  font: inherit;
  font-weight: 400;
  line-height: 1.3;
}
.choice-chip:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.choice-chip--active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* Confirmation card — replaces the slot list after Reserve. Lives inside
   .schedule__results-panel which already supplies the tinted background,
   so the card itself uses the page surface for contrast. */
.confirm-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
}
.confirm-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 7px;
  background: oklch(0.96 0.025 152);
  border: 1px solid oklch(0.86 0.04 152);
  color: oklch(0.38 0.06 152);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  align-self: flex-start;
  margin-bottom: 18px;
}
.confirm-card__check {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: oklch(0.55 0.10 152);
  color: white;
}
.confirm-card__check svg { width: 10px; height: 10px; stroke-width: 3; }
.confirm-card__when {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}
.confirm-card__day {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.confirm-card__time {
  font-family: 'Source Serif 4', serif;
  font-size: 26px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.confirm-card__loc {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}
.confirm-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.confirm-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.confirm-card__meta-item svg { width: 12px; height: 12px; color: var(--text-faint); }
.confirm-card__meta-dot { color: var(--text-faint); margin: 0 8px; }
.confirm-card__bring {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg-alt);
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}
.confirm-card__bring-label {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}
.confirm-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.confirm-card__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text);
  cursor: pointer;
  transition: border-color 120ms, background 120ms;
  font: inherit;
}
.confirm-card__action:hover { border-color: var(--border-strong); background: var(--surface-2); }
.confirm-card__action svg { width: 13px; height: 13px; color: var(--text-muted); }
.confirm-card__action--ghost {
  color: var(--text-muted);
  margin-left: auto;
  border-color: transparent;
  background: transparent;
}
.confirm-card__action--ghost:hover {
  background: var(--bg-alt);
  border-color: var(--border);
}

.confirm-card__followups {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.confirm-card__followups-label {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}
.confirm-card__chip-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.confirm-card__chip {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid transparent;
  background: var(--bg-alt);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: border-color 120ms, background 120ms;
  font: inherit;
  text-align: left;
}
.confirm-card__chip:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.confirm-card__chip svg {
  width: 12px;
  height: 12px;
  color: var(--text-faint);
  flex-shrink: 0;
  transition: transform 120ms, color 120ms;
}
.confirm-card__chip:hover svg { color: var(--text); transform: translateX(2px); }

/* Responsive — collapse to single column before the form pane gets
   squeezed by the rail (280px) + right pane (440px) + gap (40px) ≈ 760px
   of fixed width. Below 920px viewport, the form has less than ~150px to
   work with, which is unusable. So column collapse fires at 920px, and
   the mobile sticky chip appears with it. Then a tighter small-mobile
   pass at 480px restacks slot cards and confirm actions. */
@media (max-width: 920px) {
  .schedule {
    padding-top: 24px;
  }
  .schedule .agent__title { font-size: 24px; }
  .schedule .agent__sub { font-size: 14px; max-width: none; }
  .schedule__panes {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .schedule__results {
    position: static;
  }
  .schedule__results-panel {
    padding: 16px;
  }
  /* Sticky pill anchored to the top of the schedule on mobile only. Lives
     above .schedule__panes and scrolls to the results section on tap.
     Pinned below the page header (which is ~60px tall at this width). */
  .schedule-mobile-chip {
    display: inline-flex;
    position: sticky;
    top: 12px;
    z-index: 5;
    align-items: center;
    gap: 8px;
    padding: 7px 12px 7px 11px;
    margin-bottom: 16px;
    background: var(--text);
    color: var(--bg);
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px oklch(0 0 0 / 0.08);
    transition: opacity 120ms;
  }
  .schedule-mobile-chip:hover { opacity: 0.92; }
  .schedule-mobile-chip__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: oklch(0.62 0.10 152);
    box-shadow: 0 0 0 3px oklch(0.62 0.10 152 / 0.28);
  }
  .schedule-mobile-chip__text strong { font-weight: 700; font-variant-numeric: tabular-nums; }
  .schedule-mobile-chip__caret { display: inline-flex; }
  .schedule-mobile-chip__caret svg {
    width: 13px;
    height: 13px;
    color: var(--bg);
    transform: rotate(90deg);
  }
}
@media (max-width: 480px) {
  .schedule { padding-top: 16px; }
  .schedule .agent__title { font-size: 22px; }
  .schedule .agent__head { margin-bottom: 20px; }
  /* Reason chips become a horizontal scroller so the form stays scannable
     instead of growing 3-4 chip rows tall. */
  .reason-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    margin-left: -16px;
    margin-right: -16px;
    padding: 4px 16px;
    scrollbar-width: none;
  }
  .reason-chips::-webkit-scrollbar { display: none; }
  .reason-chip {
    flex-shrink: 0;
    scroll-snap-align: start;
  }
  /* Slot cards stack: time row above meta row, full-width Reserve. Scoped
     so the shared .slot rule used elsewhere stays untouched. */
  .schedule__results .slot {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 8px;
    padding: 14px;
  }
  .schedule__results .slot__when {
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
    padding-right: 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
  }
  .schedule__results .slot__when-time { font-size: 18px; }
  .schedule__results .slot__cta {
    width: 100%;
    justify-content: center;
    padding-top: 9px;
    padding-bottom: 9px;
  }
  /* Confirm card actions: full-width column with cancel as a text link
     at the bottom (no pill chrome). */
  .confirm-card__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .confirm-card__action {
    justify-content: center;
    padding: 10px 14px;
  }
  .confirm-card__action--ghost {
    margin-left: 0;
    margin-top: 4px;
    text-decoration: underline;
    padding: 6px 14px;
  }
}

/* === Mobile Phase 0: Foundation (touch / hover / lock) === */

button, a { touch-action: manipulation; }

body.body--locked { overflow: hidden; }

@media (hover: none) {
  .rail__item:hover,
  .main__mode:hover,
  .icon-btn:hover,
  .main__share:hover,
  .search-tab:hover,
  .chat-header__tab:hover,
  .pill:hover,
  .composer__btn:hover,
  .role-select:hover,
  .input__btn:hover {
    background: inherit;
    color: inherit;
  }
}

/* === Mobile Phase 1: App shell + rail drawer === */

/* Hamburger button — fixed top-left, mobile-only */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 60;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: var(--shadow-sm);
}
.mobile-menu-btn svg { width: 20px; height: 20px; }

.rail__backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20,18,12,0.4);
  z-index: 49;
  animation: fadeIn .18s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Hide the decorative right rail before phone — it covers content */
@media (max-width: 980px) {
  .right-rail { display: none !important; }
}

@media (max-width: 720px) {
  /* Show hamburger, hide it again ≥720px */
  .mobile-menu-btn { display: inline-flex; }
  .rail__backdrop { display: block; }

  /* App flips from flex row to block — main fills full width */
  .app { display: block; height: auto; min-height: 100vh; overflow: visible; }
  .main { width: 100%; min-height: 100vh; }

  /* Rail becomes a slide-in drawer overlay */
  .rail {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--rail-w-mobile);
    max-width: 320px;
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 50;
    box-shadow: 4px 0 24px rgba(20,18,12,0.12);
    overflow-y: auto;
  }
  .rail.rail--open { transform: translateX(0); }

  /* Push rail content past the floating close X (40px + 12px gap) */
  .rail.rail--open .rail__header { padding-left: 44px; }

  /* When collapsed-state is set on desktop we ignore it on mobile —
     the drawer is either fully open or fully closed */
  .rail.rail--collapsed { width: var(--rail-w-mobile); max-width: 320px; }
  .rail.rail--collapsed .rail__text { opacity: 1; }
  .rail.rail--collapsed .rail__section--recent,
  .rail.rail--collapsed .rail__section-head,
  .rail.rail--collapsed .rail__user-text,
  .rail.rail--collapsed .rail__user-action,
  .rail.rail--collapsed .rail__item-trail,
  .rail.rail--collapsed .signin-callout { display: revert; }
  .rail.rail--collapsed .rail__header { flex-direction: row; }
  /* Hide the desktop collapse toggle on mobile — drawer is open/closed only */
  .rail .rail__header .rail__icon-btn { display: none; }

  /* Push main content down a hair to clear the hamburger */
  .main__header { padding-left: 60px; }
  .landing-header { padding-left: 60px; }

  /* Supersede the 900px display:none — rail is now a drawer, not hidden */
}

/* Counter the existing 900px rule that hides .rail entirely (only between 720–900 is now affected) */
@media (max-width: 900px) and (min-width: 721px) {
  :root { --rail-w: 280px; }
  .rail { display: flex; }
}

/* === Mobile Phase 2: Landing + search === */

@media (max-width: 720px) {
  /* Pull the hero up — the desktop 26vh top padding leaves too much empty space on tall phones */
  .landing {
    padding: 6vh 0 40px;
    max-width: none;
    width: 100%;
  }

  /* Title: allow wrap, shrink */
  .landing__title {
    white-space: normal;
    font-size: 26px;
    line-height: 1.15;
    margin: 0 0 24px;
    padding: 0 4px;
  }

  /* Tabs swipe horizontally instead of wrapping */
  .search-tabs {
    width: 100%;
    align-self: stretch;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 18px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 24px 4px 0;
    margin: -8px 0 14px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    /* Fade the right edge to signal scrollability */
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
  }
  .search-tabs::-webkit-scrollbar { display: none; }
  .search-tab {
    flex: 0 0 auto;
    scroll-snap-align: start;
    padding: 8px 2px 10px;
  }
  /* Drop the icon on phone — labels alone are more legible and fit more tabs */
  .search-tab__icon { display: none; }

  /* Body grid: 2 → 1 below 480 */
  .body-grid { grid-template-columns: repeat(2, 1fr); }

  /* Main scroll padding tighter on phone (keeps the 900px rule consistent) */
  .main__scroll { padding-left: var(--content-pad-mobile); padding-right: var(--content-pad-mobile); }

  /* Default suggestions: tighten the row spacing on phone */
  .default-suggestions { padding-left: 4px; padding-right: 4px; }
}

@media (max-width: 480px) {
  .body-grid { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .landing__title { font-size: 22px; margin-bottom: 20px; }
  .search-tabs { gap: 14px; }
  .search-tab { font-size: 13px; }
  .default-suggestions__item { font-size: 13.5px; }
}

/* === Mobile Phase 3: Chat === */

@media (max-width: 720px) {
  /* Header: stack name row over tab strip */
  .chat-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    flex: 0 0 auto;
    padding: 0;
    gap: 0;
  }
  .chat-header__left {
    height: 52px;
    padding: 0 14px 0 60px;  /* clear the hamburger */
    justify-self: stretch;
    width: 100%;
    border-bottom: 1px solid var(--border);
  }
  .chat-header__name {
    max-width: none;
    flex: 1;
    min-width: 0;
  }
  /* Tabs row */
  .chat-header__tabs {
    width: 100%;
    height: 44px;
    flex-wrap: nowrap;
    justify-self: stretch;
    justify-content: flex-start;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 24px 0 var(--content-pad-mobile);
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent 100%);
  }
  .chat-header__tabs::-webkit-scrollbar { display: none; }
  .chat-tab {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
  .chat-tab__icon { display: none; }
  /* Hide role-select in header — it's available in the user menu */
  .chat-header__right { display: none; }

  /* Main scroll padding & bottom clearance for the floating composer */
  .main__scroll { padding-bottom: 140px; }

  /* Composer: pin to viewport bottom (parent .main is now content-sized) */
  .composer {
    position: fixed;
    padding: 10px var(--content-pad-mobile)
             calc(14px + env(safe-area-inset-bottom, 0px));
    z-index: 20;
  }
}

@media (max-width: 380px) {
  .chat-header__left { padding-left: 56px; }
  .chat-tab { font-size: 12.5px; }
}

/* === Mobile Phase 4: Schedule appointment === */

@media (max-width: 720px) {
  /* Tighter slot card layout */
  .slot__when { padding: 12px 10px; min-width: 88px; }
  .slot__when-time { font-size: 22px; }
  .slot__body { padding: 12px 10px; }
  .slot__cta { padding: 8px 12px; font-size: 13px; }
  .slot__cta svg { display: none; }

  /* Looser slot__meta wrapping on phone */
  .slot__meta { flex-wrap: wrap; row-gap: 4px; }
  .slot__meta-dot { display: none; }
  .slot__meta-item { flex-shrink: 0; }
}

/* === Mobile Phase 8: Modals, dropdowns, polish === */

@media (max-width: 720px) {
  /* Hide the developer tweaks panel on phone — it's a desktop dev surface */
  .tweaks-toggle,
  .tweaks-panel { display: none !important; }

  /* Dropdowns: prevent overflow off the right edge */
  .user-menu,
  .chat-menu,
  .role-menu,
  .mode-menu,
  .add-menu {
    max-width: calc(100vw - 24px);
    max-height: 70vh;
    overflow-y: auto;
  }

  /* Citation popover: cap width so it never overflows the viewport */
  .cite-pop {
    max-width: calc(100vw - 24px);
    left: 12px !important;
  }

  /* Auth modal: turn into a bottom-aligned sheet on phone */
  .auth-modal {
    padding: 0;
    align-items: flex-end;
  }
  .auth-modal__card {
    width: 100%;
    max-width: none;
    border-radius: 20px 20px 0 0;
    padding: 28px 20px calc(22px + env(safe-area-inset-bottom, 0px));
    animation: auth-sheet-in 220ms cubic-bezier(.2,.8,.2,1) both;
  }
}

@keyframes auth-sheet-in {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === Get seen now — immediate care walk-in spot-saver === */
.gsn {
  max-width: 760px;
  padding: 40px 0 80px;
}
.gsn .agent__head { margin-bottom: 24px; }
.gsn .agent__title {
  font-size: 28px;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.gsn .agent__sub {
  font-size: 14.5px;
  max-width: 560px;
  margin-bottom: 14px;
}
.gsn__safety {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.gsn__safety svg { width: 14px; height: 14px; color: var(--text-faint); }
.gsn__safety strong { color: var(--text); font-weight: 500; }

/* Control row — location chip + filter chips */
.gsn__controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.gsn__loc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: border-color 120ms, background 120ms;
}
.gsn__loc:hover { border-color: var(--border-strong); background: var(--surface-2); }
.gsn__loc svg { width: 13px; height: 13px; color: var(--text-faint); }
.gsn__loc-change { color: var(--text-faint); font-size: 12px; margin-left: 2px; }
.gsn__filters { display: flex; flex-wrap: wrap; gap: 6px; }

.gsn__reason { margin-bottom: 18px; }
.gsn__reason .input__textarea { padding: 10px 14px; font-size: 14px; min-height: 0; resize: none; }

/* Reason recap inside the held card — a light labeled line, no heavy box */
.gsn__reason-recap { font-size: 13px; color: var(--text); margin-bottom: 16px; line-height: 1.5; }
.gsn__reason-recap-label { display: block; font-size: 11.5px; color: var(--text-muted); font-weight: 500; margin-bottom: 2px; }

.gsn__count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.4;
}
.gsn__count strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.gsn__count-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: oklch(0.62 0.10 152);
  box-shadow: 0 0 0 3px oklch(0.62 0.10 152 / 0.16);
  flex-shrink: 0;
  animation: livePulse 1.8s ease-in-out infinite;
}

.gsn__list { display: flex; flex-direction: column; gap: 8px; }

/* Clinic card */
.gsn-clinic {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 120ms, box-shadow 120ms;
}
.gsn-clinic:hover { border-color: var(--border-strong); }
.gsn-clinic--soonest {
  border-color: var(--accent-border);
  box-shadow: inset 0 0 0 1px var(--accent-border);
}
.gsn-clinic--closed { opacity: 0.62; }
.gsn-clinic__flag {
  position: absolute;
  top: -9px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.gsn-clinic__main { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.gsn-clinic__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.gsn-clinic__name { font-size: 16px; font-weight: 500; margin: 0; letter-spacing: -0.01em; }
.gsn-clinic__type { font-size: 12.5px; color: var(--text-muted); }
.gsn-clinic__status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.gsn-clinic__open { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-muted); }
.gsn-clinic__open svg { width: 12px; height: 12px; color: var(--text-faint); }
.gsn-clinic__feats { display: flex; flex-wrap: wrap; gap: 5px; }
.gsn-tag {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
}
.gsn-clinic__cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.gsn-clinic__next { font-size: 11.5px; color: var(--text-muted); text-align: right; line-height: 1.25; }
.gsn-clinic__next strong {
  display: block;
  font-size: 15px;
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.gsn-clinic__cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms, color 120ms, border-color 120ms;
}
.gsn-clinic__cta:hover:not(:disabled) { background: var(--text); color: var(--bg); border-color: var(--text); }
.gsn-clinic__cta svg { width: 13px; height: 13px; color: var(--text-muted); transition: color 120ms; }
.gsn-clinic__cta:hover:not(:disabled) svg { color: var(--bg); }
.gsn-clinic__cta:disabled { background: transparent; color: var(--text-faint); border-color: var(--border); cursor: not-allowed; }
/* Soonest pick gets the solid, primary treatment so the eye lands on it first */
.gsn-clinic--soonest .gsn-clinic__cta { background: var(--text); color: var(--bg); border-color: var(--text); }
.gsn-clinic--soonest .gsn-clinic__cta svg { color: var(--bg); }
.gsn-clinic--soonest .gsn-clinic__cta:hover:not(:disabled) { background: #2a2620; border-color: #2a2620; }

/* Held state */
.gsn__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 4px 0;
  margin-bottom: 14px;
  font: inherit;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}
.gsn__back:hover { color: var(--text); }
.gsn__held .confirm-card { max-width: 480px; }

/* En route — confirmation shown after "I'm on my way" */
.gsn__enroute-title {
  font-family: 'Source Serif 4', serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 6px;
}
.gsn__enroute-sub {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 16px;
}
.gsn__notif {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  margin-bottom: 18px;
}
.gsn__notif svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.gsn__notif-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gsn__notif-title { font-size: 13px; font-weight: 500; color: var(--text); }
.gsn__notif-sub { font-size: 12px; color: var(--text-muted); line-height: 1.45; }
.gsn__expect { margin-bottom: 18px; }
.gsn__expect-label {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 10px;
}
.gsn__steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.gsn__steps li { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--text); line-height: 1.45; }
.gsn__steps svg { width: 14px; height: 14px; color: var(--text-faint); flex-shrink: 0; margin-top: 2px; }
.confirm-card__action--go {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.confirm-card__action--go svg { color: var(--bg); }
.confirm-card__action--go:hover { background: #2a2620; border-color: #2a2620; }

@media (max-width: 720px) {
  .gsn { padding-top: 24px; }
  .gsn .agent__title { font-size: 24px; }
}
@media (max-width: 480px) {
  .gsn { padding-top: 16px; }
  .gsn .agent__title { font-size: 22px; }
  .gsn .agent__head { margin-bottom: 20px; }
  .gsn-clinic { grid-template-columns: 1fr; gap: 14px; }
  .gsn-clinic__cta-wrap { flex-direction: row; align-items: center; justify-content: space-between; }
  .gsn-clinic__cta { flex: 1; justify-content: center; padding-top: 10px; padding-bottom: 10px; }
  .gsn-clinic__next { text-align: left; }
  .gsn-clinic__next strong { display: inline; margin-left: 4px; }
}
@media (max-width: 360px) {
  .gsn__controls { gap: 6px; }
  .gsn-clinic { padding: 14px; }
}

/* Get seen now — focus, motion, and touch-target accessibility */
.gsn :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .gsn.fade-in { animation: none; }
  .gsn__count-dot { animation: none; }
}
/* Raise interactive targets to the 44px minimum on small/mobile widths and on
   touch devices of any size; wide pointer screens keep the tighter sizing. */
@media (max-width: 640px), (hover: none) and (pointer: coarse) {
  .gsn__filters .choice-chip { display: inline-flex; align-items: center; min-height: 44px; }
  .gsn__loc,
  .gsn-clinic__cta,
  .gsn__back { min-height: 44px; }
  .gsn__reason .input__textarea { min-height: 48px; }
  .gsn__held .confirm-card__action,
  .gsn__held .confirm-card__chip { min-height: 44px; }
}

/* === Get seen now — who-for picker + recommended location card === */
.gsn__who { margin-bottom: 16px; }
.gsn__who-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.who-for { position: relative; max-width: 380px; }
.who-for__trigger {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 120ms, background 120ms;
}
.who-for__trigger:hover { border-color: var(--border-strong); background: var(--surface-2); }
.who-for__trigger--open { border-color: var(--border-strong); }
.who-for__avatar {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  flex-shrink: 0;
}
.who-for__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.who-for__name { font-size: 13.5px; font-weight: 500; color: var(--text); line-height: 1.3; }
.who-for__meta { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.who-for__caret { display: grid; place-items: center; color: var(--text-muted); }
.who-for__caret svg { width: 15px; height: 15px; }
.who-for__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 6px;
  z-index: 20;
}
.who-for__item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit; color: inherit;
}
.who-for__item:hover { background: var(--bg-alt); }
.who-for__item--active { background: var(--bg-alt); }
.who-for__check { display: grid; place-items: center; color: var(--accent); }
.who-for__check svg { width: 15px; height: 15px; }

.rec-card {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  margin-bottom: 22px;
}
.rec-card__top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 14px;
}
.rec-card__rationale { font-size: 12px; color: var(--text-muted); }
.rec-card__map {
  position: relative;
  height: 124px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  overflow: hidden;
  background-color: var(--surface-2);
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px),
    linear-gradient(115deg, transparent 46%, var(--accent-soft) 46%, var(--accent-soft) 54%, transparent 54%);
  background-size: 26px 26px, 26px 26px, 100% 100%;
}
.rec-card__map::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 62% 40%, transparent 42%, rgba(20,18,12,0.05));
}
.rec-card__map-pin {
  position: absolute;
  top: 40%; left: 62%;
  transform: translate(-50%, -50%);
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: var(--shadow-md);
  z-index: 1;
}
.rec-card__map-pin svg { width: 15px; height: 15px; color: var(--bg); }
.rec-card__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.rec-card__for {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.rec-card__meta { margin-bottom: 6px; }
.rec-card__total {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
}
.rec-card__parking {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 16px;
}
.rec-card__parking-icon { display: grid; place-items: center; color: var(--accent); margin-top: 1px; flex-shrink: 0; }
.rec-card__parking-icon svg { width: 14px; height: 14px; }
.rec-card__actions { margin-bottom: 0; }
.rec-card__share-wrap { position: relative; display: inline-flex; }
.rec-card__share-pop {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  width: 250px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 6px;
  z-index: 25;
}
.rec-card__share-head {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 6px 8px 4px;
}
.rec-card__share-empty { padding: 8px; font-size: 12.5px; color: var(--text-muted); }
.rec-card__share-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit; color: inherit;
}
.rec-card__share-item:hover { background: var(--bg-alt); }
.rec-card__share-send { display: grid; place-items: center; color: var(--text-muted); }
.rec-card__share-send svg { width: 14px; height: 14px; }
.rec-card__sent {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 14px 0 0;
  border-radius: 8px;
  background: oklch(0.96 0.025 152);
  border: 1px solid oklch(0.86 0.04 152);
  color: oklch(0.38 0.06 152);
  font-size: 12.5px;
  line-height: 1.4;
}
.rec-card__sent-check {
  display: grid; place-items: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: oklch(0.55 0.10 152); color: white; flex-shrink: 0;
}
.rec-card__sent-check svg { width: 10px; height: 10px; stroke-width: 3; }

