/* OMI — design tokens from the Proveo/Omi canvas.
   Fraunces for display, Atkinson Hyperlegible for everything else.
   Calm palette: warm paper, deep ink, teal voice, amber waiting, green done, red over. */

@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 300 900; font-display: swap; src: url('/assets/fonts/fraunces-var-latin.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/atkinson-hyperlegible-400-latin.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/atkinson-hyperlegible-700-latin.woff2') format('woff2'); }

:root {
  --paper: #F6F1EA; --card: #FFFFFF; --line: #E3DBD0; --ink: #1E2A2E; --ink-2: #2A383D; --muted: #55606A; --stone: #B8B2A8;
  --teal: #1F6F6A; --teal-2: #154F4B; --teal-soft: #DCEEEB; --teal-line: #B9D9D5; --teal-glow: #8FD3CC;
  --amber: #B9701F; --amber-soft: #F8E7CF; --amber-line: #E8C595;
  --green: #2E7D4F; --green-soft: #DDEFE3;
  --red: #B23A3A; --red-soft: #F6DEDE; --red-line: #E5B9B9;
  --plum: #7A5C8E; --plum-soft: #EFE6F3; --plum-line: #C9B4D6;
  --slate-soft: #E6EAEC; --slate-line: #B8C2C7;
  --cream: #E8C595; --cream-text: #D8D2C8;
  --display: 'Fraunces', Georgia, serif; --body: 'Atkinson Hyperlegible', system-ui, -apple-system, sans-serif;
  --r-sm: 8px; --r: 10px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px;
}

html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); background: var(--paper); color: var(--ink); line-height: 1.45; }
a { color: var(--teal); }
a:hover { color: var(--teal-2); }
h1, h2, h3, .display { font-family: var(--display); font-weight: 600; letter-spacing: -0.3px; margin: 0; }
h1 { font-size: 2.2rem; line-height: 1.1; letter-spacing: -0.8px; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; font-weight: 500; }
p { margin: 0; }
img, svg { vertical-align: middle; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 560px; margin: 0 auto; padding: 0 24px; }

