/* Chloe app screens (0.6 alpha). Uses only tokens (ds/tokens.css) and components (ds/components.css).
   Mobile first: bottom tab bar on phones, left sidebar from 900 px. */

html,
body {
  min-height: 100%;
}
body {
  overflow-x: hidden;
}

/* ---------- sign-in and wizard screens ---------- */
.screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: calc(var(--s-6) + var(--safe-top)) var(--s-4) calc(var(--s-6) + var(--safe-bottom));
}
.login {
  grid-template-rows: 1fr auto;
}
.login-card {
  width: min(400px, 100%);
  justify-items: center;
  text-align: center;
  padding: var(--s-8) var(--s-6);
  gap: var(--s-2);
}
.login-card img {
  border-radius: var(--r-card);
}
.login-card form {
  width: 100%;
  margin-top: var(--s-4);
  text-align: left;
}
.login-version {
  text-align: center;
  font-size: var(--fs-xs);
}
.login-version a {
  display: inline-block;
  padding: 12px 4px;
}

/* ---------- app shell (0.8): docked bottom bar, left rail from 900 px ---------- */
.shell {
  min-height: 100dvh;
}
.content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: calc(var(--s-2) + var(--safe-top)) calc(var(--gutter) + var(--safe-right)) calc(var(--bar-h) + var(--s-8) + var(--safe-bottom)) calc(var(--gutter) + var(--safe-left));
}
.tabs {
  position: fixed;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  background: var(--nav-bg);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 6px calc(12px + var(--safe-right)) calc(8px + var(--safe-bottom)) calc(12px + var(--safe-left));
}
.tabs .brand,
.tabs .brand-version,
.tabs .rail-account {
  display: none;
}
.tabs button {
  position: relative;
  border: 0;
  border-radius: 16px;
  background: transparent;
  min-height: 58px;
  flex-direction: column;
  gap: 4px;
  padding: 4px 2px;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
}
.tabs button svg {
  width: 22px;
  height: 22px;
}
.tabs button.active {
  color: var(--accent-text);
  font-weight: var(--fw-bold);
  background: var(--accent-soft);
}
/* Active indicator: a short bar on the top edge of the bar. */
.tabs button.active::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 28px;
  height: 3px;
  margin-left: -14px;
  border-radius: 2px;
  background: var(--violet);
}
.tabs button:not(.active):hover {
  background: var(--surface-2);
}

@media (min-width: 900px) {
  .shell {
    padding-left: var(--rail-w);
  }
  .tabs {
    top: 0;
    right: auto;
    width: var(--rail-w);
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
    padding: calc(var(--s-6) + var(--safe-top)) var(--s-3) var(--s-4) calc(var(--s-3) + var(--safe-left));
    border-top: 0;
    border-right: 1px solid var(--border);
  }
  .tabs .brand {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    padding: 0 var(--s-2) var(--s-6);
  }
  .tabs button {
    flex-direction: row;
    justify-content: flex-start;
    min-height: 48px;
    padding: 0 var(--s-3);
    gap: var(--s-3);
    border-radius: var(--r-input);
    font-size: var(--fs-sm);
  }
  .tabs button.active::before {
    top: 12px;
    bottom: 12px;
    left: -12px;
    width: 3px;
    height: auto;
    margin: 0;
  }
  .tabs .rail-account {
    display: flex;
    margin-top: auto;
  }
  .tabs .rail-account .initials {
    width: 32px;
    height: 32px;
  }
  .tabs .brand-version {
    display: block;
    padding: var(--s-2) var(--s-3) 0;
    font-size: var(--fs-2xs);
  }
  .content {
    padding: var(--s-8) var(--s-8) var(--s-8);
  }
}
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}
.page-head h1 {
  font-size: var(--fs-xl);
}
.page-head .muted {
  margin-top: var(--s-1);
}
@media (min-width: 900px) {
  .page-head h1 {
    font-size: var(--fs-2xl);
  }
}
.tab {
  display: grid;
  gap: var(--s-4);
  align-content: start;
}
.sec-title {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
}
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
}
.home-sec {
  display: grid;
  gap: var(--s-2);
}

/* Banner (Google signed out) */
.banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  margin-bottom: var(--s-4);
  border-radius: var(--r-card);
  background: var(--warning-soft);
  color: var(--text);
}
.banner > svg {
  color: var(--warning);
  width: 20px;
  height: 20px;
}
.banner p {
  flex: 1 1 220px;
}
.banner.error {
  background: var(--danger-soft);
}
.billing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

