.phone-page { padding: 16px max(16px, calc((100vw - 1100px) / 2)) 80px; }
.phone-page h1 { font-size: 44px; margin: 0 0 8px; }
.phone-page h2 { font-size: 24px; margin: 0 0 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
#setup { max-width: 720px; }
.muted { color: var(--muted); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.modes label { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; }
.modes label:has(input:checked) { border-color: var(--ember); }
.modes label:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.modes input { accent-color: var(--ember); }
.modes span { font-size: 13px; color: var(--muted); }

.fields { display: flex; flex-direction: column; gap: 14px; }
.fields label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 14px; }
.fields small { color: var(--muted); font-size: 12px; }
.fields input:not([type]), .fields input[type="text"], .fields input[type="email"], .fields input[type="password"], .fields input[type="tel"], .fields input[inputmode], .fields input[maxlength], .fields select {
  min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: 15px var(--font);
}
.fields textarea { min-height: 96px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: 15px/1.5 var(--font); resize: vertical; }
.fields .check { flex-direction: row; align-items: center; gap: 8px; }
.fields .check input { accent-color: var(--ember); width: 18px; height: 18px; }
.real-only { display: none !important; }
body.real .real-only { display: flex !important; }
body.real .fields .check { display: none; }

.live { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; align-items: start; }
.status { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 20px; }
.status .state { margin: 0; font: 34px var(--display); text-transform: uppercase; }
.status .clock { margin: 0; font: 34px var(--display); color: var(--ember); text-align: right; }
.status .clock .muted { font: 600 13px var(--font); }
.status .muted, .status .row { grid-column: 1 / -1; margin: 0; }
body[data-state="human"] .state, body[data-state="calling_you"] .state { color: var(--ember-2); }
body[data-state="bridged"] .state { color: #8fe0b0; }

.timeline { list-style: none; margin: 0; padding: 0; max-height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.timeline li { display: grid; grid-template-columns: 78px 1fr auto; gap: 8px; align-items: baseline; }
.timeline time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.timeline li.heard span { color: #d8c9c5; font-style: italic; }
.timeline li.sent span { color: var(--ember-2); }
.timeline li.state span { font-weight: 700; }
.timeline li.action span { color: var(--muted); }
.timeline em { font-style: normal; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: #2c1513; color: #d8c9c5; }
.timeline li.is-human em { background: #10301d; color: #8fe0b0; }

.sim-phone { width: 300px; justify-self: center; border: 1px solid var(--line); border-radius: 36px; padding: 18px; background: #050304; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.sp-title { margin: 0 0 10px; text-align: center; color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.sp-screen { min-height: 260px; border-radius: 22px; background: var(--bg-2); padding: 18px; display: flex; flex-direction: column; gap: 12px; justify-content: center; text-align: center; }
.sp-screen.ringing { animation: ring 1s infinite; border: 1px solid var(--ember); }
@keyframes ring { 50% { box-shadow: 0 0 0 6px rgba(255, 74, 47, .25); } }
.sp-caller { margin: 0; font: 28px var(--display); }
.sp-whisper { margin: 0; color: #e1d3cf; font-size: 14px; }
.sp-screen .row { justify-content: center; }

@media (max-width: 860px) {
  .live, .modes { grid-template-columns: 1fr; }
  .status { grid-template-columns: 1fr; }
  .status .clock { text-align: left; }
}

.send .row { flex-wrap: nowrap; }
.send input { flex: 1; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: 15px var(--font); }
.timeline li.you-sent span { color: #8fe0d4; font-weight: 600; }
.pulse { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pulse::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; background: #777; vertical-align: 1px; }
.pulse.on::before { background: #2fd38a; box-shadow: 0 0 0 0 rgba(47, 211, 138, .6); animation: beat 1.6s infinite; }
.pulse.off::before { background: var(--ember-2); }
@keyframes beat { 70% { box-shadow: 0 0 0 7px rgba(47, 211, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 211, 138, 0); } }
.voice-pick { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.voice-pick legend { color: var(--muted); font-size: 14px; padding: 0 4px; }
.voice-pick label { flex-direction: row !important; align-items: baseline; gap: 8px !important; color: var(--text) !important; }
.voice-pick span { color: var(--muted); font-size: 13px; }
.voice-pick input { accent-color: var(--ember); }
.voice-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 12px; }
.voice-list label { align-items: center !important; justify-content: flex-start; }
.voice-list b { min-width: 64px; }
.voice-list span { flex: 1; }
.btn.play { min-width: 36px; min-height: 36px; padding: 0 10px; font-size: 13px; line-height: 1; }
.btn.play.playing { color: var(--ember-2); border-color: var(--ember); }
.live-voice { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0 0; font-size: 14px; }
.live-voice select { min-height: 36px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: 14px var(--font); }
.say-voice { display: inline-flex; gap: 16px; font-size: 13px; color: var(--muted); }
.say-voice label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.say-voice input { accent-color: var(--ember); }
.timeline li.helena-said span { color: #f3b6d0; }
.campaign-bar { grid-column: 1 / -1; margin: 0; padding: 10px 14px; border-radius: 10px; background: #1d1210; border: 1px solid var(--line); font-size: 14px; color: var(--ember-2); }
.keypad .keys { display: grid; grid-template-columns: repeat(3, minmax(0, 72px)); gap: 8px; margin: 4px 0 12px; }
.keypad .key { min-height: 48px; font-size: 18px; font-variant-numeric: tabular-nums; }
.keypad .row { flex-wrap: nowrap; }
.keypad input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: 15px var(--font); }

/* Account details: the four that matter up front, the rest folded away. */
#profile-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
#profile-more { grid-column: 1 / -1; }
#profile-more summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 4px 0; }
#profile-more[open] summary { margin-bottom: 10px; }
#profile-more .more { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.fields input:focus, .fields textarea:focus, .fields select:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px rgba(255, 74, 47, .18); }
@media (max-width: 640px) { #profile-inputs, #profile-more .more { grid-template-columns: 1fr; } }

#profile-inputs label { display: flex; flex-direction: column !important; gap: 6px !important; align-items: stretch; font-size: 14px; color: var(--muted); }
#profile-note { font-size: 13px; line-height: 1.5; margin: 0 0 12px; }
/* Helena's two jobs: the name on one line, what it means underneath. */
.job-pick label { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 2px; align-items: start; padding: 10px 0; }
.job-pick label input { grid-row: 1 / span 2; margin-top: 3px; }
.job-pick label b { grid-column: 2; }
.job-pick label span { grid-column: 2; color: var(--muted); font-size: 14px; }
/* Public site: one kind of call, so no picker, just the note on where it rings you. */
.modes.single label { border: none; padding: 0; background: none; }
.modes.single input, .modes.single b { display: none; }


/* Company picker: a searchable list in the site's style, then a card for the picked company. */
.combo { position: relative; display: flex; flex-direction: column; gap: 6px; }
.combo > label { color: var(--muted); font-size: 14px; }
.combo-list { position: absolute; top: 100%; left: 0; right: 0; z-index: 20; margin: 4px 0 0; padding: 6px; list-style: none; max-height: 320px; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px rgba(0, 0, 0, .55); }
.combo-list li { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.combo-list li.active, .combo-list li:hover { background: rgba(255, 74, 47, .12); }
.combo-list .opt-name { color: var(--text); font-weight: 600; font-size: 15px; }
.combo-list .opt-meta { color: var(--muted); font-size: 13px; }
.company-card { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.company-card p { flex-basis: 100%; margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.company-card .num { font: 500 13px var(--font); color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.company-card .num.on { border-color: var(--ember); background: rgba(255, 74, 47, .12); }
/* A friendly chat has no menus, hold or rep to connect to. */
.chat-call #keypad, .chat-call #connect-now, .chat-call #connect-hint { display: none !important; }
.fields select { min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: 15px var(--font); }

/* Opt-in secrets (SSN last 4, date of birth): the consent box under the field. Not .check, which
   real-call mode hides. */
#profile-inputs label.opt-in { display: flex; flex-direction: row !important; align-items: center; gap: 8px !important; font-size: 13px; color: var(--muted); }
#profile-inputs label.opt-in input { accent-color: var(--ember); width: 16px; height: 16px; }

/* Assisted calls: the "tell Helena" box comes first, above the keypad and status details. */
body.assisted-call #live { display: flex; flex-direction: column; }
body.assisted-call #live > .status { order: 0; }
body.assisted-call #live > #send { order: 1; border-color: var(--ember); }
body.assisted-call #live > * { order: 2; }
.send .rep-last { margin: 8px 0 10px; padding: 10px 12px; border-left: 3px solid var(--ember-2); background: var(--bg-2); border-radius: 8px; font-style: italic; }

/* The phone app: the "notify me" nudge on a live call, and "back to your call" on the start page. */
.app-nudge { border-color: rgba(255, 74, 47, .45); }
.app-nudge p { margin: 0 0 8px; }
.app-banner { margin: 0 0 14px; padding: 12px 16px; border: 1px solid rgba(255, 74, 47, .45); border-radius: 12px; background: rgba(255, 74, 47, .08); }
.app-banner a { margin-left: 8px; }
/* Installed (standalone) on a phone: room for the notch and the home bar. */
.in-app body { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
