/* ==========================================================================
   Lumo
   Soft-tech cream + ink pills + amber live lamp. Shared with landing.css /
   mobile theme.ts.
   ========================================================================== */

:root {
  --background: #F4E8DC;
  --panel: #ffffff;
  --panel-hover: #FAF3EB;
  --ink: #111111;
  --foreground: #2A2A2A;
  --muted: #8A8A8A;
  --line: #E5E5E5;
  --accent: #111111;
  --accent-deep: #111111;
  --accent-line: #E5E5E5;
  --accent-wash: #F0E6DA;
  --ok: #1C7A5C;
  --ok-line: #b7dcc7;
  --ok-wash: #eef7f1;
  --warn: #E08A10;
  --warn-line: #f2ddb4;
  --warn-wash: #FDF1DC;
  --danger: #B0392B;
  --danger-line: #e5c3c3;
  --danger-wash: #fbeeee;
  --live: #E08A10;
  --live-line: #f2ddb4;
  --live-wash: #fdf1dc;

  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 999px;

  --gap-xs: 6px;
  --gap-sm: 10px;
  --gap-md: 16px;
  --gap-lg: 22px;
  --gap-xl: 32px;

  --display: Archivo, "Helvetica Neue", Arial, sans-serif;
  --serif: Archivo, "Helvetica Neue", Arial, sans-serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* 2. Base ================================================================ */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* Inline links inside prose need to look like links. */
.link,
.flash a,
.setup-list .todo a,
.prose a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 3. App shell =========================================================== */

.app-body { min-height: 100vh; }

.app {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
  /* Full width: the sidebar pins left and the content uses the whole screen.
     Lists and tables benefit from the room; the only things still capped are
     forms and prose, via .measure — a 2000px-wide text input is unusable. */
  width: 100%;
}

.shell,
.auth-shell {
  max-width: 480px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px 18px 20px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(242, 245, 247, 0.7) 100%);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand { padding: 0 8px 12px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 19px;
  color: var(--ink);
  text-decoration: none;
}

.lamp {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(224, 138, 16, 0.55);
  animation: lamp 2.4s ease-out infinite;
}

@keyframes lamp {
  0%   { box-shadow: 0 0 0 0 rgba(224, 138, 16, 0.5); }
  70%  { box-shadow: 0 0 0 9px rgba(224, 138, 16, 0); }
  100% { box-shadow: 0 0 0 0 rgba(224, 138, 16, 0); }
}

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

.tag,
.eyebrow {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.sidebar-company {
  margin: 8px 0 0;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.25;
  word-break: break-word;
}

.sidebar-switch { margin: 0 8px 10px; }
.sidebar-switch select { margin-top: 0; padding: 8px 10px; font-size: 13px; }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  padding: 4px 0;
}

.nav-group {
  margin: 14px 8px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-group:first-child { margin-top: 0; }

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground);
}

.nav-link:hover { background: rgba(255, 253, 248, 0.85); }
.nav-link.active { background: var(--ink); color: var(--panel); }