/* ---------- Home ---------- */
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  margin: -6px -8px 0 0;
}
/* Hero: avatar, name, status chips and the main action in one card. */
.hero-card {
  gap: var(--s-3);
}
.hero-name {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
}
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1);
}
.hero-card #home-call-status:empty {
  display: none;
}
.status-main {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  flex: none;
}
.status-text {
  display: grid;
  gap: var(--s-1);
  min-width: 0;
}
/* Needs you, empty: one quiet line instead of a card. */
.needs-none {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  padding: 0 var(--s-1);
}
.needs-none svg {
  color: var(--success);
}
#needs-sec:has(#needs-list[hidden]) {
  gap: 0;
}
/* Tell Chloe something: one line with mic and send. */
.tell-box {
  gap: var(--s-2);
}
.tell-input {
  display: flex;
  align-items: center;
  gap: var(--s-1);
}
.tell-input .field {
  flex: 1;
  min-width: 0;
}
.tell-input .speak.live {
  background: var(--danger-soft);
  color: var(--danger);
}
.tell-until-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s-1);
}
.tell-until-row:not([hidden]) {
  animation: fade-in var(--t) var(--ease);
}
/* The date field stays in the page (the picker needs it) but takes no space. */
#tell-until.visually-hidden {
  left: 0;
  bottom: 0;
  width: 1px;
  min-width: 0;
  min-height: 0;
  height: 1px;
  padding: 0;
  border: 0;
}
button.chip {
  min-height: var(--tap);
  padding: 0 var(--s-3);
  font-size: var(--fs-sm);
}
.tell-box .tell-status:empty,
.tell-box .blocked:empty,
.tell-box #tell-result:empty,
.tell-box #tell-result:not(:has(.answer > :not(:empty):not([hidden]))) {
  display: none;
}
/* What's in the alpha: two lines, "More" opens the list. */
.alpha-card {
  background: var(--accent-soft);
  border-color: transparent;
  box-shadow: none;
  gap: var(--s-1);
  padding-top: var(--s-2);
  padding-bottom: var(--s-2);
}
.alpha-head {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-right: calc(-1 * var(--s-2));
}
.alpha-title {
  flex: 1;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
}
.alpha-sum {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  margin-top: calc(-1 * var(--s-2));
}
.link.inline {
  padding: 0 var(--s-2);
  margin-right: calc(-1 * var(--s-2));
  flex: none;
}
.alpha-list {
  margin: 0;
  padding-left: 1.1em;
  display: grid;
  gap: var(--s-1);
  font-size: var(--fs-sm);
}
/* ---------- lists of calls and tasks ---------- */
.list {
  display: grid;
  gap: var(--s-2);
  align-content: start;
}
.row {
  display: grid;
  gap: 2px;
  justify-items: start;
  width: 100%;
  text-align: left;
  padding: var(--s-3) var(--s-4);
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  font-size: var(--fs-md);
  font-weight: var(--fw-regular);
}
.row strong {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  align-items: center;
  font-weight: var(--fw-bold);
}
.row .reason {
  font-size: var(--fs-sm);
}
.row .next-line {
  font-size: var(--fs-sm);
  color: var(--accent-text);
}
.matter-row .reason {
  display: block;
}
.badge {
  margin-left: 0;
}
.calls {
  display: grid;
  gap: var(--s-2);
}
.day-head {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: var(--s-4) var(--s-1) 0;
}
.day-head:first-child {
  margin-top: 0;
}
.call-row {
  align-items: flex-start;
}
.call-row .row-title {
  white-space: normal;
}
.call-row .row-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1);
  margin-top: var(--s-1);
}
.call-row .row-when {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
  flex: none;
}
.list-group .empty-state {
  padding: var(--s-6) var(--s-4);
}
.needs-row .row-icon {
  background: var(--warning-soft);
  color: var(--warning);
}
.needs-row.done .row-icon {
  background: var(--success-soft);
  color: var(--success);
}

/* status chips from older modules map onto the tones */
.badge.resolved,
.badge.st-resolved,
.badge.appt {
  background: var(--success-soft);
  color: var(--success);
}
.badge.needs,
.badge.st-needs_you {
  background: var(--warning-soft);
  color: var(--warning);
}
.badge.high,
.badge.unproductive {
  background: var(--danger-soft);
  color: var(--danger);
}
.badge.phone,
.badge.st-active,
.badge.fu,
.badge.message {
  background: var(--accent-soft);
  color: var(--accent-text);
}

/* Filters (task status): a row of chip buttons that scrolls sideways */
.filters {
  display: flex;
  gap: var(--s-2);
  overflow-x: auto;
  padding-bottom: var(--s-1);
  scrollbar-width: none;
  margin: 0 calc(-1 * var(--s-4));
  padding-left: var(--s-4);
  padding-right: var(--s-4);
}
.filters::-webkit-scrollbar {
  display: none;
}
.filters button {
  flex: none;
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  white-space: nowrap;
  padding: 0 var(--s-4);
  color: var(--text-muted);
}
.filters button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: var(--fw-bold);
}
.pane {
  display: grid;
  gap: var(--s-3);
  align-content: start;
}

/* ---------- detail views (call, task) ---------- */
.detail {
  display: grid;
  gap: var(--s-3);
  align-content: start;
}
.detail-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-2);
}
.detail-actions .link {
  text-decoration: none;
}
.card h3 {
  font-size: var(--fs-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
}
.card h3.gap {
  margin-top: var(--s-2);
}
.card ul,
.card ol {
  margin: 0;
  padding-left: 1.2em;
}
.card .next {
  color: var(--accent-text);
}
.risk-high {
  border: 1px solid var(--danger);
}
.outcome {
  font-size: var(--fs-sm);
}
.kv {
  display: grid;
  grid-template-columns: 7.5em 1fr;
  gap: var(--s-2);
  font-size: var(--fs-sm);
}
.kv .k {
  color: var(--text-muted);
}
.events {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-3);
}
.ev {
  display: grid;
  gap: 2px;
  border-left: 3px solid var(--border);
  padding-left: var(--s-3);
  justify-items: start;
}
.ev-call {
  border-color: var(--accent);
}
.ev-email,
.ev-text {
  border-color: var(--accent-soft);
}
.ev-approval {
  border-color: var(--success);
}
.ev-when {
  color: var(--text-muted);
  font-size: var(--fs-xs);
}
.approvals {
  display: grid;
  gap: var(--s-2);
}
.approval {
  background: var(--warning-soft);
  border-radius: var(--r-card);
  padding: var(--s-4);
  display: grid;
  gap: var(--s-2);
}
.approval.decided {
  opacity: 0.6;
}
.approval-kind {
  color: var(--warning);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
}
.approval-q {
  font-weight: var(--fw-bold);
}
.approval .muted:empty {
  display: none;
}
.next-step {
  border-left: 3px solid var(--accent);
}
.no-audio {
  display: flex;
  gap: var(--s-2);
  align-items: center;
}

