/* Fonts are served from this app, so visitors' browsers never contact a font service. Both are SIL OFL 1.1. */
@font-face { font-display: swap; font-family: "Sora"; font-weight: 100 800; src: url("/static/fonts/sora.woff2") format("woff2"); }
@font-face { font-display: swap; font-family: "Plus Jakarta Sans"; font-weight: 200 800; src: url("/static/fonts/plus-jakarta-sans.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --font-body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Sora", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  --bg: #f6f5fb;
  --surface: #ffffff;
  --surface-2: #faf9fe;
  --ink: #19173a;
  --muted: #5e5b7a;
  --line: #e4e1f0;
  --brand: #5b3fd9;
  --brand-hover: #4c31c7;
  --brand-ink: #ffffff;
  --brand-soft: #efebfe;
  --sun: #ff7a45;
  --sun-soft: #fff0e8;
  /* The night band (hero and sidebar) stays dark in both themes. */
  --night: #16133b;
  --night-2: #221d55;
  --night-ink: #f4f2ff;
  --night-muted: #b9b4e3;
  --night-line: rgba(255, 255, 255, .1);
  --critical: #b8232b;
  --critical-soft: #fdeced;
  --warning: #8a5300;
  --warning-soft: #fff4dd;
  --good: #16703f;
  --good-soft: #e5f6ec;
  --shadow: 0 1px 2px rgba(25, 23, 58, .05), 0 8px 24px -12px rgba(25, 23, 58, .14);
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0f0d24;
    --surface: #18163a;
    --surface-2: #1d1a44;
    --ink: #eeedfb;
    --muted: #a9a5cb;
    --line: #2d2957;
    --brand: #a594ff;
    --brand-hover: #b8abff;
    --brand-ink: #150f3d;
    --brand-soft: #27215c;
    --sun: #ff9466;
    --sun-soft: #3a2228;
    --night: #0b0a1d;
    --night-2: #17143d;
    --critical: #ff9a9f;
    --critical-soft: #3d1c24;
    --warning: #f0c069;
    --warning-soft: #372a14;
    --good: #82dba6;
    --good-soft: #17352a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font: 15.5px/1.6 var(--font-body); margin: 0; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-hover); }
h1, h2, h3, .logo, .price, .tile .value { font-family: var(--font-display); }
h1 { font-size: 27px; font-weight: 650; letter-spacing: -.025em; line-height: 1.2; margin: 0 0 6px; }
h3 { font-size: 17px; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; margin: 0 0 8px; }
h2 { font-size: 18px; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; margin: 0 0 10px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { margin-left: auto; }

/* Brand mark */
.logo { align-items: center; color: inherit; display: inline-flex; font-size: 17px; font-weight: 650; gap: 9px; letter-spacing: -.02em; text-decoration: none; }
.logo:hover { color: inherit; }
.logo svg { flex: none; height: 30px; width: 30px; }

/* Buttons and forms */
.btn { align-items: center; background: var(--brand); border: 1px solid var(--brand); border-radius: 999px; color: var(--brand-ink); cursor: pointer; display: inline-flex; font: inherit; font-weight: 650; gap: 8px; justify-content: center; padding: 9px 18px; text-decoration: none; transition: background .15s, transform .15s, box-shadow .15s; }
.btn:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--brand-ink); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.secondary:hover { background: var(--surface-2); border-color: var(--brand); }
.btn.large { font-size: 16.5px; padding: 13px 26px; }
.btn.glow { background: linear-gradient(135deg, #7a5cff, #5b3fd9 55%, #4a2fc0); border-color: transparent; box-shadow: 0 10px 30px -10px rgba(122, 92, 255, .8); color: #fff; }
.btn.glow:hover { box-shadow: 0 14px 34px -10px rgba(255, 122, 69, .7); }
.linkish { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
label { display: block; font-weight: 600; margin-bottom: 16px; }
label .hint { color: var(--muted); display: block; font-size: 13px; font-weight: 400; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=search], select, textarea {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); display: block; font: inherit; font-weight: 400; margin-top: 6px; padding: 10px 12px; transition: border-color .15s, box-shadow .15s; width: 100%;
}
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); outline: none; }
textarea { min-height: 88px; resize: vertical; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.check { align-items: flex-start; display: flex; font-weight: 400; gap: 10px; }
.check input { accent-color: var(--brand); margin-top: 5px; }
.field-error { color: var(--critical); display: block; font-size: 13px; font-weight: 600; margin-top: 4px; }

/* Notices */
.notice { border: 1px solid transparent; border-radius: 12px; margin-bottom: 16px; padding: 11px 15px; }
.notice.good { background: var(--good-soft); color: var(--good); }
.notice.error { background: var(--critical-soft); border-color: color-mix(in srgb, var(--critical) 25%, transparent); color: var(--critical); }
.notice.warning { background: var(--warning-soft); color: var(--warning); }
.notice.info { background: var(--brand-soft); }
.notice form { display: inline; }
.notice .linkish { color: inherit; }

/* Public pages */
.topbar { align-items: center; display: flex; gap: 16px; margin: 0 auto; max-width: 1120px; padding: 18px 20px; }
.topbar .login { color: inherit; font-weight: 600; text-decoration: none; white-space: nowrap; }
.topbar .btn { white-space: nowrap; }
.topbar.public-night, .topbar.public-night .login { color: var(--night-ink); }
.auth { margin: 28px auto 64px; max-width: 440px; padding: 0 16px; }
.auth h1 { text-align: center; }
.auth > .muted { text-align: center; }
.auth .card { padding: 26px; }
.auth .btn { margin-top: 4px; width: 100%; }

/* Landing hero */
.night { background:
    radial-gradient(60% 70% at 85% 10%, rgba(255, 122, 69, .28), transparent 60%),
    radial-gradient(70% 80% at 10% 0%, rgba(122, 92, 255, .45), transparent 60%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
  color: var(--night-ink); }
.hero { align-items: center; display: grid; gap: 48px; grid-template-columns: 1.1fr .9fr; margin: 0 auto; max-width: 1120px; padding: 48px 20px 88px; }
.eyebrow { align-items: center; background: rgba(255, 255, 255, .08); border: 1px solid var(--night-line); border-radius: 999px; color: var(--night-muted); display: inline-flex; font-size: 13px; font-weight: 600; gap: 8px; margin-bottom: 20px; padding: 5px 12px 5px 8px; }
.eyebrow .dot { background: #3ee08f; border-radius: 50%; box-shadow: 0 0 0 4px rgba(62, 224, 143, .2); height: 8px; width: 8px; }
.hero h1 { font-size: clamp(36px, 5.4vw, 58px); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; margin-bottom: 18px; }
.hero h1 .warm { background: linear-gradient(90deg, #ffb48a, #ff7a45 45%, #c9a8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { color: var(--night-muted); font-size: 18px; margin-bottom: 28px; max-width: 540px; }
.hero-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 14px 20px; }
.hero-actions .note { color: var(--night-muted); font-size: 14px; }

/* The call preview on the landing page */
.call-card { background: rgba(255, 255, 255, .06); border: 1px solid var(--night-line); border-radius: 22px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); padding: 18px; }
.call-top { align-items: center; display: flex; gap: 12px; margin-bottom: 14px; }
.call-avatar { align-items: center; background: linear-gradient(135deg, #7a5cff, #ff7a45); border-radius: 50%; display: flex; flex: none; height: 40px; justify-content: center; width: 40px; }
.call-avatar svg { height: 20px; width: 20px; }
.call-title { font-weight: 700; line-height: 1.3; }
.call-sub { color: var(--night-muted); font-size: 13px; }
.live { align-items: center; color: #3ee08f; display: inline-flex; font-size: 12px; font-weight: 700; gap: 6px; letter-spacing: .04em; margin-left: auto; text-transform: uppercase; }
.live::before { animation: pulse 1.6s ease-in-out infinite; background: currentColor; border-radius: 50%; content: ""; height: 7px; width: 7px; }
.wave { align-items: center; display: flex; gap: 4px; height: 44px; justify-content: center; margin: 4px 0 14px; }
.wave span { animation: wave 1.2s ease-in-out infinite; background: linear-gradient(180deg, #ffb48a, #7a5cff); border-radius: 3px; height: 100%; transform-origin: center; width: 4px; }
.wave span:nth-child(3n) { animation-delay: -.3s; }
.wave span:nth-child(3n+1) { animation-delay: -.6s; }
.wave span:nth-child(4n) { animation-delay: -.9s; }
.wave span:nth-child(5n) { animation-duration: 1.5s; }
.lines { display: flex; flex-direction: column; gap: 8px; }
.line { border-radius: 14px; font-size: 14px; line-height: 1.45; max-width: 88%; padding: 9px 13px; }
.line.agent { align-self: flex-start; background: rgba(122, 92, 255, .25); border-bottom-left-radius: 4px; }
.line.caller { align-self: flex-end; background: rgba(255, 255, 255, .1); border-bottom-right-radius: 4px; }
.alert-chip { align-items: center; align-self: flex-start; background: rgba(255, 122, 69, .16); border: 1px solid rgba(255, 122, 69, .45); border-radius: 999px; color: #ffc3a6; display: inline-flex; font-size: 12.5px; font-weight: 700; gap: 7px; margin-top: 4px; padding: 5px 11px; }
.alert-chip svg { height: 14px; width: 14px; }
@keyframes wave { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .wave span, .live::before { animation: none; } .wave span { transform: scaleY(.6); } }

/* Landing sections */
.section-wrap { margin: 0 auto; max-width: 1120px; padding: 72px 20px 0; }
.section-head { margin: 0 auto 30px; max-width: 640px; text-align: center; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 650; letter-spacing: -.03em; margin-bottom: 10px; }
.section-head p { color: var(--muted); font-size: 17px; }
.kicker { color: var(--sun); display: block; font-size: 13px; font-weight: 700; letter-spacing: .08em; margin-bottom: 8px; text-transform: uppercase; }
.grid3, .grid4 { display: grid; gap: 16px; }
.grid3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.feature { padding: 22px; }
.feature p { color: var(--muted); margin: 0; }
.step-num { align-items: center; background: var(--brand-soft); border-radius: 10px; color: var(--brand); display: inline-flex; font-family: var(--font-display); font-weight: 700; height: 34px; justify-content: center; margin-bottom: 14px; width: 34px; }
.icon { align-items: center; background: linear-gradient(135deg, var(--brand-soft), var(--sun-soft)); border-radius: 12px; color: var(--brand); display: inline-flex; height: 44px; justify-content: center; margin-bottom: 14px; width: 44px; }
.icon svg { height: 22px; width: 22px; }
.industry { transition: border-color .2s, transform .2s, box-shadow .2s; }
.industry:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); transform: translateY(-2px); }
.pricing { margin: 72px auto 0; max-width: 1120px; padding: 0 20px; }
.pricing .card { align-items: center; background: linear-gradient(135deg, var(--brand-soft), var(--sun-soft)); border: 0; display: flex; flex-wrap: wrap; gap: 20px 32px; justify-content: space-between; padding: 34px; }
.pricing h2 { font-size: 26px; letter-spacing: -.025em; margin-bottom: 6px; }
.pricing p { color: var(--muted); margin: 0; max-width: 520px; }
.price { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; margin-top: 72px; padding: 26px 20px; text-align: center; }
.footer p { margin: 0 0 6px; }
.footer a { color: inherit; font-weight: 600; }
.footer .made-in { color: var(--ink); font-size: 14px; font-weight: 600; justify-content: center; }

/* Made in Canada */
.made-in { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
.flag { border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .2); flex: none; height: 16px; width: 32px; }
.hero .made-in { color: var(--night-ink); font-size: 14.5px; font-weight: 600; }
.hero .flag { height: 18px; width: 36px; }

/* Privacy policy and terms */
.legal { margin: 24px auto 0; max-width: 760px; padding: 0 20px; }
.legal h1 { font-size: clamp(30px, 4vw, 40px); margin-bottom: 4px; }
.legal > .muted { margin-bottom: 26px; }
.legal h2 { font-size: 21px; margin: 34px 0 10px; }
.legal h3 { font-size: 16px; margin: 20px 0 6px; }
.legal p, .legal li { line-height: 1.7; }
.legal ul { margin: 0 0 12px; padding-left: 22px; }
.legal li { margin-bottom: 6px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 14px; }
.grid3 .card + .card, .grid4 .card + .card { margin-top: 0; }

/* App shell */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar { background:
    radial-gradient(120% 40% at 0% 0%, rgba(122, 92, 255, .35), transparent 70%),
    linear-gradient(180deg, var(--night), var(--night-2));
  color: var(--night-ink); display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh; }
.sidebar .logo { padding: 0 8px 4px; }
.clinic-name { color: var(--night-muted); font-size: 13px; overflow-wrap: anywhere; padding: 2px 8px 20px 47px; }
.nav a { align-items: center; border-radius: 10px; color: var(--night-muted); display: flex; font-weight: 600; justify-content: space-between; margin-bottom: 3px; padding: 9px 12px; text-decoration: none; transition: background .15s, color .15s; }
.nav a:hover { background: rgba(255, 255, 255, .07); color: var(--night-ink); }
.nav a.active { background: rgba(255, 255, 255, .12); box-shadow: inset 3px 0 0 #ff7a45; color: #fff; }
.count { background: #ff7a45; border-radius: 999px; color: #2a1206; font-size: 12px; font-weight: 800; min-width: 22px; padding: 0 7px; text-align: center; }
.sidebar-foot { border-top: 1px solid var(--night-line); color: var(--night-muted); font-size: 13px; margin-top: auto; overflow-wrap: anywhere; padding: 14px 8px 0; }
.sidebar-foot div { color: var(--night-ink); font-weight: 600; }
.sidebar-foot .linkish { color: var(--night-muted); }
.sidebar-foot .help { color: var(--night-muted); display: inline-block; margin: 8px 10px 0 0; }
.sidebar-foot .help:hover { color: var(--night-ink); }
.main { margin: 0 auto; max-width: 1000px; min-width: 0; padding: 34px 28px 64px; width: 100%; }
.page-head { align-items: flex-start; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-bottom: 20px; }
.page-head h2 { margin: 6px 0 0; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-bottom: 64px; padding-top: 24px; }
}
@media (max-width: 760px) {
  .app { display: block; }
  .sidebar { height: auto; padding: 14px 12px; position: static; }
  .clinic-name { padding-bottom: 10px; }
  .nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .nav a { padding: 7px 10px; }
  .nav a.active { box-shadow: inset 0 -2px 0 #ff7a45; }
  .sidebar-foot { align-items: center; display: flex; gap: 12px; justify-content: space-between; margin-top: 10px; }
  .main { padding: 22px 16px 48px; }
  .section-wrap { padding-top: 52px; }
  .pricing .card { padding: 24px; }
}
@media (max-width: 480px) {
  .topbar { gap: 12px; padding: 14px 16px; }
  .topbar .logo { font-size: 15px; }
  .topbar .btn { font-size: 14px; padding: 8px 14px; }
  .tile { padding: 14px; }
  .tile .value { font-size: 28px; }
}

/* Stat tiles */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 24px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: inherit; display: block; padding: 16px 18px; text-decoration: none; transition: border-color .15s, transform .15s; }
a.tile:hover { border-color: var(--brand); color: inherit; transform: translateY(-1px); }
.tile .value { display: block; font-size: 32px; font-variant-numeric: tabular-nums; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; }
.tile .label { color: var(--muted); font-size: 13px; font-weight: 500; }

/* Status labels: colour always comes with words */
.tag { border-radius: 999px; display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; white-space: nowrap; }
.tag.neutral { background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.tag.urgent { background: var(--critical-soft); color: var(--critical); }
.tag.warn { background: var(--warning-soft); color: var(--warning); }
.tag.good { background: var(--good-soft); color: var(--good); }
.tag.info { background: var(--brand-soft); color: var(--brand); }

/* Requests */
.filters { align-items: end; display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.filters label { flex: 1 1 150px; font-size: 13px; margin: 0; }
.filters .btn { padding: 10px 16px; }
.request { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 10px; padding: 16px 18px; }
.request.urgent { background: linear-gradient(90deg, var(--critical-soft), var(--surface) 40%); border-left: 4px solid var(--critical); }
.request-head { align-items: center; display: flex; flex-wrap: wrap; gap: 6px 8px; margin-bottom: 6px; }
.request-name { font-family: var(--font-display); font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.request-head .time { color: var(--muted); font-size: 13px; margin-left: auto; }
.request p { margin-bottom: 4px; }
.request details { margin-top: 8px; }
.request summary { color: var(--brand); cursor: pointer; font-size: 13px; font-weight: 700; }
.request-form { align-items: start; display: grid; gap: 8px; grid-template-columns: 180px 1fr auto; margin-top: 10px; }
.request-form textarea { margin: 0; min-height: 42px; }
.request-form select { margin: 0; }
@media (max-width: 620px) { .request-form { grid-template-columns: 1fr; } }
.pager { display: flex; gap: 10px; justify-content: space-between; margin-top: 14px; }
.empty { color: var(--muted); padding: 26px; text-align: center; }

/* Tables */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { border-bottom: 1px solid var(--line); padding: 11px 16px; text-align: left; white-space: nowrap; }
th { background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }

/* Onboarding */
.steps { display: flex; gap: 8px; list-style: none; margin: 0 0 24px; padding: 0; }
.steps li { border-top: 4px solid var(--line); border-radius: 2px; color: var(--muted); flex: 1; font-size: 13px; font-weight: 600; padding-top: 8px; }
.steps li.done { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.steps li.current { border-image: linear-gradient(90deg, var(--brand), var(--sun)) 1; color: var(--ink); }
.steps a { color: inherit; text-decoration: none; }
.wizard { margin: 18px auto 64px; max-width: 640px; padding: 0 16px; }
.wizard .card { padding: 24px; }
.actions { align-items: center; display: flex; gap: 12px; justify-content: space-between; margin-top: 8px; }
.review { margin: 0 0 16px; }
.review dt { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; margin-top: 12px; text-transform: uppercase; }
.review dd { margin: 2px 0 0; white-space: pre-line; }

/* Confirming the staff alert number */
.verify-box p { margin-bottom: 10px; }
.verify-box .tag { margin-right: 6px; }
.verify-actions { align-items: flex-start; display: flex; flex-wrap: wrap; gap: 10px; }
.code-form { display: flex; gap: 8px; }
.code-form input { font-family: var(--font-display); font-size: 17px; letter-spacing: .2em; margin: 0; max-width: 170px; text-align: center; }
.wizard .card + .card { margin-top: 14px; }

/* Test conversation */
.chat { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.bubble { border-radius: 16px; line-height: 1.5; max-width: 80%; padding: 10px 14px; white-space: pre-line; }
.bubble.agent { align-self: flex-start; background: var(--brand-soft); border-bottom-left-radius: 4px; }
.bubble.caller { align-self: flex-end; background: var(--surface-2); border: 1px solid var(--line); border-bottom-right-radius: 4px; }
.chat-form { display: flex; gap: 8px; }
.chat-form input { margin: 0; }
.section { margin-top: 28px; }