/* ---- Type helpers ---- */
.eyebrow { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 0.6px; text-transform: uppercase; }
.eyebrow.cream { color: var(--cream); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.lede { font-size: 1.1rem; line-height: 1.5; color: var(--muted); }
.big-num { font-family: var(--display); font-size: 2.1rem; line-height: 1.05; }
.ok { color: var(--green); } .warn { color: var(--amber); } .bad { color: var(--red); } .teal { color: var(--teal); }
.b { font-weight: 700; }

/* ---- Layout primitives ---- */
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grow { flex-grow: 1; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---- Cards ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.card-sm { padding: 14px 16px; border-radius: var(--r-md); }
.card-dark { background: var(--ink); color: var(--paper); border-radius: var(--r-lg); padding: 22px; }
.card-dark .muted { color: var(--cream-text); }
.card-dark a { color: var(--paper); }
.inset { background: var(--paper); border-radius: var(--r-md); padding: 12px 14px; }
.inset-dark { background: var(--ink-2); border-radius: 14px; padding: 18px; }

/* ---- Pills + dots ---- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill-teal { background: var(--teal-soft); color: var(--teal); }
.pill-green { background: var(--green-soft); color: var(--green); }
.pill-amber { background: var(--amber-soft); color: var(--amber); }
.pill-red { background: var(--red-soft); color: var(--red); }
.pill-slate { background: var(--slate-soft); color: var(--ink); }
.pill-plum { background: var(--plum-soft); color: var(--plum); }
.dot { width: 10px; height: 10px; border-radius: 5px; flex-shrink: 0; background: var(--stone); }
.dot-green { background: var(--green); } .dot-amber { background: var(--amber); } .dot-red { background: var(--red); } .dot-teal { background: var(--teal); }
.avatar { width: 36px; height: 36px; border-radius: 18px; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.avatar-lg { width: 40px; height: 40px; border-radius: 20px; }
.avatar-sm { width: 26px; height: 26px; border-radius: 13px; font-size: 11px; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border-radius: var(--r); border: 1px solid var(--ink); background: var(--card); color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.2; min-height: 44px; }
.btn:hover { background: var(--paper); color: var(--ink); }
.btn-primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-2); border-color: var(--teal-2); color: #fff; }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); color: #fff; }
.btn-soft { background: var(--teal-soft); border-color: var(--teal-line); color: var(--ink); }
.btn-soft:hover { background: #cfe6e2; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--card); }
.btn-quiet { background: transparent; border-color: var(--line); color: var(--muted); font-weight: 400; }
.btn-danger { background: var(--card); border-color: var(--red-line); color: var(--red); }
.btn-danger:hover { background: var(--red-soft); color: var(--red); }
.btn-dashed { background: transparent; border: 1px dashed var(--teal); color: var(--teal); }
.btn-red-soft { background: var(--red-soft); border-color: var(--red-line); color: var(--ink); }
.btn-paper { background: var(--paper); border-color: var(--line); color: var(--ink); }
.btn-lg { padding: 18px; font-size: 20px; border-radius: 18px; }
.btn-sm { padding: 6px 10px; font-size: 13px; min-height: 34px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-b { font-weight: 700; text-decoration: none; }
form.inline { display: inline; }

/* ---- Forms ---- */
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.input, input[type=text], input[type=email], input[type=password], input[type=number], input[type=time], input[type=date], input[type=search], select, textarea {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); font-size: 14px; background: var(--card); color: var(--ink); width: 100%; box-sizing: border-box; min-height: 44px;
}
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.check input { width: 18px; height: 18px; }
fieldset { border: none; padding: 0; margin: 0; }
legend { font-size: 13px; color: var(--muted); padding: 0 0 6px 0; }
.radio-card { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--card); }
.field-row { display: flex; gap: 10px; }
.field-row > * { flex: 1 1 0; min-width: 0; }
.daypick { display: flex; gap: 4px; flex-wrap: wrap; }
.daypick label { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 36px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; background: var(--card); }
.daypick input { position: absolute; opacity: 0; width: 0; height: 0; }
.daypick input:checked + span { color: var(--teal); }
.daypick label:has(input:checked) { background: var(--teal-soft); border-color: var(--teal); }