/* ---------- transcript bubbles (live captions and saved calls) ---------- */
.transcript {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.bubble {
  max-width: 86%;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-card);
  background: var(--bubble-them);
  display: grid;
  gap: 2px;
}
.bubble.caller {
  align-self: flex-end;
  background: var(--bubble-me);
  border-bottom-right-radius: 4px;
}
.bubble.assistant {
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.bubble.partial {
  opacity: 0.65;
}
.bubble .who {
  display: flex;
  gap: var(--s-2);
  align-items: center;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-weight: var(--fw-medium);
}
.bubble .lang {
  font-size: 11px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  color: var(--text);
  letter-spacing: 0.03em;
}
.bubble .en {
  display: block;
  margin-top: var(--s-1);
  padding-top: var(--s-1);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.hide-en .bubble .en {
  display: none;
}
.transcript > .chip {
  align-self: center;
  white-space: normal;
  text-align: center;
  max-width: 92%;
}
.chip.message,
.chip.booking,
.chip.answer {
  background: var(--success-soft);
  color: var(--success);
}
.chip.suspicious {
  background: var(--danger-soft);
  color: var(--danger);
}
.chip.note,
.chip.ask {
  background: var(--warning-soft);
  color: var(--warning);
}
.empty {
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-card);
  padding: var(--s-4);
  display: grid;
  gap: var(--s-2);
  font-size: var(--fs-sm);
}

/* ---------- live call: full screen ---------- */
.live-call {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  max-width: 100vw;
  padding: calc(var(--s-4) + var(--safe-top)) calc(var(--s-4) + var(--safe-right)) calc(var(--s-4) + var(--safe-bottom)) calc(var(--s-4) + var(--safe-left));
  animation: fade-in var(--t) var(--ease);
}
@media (min-width: 900px) {
  .live-call {
    padding-left: calc(50vw - 360px);
    padding-right: calc(50vw - 360px);
  }
}
.live-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s-3);
}
.live-head h2 {
  font-size: var(--fs-lg);
}
.timer {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  padding: var(--s-1) var(--s-3);
  border-radius: var(--r-pill);
  background: var(--surface-2);
}
.live-tools {
  display: flex;
  justify-content: flex-end;
}
.toggle.compact {
  gap: var(--s-2);
  font-size: var(--fs-sm);
}
.captions {
  overflow-y: auto;
  min-height: 0;
  padding: var(--s-2) 0;
}
.live-call #call-summary {
  overflow-y: auto;
  max-height: 40dvh;
}
.live-controls {
  display: flex;
  justify-content: center;
  gap: var(--s-8);
  padding-top: var(--s-3);
}
.round {
  flex-direction: column;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  gap: 2px;
  font-size: var(--fs-xs);
}
.round[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
}
.live-controls .big {
  max-width: 360px;
}

/* ---------- live question: bottom sheet ---------- */
.ask-sheet .sheet {
  z-index: 61;
}
.ask-sheet .scrim {
  z-index: 60;
}
.ask-title {
  color: var(--warning);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
}
.ask-question {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
}
.ask-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.ask-options button {
  min-height: 56px;
  font-size: var(--fs-md);
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: var(--fw-bold);
}
.ask-form {
  display: flex;
  gap: var(--s-2);
  align-items: flex-end;
}
.ask-form .field {
  flex: 1;
}

/* ---------- Tasks: New errand as a bottom sheet ---------- */
.errand-scrim {
  display: none;
}
#tab-tasks:has(#errand-screen:not([hidden])) .errand-scrim {
  display: block;
}
.errand-sheet {
  max-height: 92dvh;
}
.errand-sheet .detail-actions {
  position: sticky;
  top: -8px;
  background: var(--surface);
  z-index: 1;
}
.line-notice {
  border-radius: var(--r-input);
  padding: var(--s-2) var(--s-3);
  background: var(--warning-soft);
  color: var(--text);
  font-size: var(--fs-sm);
}
.line-notice.after {
  font-weight: var(--fw-bold);
}
.share-items label.check {
  display: flex;
  gap: var(--s-2);
  align-items: center;
  min-height: var(--tap);
}
.share-items input[type="text"] {
  margin: 0 0 var(--s-2) 28px;
  width: calc(100% - 28px);
}
.start-area .primary {
  width: 100%;
}