/* Unread / attention count beside a nav item. */
.nav-count {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: var(--r-pill);
  background: var(--accent-wash);
  border: 1px solid var(--accent-line);
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.nav-link.active .nav-count {
  background: rgba(255, 255, 255, 0.16);
  border-color: transparent;
  color: var(--panel);
}

.sidebar-foot {
  margin-top: auto;
  padding: 14px 8px 0;
  border-top: 1px solid var(--line);
}

.sidebar-user {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

.sidebar-foot .linklike { padding: 4px 0; color: var(--accent-deep); }

.app-main { min-width: 0; display: flex; flex-direction: column; }

.app-top {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 22px clamp(20px, 3vw, 56px) 0;
}

.app-top-title { min-width: 0; }

.page-heading {
  margin: 0;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.app-top-hint {
  margin: 0 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.menu-btn {
  display: none;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--r-sm);
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.mobile-only { display: none; }
.sidebar-backdrop { display: none; }

.content { padding: 20px clamp(20px, 3vw, 56px) 64px; }
.app-main > .content { flex: 1; }
.content.centered { max-width: 420px; margin: 0 auto; padding-top: 72px; }

/* 4. Primitives ========================================================== */

/* The uppercase micro-label. One definition, used everywhere. */
.label,
.fieldgrid .k,
.overview-item .k,
.sidebar-label,
.livebox-title,
.rate-heading,
.stat .k {
  display: block;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.livebox-title { color: var(--live); margin-bottom: 8px; }
.rate-heading { font-size: 12px; letter-spacing: 0.06em; }
.sidebar-label { margin-bottom: 4px; }

.page-lead { margin: 0 0 var(--gap-lg); }
.page-lead .sub { margin: 0; }

.sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

/* Normal weight so a hint stays quiet inside a bold label. */
.hint { font-size: 13px; font-weight: 400; color: var(--muted); margin: var(--gap-xs) 0 0; }

/* Forms and prose read badly at full width on a wide screen. */
.measure { max-width: 760px; }
.measure-wide { max-width: 1040px; }

/* A heading. Deliberately NOT `h2.section` — `.section` means spacing rhythm,
   and an element-qualified selector would silently outrank it on margins. */
.section-title {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 var(--gap-md);
}

/* A heading that follows content opens a new block, so it gets the gap. */
* + .section-title { margin-top: var(--gap-xl); }

/* A titled block of related settings. Consistent rhythm between groups
   replaces the ad-hoc margin-top values that used to be inline. */
.section {
  margin-top: var(--gap-xl);
}

.section:first-child { margin-top: 0; }

.section-head { margin-bottom: var(--gap-md); }
.section-head .sub { margin-top: 4px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
}

.card > .label:first-child { margin-bottom: var(--gap-sm); }
.card-title {
  margin: 0 0 var(--gap-xs);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}

/* The one number or word a card exists to show. */
.card-value {
  margin: var(--gap-xs) 0 0;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
}

.stack { display: flex; flex-direction: column; gap: 20px; }
.stack-sm { display: flex; flex-direction: column; gap: var(--gap-sm); }
.stack-md { display: flex; flex-direction: column; gap: var(--gap-md); }

.row-between {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-md);
  align-items: flex-end;
  justify-content: space-between;
}

.actions { display: flex; flex-wrap: wrap; gap: var(--gap-sm); align-items: center; }
.actions-end { justify-content: flex-end; }
.actions-top { align-items: flex-start; }

/* Row actions that stack to the right of a list item. */
.meta-stack {
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.twocol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap-md);
}

.fieldgrid,
.statgrid,
.rategrid {
  display: grid;
  gap: 14px;
}

.fieldgrid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.statgrid  { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.rategrid  { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }

.fieldgrid .v {
  margin: 5px 0 0;
  font-weight: 600;
  color: var(--ink);
}

.overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 var(--gap-lg);
}

.overview-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}

.overview-item .v,
.stat .stat-value {
  margin: var(--gap-xs) 0 0;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
}

.stat .stat-value { font-size: 28px; }

.back { font-size: 14px; color: var(--muted); }

code {
  background: #e6edf5;
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 13px;
}

.code-block {
  display: block;
  padding: 10px 12px;
  word-break: break-all;
  line-height: 1.6;
}

/* 5. Forms =============================================================== */

label.field { display: block; font-size: 14px; font-weight: 500; }

input[type="text"],
input[type="password"],
input[type="tel"],
input[type="email"],
input[type="number"],
input[type="time"],
input[type="search"],
select,
textarea {
  margin-top: var(--gap-xs);
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
  padding: 11px 14px;
  font: inherit;
  color: var(--foreground);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(36, 71, 110, 0.18);
}

textarea { min-height: 96px; resize: vertical; }

/* Checkbox / radio rows. */
.check,
.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.check input,
.checkline input { margin: 0; width: auto; accent-color: var(--accent); }

/* Working-hours row: day toggle + two times. */
.hours-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-sm);
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.hours-row:last-of-type { border-bottom: 0; }
.hours-row .check { min-width: 150px; }
.hours-row input[type="time"] { margin-top: 0; width: auto; flex: 0 1 140px; }
.hours-row .to { font-size: 13px; color: var(--muted); }

.voice-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-sm);
  align-items: center;
  margin-top: var(--gap-xs);
}

.voice-row select { margin-top: 0; flex: 1 1 180px; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: var(--gap-lg);
}

.toolbar input[type="text"],
.toolbar input[type="search"] { margin-top: 0; flex: 1 1 220px; }

.searchform { display: flex; gap: 8px; margin-bottom: var(--gap-lg); }
.searchform input { margin-top: 0; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--gap-lg) 0 var(--gap-md); }

