@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=Unbounded:wght@500;600&display=swap');

:root {
  --abyss: #03060d;
  --deep: #07122a;
  --panel: #0b1a38;
  --panel-2: #0f2246;
  --line: #18294d;
  --line-2: #24396a;
  --electric: #3b93ff;
  --electric-hi: #63aaff;
  --arc: #8cd3ff;
  --ink: #e9effb;
  --muted: #8c9cbf;
  --good: #3ddc97;
  --warn: #ffb547;
  --bad: #ff5c7a;
  --display: 'Unbounded', 'Segoe UI', sans-serif;
  --body: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --r-panel: 14px;
  --r-input: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--abyss); color: var(--ink);
  font: 400 16px/1.55 var(--body);
  background-image: radial-gradient(1200px 600px at 85% -10%, #0c2350 0%, transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
}
a { color: var(--arc); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--arc); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--electric); color: #fff; }

h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.01em; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
h3 { font-size: 1.05rem; font-family: var(--body); font-weight: 600; letter-spacing: 0; }
p { margin: 0 0 1em; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 38em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.hidden { display: none !important; }

/* ---------- Buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 .95rem var(--body); padding: 11px 20px; border-radius: 999px;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink); cursor: pointer;
  text-decoration: none !important; transition: background .15s, border-color .15s;
}
.btn:hover { border-color: var(--electric); }
.btn-primary { background: var(--electric); border-color: var(--electric); color: #fff; box-shadow: 0 0 0 0 rgba(59,147,255,.5); }
.btn-primary:hover { background: var(--electric-hi); border-color: var(--electric-hi); }
.btn-sm { padding: 7px 14px; font-size: .85rem; }
.btn-danger { border-color: rgba(255,92,122,.5); color: #ffb3c1; }
.btn-good { border-color: rgba(61,220,151,.5); color: #a8f1cf; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: 6px; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; margin-top: 4px; }
input, select, textarea {
  width: 100%; font: 400 1rem var(--body); color: var(--ink);
  background: var(--deep); border: 1px solid var(--line-2); border-radius: var(--r-input);
  padding: 11px 13px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--electric); box-shadow: 0 0 0 3px rgba(59,147,255,.2); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--electric); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.field { margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-error { color: #ffb3c1; background: rgba(255,92,122,.1); border: 1px solid rgba(255,92,122,.35); padding: 10px 12px; border-radius: var(--r-input); margin-bottom: 14px; }

/* ---------- Public site ---------- */
.site-nav { position: sticky; top: 0; z-index: 20; background: rgba(3,6,13,.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-nav .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 1rem; text-decoration: none !important; white-space: nowrap; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand small { font-family: var(--body); font-weight: 400; color: var(--muted); font-size: .78rem; display: block; line-height: 1; }
.site-links { display: flex; gap: 22px; margin-right: auto; }
.site-links a { color: var(--muted); font-weight: 500; font-size: .95rem; }
.site-links a:hover, .site-links a[aria-current=page] { color: var(--ink); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); color: var(--ink); border-radius: 8px; padding: 6px 10px; font: inherit; }

.hero { padding: 72px 0 64px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { max-width: 11em; }
.hero .row { margin-top: 28px; }
.hero-note { margin-top: 18px; font-size: .9rem; color: var(--muted); }

/* The live call console — the page's one signature element */
.console { background: linear-gradient(180deg, var(--panel) 0%, var(--deep) 100%); border: 1px solid var(--line-2); border-radius: 20px; overflow: hidden; box-shadow: 0 30px 80px -30px rgba(59,147,255,.35); }
.console-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(61,220,151,.15); }
.console-head strong { font-weight: 600; font-size: .95rem; }
.console-head span { color: var(--muted); font-size: .85rem; margin-left: auto; font-variant-numeric: tabular-nums; }
.trace { height: 56px; border-bottom: 1px solid var(--line); background: var(--abyss); }
.trace path { fill: none; stroke: var(--electric); stroke-width: 2; }
.transcript { padding: 18px; display: flex; flex-direction: column; gap: 10px; min-height: 290px; }
.bubble { max-width: 86%; padding: 10px 14px; border-radius: 14px; font-size: .94rem; line-height: 1.45; animation: rise .35s ease-out both; }
.bubble.ai { background: rgba(59,147,255,.14); border: 1px solid rgba(59,147,255,.3); border-bottom-left-radius: 4px; }
.bubble.caller { align-self: flex-end; background: var(--panel-2); border: 1px solid var(--line-2); border-bottom-right-radius: 4px; }
.bubble .who { display: block; font-size: .74rem; color: var(--muted); margin-bottom: 2px; }
.captured { margin: 0 18px 18px; padding: 12px 14px; border-radius: 12px; background: rgba(255,181,71,.08); border: 1px dashed rgba(255,181,71,.45); font-size: .88rem; animation: rise .35s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.section { padding: 72px 0; border-top: 1px solid var(--line); }
.section-head { max-width: 40em; margin-bottom: 36px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
.feature-grid > div { background: var(--abyss); padding: 26px; }
.feature-grid p { color: var(--muted); margin: 0; font-size: .95rem; }
.feature-icon { width: 34px; height: 34px; color: var(--electric); margin-bottom: 14px; }
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.steps li { list-style: none; counter-increment: s; border-top: 2px solid var(--electric); padding-top: 16px; }
.steps li::before { content: counter(s); font-family: var(--display); color: var(--arc); font-size: 1.4rem; display: block; margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: .95rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.cta-band { padding: 56px; border-radius: 22px; background: radial-gradient(600px 300px at 0% 0%, rgba(59,147,255,.28), transparent 70%), var(--panel); border: 1px solid var(--line-2); }

.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }
.plan { background: var(--deep); border: 1px solid var(--line-2); border-radius: 18px; padding: 26px; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--electric); background: linear-gradient(180deg, rgba(59,147,255,.12), var(--deep) 40%); }
.plan h3 { font-family: var(--display); font-weight: 500; font-size: 1.05rem; }
.price { font-family: var(--display); font-size: 2.2rem; margin: 8px 0 2px; font-variant-numeric: tabular-nums; }
.price small { font-family: var(--body); font-size: .95rem; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 18px 0 24px; flex: 1; }
.plan li { padding: 6px 0 6px 24px; position: relative; font-size: .94rem; }
.plan li::before { content: ''; position: absolute; left: 2px; top: 13px; width: 10px; height: 6px; border-left: 2px solid var(--electric); border-bottom: 2px solid var(--electric); transform: rotate(-45deg); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: rgba(59,147,255,.18); color: var(--arc); }

.auth-shell { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: min(520px, 100%); background: var(--deep); border: 1px solid var(--line-2); border-radius: 20px; padding: 34px; }
.auth-card h1 { font-size: 1.7rem; }

.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--muted); margin: 10px 0 0; }

.site-foot { border-top: 1px solid var(--line); padding: 36px 0; color: var(--muted); font-size: .9rem; margin-top: 40px; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-foot a { color: var(--muted); margin-right: 18px; }

/* Demo page */
.demo-shell { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: start; }
.demo-shell .transcript { min-height: 360px; max-height: 60vh; overflow-y: auto; }
.composer { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); }
.composer input { border-radius: 999px; }
.mic { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--deep); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.mic.on { background: var(--bad); border-color: var(--bad); }
.mic svg { width: 20px; height: 20px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--deep); border-right: 1px solid var(--line); padding: 20px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 24px; overflow-y: auto; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: .94rem; position: relative; }
.sidebar nav a svg { width: 18px; height: 18px; flex: none; }
.sidebar nav a:hover { background: var(--panel); color: var(--ink); text-decoration: none; }
.sidebar nav a[aria-current=page] { background: var(--panel); color: var(--ink); }
.sidebar nav a[aria-current=page]::before { content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--electric); }
.sidebar .badge-count { margin-left: auto; background: var(--electric); color: #fff; border-radius: 999px; font-size: .72rem; padding: 1px 7px; font-weight: 600; }
.side-foot { margin-top: auto; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.side-foot strong { color: var(--ink); display: block; font-weight: 600; }
.side-foot button { background: none; border: 0; color: var(--arc); padding: 0; margin-top: 6px; cursor: pointer; font: inherit; }
.main { padding: 28px clamp(16px, 3vw, 40px) 60px; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: 1.6rem; margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

.panel { background: var(--deep); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px; }
.panel + .panel, .panel-gap { margin-top: 18px; }
.panel h2 { font-family: var(--body); font-weight: 600; font-size: 1.05rem; letter-spacing: 0; margin-bottom: 14px; }
.cols { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cols-2-1 { display: grid; gap: 18px; grid-template-columns: 2fr 1fr; }
.cols > *, .cols-2-1 > * { min-width: 0; }
.cols > .panel, .cols-2-1 > .panel { margin-top: 0; }
.cols-2-1 > div > .panel:first-child { margin-top: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; background: var(--deep); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; margin-bottom: 18px; }
.stat { background: var(--deep); padding: 18px 20px; }
.stats .stat { box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.stat .v { font-family: var(--display); font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.stat .k { color: var(--muted); font-size: .88rem; }
.meter { height: 8px; border-radius: 999px; background: var(--panel-2); overflow: hidden; margin-top: 10px; }
.meter > i { display: block; height: 100%; background: var(--electric); border-radius: 999px; }
.meter.over > i { background: var(--warn); }

.notice { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); margin-bottom: 18px; display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.notice.warn { border-color: rgba(255,181,71,.45); background: rgba(255,181,71,.07); }

.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: .84rem; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: rgba(59,147,255,.05); }
td .sub { display: block; color: var(--muted); font-size: .84rem; margin-top: 2px; }
.clip { max-width: 34ch; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 500; white-space: nowrap; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.status.good::before { background: var(--good); }
.status.warn::before { background: var(--warn); }
.status.bad::before { background: var(--bad); }
.status.info::before { background: var(--electric); }
.tag { display: inline-block; font-size: .74rem; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); margin-left: 6px; }
.tag.lead { border-color: rgba(61,220,151,.5); color: #a8f1cf; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 10px 14px; font: 500 .94rem var(--body); cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--electric); }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty strong { display: block; color: var(--ink); margin-bottom: 4px; }

/* Drawer */
.drawer-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--deep); border-left: 1px solid var(--line-2); z-index: 41; overflow-y: auto; padding: 24px; animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer .close { float: right; }
.turns { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

/* Charts */
.chart { width: 100%; height: 220px; }
.chart .bar { fill: var(--electric); }
.chart .bar:hover { fill: var(--electric-hi); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart text { fill: var(--muted); font: 11px var(--body); }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: 120px 1fr 44px; gap: 10px; align-items: center; font-size: .9rem; }
.hbar .track { height: 10px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--electric); border-radius: 999px; }
.hbar .n { text-align: right; font-variant-numeric: tabular-nums; }
.tip { position: fixed; pointer-events: none; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 10px; font-size: .82rem; z-index: 60; }

/* Toast */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 10px 18px; z-index: 70; font-size: .92rem; animation: rise .2s ease-out; }
.toast.err { border-color: rgba(255,92,122,.6); }

/* Simulator */
.sim .transcript { min-height: 260px; max-height: 420px; overflow-y: auto; background: var(--abyss); border-radius: 12px; border: 1px solid var(--line); }
.list-editor .item { display: grid; grid-template-columns: 1fr 1fr 120px auto; gap: 8px; margin-bottom: 8px; }
.list-editor.faq .item { grid-template-columns: 1fr 1.5fr auto; }
.hours-grid { display: grid; grid-template-columns: 70px 1fr 1fr auto; gap: 8px 10px; align-items: center; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero, .split, .demo-shell, .cols-2-1 { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .site-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: var(--abyss); border-bottom: 1px solid var(--line); padding: 16px 20px; gap: 14px; }
  .site-links.open { display: flex; }
  .nav-toggle { display: block; margin-left: auto; }
  .site-nav .nav-cta { display: none; }
  .feature-grid, .plans, .steps, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; gap: 36px; }
  .cta-band { padding: 30px; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: sticky; height: auto; flex-direction: row; align-items: center; padding: 10px 12px; gap: 12px; z-index: 30; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand span, .side-foot { display: none; }
  .sidebar .brand svg { flex: none; width: 32px; height: 32px; }
  .sidebar nav { flex-direction: row; overflow-x: auto; }
  .sidebar nav a { white-space: nowrap; padding: 8px 10px; }
  .sidebar nav a span.lbl { display: none; }
  .sidebar nav a[aria-current=page]::before { left: 8px; right: 8px; top: auto; bottom: -11px; width: auto; height: 3px; }
  .list-editor .item, .list-editor.faq .item { grid-template-columns: 1fr; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .hbar { grid-template-columns: 90px 1fr 36px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
