:root {
  color-scheme: light;
  --paper: #f2f3ed;
  --surface: #fff;
  --ink: #122c22;
  --muted: #526459;
  --line: #cbd4ca;
  --green: #006947;
  --forest: #082e23;
  --gold: #ffdc43;
  --mist: #e9f0e9;
  --instrument-ink: #c1d9c9;
  --danger: #a52d33;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
[hidden] { display: none !important; }
h1,h2,h3,p { margin: 0; }
h1,h2,h3 { line-height: 1.13; letter-spacing: -.045em; }
button,input,select { font: inherit; color: inherit; }
button { cursor: pointer; }
button,input,select { min-height: 48px; }
button { transition: background-color .16s, color .16s, box-shadow .16s; }
button:active:not(:disabled) { filter: brightness(.90); }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid #00785b; outline-offset: 2px; }
.call-card :focus-visible { outline-color: white; }
img { display: block; max-width: 100%; height: auto; }
header,main { padding-inline: max(5vw, env(safe-area-inset-left), env(safe-area-inset-right)); }
header { background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 16px; }
.wordmark,.header-right,.demo-badge { display: flex; align-items: center; }
.wordmark { gap: 20px; min-height: 48px; color: var(--ink); text-decoration: none; font-weight: 700; }
.wordmark img { width: 102px; }
.wordmark span { padding-left: 20px; border-left: 1px solid var(--line); }
.header-right { gap: 24px; }
.demo-badge,.instrument-label,.eyebrow,.login-signature span { font: 600 .72rem/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.demo-badge { gap: 9px; color: var(--muted); }
.demo-badge::before { content: ''; width: 8px; height: 8px; border: 2px solid var(--green); border-radius: 50%; }
.text-button { background: none; border: none; font-size: .875rem; padding: 0 6px; text-decoration: underline; text-underline-offset: 4px; }
main { max-width: 1640px; margin: auto; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.page-heading { padding-block: clamp(28px,4vw,58px) 26px; }
.page-heading h1,.login-title h1 { font-size: clamp(2.4rem,4.4vw,4.3rem); font-weight: 650; letter-spacing: -.075em; }
.page-heading h1 span { color: var(--green); }
.page-heading p { color: var(--muted); margin-top: 6px; }
.layout { display: grid; grid-template-columns: minmax(240px,.68fr) minmax(0,1.9fr); gap: clamp(16px,2vw,32px); align-items: start; }
.account-panel,.main-panel { min-width: 0; }
.account-panel,.tab-panel,.detail-tabs { background: var(--surface); }
.account-panel,.detail-tabs,.tab-panel { border: 1px solid var(--line); }
.account-panel { border-radius: 14px; padding: clamp(16px,2vw,28px); }
.account-panel h2 { font-size: 1.45rem; margin-bottom: 24px; }
.section-label,.login-card label { font-size: .875rem; display: block; font-weight: 650; margin-bottom: 8px; }
.search-box,input[type=password],select { border: 1px solid #899c90; border-radius: 7px; background: var(--surface); }
.search-box { display: flex; align-items: center; gap: 10px; padding: 0 12px; }
.search-box:focus-within { outline: 3px solid var(--green); outline-offset: 1px; }
.search-box svg { width: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.search-box input { min-width: 0; width: 100%; border: 0; outline: none; background: transparent; padding: 8px 0; font-size: 1rem; }
.results,.jobs,.transcript-items { overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #a6b6a8 transparent; }
.results { max-height: 340px; margin-top: 12px; font-size: .875rem; }
.result { width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); padding: 12px 9px; background: transparent; overflow-wrap: anywhere; }
.result strong,.result span,.stat strong,.stat span { display: block; }
.result strong { font-size: .875rem; line-height: 1.3; }
.result span,.subtle,.account-meta,.tiny,.scope-note,.stat span,.site-summary,.job small,.job>span,.empty-state { color: var(--muted); font-size: .8125rem; }
.result:hover,.secondary:hover { background: var(--mist); }
.result.selected { background: var(--mist); box-shadow: inset 3px 0 var(--green); }
.result:focus-visible { outline-offset: -3px; }
.divider { border-top: 1px solid var(--line); margin: 22px 0; }
select,input[type=password] { min-width: 0; width: 100%; padding: 10px; }
.subtle,.account-meta strong,.voice-stage,#contactInfo,.job,.summary-card,.utterance { overflow-wrap: anywhere; }
#contactInfo { margin: 8px 0 16px; }
.stats { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.stat { background: var(--paper); padding: 12px; }
.stat strong { font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.account-meta { margin: 16px 0; }
.account-meta div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; }
.account-meta strong { text-align: right; color: var(--ink); }
.scope-note,.site-summary { background: var(--mist); padding: 12px; border-radius: 7px; }
.call-card,.login-art { background: var(--forest); color: white; position: relative; overflow: hidden; isolation: isolate; }
.call-card { border-radius: 14px; padding: clamp(18px,2vw,32px); }
.call-card::before,.login-art::before { content: ''; position: absolute; z-index: -1; inset: 0; background: radial-gradient(ellipse at 75% 45%, #19573e 0%, transparent 64%), linear-gradient(116deg,#06291f,#093929); }
.call-top,.call-deck,.call-controls,.eyebrow,.login-signature { display: flex; align-items: center; }
.call-top,.call-deck { justify-content: space-between; gap: 16px; }
.eyebrow { gap: 10px; color: var(--instrument-ink); }
.signal-icon { width: 21px; height: 18px; background: linear-gradient(var(--gold),var(--gold)) 0 50%/3px 7px,linear-gradient(var(--gold),var(--gold)) 6px 50%/3px 16px,linear-gradient(var(--gold),var(--gold)) 12px 50%/3px 12px,linear-gradient(var(--gold),var(--gold)) 18px 50%/3px 6px; background-repeat: no-repeat; }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border: 1px solid #658473; border-radius: 20px; color: #e2eae5; font: .75rem/1.5 var(--mono); }
.status::before { content: ''; width: 6px; height: 6px; border: 1px solid currentColor; border-radius: 50%; }
.status.live::before { background: var(--gold); border-color: var(--gold); }
.instrument { display: flex; align-items: center; position: relative; isolation: isolate; min-height: clamp(195px,17vw,270px); margin-block: 8px; }
.instrument::before,.login-wave::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(#a2c4a6 1px,transparent 1px); background-size: 17px 17px; opacity: .18; mask-image: linear-gradient(90deg,transparent,#000 45%); }
.instrument-label { color: var(--instrument-ink); }
.agent-name,.login-title h1 { color: #f4f5df; }
.agent-name { font-weight: 600; font-size: clamp(4rem,6.6vw,7.4rem); line-height: 1; letter-spacing: -.085em; }
.agent-name span,.login-title span { color: var(--gold); }
.identity { position: relative; z-index: 1; }
.identity p { color: #d6e4d9; font-size: .9375rem; margin-top: 10px; }
.orb,.login-wave { background: url('/voice-ribbon.svg') center/100% auto no-repeat; }
.orb { position: absolute; inset: 0 -5% 0 25%; z-index: -1; }
.orb.active { animation: speak 2.5s ease-in-out infinite alternate; }
@keyframes speak { to { transform: scaleY(.82); } }
.call-deck { padding-top: 18px; border-top: 1px solid #527561; }
.voice-stage h2 { font-size: clamp(1.25rem,2vw,1.75rem); }
.voice-stage p,.call-hint { color: var(--instrument-ink); font-size: .875rem; margin-top: 6px; }
.call-timer { color: var(--gold); font-family: var(--mono); margin-top: 4px; }
.call-controls { gap: 8px; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; max-width: 52%; }
.primary,.secondary,.danger { border-radius: 7px; border: 1px solid transparent; padding: 10px 17px; font-weight: 700; font-size: .875rem; }
.primary { color: #172c20; background: var(--gold); }
.primary:hover:not(:disabled) { background: #ffe887; }
.primary:disabled { color: #d3dbce; background: #365444; border-color: #6b8275; }
.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.danger { background: #ffdcd7; color: #762722; }
.call-hint { font-size: .75rem; margin-top: 15px; }
.error { color: var(--danger); white-space: pre-wrap; font-size: .875rem; }
.call-card .error { color: #ffb9ae; }
.error:not(:empty) { margin-top: 12px; }
.detail-tabs { display: flex; align-items: stretch; margin-top: 18px; border-radius: 12px 12px 0 0; padding-inline: clamp(8px,2vw,24px); gap: clamp(4px,2vw,24px); }
.tab { background: none; border: 0; border-bottom: 3px solid transparent; font-size: .875rem; padding: 10px 4px 7px; color: var(--muted); }
.tab.active { color: var(--green); border-color: var(--green); font-weight: 700; }
.tab:hover,.text-button:hover { color: var(--green); }
.tab span { background: var(--mist); padding: 2px 5px; border-radius: 4px; font: .72rem var(--mono); }
.tab-panel { border-top: 0; border-radius: 0 0 12px 12px; padding: clamp(16px,2vw,28px); }
.empty-state { text-align: center; padding: 22px 4px; }
#summaryContent:has(.summary-card),#summaryContent:has(.empty-state) { padding: 0; text-align: left; }
.history-heading { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding-bottom: 16px; }
.history-heading select { max-width: 48%; width: auto; }
.history-heading h3,.summary-card h3 { font-size: 1.25rem; margin-bottom: 4px; }
.site-summary:empty { display: none; }
.jobs { max-height: 460px; }
.job { display: grid; grid-template-columns: minmax(68px,.6fr) minmax(0,2.3fr) minmax(62px,.6fr); gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.job strong,.job small { display: block; }
.job strong { font-size: .875rem; }
.job>span:last-child { text-align: right; }
.tiny,#moreJobs { margin-top: 12px; }
.transcript-items { max-height: 400px; }
.utterance,.guard-notice { border-radius: 9px; padding: 12px 14px; background: var(--mist); margin: 0 0 10px; max-width: 88%; }
.utterance.customer { margin-left: auto; background: #fbf4d6; }
.utterance b,.summary-row b { display: block; font-size: .75rem; color: var(--muted); margin-bottom: 3px; }
.guard-notice { background: #fff1bc; }
.summary-row { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.summary-card,.summary-row p { font-size: .9375rem; color: var(--ink); }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 20px; margin-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
.login-shell { min-height: 100svh; display: grid; place-items: center; padding: clamp(16px,5vw,72px); background: var(--paper); }
.login-frame { border: 1px solid var(--line); background: var(--surface); max-width: 1050px; width: 100%; display: grid; grid-template-columns: 1.23fr 1fr; border-radius: 18px; overflow: hidden; box-shadow: 0 22px 80px #15302112; }
.login-art { min-height: 520px; padding: clamp(24px,3.7vw,52px); display: flex; flex-direction: column; align-items: flex-start; }
.logo-tile { background: #fff; padding: 8px 12px; border-radius: 5px; }
.logo-tile img { width: 100px; }
.login-title { margin-top: 40px; }
.login-title h1 { font-size: clamp(3.25rem,6vw,6rem); }
.login-title p { color: var(--instrument-ink); }
.login-wave { position: absolute; z-index: -1; inset: 34% -2% 4%; }
.login-signature { gap: 12px; margin-top: auto; }
.login-signature b { color: var(--gold); font-size: 1.25rem; }
.login-signature span { color: var(--instrument-ink); }
.login-card { align-self: center; padding: clamp(24px,4vw,58px); }
.login-card h2 { font-size: 2.25rem; }
.login-card>p:not(.error) { margin: 12px 0 24px; color: var(--muted); }
.login-card .primary { width: 100%; margin-top: 14px; display: flex; align-items: center; justify-content: space-between; }
.login-card small { display: block; font-size: .8125rem; color: var(--muted); margin-top: 18px; }
@media (max-width: 820px) {
  .layout { grid-template-columns: minmax(215px,.78fr) minmax(0,1.55fr); }
  header,main { padding-inline: 20px; }
  .call-deck { align-items: flex-start; flex-direction: column; }
  .call-controls { max-width: 100%; justify-content: flex-start; }
  .detail-tabs { gap: 4px; justify-content: space-between; }
  .history-heading { flex-wrap: wrap; }
  .history-heading select { max-width: 100%; }
}
@media (max-width: 660px) {
  header,main { padding-inline: max(16px,env(safe-area-inset-left),env(safe-area-inset-right)); }
  header { min-height: 66px; }
  .wordmark { gap: 12px; }
  .wordmark img { width: 80px; }
  .wordmark span { padding-left: 12px; }
  .demo-badge { display: none; }
  .layout { grid-template-columns: minmax(0,1fr); }
  .results { max-height: 155px; }
  .account-panel h2 { margin-bottom: 14px; }
  .instrument { min-height: 175px; }
  .orb { inset-inline: 32% -8%; }
  .tab { font-size: .8125rem; }
  .login-frame { grid-template-columns: minmax(0,1fr); }
  .login-art { min-height: 245px; }
  .login-title { margin-top: 22px; }
  .login-wave { inset: 28% -12% 2% 39%; opacity: .85; }
  .login-signature { margin-top: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation: none !important; transition: none !important; }
}
.page-heading h1,.login-title h1,.login-card h2,.account-panel h2 { overflow-wrap: anywhere; }
.tab { min-width: 0; overflow-wrap: anywhere; }