.chip {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--r-pill);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.chip.active { background: var(--ink); border-color: var(--ink); color: var(--panel); }

.prompt-preview {
  margin-top: var(--gap-sm);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #eef3f7;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 320px;
  overflow-y: auto;
}

/* 6. Buttons ============================================================= */

.btn {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--ink);
  color: var(--panel);
  padding: 12px 22px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
}

.btn.accent { background: var(--ink); color: #fff; }
.btn.ghost { background: var(--panel); color: var(--foreground); border: 1px solid var(--line); }
.btn.danger { background: var(--panel); color: var(--danger); border: 1px solid var(--danger-line); }
.btn.small { padding: 8px 14px; font-size: 13px; }
.btn:disabled, .btn.is-static { opacity: 0.75; pointer-events: none; }

.linklike {
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  padding: 8px 12px;
}

/* 7. Feedback ============================================================ */

.flash,
.notice {
  margin: 0 0 var(--gap-md);
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-size: 14px;
}

.flash.ok, .notice.ok { background: var(--ok-wash); border-color: var(--ok-line); color: #1f5a3a; }
.flash.warn, .notice.warn { background: var(--warn-wash); border-color: var(--warn-line); color: #7a5a20; }
.flash.err, .notice.err { background: var(--danger-wash); border-color: var(--danger-line); color: var(--danger); }

.setup-card {
  margin: 0 0 var(--gap-lg);
  padding: 18px 20px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, #e6edf5 0%, #ffffff 70%);
}

.setup-card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}

.setup-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}

.setup-list li {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-sm);
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}

.setup-list .done { color: var(--ok); font-weight: 600; }
.setup-list .todo a { color: var(--accent-deep); font-weight: 600; }

.empty {
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
  padding: 56px 24px;
  text-align: center;
}

.empty h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  margin: 0;
  color: var(--ink);
}

.empty p {
  margin: 8px auto 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 14px;
}

.danger-zone { border-color: var(--danger-line); background: #fff8f8; }

/* 8. Components ========================================================== */

.calllist {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--panel);
}

.calllist li + li { border-top: 1px solid var(--line); }

.callrow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  text-decoration: none;
  color: inherit;
}

.callrow-main { flex: 1 1 auto; min-width: 0; }
.callrow:hover { background: var(--panel-hover); }
.callrow .who {
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.callrow .why {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 56ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.callrow.live { border-color: var(--live-line); background: var(--live-wash); }

/* Number-grouped inbox (matches mobile: number → conversations) */
.numberlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.numbergroup {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
  overflow: hidden;
}

.numbergroup.is-live {
  border-color: var(--live-line);
  background: var(--live-wash);
}

.numbergroup-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.numbergroup-head::-webkit-details-marker { display: none; }
.numbergroup-head::marker { content: ''; }

.numbergroup-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  background: var(--accent-wash);
  border: 1px solid var(--accent-line);
  position: relative;
}

.numbergroup-icon::after {
  content: '';
  position: absolute;
  inset: 11px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  border-top-color: transparent;
}

.numbergroup.is-live .numbergroup-icon {
  background: var(--live-wash);
  border-color: var(--live-line);
}

.numbergroup.is-live .numbergroup-icon::after {
  border-color: var(--live);
  border-top-color: transparent;
}

.numbergroup-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.numbergroup-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(224, 138, 16, 0.45);
  animation: lamp 2.4s ease-out infinite;
}

