/* Leseding — Vision prototype design system.
   Front-end only. Tokens follow docs/web-dev/12: neutral surfaces, navy brand,
   gold as a restrained accent, 4/8 px rhythm, 44 px touch targets, visible focus. */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root {
  --navy: #0F2B45;
  --navy-dark: #091D30;
  --navy-600: #1C4266;
  --gold: #F6931E;
  --gold-dark: #B9740C;
  --gold-soft: rgba(246, 147, 30, 0.14);

  --bg: #F4F7FA;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --text: #0F2B45;
  --text-2: #475569;
  --text-3: #64748B;
  --link: #1C5D99;

  --ok: #15803D;      --ok-bg: #DCFCE7;
  --warn: #A16207;    --warn-bg: #FEF3C7;
  --err: #B91C1C;     --err-bg: #FEE2E2;
  --info: #1D4ED8;    --info-bg: #DBEAFE;
  --muted-bg: #EEF2F6;

  --chart-1: #1C5D99;
  --chart-2: #F6931E;
  --chart-3: #94A3B8;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(15, 43, 69, .06), 0 1px 3px rgba(15, 43, 69, .08);
  --shadow-lg: 0 10px 30px rgba(15, 43, 69, .16);
  --focus: 0 0 0 3px rgba(28, 93, 153, .45);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Poppins", var(--font);
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

/* Dark mode is a saved choice in the consoles only (shell.js sets data-theme);
   the public site, log in and sign up are always light. */
:root[data-theme="dark"] {
  --bg: #0B1622; --surface: #102233; --surface-2: #0D1C2B;
  --border: #1F3A54; --border-strong: #2B4C6B;
  --text: #E8EEF4; --text-2: #B6C4D3; --text-3: #8CA0B5; --link: #7DB7F0;
  --ok: #4ADE80; --ok-bg: rgba(74, 222, 128, .14);
  --warn: #FBBF24; --warn-bg: rgba(251, 191, 36, .14);
  --err: #F87171; --err-bg: rgba(248, 113, 113, .14);
  --info: #93C5FD; --info-bg: rgba(147, 197, 253, .14);
  --muted-bg: #16304A;
  --chart-1: #7DB7F0; --chart-3: #4B647D;
  --gold-dark: #F6931E;
  color-scheme: dark;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 4vw, 40px); }