/* ---- Flash ---- */
.flash-stack { position: sticky; top: 0; z-index: 50; }
.flash { padding: 12px 16px; border-radius: var(--r-md); font-size: 14px; margin: 12px 0 0; border: 1px solid; }
.flash-success { background: var(--green-soft); border-color: #b9dcc5; color: var(--green); }
.flash-danger { background: var(--red-soft); border-color: var(--red-line); color: var(--red); }
.flash-info { background: var(--teal-soft); border-color: var(--teal-line); color: var(--teal); }
.flash-warning { background: var(--amber-soft); border-color: var(--amber-line); color: var(--amber); }

/* ---- Top bars ---- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.topbar-white { background: var(--card); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 36px; height: 36px; border-radius: 18px; background: var(--teal); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.brand-name { font-family: var(--display); font-size: 24px; font-weight: 600; letter-spacing: -0.5px; }
.brand-sub { font-size: 14px; color: var(--muted); padding-left: 12px; border-left: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 18px; font-size: 15px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink); }
.nav a.active { color: var(--teal); font-weight: 700; }
.badge { display: inline-flex; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; align-items: center; justify-content: center; }
.appbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.appbar .title { font-family: var(--display); font-size: 22px; font-weight: 600; padding-left: 14px; border-left: 1px solid var(--line); }
.subnav { display: flex; gap: 4px; flex-wrap: wrap; padding: 12px 0; }
.subnav a { padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 700; }
.subnav a.active { background: var(--ink); color: var(--paper); }
.subnav a:hover:not(.active) { background: var(--card); }

/* ---- Steps + live view ---- */
.steps { display: flex; flex-direction: column; gap: 6px; }
.step { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--paper); font-size: 15px; }
.step .time { width: 52px; font-size: 13px; color: var(--muted); }
.step .status { text-align: right; font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.step-done { background: var(--green-soft); border-color: var(--green-soft); } .step-done .status { color: var(--green); }
.step-pushed { background: var(--paper); border-color: var(--line); } .step-pushed .status { color: var(--muted); }
.step-waiting { background: var(--amber-soft); border-color: var(--amber-line); } .step-waiting .status { color: var(--amber); }
.step-over_max { background: var(--red-soft); border-color: var(--red-line); } .step-over_max .status { color: var(--red); }
.step-active { font-weight: 700; }
.pips { display: flex; gap: 6px; }
.pip { flex-grow: 1; height: 6px; border-radius: 3px; background: var(--line); }
.pip-done { background: var(--green); } .pip-active { background: var(--amber); } .pip-over { background: var(--red); }
.alert-over { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--red-soft); border: 1px solid var(--red-line); flex-wrap: wrap; }
.log { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow: auto; }
.log-line { display: flex; gap: 10px; font-size: 13px; line-height: 1.4; }
.log-line .t { width: 58px; color: var(--muted); flex-shrink: 0; }
.log-omi { color: var(--ink); } .log-ok { color: var(--green); font-weight: 700; } .log-warn { color: var(--red); font-weight: 700; } .log-nudge { color: var(--amber); font-weight: 700; } .log-plain { color: var(--muted); }
.voice-bars { display: flex; gap: 3px; align-items: flex-end; height: 18px; }
.voice-bars i { display: block; width: 4px; border-radius: 2px; background: var(--teal); }
.voice-bars i:nth-child(1){height:8px} .voice-bars i:nth-child(2){height:16px} .voice-bars i:nth-child(3){height:11px} .voice-bars i:nth-child(4){height:18px} .voice-bars i:nth-child(5){height:7px}
.voice-bars.idle i { background: var(--stone); }
.omi-line { font-family: var(--display); font-size: 1.7rem; line-height: 1.15; }
.pendant { width: 72px; height: 72px; border-radius: 36px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 0 0 10px var(--paper); }
.pendant i { display: block; width: 12px; height: 12px; border-radius: 6px; background: #fff; }
.pendant-listening { background: var(--teal); box-shadow: 0 0 0 10px var(--teal-soft); }
.pendant-waiting { background: var(--amber); }
.pendant-over_max { background: var(--red); }
.pendant-idle { background: var(--stone); }
.pendant-sm { width: 44px; height: 44px; border-radius: 22px; box-shadow: 0 0 0 5px var(--paper); }
.pendant-sm i { width: 10px; height: 10px; }
.pendant-sm.pendant-listening { box-shadow: 0 0 0 5px var(--teal-soft); }

/* Phone frame (the patient side, rendered inside the caregiver walkthrough) */
.phone { width: 300px; background: var(--ink); border-radius: 34px; padding: 12px; box-sizing: border-box; flex-shrink: 0; }
.phone-screen { background: var(--paper); border-radius: 24px; padding: 20px 18px; display: flex; flex-direction: column; gap: 14px; min-height: 560px; box-sizing: border-box; }

/* Patient phone page (real, full screen) */
.patient-page { min-height: 100vh; display: flex; flex-direction: column; padding: 28px 22px; gap: 18px; max-width: 480px; margin: 0 auto; box-sizing: border-box; }
.patient-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px 20px; display: flex; flex-direction: column; gap: 16px; flex-grow: 1; }
.patient-card .omi-line { font-size: 2rem; }

