.voice-shell {
  --voice-navy: #172c3d;
  --voice-cream: #fbf8f1;
  --voice-gold: #a77935;
  --voice-line: #dedbcf;
  --voice-muted: #5e6a6d;
  background: var(--voice-cream);
  color: var(--voice-navy);
  border: 1px solid var(--voice-line);
  border-radius: 18px;
  width: min(100%, 840px);
  margin: 0 auto;
  font-family: 'Instrument Sans', system-ui, sans-serif;
  line-height: 1.55;
  box-shadow: 0 12px 48px #172c3d0a;
}
.voice-shell *, .voice-shell *::before, .voice-shell *::after { box-sizing: border-box; }
.voice-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 32px; border-bottom: 1px solid var(--voice-line); }
.voice-brand { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: .16em; }
.voice-brand-mark { display: grid; place-items: center; width: 31px; height: 35px; border: 1px solid var(--voice-gold); color: var(--voice-gold); font-family: 'Fraunces', Georgia, serif; font-size: 22px; letter-spacing: 0; border-radius: 3px 3px 12px 12px; }
.voice-body { padding: 30px 40px 24px; }
.voice-company { margin: 0 0 22px; color: var(--voice-muted); font-size: 13px; }
.voice-eyebrow { color: #85602b; text-transform: uppercase; font-size: 11px; font-weight: 700; letter-spacing: .14em; margin: 22px 0 10px; }
.voice-heading { font-family: 'Fraunces', Georgia, serif; font-size: clamp(27px, 4vw, 37px); font-weight: 500; line-height: 1.2; letter-spacing: -.025em; margin: 0 0 12px; max-width: 670px; }
.voice-heading:focus { outline: none; }
.voice-subtitle { color: var(--voice-muted); font-size: 14px; line-height: 1.65; max-width: 630px; margin: 0 0 26px; }
.voice-progress { display: flex; align-items: center; gap: 8px; }
.voice-progress-step { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid var(--voice-line); border-radius: 50%; font-size: 11px; color: var(--voice-muted); background: #fffdf8; }
.voice-progress-step + .voice-progress-step { margin-left: 5px; }
.voice-progress-current { color: white; background: var(--voice-navy); border-color: var(--voice-navy); }
.voice-progress-past { color: #765526; background: #eee5d4; border-color: #d4bd94; }
.voice-capture { border: 1px solid #d9d5c9; border-radius: 12px; padding: 20px; background: #f3f0e7; margin: 0 0 24px; }
.voice-capture-top { display: flex; align-items: center; gap: 12px; }
.voice-avatar { display: grid; place-items: center; width: 43px; height: 43px; flex-shrink: 0; border-radius: 50%; background: var(--voice-navy); color: #e9d7b1; font: 25px 'Fraunces', Georgia, serif; }
.voice-capture-intro { display: flex; flex-direction: column; }
.voice-capture-intro strong { font-size: 14px; font-weight: 600; }
.voice-capture-intro span { font-size: 12px; color: var(--voice-muted); }
.voice-mic-state { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--voice-muted); }
.voice-mic-state::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #838986; }
.voice-mic-active { color: #8a3131; }
.voice-mic-active::before { background: #b44742; }
.voice-service-notice { color: #526064; font-size: 12px; line-height: 1.6; margin: 17px 0; }
.voice-capture-controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.voice-button { appearance: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; min-height: 43px; padding: 10px 16px; border-radius: 6px; font: 500 13px/1.35 'Instrument Sans', system-ui, sans-serif; border: 1px solid transparent; transition: background-color .15s, border-color .15s; text-align: center; }
.voice-button-primary { background: var(--voice-navy); color: #fffdf8; border-color: var(--voice-navy); }
.voice-button-primary:hover { background: #284658; border-color: #284658; }
.voice-button-secondary { color: var(--voice-navy); background: #fffdf8; border-color: #cccfc9; }
.voice-button-secondary:hover { background: #e9ece5; }
.voice-button-text { color: #536269; background: transparent; padding-left: 8px; padding-right: 8px; text-decoration: underline; text-underline-offset: 3px; }
.voice-button-text:hover { color: var(--voice-navy); background: #172c3d07; }
.voice-button:disabled { opacity: .45; cursor: default; }
.voice-button:focus-visible, .voice-input:focus-visible, .voice-auto-label input:focus-visible { outline: 3px solid #b58a43; outline-offset: 3px; }
.voice-auto-label { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--voice-muted); cursor: pointer; width: 100%; margin-top: 3px; }
.voice-auto-label input { accent-color: var(--voice-navy); width: 16px; height: 16px; }
.voice-field { display: flex; flex-direction: column; gap: 8px; margin: 0 0 21px; }
.voice-field-label { font-size: 13px; font-weight: 600; }
.voice-input { width: 100%; border: 1px solid #c8ccc5; border-radius: 7px; background: #fffefa; color: var(--voice-navy); padding: 12px 14px; font: 400 14px/1.6 'Instrument Sans', system-ui, sans-serif; box-shadow: none; }
textarea.voice-input { resize: vertical; min-height: 95px; }
.voice-input::placeholder { color: #7a8586; }
.voice-input:read-only { background: #f5f3ec; }
.voice-field-hint { font-size: 12px; color: var(--voice-muted); }
.voice-navigation { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 5px; }
.voice-navigation-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.voice-status { min-height: 20px; font-size: 12px; color: #416256; margin: 18px 0 8px; }
.voice-status-error { color: #9a3434; }
.voice-footer { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--voice-muted); border-top: 1px solid var(--voice-line); padding-top: 16px; }
.voice-recovery { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; border: 1px solid #d8c8a8; background: #f5eddc; border-radius: 7px; padding: 9px 13px; font-size: 12px; margin-bottom: 24px; }
.voice-recovery .voice-button { font-size: 12px; min-height: 35px; }
.voice-review-form { margin-top: 26px; }
.voice-review-note { background: #eeeade; padding: 14px 16px; border-left: 3px solid var(--voice-gold); border-radius: 0 5px 5px 0; font-size: 12px; color: #526064; margin: 24px 0; }
@media (max-width: 600px) {
  .voice-shell { border-radius: 11px; }
  .voice-header { padding: 14px 17px; }
  .voice-body { padding: 24px 19px 20px; }
  .voice-capture { padding: 16px; }
  .voice-capture-top { flex-wrap: wrap; }
  .voice-mic-state { width: 100%; margin-left: 55px; margin-top: -7px; }
  .voice-capture-controls > .voice-button { flex: 1 1 auto; }
  .voice-footer { flex-direction: column; gap: 5px; }
  .voice-navigation { align-items: stretch; }
  .voice-navigation-actions { justify-content: flex-end; }
  .voice-review-form .voice-navigation > .voice-button { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .voice-button { transition: none; } }

/* The live conversation shares the guided intake's typography and controls. */
.realtime-shell { border: 0; border-radius: 0 0 12px 12px; box-shadow: none; }
.realtime-shell .voice-eyebrow { margin-top: 0; }
.realtime-shell .voice-subtitle { margin-bottom: 20px; }
.realtime-shell .voice-capture { margin-bottom: 18px; }
.realtime-shell .voice-status { margin-bottom: 0; }
.realtime-shell [hidden] { display: none; }
.realtime-consent { font-size: 12px; }
.realtime-audio { display: block; width: 100%; height: 34px; margin-top: 18px; }
.realtime-transcript { max-height: 240px; overflow-y: auto; border: 1px solid var(--voice-line); border-radius: 8px; background: #fffefa; padding: 16px; margin-bottom: 20px; }
.realtime-transcript-empty { font-size: 12px; color: var(--voice-muted); }
.realtime-line { margin: 0 0 16px; }
.realtime-line:last-child { margin-bottom: 0; }
.realtime-line b { display: block; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: #876735; margin-bottom: 4px; }
.realtime-line-user b { color: #526b7a; }
.realtime-line p { font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.realtime-message-form { display: grid; gap: 9px; margin-bottom: 24px; }
.realtime-message-form textarea { min-height: 72px; }
.realtime-message-form button { justify-self: end; }
.realtime-summary { background: #eeeade; border-left: 3px solid var(--voice-gold); border-radius: 0 7px 7px 0; padding: 18px; margin-bottom: 24px; }
.realtime-summary > strong { font-size: 14px; }
.realtime-summary > p { font-size: 12px; margin: 9px 0 16px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 180px; overflow-y: auto; }
.realtime-shell .voice-footer { flex-wrap: wrap; align-items: center; }
@media(max-width:600px) { .realtime-shell .voice-body { padding: 23px 19px; } .realtime-shell .voice-footer { align-items: stretch; } }
.realtime-documents{padding:16px;border:1px solid #ddd8cc;border-radius:12px;margin-top:16px}.realtime-document{padding:12px 0;border-bottom:1px solid #e4e1d9}.realtime-document summary{cursor:pointer;font-size:13px;font-weight:600}.realtime-document-brief{white-space:pre-wrap;font-size:13px;line-height:1.65;max-height:250px;overflow:auto}.realtime-line-user{border-left:3px solid #b69048}

/* A call is the primary surface; typing and documents remain within reach. */
.realtime-shell [hidden]{display:none!important}
.realtime-shell .voice-body{padding:0 0 18px}
.realtime-shell .realtime-call{background:#1c2836;color:#fffdf7;border:0;border-radius:18px;padding:28px 24px 18px;margin:0 0 14px;text-align:center}
.realtime-call-identity{display:flex;flex-direction:column;align-items:center;gap:7px}
.realtime-call-avatar{width:76px;height:76px;border:1px solid #d3b67b;border-radius:50%;display:grid;place-items:center;background:#263746;color:#eed7a8;font:40px/1 Fraunces,Georgia,serif;box-shadow:0 0 0 8px #ffffff06;margin:6px 0 8px}
.realtime-call-name{font:32px/1.15 Fraunces,Georgia,serif;margin:0!important;color:#fffdf7}
.realtime-call-role{font-size:13px;color:#c1c9cf;margin:0}
.realtime-call .voice-mic-state{margin:9px 0 0;width:auto;font-size:13px;color:#d8dfdf;background:transparent;padding:0}
.realtime-call .voice-mic-active{color:#a7dfbc}
.realtime-elapsed{color:#d5c49d;font:13px/1.4 'Instrument Sans',system-ui,sans-serif;font-variant-numeric:tabular-nums;min-height:19px}
.realtime-call-controls{display:flex;justify-content:center;align-items:flex-start;gap:28px;margin:20px 0}
.voice-button.realtime-phone-button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px;width:88px;padding:0;border:0;background:transparent!important;color:#fffdf7;font-size:12px;box-shadow:none}
.realtime-phone-button svg{box-sizing:content-box;width:23px;height:23px;padding:18px;background:#354350;border:1px solid #ffffff15;border-radius:50%}
.realtime-phone-button.realtime-dial svg{background:#28724f}
.realtime-phone-button.realtime-hangup svg{background:#b53c3c;transform:rotate(135deg)}
.realtime-phone-button[aria-pressed=true] svg{background:#f7f4ed;color:#1c2836}
.realtime-phone-button:hover svg{filter:brightness(1.12)}
.realtime-phone-button:disabled{opacity:.45}
.realtime-call-options{display:grid;grid-template-columns:1fr auto;gap:10px;text-align:left;max-width:440px;margin:0 auto 10px;align-items:center}
.realtime-call-options .voice-field-label{grid-column:1/-1;font-size:11px;color:#b7c3cb}
.realtime-call-options .voice-input{min-width:0;background:#2c3b48;color:#f5f5ef;border-color:#52616b;font-size:12px;padding:10px}
.realtime-call .voice-button-secondary{background:#344451;color:#f8f6ef;border-color:#60727d;font-size:12px}
.realtime-call .voice-button-secondary:disabled{opacity:.45}
.realtime-mode-hint{grid-column:1/-1;margin:0;color:#bec9ce;font-size:11px;line-height:1.6}
.voice-button.realtime-hold{grid-column:1/-1;background:#e7cb90;color:#1b2935;border:1px solid #ebd29f;min-height:54px;touch-action:none;user-select:none;-webkit-user-select:none}
.voice-button.realtime-hold[aria-pressed=true]{background:#a7dfbc}
.realtime-call .voice-status{color:#d2dedc;font-size:12px;margin:12px auto 0;max-width:450px}
.realtime-call .voice-status-error{color:#ffcebf}
.realtime-shell .realtime-consent{color:#637076;line-height:1.6;margin:0 2px 18px;font-size:11px}
.realtime-transcript-title{font-size:12px;margin:0 0 9px;letter-spacing:.02em}
.realtime-shell .realtime-transcript{max-height:200px;margin-bottom:12px}
.realtime-tools,.realtime-shell .realtime-documents{margin:10px 0;border:1px solid var(--voice-line);border-radius:9px;padding:13px 15px;background:#fffefa}
.realtime-tools>summary,.realtime-documents>summary{font-size:13px;font-weight:600;cursor:pointer;min-height:22px}
.realtime-tools[open]>.realtime-message-form{margin:16px 0 0}
.realtime-documents[open]>.voice-field-label{display:block;margin-top:16px}
.realtime-shell .realtime-summary{margin:16px 0}
.realtime-shell .voice-footer{margin-top:18px}
.realtime-shell .voice-button:focus-visible,.realtime-shell summary:focus-visible,.realtime-shell select:focus-visible{outline:3px solid #d3a745;outline-offset:4px}
.is-calling .realtime-call-avatar{animation:kestrel-call-pulse 1.8s ease-in-out infinite}
.is-speaking .realtime-call-avatar{box-shadow:0 0 0 8px #e8cf9230}
@keyframes kestrel-call-pulse{50%{box-shadow:0 0 0 14px #e8cf921a}}
@media(max-width:600px){.realtime-shell .voice-body{padding:0}.realtime-shell .realtime-call{padding:22px 16px 16px}.realtime-call-avatar{width:64px;height:64px;font-size:34px}.realtime-call-options{grid-template-columns:1fr}.realtime-call-controls{gap:22px}.realtime-shell .realtime-transcript{max-height:160px}}
@media(prefers-reduced-motion:reduce){.is-calling .realtime-call-avatar{animation:none}}

/* The same compact call shell is used on the public site and client dashboard. */
.modal.modal-phone{max-width:640px;width:min(640px,calc(100vw - 28px))}
.modal-phone .modal-header,.modal-phone .modal-head{padding:16px 20px}
.modal-phone .modal-header .eyebrow,.modal-phone .modal-head .eyebrow{display:none}
.modal-phone .modal-header h2,.modal-phone .modal-head h2{font-size:20px;line-height:1.3;margin:0}
.modal-phone .modal-content,.modal-phone .modal-body{padding:0 20px 20px}
@media(max-width:600px){.modal-phone .modal-header,.modal-phone .modal-head{padding:14px}.modal-phone .modal-content,.modal-phone .modal-body{padding:0 14px 14px}}

.realtime-call.is-connected{padding-top:20px}
.is-connected .realtime-call-identity{display:grid;grid-template-columns:52px 1fr auto;column-gap:14px;row-gap:3px;max-width:440px;margin:0 auto;text-align:left}
.is-connected .realtime-call-avatar{grid-row:1/4;width:50px;height:50px;font-size:29px;margin:0}
.is-connected .realtime-call-name{grid-column:2;grid-row:1;font-size:25px}
.is-connected .realtime-call-role{grid-column:2;grid-row:2;font-size:12px}
.is-connected .voice-mic-state{grid-column:2;grid-row:3;margin:2px 0 0;font-size:11px}
.is-connected .realtime-elapsed{grid-column:3;grid-row:1/4;align-self:center}
.is-connected .realtime-call-controls{margin:18px 0}
@media(max-width:600px){.is-connected .realtime-call-identity{grid-template-columns:42px 1fr auto;column-gap:10px}.is-connected .realtime-call-avatar{width:40px;height:40px;font-size:24px}.is-connected .realtime-call-name{font-size:22px}}