h2 { font-size: clamp(22px, 3vw, 30px); }
h3 { font-size: 18px; }
h4 { font-size: 15px; }
p { margin: 0 0 1em; }
a { color: var(--link); }
img { max-width: 100%; display: block; }
code, pre { font-family: var(--mono); font-size: 13px; }
pre { background: var(--navy-dark); color: #E8EEF4; padding: 16px; border-radius: var(--radius); overflow-x: auto; margin: 0; line-height: 1.5; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-3); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }

/* ── Prototype banner ───────────────────────────────────────────── */
.proto-banner {
  background: var(--navy-dark); color: #E8EEF4; font-size: 12.5px;
  text-align: center; padding: 6px 16px; position: relative; z-index: 60;
}
.proto-banner strong { color: var(--gold); }
.proto-banner a { color: #E8EEF4; }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 18px; border-radius: 999px;
  font: 600 14px/1 var(--font); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn-lg { min-height: 48px; padding: 12px 26px; font-size: 15px; }
.btn-sm { min-height: 32px; padding: 6px 12px; font-size: 13px; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-600); }
:root[data-theme="dark"] .btn-primary { background: #2B6CB0; }
.btn-accent { background: var(--gold); color: var(--navy-dark); }
.btn-accent:hover { background: #DE8216; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--muted-bg); }
.btn-danger { background: var(--err); color: #fff; }
.btn-link { background: none; border: none; color: var(--link); padding: 0; min-height: auto; font-weight: 600; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-icon { width: 40px; padding: 0; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Chips / badges ─────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--muted-bg); color: var(--text-2);
  white-space: nowrap;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.plain::before { display: none; }
.chip.live, .chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.draft, .chip.info { background: var(--info-bg); color: var(--info); }
.chip.testing, .chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.disabled, .chip.err { background: var(--err-bg); color: var(--err); }
.chip.gold { background: var(--gold-soft); color: var(--gold-dark); }

/* ── Cards / layout primitives ──────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow); min-width: 0;
}
.card h3 { margin-bottom: 4px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h3 { margin: 0; }
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .g-4, .g-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-2-1 { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .g-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .g-2, .g-3, .g-4, .g-5 { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
hr.sep { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* Metric tile */
.metric { display: flex; flex-direction: column; gap: 4px; }
.metric .label { font-size: 13px; color: var(--text-3); font-weight: 600; }
.metric .value { font-family: var(--font-head); font-size: 28px; font-weight: 700; line-height: 1.1; }
.metric .delta { font-size: 12.5px; color: var(--text-3); }
.metric .delta.up { color: var(--ok); }
.metric .delta.down { color: var(--err); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); font-weight: 700; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl a { font-weight: 600; text-decoration: none; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 10px 2px; font-size: 13px; color: var(--text-3); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .label-strong { font-size: 13px; font-weight: 700; color: var(--text-2); }
.field .hint { font-size: 12.5px; color: var(--text-3); }
.input, select.input, textarea.input {
  width: 100%; min-height: 40px; padding: 9px 12px; border-radius: 8px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: 14px/1.4 var(--font);
}
textarea.input { min-height: 120px; resize: vertical; }
.input:focus { outline: none; border-color: var(--link); box-shadow: var(--focus); }
.input.search { padding-left: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 4 4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 11px center; max-width: 320px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin-bottom: 10px; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--navy); }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 999px; padding: 3px; background: var(--surface); }
.seg button { border: none; background: none; padding: 6px 14px; border-radius: 999px; font: 600 13px var(--font); color: var(--text-2); cursor: pointer; min-height: 32px; }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.switch { position: relative; width: 40px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--border-strong); transition: .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .15s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { box-shadow: var(--focus); }
.setting-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.setting-row:last-child { border-bottom: none; }
.setting-row .t { font-weight: 600; }
.setting-row .d { font-size: 13px; color: var(--text-3); }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.tabs a, .tabs button {
  padding: 10px 14px; text-decoration: none; color: var(--text-3); font-weight: 600; font-size: 14px;
  border: none; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; cursor: pointer; font-family: var(--font);
}
.tabs a:hover, .tabs button:hover { color: var(--text); }
.tabs [aria-selected="true"] { color: var(--text); border-bottom-color: var(--gold); }
.tab-panel[hidden] { display: none; }
/* `hidden` must win over display rules such as .callout { display: flex } and .chip. */
[hidden] { display: none !important; }

/* Stepper */
.stepper { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 24px; counter-reset: step; overflow-x: auto; }
.stepper li { flex: 1; min-width: 120px; counter-increment: step; display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-3); }
.stepper li::before { content: ""; height: 4px; border-radius: 4px; background: var(--border); }
.stepper li span::before { content: counter(step) ". "; }
.stepper li.done::before { background: var(--ok); }
.stepper li.current { color: var(--text); }
.stepper li.current::before { background: var(--gold); }

/* Dropzone */
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); padding: 28px; text-align: center; color: var(--text-3); background: var(--surface-2); }
.dropzone strong { color: var(--text); }

/* Empty state */
.empty { text-align: center; padding: 40px 20px; color: var(--text-3); }
.empty .ico { width: 48px; height: 48px; border-radius: 14px; background: var(--gold-soft); color: var(--gold-dark); display: grid; place-items: center; margin: 0 auto 12px; font-size: 22px; }
.empty h3 { color: var(--text); }

/* Skeleton */
.skel { background: linear-gradient(90deg, var(--muted-bg) 25%, var(--surface-2) 50%, var(--muted-bg) 75%); background-size: 200% 100%; animation: skel 1.4s infinite; border-radius: 6px; height: 12px; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

/* Callout / banners */
.callout { display: flex; gap: 12px; padding: 12px 16px; border-radius: var(--radius); font-size: 14px; border: 1px solid transparent; }
.callout.info { background: var(--info-bg); color: var(--info); }
.callout.warn { background: var(--warn-bg); color: var(--warn); }
.callout.err { background: var(--err-bg); color: var(--err); }
.callout.ok { background: var(--ok-bg); color: var(--ok); }
.callout p { margin: 0; color: var(--text); }
.callout strong { color: inherit; }

/* Transcript */
.transcript { display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 14px; font-size: 14px; }
.bubble .meta { font-size: 11.5px; color: var(--text-3); margin-bottom: 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.bubble.caller { align-self: flex-start; background: var(--muted-bg); border-bottom-left-radius: 4px; }
.bubble.agent { align-self: flex-end; background: var(--info-bg); border-bottom-right-radius: 4px; }
.event { align-self: center; font-size: 12px; color: var(--text-3); background: var(--surface-2); border: 1px dashed var(--border-strong); padding: 4px 12px; border-radius: 999px; }
.event.handoff { color: var(--warn); border-color: var(--warn); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--chart-1); }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 1px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.timeline .t { font-size: 12px; color: var(--text-3); }

/* Charts */
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-3); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.bar-list { display: flex; flex-direction: column; gap: 10px; }
.bar-list .bl-row { display: grid; grid-template-columns: 120px 1fr 60px; gap: 10px; align-items: center; font-size: 13px; }
.bar-list .bl-track { height: 8px; background: var(--muted-bg); border-radius: 8px; overflow: hidden; }
.bar-list .bl-fill { height: 100%; background: var(--chart-1); border-radius: 8px; }

/* Modal + toast */
.modal-backdrop { position: fixed; inset: 0; background: rgba(9, 29, 48, .55); display: grid; place-items: center; z-index: 200; padding: 16px; }
.modal { background: var(--surface); color: var(--text); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: 90vh; overflow: auto; }
.modal header { padding: 18px 20px 0; }
.modal .body { padding: 12px 20px; }
.modal footer { padding: 12px 20px 18px; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.toast-host { position: fixed; bottom: 20px; right: 20px; left: 20px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 300; pointer-events: none; }
.toast { background: var(--navy-dark); color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 14px; max-width: 420px; pointer-events: auto; border-left: 4px solid var(--gold); }

/* Diff */
.diff { font-family: var(--mono); font-size: 12.5px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.diff div { padding: 4px 10px; white-space: pre-wrap; }
.diff .add { background: var(--ok-bg); }
.diff .del { background: var(--err-bg); text-decoration: line-through; opacity: .8; }

/* Mic / voice tester */
.voice-tester { text-align: center; padding: 24px; }
.mic-btn { width: 88px; height: 88px; border-radius: 50%; border: none; background: var(--navy); color: #fff; font-size: 30px; cursor: pointer; box-shadow: 0 0 0 8px var(--gold-soft); }
.mic-btn[aria-pressed="true"] { background: var(--err); box-shadow: 0 0 0 10px var(--err-bg); }
.mic-status { margin-top: 14px; font-weight: 700; }

/* ═══════════════════ MARKETING SHELL ═══════════════════ */
body[data-shell="marketing"] { background: var(--surface); }
/* Dark header: logo on the far left (in a white rounded box), tabs + buttons on the far right, white text. */
.m-header { position: sticky; top: 0; z-index: 50; background: var(--navy-dark); border-bottom: 1px solid rgba(255,255,255,.08); transition: background .25s, box-shadow .25s; }
/* Landing page: the header sits over the hero photo, then turns solid navy once you scroll. */
.m-header.over { background: transparent; border-bottom-color: transparent; }
.m-header.over.scrolled { background: rgba(9,29,48,.94); backdrop-filter: blur(10px); box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.m-header .inner { display: flex; align-items: center; gap: 24px; padding: 14px 40px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-family: var(--font-head); font-weight: 700; font-size: 17px; }
.brand img { width: 36px; height: 36px; border-radius: 50%; background: #fff; padding: 3px; box-shadow: var(--shadow); }
.brand img.logo-full { width: auto; height: 80px; border-radius: 0; background: none; padding: 0; box-shadow: none; }
.m-footer .brand img.logo-full { height: 76px; }
.m-nav { display: flex; gap: 4px; margin-left: auto; }
.m-nav a { padding: 8px 14px; border-radius: 8px; text-decoration: none; color: #fff; font-weight: 700; font-size: 15px; }
.m-nav a:hover, .m-nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.12); }
.m-actions { display: flex; gap: 10px; align-items: center; }
.m-header .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); font-weight: 700; }
.m-header .btn-ghost:hover { background: rgba(255,255,255,.12); }
.m-header .btn-accent, .m-header .btn-accent:hover { font-weight: 700; color: #fff; }
/* "Create an account" on the log-in page: a small navy pill with white text. */
.auth-pill { display: inline-block; margin-left: 6px; padding: 6px 16px; border-radius: 999px; background: var(--navy); color: #fff !important;
  font-weight: 700; text-decoration: none; transition: background .2s, transform .2s; }
.auth-pill:hover { background: var(--navy-dark); transform: translateY(-1px); }
.menu-toggle { display: none; }
@media (max-width: 960px) {
  .m-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--navy-dark); padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.1); box-shadow: var(--shadow-lg); }
  .m-nav.open { display: flex; }
  .menu-toggle { display: inline-flex; }
  .m-header .inner { padding: 10px 16px; gap: 12px; justify-content: space-between; }
  .m-actions .hide-sm { display: none; }
  .brand img.logo-full { height: 58px; }
  .m-header .m-actions { margin-left: auto; }
}
@media (max-width: 420px) { .m-header .brand img.logo-full { height: 48px; } .m-header .btn-accent { padding-left: 12px; padding-right: 12px; } }

.section { padding: 80px 40px; }
.section.alt { background: var(--bg); }
.section.dark { background: var(--navy-dark); color: #E8EEF4; }
.section.dark h2, .section.dark h3 { color: #fff; }
.section.dark .muted { color: #94A3B8; }
.container { max-width: 1440px; margin: 0 auto; }
.narrow { max-width: 760px; margin: 0 auto; }
.eyebrow { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 12px; }
.section.dark .eyebrow { color: var(--gold); }
.lead { font-size: 18px; color: var(--text-2); max-width: 680px; }
.section.dark .lead { color: #B6C4D3; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
@media (max-width: 640px) { .section { padding: 56px 16px; } .m-footer { padding-left: 16px; padding-right: 16px; } }

.hero { background:
  radial-gradient(1200px 500px at 85% -10%, rgba(245, 166, 35, .18), transparent 60%),
  linear-gradient(160deg, var(--navy-dark), var(--navy) 60%, var(--navy-600));
  color: #fff; padding: 88px 40px 96px; overflow: hidden; }
.hero h1 { font-size: clamp(32px, 5vw, 56px); color: #fff; max-width: 760px; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .lead { color: #CBD5E1; font-size: clamp(16px, 2vw, 19px); max-width: 720px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 64px; align-items: center; max-width: 1440px; margin: 0 auto; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding: 56px 16px 64px; } }
/* Landing hero: the same photo as the current landing page, under a navy overlay so the text stays readable. */
.hero.hero-photo { background:
  radial-gradient(1200px 500px at 85% -10%, rgba(245, 166, 35, .16), transparent 60%),
  linear-gradient(135deg, rgba(9,29,48,.90) 0%, rgba(15,43,69,.78) 55%, rgba(9,29,48,.66) 100%),
  url('/static/images/LandingpagImage.svg') center / cover no-repeat, var(--navy-dark); }
/* Fill the first screen below the prototype banner; the photo runs up behind the transparent header. */
.hero.hero-photo { margin-top: calc(-1 * var(--hdr-h, 102px)); padding-top: calc(var(--hdr-h, 102px) + 32px);
  min-height: calc(100vh - var(--banner-h, 31px)); min-height: calc(100svh - var(--banner-h, 31px)); display: flex; align-items: center; }
.hero.hero-photo .hero-grid { width: 100%; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.45); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.1); }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.auth-side .hero-badges { margin-top: 20px; }
/* Sign-up password strength: meter bar, rule checklist, confirmation match. */
.pw-meter { height: 6px; border-radius: 3px; background: var(--border, #E2E8F0); overflow: hidden; margin-top: 4px; }
.pw-meter span { display: block; height: 100%; width: 0; border-radius: 3px; transition: width .25s, background .25s; }
.pw-meter .weak { background: #E5484D; } .pw-meter .fair { background: #F6931E; }
.pw-meter .good { background: #3B82F6; } .pw-meter .strong { background: #16A34A; }
.pw-rules { list-style: none; margin: 2px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; font-size: 12.5px; color: var(--text-3); }
.pw-rules li::before { content: "○ "; }
.pw-rules li.ok { color: #16A34A; }
.pw-rules li.ok::before { content: "✓ "; }
@media (max-width: 420px) { .pw-rules { grid-template-columns: 1fr; } }
/* Verify page: back arrow top-left, logo top-right, over the centred card. */
.verify-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 20px 32px; z-index: 2; pointer-events: none; }
.verify-top > a { pointer-events: auto; }
.verify-back { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--text); background: var(--surface); border: 1px solid var(--border); transition: background .2s, transform .2s; }
.verify-back:hover { background: var(--navy); color: #fff; transform: translateX(-2px); }
.verify-logo img { display: block; height: 72px; width: auto; }
:root[data-theme="dark"] .verify-logo img { background: #fff; border-radius: 12px; padding: 4px 10px; }
@media (max-width: 600px) { .verify-top { padding: 14px 16px; } .verify-logo img { height: 48px; } }
/* The meter and checklist only show while the password field is active. */
.pw-field .pw-meter, .pw-field .pw-rules { display: none; }
.pw-field:focus-within .pw-meter { display: block; }
.pw-field:focus-within .pw-rules { display: grid; }
.hint.pw-ok { color: #16A34A; } .hint.pw-bad { color: #E5484D; }
.hero-badges span { font-size: 13px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #E2E8F0; }

/* Hero product mock */
.mock-window { background: var(--surface); color: var(--text); border-radius: 14px; box-shadow: 0 30px 60px rgba(0,0,0,.35); overflow: hidden; border: 1px solid rgba(255,255,255,.1); }
.mock-window .bar { display: flex; gap: 6px; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.mock-window .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.mock-window .content { padding: 16px; }

/* "Talk to Leseding" box on the landing hero: same look as the live landing page's card,
   with the orange web-call orb (from /preview), slowly looping between listening and speaking. */
.talk { position: relative; display: flex; justify-content: center; perspective: 1100px; }
/* Mouse-follow tilt (set from index.html); eases back flat when the mouse leaves. */
.talk-tilt { width: 100%; max-width: 400px; transform-style: preserve-3d; transition: transform .35s ease-out; will-change: transform; }
.talk-tilt:hover { transition: transform .12s ease-out; }
/* The card turns in half revolutions. Two sides share one grid cell; every panel sits in the same
   cell of its side and hidden panels keep their space, so the card never changes size mid-flip. */
.talk-flip { display: grid; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.3,.7,.25,1); }
.talk-side { grid-area: 1 / 1; display: grid; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.side-b { transform: rotateY(180deg); }
.talk-panel { grid-area: 1 / 1; visibility: hidden; display: flex; flex-direction: column; justify-content: center; text-align: center;
  padding: 40px 32px 30px; border-radius: 16px; color: #fff;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(8px); transition: box-shadow .35s ease-out; }
.talk-panel.on { visibility: visible; }
.talk-tilt:hover .talk-panel.on { box-shadow: 0 24px 50px rgba(0,0,0,.35); }
.talk-dark { padding: 30px 28px 26px; background: rgba(9,29,48,.55); }
.talk-orb { position: relative; width: 170px; height: 170px; margin: 0 auto 26px; display: flex; align-items: center; justify-content: center; }
.talk-orb .orb-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(245,166,35,.25); }
.talk-orb .orb { width: 104px; height: 104px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fbd38d, #F6931E 55%, #D27511);
  box-shadow: 0 0 60px rgba(245,166,35,.5); transition: transform .25s ease; }
.talk-orb[data-state="listening"] .orb { animation: orb-breathe 3s ease-in-out infinite; }
.talk-orb .orb-ring { animation: orb-ring 3s ease-out infinite; }
.talk-orb[data-state="speaking"] .orb { animation: orb-pulse 1.6s ease-in-out infinite; }
@keyframes orb-breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes orb-pulse { 0%,100% { transform: scale(1); box-shadow: 0 0 60px rgba(245,166,35,.5); } 50% { transform: scale(1.14); box-shadow: 0 0 90px rgba(245,166,35,.75); } }
@keyframes orb-ring { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1); opacity: 0; } }
.talk-desc { font-size: 13px; line-height: 1.6; color: #fff; margin: 0 0 20px; }
.talk-btn { border: none; cursor: pointer; font-family: var(--font); display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px 24px;
  background: #fff; color: var(--navy); font-size: 14px; font-weight: 700; border-radius: 50px; text-decoration: none; transition: background .2s, transform .2s; }
.talk-btn:hover { background: #f0f0f0; transform: translateY(-1px); }
/* Back face: the /preview pre-call dialog, sized to fit the card. */
.talk-panel h3 { font-size: 22px; font-weight: 800; color: #fff; margin: 0 0 10px; letter-spacing: -.01em; }
.talk-intro { font-size: 13.5px; line-height: 1.65; color: #CBD5E1; margin: 0 0 18px; }
.talk-intro strong, .talk-points strong { color: #fff; }
.talk-points { display: flex; flex-direction: column; gap: 10px; text-align: left; margin-bottom: 16px; }
.talk-points > div { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: #CBD5E1; line-height: 1.45; }
.talk-points svg { flex-shrink: 0; margin-top: 1px; color: var(--gold); }
.talk-note { font-size: 11.5px; line-height: 1.5; color: #94A3B8; margin: 0 0 18px; }
.talk-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.talk-start, .talk-cancel, .call-end { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; font: 700 14.5px var(--font); border-radius: 50px; cursor: pointer; text-decoration: none; transition: background .2s, transform .2s; }
.talk-start { background: #25D366; color: #fff; border: none; font-family: var(--font); box-shadow: 0 6px 22px rgba(37,211,102,.35); }
.talk-start:hover { background: #1eb457; transform: translateY(-2px); }
.talk-cancel { background: rgba(255,255,255,.08); color: #fff; border: 1.5px solid rgba(255,255,255,.22); }
.talk-cancel:hover { background: rgba(255,255,255,.16); }
.talk-start:disabled { opacity: .6; cursor: default; transform: none; }
/* Held line (the operator paused web calls): replaces Start Call, as on /preview. */
.hold-notice { display: none; align-items: center; justify-content: center; gap: 10px; margin: 0 0 16px; padding: 12px 16px; border-radius: 14px;
  background: rgba(212,160,23,.12); border: 1.5px solid rgba(212,160,23,.45); color: var(--gold); font-size: 13.5px; font-weight: 700; line-height: 1.45; }
.hold-notice svg { flex-shrink: 0; }
.hold-notice.show { display: flex; }
.hold-notice.show ~ .talk-actions .talk-start { display: none; }
/* Call panel: agent, timer, the live orb and the call controls (states set by live-call.js). */
.talk-call { display: flex; flex-direction: column; align-items: center; }
.call-agent { font: 800 21px var(--font-head); color: #fff; }
.call-limit-note { min-height: 18px; font-size: 12.5px; font-weight: 600; color: #F87171; }
.call-timer { font-size: 17px; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.call-timer.warning { color: #F87171; }
.call-orb { position: relative; width: 170px; height: 170px; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.call-orb .orb-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(245,166,35,.25); }
.call-orb .orb { width: 104px; height: 104px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fbd38d, #F6931E 55%, #D27511);
  box-shadow: 0 0 60px rgba(245,166,35,.5); transition: transform .25s ease, opacity .6s ease, filter .6s ease; }
.talk-call[data-state="listening"] .orb { animation: orb-breathe 1.6s ease-in-out infinite; }
.talk-call[data-state="listening"] .orb-ring { animation: orb-ring 1.6s ease-out infinite; }
.talk-call[data-state="thinking"] .orb { animation: orb-spin 1.2s linear infinite; background: radial-gradient(circle at 35% 30%, #cbd5e1, #64748b 60%, #475569); box-shadow: 0 0 50px rgba(100,116,139,.5); }
.talk-call[data-state="speaking"] .orb { animation: orb-pulse .7s ease-in-out infinite; }
.talk-call[data-state="connecting"] .orb { opacity: .35; transform: scale(.9); filter: grayscale(.5); }
@keyframes orb-spin { to { transform: rotate(360deg); } }
.call-status { min-height: 22px; margin-bottom: 16px; font-size: 13.5px; font-weight: 600; color: #CBD5E1; }
.call-mute.muted { background: rgba(248,113,113,.15); border-color: rgba(248,113,113,.5); }
.call-end { background: #E5484D; color: #fff; border: none; font-family: var(--font); box-shadow: 0 6px 22px rgba(229,72,77,.35); }
.call-end:hover { background: #d33d42; transform: translateY(-2px); }
/* Call-ended panel. */
.ended-icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: rgba(245,166,35,.15); color: var(--gold); display: flex; align-items: center; justify-content: center; }
@media (max-width: 960px) { .talk-tilt { max-width: 420px; } }
@media (prefers-reduced-motion: reduce) { .talk-orb .orb, .talk-orb .orb-ring { animation: none !important; } .talk-flip { transition: none; } .talk-call .orb, .talk-call .orb-ring { animation: none !important; } }

.feature { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-dark); font-size: 20px; margin-bottom: 14px; }
.feature p { color: var(--text-2); margin: 0; font-size: 14.5px; }
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 960px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.steps > div { counter-increment: s; padding: 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.steps > div::before { content: counter(s); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; margin-bottom: 12px; font-family: var(--font-head); }
.steps p { color: var(--text-2); font-size: 14px; margin: 0; }
.price-card { display: flex; flex-direction: column; gap: 12px; }
.price-card.featured { border: 2px solid var(--gold); }
.price-card .price { font-family: var(--font-head); font-size: 30px; font-weight: 700; }
.price-card ul { padding-left: 18px; margin: 0; color: var(--text-2); font-size: 14px; }
.price-card li { margin-bottom: 6px; }
.price-card .btn { margin-top: auto; }
details.faq { border-bottom: 1px solid var(--border); padding: 16px 0; }
details.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::after { content: "+"; font-size: 20px; color: var(--text-3); }
details.faq[open] summary::after { content: "–"; }
details.faq p { margin: 10px 0 0; color: var(--text-2); }

.m-footer { background: var(--navy-dark); color: #B6C4D3; padding: 56px 40px 28px; font-size: 14px; }
.m-footer .cols { max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
@media (max-width: 860px) { .m-footer .cols { grid-template-columns: 1fr 1fr; } }
.m-footer h4 { color: #fff; font-size: 14px; margin-bottom: 12px; }
.m-footer a { color: #B6C4D3; text-decoration: none; display: block; padding: 3px 0; }
.m-footer a:hover { color: #fff; }
.m-footer .brand { color: #fff; }
.m-footer .legal { max-width: 1440px; margin: 36px auto 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: #8CA0B5; }

.docs-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
.docs-nav { position: sticky; top: 90px; align-self: start; }
@media (max-width: 760px) { .docs-grid { grid-template-columns: 1fr; } .docs-nav { position: static; } }

/* Auth pages */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(160deg, var(--navy-dark), var(--navy)); color: #E8EEF4; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h2 { color: #fff; }
/* Log-in side panel: a different crop of the landing-page photo, under the same navy overlay. */
.auth-side.auth-photo { background:
  linear-gradient(160deg, rgba(9,29,48,.92) 0%, rgba(15,43,69,.72) 50%, rgba(9,29,48,.88) 100%),
  url('/static/images/LandingpagImage.svg') 72% center / cover no-repeat, var(--navy-dark); }
/* Photo-panel content sits in the middle of the panel (auto margins), the footer line stays at the bottom. */
.auth-center { margin: auto; text-align: center; max-width: 520px; }
.auth-center-left { text-align: left; }
/* Bottom row of the photo panel: small print on the left, partner logo hugging the bottom-right edge. */
.auth-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 -32px -32px; }
.auth-partner { height: 44px; width: auto; display: block; }
.auth-headline { font: 700 clamp(32px, 3.6vw, 48px)/1.15 var(--font-head); color: #fff; margin: 0; }
.auth-tagline { margin: 14px 0 0; font-size: 15px; font-weight: 600; letter-spacing: .06em; color: #CBD5E1; }
/* Log-in form: the full logo, large, with no box around it (it gets a white backing only in dark mode, where its dark lettering would vanish). */
.auth-logo { display: inline-block; margin-bottom: 28px; }
.auth-logo img { display: block; height: 180px; width: auto; max-width: 100%; object-fit: contain; }
:root[data-theme="dark"] .auth-logo img { background: #fff; border-radius: 14px; padding: 8px 16px; }
@media (max-width: 860px) { .auth-logo img { height: auto; width: min(240px, 100%); } }
.auth-main { display: grid; place-items: center; padding: 32px 16px; background: var(--surface); }
.auth-card { width: min(420px, 100%); }
@media (max-width: 860px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ═══════════════════ APP + ADMIN SHELL ═══════════════════ */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: calc(100vh - 32px); }
.sidebar { background: var(--navy-dark); color: #B6C4D3; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { color: #fff; padding: 6px 8px 16px; }
.sidebar .brand small { display: block; font: 500 11.5px var(--font); color: #8CA0B5; }
.sidebar .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #6B819A; padding: 14px 10px 6px; font-weight: 700; }
.sidebar a.nav { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: #B6C4D3; font-weight: 600; font-size: 14px; min-height: 40px; }
.sidebar a.nav:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar a.nav[aria-current="page"] { background: rgba(245, 166, 35, .14); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.sidebar a.nav svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.sidebar .foot { margin-top: auto; padding: 12px 10px 40px; line-height: 1.8; font-size: 12px; color: #6B819A; }
.sidebar .foot a { color: #B6C4D3; }
.admin .sidebar { background: #170E14; }
.admin .sidebar a.nav[aria-current="page"] { background: rgba(239, 68, 68, .16); box-shadow: inset 3px 0 0 #EF4444; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; padding: 10px 24px; background: var(--surface); border-bottom: 1px solid var(--border); min-height: 60px; }
.org-switch { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: 600 14px var(--font); cursor: pointer; min-height: 40px; }
.org-switch .av { width: 28px; height: 28px; border-radius: 7px; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.env-toggle { display: inline-flex; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: var(--navy-dark); display: grid; place-items: center; font-weight: 700; font-size: 13px; border: none; cursor: pointer; }
.admin-strip { background: #7F1D1D; color: #FEE2E2; font-size: 12.5px; padding: 6px 24px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.admin-strip strong { color: #fff; }
.content { padding: 24px; max-width: 1400px; width: 100%; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; margin: 0 0 4px; }
.page-head p { margin: 0; color: var(--text-3); }
.crumbs { font-size: 13px; color: var(--text-3); margin-bottom: 6px; }
.crumbs a { color: var(--text-3); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.app-menu-btn { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .topbar { gap: 6px; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; z-index: 120; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .app-menu-btn { display: inline-flex; }
  .topbar { padding: 10px 16px; }
  .content { padding: 16px; }
  .topbar .hide-sm { display: none; }
}
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 110; }

/* Agent studio */
.studio-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.studio-head h1 { margin: 0; font-size: 24px; }
.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
.prompt-editor { font-family: var(--mono); font-size: 13px; min-height: 280px; line-height: 1.6; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--text-3); font-weight: 600; }
.kv dd { margin: 0; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: 8px; } }
.flow { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.flow .node { padding: 12px 16px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); min-width: 220px; text-align: center; font-size: 14px; }
.flow .node.start { background: var(--navy); color: #fff; border-color: var(--navy); }
.flow .node.end { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
.flow .arrow { color: var(--text-3); font-size: 18px; line-height: 1; }
.flow .branches { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.flow .branch { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.flow .edge-label { font-size: 12px; color: var(--text-3); }

.agent-tile { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; transition: border-color .15s; }
.agent-tile:hover { border-color: var(--border-strong); }
.agent-tile .top { display: flex; gap: 12px; align-items: center; }
.agent-tile .av { width: 44px; height: 44px; border-radius: 12px; background: var(--gold-soft); color: var(--gold-dark); display: grid; place-items: center; font-weight: 700; font-family: var(--font-head); }

.plan-swatch { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.health { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.health::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.health.ok { color: var(--ok); } .health.warn { color: var(--warn); } .health.err { color: var(--err); }

.content.loading { opacity: .55; transition: opacity .15s; }