/* ---------- Settings ---------- */
.signout {
  margin-top: var(--s-6);
  display: flex;
  justify-content: center;
}
.subpage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-4);
  align-content: start;
}
.sub-head {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-left: calc(-1 * var(--s-2));
}
.sub-head h1 {
  font-size: var(--fs-xl);
}
fieldset {
  margin: 0;
  min-width: 0;
}
fieldset.card {
  border: 1px solid var(--card-border);
}
legend.card-title {
  float: left;
  width: 100%;
  padding: 0;
  margin-bottom: var(--s-1);
}
legend.card-title + * {
  clear: both;
}
.save-bar {
  position: sticky;
  bottom: calc(var(--bar-h) + var(--safe-bottom) + var(--s-2));
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-2) var(--s-2) var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
}
.save-bar p {
  flex: 1;
}
.save-bar button {
  min-width: 120px;
}
@media (min-width: 900px) {
  .save-bar {
    bottom: var(--s-4);
  }
}
.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
}
@media (max-width: 380px) {
  .row2 {
    grid-template-columns: 1fr;
  }
}
.days {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.days label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap);
  padding: 0 var(--s-3);
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  font-size: var(--fs-sm);
}
.days label:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-text);
  font-weight: var(--fw-bold);
}
.qa-head {
  display: grid;
  gap: 2px;
  margin-top: var(--s-2);
}
.qa-list {
  display: grid;
  gap: var(--s-3);
}
.qa {
  display: grid;
  gap: var(--s-2);
  padding: var(--s-3);
  border-radius: var(--r-input);
  background: var(--surface-2);
}
.qa button {
  justify-self: end;
}
.name-box .transcript:empty {
  display: none;
}
.name-box .transcript {
  max-height: 220px;
  overflow-y: auto;
}
.cands {
  display: grid;
  gap: var(--s-2);
}
.cand {
  display: flex;
  gap: var(--s-2);
  align-items: center;
  flex-wrap: wrap;
}
.cand-text {
  flex: 1 1 140px;
  font-weight: var(--fw-bold);
}
.src {
  display: grid;
  gap: var(--s-2);
  border-top: 1px solid var(--border);
  padding-top: var(--s-4);
  margin-top: var(--s-2);
}
.src .card-title {
  font-size: var(--fs-md);
}
.filebtn {
  cursor: pointer;
}
.filebtn:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.sms-box {
  display: grid;
  gap: var(--s-2);
}
.keybox {
  display: grid;
  gap: var(--s-1);
  background: var(--surface-2);
  border-radius: var(--r-input);
  padding: var(--s-3);
}
.keybox code {
  word-break: break-all;
}
.booking {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  align-items: center;
  background: var(--surface-2);
  border-radius: var(--r-input);
  padding: var(--s-2) var(--s-3);
}
.booking.cancelled {
  opacity: 0.55;
  text-decoration: line-through;
}
.steps-text {
  margin: 0;
  padding-left: 1.2em;
  display: grid;
  gap: var(--s-2);
}
#theme-choice {
  width: 100%;
  max-width: 420px;
}
#theme-choice svg {
  width: 18px;
  height: 18px;
}
#changelog {
  margin: 0;
  padding-left: 1.2em;
  display: grid;
  gap: var(--s-1);
}
.panel {
  display: grid;
  gap: var(--s-2);
}
.panel h3 {
  font-size: var(--fs-md);
}
.form {
  display: grid;
  gap: var(--s-3);
}
.form label,
.src > label {
  display: grid;
  gap: 6px;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
label.check {
  display: flex;
  gap: var(--s-2);
  align-items: flex-start;
  color: var(--text);
  min-height: var(--tap);
  padding-top: 10px;
}

/* ---------- v5 setup wizard and About me (wizard.js) ---------- */
.wizard {
  place-items: start center;
}
.wiz-card {
  width: min(560px, 100%);
  display: grid;
  gap: var(--s-3);
}
.wiz-bar {
  height: 6px;
  background: var(--surface-3);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.wiz-fill {
  height: 100%;
  background: var(--accent);
  transition: width var(--t) var(--ease);
}
.wiz-body {
  gap: var(--s-3);
}
.wiz-body label {
  display: grid;
  gap: var(--s-1);
}
.wiz-body .panel {
  margin: 0;
  border: 0;
  padding: 0;
}
.wiz-nav {
  display: flex;
  gap: var(--s-2);
}
.wiz-nav button {
  flex: 1;
}
.wiz-nav #wiz-next {
  flex: 1.4;
}
.wiz-body label.check,
.about-sec label.check,
.tell-box label.check,
#assistant-box label.check {
  display: flex;
  gap: var(--s-2);
  align-items: center;
}
fieldset.voice {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--r-input);
  padding: var(--s-3);
}
fieldset.voice label {
  min-height: var(--tap);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
fieldset.voice small {
  flex-basis: 100%;
}
.answer {
  display: grid;
  gap: var(--s-2);
}
.blocked {
  border-radius: var(--r-input);
  padding: var(--s-2) var(--s-3);
  background: var(--warning-soft);
  font-size: var(--fs-sm);
}
.draft,
.draft-list {
  display: grid;
  gap: var(--s-2);
}
.draft-fact {
  display: flex;
  gap: var(--s-2);
  align-items: center;
}
.draft-fact input {
  flex: 1;
}
ul.facts {
  margin: var(--s-1) 0;
  padding-left: 1.2em;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-1);
  width: 100%;
  min-width: 0;
}
ul.facts li {
  overflow-wrap: anywhere;
}
ul.facts li.fact {
  display: flex;
  gap: var(--s-2);
  align-items: center;
  flex-wrap: wrap;
}
ul.facts .fact-text {
  flex: 1 1 12rem;
  min-width: 0;
}
ul.facts li.fact > input {
  flex: 1 1 12rem;
  min-width: 0;
}
ul.facts.legacy {
  color: var(--text-muted);
}
.about-sec {
  border-top: 1px solid var(--border);
  padding-top: var(--s-3);
  margin-top: var(--s-2);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-1);
  justify-items: start;
  min-width: 0;
  overflow-wrap: anywhere;
}
.about-sec h4 {
  font-size: var(--fs-md);
}
.about-sec .answer {
  width: 100%;
}
ul.summary {
  padding-left: 1.2em;
  display: grid;
  gap: var(--s-1);
}
#assistant-box {
  display: grid;
  gap: var(--s-3);
}

.blocked:empty {
  display: none;
}

.page-head > button {
  flex: none;
  white-space: nowrap;
}


