:root {
  color-scheme: light;
  --dialt-blue: #0d579b;
  --dialt-green: #329239;
  --dialt-orange: #f7931a;
  --dialt-orange-bright: #ff9f2e;
  --dialt-gray: #4d4d4d;
  --dialt-spectrum: linear-gradient(90deg,#0d579b 0%,#329239 50%,#f7931a 100%);
  --dialt-blue-dark: #0a477e;
  --dialt-blue-wash: #eef5fb;
  --card-border: rgba(13,87,155,.12);
  --bg-white: #ffffff;
  --bg-light: #fafbfc;
  --bg-subtle: #f0f4f8;
  --text-primary: #1a1a2e;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.05);
  --shadow-md: 0 2px 8px rgba(15,23,42,.06);
  --shadow-lg: 0 10px 28px rgba(15,23,42,.10);
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  --font-body: 'Manrope', -apple-system, system-ui, sans-serif;
  --font-display: 'Bricolage Grotesque', 'Manrope', -apple-system, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% -14rem, rgba(13,87,155,.10), transparent 32rem),
    linear-gradient(180deg, var(--bg-white) 0%, var(--bg-light) 46%, var(--bg-subtle) 100%);
  color: var(--text-primary);
  font-family: var(--font-body);
}

button,
input {
  font: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
}

.spectrum-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 3px;
  background: var(--dialt-spectrum);
}

.app-shell {
  width: min(100%, 980px);
  padding: clamp(1rem, 2vw, 2rem);
}

.app-header {
  min-height: 72px;
  margin-bottom: 1rem;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-mark {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
}

.wordmark-row {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.app-title {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.eyebrow,
.form-label {
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-width: 6.6rem;
  justify-content: center;
  border: 1px solid #d9e2ec;
  border-radius: var(--radius-pill);
  background: var(--bg-white);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  padding: 0.5rem 0.85rem;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}

[data-state="LISTENING"] .status-pill {
  border-color: rgba(50,146,57,.28);
  background: rgba(50,146,57,.10);
  color: var(--dialt-green);
}

[data-state="LOCAL_LOADING"] .status-pill,
[data-state="TTS_CHECKING"] .status-pill,
[data-state="BRAIN_WAKING"] .status-pill,
[data-state="WARMING"] .status-pill,
[data-state="PREPARING"] .status-pill,
[data-state="THINKING"] .status-pill {
  border-color: rgba(247,147,26,.32);
  background: rgba(247,147,26,.12);
  color: #b45f08;
}

[data-state="BRAIN_OFFLINE"] .status-pill,
[data-state="ERROR"] .status-pill {
  border-color: rgba(190,18,60,.28);
  background: rgba(190,18,60,.10);
  color: #be123c;
}

[data-state="SPEAKING"] .status-pill {
  border-color: rgba(13,87,155,.30);
  background: rgba(13,87,155,.10);
  color: var(--dialt-blue);
}

[data-mic-warning="true"] .status-pill {
  border-color: rgba(247,147,26,.32);
  background: rgba(247,147,26,.12);
  color: #b45f08;
}

.voice-stage {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1rem;
  margin: 0 auto 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem) 1rem 1.25rem;
}

.mic-wrap {
  position: relative;
  display: grid;
  width: 148px;
  height: 148px;
  place-items: center;
}

.status-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 132px;
  height: 132px;
  border-radius: var(--radius-pill);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

[data-state="LISTENING"] .status-orbit {
  border: 1px solid rgba(50,146,57,.26);
  animation: listenPulse 1.9s ease-out infinite;
}

[data-state="LOCAL_LOADING"] .status-orbit,
[data-state="TTS_CHECKING"] .status-orbit,
[data-state="BRAIN_WAKING"] .status-orbit,
[data-state="PREPARING"] .status-orbit,
[data-state="WARMING"] .status-orbit {
  border: 1px solid rgba(247,147,26,.32);
  animation: speakPulse 0.95s ease-in-out infinite alternate;
}

[data-state="SPEAKING"] .status-orbit {
  border: 1px solid rgba(247,147,26,.32);
  animation: speakPulse 0.95s ease-in-out infinite alternate;
}

.mic-button {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 104px;
  height: 104px;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--dialt-blue);
  color: #ffffff;
  padding: 0.9rem 0.65rem 0.75rem;
  transition: transform var(--transition), background var(--transition);
}

.mic-button:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.mic-button:disabled {
  cursor: default;
  opacity: 0.95;
}

[data-state="LISTENING"] .mic-button {
  background: var(--dialt-green);
}

[data-state="LOCAL_LOADING"] .mic-button,
[data-state="TTS_CHECKING"] .mic-button,
[data-state="BRAIN_WAKING"] .mic-button,
[data-state="PREPARING"] .mic-button,
[data-state="WARMING"] .mic-button {
  background: var(--dialt-orange);
}

[data-state="BRAIN_OFFLINE"] .mic-button,
[data-state="ERROR"] .mic-button {
  background: #be123c;
}

[data-state="SPEAKING"] .mic-button {
  background: var(--dialt-orange);
}

.mic-button:focus-visible,
.stop-button:focus-visible {
  outline: 3px solid rgba(13,87,155,.30);
  outline-offset: 4px;
}

/* The call button's own icon is the brand mark's signal bars, not a stock mic glyph —
   the same shape reappears in the favicon and the landing hero trace. */
.mic-glyph {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  flex: 0 0 auto;
  gap: 3px;
  width: 26px;
  height: 30px;
  margin-bottom: 0.55rem;
}

.mic-glyph i {
  width: 4px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.92;
}

.mic-glyph i:nth-child(1) { height: 45%; }
.mic-glyph i:nth-child(2) { height: 100%; }
.mic-glyph i:nth-child(3) { height: 65%; }
.mic-glyph i:nth-child(4) { height: 80%; }

[data-state="LISTENING"] .mic-glyph i,
[data-state="SPEAKING"] .mic-glyph i {
  animation: hero-eq 1s ease-in-out infinite;
}
.mic-glyph i:nth-child(2) { animation-delay: -0.6s; }
.mic-glyph i:nth-child(3) { animation-delay: -0.2s; }
.mic-glyph i:nth-child(4) { animation-delay: -0.85s; }

@media (prefers-reduced-motion: reduce) {
  .mic-glyph i { animation: none !important; }
}

.mic-label {
  position: relative;
  z-index: 1;
  max-width: 100%;
  min-height: 0.9rem;
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stop-button {
  min-width: 9.25rem;
  border: 1px solid rgba(247,147,26,.32);
  border-radius: var(--radius-pill);
  background: #fff8ef;
  color: #b45f08;
  font-weight: 700;
  padding: 0.7rem 1.1rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.stop-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.stop-button:disabled {
  display: none;
}

.status-detail {
  color: var(--text-secondary);
  font-size: 0.98rem;
  max-width: min(100%, 42rem);
  text-align: center;
}

.conversation-wrap {
  border: 1px solid #d9e2ec;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.conversation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem 0.6rem clamp(1rem, 3vw, 1.5rem);
  border-bottom: 1px solid #e6edf4;
}

.conversation-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--text-muted);
}

.conversation-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  min-width: 0;
}

.responsiveness-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  border: 1px solid rgba(50,146,57,.22);
  border-radius: var(--radius-pill);
  background: rgba(50,146,57,.08);
  color: var(--dialt-green);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.35rem 0.65rem;
  white-space: nowrap;
}

.reset-btn {
  border: 1px solid #d9e2ec;
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.reset-btn:hover {
  color: var(--dialt-blue);
  border-color: var(--dialt-blue);
  background: rgba(13,87,155,.05);
}

.transcript-panel {
  height: min(48vh, 520px);
  min-height: 320px;
  overflow: auto;
  padding: clamp(1rem, 3vw, 1.5rem);
  scroll-behavior: smooth;
}

.transcript-panel:empty::before {
  content: "Your conversation will appear here.";
  display: grid;
  min-height: 100%;
  place-items: center;
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
}

.turn {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.turn-user {
  align-items: flex-end;
}

.turn-assistant {
  align-items: flex-start;
}

.role {
  margin: 0 0 0.28rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.text {
  max-width: min(78%, 42rem);
  border: 1px solid #d9e2ec;
  border-radius: var(--radius-md);
  background: var(--bg-white);
  color: var(--text-primary);
  line-height: 1.48;
  padding: 0.82rem 1rem;
  white-space: pre-wrap;
  box-shadow: var(--shadow-sm);
}

.turn-user .text {
  border-color: rgba(13,87,155,.20);
  background: var(--dialt-blue);
  color: #ffffff;
}

.turn-pending .text {
  opacity: 0.62;
}

.form-control {
  border-color: #cbd5e1;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  min-height: 2.45rem;
}

.form-control:focus {
  border-color: rgba(13,87,155,.68);
  box-shadow: 0 0 0 0.2rem rgba(13,87,155,.12);
}

.event-row {
  border-radius: var(--radius-sm);
  background: var(--bg-light);
  color: var(--dialt-gray);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  padding: 0.5rem 0.6rem;
  overflow-wrap: anywhere;
}

@keyframes listenPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(50,146,57,.24);
    transform: translate(-50%, -50%) scale(0.96);
  }
  100% {
    box-shadow: 0 0 0 24px rgba(50,146,57,0);
    transform: translate(-50%, -50%) scale(1.06);
  }
}

@keyframes speakPulse {
  from {
    box-shadow: 0 0 0 6px rgba(247,147,26,.16);
    transform: translate(-50%, -50%) scale(0.98);
  }
  to {
    box-shadow: 0 0 0 18px rgba(247,147,26,.04);
    transform: translate(-50%, -50%) scale(1.08);
  }
}

@media (max-width: 760px) {
  .app-header {
    align-items: center !important;
    flex-direction: row;
    gap: 0.75rem;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .status-pill {
    min-width: 5.85rem;
  }

  .mic-button {
    width: 92px;
    height: 92px;
    gap: 0.25rem;
    padding: 0.75rem 0.55rem 0.65rem;
  }

  .mic-wrap {
    width: 124px;
    height: 124px;
  }

  .status-orbit {
    width: 108px;
    height: 108px;
  }

  .mic-glyph {
    width: 23px;
    height: 34px;
    margin-bottom: 0.9rem;
  }

  .mic-label {
    font-size: 0.66rem;
  }

  .text {
    max-width: 92%;
  }

  .conversation-head {
    align-items: flex-start;
  }

  .conversation-actions {
    flex-wrap: wrap;
  }

  .responsiveness-badge {
    font-size: 0.68rem;
    padding-inline: 0.5rem;
  }
}

/* --- Demo sign-in gate ------------------------------------------------------------------------ */
.login-gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2rem);
  background:
    radial-gradient(circle at 50% -10rem, rgba(13,87,155,.12), transparent 30rem),
    linear-gradient(180deg, var(--bg-white) 0%, var(--bg-light) 46%, var(--bg-subtle) 100%);
}

