/* Design system for the app and the landing page. Mobile first, light and dark, no build step.
   Tokens first; then base elements; then components; then the screens. */

/* Direction C "Sharp": navy ground, one lime accent, Manrope.
   Lime is only a fill under navy text, or text/marks on navy. Never lime text on white. */
:root {
  color-scheme: light;
  /* fixed brand colours (the same in light and dark) */
  --navy: #0B1530; --navy-2: #142046; --navy-3: #1B2A57; --navy-line: #2A3658;
  --on-navy: #EEF1F8; --on-navy-2: #AEB6CC; --on-navy-3: #8C96B3;
  --lime: #C6F432; --lime-hover: #B0DE1E; --lime-soft: #EEF9C6; --lime-deep: #3F5200;
  /* light surfaces */
  --bg: #F5F7FB;
  --bg-2: #EBEFF6;
  --surface: #ffffff;
  --surface-2: #F8FAFD;
  --line: #E1E6EF;
  --line-strong: #C9D1DF;
  --text: #0B1530;
  --text-2: #34405E;
  --muted: #59637F;
  --primary: #0B1530;          /* navy buttons with lime text */
  --primary-hover: #1B2A57;
  --primary-soft: #EEF9C6;     /* soft lime fill, navy text on it */
  --primary-ink: #C6F432;
  --ink: #0B1530;              /* navy panels inside light pages */
  --ink-2: #142046;
  --accent: #C6F432;           /* lime fill, navy text */
  --accent-soft: #EEF9C6;
  --accent-text: #3F5200;
  --ok: #157347;
  --ok-soft: #E1F3E9;
  --warn: #8A5300;
  --warn-soft: #FBF0D9;
  --danger: #B4261D;
  --danger-soft: #FBE6E3;
  --focus: #0B1530;
  --shadow-1: 0 1px 2px rgba(11, 21, 48, .06), 0 1px 1px rgba(11, 21, 48, .04);
  --shadow-2: 0 2px 4px rgba(11, 21, 48, .04), 0 10px 28px rgba(11, 21, 48, .08);
  --shadow-3: 0 16px 48px rgba(11, 21, 48, .22), 0 2px 8px rgba(11, 21, 48, .08);
  /* 8px scale */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --r-sm: 8px; --r: 12px; --r-lg: 14px; --r-xl: 20px; --r-pill: 999px;
  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --fast: 140ms; --med: 240ms;
  --tabbar: 64px;
  --maxw: 1160px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0B1530; --bg-2: #101C3E; --surface: #142046; --surface-2: #111C40; --line: #2A3658; --line-strong: #3A4770;
    --text: #EEF1F8; --text-2: #CBD1E1; --muted: #AEB6CC;
    --primary: #C6F432; --primary-hover: #B0DE1E; --primary-soft: color-mix(in srgb, #C6F432 14%, #142046); --primary-ink: #0B1530;
    --ink: #142046; --ink-2: #1B2A57;
    --accent: #C6F432; --accent-soft: color-mix(in srgb, #C6F432 14%, #142046); --accent-text: #C6F432;
    --ok: #5FD99A; --ok-soft: #12312A; --warn: #F2BE5C; --warn-soft: #33290F; --danger: #FF8A80; --danger-soft: #3D1A22;
    --focus: #C6F432;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-2: 0 2px 6px rgba(0, 0, 0, .25), 0 10px 30px rgba(0, 0, 0, .3);
    --shadow-3: 0 16px 60px rgba(0, 0, 0, .55);
  }
}

