/* Kiranello design tokens + primitives. Healthcare-friendly theme (in the
   spirit of Hyro.ai): calming clinical teal, soft off-white surfaces, gentle
   shadows, and a quieter danger/warning palette so the UI reads as trustworthy
   and low-stress rather than alarm-y. */
:root {
  --bg: #f3faf9;
  --surface: #ffffff;
  --surface-2: #e9f6f4;
  --ink: #132421;
  --ink-dim: #4c6460;
  --line: #dcebe8;
  --primary: #0d9488;
  --primary-ink: #e3f6f3;
  --primary-dark: #0a6b62;
  --success: #15a35a;
  --success-ink: #e7f8ee;
  --warning: #b8860b;
  --warning-ink: #fbf1dc;
  --danger: #c23a52;
  --danger-ink: #fbe9ed;
  --shadow: 0 1px 2px rgba(13, 36, 33, 0.04), 0 8px 24px rgba(13, 36, 33, 0.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1716;
    --surface: #132422;
    --surface-2: #192e2b;
    --ink: #eaf5f3;
    --ink-dim: #93aba7;
    --line: #223c38;
    --primary: #2dd4bf;
    --primary-ink: #11302c;
    --primary-dark: #7ae8da;
    --success: #4ed189;
    --success-ink: #123424;
    --warning: #e0b949;
    --warning-ink: #3a2f0f;
    --danger: #f08098;
    --danger-ink: #3a1823;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1716;
  --surface: #132422;
  --surface-2: #192e2b;
  --ink: #eaf5f3;
  --ink-dim: #93aba7;
  --line: #223c38;
  --primary: #2dd4bf;
  --primary-ink: #11302c;
  --primary-dark: #7ae8da;
  --success: #4ed189;
  --success-ink: #123424;
  --warning: #e0b949;
  --warning-ink: #3a2f0f;
  --danger: #f08098;
  --danger-ink: #3a1823;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { background: var(--bg); }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Plus Jakarta Sans", -apple-system, "Segoe UI", sans-serif;
}
.mono { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; }
a { color: inherit; }
h1, h2, h3 { font-family: "Plus Jakarta Sans", sans-serif; letter-spacing: -0.01em; }

/* ---------- Marketing/auth top bar ---------- */
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 40px);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.brand .wordmark { font-weight: 800; font-size: 19px; letter-spacing: -0.02em; color: var(--ink); }
.brand .wordmark span { color: var(--primary); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--success-ink);
}
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 var(--success);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 55%, transparent); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }

main.page { max-width: 1040px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 40px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(22,26,46,.06), 0 4px 12px color-mix(in srgb, var(--primary) 35%, transparent); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger-ink); color: var(--danger); }
.btn-danger:hover { background: var(--danger-ink); filter: brightness(0.95); }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink); }
.field .hint { font-size: 12.5px; color: var(--ink-dim); margin-top: 2px; }
.field input, .field textarea, .field select {
  font-family: inherit;
  font-size: 15px;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 80px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}
.inline-fields { display: flex; gap: 12px; }
.inline-fields .field { flex: 1; }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px !important; }
.pw-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--ink-dim); padding: 4px;
  display: flex; align-items: center;
}
.pw-toggle:hover { color: var(--ink); }
.consent-row { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 18px; font-size: 13px; color: var(--ink-dim); line-height: 1.5; }
.consent-row input { margin-top: 2px; flex: none; }
.consent-row a { color: var(--primary-dark); font-weight: 600; text-decoration: none; }
.trial-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
  color: var(--primary-dark); background: var(--primary-ink); padding: 6px 12px; border-radius: 999px;
  margin-top: 12px;
}

.auth-wrap { display: flex; justify-content: center; padding: 48px 16px; }
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 36px 32px;
}
.auth-card h1 { font-weight: 800; font-size: 25px; margin: 0 0 6px; }
.auth-card .sub { color: var(--ink-dim); font-size: 14px; margin: 0 0 26px; line-height: 1.5; }
.auth-card .error {
  background: var(--danger-ink); color: var(--danger); font-size: 13.5px; font-weight: 600;
  padding: 11px 14px; border-radius: 10px; margin-bottom: 18px;
}
.auth-card .success {
  background: var(--success-ink); color: var(--success); font-size: 13.5px; font-weight: 600;
  padding: 11px 14px; border-radius: 10px; margin-bottom: 18px;
}
.auth-card .switch { text-align: center; font-size: 13.5px; color: var(--ink-dim); margin-top: 20px; }
.auth-card .switch a { color: var(--primary); font-weight: 700; text-decoration: none; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600;
  color: var(--ink-dim); text-decoration: none; margin-bottom: 18px;
}
.back-link:hover { color: var(--ink); }