/* ---- Coverage strip ---- */
.strip { display: flex; gap: 4px; height: 64px; }
.strip-seg { border-radius: var(--r); padding: 8px 10px; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; overflow: hidden; border: 1px solid transparent; }
.strip-seg .n { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-seg .l { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-hours { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); padding: 0 2px; }
.member { display: flex; gap: 12px; padding: 12px; border-radius: var(--r-md); border: 1px solid var(--line); }
.member.primary { border-color: var(--teal); background: var(--teal-soft); }
.matrix { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 6px; font-size: 12px; }
.matrix > div { padding: 6px 0; border-top: 1px solid var(--ink-2); }
.matrix > div:nth-child(-n+3) { border-top: none; }
.matrix .c { text-align: center; }
.matrix .y { color: var(--teal-glow); font-weight: 700; }
.matrix .n { color: var(--cream-text); }

/* ---- Schedule builder ---- */
.builder { display: grid; grid-template-columns: 260px minmax(0, 1fr) 380px; gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); overflow: hidden; }
.builder > * { padding: 18px; min-width: 0; }
.builder .lib { border-right: 1px solid var(--line); }
.builder .edit { border-left: 1px solid var(--line); }
@media (max-width: 1100px) { .builder { grid-template-columns: 1fr; } .builder .lib, .builder .edit { border: none; border-top: 1px solid var(--line); } }
.cat { display: flex; justify-content: space-between; padding: 9px 12px; border-radius: var(--r); font-size: 14px; text-decoration: none; color: var(--ink); }
.cat.active { background: var(--teal-soft); font-weight: 700; }
.cat .c { color: var(--muted); } .cat.active .c { color: var(--teal); }
.lib-item { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); }
.lib-item.active { border-color: var(--teal); }
.lib-item .n { font-size: 14px; font-weight: 700; } .lib-item .d { font-size: 12px; color: var(--muted); }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 900px) { .week { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.day { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; }
.day.today { border-color: var(--teal); }
.day .dn { font-size: 13px; font-weight: 700; }
.sched { padding: 8px 10px; border-radius: var(--r); background: var(--card); display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); }
.sched .t { font-size: 12px; font-weight: 700; color: var(--muted); } .sched .n { font-size: 13px; font-weight: 700; }
.sched.teal { background: var(--teal-soft); border-color: var(--teal-soft); } .sched.teal .t { color: var(--teal); }
.sched.amber { background: var(--amber-soft); border-color: var(--amber-soft); } .sched.amber .t { color: var(--amber); }
.sched.paused { opacity: .55; }
.drop { padding: 10px; border-radius: var(--r); border: 1px dashed var(--line); font-size: 12px; color: var(--muted); text-align: center; }
.step-edit { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); }
.step-edit.active { border-color: var(--teal); background: var(--teal-soft); }
.step-edit .i { width: 22px; font-size: 13px; color: var(--muted); } .step-edit.active .i { color: var(--teal); }
.step-edit .n { flex-grow: 1; font-size: 14px; font-weight: 700; } .step-edit .m { font-size: 12px; color: var(--muted); }
.iconbtn { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; color: var(--ink); }