/* --- base --------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; min-height: 100vh; min-height: 100dvh;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.4px; font-weight: 800; color: var(--text); }
h1 { font-size: clamp(1.65rem, 1.3rem + 1.3vw, 2.1rem); letter-spacing: -1px; line-height: 1.1; }
h2 { font-size: 1.25rem; letter-spacing: -.5px; }
h3 { font-size: 1.05rem; letter-spacing: -.2px; }
p { margin: 0; }
a { color: var(--primary); text-underline-offset: 3px; }
img, svg { display: block; }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 16px; height: 16px; }
.icon.lg { width: 24px; height: 24px; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--lime); color: var(--navy); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack > * + * { margin-top: var(--s3); }
.stack-lg > * + * { margin-top: var(--s5); }
.row { display: flex; gap: var(--s2); align-items: center; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row > .grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.break { overflow-wrap: anywhere; }

/* --- form controls ----------------------------------------------------------------------------- */
.field { display: block; }
.field + .field, .field + .field-row, .field-row + .field { margin-top: var(--s4); }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s3); }
.label { display: block; font-weight: 600; font-size: .9rem; color: var(--text); margin-bottom: 6px; }
.help { display: block; font-size: .84rem; color: var(--muted); margin-top: 6px; line-height: 1.45; }
input, select, textarea {
  width: 100%; min-height: 48px; font: inherit; font-size: 16px; color: var(--text);
  padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--surface); transition: border-color var(--fast), box-shadow var(--fast), background var(--fast);
  -webkit-appearance: none; appearance: none;
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--line-strong)); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); outline: none; }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
input[type=time] { min-width: 0; font-variant-numeric: tabular-nums; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon input { padding-left: 44px; }

/* switch (a styled checkbox) */
.switch { position: relative; display: inline-flex; align-items: center; flex: none; width: 46px; height: 28px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; width: 100%; height: 100%; }
.switch span { position: absolute; inset: 0; border-radius: var(--r-pill); background: var(--line-strong); transition: background var(--fast); }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform var(--med) var(--ease); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 0 20px; border-radius: var(--r); border: 1px solid transparent;
  font: inherit; font-weight: 800; font-size: .98rem; letter-spacing: -.1px; line-height: 1;
  background: var(--primary); color: var(--primary-ink); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background var(--fast), border-color var(--fast), color var(--fast), transform var(--fast), box-shadow var(--fast);
  box-shadow: var(--shadow-1); -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:hover { background: var(--primary-hover); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled], .btn[aria-busy=true] { opacity: .6; cursor: progress; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn.secondary:hover { border-color: var(--text); color: var(--text); background: var(--surface-2); }
.btn.ghost { background: transparent; color: var(--text-2); box-shadow: none; }
.btn.ghost:hover { background: var(--bg-2); color: var(--text); }
.btn.quiet { background: var(--primary-soft); color: var(--text); box-shadow: none; }
.btn.quiet:hover { background: color-mix(in srgb, var(--lime) 45%, var(--primary-soft)); color: var(--text); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger-ghost { background: transparent; color: var(--danger); box-shadow: none; border-color: transparent; }
.btn.danger-ghost:hover { background: var(--danger-soft); }
.btn.accent { background: var(--lime); color: var(--navy); }
.btn.accent:hover { background: var(--lime-hover); }
.btn.light { background: var(--lime); color: var(--navy); box-shadow: none; }
.btn.light:hover { background: var(--lime-hover); }
.btn.sm { min-height: 44px; padding: 0 14px; font-size: .9rem; border-radius: 10px; }
.btn.lg { min-height: 56px; padding: 0 28px; font-size: 1.05rem; border-radius: var(--r); }
.btn.block { width: 100%; }
.btn.icon-only { width: 44px; padding: 0; }
.btn .spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.link { background: none; border: 0; padding: 10px 4px; min-height: 44px; font: inherit; font-weight: 800; color: var(--text); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--text) 30%, transparent); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.link:hover { text-decoration: underline; }

/* chips / pills */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); font-size: .78rem; font-weight: 600; letter-spacing: .005em;
  background: var(--bg-2); color: var(--text-2); white-space: nowrap; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.danger, .chip.urgent { background: var(--danger-soft); color: var(--danger); }
.chip.primary { background: var(--primary-soft); color: var(--text); }
.chip.accent { background: var(--accent-soft); color: var(--accent-text); }
.chips { display: flex; gap: var(--s2); flex-wrap: wrap; }
.filter { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text-2); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; transition: all var(--fast); white-space: nowrap; }
.filter:hover { border-color: var(--text); }
.filter[aria-pressed=true] { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
@media (prefers-color-scheme: dark) { .filter[aria-pressed=true] { background: var(--lime); border-color: var(--lime); color: var(--navy); } }
.filter .count { font-size: .75rem; opacity: .7; font-variant-numeric: tabular-nums; }
.scroll-x { display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--s4)); padding: 2px var(--s4); }
.scroll-x::-webkit-scrollbar { display: none; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); box-shadow: var(--shadow-1); min-width: 0; }
.card.tight { padding: var(--s4); }
.card.flat { box-shadow: none; }
.card + .card { margin-top: var(--s3); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.card-head h2, .card-head h3 { display: flex; align-items: center; gap: var(--s2); }
.list { display: flex; flex-direction: column; gap: var(--s3); }
.divider { height: 1px; background: var(--line); border: 0; margin: var(--s4) 0; }
.notice { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--bg-2); color: var(--text-2); font-size: .9rem; }
.notice .icon { margin-top: 1px; }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.danger { background: var(--danger-soft); color: var(--danger); }
.notice.primary { background: var(--primary-soft); color: var(--text); }
.error { color: var(--danger); font-weight: 600; font-size: .92rem; display: flex; gap: 8px; align-items: flex-start; margin-top: var(--s3); }
.kbd { font: 600 .95em/1 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg-2); padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); white-space: nowrap; user-select: all; }

/* choice cards (radio-like buttons) */
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.choices.one { grid-template-columns: minmax(0, 1fr); }
.choice { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); width: 100%; min-height: 64px; text-align: left;
  padding: var(--s4); border-radius: var(--r-lg); border: 1.5px solid var(--line); background: var(--surface); color: var(--text);
  font: inherit; cursor: pointer; transition: border-color var(--fast), box-shadow var(--fast), transform var(--fast), background var(--fast); box-shadow: var(--shadow-1); }
.choice:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
.choice:active { transform: scale(.99); }
.choice[aria-pressed=true], .choice[aria-checked=true] { border-color: var(--primary); background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent); }
.choice .choice-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-2); color: var(--primary); transition: background var(--fast), color var(--fast); }
.choice[aria-pressed=true] .choice-icon, .choice[aria-checked=true] .choice-icon { background: var(--primary); color: var(--primary-ink); }
.choice .choice-title { font-weight: 600; line-height: 1.3; }
.choice .choice-text { font-size: .86rem; color: var(--muted); line-height: 1.4; }
.choice .tick { position: absolute; right: 12px; top: 12px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; color: transparent; transition: all var(--fast); }
.choice[aria-pressed=true] .tick, .choice[aria-checked=true] .tick { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.choice.row-choice { flex-direction: row; align-items: center; }
.toggle-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong);
  background: var(--surface); color: var(--text-2); font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; transition: all var(--fast); }
.toggle-chip[aria-pressed=true] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.toggle-chip .icon { width: 16px; height: 16px; }
.toggle-chip:not([aria-pressed=true]) .icon { display: none; }

/* skeletons */
.skel { position: relative; overflow: hidden; background: var(--bg-2); border-radius: var(--r-sm); }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 70%, transparent), transparent); animation: shimmer 1.4s infinite; }
.skel.line { height: 14px; margin: 8px 0; } .skel.line.w60 { width: 60%; } .skel.line.w40 { width: 40%; } .skel.line.w80 { width: 80%; }
.skel.block { height: 88px; border-radius: var(--r-lg); }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 50%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.enter { animation: fade-up var(--med) var(--ease) both; }

/* empty states */
.empty { text-align: center; padding: var(--s7) var(--s5); display: flex; flex-direction: column; align-items: center; gap: var(--s3); }
.empty .art { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: var(--s2); }
.empty .art .icon { width: 32px; height: 32px; stroke-width: 1.6; }
.empty h3 { font-size: 1.1rem; }
.empty p { color: var(--muted); max-width: 34ch; }
.empty .btn { margin-top: var(--s2); }