/* ---------- Cards / tables ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.card.pad { padding: 24px; }
.card + .card { margin-top: 18px; }
.card h2 { font-size: 15.5px; font-weight: 800; margin: 0 0 4px; }
.card .card-sub { font-size: 13px; color: var(--ink-dim); margin: 0 0 18px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); min-width: 0; }
thead th { color: var(--ink-dim); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; background: var(--surface-2); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
td.num { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13.5px; font-weight: 600; }
td.sid { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; color: var(--ink-dim); }
td.time { color: var(--ink-dim); font-size: 13px; white-space: nowrap; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.ringing, .chip.missed { background: var(--warning-ink); color: var(--warning); }
.chip.calling_back, .chip.open, .chip.voice { background: var(--primary-ink); color: var(--primary); }
.chip.completed, .chip.booked, .chip.closed { background: var(--success-ink); color: var(--success); }
.chip.no-answer, .chip.busy, .chip.failed, .chip.cancelled { background: var(--danger-ink); color: var(--danger); }
.chip.sms { background: var(--success-ink); color: var(--success); }
.chip.chat { background: var(--warning-ink); color: var(--warning); }

.empty { text-align: center; padding: 64px 20px; color: var(--ink-dim); }
.empty .glyph { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 14px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; }
.empty .t1 { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.empty .t2 { font-size: 13.5px; max-width: 36ch; margin: 0 auto; line-height: 1.55; }

footer.page-footer { margin-top: 24px; font-size: 12.5px; color: var(--ink-dim); text-align: center; }

/* ---------- App shell (sidebar layout) ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 236px; flex: none; background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 20px 16px;
  padding-top: calc(20px + env(safe-area-inset-top, 0px)); gap: 4px;
}
.sidebar .brand { padding: 4px 8px 20px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--ink-dim); text-decoration: none;
}
.sidebar-link:hover { background: var(--surface-2); color: var(--ink); }
.sidebar-link.active { background: var(--primary-ink); color: var(--primary-dark); }
.sidebar-link svg { flex: none; }
.sidebar-spacer { flex: 1; }
.sidebar-biz { padding: 12px; border-radius: 12px; background: var(--surface-2); margin-bottom: 8px; }
.sidebar-biz .name { font-size: 13.5px; font-weight: 700; }
.sidebar-biz .number { font-size: 12px; color: var(--ink-dim); font-family: "IBM Plex Mono", monospace; margin-top: 2px; }

.app-main { flex: 1; min-width: 0; }
.app-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px clamp(16px, 3vw, 32px); border-bottom: 1px solid var(--line);
}
.app-topbar h1 { font-size: 18px; font-weight: 800; margin: 0; }
.app-content { padding: 28px clamp(16px, 3vw, 32px) 40px; max-width: 980px; }

.mobile-topbar { display: none; }
@media (max-width: 860px) {
  .app-shell { flex-direction: column; }
  .sidebar { display: none; }
  .mobile-topbar {
    display: flex; align-items: center; justify-content: space-between; padding: 14px 16px;
    padding-top: calc(14px + env(safe-area-inset-top, 0px)); border-bottom: 1px solid var(--line); background: var(--surface);
  }
}

/* ---------- Transcript bubbles ---------- */
.transcript { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 70%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.bubble.user { align-self: flex-start; background: var(--surface-2); color: var(--ink); border-bottom-left-radius: 4px; }
.bubble.assistant { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }

/* ---------- Day-hours grid (settings) ---------- */
.hours-grid { display: grid; grid-template-columns: 50px 1fr 1fr; gap: 10px 14px; align-items: center; margin-bottom: 8px; }
.hours-grid .day-label { font-size: 13px; font-weight: 700; }
.hours-grid input[type="time"] { width: 100%; }

.list-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: none; }
.list-row .txt { font-size: 13.5px; line-height: 1.5; }
.list-row .txt .q { font-weight: 700; }
.list-row .txt .a { color: var(--ink-dim); }