/* ---- Reports ---- */
.bar { flex-grow: 1; height: 16px; background: var(--paper); border-radius: 8px; position: relative; }
.bar > b { display: block; height: 16px; border-radius: 8px; background: var(--green); }
.bar > b.amber { background: var(--amber); } .bar > b.red { background: var(--red); }
.bar > i { position: absolute; top: -3px; width: 2px; height: 22px; background: var(--ink); }
.rep-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; font-size: 14px; }
.rep-row .lbl { width: 150px; flex-shrink: 0; } .rep-row .num { width: 62px; text-align: right; flex-shrink: 0; } .rep-row .wide { width: 150px; text-align: right; font-size: 13px; color: var(--muted); flex-shrink: 0; }
.rep-row.hot { background: var(--amber-soft); border-radius: var(--r); margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
.rep-row.hot .bar { background: var(--card); }
.rep-head { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .4px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.daycell { flex-grow: 1; padding: 10px; border-radius: var(--r); background: var(--paper); display: flex; flex-direction: column; gap: 2px; }
.daycell.amber { background: var(--amber-soft); } .daycell.green { background: var(--green-soft); }

/* ---- Devices ---- */
.code-boxes { display: flex; gap: 8px; justify-content: center; padding: 6px 0; }
.code-boxes b { width: 44px; height: 52px; border-radius: var(--r); background: var(--ink-2); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 26px; font-weight: 500; color: var(--paper); }
.code-boxes.light b { background: var(--card); border: 1px solid var(--line); color: var(--ink); }

/* ---- Notifications ---- */
.notif { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--card); align-items: flex-start; }
.notif.unread { border-left: 4px solid var(--teal); }
.notif.action { border-color: var(--red-line); background: #fff8f8; }
.notif.nudge { border-color: var(--amber-line); }

/* ---- Marketing site ---- */
.hero { display: flex; gap: 56px; padding: 72px 0 56px; align-items: center; flex-wrap: wrap; }
.hero h1 { font-size: 3.4rem; line-height: 1.05; letter-spacing: -1px; }
@media (max-width: 700px) { .hero h1 { font-size: 2.4rem; } .hero { padding: 40px 0 32px; } }
.hero .copy { flex: 1 1 480px; max-width: 600px; display: flex; flex-direction: column; gap: 22px; }
.hero .art { display: flex; gap: 20px; align-items: flex-end; flex-wrap: wrap; }
.section { padding: 24px 0 48px; display: flex; flex-direction: column; gap: 24px; }
.section h2 { font-size: 2.1rem; letter-spacing: -0.5px; }
.icon-tile { width: 44px; height: 44px; border-radius: 12px; background: var(--teal-soft); display: inline-flex; align-items: center; justify-content: center; }
.six { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 700px) { .six { grid-template-columns: 1fr; } }
.timeline { display: flex; gap: 12px; flex-wrap: wrap; }
.timeline > div { flex: 1 1 150px; }
footer.site { padding: 28px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.minipage { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; width: 300px; display: flex; flex-direction: column; gap: 12px; }
.miniphone { width: 220px; height: 440px; background: var(--ink); border-radius: 30px; padding: 12px; box-sizing: border-box; display: flex; }
.miniphone > div { flex-grow: 1; background: var(--paper); border-radius: 20px; padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; }

/* ---- Auth pages ---- */
.auth { max-width: 440px; margin: 48px auto; display: flex; flex-direction: column; gap: 18px; }

/* ---- Misc ---- */
.hr { border: none; border-top: 1px solid var(--line); margin: 6px 0; }
.kbd { display: inline-block; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line); background: var(--paper); font-size: 12px; }
code.api { display: block; background: var(--ink); color: var(--paper); padding: 12px 14px; border-radius: var(--r); font-size: 12.5px; white-space: pre; overflow: auto; line-height: 1.5; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: .4px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 8px; border-bottom: 1px solid var(--paper); vertical-align: top; }
.page-plain { max-width: 640px; margin: 64px auto; padding: 0 24px; display: flex; flex-direction: column; gap: 14px; }

/* ---- Voice layer states (patient phone) ---- */
#phone.is-speaking .voice-bars i { animation: bars .9s ease-in-out infinite alternate; }
#phone.is-speaking .voice-bars i:nth-child(2) { animation-delay: .15s } #phone.is-speaking .voice-bars i:nth-child(3) { animation-delay: .3s } #phone.is-speaking .voice-bars i:nth-child(4) { animation-delay: .45s } #phone.is-speaking .voice-bars i:nth-child(5) { animation-delay: .6s }
@keyframes bars { from { transform: scaleY(.4) } to { transform: scaleY(1.1) } }
#phone.is-listening .patient-card { border-color: var(--teal); box-shadow: 0 0 0 6px var(--teal-soft); }
#phone.is-listening #voice-status { color: var(--teal); font-weight: 700; }
.voice-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 600px) { .voice-pick { grid-template-columns: 1fr 1fr; } }
.voice-pick label { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer; background: var(--card); }
.voice-pick label:has(input:checked) { border-color: var(--teal); background: var(--teal-soft); }
.voice-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
[hidden] { display: none !important; }