/* toasts */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--s4) + env(safe-area-inset-bottom)); z-index: 80; display: flex; flex-direction: column; gap: var(--s2); width: min(420px, calc(100vw - 32px)); pointer-events: none; }
body.has-tabbar .toasts, body.has-actions .toasts { bottom: calc(var(--tabbar) + var(--s4) + env(safe-area-inset-bottom)); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: var(--s3); padding: 14px 16px; border-radius: var(--r); background: var(--navy); color: var(--on-navy); box-shadow: var(--shadow-3); font-weight: 600; font-size: .94rem; animation: fade-up var(--med) var(--ease) both; border: 1px solid var(--navy-line); }
.toast .icon { color: var(--lime); }
.toast.error .icon { color: #FF8A80; }
.toast.out { opacity: 0; transform: translateY(6px); transition: all var(--med) var(--ease); }
@media (prefers-color-scheme: dark) { .toast { background: var(--on-navy); color: var(--navy); border-color: transparent; } .toast .icon { color: var(--navy); } .toast.error .icon { color: #B4261D; } }

/* sheets (drawer on desktop, bottom sheet on phones) and dialogs */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(11, 21, 48, .5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade var(--med) var(--ease) both; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; max-height: 92dvh; display: flex; flex-direction: column; background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: var(--shadow-3); animation: sheet-up 320ms var(--ease) both; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 10px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4) var(--s3) var(--s5); border-bottom: 1px solid var(--line); flex: none; }
.sheet-head h2 { font-size: 1.1rem; flex: 1; min-width: 0; }
.sheet-body { overflow-y: auto; padding: var(--s5); padding-bottom: calc(var(--s5) + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.sheet.dialog { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100vw - 32px)); border-radius: 20px; animation: dialog-in 220ms var(--ease) both; }
@keyframes dialog-in { from { opacity: 0; transform: translate(-50%, -48%) scale(.98); } }
@media (min-width: 900px) {
  .sheet:not(.dialog) { left: auto; top: 0; bottom: 0; width: 520px; max-height: none; border-radius: 0; animation: drawer-in 300ms var(--ease) both; }
  .sheet:not(.dialog) .sheet-grip { display: none; }
  .sheet:not(.dialog) .sheet-head { padding: var(--s4) var(--s4) var(--s4) var(--s6); }
  .sheet:not(.dialog) .sheet-body { padding: var(--s6); }
  @keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } }
}
body.locked { overflow: hidden; }

/* --- brand mark ------------------------------------------------------------------------------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; letter-spacing: -.5px; color: var(--text); text-decoration: none; min-width: 0; }
.brand .mark { width: 32px; height: 32px; flex: none; display: block; }
.brand.light { color: var(--on-navy); }
.brand .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- app frame ------------------------------------------------------------------------------- */
#app { min-height: 100vh; min-height: 100dvh; }
.boot { min-height: 100dvh; display: grid; place-items: center; }
.boot .brand .mark { animation: pop 600ms var(--ease) both; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: var(--s3); height: 60px; padding: 0 var(--s4);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.page { width: 100%; max-width: 680px; margin: 0 auto; padding: var(--s5) var(--s4) calc(var(--s9) + env(safe-area-inset-bottom)); }
.page.wide { max-width: var(--maxw); }
.page-head { margin-bottom: var(--s5); }
.page-head h1 + p { margin-top: var(--s2); color: var(--muted); font-size: 1.02rem; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); margin-bottom: var(--s2); }

/* sticky action bar (wizard and forms) */
.actions { position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; padding: var(--s3) var(--s4) calc(var(--s3) + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.actions .inner { max-width: 680px; margin: 0 auto; display: flex; gap: var(--s3); align-items: center; }
.actions .btn { flex: 1; }
.actions .btn.secondary { flex: 0 0 auto; }
@media (min-width: 720px) { .actions .btn { flex: 0 0 auto; min-width: 160px; } .actions .inner { justify-content: space-between; } .actions .inner .btn:only-child { margin-left: auto; } }

/* --- sign in ----------------------------------------------------------------------------------- */
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); }
.auth-hero { display: none; }
.auth-main { display: flex; flex-direction: column; min-height: 100dvh; padding: var(--s4); }
.auth-main .top { display: flex; align-items: center; justify-content: space-between; height: 48px; }
.auth-card { width: 100%; max-width: 420px; margin: auto; padding: var(--s6) 0; }
.auth-card h1 { margin-bottom: var(--s2); }
.auth-card .lead { color: var(--muted); margin-bottom: var(--s5); }
.auth-card form > * + * { margin-top: var(--s4); }
.auth-foot { text-align: center; color: var(--muted); font-size: .82rem; padding: var(--s3) 0; }
.auth-foot a { color: var(--text-2); text-decoration: none; } .auth-foot a:hover { text-decoration: underline; }
.trust-row { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-top: var(--s5); color: var(--muted); font-size: .85rem; }
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.trust-row .icon { width: 16px; height: 16px; color: var(--primary); }
.otp { position: relative; }
.otp input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; font-size: 16px; caret-color: transparent; z-index: 1; cursor: text; }
.otp .cells { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s2); }
.otp .cell { height: 60px; border-radius: var(--r); border: 1.5px solid var(--line-strong); background: var(--surface); display: grid; place-items: center;
  font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; transition: border-color var(--fast), box-shadow var(--fast); }