.login-card {
  width: min(100%, 400px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  background: var(--bg-white);
  border: 1px solid rgba(13,87,155,.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.login-card::before {
  content: "";
  height: 3px;
  margin: -0.25rem -0.5rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--dialt-spectrum);
}

.auth-pending-card {
  align-items: center;
}

.auth-retry { margin-top: 0; }

.auth-spinner {
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid rgba(13,87,155,.14);
  border-top-color: var(--dialt-blue);
  border-radius: 50%;
  animation: auth-spin .7s linear infinite;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-spinner { animation: none; }
}

.login-brand {
  justify-content: center;
  gap: .6rem;
}

.login-brand .brand-mark {
  width: 40px;
  height: 40px;
}

.login-sub {
  margin: -.25rem 0 .25rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: .95rem;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.login-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.login-input {
  width: 100%;
  padding: .7rem .85rem;
  border: 1px solid #d7e0ea;
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.login-input:focus {
  outline: none;
  border-color: var(--dialt-blue);
  box-shadow: 0 0 0 3px rgba(13,87,155,.12);
}

.login-submit {
  margin-top: .25rem;
  padding: .75rem 1rem;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--dialt-blue);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: filter var(--transition), transform var(--transition);
}

.login-submit:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.login-submit:disabled {
  opacity: .65;
  cursor: default;
}

.login-alt {
  margin: 0.9rem 0 0;
  font-size: 0.88rem;
  color: #718096;
  text-align: center;
}
.login-alt a { color: #0d579b; font-weight: 600; }

.login-divider {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-top: .9rem;
  color: #718096;
  font-size: .8rem;
}
.login-divider::before, .login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #d7e0ea;
}

.login-github {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: .9rem;
  padding: .7rem 1rem;
  border: 1px solid #d7e0ea;
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-weight: 700;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}
.login-github:hover {
  background: #f0f4f8;
  transform: translateY(-1px);
}
.login-github svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.login-error {
  margin: 0;
  text-align: center;
  color: #c0392b;
  font-size: .9rem;
  font-weight: 600;
}

/* --- post-session feedback card --------------------------------------------------------- */
.feedback-card[hidden] { display: none; }   /* class display:flex would beat the UA [hidden] rule */
.feedback-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 24px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.feedback-title {
  font-weight: 600;
  color: var(--text-primary);
}
.feedback-thumbs {
  display: flex;
  gap: 10px;
}
.fb-thumb {
  font-size: 1.3rem;
  line-height: 1;
  padding: 8px 16px;
  border: 1px solid var(--bg-subtle);
  border-radius: var(--radius-pill);
  background: var(--bg-light);
  transition: var(--transition);
}
.fb-thumb:hover { box-shadow: var(--shadow-sm); }
.fb-thumb.selected {
  border-color: var(--dialt-blue);
  background: var(--bg-subtle);
  box-shadow: inset 0 0 0 1px var(--dialt-blue);
}
.fb-select-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.fb-select-label {
  min-width: 64px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.fb-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
/* Provider toggle: reuses the .fb-chip idiom; it drives the NEXT session's backend, so it
   locks (dimmed, inert) while a session is live — switching mid-call isn't a thing. */
.provider-toggle {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.provider-chip:disabled { opacity: 0.55; pointer-events: none; }
.search-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.search-toggle input { width: 18px; height: 18px; accent-color: var(--dialt-blue); }
.search-toggle:has(input:disabled) { opacity: 0.55; }
.fb-chip {
  font-size: 0.85rem;
  line-height: 1;
  padding: 7px 14px;
  border: 1px solid var(--bg-subtle);
  border-radius: var(--radius-pill);
  background: var(--bg-light);
  color: var(--text-secondary);
  transition: var(--transition);
}
.fb-chip:hover { box-shadow: var(--shadow-sm); }
.fb-chip.selected {
  border-color: var(--dialt-blue);
  background: var(--bg-subtle);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--dialt-blue);
}
.voice-picker-group {
  display: grid;
  grid-template-columns: minmax(96px, auto) 1fr;
  align-items: center;
  gap: 8px 12px;
  width: 100%;
}
.voice-picker-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
}
.voice-picker-options {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
@media (max-width: 620px) {
  .voice-picker-group { grid-template-columns: 1fr; }
  .voice-picker-label { text-align: left; }
}
/* Voice preview: a small play button beside its chip (sibling, never nested — see
   renderVoicePicker). The pair moves as one unit in the wrapping chip row. */
.voice-chip-wrap { display: inline-flex; align-items: stretch; gap: 4px; }
.voice-preview-btn {
  min-width: 32px;
  padding: 7px 9px;
  font-size: 0.7rem;
  line-height: 1;
  border: 1px solid var(--bg-subtle);
  border-radius: var(--radius-pill);
  background: var(--bg-light);
  color: var(--text-secondary);
  transition: var(--transition);
}
.voice-preview-btn:hover { box-shadow: var(--shadow-sm); }
.voice-preview-btn.playing {
  border-color: var(--dialt-blue);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--dialt-blue);
}
/* IDLE-only (a playing clip is invisible to the echo cancellers): locked while a session runs,
   same dimming idiom as .provider-chip:disabled. */
.voice-preview-btn:disabled { opacity: 0.55; pointer-events: none; }
.feedback-text {
  border: 1px solid var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font: inherit;
  color: var(--text-primary);
  resize: vertical;
}
.feedback-text:focus { outline: 2px solid var(--dialt-blue); outline-offset: 1px; }
.feedback-actions {
  display: flex;
  gap: 10px;
}
.feedback-send {
  padding: 8px 22px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--dialt-blue);
  color: #fff;
  font-weight: 600;
  transition: var(--transition);
}
.feedback-send:disabled { opacity: 0.45; }
.feedback-skip {
  padding: 8px 18px;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
}
.feedback-skip:hover { color: var(--text-secondary); }

/* Header sign-out: a text action, not a competing button. */
.link-button {
  background: none; border: 0; padding: 0;
  font-size: 0.85rem; color: #718096; cursor: pointer; text-decoration: underline;
}
.link-button:hover { color: #0d579b; }

/* Labelled control cluster (voice picker) under the mic button. */
.control-group { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; }
.control-label {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: #718096;
}
.search-toggle input:disabled + span { opacity: 0.5; }

/* ---------------------------------------------------------------------------------------
   Account menu (header dropdown) + the API & Billing page (account.html).
   Reuses the design tokens above; no new colours beyond the brand spectrum.
---------------------------------------------------------------------------------------- */

/* Header "Account ▾" dropdown — a native <details> so it needs no JS and stays accessible. */
.account-menu { position: relative; }
.account-summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 6px 12px;
  border: 1px solid #d9e2ec;
  border-radius: var(--radius-pill);
  background: var(--bg-white);
  user-select: none;
}
.account-summary::-webkit-details-marker { display: none; }
.account-summary::after { content: " ▾"; color: var(--text-muted); }
.account-menu[open] .account-summary { border-color: var(--dialt-blue); color: var(--dialt-blue); }
.account-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 176px;
  display: flex;
  flex-direction: column;
  padding: 6px;
  background: var(--bg-white);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 20;
}
.account-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
}
.account-item:hover { background: var(--bg-subtle); color: var(--dialt-blue); }

/* Let the global header breathe; the account controls keep a narrower reading measure below it. */
.account-shell { width: min(100%, 980px); padding-bottom: 3rem; }
.account-content { width: min(100%, 760px); margin: 1.75rem auto 0; }
.brand-link { text-decoration: none; }
.account-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
/* The mono eyebrow is the site's instrumentation voice — measurement is the brand. */
.account-eyebrow, .section-eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  margin: 0 0 0.3rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dialt-blue);
}
.account-sub { margin: 0; min-height: 1.35em; color: var(--text-muted); font-size: 0.9rem; }
.account-signout { flex: 0 0 auto; margin-bottom: 0.1rem; }

.account-error {
  margin-bottom: 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  background: #fdecea;
  color: #a83228;
  font-size: 0.9rem;
}