/* v0.7 accounts (ASB-192) */
body[data-role="user"] [data-admin-only] { display: none !important; }
.login .or-line { text-align: center; margin: 0; }
#passcode-login { margin-top: var(--space-4, 16px); }
#passcode-login summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--text-muted, inherit); }


/* ---------- 0.7 E: journey consent + plan steps (public/journey.js, public/consent.js) ---------- */
.journey-screen {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: var(--bg);
  overflow-y: auto;
  padding: calc(var(--s-3) + var(--safe-top)) calc(var(--s-4) + var(--safe-right)) calc(var(--s-8) + var(--safe-bottom)) calc(var(--s-4) + var(--safe-left));
}
.journey-screen .ps-wrap > * {
  min-width: 0;
}
.journey-screen .badge {
  white-space: normal;
  justify-self: start;
}
.journey-screen .ps-wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  gap: var(--s-4);
}
.consent {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-3);
}
.consent legend {
  font-weight: 600;
  margin-bottom: var(--s-2);
}
.consent-row {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
}
.consent-row input {
  width: 22px;
  height: 22px;
  flex: none;
  margin-top: 2px;
}
.consent-note {
  margin: 0;
  color: var(--text-muted, inherit);
}

/* =====================================================================
   0.8 ORBIT screens (docs/design/v0.8-orbit). Overrides the 0.6 rules above.
   ===================================================================== */
.page-head {
  align-items: center;
  min-height: 48px;
  margin-bottom: var(--s-2);
}
.page-head h1 {
  font-size: var(--fs-2xl);
  letter-spacing: -0.01em;
}
.page-meta {
  font-size: var(--fs-xs);
  white-space: nowrap;
}
@media (min-width: 900px) {
  .page-head h1 {
    font-size: var(--fs-3xl);
  }
}
.tab {
  gap: 14px;
}
.link {
  color: var(--accent-text);
  font-weight: var(--fw-medium);
  padding-left: var(--s-2);
  padding-right: var(--s-2);
}
.account-btn {
  padding: 0;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border-strong);
}
.account-btn .initials {
  background: transparent;
  color: var(--text);
}
.home-account {
  width: var(--tap);
  height: var(--tap);
}
.home-account .initials {
  width: 100%;
  height: 100%;
}
@media (min-width: 900px) {
  .home-account {
    display: none;
  }
}
.rail-account {
  justify-content: flex-start !important;
  border: 0;
  background: transparent;
  color: var(--text);
}

/* ---------- Home: the command centre ---------- */
#tab-home {
  position: relative;
  isolation: isolate;
}
/* The glow below is wider than a phone: clip it at the screen edge so nothing scrolls sideways. */
.content {
  overflow-x: clip;
}
/* Soft violet atmosphere behind the hero (decoration only; no text sits on it). */
#tab-home::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: -40px;
  width: min(560px, 140vw);
  height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--hero-glow), transparent);
  pointer-events: none;
}
.home-head {
  margin-bottom: 0;
}
.home-greeting {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
}
.hero {
  display: grid;
  justify-items: center;
  gap: var(--s-2);
  text-align: center;
  padding-bottom: 6px;
}
.hero-orb {
  --orb-size: 176px !important;
}
@media (max-height: 640px) {
  .hero-orb {
    --orb-size: 128px !important;
  }
}
.hero-title {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
}
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-2);
}
.hero #home-call-status:empty {
  display: none;
}
/* Needs you: one prioritized card. */
.needs-card {
  display: grid;
  gap: var(--s-3);
  padding: var(--s-4);
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
}
:root[data-theme="dark"] .needs-card {
  background: color-mix(in srgb, var(--glass) 80%, transparent);
  border-color: #26315a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .needs-card {
    background: color-mix(in srgb, var(--glass) 80%, transparent);
    border-color: #26315a;
  }
}
.needs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  min-height: 28px;
}
.needs-title {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-md);
}
.needs-mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--violet);
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
}
.needs-list {
  display: grid;
}
.need {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.need-icon {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-text);
  display: grid;
  place-items: center;
}
.need-text {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
}
.need-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  overflow-wrap: anywhere;
}
.need-why {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.need-go {
  flex: none;
  min-height: var(--tap);
  border-radius: 12px;
  border: 0;
  background: var(--text);
  color: var(--bg);
  font-weight: var(--fw-bold);
  font-size: var(--fs-xs);
  padding: 0 14px;
}
.need-go:hover {
  background: var(--text);
  opacity: 0.9;
}
#needs-sec:has(#needs-list[hidden]) {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  padding: 0 var(--s-1);
}
#needs-sec:has(#needs-list[hidden]) .needs-head {
  display: none;
}
/* Practice call: the strongest button on Home. */
.practice-btn {
  display: flex;
  width: 100%;
  min-height: 58px;
  padding: 0 20px;
  gap: var(--s-3);
  border: 0;
  border-radius: var(--r-pill);
  background: var(--grad-primary);
  color: #fff;
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  box-shadow: 0 14px 34px -14px rgba(135, 91, 255, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.practice-btn:hover {
  background: var(--grad-primary-hover);
}
.practice-btn span {
  flex: 1;
  text-align: center;
}
.practice-btn.live {
  background: var(--danger-fill);
}
/* Composer: "Tell Chloe something…" with mic; the optional expiry is a secondary row. */
.composer {
  display: grid;
  gap: 2px;
  padding: 8px 10px 4px 16px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
}
:root[data-theme="dark"] .composer {
  background: color-mix(in srgb, var(--glass) 80%, transparent);
  border-color: #26315a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .composer {
    background: color-mix(in srgb, var(--glass) 80%, transparent);
    border-color: #26315a;
  }
}
.composer .tell-input {
  gap: var(--s-2);
}
.composer-mark {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--violet);
}
.composer input#tell-text {
  border: 0;
  background: transparent;
  padding-left: 0;
  font-size: var(--fs-sm);
}
.composer input#tell-text:focus {
  background: transparent;
}
.composer:focus-within {
  border-color: var(--accent);
}
.composer:has(#tell-text:placeholder-shown) #tell-send {
  display: none;
}
.mic-btn,
#tell-speak {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(140deg, #9a6bff, #5b4bf0);
  color: #fff;
  box-shadow: 0 6px 18px -6px rgba(135, 91, 255, 0.9);
}
#tell-speak.live {
  background: var(--danger-fill);
}
.tell-until-row {
  min-height: var(--tap);
}
.until-btn {
  min-height: var(--tap);
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  justify-content: flex-start;
}
.until-btn:hover {
  background: transparent;
  color: var(--text);
}
/* Recent calls (Home) and the Calls list share these rows. */
.call-list,
.calls {
  display: grid;
}
.call-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  min-height: 64px;
  padding: 10px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  text-align: left;
  color: var(--text);
  font-weight: var(--fw-regular);
}
.call-row:hover {
  background: transparent;
}
.call-row:hover .row-title {
  color: var(--accent-text);
}
.call-row:last-child {
  border-bottom: 0;
}
.call-row .row-text {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
}
.call-row .row-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.call-row .row-sub {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.call-row .badge {
  flex: none;
}
.call-row .row-flags {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: none;
}
.home-sec .sec-head .link {
  font-size: var(--fs-xs);
}
/* Alpha notice: one quiet line. */
.alpha-card {
  display: grid;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-2) var(--s-2) var(--s-3);
  border-radius: var(--r-input);
  border: 1px dashed var(--sim-border);
  background: transparent;
  color: var(--text-muted);
}
.alpha-head {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin: 0;
}
.alpha-sum {
  flex: 1;
  margin: 0;
  font-size: var(--fs-xs);
  justify-content: flex-start;
  flex-wrap: wrap;
}
.alpha-list {
  font-size: var(--fs-xs);
  padding: 0 var(--s-2) var(--s-2) 1.6em;
}