.otp .cell.filled { border-color: color-mix(in srgb, var(--primary) 55%, var(--line-strong)); }
.otp.focus .cell.active { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
.otp.focus .cell.active:empty::after { content: ""; width: 2px; height: 26px; background: var(--primary); animation: blink 1s steps(2) infinite; }
.otp.bad .cell { border-color: var(--danger); animation: shake 300ms; }
.otp.long .cells { grid-template-columns: repeat(8, minmax(0, 1fr)); }
@keyframes blink { 50% { opacity: 0; } }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (min-width: 960px) {
  .auth { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .auth-hero { display: flex; flex-direction: column; justify-content: space-between; padding: var(--s7); color: var(--on-navy); position: relative; overflow: hidden;
    background: radial-gradient(60% 50% at 100% 0%, rgba(198, 244, 50, .10) 0%, transparent 70%), var(--navy); border-right: 1px solid var(--navy-line); }
  .auth-hero .brand { color: var(--on-navy); }
  .auth-hero .eyebrow { color: var(--lime); margin-bottom: var(--s4); }
  .auth-hero h2 { color: var(--on-navy); font-size: 2.75rem; letter-spacing: -1.4px; line-height: 1.04; max-width: 13ch; }
  .auth-hero p { color: var(--on-navy-2); max-width: 40ch; margin-top: var(--s4); font-size: 1.05rem; }
  .auth-main { padding: var(--s5) var(--s7); }
}

/* the example conversation used on sign-in and on the landing page */
.convo { display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.convo .b { max-width: 86%; padding: 12px 14px; border-radius: 16px; font-size: .93rem; line-height: 1.45; animation: fade-up 500ms var(--ease) both; }
.convo .b.ai { align-self: flex-start; background: var(--navy-2); color: var(--on-navy); border: 1px solid var(--navy-line); border-bottom-left-radius: 6px; }
.convo .b.caller { align-self: flex-end; background: var(--lime); color: var(--navy); border-bottom-right-radius: 6px; font-weight: 600; }
.convo .who { display: block; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 800; opacity: .7; margin-bottom: 2px; }
.convo .event { align-self: center; font-size: .78rem; font-weight: 600; color: var(--lime); display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 99px; border: 1px solid rgba(198, 244, 50, .35); }
.convo .b:nth-child(2) { animation-delay: 150ms; } .convo .b:nth-child(3) { animation-delay: 300ms; } .convo .b:nth-child(4) { animation-delay: 450ms; } .convo :nth-child(5) { animation-delay: 600ms; }
.example-label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-navy-3); margin-bottom: var(--s3); font-weight: 800; }

/* --- wizard ------------------------------------------------------------------------------------ */
.wiz-top { justify-content: space-between; }
.wiz-top .step-count { font-size: .85rem; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.stepper { display: flex; gap: 6px; margin-bottom: var(--s5); }
.stepper .seg { flex: 1; height: 4px; border-radius: 4px; background: var(--line); position: relative; overflow: hidden; }
.stepper .seg.done, .stepper .seg.now { background: var(--primary); }
.stepper .seg.now { background: linear-gradient(90deg, var(--primary) 50%, var(--line) 50%); background-size: 200% 100%; animation: fill 600ms var(--ease) both; }
@keyframes fill { from { background-position: 100% 0; } to { background-position: 0 0; } }
.stepper-labels { display: none; }
.step-name { font-size: .82rem; font-weight: 600; color: var(--primary); margin-bottom: var(--s2); display: flex; gap: 6px; align-items: center; }
@media (min-width: 900px) {
  .wizard-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--s7); max-width: 1000px; margin: 0 auto; padding: var(--s6) var(--s5) var(--s9); }
  .wizard-layout .page { padding: 0; margin: 0; }
  .stepper { display: none; }
  .step-name { display: none; }
  .stepper-labels { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 92px; align-self: start; }
  .stepper-labels .sl { display: flex; align-items: center; gap: var(--s3); padding: 10px 12px; border-radius: 10px; color: var(--muted); font-size: .92rem; font-weight: 600; }
  .stepper-labels .sl .n { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; font-size: .78rem; font-weight: 800; flex: none; background: var(--surface); }
  .stepper-labels .sl.done { color: var(--text-2); }
  .stepper-labels .sl.done .n { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
  .stepper-labels .sl.now { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-1); border: 1px solid var(--line); }
  .stepper-labels .sl.now .n { border-color: var(--primary); color: var(--primary); }
}

/* types grid */
.type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
@media (min-width: 720px) { .type-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* website reading */
.reading { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: var(--s5); background: var(--navy); color: var(--on-navy); border: 1px solid var(--navy-line); }
.reading .scan { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0%, rgba(198, 244, 50, .10) 48%, rgba(198, 244, 50, .28) 50%, transparent 52%); background-size: 100% 220%; animation: scan 2.2s var(--ease) infinite; pointer-events: none; }
@keyframes scan { from { background-position: 0 100%; } to { background-position: 0 -100%; } }
.reading .row { position: relative; }
.reading .url { font: 500 .85rem ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--lime); overflow-wrap: anywhere; }
.reading .msg { font-weight: 600; font-size: 1.05rem; margin-top: var(--s3); min-height: 1.6em; position: relative; }
.reading .lines { margin-top: var(--s4); position: relative; }
.reading .lines i { display: block; height: 8px; border-radius: 4px; background: rgba(255,255,255,.1); margin: 8px 0; }
.reading .lines i:nth-child(1) { width: 80%; } .reading .lines i:nth-child(2) { width: 64%; } .reading .lines i:nth-child(3) { width: 72%; } .reading .lines i:nth-child(4) { width: 40%; }
.pulse-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(198, 244, 50, .6); animation: pulse-teal 1.4s infinite; flex: none; }
@keyframes pulse-teal { 0% { box-shadow: 0 0 0 0 rgba(198, 244, 50, .55); } 100% { box-shadow: 0 0 0 12px transparent; } }
.found { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.found .stat { padding: var(--s3); border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-align: center; }
.found .stat b { display: block; font-size: 1.4rem; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.found .stat span { font-size: .78rem; color: var(--muted); }
.fact { padding: var(--s4); animation: fade-up var(--med) var(--ease) both; }
.fact .fact-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s3); }
.fact input.title { font-weight: 600; }
.fact textarea { margin-top: var(--s2); min-height: 72px; font-size: .95rem; }
.fact .field-row { margin-top: var(--s2); }
.money { position: relative; } .money::before { content: "£"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.money input { padding-left: 28px; }
.suffix { position: relative; } .suffix::after { content: attr(data-suffix); position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .88rem; }

/* hours */
.hours { display: flex; flex-direction: column; }
.day { display: grid; grid-template-columns: 46px 52px minmax(0, 1fr); gap: var(--s3); align-items: center; min-height: 64px; padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.day:last-child { border-bottom: 0; }
.day .dname { font-weight: 600; }
.day .times { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: center; }
.day .times input { padding: 10px 8px; min-height: 44px; text-align: center; }
.day .times .to { color: var(--muted); font-size: .85rem; }
.day .closed { color: var(--muted); font-size: .92rem; }
@media (min-width: 560px) { .day { grid-template-columns: 52px 120px minmax(0, 1fr); } }

/* receptionist preview bubble */
.opening { border-radius: var(--r-lg); padding: var(--s4); background: var(--navy); color: var(--on-navy); display: flex; gap: var(--s3); align-items: flex-start; border: 1px solid var(--navy-line); }
.opening .avatar { width: 36px; height: 36px; border-radius: 10px; flex: none; background: var(--lime); display: grid; place-items: center; color: var(--navy); font-weight: 800; font-size: .9rem; }
.opening .say { font-size: .95rem; line-height: 1.5; }
.opening .say .fixed { color: var(--lime); }
.opening .meta { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-navy-3); font-weight: 800; margin-bottom: 4px; }
.voices { display: flex; flex-direction: column; gap: var(--s2); }
.voice { display: flex; align-items: center; gap: var(--s3); padding: 10px 10px 10px 16px; border-radius: var(--r); border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; transition: all var(--fast); min-height: 60px; }
.voice[aria-checked=true] { border-color: var(--primary); background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface)); }
.voice .radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; display: grid; place-items: center; }
.voice[aria-checked=true] .radio { border-color: var(--primary); }
.voice[aria-checked=true] .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.voice .vname { font-weight: 600; }
.voice .vmeta { font-size: .82rem; color: var(--muted); }
.voice .play { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--bg-2); color: var(--text); display: grid; place-items: center; cursor: pointer; flex: none; transition: all var(--fast); }
.voice .play:hover { background: var(--primary); color: var(--primary-ink); }
.voice .play.playing { background: var(--primary); color: var(--primary-ink); animation: pulse-teal 1.2s infinite; }
.voice .play .icon { width: 16px; height: 16px; fill: currentColor; }

