/* Voiceprint, shared by the APIFleet workspace and API documentation. */
@font-face {
  font-family: Manrope;
  src: url('/landing/assets/manrope.ttf') format('truetype');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root, :root[data-theme="light"] {
  --brand-lilac: #c7b8f3;
  --brand-ink: #1934b7;
  --brand-paper: #f6f1ff;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-2: #eef0f4;
  --nav-bg: #f0eff5;
  --master-bg: #ffffff;
  --border: #dce0e6;
  --control-border: #8892a2;
  --text: #242b3a;
  --muted: #606979;
  --heading: #242b3a;
  --accent: #1934b7;
  --accent-hover: #13268a;
  --on-accent: #f6f1ff;
  --accent-soft: #ece9f8;
  --accent-border: #9a8bc9;
  --danger: #b3304b;
  --danger-soft: #fbe8ee;
  --ok: #196b50;
  --ok-soft: #e4f2eb;
  --header-bg: #f6f7f9;
  --recording-bg: #f6f7f9;
  --bubble-user: #e5effe;
  --subtle-border: #e7e9ee;
  --inset-bg: #eef0f4;
  --inset-text: #242b3a;
  --wave-bg: #f6f7f9;
  --wave-label: #606979;
  --wave-playhead: #1934b7;
  --wave-mixed: #1934b7;
  --overlay: rgba(24, 21, 61, .5);
  --radius: 16px;
  --p-radius: 12px;
  --p-radius-lg: 16px;
  --p-field-h: 42px;
  --p-shadow-sm: none;
  --p-shadow-md: none;
  --p-hover-border: #7964aa;
  --login-brand-bg: #c7b8f3;
  --identity-teal: #176b61;
  --identity-teal-bg: #e2f3ee;
  --identity-blue: #275da5;
  --identity-blue-bg: #e5effe;
  --identity-amber: #875412;
  --identity-amber-bg: #fff0d5;
  --identity-rose: #a0445d;
  --identity-rose-bg: #fbe7ee;
  --table-stripe: #fafbfc;
}

:root[data-theme="dark"] {
  --bg: #191b22;
  --panel: #22252e;
  --panel-2: #2c303b;
  --nav-bg: #20222b;
  --master-bg: #1d2027;
  --border: #3d4350;
  --control-border: #80899a;
  --text: #edf0f5;
  --muted: #b0b8c7;
  --heading: #edf0f5;
  --accent: #c7b8f3;
  --accent-hover: #dfd2ff;
  --on-accent: #19265e;
  --accent-soft: #343047;
  --accent-border: #7e6aaa;
  --danger: #ff9bae;
  --danger-soft: #452436;
  --ok: #91d8b6;
  --ok-soft: #233b36;
  --header-bg: #191b22;
  --recording-bg: #1d2027;
  --bubble-user: #253852;
  --subtle-border: #343945;
  --inset-bg: #191b22;
  --inset-text: #edf0f5;
  --wave-bg: #1d2027;
  --wave-label: #b0b8c7;
  --wave-playhead: #d1bfff;
  --wave-mixed: #c7b8f3;
  --overlay: rgba(10, 8, 24, .72);
  --p-hover-border: #b7a1dc;
  --identity-teal: #8bd7c6;
  --identity-teal-bg: #203d37;
  --identity-blue: #a6c9ff;
  --identity-blue-bg: #253852;
  --identity-amber: #f1ca88;
  --identity-amber-bg: #433623;
  --identity-rose: #f0b2c7;
  --identity-rose-bg: #442b37;
  --table-stripe: #252831;
}

html { scroll-padding-top: 90px; }
body { font-family: Manrope, Arial, sans-serif; font-size: 14px; font-synthesis: none; }
::selection { background: var(--accent); color: var(--on-accent); }
input, textarea { caret-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
a { color: var(--accent); text-underline-offset: 4px; }
h1, h2, h3, h4 { text-wrap: balance; letter-spacing: -.025em; }
h2 { font-size: 24px; font-weight: 800; }
button, input, select, textarea { font-family: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
.ui-icon { display: inline-block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle; }
.nav-icon, .theme-glyph, .sidebar-toggle-icon { display: inline-flex; align-items: center; justify-content: center; }
.theme-glyph .ui-icon { width: 18px; height: 18px; }
.voice-preview-play .ui-icon, .voice-selected-preview .ui-icon, .recording-controls .ui-icon, .tool-event-chevron .ui-icon { width: 16px; height: 16px; }
.product-mark { transition: transform 180ms ease-out; }
.app-brand:hover .product-mark, .docs-brand:hover .product-mark { transform: rotate(-8deg); }

/* The shell uses the landing's flat planes; the editor stays quiet. */
.app-header { padding-inline: 24px; backdrop-filter: none; }
.app-brand, .docs-brand { color: var(--accent); font-size: 22px; font-weight: 800; letter-spacing: -.035em; }
.app-header .status { font-size: 12px; }
.app-header .header-right { gap: 16px; }
.app-header .header-link { color: var(--text); font-weight: 650; }
.user-email { font-size: 12px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar { background: var(--nav-bg); padding: 24px 14px 16px; border-color: var(--border); }
.sidebar-links { gap: 6px; }
.nav-item { min-height: 44px; border-radius: 28px; padding: 11px 14px; font-size: 13px; color: var(--text); }
.nav-item:hover { background: var(--bg); }
.nav-item.active { color: var(--accent); background: var(--accent-soft); font-weight: 750; }
.sidebar-toggle { border-radius: 28px; border-color: var(--control-border); color: var(--text); font-size: 12px; }
.sidebar-toggle-icon .ui-icon { transition: transform 180ms ease-out; }
:root[data-sidebar-collapsed="true"] .sidebar-toggle-icon .ui-icon { transform: rotate(180deg); }

/* Shared actions, inputs and state feedback. */
.btn-primary, .btn-ghost, .btn-danger, .google-btn {
  border-radius: 28px; min-height: 40px; padding: 10px 18px;
  font-size: 13px; font-weight: 750; line-height: 1.4;
  transition: background 180ms ease-out, color 180ms ease-out, border-color 180ms ease-out, transform 140ms ease-out;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-ghost { border-color: var(--control-border); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: var(--accent-soft); border-color: var(--accent-border); }
.btn-danger { color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: var(--danger-soft); }
:is(.btn-primary, .btn-ghost, .btn-danger, .google-btn):active:not(:disabled) { transform: translateY(1px); }
button:disabled, input:disabled, select:disabled, textarea:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary .ui-icon, .btn-ghost .ui-icon { width: 17px; height: 17px; margin-right: 5px; }
input, select, textarea { border-color: var(--control-border); background: var(--panel); border-radius: 12px; line-height: 1.5; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select { min-height: 42px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
label { font-size: 13px; font-weight: 650; color: var(--text); }
.hint { line-height: 1.6; }
:is(button, a, summary, input, select, textarea):focus-visible,
.md-detail :is(input, select, textarea, button):focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; box-shadow: none;
}
.md-detail :is(input, select, textarea):focus { box-shadow: none; border-color: var(--accent); }
.md-detail .fset :is(input, select, textarea), .md-detail .row :is(input, select, textarea) { border-color: var(--control-border); box-shadow: none; }

/* Assistant list and editing workspace. */
main.view-md { grid-template-columns: 280px minmax(0, 1fr); gap: 0; padding: 0; }
.md-master { background: var(--master-bg); padding: 20px 16px; border-color: var(--border); }
.md-master-head { background: var(--master-bg); top: 0; padding-block: 12px 18px; }
.md-master-head h2 { font-size: 19px; color: var(--heading); font-weight: 800; }
.md-master-head .btn-primary { min-height: 36px; padding: 8px 13px; }
.md-list { gap: 8px; }
.md-list .item { border-radius: 16px; padding: 16px; }
.md-list .item .name { font-size: 14px; font-weight: 750; }
.md-list .item .sub { margin-top: 6px; font-size: 12px; line-height: 1.6; opacity: 1; overflow-wrap: anywhere; }
.md-list .item.active { background: var(--accent-soft); color: var(--text); border-color: var(--accent-border); box-shadow: none; }
.md-list .item.active .sub { color: var(--muted); }
.md-list .item.active::before { display: none; }
.assistant-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.assistant-name > .name { min-width: 0; overflow-wrap: anywhere; }
.assistant-selected { margin-left: auto; color: var(--accent); width: 16px; height: 16px; }
.assistant-avatar { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 10px; font-size: 11px; font-weight: 800; line-height: 1; }
.assistant-avatar[data-tone="teal"] { color: var(--identity-teal); background: var(--identity-teal-bg); }
.assistant-avatar[data-tone="blue"] { color: var(--identity-blue); background: var(--identity-blue-bg); }
.assistant-avatar[data-tone="amber"] { color: var(--identity-amber); background: var(--identity-amber-bg); }
.assistant-avatar[data-tone="rose"] { color: var(--identity-rose); background: var(--identity-rose-bg); }
.md-detail { padding: 0 32px 64px; max-width: 1440px; }
.detail-head { margin-inline: -32px; padding: 24px 32px 22px; box-shadow: none; border-color: var(--border); }
.detail-head h2 { font-size: 26px; color: var(--heading); font-weight: 800; }
.detail-actions { gap: 6px; }
.form-grid { gap: 24px; }
.fset { padding: 20px 0 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: transparent; }
.form-grid > .fset:first-of-type { padding-top: 0; border-top: 0; }
.fset > h3, .fset > .detail-sub { font-size: 15px; font-weight: 800; margin-bottom: 14px; }
.md-detail .fset > label, .md-detail .row > div > label, .md-detail form > label { font-size: 13px; opacity: 1; font-weight: 650; }
.md-detail textarea { font-size: 14px; line-height: 1.7; }
.md-detail .hint, .md-detail p.muted { font-size: 12px; line-height: 1.6; }
.form-actions { padding-top: 8px; }
.voice-browser, .voice-preview-row { border-radius: 12px; }
.voice-selected-preview.playing, .voice-preview-play.playing { color: var(--on-accent); }
.md-empty { padding: 100px 24px; max-width: 500px; margin-inline: auto; text-align: left; }
.md-empty > .product-mark { width: 56px; height: 42px; color: var(--heading); margin-bottom: 22px; }
.md-empty h2 { color: var(--heading); font-size: 30px; line-height: 1.2; margin: 0 0 16px; }
.md-empty p { font-size: 14px; line-height: 1.75; margin: 0 0 24px; }
.md-list .empty { padding: 16px 0; line-height: 1.7; }
@container (min-width: 760px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}

/* Lists, calls, tools and dialogs share the same paper/ink vocabulary. */
.view:not(.view-md) { padding: 32px; }
.panel { border-radius: 16px; padding: 24px; }
.panel h2 { font-size: 21px; letter-spacing: -.03em; }
.panel-head h2, .sim-header h2 { color: var(--heading); }
.card { background: transparent; border-width: 0 0 1px; border-radius: 0; padding: 16px 0; }
.card .name { font-weight: 750; }
.card .meta { line-height: 1.65; }
.stat-card { border: 0; border-radius: 0; background: transparent; padding: 4px 20px 4px 0; }
.stat-card + .stat-card { border-left: 1px solid var(--border); padding-left: 20px; }
.stat-card .v { color: var(--heading); font-size: 26px; font-variant-numeric: tabular-nums; }
.logs-stats { grid-template-columns: repeat(3, minmax(120px, 180px)); gap: 20px; margin-bottom: 28px; }
.logs-filters { background: var(--panel-2); border: 0; border-radius: 16px; padding: 18px; gap: 14px; }
.logs-filter span { font-size: 12px; }
.logs-table { background: var(--panel); }
.logs-table th { font-size: 12px; font-weight: 750; background: var(--panel-2); }
.logs-table tr.call-row.alternate { background: var(--table-stripe); }
.logs-table tr.call-row.open { background: var(--accent-soft); }
.logs-table .assistant-avatar { width: 26px; height: 26px; border-radius: 8px; font-size: 10px; }
.log-assistant-identity { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.source-chip.web, .direction-chip.web { color: var(--identity-blue); background: var(--identity-blue-bg); }
.source-chip.phone { color: var(--identity-teal); background: var(--identity-teal-bg); }
.logs-table th, .logs-table td { padding: 14px 12px; }
.logs-table td.num, .recording-time, .call-id { font-variant-numeric: tabular-nums; }
.source-chip .ui-icon, .tool-event-icon .ui-icon { width: 14px; height: 14px; }
.tool-event-icon { background: var(--accent-soft); color: var(--accent); }
.logs-table tbody tr.call-row:hover { background: var(--panel-2); }
.logs-table .cost-tip { border-radius: 12px; }
.modal-card { border-radius: 20px; border: 0; padding: 28px; }
.modal-head { gap: 18px; }
.modal-head h3 { font-size: 20px; color: var(--heading); }
#testCloseBtn { display: grid; place-items: center; min-width: 40px; width: 40px; padding: 0; }
#testCloseBtn .ui-icon { margin: 0; }
.test-transcript { border-radius: 12px; padding: 18px; line-height: 1.7; }
.transcript-bubble { box-shadow: none; border-radius: 14px; }
.recording-play { background: var(--accent); color: var(--on-accent); }
.recording-play:hover { background: var(--accent-hover); }
.chip { border-radius: 20px; }

/* Sign-in translates the landing's large lilac/cobalt plane directly. */
.login-overlay { background: var(--bg); }
.login-brand { flex: 1; padding: 48px; background: var(--brand-lilac); color: var(--brand-ink); border: 0; }
.brand-inner { max-width: 520px; margin-block: auto; padding-block: 100px 80px; }
.brand-logo { position: absolute; top: 40px; font-size: 30px; font-weight: 800; letter-spacing: -.04em; margin: 0; }
.brand-headline { font-size: 64px; line-height: 1.02; font-weight: 800; letter-spacing: -.04em; max-width: 9ch; margin-bottom: 28px; }
.brand-sub { font-size: 16px; line-height: 1.75; max-width: 40ch; color: var(--brand-ink); margin-bottom: 36px; }
.brand-points { gap: 16px; }
.brand-points li { font-size: 13px; color: var(--brand-ink); font-weight: 650; }
.brand-points .ui-icon { width: 20px; height: 20px; }
.brand-foot { color: var(--brand-ink); font-size: 12px; }
.login-panel { flex: 1; padding: 80px 48px; }
.login-card { width: 380px; }
.login-logo { color: var(--heading); font-size: 20px; font-weight: 800; letter-spacing: -.03em; margin-bottom: 36px; }
.login-card h1 { font-size: 34px; line-height: 1.2; color: var(--heading); font-weight: 800; margin-bottom: 12px; }
.login-card p { font-size: 14px; line-height: 1.75; }
.login-card a:not(.google-btn) { color: var(--accent); }
.email-login-form { gap: 12px; }
.email-login-form input { min-height: 50px; padding: 13px 16px; }
.email-login-form button, #email-confirm-btn { min-height: 50px; padding: 14px 20px; font-size: 14px; }
.google-btn { background: var(--panel); color: var(--text); border: 1px solid var(--control-border); min-height: 50px; }
.google-btn:hover { box-shadow: none; background: var(--accent-soft); }
.login-error:not(:empty), .login-status:not(:empty) { padding: 12px 16px; border-radius: 12px; line-height: 1.65; }
.login-error:not(:empty) { background: var(--danger-soft); }
.login-status:not(:empty) { background: var(--ok-soft); }
.login-error:empty { margin: 0; min-height: 0; }
.login-card .login-foot { margin-top: 32px !important; font-size: 12px; }
.login-foot a { white-space: nowrap; }
.login-theme-toggle { top: 24px; right: 24px; }

/* Documentation stays readable beside the product's shared visual system. */
.docs-header { background: var(--bg); padding: 16px 28px; }
.docs-brand { font-size: 22px; }
.docs-sidenav { background: var(--master-bg); }
.docs-sidenav a { border-radius: 24px; padding: 9px 12px; }
.docs-sidenav a:hover { background: var(--accent-soft); color: var(--accent); }
.docs-main h1, .docs-main h2 { color: var(--heading); font-weight: 800; }
.docs-main { line-height: 1.8; }
.docs-main :is(p, li) { max-width: 75ch; }
.docs-main pre { background: #13268a; border: 0; border-radius: 16px; padding: 22px; line-height: 1.8; }
.docs-main pre code { color: #f6f1ff; }
.docs-main section { scroll-margin-top: 96px; }

@media (max-width: 1100px) {
  main.view-md { grid-template-columns: 260px minmax(0, 1fr); }
  .md-detail { padding-inline: 24px; }
  .detail-head { margin-inline: -24px; padding-inline: 24px; }
  .brand-headline { font-size: 52px; }
  .login-brand { padding-inline: 36px; }
  .login-panel { padding-inline: 36px; }
}
@media (max-width: 900px) {
  main.view-md { grid-template-columns: 1fr; }
  .md-master { height: auto; max-height: 290px; }
  .md-list { gap: 6px; }
  .md-list .item { padding: 12px 14px; }
  .md-empty { padding-block: 52px; }
  .detail-head { position: static; }
}
@media (max-width: 820px) {
  .login-panel { flex: 1; background: var(--bg); }
  .login-logo { font-size: 26px; }
  .login-card { width: 420px; }
}
@media (max-width: 767px) {
  html { scroll-padding-top: 132px; }
  .app-header { padding-inline: 16px; min-height: 60px; }
  .app-brand { font-size: 21px; }
  .app-header .header-right { gap: 8px; }
  .app-header .btn-ghost { min-height: 36px; padding: 8px 12px; font-size: 12px; }
  .app-header .theme-toggle { padding-inline: 0; }
  .sidebar { padding: 8px 12px; background: var(--nav-bg); backdrop-filter: none; }
  .sidebar-links { gap: 6px; }
  .nav-item { min-height: 40px; padding: 9px 13px; font-size: 12px; }
  .nav-icon .ui-icon { width: 18px; height: 18px; }
  .md-master { padding: 16px; max-height: 270px; }
  .md-master-head { padding-block: 8px 12px; }
  .md-detail { padding: 0 20px 40px; }
  .detail-head { margin-inline: -20px; padding: 24px 20px 18px; gap: 16px; }
  .detail-head h2 { font-size: 24px; }
  .detail-actions { justify-content: flex-start; flex-wrap: wrap; }
  .md-detail .row { grid-template-columns: minmax(0, 1fr); }
  .md-detail .row > .voice-field { grid-column: auto; }
  .md-detail :is(input, select, textarea) { font-size: 16px; }
  .view:not(.view-md) { padding: 24px 16px; }
  .panel { padding: 20px; }
  .logs-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .stat-card, .stat-card + .stat-card { padding: 0 10px; }
  .stat-card:first-child { padding-left: 0; }
  .stat-card .v { font-size: 22px; }
  .logs-filters { padding: 16px; gap: 12px; }
  .logs-filters input, .logs-filters select { font-size: 16px; }
  .logs-filter:has(input[type="date"]) { grid-column: 1 / -1; }
  .login-panel { padding: 100px 24px 40px; align-items: flex-start; }
  .login-card h1 { font-size: 32px; }
  .login-logo { margin-bottom: 40px; }
  .login-theme-toggle { top: 20px; right: 20px; }
  .login-card input { font-size: 16px; }
  .modal-card { padding: 22px; }
  .docs-header { padding-inline: 16px; }
  .docs-main pre { padding: 18px; }
  .docs-sidenav a { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