/* ---------- Calls: search, filters, day groups ---------- */
.calls-home {
  display: grid;
  gap: 14px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  border-radius: var(--r-input);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.search-box:focus-within {
  border-color: var(--accent);
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
.search-box input {
  border: 0;
  background: transparent;
  padding: 0;
  min-height: 42px;
  font-size: var(--fs-sm);
}
.search-box input:focus {
  background: transparent;
  outline: none;
}
.chips-row button,
.filters button {
  min-height: var(--tap);
  height: auto;
  padding: 0 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
}
/* 44 px touch area around 36 px chips. */
.chips-row,
.filters {
  padding-top: 4px;
  padding-bottom: 4px;
  margin-top: -4px;
  margin-bottom: -4px;
  margin-left: calc(-1 * var(--gutter));
  margin-right: calc(-1 * var(--gutter));
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.chips-row button,
.filters button {
  position: relative;
}
.chips-row button::after,
.filters button::after {
  content: "";
  position: absolute;
  inset: -4px 0;
}
.chips-row button[aria-pressed="true"],
.filters button.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
  font-weight: var(--fw-bold);
}
.day-head {
  margin: var(--s-3) 0 var(--s-1);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
}
.calls .day-group {
  display: grid;
}
.calls-empty-search {
  padding: var(--s-6) var(--s-2);
  text-align: center;
}

/* ---------- Call detail page ---------- */
.call-page {
  display: grid;
  gap: var(--s-4);
  align-content: start;
}
.call-page-head {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  min-height: 48px;
  margin-left: -12px;
}
.call-page-head h1 {
  font-size: var(--fs-xl);
  overflow-wrap: anywhere;
}
.call-page-head .muted {
  font-size: var(--fs-xs);
}
.outcome-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
}
:root[data-theme="dark"] .outcome-card {
  background: var(--glass);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .outcome-card {
    background: var(--glass);
  }
}
.outcome-card.tone-warning {
  border-color: color-mix(in srgb, var(--warning) 45%, transparent);
}
.outcome-card.tone-success {
  border-color: color-mix(in srgb, var(--success) 40%, transparent);
}
.outcome-card.tone-danger,
.outcome-card.risk-high {
  border-color: color-mix(in srgb, var(--danger) 50%, transparent);
}
.outcome-card .badge {
  justify-self: start;
}
.outcome-card .headline {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.outcome-card .why {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.call-sec {
  display: grid;
  gap: 10px;
}
.call-sec > .sec-head h2 {
  font-size: var(--fs-md);
}
.next-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--s-2);
}
.next-list li {
  display: flex;
  gap: var(--s-2);
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--r-input);
  background: var(--surface);
  border: 1px solid var(--card-border);
  font-size: var(--fs-sm);
}
.next-list li svg {
  color: var(--accent-text);
  margin-top: 2px;
}
.transcript-box {
  padding: var(--s-4);
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--card-border);
}
.transcript-box .transcript {
  gap: 12px;
}
.transcript-box .bubble {
  max-width: none;
  align-self: stretch;
  background: transparent;
  padding: 0;
  border-radius: 0;
}
.transcript-box .bubble .who {
  font-weight: var(--fw-bold);
}
.transcript-box .bubble.assistant .who {
  color: var(--accent-text);
}
.transcript-box .bubble .en {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}
.transcript-more {
  justify-self: start;
}
.lang-toggle {
  min-height: var(--tap);
  padding: 0 12px;
  border-radius: var(--r-pill);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  position: relative;
}
.lang-toggle::after {
  content: "";
  position: absolute;
  inset: -4px 0;
}
.recording {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.recording .rec-icon {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  background: var(--surface-2);
  display: grid;
  place-items: center;
}
.danger-sep {
  margin-top: var(--s-2);
  padding-top: var(--s-4);
  border-top: 1px solid var(--border);
}
.danger-sep button {
  width: 100%;
  min-height: var(--tap-lg);
}

/* ---------- Live call ---------- */
.live-call {
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: var(--s-2);
  background: var(--bg);
  isolation: isolate;
}
:root[data-theme="dark"] .live-call {
  background: #050816;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .live-call {
    background: #050816;
  }
}
.live-call::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 520px;
  background: radial-gradient(60% 55% at 50% 30%, var(--hero-glow), transparent);
  transition: opacity var(--t-slow) var(--ease);
  pointer-events: none;
}
.live-call.lost::before {
  opacity: 0.35;
}
.live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  min-height: 44px;
}
.live-head #call-min {
  margin-left: -10px;
}
.live-head .timer {
  min-width: 44px;
  text-align: right;
  padding: 0;
  background: transparent;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text-muted);
}
.live-head .timer[hidden] {
  display: block !important;
  visibility: hidden;
}
#call-pill {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-hero {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 6px;
}
.live-orb {
  --orb-size: 196px !important;
}
@media (max-height: 760px) {
  .live-orb {
    --orb-size: 132px !important;
  }
}
@media (max-height: 600px) {
  .live-orb {
    --orb-size: 88px !important;
  }
}
.live-hero h2 {
  font-size: var(--fs-3xl);
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.live-hero #call-status {
  font-size: var(--fs-sm);
}
.live-tools {
  justify-content: flex-end;
  min-height: 0;
}
.captions {
  gap: 10px;
}
.captions .bubble,
#call-summary ~ * .bubble {
  max-width: 88%;
  padding: 12px 14px;
}
.bubble {
  border: 1px solid var(--card-border);
}
.bubble.caller {
  align-self: flex-start;
  background: var(--bubble-them);
  border-radius: 18px 18px 18px 6px;
}
.bubble.assistant {
  align-self: flex-end;
  background: var(--bubble-me);
  border-color: color-mix(in srgb, var(--violet) 45%, transparent);
  border-radius: 18px 18px 6px 18px;
}
.bubble .who {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
}
.bubble.assistant .who {
  color: var(--accent-text);
}
.bubble .lang {
  background: transparent;
  padding: 0;
  color: inherit;
}
.bubble .lang::before {
  content: "· ";
}
.bubble .text {
  font-size: var(--fs-sm);
  line-height: 1.4;
}
.bubble .en {
  font-size: var(--fs-xs);
  border-top-color: var(--border);
}
.live-controls {
  gap: 30px;
  padding-bottom: var(--s-4);
  align-items: flex-end;
}
.ctl {
  display: grid;
  justify-items: center;
  gap: var(--s-2);
}
.ctl-label {
  font-size: var(--fs-2xs);
  color: var(--text-muted);
}
.round {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 0;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
}
.round svg {
  width: 24px;
  height: 24px;
}
.round.end {
  width: 76px;
  height: 76px;
  border: 0;
  background: var(--danger-fill);
  color: #fff;
  box-shadow: 0 10px 28px -10px rgba(241, 107, 122, 0.9);
}
.round.end:hover {
  background: var(--danger-fill);
  filter: brightness(1.08);
}
.round[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
}
.live-call #call-summary {
  max-height: 44dvh;
}