/* test-call invitation */
.invite { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: var(--s6) var(--s5); color: var(--on-navy); text-align: center;
  background: radial-gradient(70% 60% at 50% 0%, rgba(198, 244, 50, .10) 0%, transparent 70%), var(--navy); border: 1px solid var(--navy-line); }
.invite h2 { color: var(--on-navy); font-size: 1.6rem; letter-spacing: -.8px; margin-top: var(--s5); }
.invite p { color: var(--on-navy-2); margin: var(--s2) auto 0; max-width: 40ch; }
.invite .btn { margin-top: var(--s5); }
.invite .knows { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2); margin-top: var(--s4); }
.invite .knows span { font-size: .8rem; font-weight: 600; padding: 6px 12px; border-radius: 99px; background: var(--navy-2); border: 1px solid var(--navy-line); color: var(--on-navy); display: inline-flex; align-items: center; gap: 6px; }
.invite .knows .icon { width: 14px; height: 14px; color: var(--lime); }
.tries { margin-top: var(--s5); }
.tries .try { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.tries .try:last-child { border-bottom: 0; }
.tries .try .q { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--lime); color: var(--navy); flex: none; font-size: .8rem; font-weight: 800; }

/* the sound wave (call screen, invitations, status card): a lime tile, like the logo, with five navy
   bars. The call screen sets --ai (its voice) and --you (the caller) from 0 to 1. */
.orb { --ai: 0; --you: 0; position: relative; width: 168px; height: 168px; margin: 0 auto; border-radius: 24%; background: var(--lime);
  display: flex; align-items: center; justify-content: center; gap: 7%; flex: none;
  box-shadow: 0 0 0 calc(var(--ai) * 14px) rgba(198, 244, 50, .16), 0 24px 60px -18px rgba(198, 244, 50, .45); transition: box-shadow 90ms linear; }
.orb::before { content: ""; position: absolute; inset: -12px; border-radius: 28%; border: 2px solid rgba(198, 244, 50, calc(.18 + var(--you) * .82));
  transform: scale(calc(1 + var(--you) * .1)); transition: transform 90ms linear; pointer-events: none; }
.orb i { --k: .5; display: block; width: 8.5%; height: calc(var(--k) * 62%); border-radius: 99px; background: var(--navy);
  transform: scaleY(calc(.55 + var(--ai) * .9)); transform-origin: center; transition: transform 90ms linear; }
.orb i:nth-child(1) { --k: .34; } .orb i:nth-child(2) { --k: .72; } .orb i:nth-child(3) { --k: 1; } .orb i:nth-child(4) { --k: .56; } .orb i:nth-child(5) { --k: .3; }
.orb.idle i { animation: wave 1.6s ease-in-out infinite; }
.orb.idle i:nth-child(2) { animation-delay: -.2s; } .orb.idle i:nth-child(3) { animation-delay: -.4s; } .orb.idle i:nth-child(4) { animation-delay: -.6s; } .orb.idle i:nth-child(5) { animation-delay: -.8s; }
.orb.sm { width: 112px; height: 112px; }
@keyframes wave { 0%, 100% { transform: scaleY(.6); } 50% { transform: scaleY(1); } }

/* call screen */
.call-screen { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; color: var(--on-navy); overflow-y: auto;
  background: radial-gradient(60% 45% at 50% 28%, rgba(198, 244, 50, .09) 0%, transparent 70%), var(--navy);
  animation: fade 260ms var(--ease) both; }