.numbergroup-phone {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.numbergroup-stats {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.stat-warn { color: var(--accent); font-weight: 600; }
.stat-urgent { color: #8a5a06; font-weight: 600; }
.stat-live { color: #8a5a06; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; font-size: 12px; }

.numbergroup-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-top: 4px;
}

.numbergroup-meta .when {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--mono);
}

.numbergroup-meta .chev {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.numbergroup[open] .numbergroup-meta .chev {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.numbergroup .calllist.nested {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.numbergroup .calllist.nested .callrow {
  padding: 12px 16px 12px 64px;
}

.numbergroup .calllist.nested .callrow .who {
  font-weight: 500;
  font-size: 14px;
}

/* Phone-number / resource rows: identity left, controls right on one line. */
.linerow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}

.linerow:hover { background: var(--panel-hover); }

.linerow-main {
  flex: 1 1 180px;
  min-width: 0;
}

.linerow-main .who { font-weight: 600; color: var(--ink); }

.linerow-main .why {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.linerow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.linerow-assign {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.linerow-assign select {
  margin: 0;
  width: auto;
  min-width: 140px;
  padding: 8px 10px;
  font-size: 13px;
}

.empty-compact {
  margin-top: 14px;
  padding: 32px 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--muted);
}

.badge {
  border-radius: var(--r-pill);
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge.completed { color: var(--ok); border-color: var(--ok-line); background: var(--ok-wash); }
.badge.incomplete,
.badge.in_progress,
.badge.ringing,
.badge.trialing { color: var(--warn); border-color: var(--warn-line); background: var(--warn-wash); }
.badge.spam,
.badge.error,
.badge.no_answer,
.badge.high,
.badge.canceled,
.badge.past_due { color: var(--danger); border-color: var(--danger-line); background: var(--danger-wash); }
.badge.new { color: var(--accent-deep); border-color: var(--accent-line); background: var(--accent-wash); }
.badge.joined,
.badge.active { color: #1f5a3a; border-color: var(--ok-line); background: var(--ok-wash); }

.badge.live {
  color: #8a5a06;
  border-color: var(--live-line);
  background: var(--live-wash);
  animation: pulse-live 1.6s ease-in-out infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.livebox {
  margin: 0 0 var(--gap-lg);
  padding: 14px 16px 6px;
  border: 1px solid var(--live-line);
  border-radius: var(--r-lg);
  background: var(--live-wash);
}

.transcript,
.commitments {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.transcript .speaker,
.commitments .speaker {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.transcript .speaker.caller,
.commitments .speaker.caller { color: var(--muted); }

.transcript p { margin: 2px 0 0; font-size: 15px; }

.commitments li {
  padding-left: 12px;
  border-left: 2px solid var(--accent-line);
}

.commitments p { margin: 2px 0 0; font-size: 15px; }

audio { width: 100%; margin-top: 12px; }

.meter {
  margin-top: var(--gap-sm);
  height: 6px;
  border-radius: var(--r-pill);
  background: #e6edf5;
  overflow: hidden;
}

.meter span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: var(--r-pill);
}

.meter.over span { background: var(--danger); }

.moneylist { list-style: none; margin: var(--gap-md) 0 0; padding: 0; }

.moneylist li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.moneylist li.total { border-bottom: 0; padding-top: 12px; font-weight: 700; }

/* Plan cards */
.plangrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.plan.is-current { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(36, 71, 110, 0.12); }

.plan-price {
  margin: var(--gap-xs) 0 0;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
}

.plan-price .per { font-family: var(--sans); font-size: 13px; font-weight: 400; color: var(--muted); }

.plan-features {
  list-style: none;
  margin: var(--gap-sm) 0 0;
  padding: 0;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* 9. Responsive ========================================================== */

@media (max-width: 900px) {
  .app { display: block; }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 40;
    width: min(280px, 86vw);
    height: 100vh;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: none;
  }

  .sidebar.open { transform: translateX(0); box-shadow: 12px 0 40px rgba(18, 22, 15, 0.12); }

  .menu-btn { display: inline-block; }
  .mobile-only { display: block; }
  .app-top-hint { display: none; }

  .sidebar-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(18, 22, 15, 0.35);
  }

  body.nav-open { overflow: hidden; }

  .app-top { padding: 16px 18px 0; }
  .content { padding: 16px 18px 48px; }
  .page-heading { font-size: 22px; }
  .numbergroup .calllist.nested .callrow { padding-left: 16px; }
  .overview { grid-template-columns: 1fr; }
  .callrow .why { white-space: normal; }
  .linerow-actions { width: 100%; justify-content: flex-start; }
  .linerow-assign { flex: 1 1 auto; }
  .linerow-assign select { flex: 1 1 140px; min-width: 0; }
  .hours-row .check { min-width: 100%; }
}

/* Disclosure toggles (setup help, advanced rates). */
.summary-toggle { cursor: pointer; font-weight: 600; }
.summary-toggle::marker { color: var(--muted); }

/* Repeating settings rows (extra intake questions). */
.field-row { display: flex; flex-direction: column; gap: var(--gap-sm); margin-top: var(--gap-sm); }
.voice-audio { width: 100%; margin-top: var(--gap-sm); }