/* ---------- Owner question: bottom sheet ---------- */
.ask-sheet .sheet {
  background: var(--surface);
  gap: 14px;
}
:root[data-theme="dark"] .ask-sheet .sheet {
  background: var(--glass);
  border-top: 1px solid #2e3a66;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ask-sheet .sheet {
    background: var(--glass);
    border-top: 1px solid #2e3a66;
  }
}
.ask-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: var(--fs-xs);
}
.ask-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.ask-count {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--text);
  white-space: nowrap;
}
.ask-question {
  font-size: 1.375rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.ask-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ask-options button {
  min-height: 56px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.ask-options button:first-child {
  background: var(--grad-primary);
  border-color: transparent;
  color: #fff;
}
.ask-options button:only-child {
  grid-column: 1 / -1;
}

/* ---------- Settings ---------- */
.list-group-title {
  margin-top: var(--s-6);
}
.list-row .row-icon {
  border-radius: 12px;
}
.signout button {
  min-height: var(--tap-lg);
}
.danger-zone {
  display: grid;
  gap: var(--s-3);
  margin-top: var(--s-6);
  padding-top: var(--s-6);
  border-top: 1px solid var(--border);
}
.danger-zone:has(#account-delete-card[hidden]) {
  display: none;
}
.danger-title {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--danger);
}
.danger-zone .card {
  border-color: color-mix(in srgb, var(--danger) 40%, transparent);
}
.save-bar {
  border-radius: var(--r-card);
}

/* ---------- Sign-in ---------- */
.login-card {
  background: transparent;
  border: 0;
  box-shadow: none;
}
.login-orb {
  margin-bottom: var(--s-2);
}
.login-card h1 {
  font-size: 2.5rem;
  letter-spacing: -0.03em;
}

/* ---------- Tasks (0.8): compact rows, blocked first, timeline only for multi-step ---------- */
.task-list {
  display: grid;
  gap: 10px;
}
.task-row {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  text-align: left;
  color: var(--text);
  font-weight: var(--fw-regular);
  justify-items: stretch;
}
.task-row:hover {
  background: var(--surface);
  border-color: var(--border-strong);
}
.task-row.blocked {
  border-color: color-mix(in srgb, var(--warning) 45%, transparent);
}
.task-row.done {
  opacity: 0.8;
  background: transparent;
  box-shadow: none;
}
.task-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.task-names {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.task-org {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.task-title {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  overflow-wrap: anywhere;
}
.task-next {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.task-ask {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: var(--fs-xs);
}
.task-ask .need-go {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 6px;
}
.timeline li {
  display: grid;
  gap: 6px;
  font-size: var(--fs-2xs);
  color: var(--text-muted);
}
.timeline li::before {
  content: "";
  height: 4px;
  border-radius: 2px;
  background: var(--surface-3);
}
.timeline li.done::before {
  background: var(--success);
}
.timeline li.current {
  color: var(--warning);
  font-weight: var(--fw-bold);
}
.timeline li.current::before {
  background: var(--warning);
}
.badge.st-waiting {
  background: var(--info-soft);
  color: var(--info);
}
/* ---------- 0.8 polish after the first 360 px review ---------- */
.badge.unproductive {
  background: var(--surface-2);
  color: var(--text-muted);
}
.call-row .row-sub {
  white-space: normal;
}
.search-box input {
  min-height: var(--tap);
}
.transcript-box .transcript .bubble,
.transcript-box .transcript .bubble.caller,
.transcript-box .transcript .bubble.assistant {
  max-width: none;
  align-self: stretch;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}
.stack-tight {
  display: grid;
  gap: 2px;
  min-width: 0;
}
#tab-tasks > .page-head p.muted {
  display: none;
}
.ask-options button:nth-child(odd):last-child {
  grid-column: 1 / -1;
  min-height: 48px;
  background: transparent;
}
.ask-options button:first-child:last-child {
  background: var(--grad-primary);
}/* Large text (200%): the call screen's single column never grows past the screen. */
.live-call {
  grid-template-columns: minmax(0, 1fr);
}
#call-pill {
  min-width: 0;
  flex: 0 1 auto;
}
.live-hero > * {
  max-width: 100%;
}

/* ===== 0.8 B: building entry (Settings page, Calls > Entry) ===== */
.filter-chips { display: flex; gap: var(--s-2); flex-wrap: wrap; margin: 0 0 var(--s-4); }
.filter-chip { min-height: var(--tap); padding: 0 var(--s-4); border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: var(--fs-sm); }
.filter-chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); font-weight: var(--fw-medium); }
.expected-list { display: grid; gap: var(--s-2); }
.expected-row { display: grid; grid-template-columns: minmax(0, 1fr) auto var(--tap); gap: var(--s-2); align-items: center; }
.expected-row input { min-height: var(--tap); min-width: 0; }
.quiet-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.sim-label { margin: 0; white-space: normal; }
.building-note { display: flex; gap: var(--s-2); align-items: flex-start; }
.entry-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); margin-bottom: var(--s-3); }
.entry-head p { margin: 0; }
.entry-facts { display: grid; grid-template-columns: max-content 1fr; gap: var(--s-1) var(--s-4); margin: 0; }
.entry-facts dt { color: var(--text-muted); }
.entry-facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 400px) { .expected-row { grid-template-columns: minmax(0, 1fr) var(--tap); } .expected-row input[type="date"] { grid-column: 1; } }