.call-screen .call-top { display: flex; align-items: center; justify-content: space-between; padding: var(--s4); padding-top: calc(var(--s4) + env(safe-area-inset-top)); }
.call-screen .call-top .brand { color: var(--on-navy); }
.call-screen .close { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--navy-line); background: var(--navy-2); color: var(--on-navy); display: grid; place-items: center; cursor: pointer; }
.call-screen .close:hover { border-color: var(--on-navy-3); }
.call-screen .call-mid { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: var(--s5) var(--s5) var(--s4); gap: var(--s5); }
.call-screen .orb { width: min(200px, 50vw); height: min(200px, 50vw); margin-bottom: var(--s3); }
.call-screen .who { font-size: 1.6rem; font-weight: 800; letter-spacing: -.8px; color: var(--on-navy); }
.call-screen .status { display: inline-flex; align-items: center; gap: 8px; font-size: .95rem; color: var(--on-navy-2); min-height: 24px; }
.call-screen .status .live { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); animation: pulse-ring 1.6s infinite; --ok: #C6F432; }
.call-screen .timer { font: 800 2.6rem/1 var(--font); font-variant-numeric: tabular-nums; letter-spacing: -1.4px; color: var(--on-navy); }
.call-screen .timer small { font-size: .9rem; font-weight: 600; color: var(--on-navy-3); letter-spacing: 0; margin-left: 6px; }
.call-screen .meter { width: min(280px, 70vw); height: 4px; border-radius: 4px; background: var(--navy-line); overflow: hidden; }
.call-screen .meter i { display: block; height: 100%; width: 0; background: var(--lime); border-radius: 4px; transition: width 1s linear; }
.call-screen .levels { display: flex; gap: var(--s5); font-size: .8rem; color: var(--on-navy-2); }
.call-screen .levels span { display: inline-flex; align-items: center; gap: 6px; }
.call-screen .levels i { width: 8px; height: 8px; border-radius: 50%; }
.call-screen .controls { display: flex; justify-content: center; gap: var(--s6); padding: var(--s4) var(--s5) var(--s3); }
.call-screen .ctl { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600; color: var(--on-navy-2); background: none; border: 0; cursor: pointer; font-family: inherit; }
.call-screen .ctl .disc { width: 68px; height: 68px; border-radius: 20px; display: grid; place-items: center; background: var(--navy-2); border: 1px solid var(--navy-line); color: var(--on-navy); transition: all var(--fast); }
.call-screen .ctl:hover .disc { background: var(--navy-3); }
.call-screen .ctl[aria-pressed=true] .disc { background: var(--on-navy); color: var(--navy); }
.call-screen .ctl.hang .disc { background: #E5483B; border-color: #E5483B; color: #fff; box-shadow: 0 10px 30px rgba(229, 72, 59, .35); }
.call-screen .ctl.hang:hover .disc { background: #F05D50; }
.call-screen .ctl.hang .icon { transform: rotate(135deg); }
.call-screen .ctl .icon { width: 26px; height: 26px; }
.call-screen .ctl[disabled] { opacity: .45; cursor: default; }
.call-screen .note { text-align: center; font-size: .82rem; color: var(--on-navy-3); padding: 0 var(--s5) calc(var(--s5) + env(safe-area-inset-bottom)); max-width: 460px; margin: 0 auto; }
.call-screen .ended { display: flex; flex-direction: column; align-items: center; gap: var(--s3); max-width: 380px; width: 100%; }
.call-screen .ended .done { width: 72px; height: 72px; border-radius: 20px; background: var(--lime); color: var(--navy); display: grid; place-items: center; animation: pop 500ms var(--ease) both; }
.call-screen .ended .done.bad { background: rgba(229, 72, 59, .16); color: #FF8F84; }
.call-screen .ended .done .icon { width: 32px; height: 32px; stroke-width: 2.4; }
.call-screen .ended h2 { color: var(--on-navy); font-size: 1.6rem; letter-spacing: -.8px; }
.call-screen .ended p { color: var(--on-navy-2); }
.call-screen .ended .btns { display: flex; flex-direction: column; gap: var(--s2); width: 100%; margin-top: var(--s3); }
.call-screen .ended .btns .btn { min-height: 56px; }
.call-screen .btn.ghost { color: var(--on-navy); border: 1px solid var(--navy-line); } .call-screen .btn.ghost:hover { background: var(--navy-2); color: var(--on-navy); }
.call-screen .tip { font-size: .86rem; color: var(--on-navy); background: var(--navy-2); border: 1px solid var(--navy-line); border-radius: var(--r); padding: var(--s3) var(--s4); max-width: 360px; }

/* --- dashboard ------------------------------------------------------------------------------- */
.shell { min-height: 100dvh; }
.side { display: none; }
.tabbar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: none; border: 0; color: var(--muted); font: inherit; font-size: .7rem; font-weight: 600; cursor: pointer; min-height: 44px; -webkit-tap-highlight-color: transparent; }
.tabbar button .icon { width: 22px; height: 22px; transition: transform var(--fast); }
.tabbar button[aria-current=page] { color: var(--primary); }
.tabbar button[aria-current=page] .icon { transform: translateY(-1px); stroke-width: 2.1; }
.tabbar button[aria-current=page]::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--primary); }
.badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: .68rem; font-weight: 800; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.dash-top { justify-content: space-between; }
.dash-top .who { min-width: 0; display: flex; flex-direction: column; }
.dash-top .who b { font-size: 1rem; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-main .page { padding-bottom: calc(var(--tabbar) + var(--s7) + env(safe-area-inset-bottom)); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin: var(--s6) 0 var(--s3); }
.section-title h2 { font-size: 1.05rem; }
@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); }
  .side { display: flex; flex-direction: column; gap: var(--s1); position: sticky; top: 0; height: 100dvh; padding: var(--s4) var(--s3); border-right: 1px solid var(--navy-line); background: var(--navy); color: var(--on-navy);
    --text: #EEF1F8; --text-2: #CBD1E1; --muted: #AEB6CC; --line: #2A3658; --bg-2: #142046; --surface: #142046; --focus: #C6F432; }
  .side .brand { padding: var(--s2) var(--s3) var(--s5); color: var(--on-navy); }
  .side nav { display: flex; flex-direction: column; gap: 2px; }
  .side nav button { position: relative; display: flex; align-items: center; gap: var(--s3); min-height: 44px; padding: 0 var(--s3); border-radius: 10px; border: 0; background: none; color: var(--on-navy-2); font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; text-align: left; transition: background var(--fast), color var(--fast); }
  .side nav button:hover { background: var(--navy-2); color: var(--on-navy); }
  .side nav button[aria-current=page] { background: var(--navy-2); color: var(--on-navy); font-weight: 800; box-shadow: inset 3px 0 0 var(--lime); }
  .side nav button[aria-current=page] .icon { color: var(--lime); }
  .side nav .badge { position: static; margin-left: auto; }
  .side .side-foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--s2); }
  .side .btn.ghost { color: var(--on-navy-2); } .side .btn.ghost:hover { background: var(--navy-2); color: var(--on-navy); }
  .side .mini-plan { padding: var(--s3); border-radius: var(--r); background: var(--navy-2); border: 1px solid var(--navy-line); font-size: .85rem; color: var(--on-navy); }
  .tabbar { display: none; }
  .dash-main .page { padding: var(--s6) var(--s6) var(--s8); max-width: 1040px; }
  .dash-top { padding: 0 var(--s6); height: 68px; }
  .dash-top .brand { display: none; }
  body.has-tabbar .toasts { bottom: var(--s5); }
}