.account-card {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  margin-bottom: 1rem;
  background: var(--bg-white);
  border: 1px solid rgba(13,87,155,.11);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 28px rgba(31, 48, 69, .07);
}
.balance-card {
  background:
    linear-gradient(120deg, rgba(13,87,155,.055), transparent 48%),
    var(--bg-white);
}
.account-card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.4rem; }
.account-h2 { margin: 0; font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.account-note { margin: 0.5rem 0 0; color: var(--text-muted); font-size: 0.88rem; line-height: 1.5; }
.account-footer { margin-top: 1.25rem; color: var(--text-muted); font-size: 0.85rem; text-align: center; }
.page-footer { margin-top: 0.5rem; color: var(--text-muted); font-size: 0.9rem; }
/* The site's one prose-link style — landing, docs and account share it. */
.account-footer a,
.account-note a,
.page-footer a,
.doc-body a,
.land-note a { color: var(--dialt-blue); font-weight: 600; }

.mode-badge {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: #eef5fb;
  color: var(--dialt-blue);
  border: 1px solid rgba(13,87,155,.2);
}
.mode-badge.mode-live { background: rgba(50,146,57,.09); color: #27742d; border-color: rgba(50,146,57,.25); }

.balance-line { margin: 0.15rem 0 0; display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.balance-amount { font-family: var(--font-display); font-size: clamp(2.25rem, 5vw, 3rem); line-height: 1.1; font-weight: 800; color: var(--text-primary); }
.balance-sub { color: var(--text-muted); font-size: 0.9rem; }

.pack-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.1rem; }

/* Shared button treatments for this page. */
.btn-primary, .btn-secondary {
  min-height: 42px;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}
.btn-primary { background: var(--dialt-blue); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--dialt-blue-dark); transform: translateY(-1px); }
.btn-primary:disabled, .btn-secondary:disabled { opacity: 0.5; cursor: default; }
.btn-secondary { background: var(--bg-white); color: var(--dialt-blue); border-color: rgba(13,87,155,.35); }
.btn-secondary:hover:not(:disabled) { background: var(--dialt-blue-wash); border-color: rgba(13,87,155,.55); }
.btn-primary:focus-visible, .btn-secondary:focus-visible, .link-button:focus-visible {
  outline: 3px solid rgba(13,87,155,.2);
  outline-offset: 3px;
}

/* API keys. */
.key-create { display: flex; gap: 0.6rem; margin-top: 1.15rem; }
.key-create .login-input { flex: 1 1 220px; }
.key-list { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.key-empty { margin-top: 0; }
.key-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  min-height: 52px;
  padding: 0.65rem 0.9rem;
  border: 1px solid #e6edf3;
  border-radius: var(--radius-sm);
  background: #fbfcfe;
}
.key-revoked { opacity: 0.5; }
.key-meta { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.key-name { font-weight: 600; color: var(--text-primary); }
.key-hint { color: var(--text-muted); font-size: 0.85rem; }
.key-when { color: var(--text-muted); font-size: 0.8rem; }
.key-revoke { white-space: nowrap; }

.new-key {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(50,146,57,.28);
  border-radius: var(--radius-md);
  background: rgba(50,146,57,.07);
}
.new-key-label { margin: 0 0 0.5rem; font-size: 0.85rem; font-weight: 700; color: #27742d; }
.new-key-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.new-key-value {
  flex: 1 1 260px;
  padding: 0.5rem 0.7rem;
  background: var(--bg-white);
  border: 1px solid #cfe0dc;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  word-break: break-all;
  color: var(--text-primary);
}

/* Hide the account page's data cards until the first /billing load resolves — a signed-out
   visitor is redirected to sign in before any empty shell paints. The header stays visible. */
.account-loading .account-card,
.account-loading .account-intro,
.account-loading .account-footer { visibility: hidden; }

/* My sessions: rows reuse .key-row/.key-list; only the expanded detail line needs its own inset. */
.session-scope-tabs { display: inline-flex; gap: 0.25rem; padding: 0.25rem; margin-top: 0.7rem; border: 1px solid var(--site-rule); border-radius: var(--radius-pill); background: var(--bg-subtle); }
.session-scope-tab { appearance: none; border: 0; border-radius: var(--radius-pill); padding: 0.45rem 0.85rem; background: transparent; color: var(--text-secondary); font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; }
.session-scope-tab.active { background: var(--bg-white); color: var(--dialt-blue); box-shadow: 0 1px 4px rgba(13,87,155,.12); }
.session-scope-tab:focus-visible { outline: 2px solid var(--dialt-blue); outline-offset: 2px; }
.session-item > summary { list-style: none; cursor: pointer; }
.session-item > summary::-webkit-details-marker { display: none; }
.session-item > summary::after { content: " ▾"; color: var(--text-muted); }
.session-item[open] > summary::after { content: " ▴"; }
.session-body { padding: 0 0.9rem 0.75rem; }
.session-owner { display: inline-flex; flex-direction: column; min-width: 9rem; }
.session-owner-name { font-weight: 700; color: var(--text-primary); }
.sessions-load-more { margin-top: 1rem; }
.session-artifacts { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.75rem; }
.session-playback { display: flex; align-items: center; gap: 0.65rem; min-height: 2rem; }
.session-playback-toggle { min-width: 7.2rem; padding: 0.38rem 0.75rem; }
.session-playback-status { color: var(--text-secondary); }
.session-artifact { display: flex; align-items: center; gap: 0.6rem; }
.session-artifact audio { height: 32px; max-width: 100%; }
.session-track-label { min-width: 5.5rem; font-weight: 600; color: var(--text-secondary); font-size: 0.85rem; }
.session-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem 0.9rem; margin-top: 1rem; }
.session-filter { display: flex; flex-direction: column; gap: 0.25rem; }
.session-filter-grow { flex: 1 1 220px; }
.session-filter-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.session-filter .login-input { min-width: 0; }
.session-filter input[type="date"] { width: 10.5rem; }
.session-filter-check { flex-direction: row; align-items: center; gap: 0.4rem; padding-bottom: 0.6rem; color: var(--text-secondary); font-size: 0.9rem; cursor: pointer; }
.session-filter-check input { accent-color: var(--dialt-blue); width: 1rem; height: 1rem; }
.session-filter-clear { padding-bottom: 0.5rem; }
.session-stats { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; padding-top: 0.5rem; }
.session-stat { display: flex; align-items: baseline; gap: 0.45rem; flex-wrap: wrap; }
.session-stat-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.session-stat-value { font-weight: 700; color: var(--text-primary); }
.transcript { display: flex; flex-direction: column; gap: 0.55rem; margin-top: 0.9rem; }
.transcript-turn {
  appearance: none;
  width: auto;
  font: inherit;
  text-align: left;
  max-width: 44rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid #e6edf3;
  background: var(--bg-white);
}
.transcript-seek { cursor: pointer; }
.transcript-seek:hover { border-color: rgba(13,87,155,.35); box-shadow: 0 2px 8px rgba(13,87,155,.08); }
.transcript-seek:focus-visible { outline: 2px solid var(--dialt-blue); outline-offset: 2px; }
.transcript-turn.turn-user { align-self: flex-start; background: var(--dialt-blue-wash); border-color: rgba(13,87,155,.16); }
.transcript-turn.turn-assistant { align-self: flex-end; }
.turn-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.2rem; }
.turn-who { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-secondary); }
.turn-time { font-size: 0.75rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.turn-chip {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 2px 7px; border-radius: var(--radius-pill);
  background: var(--bg-subtle); color: var(--text-secondary); border: 1px solid #e6edf3;
}
.turn-chip-response { background: rgba(50,146,57,.09); color: #27742d; border-color: rgba(50,146,57,.25); font-variant-numeric: tabular-nums; }
.turn-text { display: block; margin: 0; color: var(--text-primary); line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.session-stage-times { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin-top: 0.9rem; }
.session-stage-times p { flex-basis: 100%; margin: 0; }
.session-team { margin-top: 0.9rem; padding-top: 0.6rem; border-top: 1px dashed #e6edf3; }
.session-team p { margin: 0.15rem 0; }
@media (max-width: 640px) {
  .transcript-turn { max-width: 100%; }
  .transcript-turn.turn-assistant { align-self: stretch; }
}

@media (max-width: 760px) { .account-content { margin-top: 1rem; } }

@media (max-width: 520px) {
  .account-intro { align-items: center; }
  .account-card { padding: 1.15rem; }
  .key-create { flex-direction: column; }
  .key-create .login-input { flex-basis: auto; }
  .key-create .btn-primary { width: 100%; }
  .key-row { align-items: flex-start; }
  .key-meta { gap: 0.35rem 0.65rem; }
}

/* ===== Utilities (Bootstrap replacement — only the classes the markup actually uses).
   The mb-/mt- spacing utilities keep !important to match the Bootstrap semantics the
   pages were built against. (NB: never write a star-slash sequence inside this comment —
   it terminates the comment early and the stray text swallows the NEXT rule.) */
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-3 { gap: 1rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.small { font-size: 0.875em; }
.text-muted { color: var(--text-muted); }
/* Element defaults Bootstrap's reboot used to provide. The [hidden] rule is LOAD-BEARING:
   JS toggles .hidden on elements whose classes set display (login-gate is display:grid,
   search-toggle inline-flex, …) — without !important the class wins and hidden does nothing
   (a signed-in user would be stuck behind the login overlay forever). */
[hidden] { display: none !important; }
p { margin: 0 0 1rem; }
h1, h2, h3 { margin: 0 0 0.5rem; }
summary { cursor: pointer; }

/* ===== Landing page ===== */
.land-shell { padding-bottom: 2rem; }

.site-nav { display: flex; align-items: center; gap: 1.4rem; margin-left: auto; }
.app-header > .site-nav-cta { margin-left: 1.4rem; }   /* the CTA sits after the nav, same gap */
.site-nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.site-nav-link:hover { color: var(--dialt-blue); }
.site-nav-link.active {
  color: var(--dialt-blue);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}
.site-nav-cta {
  white-space: nowrap;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-pill);
  background: var(--dialt-blue);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background var(--transition), transform var(--transition);
}
.site-nav-cta:hover { background: var(--dialt-blue-dark); transform: translateY(-1px); }
.site-nav-link:focus-visible, .site-nav-cta:focus-visible,
.customer-view-toggle:focus-visible, .customer-view-banner-exit:focus-visible,
.btn-cta:focus-visible, .btn-cta-ghost:focus-visible {
  outline: 3px solid rgba(13,87,155,.2);
  outline-offset: 4px;
}
.site-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
.site-nav-toggle-bars,
.site-nav-toggle-bars::before,
.site-nav-toggle-bars::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--transition), opacity var(--transition), top var(--transition);
}
.site-nav-toggle-bars { position: relative; }
.site-nav-toggle-bars::before, .site-nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.site-nav-toggle-bars::before { top: -6px; }
.site-nav-toggle-bars::after { top: 6px; }
.site-nav-toggle[aria-expanded="true"] .site-nav-toggle-bars { background: transparent; }
.site-nav-toggle[aria-expanded="true"] .site-nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.site-nav-toggle[aria-expanded="true"] .site-nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }
.site-nav-toggle:focus-visible { outline: 3px solid rgba(13,87,155,.2); outline-offset: 3px; }
@media (max-width: 860px) {
  /* Mobile: brand, the menu toggle, the optional team-only customer-view toggle and the API-key
     CTA stay on one row; Playground, Sessions, Evals, Docs and Benchmarks move into a panel the
     toggle opens, overlaying the page below the header instead of pushing it down. Because the
     panel is taken out of flow (position: absolute) it never affects this row's own layout, so
     the row can't shift or resize itself depending on whether the panel is open -- it's simply
     unaffected either way. customer-view-toggle (web/customer-view.mjs) is inserted at runtime
     directly before .site-nav-cta, only for team accounts -- explicit order values place it
     correctly whether or not it's there, without needing a sibling-adjacency selector. */
  .app-header { position: relative; }
  .site-nav-toggle { display: inline-flex; width: 36px; height: 36px; order: 1; margin-left: auto; }
  /* "Customer view" doesn't fit next to the hamburger toggle and the CTA at phone widths (the
     three together overflowed and clipped the CTA off-screen). font-size: 0 hides the button's
     own "Customer view" text node visually -- it still counts as the accessible name -- and the
     ::after pseudo-element supplies a compact glyph at its own font-size instead. */
  .app-header > .customer-view-toggle {
    order: 2;
    width: 36px;
    height: 36px;
    margin-left: .35rem;
    padding: 0;
    font-size: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .customer-view-toggle::after { content: "CV"; font-size: .62rem; font-weight: 750; }
  .app-header > .site-nav-cta { order: 3; margin-left: .35rem; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    padding: .2rem 0;
    z-index: 20;
  }
  .site-nav.is-open { display: flex; }
  .site-nav-link { display: block; padding: .5rem 1.05rem; }
  .site-nav-scrim {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 15;
    background: rgba(17,17,15,.45);
  }
  .site-nav-scrim.is-open { display: block; }
}
@media (max-width: 520px) {
  .app-shell { padding-inline: 1rem; }
  .app-title { font-size: 1.85rem; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-lockup { gap: 0.55rem; }
  .site-nav-cta { padding: 0.48rem 0.85rem; font-size: 0.85rem; }
}

/* The hero's signature: the same three-color bar language as the call button and favicon,
   quiet and unlabelled — a mark, not an infographic. */
@keyframes hero-eq {
  0%, 100% { transform: scaleY(0.55); }
  50% { transform: scaleY(1); }
}
.cta-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 2.2rem; }
.btn-cta, .btn-cta-ghost {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}
.btn-cta { background: var(--dialt-blue); color: #fff; }
.btn-cta:hover { background: var(--dialt-blue-dark); transform: translateY(-1px); }
.btn-cta-ghost {
  color: var(--dialt-blue);
  border: 1.5px solid rgba(13,87,155,.35);
  background: var(--bg-white);
}
.btn-cta-ghost:hover { background: var(--dialt-blue-wash); }
/* One card chrome for the landing surfaces. */
.stat,
.bench-table {
  background: var(--bg-white);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.land-section { margin-top: clamp(2.6rem, 6vw, 4rem); }
.land-section-first { margin-top: clamp(1.2rem, 3vw, 2rem); }
/* A signed-out sign-out… isn't one: the button variant matches the link styling. */
button.site-nav-link { background: none; border: 0; padding: 0; cursor: pointer; }
.land-h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}
.land-note { max-width: 68ch; color: var(--text-secondary); line-height: 1.65; }
/* Inline-code chip, shared by the landing sections and the docs prose. */
.land-section code, .doc-body code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.85em;
  background: var(--bg-subtle);
  padding: 1px 5px;
  border-radius: 5px;
  color: var(--dialt-blue-dark);
}
/* Long identifiers in prose (paths, event names) must break rather than push the page wider than a phone. */
.doc-body p code, .doc-body li code, .doc-body td code { overflow-wrap: anywhere; }

/* The dark code block, shared by the landing snippet and the docs page.
   position:relative is load-bearing — .copy-btn positions against it. */
.code-block {
  position: relative;
  margin: 0;
  padding: 0.95rem 1.1rem;
  overflow-x: auto;
  background: #0f1b1a;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.code-block code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  background: none;
  padding: 0;
  color: #cfe0dc;
}

.bench-h3 {
  margin: 1.6rem 0 0.5rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
}
.bench-when { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-left: 0.4rem; white-space: nowrap; }
.bench-scroll { overflow-x: auto; }
/* One table base for landing benchmarks and docs prose tables. */
.bench-table, .doc-body table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.bench-table th, .bench-table td,
.doc-body th, .doc-body td { text-align: left; padding: 0.6rem 0.9rem; border-bottom: 1px solid #e6edf3; }
.bench-table th, .doc-body th { font-weight: 700; color: var(--text-primary); }
.doc-body table { margin: 0.8rem 0; }
.doc-body td code { white-space: nowrap; }
.bench-table { overflow: hidden; }   /* clips row borders to the card radius */
.bench-table tbody tr:last-child td { border-bottom: none; }
.bench-table th { background: var(--bg-light); font-size: 0.85rem; }
.bench-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bench-us td { background: rgba(13,87,155,.06); font-weight: 700; color: var(--text-primary); }
.bench-model {
  display: block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
}

.site-footer {
  margin-top: clamp(3rem, 7vw, 5rem);
  padding-top: 1.2rem;
  border-top: 1px solid #e6edf3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.site-footer-nav { display: flex; gap: 1.1rem; }
.site-footer-nav a { color: var(--text-muted); text-decoration: none; font-weight: 600; }
.site-footer-nav a:hover { color: var(--dialt-blue); }

/* ===== Docs (quickstart) ===== */
.docs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 2.2rem;
  align-items: start;
}
@media (max-width: 860px) { .docs-layout { grid-template-columns: 1fr; } .docs-toc { display: none; } }
.docs-toc {
  position: sticky;
  top: 1.2rem;
  font-size: 0.85rem;
}
.docs-toc-label { margin: 0 0 0.5rem; }   /* pairs with the shared .eyebrow class in markup */
.docs-toc a {
  display: block;
  padding: 0.22rem 0;
  color: var(--text-secondary);
  text-decoration: none;
}
.docs-toc a:hover { color: var(--dialt-blue); }
.copy-btn {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 6px;
  background: rgba(255,255,255,.06);
  color: #cfe0dc;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}
pre:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover { background: rgba(255,255,255,.14); }

/* Developer docs: shared by the short guide and the complete reference. */
.docs-hero { padding: 2.2rem 0 1rem; }
.docs-section { padding-top: 2rem; }
.doc-title { margin: .2rem 0 .65rem; font-size: clamp(2rem, 5vw, 2.7rem); color: var(--text-primary); }
.doc-lead { max-width: 70ch; font-size: 1.05rem; color: var(--text-secondary); line-height: 1.65; }
.doc-updated { margin: 0 0 1.4rem; color: var(--text-muted); font-size: .84rem; }
.doc-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; margin: 1rem 0; }
.doc-card { padding: 1rem 1.1rem; border: 1px solid var(--card-border); border-radius: var(--radius-md); background: var(--bg-white); box-shadow: var(--shadow-sm); }
.doc-card h2, .doc-card h3 { margin: 0 0 .3rem; font-size: 1.04rem; color: var(--text-primary); }
.doc-card p { margin: 0; font-size: .92rem; color: var(--text-secondary); }
.support { display: inline-block; margin-bottom: .45rem; padding: .15rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.support-primary { color: var(--dialt-green); background: rgba(50,146,57,.11); }
.support-advanced { color: #8a5800; background: rgba(247,147,26,.13); }
.quickstart-steps { margin: 1rem 0; padding-left: 1.4rem; color: var(--text-secondary); }
.quickstart-steps li { margin: .75rem 0; padding-left: .25rem; line-height: 1.55; }
.reference-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .8rem; margin: 1rem 0; }
.reference-card { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem; border: 1px solid var(--card-border); border-radius: var(--radius-md); background: var(--bg-white); box-shadow: var(--shadow-sm); text-decoration: none; }
.reference-card:hover { border-color: var(--dialt-blue); }
.reference-card strong { color: var(--text-primary); }
.reference-card span { color: var(--text-secondary); font-size: .9rem; line-height: 1.45; }
.integration-card .support { align-self: flex-start; }
.doc-body { line-height: 1.65; color: var(--text-secondary); min-width: 0; }
.doc-body h2 { margin: 2.7rem 0 .65rem; font-size: 1.35rem; font-weight: 800; color: var(--text-primary); scroll-margin-top: 1rem; }
.doc-body h2:first-of-type { margin-top: .6rem; }
.doc-body h3 { margin: 1.55rem 0 .45rem; font-size: 1.04rem; color: var(--text-primary); scroll-margin-top: 1rem; }
.doc-body h2 a, .doc-body h3 a { color: inherit; text-decoration: none; }
.doc-body h2 a:hover::after, .doc-body h3 a:hover::after { content: " #"; color: var(--dialt-blue); }
.doc-body p { margin: .55rem 0; }
.doc-body ul { padding-left: 1.25rem; }
.doc-body li { margin: .35rem 0; }
.doc-body .code-block { margin: .85rem 0; }
.doc-callout { margin: 1rem 0; padding: .9rem 1rem; border-left: 3px solid var(--dialt-blue); border-radius: 0 8px 8px 0; background: rgba(13,87,155,.07); }
.doc-callout strong { color: var(--text-primary); }
.api-signature { color: var(--text-primary); font-weight: 700; overflow-wrap: anywhere; }
.doc-body td { vertical-align: top; }
.doc-body td:first-child { white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.doc-message-list { display: flex; flex-direction: column; gap: .6rem; margin: 1rem 0; }
.doc-message summary { display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap; font-weight: 700; color: var(--text-primary); list-style: revert; }
.doc-message-title { font-weight: 400; color: var(--text-secondary); font-size: .9rem; }
.doc-message table { width: 100%; border-collapse: collapse; font-size: .87rem; margin-top: .75rem; }
.doc-message th, .doc-message td { text-align: left; padding: .5rem .7rem; border-bottom: 1px solid #e6edf3; vertical-align: top; }
.doc-message th { font-weight: 700; color: var(--text-primary); }
.doc-message > p { margin-top: .75rem; font-size: .9rem; color: var(--text-secondary); }
.doc-footer { margin-top: 2.2rem; }
.playground-toolbar { min-height: 2.7rem; margin: -.65rem 0 1rem; }
@media (max-width:700px) {
  .doc-grid, .reference-grid { grid-template-columns:1fr; }
  .doc-body td:first-child { white-space:normal; }
}

/* ===== Landing page: warm technical editorial ===== */
.landing-page {
  --landing-ink: #11110f;
  --landing-paper: #f8f4ec;
  --landing-paper-deep: #f0eade;
  --landing-rule: rgba(17,17,15,.16);
  --landing-orange: #f7931a;
  --landing-orange-ink: #a94f00;
  --landing-green: #329239;
  --landing-green-ink: #216d28;
  --landing-blue: #0d579b;
  background:
    radial-gradient(circle at 52% 20%, rgba(255,255,255,.9), transparent 31rem),
    var(--landing-paper);
  color: var(--landing-ink);
}
.landing-page .spectrum-bar {
  position: fixed;
  right: 0;
  left: 0;
  height: 2px;
}
.landing-page .land-shell {
  width: min(100%, 1480px);
  padding: 0 clamp(1.5rem, 4.7vw, 4.75rem) 2.4rem;
}
.landing-page .app-header {
  min-height: 64px;
  margin: 0 calc(clamp(1.5rem, 4.7vw, 4.75rem) * -1);
  padding: 0 clamp(1.5rem, 4.7vw, 4.75rem);
  border-bottom: 1px solid var(--landing-rule);
}
.landing-page .brand-lockup { gap: .55rem; }
.landing-page .brand-mark { width: 29px; height: 29px; }
.landing-page .app-title {
  color: var(--landing-ink);
  font-family: var(--font-body);
  font-size: 1.33rem;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1;
  text-transform: uppercase;
}
.landing-page .site-nav { gap: clamp(.85rem, 2.4vw, 2.25rem); }
.landing-page .app-header > .site-nav-cta { margin-left: clamp(.85rem, 2.4vw, 2.25rem); }
.landing-page .site-nav-link {
  color: var(--landing-ink);
  font-size: .78rem;
  font-weight: 650;
}
.landing-page .site-nav-link:hover { color: var(--landing-orange); }
.landing-page .site-nav-cta {
  padding: .68rem 1.05rem;
  border-radius: 7px;
  background: var(--landing-orange);
  color: var(--landing-ink);
  font-size: .78rem;
  font-weight: 750;
}
.landing-page .site-nav-cta:hover { background: #df7d09; color: var(--landing-ink); }
@media (max-width: 860px) {
  .landing-page .site-nav {
    background: var(--landing-paper);
    border: 1px solid var(--landing-rule);
  }
  .landing-page .site-nav-link { border-top: 1px solid var(--landing-rule); }
  .landing-page .site-nav-link:first-child { border-top: 0; }
}

.landing-eyebrow {
  margin: 0 0 .75rem;
  color: var(--landing-orange-ink);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.landing-hero {
  display: flex;
  align-items: center;
  min-height: 420px;
  padding: clamp(2.7rem, 6vw, 5.4rem) 0 2.6rem;
}
.landing-hero-copy h1,
.landing-product h2,
.landing-detail h2 {
  color: var(--landing-ink);
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
}
.landing-hero-copy { max-width: 720px; }
.landing-hero-copy h1 {
  margin: 0 0 1.35rem;
  font-size: clamp(2.6rem, 5.2vw, 4.2rem);
  hyphens: none;
  letter-spacing: -.03em;
  line-height: .98;
}
.landing-hero-copy h1 em {
  color: var(--landing-orange);
  font-style: normal;
  /* never let "Business-specific" break at its own hyphen */
  white-space: nowrap;
}
.landing-lede,
.landing-support {
  max-width: 39ch;
  color: #292925;
  font-size: .96rem;
  line-height: 1.55;
}
.landing-lede { margin: 0 0 .45rem; font-weight: 600; }
.landing-support { margin: 0 0 1.45rem; }
.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}
.landing-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: .68rem 1.05rem;
  border: 1px solid var(--landing-ink);
  border-radius: 7px;
  color: var(--landing-ink);
  font-size: .86rem;
  font-weight: 750;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}
.landing-button:hover { transform: translateY(-2px); }
.landing-button-primary {
  border-color: var(--landing-orange);
  background: var(--landing-orange);
  color: var(--landing-ink);
  box-shadow: 0 7px 20px rgba(247,147,26,.18);
}
.landing-button-primary:hover { background: #df7d09; color: var(--landing-ink); }
.landing-button-secondary { background: rgba(255,255,255,.42); }
.landing-button-secondary:hover { background: #fff; }
.button-wave {
  display: inline-flex;
  height: 19px;
  align-items: center;
  gap: 2px;
}
.button-wave i {
  display: block;
  width: 2px;
  height: 45%;
  border-radius: 3px;
  background: currentColor;
  animation: landing-wave 1.2s ease-in-out infinite alternate;
}
.button-wave i:nth-child(2) { height: 100%; animation-delay: -.3s; }
.button-wave i:nth-child(3) { height: 65%; animation-delay: -.6s; }
.button-wave i:nth-child(4) { height: 85%; animation-delay: -.9s; }
.button-wave i:nth-child(5) { height: 36%; animation-delay: -.45s; }
@keyframes landing-wave {
  from { transform: scaleY(.55); }
  to { transform: scaleY(1); }
}

.landing-product {
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr);
  column-gap: clamp(2rem, 6vw, 6rem);
  row-gap: clamp(3rem, 5vw, 4.5rem);
  align-items: stretch;
  padding: clamp(3.8rem, 6vw, 5.25rem) 0;
}
.landing-product h2,
.landing-detail h2 {
  margin: 0 0 1.05rem;
  font-size: clamp(2rem, 3.5vw, 3rem);
  letter-spacing: -.025em;
  line-height: .98;
}
.capability-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.4rem, 2.5vw, 2.2rem) clamp(1.6rem, 4vw, 4rem);
  align-self: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.capability-list li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: .7rem;
}
.capability-mark {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid var(--landing-orange);
  border-radius: 50%;
  color: var(--landing-orange);
  font-size: .85rem;
}
.capability-list strong { display: block; margin-bottom: .14rem; font-size: .88rem; }
.capability-list p {
  margin: 0;
  color: #4e4d47;
  font-size: .875rem;
  line-height: 1.6;
}
.landing-detail > p:not(.landing-eyebrow) {
  color: #4e4d47;
  font-size: .9rem;
  line-height: 1.65;
}

.landing-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(3rem, 9vw, 9rem);
  padding: clamp(3.5rem, 5vw, 4.75rem) 0;
}
.landing-detail { max-width: 46rem; }
.landing-detail h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.landing-detail > p:not(.landing-eyebrow) { max-width: 55ch; font-size: .92rem; }
.landing-detail a { color: var(--landing-blue); font-weight: 700; }
.landing-page .site-footer {
  margin-top: 0;
  padding: 2rem 0 .5rem;
  border-top: 0;
  color: #6d6b64;
  font-size: .8rem;
}
.landing-page .site-footer-nav a { color: #6d6b64; font-size: .8rem; }
.landing-page .site-footer-nav a:hover { color: var(--landing-orange); }
.landing-page .site-nav-link:focus-visible,
.landing-page .site-nav-cta:focus-visible,
.landing-button:focus-visible,
.landing-page .site-footer-nav a:focus-visible {
  outline: 3px solid rgba(13,87,155,.35);
  outline-offset: 4px;
}

@media (max-width: 900px) {
  .landing-hero { padding-top: 4rem; }
  .landing-hero-copy { max-width: 650px; }
  .landing-hero-copy h1 { font-size: clamp(2.5rem, 4.6vw, 3.4rem); }
  .landing-product { grid-template-columns: 1fr 1fr; }
  .capability-column { grid-column: 1 / -1; grid-row: auto; }
  .capability-list { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .landing-page .land-shell { padding-inline: 1.05rem; }
  .landing-page .app-header {
    margin-inline: -1.05rem;
    padding-inline: 1.05rem;
  }
  .landing-page .app-title { font-size: 1.08rem; }
  .landing-page .brand-mark { width: 26px; height: 26px; }
  .landing-page .site-nav-cta { padding: .56rem .72rem; font-size: .7rem; }
  .landing-hero { min-height: 0; padding-top: 3.4rem; }
  .landing-hero-copy h1 { font-size: clamp(2.1rem, 7.4vw, 2.8rem); line-height: 1.0; }
  .landing-lede, .landing-support { font-size: .9rem; }
  .landing-actions { align-items: stretch; }
  .landing-button { min-height: 46px; }
  .landing-product { grid-template-columns: 1fr; padding: 4rem 0; }
  .capability-column { grid-column: auto; }
  .capability-list { grid-column: auto; grid-template-columns: 1fr; }
  .landing-details { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media (max-width: 430px) {
  .landing-hero-copy h1 { font-size: clamp(1.95rem, 8.2vw, 2.4rem); }
  .landing-actions { flex-direction: column; }
  .landing-button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .landing-page *, .landing-page *::before, .landing-page *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* ===== Shared public-site surfaces ===== */
.site-page {
  --site-ink: #11110f;
  --site-paper: #f8f4ec;
  --site-paper-deep: #f0eade;
  --site-rule: rgba(17,17,15,.16);
  --site-orange-ink: #a94f00;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -18rem, rgba(255,255,255,.95), transparent 34rem),
    var(--site-paper);
  color: var(--site-ink);
}
.site-page .spectrum-bar {
  position: fixed;
  right: 0;
  left: 0;
  height: 2px;
}
.site-page .app-shell {
  width: min(100%, 1120px);
  padding: 0 clamp(1.25rem, 3.5vw, 3rem) 3rem;
}
.benchmarks-page .app-shell { width: min(100%, 1260px); }
.docs-page .app-shell { width: min(100%, 1180px); }
.account-page .app-shell { width: min(100%, 1100px); }
.site-page .app-header {
  min-height: 66px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--site-rule);
}
.site-page .brand-lockup { gap: .55rem; }
.site-page .brand-mark { width: 29px; height: 29px; }
.site-page .app-title {
  color: var(--site-ink);
  font-family: var(--font-body);
  font-size: 1.33rem;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1;
  text-transform: uppercase;
}
.site-page .site-nav { gap: clamp(.85rem, 2.4vw, 2.1rem); }
.site-page .app-header > .site-nav-cta { margin-left: clamp(.85rem, 2.4vw, 2.1rem); }
.site-page .site-nav-link {
  color: var(--site-ink);
  font-size: .8rem;
  font-weight: 650;
}
.site-page .site-nav-link:hover,
.site-page .site-nav-link.active { color: var(--site-orange-ink); }
.site-page .site-nav-link.active {
  text-decoration-color: var(--dialt-orange);
  text-underline-offset: 7px;
}
.site-page .site-nav-cta {
  padding: .68rem 1.05rem;
  border-radius: 7px;
  background: var(--dialt-orange);
  color: var(--site-ink);
  font-size: .8rem;
  font-weight: 750;
}
.site-page .site-nav-cta:hover { background: #df7d09; color: var(--site-ink); }
.site-page .site-nav-cta.active { box-shadow: inset 0 0 0 2px var(--site-ink); }
.customer-view-toggle {
  margin-left: clamp(.65rem, 1.8vw, 1.25rem);
  padding: .55rem .75rem;
  border: 1px solid var(--site-rule);
  border-radius: 7px;
  background: #fff;
  color: var(--site-ink);
  font: 650 .72rem/1 var(--font-body);
  white-space: nowrap;
}
.customer-view-toggle:hover { border-color: var(--dialt-orange); color: var(--site-orange-ink); }
.customer-view-toggle[aria-pressed="true"] {
  border-color: var(--dialt-orange);
  background: #fff6e9;
  color: var(--site-orange-ink);
}
.customer-view-toggle:disabled,
.customer-view-banner-exit:disabled { cursor: wait; opacity: .6; }
.customer-view-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: .75rem 0 0;
  padding: .7rem .85rem;
  border: 1px solid rgba(180, 95, 8, .3);
  border-radius: 7px;
  background: #fff6e9;
  color: #71400d;
  font-size: .78rem;
}
.customer-view-banner[data-error="true"] { border-color: #be123c; }
.customer-view-error {
  margin: .75rem 0 0;
  padding: .7rem .85rem;
  border: 1px solid rgba(190, 18, 60, .35);
  border-radius: 7px;
  background: #fff1f4;
  color: #8f1234;
  font-size: .78rem;
}
.customer-view-banner-exit {
  flex: 0 0 auto;
  min-height: 44px;
  padding: .55rem .35rem;
  border: 0;
  background: transparent;
  color: #71400d;
  font: 750 .75rem/1 var(--font-body);
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 860px) {
  .site-page .site-nav {
    background: var(--site-paper);
    border: 1px solid var(--site-rule);
  }
  .site-page .site-nav-link { border-top: 1px solid var(--site-rule); }
  .site-page .site-nav-link:first-child { border-top: 0; }
}
.site-page .section-eyebrow,
.site-page .account-eyebrow,
.site-page .eyebrow {
  color: var(--site-orange-ink);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.site-page .site-footer {
  color: #6d6b64;
  border-color: var(--site-rule);
  font-size: .8rem;
}
.site-page .site-footer-nav a { color: #6d6b64; font-size: .8rem; }
.site-page .site-footer-nav a:hover { color: var(--site-orange-ink); }

/* Evidence / benchmark page. */
.benchmarks-page .land-section-first { margin-top: 0; padding-top: clamp(3.5rem, 7vw, 6rem); }
.benchmarks-page .section-eyebrow { margin-bottom: .8rem; }
.benchmarks-page .land-h2 {
  max-width: 12ch;
  margin-bottom: 1.1rem;
  color: var(--site-ink);
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(3.5rem, 7vw, 6rem);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: .9;
}
.benchmarks-page .land-note {
  max-width: 76ch;
  color: #4e4d47;
  font-size: .98rem;
  line-height: 1.75;
}
.benchmarks-page .bench-h3 {
  margin: clamp(2.75rem, 6vw, 4.5rem) 0 .75rem;
  color: var(--site-ink);
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(1.55rem, 2.5vw, 2.15rem);
  font-weight: 400;
}
.benchmarks-page .bench-when {
  color: #6f6c64;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .68rem;
  font-weight: 400;
}
.benchmarks-page .bench-table {
  border: 1px solid var(--site-rule);
  border-radius: 11px;
  background: rgba(255,255,255,.34);
  box-shadow: none;
}
.benchmarks-page .bench-table th {
  background: rgba(17,17,15,.035);
  color: var(--site-ink);
  font-size: .82rem;
}
.benchmarks-page .bench-table th,
.benchmarks-page .bench-table td { padding: .85rem 1rem; border-color: var(--site-rule); }
.benchmarks-page .bench-us td { background: rgba(247,147,26,.09); }
.benchmarks-page .bench-model { margin-top: .2rem; color: #706e67; }

/* Playground and its authentication states. */
.playground-page .playground-toolbar { margin: 1.1rem 0 .25rem; }
.playground-page .status-pill,
.playground-page .account-summary {
  border-color: var(--site-rule);
  border-radius: 7px;
  background: rgba(255,255,255,.42);
  box-shadow: none;
}
.playground-page .voice-stage {
  margin-bottom: 1.4rem;
  padding: clamp(1.6rem, 4vw, 2.6rem) 1rem 1.5rem;
  border: 1px solid var(--site-rule);
  border-radius: 14px;
  background: rgba(255,255,255,.28);
}
.playground-page .mic-button {
  background: var(--dialt-orange);
  color: var(--site-ink);
  box-shadow: 0 10px 28px rgba(247,147,26,.24);
}
.playground-page[data-state="LISTENING"] .mic-button { background: var(--dialt-green); color: #fff; }
.playground-page[data-state="SPEAKING"] .mic-button,
.playground-page[data-state="LOCAL_LOADING"] .mic-button,
.playground-page[data-state="TTS_CHECKING"] .mic-button,
.playground-page[data-state="BRAIN_WAKING"] .mic-button,
.playground-page[data-state="PREPARING"] .mic-button,
.playground-page[data-state="WARMING"] .mic-button { color: var(--site-ink); }
.playground-page .provider-toggle { gap: .5rem; }
.playground-page .fb-chip {
  min-height: 36px;
  border-color: var(--site-rule);
  border-radius: 7px;
  background: rgba(255,255,255,.34);
  color: #4e4d47;
}
.playground-page .fb-chip.selected {
  border-color: var(--site-ink);
  background: var(--site-ink);
  color: #fff;
  box-shadow: none;
}
.playground-page .voice-preview-btn {
  min-height: 36px;
  border-color: var(--site-rule);
  border-radius: 7px;
  background: rgba(255,255,255,.34);
  color: #4e4d47;
}
.playground-page .voice-preview-btn.playing {
  border-color: var(--site-ink);
  color: var(--site-ink);
  box-shadow: inset 0 0 0 1px var(--site-ink);
}
.playground-page .search-toggle { min-height: 32px; color: #4e4d47; }
.playground-page .search-toggle input { accent-color: var(--dialt-orange); }
.playground-page .status-detail { color: #34332e; }
.playground-page .recording-notice { max-width: 66ch; text-align: center; line-height: 1.55; }
.playground-page .conversation-wrap,
.playground-page .feedback-card {
  border: 1px solid var(--site-rule);
  border-radius: 12px;
  background: rgba(255,255,255,.42);
  box-shadow: none;
}
.playground-page .conversation-head { border-color: var(--site-rule); }
.playground-page .conversation-title { color: var(--site-orange-ink); font-family: 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .07em; }
.playground-page .reset-btn { border-color: var(--site-rule); border-radius: 6px; background: transparent; }
.playground-page .turn-user .text {
  border-color: rgba(247,147,26,.45);
  background: rgba(247,147,26,.16);
  color: var(--site-ink);
  box-shadow: none;
}
.playground-page .turn-assistant .text {
  border-color: rgba(50,146,57,.28);
  background: rgba(255,255,255,.62);
  box-shadow: none;
}
.playground-page .event-row { background: rgba(17,17,15,.04); }
.playground-page .login-gate {
  background:
    radial-gradient(circle at 50% 10%, rgba(255,255,255,.9), transparent 26rem),
    var(--site-paper);
}
.playground-page .login-card {
  border: 1px solid var(--site-rule);
  border-radius: 14px;
  background: rgba(255,255,255,.48);
  box-shadow: 0 20px 60px rgba(17,17,15,.09);
}
.playground-page .login-card::before { background: var(--dialt-orange); }
.playground-page .login-input,
.account-page .login-input {
  min-height: 45px;
  border-color: var(--site-rule);
  border-radius: 7px;
  background: rgba(255,255,255,.62);
}
.playground-page .login-input:focus,
.account-page .login-input:focus { border-color: var(--dialt-orange); box-shadow: 0 0 0 3px rgba(247,147,26,.16); }
.playground-page .login-submit {
  min-height: 45px;
  border-radius: 7px;
  background: var(--dialt-orange);
  color: var(--site-ink);
}

/* Account / billing. */
.account-page .account-content { width: min(100%, 820px); margin-top: clamp(2.5rem, 6vw, 5rem); }
.account-page .account-intro { align-items: center; margin-bottom: 1.75rem; }
.account-page .account-eyebrow { margin-bottom: .4rem; }
.account-page .account-title {
  margin: 0;
  color: var(--site-ink);
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(2.6rem, 6vw, 4.25rem);
  font-weight: 400;
  letter-spacing: -.035em;
  line-height: .95;
}
.account-page .account-sub { margin-top: .6rem; color: #65635c; }
.account-page .account-card {
  margin-bottom: 1.1rem;
  border: 1px solid var(--site-rule);
  border-radius: 12px;
  background: rgba(255,255,255,.38);
  box-shadow: none;
}
.account-page .balance-card { background: rgba(255,255,255,.52); }
.account-page .account-h2 {
  color: var(--site-ink);
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 400;
}
.account-page .balance-amount { color: var(--dialt-orange); font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; }
.account-page .btn-primary,
.account-page .login-submit {
  border-color: var(--dialt-orange);
  border-radius: 7px;
  background: var(--dialt-orange);
  color: var(--site-ink);
}
.account-page .btn-primary:hover:not(:disabled) { background: #df7d09; }
.account-page .btn-secondary { border-color: var(--site-rule); border-radius: 7px; background: rgba(255,255,255,.45); color: var(--dialt-blue); }
.account-page .key-row { border-color: var(--site-rule); background: rgba(255,255,255,.38); }

/* Developer documentation. */
.docs-page .docs-hero { padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--site-rule); }
.docs-home .docs-hero { padding: clamp(2.75rem, 4.5vw, 4rem) 0 clamp(2.25rem, 3.5vw, 3rem); }
.docs-page .doc-title {
  max-width: 15ch;
  margin: .2rem 0 .8rem;
  color: var(--site-ink);
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: .92;
}
.docs-guide .doc-title,
.docs-reference .doc-title { margin-top: clamp(2.5rem, 5vw, 4.5rem); font-size: clamp(2.8rem, 5vw, 4.5rem); }
.docs-page .doc-lead { max-width: 72ch; color: #4e4d47; font-size: 1.02rem; line-height: 1.75; }
.docs-page .btn-cta,
.docs-page .btn-cta-ghost {
  border-radius: 7px;
  padding: .75rem 1.15rem;
}
.docs-page .btn-cta { background: var(--dialt-orange); color: var(--site-ink); }
.docs-page .btn-cta:hover { background: #df7d09; }
.docs-page .btn-cta-ghost { border-color: var(--site-rule); background: rgba(255,255,255,.4); color: var(--site-ink); }
.docs-page .docs-section { margin-top: clamp(2.75rem, 6vw, 5rem); }
.docs-home .docs-section { margin-top: clamp(2rem, 3.5vw, 3rem); padding-top: 0; }
.docs-page .land-h2,
.docs-page .doc-body h2,
.docs-page .doc-card h2 {
  color: var(--site-ink);
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
}
.docs-page .land-h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.docs-page .reference-card,
.docs-page .doc-card {
  border-color: var(--site-rule);
  border-radius: 10px;
  background: rgba(255,255,255,.34);
  box-shadow: none;
}
.docs-page .reference-card { min-height: 128px; padding: 1.2rem 1.25rem; }
.docs-page .reference-card:hover { border-color: var(--dialt-orange); background: rgba(255,255,255,.64); }
.docs-page .reference-card strong { font-size: 1.02rem; }
.docs-page .reference-card span { color: #54534c; font-size: .92rem; line-height: 1.55; }
.docs-page .support { border-radius: 4px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .63rem; }
.docs-page .quickstart-steps { max-width: 76ch; color: #4e4d47; font-size: .98rem; }
.docs-page .docs-layout { grid-template-columns: minmax(0, 1fr) 210px; gap: clamp(2rem, 5vw, 4.5rem); margin-top: 2.5rem; }
.docs-page .doc-body { color: #45443f; font-size: .98rem; line-height: 1.75; }
.docs-page .doc-body h2 { margin-top: 3.5rem; font-size: 1.8rem; }
.docs-page .doc-body h3 { color: var(--site-ink); font-size: 1.08rem; }
.docs-page .docs-toc { top: 1.5rem; padding-left: 1rem; border-left: 1px solid var(--site-rule); }
.docs-page .docs-toc a { padding: .32rem 0; color: #65635c; }
.docs-page .docs-toc a:hover { color: var(--site-orange-ink); }
.docs-page .doc-callout { border-color: var(--dialt-orange); background: rgba(247,147,26,.09); }
.docs-page .doc-body table { border: 1px solid var(--site-rule); background: rgba(255,255,255,.28); }
.docs-page .doc-body th,
.docs-page .doc-body td { border-color: var(--site-rule); }
.docs-page .code-block { border-radius: 10px; box-shadow: none; }
.docs-page .code-block code { color: #d4ded9; }
.docs-page .doc-tok-keyword { color: #7dd3c8; font-weight: 600; }
.docs-page .doc-tok-string { color: #e8b96b; }
.docs-page .doc-tok-number { color: #f19a67; }
.docs-page .doc-tok-literal { color: #d5a6e6; }
.docs-page .doc-tok-comment { color: #78928b; font-style: italic; }
.docs-page .page-footer { color: #6b6961; }

.playground-page.local-static-preview .mic-button {
  cursor: not-allowed;
  filter: saturate(.72);
  box-shadow: none;
}
.playground-page.local-static-preview .status-detail {
  max-width: 54ch;
  padding: .65rem .85rem;
  border: 1px solid rgba(13,87,155,.2);
  border-radius: 7px;
  background: rgba(13,87,155,.07);
  color: var(--dialt-blue-dark);
  font-size: .86rem;
  line-height: 1.5;
}
.account-page.local-static-preview .account-sub { max-width: 52ch; color: var(--dialt-blue-dark); }
[data-debug-only][hidden] { display: none !important; }

@media (max-width: 900px) {
  .docs-page .docs-layout { grid-template-columns: 1fr; }
  .docs-page .docs-toc { display: none; }
}
@media (max-width: 720px) {
  .site-page .app-shell { padding-inline: 1rem; }
  .site-page .app-header { min-height: 60px; }
  .site-page .brand-mark { width: 26px; height: 26px; }
  .site-page .app-title { font-size: 1.05rem; }
  .site-page .site-nav-cta { padding: .58rem .72rem; font-size: .7rem; }
  .benchmarks-page .land-section-first { padding-top: 3.25rem; }
  .benchmarks-page .land-h2 { font-size: clamp(3.5rem, 18vw, 5rem); }
  .benchmarks-page .bench-h3 { line-height: 1.15; }
  .benchmarks-page .bench-when { display: block; margin: .5rem 0 0; }
  .playground-page .playground-toolbar { margin-top: .8rem; }
  .playground-page .voice-stage { padding-inline: .75rem; }
  .playground-page .provider-toggle { width: 100%; }
  .playground-page .provider-chip { flex: 1 1 calc(50% - .5rem); }
  .playground-page .conversation-wrap { border-radius: 10px; }
  .playground-page .transcript-panel { min-height: 280px; }
  .account-page .account-content { margin-top: 2.5rem; }
  .account-page .account-intro { align-items: flex-start; }
  .docs-page .docs-hero { padding-top: 3.25rem; }
  .docs-page .doc-title { font-size: clamp(3.25rem, 16vw, 4.5rem); }
  .docs-guide .doc-title,
  .docs-reference .doc-title { font-size: clamp(2.8rem, 14vw, 4rem); }
  .docs-page .doc-grid,
  .docs-page .reference-grid { grid-template-columns: 1fr; }
  .docs-page .reference-card { min-height: 0; }
  .docs-page .doc-body { font-size: .94rem; }
}

/* Conversation evals: account-like working surfaces in the public Dialt language. */
.evals-page .evals-content {
  width: min(100%, 900px);
  margin-top: clamp(2.5rem, 6vw, 5rem);
}
.evals-page .evals-intro {
  align-items: center;
  margin-bottom: 1.75rem;
}
.evals-page .account-sub { max-width: 68ch; }
.evals-page .evals-card { padding: clamp(1.15rem, 3vw, 1.6rem); }
.evals-page .section-eyebrow { margin: 0 0 .35rem; }
.evals-notice {
  margin-bottom: 1rem;
  padding: .75rem .9rem;
  border: 1px solid rgba(168,50,40,.25);
  border-radius: 7px;
  background: rgba(168,50,40,.08);
  color: #8e2922;
  font-size: .9rem;
  line-height: 1.45;
}
.evals-card-head { align-items: flex-end; }
.eval-case-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-top: 1rem;
}
.eval-case-row {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: .85rem .95rem;
  border: 1px solid var(--site-rule);
  border-radius: 9px;
  background: rgba(255,255,255,.38);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.eval-case-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: .18rem;
}
.eval-case-name { color: var(--site-ink); font-weight: 750; }
.eval-case-starter {
  overflow: hidden;
  color: #65635c;
  font-size: .88rem;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.eval-case-meta {
  color: var(--site-orange-ink);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .68rem;
  text-transform: uppercase;
}
.eval-empty {
  padding: 1.2rem 0;
  color: #65635c;
  font-size: .9rem;
  line-height: 1.5;
}
.eval-empty-compact { margin: 0; padding: .6rem 0; }
.eval-table-wrap {
  width: 100%;
  margin-top: .8rem;
  overflow-x: auto;
  border: 1px solid var(--site-rule);
  border-radius: 10px;
}
.eval-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  background: rgba(255,255,255,.24);
}
.eval-table th,
.eval-table td {
  padding: .8rem .9rem;
  border-bottom: 1px solid var(--site-rule);
  text-align: left;
  vertical-align: middle;
}
.eval-table tr:last-child td { border-bottom: 0; }
.eval-table th {
  background: rgba(17,17,15,.035);
  color: #65635c;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.eval-table td { color: var(--site-ink); font-size: .87rem; }
.eval-table tbody tr:hover { background: rgba(255,255,255,.4); }
.eval-run-link,
.eval-back-link,
.eval-session-link {
  color: var(--dialt-blue);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.eval-run-link:focus-visible,
.eval-back-link:focus-visible,
.eval-session-link:focus-visible {
  border-radius: 3px;
  outline: 3px solid rgba(13,87,155,.2);
  outline-offset: 3px;
}
.eval-mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}
.eval-tabular { font-variant-numeric: tabular-nums; }
.eval-capitalize { text-transform: capitalize; }
.eval-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.4rem;
  padding: .28rem .58rem;
  border: 1px solid var(--site-rule);
  border-radius: var(--radius-pill);
  background: rgba(17,17,15,.04);
  color: #65635c;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.eval-status-running {
  border-color: rgba(13,87,155,.3);
  background: rgba(13,87,155,.09);
  color: var(--dialt-blue);
}
.eval-status-passed {
  border-color: rgba(50,146,57,.3);
  background: rgba(50,146,57,.1);
  color: #256f2b;
}
.eval-status-failed,
.eval-status-error {
  border-color: rgba(168,50,40,.3);
  background: rgba(168,50,40,.09);
  color: #8e2922;
}
.eval-status-cancelled { color: #686660; }
.eval-code {
  margin: .75rem 0;
  padding: .75rem .9rem;
  border: 1px solid var(--site-rule);
  border-radius: 7px;
  background: rgba(255,255,255,.55);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .8rem;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre;
}
.eval-outcome { margin: .35rem 0 .9rem; }
.eval-outcome-hint {
  margin-left: .5rem;
  color: #706e67;
  font-size: .85rem;
}
.eval-args { margin: .4rem 0 0; font-size: .75rem; }
.evals-page .eval-howto { padding: 0; }   /* beats .evals-page .evals-card */
.eval-howto > summary {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: clamp(1.15rem, 3vw, 1.6rem);
  cursor: pointer;
  list-style: none;
}
.eval-howto > summary::-webkit-details-marker { display: none; }
.eval-howto > summary::after {
  content: "Show";
  align-self: flex-start;
  margin-top: .35rem;
  color: var(--site-orange-ink);
  font-size: .85rem;
}
.eval-howto[open] > summary::after { content: "Hide"; }
.eval-howto > *:not(summary) { margin-left: clamp(1.15rem, 3vw, 1.6rem); margin-right: clamp(1.15rem, 3vw, 1.6rem); }
.eval-howto > p:last-child { padding-bottom: clamp(1.15rem, 3vw, 1.6rem); }
.eval-howto-grid {
  display: grid;
  gap: .75rem;      /* one column: the curl lines are long and must not scroll sideways */
}
.eval-case-names {
  display: inline-block;
  max-width: 22ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
.eval-back-link {
  display: inline-flex;
  gap: .35rem;
  align-items: center;
  margin-top: .5rem;
  font-size: .85rem;
}
.eval-run-intro { margin-top: 1.4rem; }
.eval-run-intro .account-title { font-size: clamp(2.25rem, 5vw, 3.7rem); }
.eval-run-intro .account-title .eval-mono {
  color: var(--site-orange-ink);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .65em;
  letter-spacing: -.04em;
}
.eval-danger-button {
  min-height: 42px;
  padding: .6rem 1rem;
  border: 1px solid rgba(168,50,40,.35);
  border-radius: 7px;
  background: rgba(255,255,255,.4);
  color: #8e2922;
  font: inherit;
  font-size: .87rem;
  font-weight: 750;
  cursor: pointer;
}
.eval-danger-button:hover:not(:disabled) { background: rgba(168,50,40,.08); }
.eval-danger-button:focus-visible {
  outline: 3px solid rgba(168,50,40,.2);
  outline-offset: 3px;
}
.eval-danger-button:disabled { cursor: default; opacity: .55; }
.eval-summary { padding-block: 1.15rem; }
.eval-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.eval-summary-item { display: flex; flex-direction: column; gap: .38rem; }
.eval-summary-label {
  margin-right: .55rem;
  color: #706e67;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.eval-summary-value { color: var(--site-ink); font-weight: 750; }
.eval-summary-times {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.2rem;
  margin-top: 1rem;
  padding-top: .8rem;
  border-top: 1px solid var(--site-rule);
  color: #706e67;
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}
.eval-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem 0 .8rem;
}
.eval-updated { color: #706e67; font-size: .7rem; }
.eval-attempt-list { display: flex; flex-direction: column; gap: 1rem; }
.eval-attempt { margin-bottom: 0 !important; }
.eval-attempt-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--site-rule);
}
.eval-termination {
  display: flex;
  align-items: baseline;
  gap: .1rem;
  margin: .75rem 0 0;
  color: #65635c;
  font-size: .82rem;
}
.eval-attempt-subtitle {
  margin: 1.2rem 0 .65rem;
  color: var(--site-ink);
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 400;
}
.evals-page .transcript-turn {
  border-color: var(--site-rule);
  background: rgba(255,255,255,.55);
}
.evals-page .transcript-turn.turn-user {
  border-color: rgba(13,87,155,.2);
  background: rgba(13,87,155,.08);
}
.evals-page .transcript-turn.turn-assistant {
  border-color: rgba(247,147,26,.25);
  background: rgba(255,255,255,.58);
}
.eval-check-list {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.eval-check-row {
  padding: .65rem .75rem;
  border: 1px solid var(--site-rule);
  border-radius: 8px;
  background: rgba(255,255,255,.28);
}
.eval-check-lead { display: flex; align-items: center; gap: .55rem; }
.eval-check-result {
  min-width: 3.2rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
}
.eval-check-pass { color: #256f2b; }
.eval-check-fail { color: #8e2922; }
.eval-check-skip { color: #706e67; }
.eval-check-name { color: var(--site-ink); font-weight: 700; }
.eval-check-detail {
  margin: .35rem 0 0 3.75rem;
  color: #65635c;
  font-size: .82rem;
  line-height: 1.45;
}
.eval-session-links {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem 1.2rem;
  margin-top: 1.2rem;
  padding-top: .9rem;
  border-top: 1px solid var(--site-rule);
  font-size: .82rem;
}
.eval-error-code {
  max-height: 16rem;
  margin: 0;
  overflow: auto;
  padding: .8rem;
  border: 1px solid rgba(168,50,40,.22);
  border-radius: 8px;
  background: rgba(168,50,40,.06);
  color: #74221c;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .76rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .evals-page .evals-content { margin-top: 2.5rem; }
  .evals-page .evals-intro { align-items: flex-start; }
  .evals-card-head { align-items: flex-start; flex-direction: column; }
  .eval-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eval-created-column { display: none; }
}
@media (max-width: 520px) {
  .evals-page .evals-intro { gap: 1.25rem; }
  .eval-run-intro .eval-danger-button { width: 100%; }
  .eval-summary-grid { gap: 1.1rem .75rem; }
  .eval-section-head { align-items: flex-start; flex-direction: column; }
  .eval-attempt-head { align-items: flex-start; flex-direction: column; }
  .eval-attempt-head .eval-status { align-self: flex-start; }
  .eval-check-detail { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .eval-case-row { transition: none; }
}


/* Copyable id chips (sessions and evals): reporting needs exact uuids on hand. */
.id-chip {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.72rem;
  color: var(--muted, #667085);
  background: transparent;
  border: 1px solid var(--border, #d0d5dd);
  border-radius: 6px;
  padding: 0.05rem 0.4rem;
  cursor: copy;
  white-space: nowrap;
}
.id-chip:hover { color: var(--text, #1d2939); border-color: var(--muted, #667085); }
.id-chip-copied { color: var(--ok, #027a48); border-color: var(--ok, #027a48); }
.id-chip-inline { cursor: copy; }
.eval-attempt-badges { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