/* 0.12 overflow notice (public/overflow.js): callers who left a message while the assistant couldn't answer. */
.banner.overflow {
  background: var(--surface);
  border: 1px solid var(--border);
  align-items: flex-start;
}
.banner.overflow > svg {
  color: var(--accent);
  margin-top: 2px;
}
.overflow-main {
  flex: 1 1 220px;
  min-width: 0;
}
.overflow-main p {
  margin: 0 0 var(--s-2);
}
.overflow-body {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.overflow-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-2);
}
.overflow-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  padding: var(--s-2) 0;
  border-top: 1px solid var(--border);
}
.overflow-from {
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.overflow-actions {
  display: flex;
  gap: var(--s-2);
}
.overflow-actions .btn {
  min-height: 44px;
}
.overflow-audio {
  width: 100%;
}
.overflow-status:empty {
  display: none;
}

/* 0.10 A: the language switch (sign-in, setup, Home header, Settings > Language). */
.lang-switch.compact {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  margin: 0;
  flex: 0 0 auto;
}
.lang-switch.compact > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--text-muted);
}
.lang-switch.compact .lang-select {
  min-height: 44px;
  width: auto;
  max-width: 9.5rem;
  padding: 0 var(--s-6) 0 var(--s-3);
  font-size: var(--fs-sm);
  border-radius: var(--r-pill);
}
.home-head {
  align-items: center;
}
.home-head .lang-switch.compact {
  margin-left: auto;
}
.login-card > .lang-switch.compact,
.wiz-top > .lang-switch.compact {
  justify-self: end;
  align-self: flex-end;
}

/* 0.13 Help and feedback: the device-info preview wraps instead of scrolling sideways. */
.fb-device { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.8rem; margin: 0 0 8px; }
.feedback-form textarea, .call-thumbs textarea { width: 100%; box-sizing: border-box; }
.plans-gift .badge { white-space: normal; max-width: 100%; display: inline-block; height: auto; line-height: 1.35; padding-block: 3px; }