/* status hero */
.status-card { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: var(--s5); color: var(--on-navy);
  background: radial-gradient(70% 90% at 100% 0%, rgba(198, 244, 50, .12) 0%, transparent 60%), var(--navy); border: 1px solid var(--navy-line); box-shadow: var(--shadow-2); }
.status-card .state { display: inline-flex; align-items: center; gap: 8px; font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--lime); }
.status-card .state i { width: 8px; height: 8px; border-radius: 50%; background: #f0b44c; }
.status-card.live .state i { background: var(--lime); animation: pulse-ring 1.6s infinite; --ok: #C6F432; }
.status-card.problem .state i { background: #ff8f84; }
.status-card h2 { color: var(--on-navy); font-size: 1.6rem; margin-top: var(--s3); letter-spacing: -.8px; max-width: 22ch; }
.status-card p { color: var(--on-navy-2); margin-top: var(--s2); max-width: 52ch; }
.status-card .number { font: 800 1.35rem/1 var(--font); font-variant-numeric: tabular-nums; color: var(--lime); margin-top: var(--s3); letter-spacing: -.4px; }
.status-card .btns { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); }
.status-card .btn.ghost { color: var(--on-navy); border: 1px solid var(--navy-line); }
.status-card .btn.ghost:hover { background: var(--navy-2); color: var(--on-navy); }
.status-card .btn:not(.ghost):not(.accent) { background: var(--lime); color: var(--navy); }
.status-card .btn:not(.ghost):not(.accent):hover { background: var(--lime-hover); }
.status-card .deco { position: absolute; right: 28px; top: 28px; pointer-events: none; }
.status-card .orb.sm { width: 96px; height: 96px; }
.status-card .orb::before { display: none; }
@media (max-width: 720px) { .status-card .deco { display: none; } }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { padding: var(--s4); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); min-width: 0; }
.kpi .k-label { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--muted); font-weight: 600; }
.kpi .k-label .icon { width: 16px; height: 16px; color: var(--primary); }
.kpi .k-value { font-size: 1.9rem; font-weight: 800; letter-spacing: -1px; margin-top: var(--s2); font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .k-value small { font-size: .95rem; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.kpi .k-sub { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.kpi .bar { height: 6px; border-radius: 4px; background: var(--bg-2); margin-top: var(--s3); overflow: hidden; }
.kpi .bar i { display: block; height: 100%; border-radius: 4px; background: var(--primary); transition: width 600ms var(--ease); }
.kpi .bar.high i { background: var(--warn); }
.seg-ctl { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.seg-ctl button { min-height: 34px; padding: 0 12px; border-radius: 8px; border: 0; background: none; color: var(--muted); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.seg-ctl button[aria-pressed=true] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
@media (min-width: 1100px) { .home-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; } }

/* usage meter */
.meter-big { height: 10px; border-radius: 6px; background: var(--bg-2); overflow: hidden; margin: var(--s3) 0 var(--s2); }
.meter-big i { display: block; height: 100%; border-radius: 6px; background: var(--primary); transition: width 700ms var(--ease); }

/* activity feed and list rows */
.feed { display: flex; flex-direction: column; }
.item { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); text-align: left; width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); color: inherit; font: inherit; min-height: 64px; cursor: default; }
button.item { cursor: pointer; transition: background var(--fast); }
button.item:hover { background: var(--surface-2); }
.item:last-child { border-bottom: 0; }
.item .ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--bg-2); color: var(--text-2); }
.item .ic .icon { width: 18px; height: 18px; }
.item .ic.booked, .item .ic.ok { background: var(--ok-soft); color: var(--ok); }
.item .ic.message, .item .ic.primary { background: var(--primary-soft); color: var(--primary); }
.item .ic.transferred, .item .ic.accent { background: var(--accent-soft); color: var(--accent-text); }
.item .ic.urgent, .item .ic.failed { background: var(--danger-soft); color: var(--danger); }
.item .body { flex: 1; min-width: 0; }
.item .t { display: flex; align-items: center; gap: var(--s2); justify-content: space-between; }
.item .t b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.item .t time, .item .t .when { font-size: .8rem; color: var(--muted); white-space: nowrap; flex: none; font-variant-numeric: tabular-nums; }
.item .d { color: var(--text-2); font-size: .92rem; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.item .m { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-top: 6px; font-size: .8rem; color: var(--muted); }
.item .chev { color: var(--muted); align-self: center; }
.list-card { padding: 0; overflow: hidden; }
.day-label { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: var(--s5) 0 var(--s2); }
.day-label:first-child { margin-top: 0; }
.toolbar { display: flex; flex-direction: column; gap: var(--s3); margin-bottom: var(--s4); }
@media (min-width: 900px) { .toolbar { flex-direction: row; align-items: center; } .toolbar .input-icon { width: 320px; flex: none; } .toolbar .scroll-x { margin: 0; padding: 2px; } }

/* messages */
.msg-card { padding: var(--s4); animation: fade-up var(--med) var(--ease) both; transition: opacity var(--med), transform var(--med); }
.msg-card.urgent { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--danger) 18%, transparent), var(--shadow-1); }
.msg-card.leaving { opacity: 0; transform: translateX(16px); }
.msg-card .mh { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); }
.msg-card .mh .name { font-weight: 800; font-size: 1.02rem; overflow-wrap: anywhere; }
.msg-card .mh time { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.msg-card .text { margin-top: var(--s2); color: var(--text); overflow-wrap: anywhere; }
.msg-card .facts { display: flex; flex-direction: column; gap: 4px; margin-top: var(--s3); font-size: .88rem; color: var(--text-2); }
.msg-card .facts span { display: flex; gap: 8px; align-items: flex-start; overflow-wrap: anywhere; }
.msg-card .facts .icon { width: 16px; height: 16px; color: var(--muted); margin-top: 2px; }
.msg-card .btns { display: flex; gap: var(--s2); margin-top: var(--s4); flex-wrap: wrap; }
.msg-card .btns .btn { flex: 1 1 auto; }

/* bookings */
.agenda-day { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: var(--s3); margin-bottom: var(--s5); }
.agenda-day .date { text-align: center; padding-top: 4px; }
.agenda-day .date b { display: block; font-size: 1.6rem; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.agenda-day .date span { font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.agenda-day .date.today b, .agenda-day .date.today span { color: var(--primary); }
.slot { display: grid; grid-template-columns: 4px minmax(0, 1fr); gap: var(--s3); padding: var(--s4); }
.slot .bar { border-radius: 4px; background: var(--primary); }
.slot .time { font-weight: 800; font-variant-numeric: tabular-nums; }
.slot .who { font-weight: 600; margin-top: 2px; overflow-wrap: anywhere; }
.slot .what { color: var(--text-2); font-size: .92rem; overflow-wrap: anywhere; }
.slot .btns { display: flex; gap: var(--s2); margin-top: var(--s3); flex-wrap: wrap; }

/* call detail */
.detail-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); margin: var(--s4) 0; }
.detail-meta div { padding: var(--s3); border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.detail-meta span { display: block; font-size: .75rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.detail-meta b { font-weight: 600; font-size: .95rem; overflow-wrap: anywhere; }
.summary-box { padding: var(--s4); border-radius: var(--r); background: var(--primary-soft); color: var(--text); font-size: .98rem; overflow-wrap: anywhere; }
.summary-box .eyebrow { margin-bottom: 4px; }
.transcript { display: flex; flex-direction: column; gap: 10px; margin-top: var(--s3); }
.bubble { max-width: 84%; padding: 10px 14px; border-radius: 18px; font-size: .94rem; line-height: 1.45; overflow-wrap: anywhere; }
.bubble .who { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .65; margin-bottom: 2px; }
.bubble.agent { align-self: flex-start; background: var(--bg-2); border-bottom-left-radius: 6px; }
.bubble.caller { align-self: flex-end; background: var(--primary); color: var(--primary-ink); border-bottom-right-radius: 6px; }
.bubble.event { align-self: center; max-width: 92%; background: none; color: var(--muted); font-size: .8rem; text-align: center; padding: 4px 8px; }

/* settings */
.settings { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
.settings-nav { display: none; }
@media (min-width: 1100px) {
  .settings { grid-template-columns: 200px minmax(0, 1fr); gap: var(--s6); }
  .settings-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 88px; align-self: start; }
  .settings-nav a { padding: 8px 12px; border-radius: 8px; color: var(--text-2); text-decoration: none; font-size: .9rem; font-weight: 600; }
  .settings-nav a:hover { background: var(--bg-2); color: var(--text); }
}
.set-card { scroll-margin-top: 84px; }
.set-card .card-head p { margin-top: 4px; color: var(--muted); font-size: .9rem; }
.set-card .card-head .ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.set-card .save-row { display: flex; justify-content: flex-end; margin-top: var(--s5); gap: var(--s2); }
.kv { display: flex; justify-content: space-between; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { text-align: right; overflow-wrap: anywhere; min-width: 0; }
.code-steps { display: flex; flex-direction: column; gap: var(--s3); margin: var(--s3) 0; }
.code-steps .cs { display: flex; gap: var(--s3); align-items: flex-start; font-size: .92rem; }
.code-steps .cs .n { width: 24px; height: 24px; border-radius: 50%; background: var(--bg-2); display: grid; place-items: center; font-size: .78rem; font-weight: 800; flex: none; }

/* plans */
.plans { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
@media (min-width: 720px) { .plans { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
.plan { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s5); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-1); }
.plan .price { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: .9rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.plan .btn { margin-top: auto; }

/* ready */
.celebrate { text-align: center; padding: var(--s6) 0 var(--s4); }
.celebrate .tickbig { width: 88px; height: 88px; border-radius: 50%; margin: 0 auto var(--s5); background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; animation: pop 600ms var(--ease) both; }
.celebrate .tickbig .icon { width: 40px; height: 40px; stroke-width: 2.2; }
.timeline { display: flex; flex-direction: column; gap: 0; margin-top: var(--s5); text-align: left; }
.timeline .tl { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: var(--s3); padding-bottom: var(--s4); position: relative; }
.timeline .tl::before { content: ""; position: absolute; left: 15px; top: 30px; bottom: 0; width: 2px; background: var(--line); }
.timeline .tl:last-child::before { display: none; }
.timeline .tl .n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1.5px solid var(--line-strong); font-weight: 800; font-size: .85rem; position: relative; }
.timeline .tl.done .n { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.timeline .tl b { display: block; margin-top: 4px; }
.timeline .tl p { color: var(--muted); font-size: .9rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .orb.idle i { animation: none; }
}

/* vertical rhythm for form bodies */
.flow > * + * { margin-top: var(--s4); }
.flow > :empty { display: none; }
.flow > .card + .card { margin-top: var(--s3); }
.voice .grow { flex: 1; min-width: 0; }
.voices .link { align-self: flex-start; }
.link:disabled { color: var(--muted); cursor: default; text-decoration: none; }
.otp { margin-bottom: var(--s4); }
.auth-card > .error, .auth-card > div > .error { margin-bottom: var(--s3); }
@media (max-width: 959px) { .auth-card { margin: 6vh auto auto; } }
.msg-card .btns .btn:last-child:not(:first-child) { flex: 0 0 auto; }
.bubble.caller { background: var(--navy); color: var(--on-navy); }
@media (prefers-color-scheme: dark) { .bubble.caller { background: var(--lime); color: var(--navy); } .bubble.agent { background: var(--bg-2); } }