.embed-box {
  background: var(--surface-2); border-radius: 10px; padding: 14px 16px; font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px; overflow-x: auto; white-space: pre; color: var(--ink);
}

/* ---------- Marketing page: alternating section bands ---------- */
.band { width: 100%; }
.band.alt { background: var(--surface); }
.band-inner { max-width: 1040px; margin: 0 auto; padding: 56px clamp(16px, 4vw, 40px); }

/* ---------- FAQ accordion ---------- */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.faq-item summary {
  cursor: pointer; list-style: none; padding: 16px 20px; font-weight: 700; font-size: 14.5px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 20px; font-weight: 400; color: var(--primary-dark); flex: none; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin: 0; padding: 0 20px 18px; color: var(--ink-dim); font-size: 13.5px; line-height: 1.6; }

/* ---------- Use-case cards ---------- */
.usecase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
@media (max-width: 560px) { .usecase-grid { grid-template-columns: 1fr; } }
.usecase-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.usecase-card .who { font-size: 12px; font-weight: 700; color: var(--primary-dark); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px; }
.usecase-card .flow { font-size: 13px; color: var(--ink-dim); line-height: 1.65; margin: 0; }
.usecase-card .flow b { color: var(--ink); font-weight: 700; }

/* ---------- Trust list ---------- */
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 880px; margin: 0 auto; }
@media (max-width: 760px) { .trust-grid { grid-template-columns: 1fr; } }
.trust-card { display: flex; gap: 12px; }
.trust-card .icon { width: 34px; height: 34px; border-radius: 9px; background: var(--primary-ink); color: var(--primary-dark); display: flex; align-items: center; justify-content: center; flex: none; }
.trust-card h4 { font-size: 14px; font-weight: 800; margin: 0 0 4px; }
.trust-card p { font-size: 13px; color: var(--ink-dim); margin: 0; line-height: 1.55; }

/* ---------- Pricing ---------- */
.pricing-card {
  max-width: 480px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: var(--shadow); padding: 32px; text-align: center;
}
.pricing-card .tag { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--primary-dark); background: var(--primary-ink); padding: 4px 12px; border-radius: 999px; margin-bottom: 14px; }
.pricing-card h3 { font-size: 20px; font-weight: 800; margin: 0 0 8px; }
.pricing-card p { font-size: 14px; color: var(--ink-dim); margin: 0 0 22px; line-height: 1.55; }

/* ---------- Nav links row ---------- */
.nav-links { display: flex; align-items: center; justify-content: center; gap: 40px; flex: 1; }
.nav-links a { font-size: 13.5px; font-weight: 600; color: var(--ink-dim); text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 760px) { .nav-links { display: none; } }

/* ---------- Mock product visual (hero) ---------- */
.mock-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 18px; }
.mock-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.mock-tab { font-size: 11.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: var(--surface-2); color: var(--ink-dim); }
.mock-tab.active { background: var(--primary); color: #fff; }
.mock-transcript { display: flex; flex-direction: column; gap: 8px; }
.mock-line { max-width: 84%; padding: 9px 13px; border-radius: 13px; font-size: 12.5px; line-height: 1.45; }
.mock-line.them { align-self: flex-start; background: var(--surface-2); color: var(--ink); border-bottom-left-radius: 3px; }
.mock-line.ai { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 3px; }
.mock-caption { font-size: 11px; color: var(--ink-dim); text-align: center; margin-top: 12px; }

/* ---------- Site footer (marketing) ---------- */
footer.site-footer { background: var(--ink); color: color-mix(in srgb, #fff 70%, transparent); padding: 48px clamp(16px, 4vw, 40px) 28px; }
.footer-grid { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h5 { color: #fff; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 14px; }
.footer-grid a { display: block; color: color-mix(in srgb, #fff 65%, transparent); text-decoration: none; font-size: 13.5px; margin-bottom: 10px; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { max-width: 1040px; margin: 32px auto 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 12.5px; color: color-mix(in srgb, #fff 55%, transparent); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
