@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/app-assets/fonts/manrope-latin.woff2?v=20260829-10") format("woff2");
}

@font-face {
  font-family: "Oxygen";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/app-assets/fonts/oxygen-700-latin.woff2?v=20260829-10") format("woff2");
}

@layer reset, tokens, base, shell, components;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html, body { margin: 0; min-width: 320px; min-height: 100%; }
  button, input, select, textarea { font: inherit; }
  button { border: 0; }
  svg { display: block; }
}

@layer components {
  .auth-gate {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: grid;
    min-height: 100dvh;
    place-items: center;
    padding: 88px 24px 32px;
    overflow-y: auto;
    background:
      linear-gradient(90deg, color-mix(in srgb, var(--blue) 5%, transparent) 1px, transparent 1px),
      linear-gradient(color-mix(in srgb, var(--blue) 5%, transparent) 1px, transparent 1px),
      var(--page);
    background-size: 48px 48px;
  }
  .auth-brand {
    position: fixed;
    top: 24px;
    left: 28px;
    display: flex;
    align-items: center;
    color: var(--ink);
  }
  .auth-brand .brand-bolt { width: 32px; height: 38px; }
  .auth-brand-name {
    margin-left: 9px;
    font-family: var(--font-app);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.055em;
    line-height: .94;
    text-transform: uppercase;
    -webkit-text-stroke: .18px currentColor;
  }
  .auth-card {
    width: min(100%, 480px);
    padding: clamp(28px, 5vw, 48px);
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 28px 80px rgba(8, 24, 48, .14);
  }
  html[data-theme="dark"] .auth-card { box-shadow: 0 28px 80px rgba(0, 0, 0, .58); }
  .auth-card h1 {
    margin: 8px 0 12px;
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 38px);
    letter-spacing: -.045em;
    line-height: 1.08;
  }
  .auth-card > p:not(.auth-kicker, .auth-message) { margin: 0; color: var(--ink-soft); font-size: 16px; }
  .auth-kicker { margin: 0; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
  .auth-loader {
    display: block;
    width: 28px;
    height: 28px;
    margin-bottom: 28px;
    border: 3px solid var(--line);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: auth-spin .75s linear infinite;
  }
  .auth-form label { display: block; margin: 28px 0 8px; font-size: 14px; font-weight: 800; }
  .auth-form input {
    width: 100%;
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-control);
    background: var(--surface-subtle);
    color: var(--ink);
  }
  .auth-form input:focus { border-color: var(--focus); }
  .auth-form .route-primary { width: 100%; min-height: 52px; margin-top: 14px; }
  .auth-form .auth-resend-action { width: 100%; min-height: 48px; margin-top: 10px; }
  .workspace-retry .route-primary { width: 100%; min-height: 52px; margin-top: 24px; }
  .workspace-retry > .secondary-action { width: 100%; min-height: 48px; margin-top: 10px; }
  .preview-workspace-offer { display: grid; gap: 14px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
  .preview-workspace-offer[hidden] { display: none; }
  .preview-workspace-offer h2 { margin: 0; font-size: clamp(23px, 3vw, 30px); line-height: 1.08; }
  .preview-workspace-offer p, .preview-workspace-offer ul { margin: 0; color: var(--ink-soft); }
  .preview-workspace-offer ul { display: grid; gap: 8px; padding-left: 20px; }
  .preview-workspace-offer .route-primary { margin-top: 2px; }
  .preview-workspace-offer > small { color: var(--ink-soft); text-align: center; }
  .preview-terms { display: flex; gap: 10px; align-items: flex-start; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-subtle); font-size: 14px; line-height: 1.45; }
  .preview-terms input { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--blue); }
  .preview-terms a { color: var(--blue); font-weight: 800; }
  .auth-message { min-height: 22px; margin: 16px 0 0; color: var(--ink-soft); font-size: 14px; }
  .auth-message.is-error { color: var(--danger); font-weight: 700; }
  .auth-message.is-success { color: var(--green); font-weight: 700; }

  .route-loading {
    min-height: 310px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    background: var(--surface);
  }
  .overview-page > .route-loading, .overview-page > .route-error { position: absolute; inset: 5.7% 2.8% auto 2.4%; }
  .skeleton-line {
    height: 14px;
    margin-top: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--line) 20%, var(--surface-subtle) 50%, var(--line) 80%);
    background-size: 220% 100%;
    animation: skeleton-shift 1.15s ease-in-out infinite;
  }
  .skeleton-line:first-child { width: 38%; height: 28px; margin-top: 0; }
  .skeleton-line:nth-child(2) { width: 70%; }
  .skeleton-line:nth-child(3) { width: 92%; margin-top: 42px; height: 84px; }
  .skeleton-line:nth-child(4) { width: 82%; height: 84px; }
  .route-error {
    display: grid;
    min-height: 300px;
    place-content: center;
    justify-items: start;
    padding: 36px;
    border: 1px solid color-mix(in srgb, var(--danger) 28%, var(--line));
    border-radius: var(--radius-panel);
    background: var(--surface);
  }
  .route-error h1 { margin: 0 0 8px; font-family: var(--font-display); font-size: 24px; letter-spacing: -.03em; }
  .route-error p { max-width: 580px; margin: 0 0 22px; color: var(--ink-soft); font-size: 15px; }
  .route-error button { min-height: 44px; padding: 0 18px; border-radius: var(--radius-control); background: var(--action-blue); color: #fff; font-weight: 800; }
  .inline-status { min-height: 22px; margin: 12px 0 0; color: var(--ink-soft); font-size: 13px; }
  .inline-status.is-error { color: var(--danger); font-weight: 700; }
  .inline-status.is-success { color: var(--green); font-weight: 700; }
  button[aria-busy="true"] { cursor: wait; opacity: .72; }
  .toast.is-error { border-color: color-mix(in srgb, var(--danger) 42%, var(--line)); }
  .toast.is-success { border-color: color-mix(in srgb, var(--green) 42%, var(--line)); }
  .danger-text { color: var(--danger); }
  .data-empty {
    display: grid;
    min-height: 220px;
    place-content: center;
    padding: 28px;
    text-align: center;
  }
  .data-empty h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 22px; }
  .data-empty p { max-width: 520px; margin: 0; color: var(--ink-soft); }
  .status-item.is-warning .status-dot, .health-state.is-warning i { background: var(--amber); }
  .status-item.is-error .status-dot, .health-state.is-error i { background: var(--danger); }
  .permission-note { margin: 16px 0 0; color: var(--muted); font-size: 13px; }
  .account-menu .permission-note { color: #afbdd0; }
  .queue-row { width: 100%; background: var(--surface); text-align: left; }
  .route-primary, .primary-action, .phone-link { text-decoration: none; }
  .load-more { display: block; margin: 18px auto; }
  .provider-choice .provider-button {
    position: relative;
    display: grid;
    min-height: 78px;
    grid-template-columns: 44px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px 4px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
  }
  .provider-choice .provider-button > input { position: absolute; opacity: 0; }
  .provider-choice .provider-button:has(input:checked) { background: var(--blue-soft); box-shadow: inset 3px 0 var(--blue); }
  .provider-choice .provider-button:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
  .test-action-grid { display: flex; max-width: 840px; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
  .settings-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0; padding: 0 25px 20px; }
  .settings-metrics div { display: grid; min-height: 72px; align-content: center; justify-content: start; padding-right: 18px; }
  .support-answer { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface-subtle); }
  .support-answer p { margin: 6px 0; color: var(--ink-soft); }
  .mobile-session-actions { display: none; }
  .action-dialog {
    width: min(calc(100% - 32px), 540px);
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 28px 90px rgba(0, 0, 0, .38);
  }
  .action-dialog::backdrop { background: rgba(0, 0, 0, .66); backdrop-filter: blur(3px); }
  .action-dialog form { padding: 28px; }
  .action-dialog h2 { margin: 8px 0 10px; font-family: var(--font-display); font-size: 25px; letter-spacing: -.035em; }
  .dialog-copy { margin: 0 0 22px; color: var(--ink-soft); font-size: 14px; line-height: 1.65; }
  .action-dialog label { display: block; color: var(--ink-soft); font-size: 13px; font-weight: 700; }
  .action-dialog input, .action-dialog textarea { display: block; width: 100%; min-height: 48px; margin-top: 8px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-control); background: var(--surface-subtle); color: var(--ink); }
  .action-dialog textarea { min-height: 150px; padding-block: 12px; resize: vertical; }
  .action-dialog input:focus-visible, .action-dialog textarea:focus-visible { border-color: var(--focus); outline: 3px solid var(--focus); outline-offset: 2px; }
  .dialog-options { display: grid; gap: 9px; min-width: 0; margin: 0; padding: 0; border: 0; }
  .dialog-options label { position: relative; }
  .dialog-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dialog-options span { display: flex; min-height: 50px; align-items: center; padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: var(--radius-control); background: var(--surface-subtle); color: var(--ink); font-size: 14px; }
.dialog-options span:has(small) { flex-direction: column; align-items: flex-start; justify-content: center; }
.dialog-options b { font-size: 14px; }
.dialog-options small { margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
  .dialog-options input:checked + span { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 1px var(--blue); }
  .dialog-options input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
  .dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
  .integration-guide-dialog { width: min(calc(100% - 32px), 760px); max-height: min(88vh, 840px); overflow: auto; }
  .integration-guide-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: start; }
  .integration-guide-header-actions { display: flex; align-items: center; gap: 8px; }
  .integration-guide-heading .connection-truth { white-space: nowrap; }
  .integration-guide-header-actions button { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-control); background: var(--surface); color: var(--ink-soft); }
  .integration-guide-header-actions button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 2; }
  .guide-truth { margin: 18px 0; padding: 14px 16px; border-left: 3px solid var(--blue); background: var(--surface-subtle); }
  .guide-truth strong { color: var(--ink); font-size: 13px; }
  .guide-truth p { margin: 5px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
  .guide-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
  .guide-section h3 { margin: 0 0 12px; font-family: var(--font-display); font-size: 18px; letter-spacing: -.02em; }
  .guide-section > ul, .guide-steps { display: grid; gap: 9px; margin: 0; padding-left: 20px; color: var(--ink-soft); font-size: 13px; line-height: 1.55; }
  .guide-steps { gap: 14px; }
  .guide-steps strong, .guide-steps p, .guide-steps small { display: block; }
  .guide-steps strong { color: var(--ink); font-size: 14px; }
  .guide-steps p { margin: 4px 0; }
  .guide-steps small, .guide-section li small { color: var(--muted); font-size: 12px; line-height: 1.5; }
  details.guide-section > summary { display: flex; min-height: 44px; align-items: center; color: var(--ink); font-size: 14px; font-weight: 800; cursor: pointer; }
  details.guide-section > p { color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
  .guide-section li strong, .guide-section li small { display: block; }
  .guide-troubleshooting { display: grid; gap: 12px; }
  .guide-troubleshooting article { padding: 14px; border: 1px solid var(--line); background: var(--surface-subtle); }
  .guide-troubleshooting article > strong { color: var(--ink); font-size: 14px; }
  .guide-troubleshooting p { margin: 7px 0; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
  .guide-troubleshooting small { color: var(--muted); font-size: 12px; line-height: 1.5; }
  .guide-links { list-style: none; padding-left: 0 !important; }
  .guide-links a { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; color: var(--blue); font-size: 13px; font-weight: 800; }
  .guide-links svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .guide-security { display: flex; gap: 10px; margin: 20px 0 0; padding: 14px; border: 1px solid var(--line); background: var(--surface-subtle); color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
  .guide-security svg { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: var(--blue); stroke-width: 1.8; }

  @keyframes auth-spin { to { transform: rotate(360deg); } }
  @keyframes skeleton-shift { from { background-position: 100% 0; } to { background-position: -120% 0; } }
}

@media (max-width: 640px) {
  .auth-gate { align-items: start; padding: 86px 16px 24px; }
  .auth-brand { top: 20px; left: 18px; }
  .auth-card { padding: 28px 20px; }
  .auth-card h1 { font-size: 29px; }
  .settings-metrics { grid-template-columns: 1fr 1fr; }
  .dialog-actions { display: grid; grid-template-columns: 1fr; }
  .dialog-actions button { width: 100%; }
  .integration-guide-heading { grid-template-columns: 1fr; gap: 8px; }
  .integration-guide-header-actions { justify-content: space-between; }
  .integration-guide-heading .connection-truth { justify-self: start; margin-top: 0; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-loader, .skeleton-line { animation: none; }
}

@layer tokens {
  :root {
    color-scheme: light;
    --font-app: "Manrope", ui-sans-serif, system-ui, sans-serif;
    --font-display: "Oxygen", "Manrope", ui-sans-serif, system-ui, sans-serif;
    --page: #f7f8f8;
    --surface: #ffffff;
    --surface-subtle: #fbfcfd;
    --sidebar: #081830;
    --sidebar-deep: #041226;
    --sidebar-text: #f7f9fc;
    --sidebar-muted: #a7b4c9;
    --ink: #09142c;
    --ink-soft: #3f4b65;
    --muted: #5f6b84;
    --muted-quiet: #8893a9;
    --line: #d6ddea;
    --line-strong: #c5cfdf;
    --blue: #0968f5;
    --blue-strong: #0757d9;
    --action-blue: #0968f5;
    --action-blue-hover: #0757d9;
    --link-blue: #0968f5;
    --blue-soft: #eaf2ff;
    --green: #007457;
    --green-soft: #e8f8f2;
    --amber: #f2b729;
    --danger: #d83b50;
    --focus: #0968f5;
    --shadow-panel: none;
    --radius-control: 8px;
    --radius-panel: 10px;
    --sidebar-w: 15%;
    --ease-out: cubic-bezier(.22, 1, .36, 1);
  }
  html[data-theme="dark"] {
    color-scheme: dark;
    --page: #000000;
    --surface: #0a0a0a;
    --surface-subtle: #111111;
    --sidebar: #050505;
    --sidebar-deep: #000000;
    --sidebar-text: #ffffff;
    --sidebar-muted: #b3b3b3;
    --ink: #ffffff;
    --ink-soft: #d7d7d7;
    --muted: #a7a7a7;
    --muted-quiet: #868686;
    --line: #1b1b1b;
    --line-strong: #282828;
    --blue: #2f80ff;
    --blue-strong: #5b9bff;
    --action-blue: #1f6fe5;
    --action-blue-hover: #1768d4;
    --link-blue: #5b9bff;
    --blue-soft: #0b1b36;
    --green: #2de0a3;
    --green-soft: #071b14;
    --amber: #ffd43d;
    --danger: #ff667b;
    --focus: #79adff;
    --shadow-panel: none;
  }
}

@layer base {
  [hidden] { display: none !important; }
  .sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
  body:not([data-auth-state="authenticated"]) .skip-link { display: none; }
  html { background: var(--page); }
  body {
    overflow: hidden;
    background: var(--page);
    color: var(--ink);
    font-family: var(--font-app);
    font-size: 15px;
    line-height: 1.45;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
  }
  ::selection { background: #cde0ff; color: #061329; }
  html[data-theme="dark"] ::selection { background: #2f80ff; color: #fff; }
  :focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
  button { color: inherit; cursor: pointer; touch-action: manipulation; }
  .icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
  .section-label {
    margin: 0;
    color: #53617f;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .035em;
    line-height: 1.2;
    text-transform: uppercase;
  }
  .skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
    padding: 11px 15px;
    border-radius: var(--radius-control);
    background: var(--surface);
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
    transform: translateY(-160%);
  }
  .skip-link:focus { transform: translateY(0); }
}

@layer shell {
  .shell-frame {
    position: relative;
    width: 100vw;
    height: 100vh;
    min-height: 640px;
    overflow: hidden;
    background: var(--page);
  }
  .sidebar-surface {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-deep) 100%);
  }
  .shell-sidebar {
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 2;
    width: var(--sidebar-w);
    color: var(--sidebar-text);
  }
  .brand-lockup {
    position: absolute;
    top: 2.9%;
    left: 8.7%;
    display: flex;
    align-items: center;
    width: 82%;
    min-height: 58px;
    color: var(--sidebar-text);
    text-decoration: none;
  }
  .mobile-menu-trigger, .mobile-menu { display: none; }
  .brand-bolt { width: 42px; height: 52px; flex: 0 0 auto; }
  .brand-bolt svg { width: 100%; height: 100%; overflow: visible; transform-box: fill-box; transform-origin: center; }
  .bolt-edge { fill: #0875ff; opacity: .82; }
  .bolt-core { fill: #ffd43d; stroke: #fff2a6; stroke-width: 1.2; stroke-linejoin: bevel; }
  .bolt-spark { fill: none; stroke: #ffd43d; stroke-linecap: round; stroke-width: 2.4; opacity: 0; transform-box: fill-box; transform-origin: center; }
  .brand-name {
    margin-left: 9px;
    color: #fff;
    font-family: var(--font-app);
    font-size: clamp(16px, 1.4vw, 22px);
    font-weight: 800;
    letter-spacing: -.062em;
    line-height: .9;
    text-transform: uppercase;
    -webkit-text-stroke: .24px currentColor;
    text-wrap: nowrap;
  }
  .primary-nav { position: absolute; top: 12.4%; left: 0; width: 100%; }
  .nav-control {
    position: relative;
    display: flex;
    align-items: center;
    width: calc(100% - 11px);
    min-height: 53px;
    padding: 0 24px;
    border-radius: 0 5px 5px 0;
    background: transparent;
    color: #edf3fb;
    font-size: clamp(13px, 1.05vw, 16px);
    font-weight: 600;
    text-align: left;
  }
  .nav-control + .nav-control { margin-top: 1px; }
  .nav-control svg { width: 22px; height: 22px; margin-right: 14px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
  .nav-control.is-active { background: #0968f5; color: #fff; }
  .nav-control.is-active::before { position: absolute; inset: 0 auto 0 0; width: 4px; content: ""; background: #5ed3ff; }
  .sidebar-footer {
    position: absolute;
    right: 8px;
    bottom: 4.9%;
    left: 10px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .16);
  }
  .account-menu {
    position: absolute;
    right: 8px;
    bottom: 58px;
    left: 8px;
    z-index: 5;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--radius-control);
    background: #0d213d;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .3);
    max-height: min(62vh, 520px);
    overflow-y: auto;
  }
  html[data-theme="dark"] .account-menu { background: #111; }
  .account-menu button {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 6px;
    background: transparent;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
  }
  .account-menu button:hover { background: rgba(255, 255, 255, .09); }
  .workspace-choices { margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
  .workspace-choices > p { margin: 7px 12px 5px; color: #afbdd0; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
  .workspace-choices button { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .workspace-choices button small { color: #afbdd0; font-size: 11px; }
  .workspace-choices button[aria-current="true"] { background: rgba(9, 104, 245, .34); }
  .account-control, .footer-control {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 56px;
    padding: 6px 10px;
    background: transparent;
    color: #f5f7fb;
    text-align: left;
  }
  .account-avatar {
    display: grid;
    width: 41px;
    height: 41px;
    flex: 0 0 auto;
    margin-right: 10px;
    place-items: center;
    border-radius: 50%;
    background: #eef1f5;
    color: #273249;
    font-weight: 800;
    overflow: hidden;
  }
  .account-avatar.has-logo { background: #fff; }
  .account-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .account-control strong, .account-control small { display: block; }
  .account-control strong { font-size: 14px; font-weight: 700; }
  .account-control small { margin-top: 2px; color: #dae2ee; font-size: 12px; }
  .account-control > svg { width: 18px; height: 18px; margin-left: auto; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; transform: rotate(90deg); }
  .footer-control { min-height: 56px; font-size: 14px; }
  .footer-control svg { width: 21px; height: 21px; margin-right: 13px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

  .overview-page { position: absolute; inset: 0 0 0 var(--sidebar-w); }
  .page-heading { position: absolute; top: 5.7%; left: 2.4%; }
  .page-heading p { margin: 0 0 6px; color: var(--blue); font-size: 13px; font-weight: 800; letter-spacing: .025em; text-transform: uppercase; }
  .page-heading h1 {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: clamp(30px, 2.58vw, 41px);
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: 1.08;
  }
  .global-status {
    position: absolute;
    top: 12.7%;
    right: 2.8%;
    left: 2.4%;
    display: grid;
    height: 8.4%;
    min-height: 68px;
    grid-template-columns: 1.06fr 1.16fr 1.26fr 1.07fr;
    align-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    background: var(--surface);
  }
  .status-item {
    display: flex;
    align-items: center;
    height: 42%;
    padding: 0 clamp(16px, 2vw, 32px);
    border-left: 1px solid var(--line);
    color: #1c2944;
    font-size: clamp(12px, .92vw, 14px);
    font-weight: 600;
    white-space: nowrap;
  }
  .status-item:first-child { border-left: 0; }
  .status-icon {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    margin-right: 11px;
    place-items: center;
    border: 1px solid #8797b7;
    border-radius: 50%;
    color: #283955;
  }
  .status-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
  .status-dot { width: 7px; height: 7px; flex: 0 0 auto; margin-right: 10px; border-radius: 50%; background: var(--green); }
}

@layer components {
  .hot-lead {
    position: absolute;
    top: 23%;
    left: 2.4%;
    width: 68.4%;
    height: 43.9%;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-panel);
    background: var(--surface);
    box-shadow: var(--shadow-panel);
  }
  .hot-lead-header { position: relative; height: 35.3%; padding: 20px 22px; border-bottom: 1px solid var(--line); }
  .controlled-label { color: var(--blue); }
  .lead-identity { position: absolute; top: 54px; right: 278px; left: 22px; display: flex; min-width: 0; align-items: center; }
  .lead-identity > div { min-width: 0; }
  .lead-avatar { display: grid; width: 73px; height: 73px; margin-right: 25px; place-items: center; border-radius: 50%; background: #cfe0fb; color: #07142d; font-size: 24px; font-weight: 800; }
  .lead-identity h2 { margin: 0 0 2px; overflow: hidden; color: var(--ink); font-size: clamp(20px, 1.5vw, 25px); font-weight: 800; letter-spacing: -.025em; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
  .lead-meta { display: -webkit-box; margin: 0 0 2px; overflow: hidden; color: #172541; font-size: clamp(13px, 1.1vw, 17px); font-weight: 500; line-height: 1.28; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .lead-age { margin: 0; color: #697592; font-size: clamp(12px, .95vw, 15px); }
  .handoff-note {
    position: absolute;
    top: -38px;
    right: -256px;
    width: min(440px, calc(100% + 256px));
    margin: 0;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    text-align: right;
  }
  .lead-actions { position: absolute; top: 56px; right: 27px; width: 224px; text-align: center; }
  .primary-action {
    display: inline-flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: var(--action-blue);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
  }
  .primary-action svg { width: 20px; height: 20px; margin-right: 10px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
  .text-action { min-height: 44px; padding: 4px 6px; background: transparent; color: var(--link-blue); font-size: 14px; font-weight: 700; }
  .lead-actions .text-action { margin-top: 5px; }
  .lead-evidence { display: grid; height: 64.7%; grid-template-columns: 1.05fr 1.02fr 1.08fr; padding: 22px; }
  .lead-evidence > section { min-width: 0; padding-right: 22px; }
  .lead-evidence > section + section { padding-left: 22px; border-left: 1px solid var(--line); }
  .request-summary > p { max-width: 32ch; margin: 18px 0 21px; color: #273550; font-size: 13px; font-weight: 500; line-height: 1.55; }
  .request-facts { display: grid; gap: 14px; margin: 33px 0 0; padding: 0; list-style: none; }
  .request-facts li { display: flex; align-items: center; color: #182641; font-size: 18px; font-weight: 600; letter-spacing: -.03em; white-space: nowrap; }
  .request-facts svg { width: 24px; height: 24px; flex: 0 0 auto; margin-right: 12px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
  .proof-trail ol { margin: 15px 0 0; padding: 0; list-style: none; }
  .proof-trail li { position: relative; display: grid; min-height: 67px; grid-template-columns: 20px 1fr; column-gap: 11px; }
  .proof-trail li:not(:last-child)::after { position: absolute; top: 19px; bottom: 0; left: 9px; width: 1px; content: ""; background: #d4dce9; }
  .proof-marker { position: relative; z-index: 1; display: grid; width: 17px; height: 17px; place-items: center; border-radius: 50%; background: var(--green); color: #fff; }
  .proof-marker svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.6; }
  .is-current .proof-marker { background: var(--blue); }
  .proof-trail strong, .proof-trail time { display: block; }
  .proof-trail strong { color: #1b2944; font-size: 12px; font-weight: 700; line-height: 1.35; }
  .proof-trail time { margin-top: 3px; color: var(--muted); font-size: 12px; font-style: normal; font-variant-numeric: tabular-nums; }
  .provider-row { display: flex; align-items: center; margin-top: 16px; }
  .provider-logo { display: block; width: 28px; height: 28px; flex: 0 0 auto; object-fit: contain; }
  .provider-logo.small { width: 21px; height: 21px; }
  .provider-logo-wide { width: 34px; height: 28px; }
  .provider-logo-pair { display: inline-flex; width: 38px; height: 28px; align-items: center; }
  .provider-logo-pair img { width: 22px; height: 22px; object-fit: contain; }
  .provider-logo-pair img + img { margin-left: -6px; border: 2px solid var(--surface); border-radius: 7px; background: var(--surface); }
  .provider-network-lockup { display: inline-flex; width: 108px; height: 30px; align-items: center; gap: 7px; }
  .provider-network-lockup .provider-logo { width: 27px; height: 22px; flex: 0 0 27px; }
  .provider-homeadvisor-logo { display: block; width: 74px; height: 22px; padding: 4px; border: 1px solid rgba(7, 4, 65, .14); border-radius: 4px; background: #fff; object-fit: contain; }
  .provider-row > div { margin-left: 14px; }
  .provider-row strong, .provider-row span { display: block; }
  .provider-row strong { color: #182641; font-size: 15px; font-weight: 700; }
  .provider-row span { margin-top: 4px; color: #697592; font-size: 12px; }
  .billing-proof { display: grid; gap: 6px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: #24324d; }
  .billing-proof strong { color: var(--ink); font-size: 13px; font-weight: 800; line-height: 1.35; }
  .billing-proof small { color: var(--muted); font-size: 12px; line-height: 1.45; }

  .handled-today {
    position: absolute;
    bottom: 3.6%;
    left: 2.4%;
    width: 68.4%;
    height: 27.6%;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-panel);
    background: var(--surface);
    box-shadow: var(--shadow-panel);
  }
  .handled-heading { display: flex; min-height: 44px; align-items: center; justify-content: space-between; padding: 0 14px 0 22px; }
  .handled-heading h2 { margin: 0; }
  .handled-table { border-top: 1px solid var(--line); }
  .handled-row { display: grid; min-height: 59px; grid-template-columns: 78px minmax(160px, 1.5fr) minmax(105px, .78fr) minmax(145px, 1.18fr) 68px 44px; gap: 12px; align-items: center; padding: 0 10px 0 20px; border-bottom: 1px solid var(--line); color: #24324d; font-size: 12px; font-variant-numeric: tabular-nums; }
  .handled-row > * { min-width: 0; }
  .handled-lead strong, .handled-lead small { display: block; }
  .handled-lead strong { overflow: hidden; color: var(--ink); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
  .handled-lead small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
  .handled-source { display: flex; align-items: center; gap: 8px; }
  .handled-source small { overflow: hidden; color: var(--ink-soft); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
  .handled-source .provider-logo, .handled-source > svg { width: 22px; height: 22px; flex: 0 0 22px; }
  .handled-source > svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
  .handled-head { min-height: 32px; color: #52617f; font-size: 12px; font-weight: 700; }
  .handled-head .handled-lead strong, .handled-head .handled-source { color: inherit; }
  .handled-row button { display: grid; width: 44px; height: 44px; margin-inline: -10px; place-items: center; background: transparent; color: #5b6d8e; }
  .handled-row button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
  .outcome { display: flex; align-items: center; line-height: 1.25; }
  .outcome i { display: grid; width: 16px; height: 16px; flex: 0 0 auto; margin-right: 8px; place-items: center; border: 1.5px solid var(--green); border-radius: 50%; color: var(--green); }
  .outcome i svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5; }
  .outcome.stopped i { position: relative; border-color: #f1b500; }
  .outcome.stopped i::after { width: 7px; height: 1.5px; content: ""; background: #f1b500; }
  .view-all { flex: 0 0 auto; width: fit-content; }

  .connection-health {
    position: absolute;
    top: 23%;
    right: 2.8%;
    width: 24%;
    height: 73.5%;
    padding: 22px 21px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-panel);
    background: var(--surface);
    box-shadow: var(--shadow-panel);
  }
  .connection-health > h2 { margin: 0 0 13px; color: var(--ink); font-size: 15px; font-weight: 800; }
  .connection-health ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
  .connection-health li { display: grid; min-height: 61px; grid-template-columns: 36px 1fr auto; align-items: center; color: #1d2a45; font-size: 14px; font-weight: 600; }
  .connection-health li em { display: flex; align-items: center; color: var(--green); font-size: 12px; font-style: normal; font-weight: 600; }
  .connection-health li em::before { width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; content: ""; background: var(--green); }
  .health-icon { display: grid; width: 26px; height: 26px; place-items: center; color: #1b2944; }
  .health-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
  .status-action { width: 100%; min-height: 44px; background: transparent; text-align: left; cursor: pointer; transition: background-color var(--motion-fast), color var(--motion-fast); }
  .status-action:hover { background: var(--surface-selected); color: var(--blue); }
  .status-action:focus-visible { position: relative; z-index: 1; outline: 3px solid var(--focus); outline-offset: -3px; }
}

@layer components {
  [hidden] { display: none !important; }

  .route-page {
    position: absolute;
    inset: 0 0 0 var(--sidebar-w);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 32px clamp(32px, 3.4vw, 56px) 64px;
    background: var(--page);
    scrollbar-color: var(--line-strong) transparent;
    scrollbar-width: thin;
  }
  .route-page::-webkit-scrollbar { width: 10px; }
  .route-page::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 999px; background: var(--line-strong); background-clip: padding-box; }
  .route-heading {
    display: flex;
    min-height: 76px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 36px;
  }
  .route-heading > div { max-width: 850px; }
  .route-heading h1 {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: clamp(30px, 2.7vw, 42px);
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: 1.08;
    text-wrap: balance;
  }
  .page-heading h1:focus, .route-heading h1:focus, .setup-step h2:focus { outline: none; }
  .page-heading h1:focus-visible, .route-heading h1:focus-visible, .setup-step h2:focus-visible, .route-error h1:focus-visible { outline: 3px solid var(--focus); outline-offset: 6px; }
  .route-heading p { max-width: 72ch; margin: 9px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
  .route-primary, .secondary-action {
    display: inline-flex;
    min-height: 46px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: var(--radius-control);
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
  }
  .route-primary { background: var(--action-blue); color: #fff; }
  .route-primary:disabled { background: #d7deea; color: #69758c; cursor: not-allowed; }
  .mobile-dirty-action:disabled { display: none; }
  .secondary-action { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }
  .secondary-action:disabled { background: var(--surface-subtle); color: var(--muted-quiet); cursor: not-allowed; }
  .phone-link svg { width: 19px; height: 19px; margin-right: 9px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
  .detail-call-action { display: grid; width: min(230px, 100%); flex: 0 0 auto; gap: 6px; text-align: center; }
  .detail-call-action small { color: var(--muted); font-size: 12px; font-weight: 650; line-height: 1.4; }
  .back-link { display: block; min-height: 44px; margin: -5px 0 5px; padding: 0; background: transparent; color: var(--link-blue); font-size: 13px; font-weight: 700; }
  .route-status {
    display: flex;
    min-height: 58px;
    align-items: center;
    gap: 0;
    margin: 23px 0 20px;
    border-top: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 600;
  }
  .route-status > span { padding: 0 28px; border-left: 1px solid var(--line); }
  .route-status > span:first-child { padding-left: 0; border-left: 0; }
  .mode-chip { display: inline-flex; align-items: center; color: var(--ink); font-weight: 800; }
  .mode-chip i, .health-state i { width: 7px; height: 7px; flex: 0 0 auto; margin-right: 9px; border-radius: 50%; background: var(--green); }
  .mode-chip.is-hot i { background: var(--blue); }
  .route-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(265px, 310px); gap: 20px; align-items: start; }
  .work-surface, .context-rail {
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-panel);
    background: var(--surface);
    box-shadow: var(--shadow-panel);
  }
  .work-surface { min-width: 0; }
  .context-rail { padding: 25px; }
  .context-rail > h2 { margin: 15px 0 12px; color: var(--ink); font-size: 20px; font-weight: 800; letter-spacing: -.025em; line-height: 1.25; }
  .context-rail > h2:first-child { margin-top: 0; }
  .context-rail > p:not(.section-label):not(.context-note) { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
  .context-note { margin: 25px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.55; }
  .surface-heading { display: flex; min-height: 84px; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
  .surface-heading h2 { margin: 0; color: var(--ink); font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
  .surface-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
  .segmented-control { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-subtle); }
  .segmented-control button { min-height: 44px; padding: 0 12px; border-radius: 5px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
  .segmented-control button.is-selected { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(19, 35, 63, .12); }
  .queue-head, .queue-row { display: grid; grid-template-columns: 1.35fr 1.05fr 1.05fr 1.3fr 20px; column-gap: 16px; align-items: center; }
  .queue-head { min-height: 36px; padding: 0 22px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 700; }
  .queue-row { min-height: 82px; padding: 12px 22px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
  .queue-row:last-of-type { border-bottom: 0; }
  .queue-more { display: flex; justify-content: center; padding: 18px 22px; border-top: 1px solid var(--line); }
  .queue-more button { min-width: 180px; }
  .queue-row.is-priority { background: color-mix(in srgb, var(--blue) 4%, var(--surface)); }
  .queue-row > span, .queue-person > span { min-width: 0; }
  .queue-row strong, .queue-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .queue-row strong { font-size: 13px; font-weight: 750; }
  .queue-row small { margin-top: 4px; color: var(--muted); font-size: 12px; }
  .queue-person { display: flex; align-items: center; }
  .queue-person > b { display: grid; width: 40px; height: 40px; flex: 0 0 auto; margin-right: 11px; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--blue-strong); font-size: 13px; }
  .queue-row > svg { width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
  .next-action { position: relative; padding-left: 18px; }
  .next-action > i { position: absolute; top: 5px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
  .next-action.is-clear > i { background: var(--green); }
  .state-panel { padding: 42px 24px; text-align: center; }
  .state-panel h3 { margin: 0; font-size: 18px; }
  .state-panel p { margin: 7px auto 16px; color: var(--muted); }
  .state-panel button { min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-control); background: var(--surface); font-weight: 700; }
  .quiet-metrics { margin: 21px 0 0; }
  .quiet-metrics div { display: flex; min-height: 52px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
  .quiet-metrics dt { color: var(--ink-soft); font-size: 12px; font-weight: 600; }
  .quiet-metrics dd { margin: 0; color: var(--ink); font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }

  .detail-summary { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 40px; padding: 26px; border-bottom: 1px solid var(--line); }
  .detail-summary h2 { margin: 12px 0 8px; font-size: 24px; letter-spacing: -.03em; }
  .detail-summary > div > h2:first-child { margin-top: 0; }
  .detail-summary p:not(.section-label) { max-width: 62ch; margin: 0; color: var(--ink-soft); line-height: 1.65; }
  .detail-summary dl { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 0; }
  .detail-summary dt { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
  .detail-summary dd { margin: 4px 0 0; color: var(--ink); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .activity-timeline .surface-heading { min-height: 80px; }
  .activity-timeline ol { margin: 0; padding: 4px 26px 24px; list-style: none; }
  .activity-timeline li { position: relative; display: grid; grid-template-columns: 100px 20px minmax(0, 1fr); gap: 14px; min-height: 95px; padding: 20px 0; }
  .activity-timeline time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
  .activity-timeline li > span { position: relative; z-index: 1; width: 13px; height: 13px; border: 3px solid var(--surface); border-radius: 50%; background: var(--green); box-shadow: 0 0 0 1px var(--green); }
  .activity-timeline li.is-current > span { background: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
  .activity-timeline li:not(:last-child)::after { position: absolute; top: 34px; bottom: -20px; left: 120px; width: 1px; content: ""; background: var(--line); }
  .activity-timeline strong { font-size: 14px; }
  .activity-timeline p { max-width: 72ch; margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
  .proof-list { display: grid; gap: 13px; margin: 24px 0; padding: 0; list-style: none; }
  .proof-list li { display: flex; color: var(--ink-soft); font-size: 13px; font-weight: 650; }
  .proof-list svg { width: 17px; height: 17px; margin-right: 10px; fill: none; stroke: var(--green); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5; }
  .detail-rail .secondary-action { width: 100%; min-height: 54px; padding: 10px 14px; font-size: 12px; line-height: 1.35; }
  .lead-control-section { border-bottom: 1px solid var(--line); }
  .lead-controls > summary { display: flex; min-height: 76px; cursor: pointer; list-style: none; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 26px; }
  .lead-controls > summary::-webkit-details-marker { display: none; }
  .lead-controls > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
  .lead-controls > summary > span:first-child strong, .lead-controls > summary > span:first-child small { display: block; }
  .lead-controls > summary > span:first-child strong { color: var(--ink); font-size: 14px; }
  .lead-controls > summary > span:first-child small { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }
  .lead-control-state { display: inline-flex; min-height: 34px; flex: 0 0 auto; align-items: center; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink-soft); font-size: 11px; font-weight: 800; }
  .lead-control-state i { width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--amber); }
  .lead-control-state.is-active i { background: var(--green); }
  .lead-controls-body { padding: 4px 26px 22px; border-top: 1px solid var(--line); background: var(--surface-subtle); }
  .lead-control-row, .lead-outcome-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(210px, auto); gap: 22px; align-items: center; padding: 20px 0; }
  .lead-control-row { border-bottom: 1px solid var(--line); }
  .lead-control-row h3, .lead-outcome-row label { margin: 0; color: var(--ink); font-size: 13px; font-weight: 800; }
  .lead-outcome-row label span { margin-left: 6px; color: var(--muted); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
  .lead-control-row p, .lead-outcome-row p { max-width: 64ch; margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
  .lead-control-row .secondary-action { min-width: 210px; min-height: 46px; }
  .lead-control-locked { color: var(--muted); font-size: 11px; font-weight: 800; text-align: right; }
  .lead-outcome-actions { display: grid; min-width: 260px; grid-template-columns: minmax(150px, 1fr) auto; gap: 8px; }
  .lead-outcome-actions select { min-height: 46px; padding: 0 38px 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; }
  .lead-outcome-actions select:focus-visible { border-color: var(--focus); outline: 3px solid var(--focus); outline-offset: 2px; }
  .lead-outcome-actions .secondary-action { min-height: 46px; padding-inline: 14px; white-space: nowrap; }
  .lead-controls-body > .inline-status { margin-top: 0; }

  .connection-ledger { overflow: hidden; }
  .connection-row { display: grid; min-height: 72px; grid-template-columns: 42px minmax(220px, 1fr) 90px 118px 92px; gap: 13px; align-items: center; padding: 10px 22px; border-bottom: 1px solid var(--line); }
  .connection-row > span:nth-child(2) strong, .connection-row > span:nth-child(2) small { display: block; }
  .connection-row > span:nth-child(2) strong { font-size: 13px; }
  .connection-row > span:nth-child(2) small { margin-top: 4px; color: var(--muted); font-size: 12px; }
  .connection-mark { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-subtle); font-weight: 900; }
  .connection-mark svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
  .connection-mark img { display: block; width: 21px; height: 21px; object-fit: contain; }
  .google-mark { color: #4285f4; }.yelp-mark { color: #e92828; }.thumbtack-mark { color: #0879f9; }
  .health-state { display: flex; align-items: center; color: var(--green); font-size: 12px; font-weight: 700; }
  .rollout-state { color: var(--ink); font-size: 12px; font-weight: 700; }
  .rollout-state.is-paused { color: var(--muted); }
  .connection-row > button { min-height: 44px; padding: 0; background: transparent; color: var(--link-blue); font-size: 12px; font-weight: 700; text-align: right; }
  .data-request-row { grid-template-columns: 42px minmax(180px, 1fr) 100px minmax(150px, .8fr) minmax(120px, auto); }
  .data-request-actions { display: flex; justify-content: flex-end; gap: 8px; }
  .data-request-actions button { min-width: 56px; min-height: 44px; padding: 0 8px; border-radius: 6px; background: transparent; color: var(--link-blue); font-size: 12px; font-weight: 750; }
  .data-request-actions button:hover { background: var(--blue-soft); }
  .secondary-heading { margin-top: 10px; border-top: 1px solid var(--line-strong); }
  .readiness-list { display: grid; gap: 12px; margin: 23px 0; padding: 0; list-style: none; counter-reset: readiness; }
  .readiness-list li { position: relative; min-height: 24px; padding-left: 30px; color: var(--ink-soft); font-size: 12px; font-weight: 650; }
  .readiness-list li::before { position: absolute; top: -2px; left: 0; display: grid; width: 20px; height: 20px; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; content: ""; }
  .readiness-list li.is-done::before { border-color: var(--green); background: var(--green); }
  .readiness-list li.is-done::after { position: absolute; top: 3px; left: 7px; width: 7px; height: 4px; border-bottom: 2px solid #fff; border-left: 2px solid #fff; content: ""; transform: rotate(-45deg); }

  .behavior-form { overflow: hidden; }
  .setting-block { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: center; margin: 0; padding: 28px 24px; border: 0; border-bottom: 1px solid var(--line); }
  .setting-block:last-child { border-bottom: 0; }
  .setting-block legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .setting-block.stacked { display: block; }
  .setting-copy h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
  .setting-copy p { max-width: 66ch; margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
  .switch-control { display: flex; min-height: 44px; align-items: center; cursor: pointer; }
  .switch-control input { position: absolute; opacity: 0; pointer-events: none; }
  .switch-control > span { position: relative; width: 44px; height: 25px; margin-right: 9px; border-radius: 999px; background: var(--blue); }
  .switch-control > span::after { position: absolute; top: 3px; left: 22px; width: 19px; height: 19px; border-radius: 50%; content: ""; background: #fff; }
  .switch-control input:not(:checked) + span { background: #aeb9ca; }
  .switch-control input:not(:checked) + span::after { left: 3px; }
  .switch-control b { font-size: 12px; }
  .choice-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
  .choice-row:has(input[name="propertyTypes"]) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choice-row label { position: relative; cursor: pointer; }
  .choice-row input { position: absolute; opacity: 0; }
  .choice-row label > span { display: block; min-height: 90px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-subtle); }
  .choice-row input:checked + span { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 1px var(--blue); }
  .choice-row strong, .choice-row small { display: block; }
  .choice-row strong { font-size: 13px; }
  .choice-row small { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.45; }
  .switch-control input:focus-visible + span, .choice-row input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
  .time-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .time-fields label, .settings-form label, .setup-form-grid label, .help-panel label { color: var(--ink-soft); font-size: 12px; font-weight: 700; }
  .time-fields input, .settings-form input, .settings-form select, .setup-form-grid input, .setup-form-grid select, .setup-form-grid textarea, .help-panel textarea {
    display: block;
    width: 100%;
    min-height: 44px;
    margin-top: 7px;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    outline: none;
    background: var(--surface);
    color: var(--ink);
    font-size: 14px;
  }
  .setup-form-grid textarea { min-height: 96px; padding-block: 12px; resize: vertical; line-height: 1.5; }
  .time-fields input:focus-visible, .settings-form input:focus-visible, .settings-form select:focus-visible, .setup-form-grid input:focus-visible, .setup-form-grid select:focus-visible, .setup-form-grid textarea:focus-visible, .help-panel textarea:focus-visible {
    border-color: var(--focus);
    outline: 3px solid var(--focus);
    outline-offset: 2px;
  }
  .behavior-preview > p { margin-top: 0; }
  .stop-proof, .effect-note { display: flex; align-items: flex-start; margin-top: 24px; padding: 16px; border: 1px solid color-mix(in srgb, var(--green) 32%, var(--line)); border-radius: 8px; background: var(--green-soft); }
  .stop-proof svg, .effect-note > svg { width: 19px; height: 19px; flex: 0 0 auto; margin-right: 11px; fill: none; stroke: var(--green); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.3; }
  .stop-proof strong, .stop-proof small, .effect-note strong, .effect-note small { display: block; }
  .stop-proof strong, .effect-note strong { font-size: 12px; }
  .stop-proof small, .effect-note small { margin-top: 4px; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }

  .settings-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 20px; align-items: start; }
  .settings-mobile-select { display: none; }
  .settings-nav { display: grid; padding: 7px; border: 1px solid var(--line-strong); border-radius: var(--radius-panel); background: var(--surface); }
  .settings-nav button { min-height: 44px; padding: 0 12px; border-radius: 6px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 650; text-align: left; }
  .settings-nav button.is-selected { background: var(--blue-soft); color: var(--blue-strong); }
  .settings-form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 25px; }
  .notification-fieldset { display: contents; min-width: 0; margin: 0; padding: 0; border: 0; }
  .notification-options { display: grid; gap: 10px; }
  .settings-form .notification-option {
    display: grid;
    min-height: 72px;
    grid-template-columns: 22px 1fr;
    gap: 13px;
    align-items: center;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface-subtle);
    cursor: pointer;
  }
  .settings-form .notification-option input {
    width: 20px;
    min-height: 20px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 4px;
    accent-color: var(--blue);
    box-shadow: none;
  }
  .notification-option strong, .notification-option small { display: block; }
  .notification-option strong { color: var(--ink); font-size: 14px; }
  .notification-option small { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }
  .notification-save-row { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding-top: 4px; }
  .notification-save-row p { max-width: 520px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
  .notification-save-row .route-primary { flex: 0 0 auto; }
  .full-field { grid-column: 1 / -1; }
  .preview-only-badge {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    padding: 0 12px;
    border: 1px solid color-mix(in srgb, var(--green) 42%, var(--line));
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
  .ai-preview-grid {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(340px, 1.05fr);
    gap: 24px;
    padding: 25px;
  }
  .ai-preview-setup { display: grid; gap: 18px; }
  .ai-preview-website-form, .ai-preview-conversation-form {
    display: grid;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-subtle);
  }
  .ai-preview-website-form label, .ai-preview-conversation-form label {
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 750;
  }
  .ai-preview-website-form input, .ai-preview-conversation-form textarea {
    display: block;
    width: 100%;
    min-height: 48px;
    margin-top: 7px;
    padding: 0 13px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-control);
    outline: none;
    background: var(--surface);
    color: var(--ink);
    font-size: 14px;
  }
  .ai-preview-conversation-form textarea { min-height: 112px; padding-block: 12px; resize: vertical; line-height: 1.55; }
  .ai-preview-website-form input:focus-visible, .ai-preview-conversation-form textarea:focus-visible {
    border-color: var(--focus);
    outline: 3px solid var(--focus);
    outline-offset: 2px;
  }
  .ai-preview-website-form > button, .ai-preview-conversation-form > button { width: 100%; min-height: 48px; }
  .ai-preview-examples { display: grid; gap: 8px; }
  .ai-preview-examples button {
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
    text-align: left;
  }
  .ai-preview-examples button:hover:not(:disabled) { border-color: var(--blue); color: var(--blue-strong); }
  .ai-preview-result {
    display: flex;
    min-height: 520px;
    flex-direction: column;
    gap: 14px;
    padding: 22px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface-subtle) 82%, var(--blue-soft));
  }
  .ai-preview-result-heading { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  .ai-preview-result-heading > span { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 10px; background: var(--blue); color: #fff; }
  .ai-preview-result-heading svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linejoin: round; stroke-width: 2; }
  .ai-preview-result-heading strong, .ai-preview-result-heading small { display: block; }
  .ai-preview-result-heading strong { font-size: 14px; }
  .ai-preview-result-heading small { margin-top: 3px; color: var(--muted); font-size: 11px; }
  .preview-message { max-width: 86%; padding: 13px 15px; border-radius: 12px; box-shadow: 0 6px 18px rgba(8, 24, 48, .06); }
  .preview-message small { display: block; margin-bottom: 5px; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
  .preview-message p { margin: 0; font-size: 14px; line-height: 1.55; }
  .preview-message.is-customer { align-self: flex-end; border-bottom-right-radius: 3px; background: var(--blue); color: #fff; }
  .preview-message.is-customer small { color: #fff; }
  .preview-message.is-lead-dominator { align-self: flex-start; border: 1px solid var(--line); border-bottom-left-radius: 3px; background: var(--surface); color: var(--ink); }
  .preview-message.is-lead-dominator small { color: var(--blue-strong); }
  .preview-not-sent { display: flex; min-height: 42px; align-items: center; justify-content: center; gap: 8px; margin-top: auto; border: 1px solid color-mix(in srgb, var(--green) 38%, var(--line)); border-radius: 8px; background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 800; }
  .preview-not-sent svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
  .ai-preview-empty { display: grid; min-height: 330px; place-items: center; align-content: center; padding: 32px; color: var(--muted); text-align: center; }
  .ai-preview-empty svg { width: 44px; height: 44px; margin-bottom: 16px; fill: none; stroke: var(--blue); stroke-width: 1.7; }
  .ai-preview-empty h3 { margin: 0; color: var(--ink); font-size: 18px; }
  .ai-preview-empty p { max-width: 400px; margin: 9px 0 0; font-size: 13px; line-height: 1.6; }
  .theme-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 26px; }
  .theme-choices button { display: grid; min-height: 170px; align-content: start; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); text-align: left; }
  .theme-choices button[aria-pressed="true"] { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
  .theme-choices strong, .theme-choices small { display: block; }
  .theme-choices strong { margin-top: 12px; font-size: 14px; }
  .theme-choices small { margin-top: 5px; color: var(--muted); font-size: 12px; }
  .theme-swatch { display: block; height: 82px; border: 1px solid var(--line); border-radius: 6px; }
  .theme-swatch.is-light { background: linear-gradient(90deg, #09172d 0 24%, #f7f8f8 24%); }
  .theme-swatch.is-dark { border-color: #343434; background: linear-gradient(90deg, #000 0 24%, #0a0a0a 24%); }
  .theme-swatch.is-system { background: linear-gradient(90deg, #09172d 0 18%, #f7f8f8 18% 58%, #000 58% 73%, #0a0a0a 73%); }

  .onboarding-page { padding-bottom: 24px; }
  .onboarding-heading { width: min(100%, 1440px); margin-inline: auto; align-items: center; }
  .setup-time { flex: 0 0 auto; color: var(--muted); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .onboarding-shell {
    display: grid;
    width: min(100%, 1440px);
    min-height: clamp(612px, calc(100vh - 230px), 680px);
    min-height: clamp(612px, calc(100dvh - 230px), 680px);
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 20px;
    margin: 20px auto 0;
  }
  @media (min-width: 821px) {
    .onboarding-shell:not(.is-provider-entry) { height: clamp(520px, calc(100dvh - 198px), 680px); min-height: 0; }
    .onboarding-shell:not(.is-provider-entry) .setup-workspace { min-height: 0; overflow: hidden; }
    .onboarding-shell:not(.is-provider-entry) .setup-step { overflow-y: auto; overscroll-behavior: contain; scrollbar-color: var(--line-strong) transparent; scrollbar-gutter: stable; scrollbar-width: thin; }
    .onboarding-shell:not(.is-provider-entry) .setup-step::-webkit-scrollbar { width: 8px; }
    .onboarding-shell:not(.is-provider-entry) .setup-step::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: var(--line-strong); background-clip: padding-box; }
  }
  .setup-progress { padding: 14px 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-panel); background: var(--surface); }
  .setup-progress ol { margin: 0; padding: 0; list-style: none; }
  .setup-progress li { position: relative; }
  .setup-progress li:not(:last-child)::after { position: absolute; top: 43px; bottom: -11px; left: 27px; width: 1px; content: ""; background: var(--line); }
  .setup-progress button { display: grid; width: 100%; min-height: 64px; grid-template-columns: 38px 1fr; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 7px; background: transparent; text-align: left; }
  .setup-progress li.is-current button { background: var(--blue-soft); }
  .setup-progress b { position: relative; z-index: 1; display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); color: var(--muted); font-size: 12px; }
  .setup-progress b svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.6; }
  .setup-progress li.is-current b { border-color: var(--action-blue); background: var(--action-blue); color: #fff; }
  .setup-progress li.is-complete b { border-color: var(--green); background: var(--green); color: #fff; }
  .setup-progress span, .setup-progress small { display: block; }
  .setup-progress span { color: var(--ink); font-size: 12px; font-weight: 750; }
  .setup-progress small { margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.3; }
  .setup-workspace { position: relative; display: flex; min-height: 0; flex-direction: column; border: 1px solid var(--line-strong); border-radius: var(--radius-panel); background: var(--surface); box-shadow: var(--shadow-panel); }
  .setup-step { display: grid; flex: 1; grid-template-columns: minmax(0, 880px); align-content: start; justify-content: center; padding: 30px 32px; }
  .setup-step > * { min-width: 0; grid-column: 1; }
  .setup-step > button { width: auto; justify-self: start; }
  .step-count { margin: 0 0 7px; color: var(--blue); font-size: 12px; font-weight: 800; text-transform: uppercase; }
  .setup-step > h2 { margin: 0; color: var(--ink); font-size: 28px; letter-spacing: -.035em; }
  .setup-step > h2 + p { max-width: 70ch; margin: 9px 0 27px; color: var(--muted); font-size: 14px; line-height: 1.6; }
  .setup-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: none; }
  .setup-form-grid input, .setup-form-grid select { min-height: 48px; }
  .field-help { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.45; }
  .setup-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 26px 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .setup-section-heading span { color: var(--ink); font-size: 15px; font-weight: 800; }
  .setup-section-heading small { color: var(--muted); font-size: 11px; line-height: 1.45; text-align: right; }
  .business-logo-card { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; grid-template-areas: "preview copy actions" "status status status"; gap: 14px 18px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-subtle); }
  .business-logo-preview { position: relative; display: grid; width: 72px; height: 72px; grid-area: preview; place-items: center; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); color: var(--blue-strong); font-size: 20px; font-weight: 850; }
  .business-logo-preview img { position: absolute; inset: 0; width: 100%; height: 100%; background: var(--surface); object-fit: cover; }
  .business-logo-copy { grid-area: copy; }
  .business-logo-copy strong, .business-logo-copy p, .business-logo-copy small { display: block; }
  .business-logo-copy strong { color: var(--ink); font-size: 14px; }
  .business-logo-copy p { margin: 5px 0 3px; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
  .business-logo-copy small { color: var(--muted); font-size: 11px; }
  .business-logo-actions { display: flex; grid-area: actions; align-items: center; gap: 10px; }
  .logo-file-action { min-height: 44px; cursor: pointer; }
  .business-logo-card > .inline-status { grid-area: status; margin: 0; }
  .assigned-number-card { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 14px; align-items: start; margin-top: 16px; padding: 18px; border: 1px solid color-mix(in srgb, var(--blue) 35%, var(--line)); border-radius: 9px; background: var(--blue-soft); }
  .assigned-number-card > svg { width: 22px; height: 22px; margin-top: 3px; fill: none; stroke: var(--blue); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.2; }
  .assigned-number-card strong, .assigned-number-card a { display: block; }
  .assigned-number-card strong { color: var(--ink); font-size: 14px; }
  .assigned-number-card a { display: inline-flex; width: fit-content; min-height: 44px; align-items: center; margin-top: 1px; color: var(--blue-strong); font-size: 18px; font-weight: 850; text-decoration: none; }
  .assigned-number-card p:not(.step-count) { max-width: 70ch; margin: 7px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
  .assigned-number-card > span { padding: 6px 9px; border: 1px solid color-mix(in srgb, var(--blue) 35%, var(--line)); border-radius: 999px; background: var(--surface); color: var(--blue-strong); font-size: 10px; font-weight: 800; white-space: nowrap; }
  .assigned-number-card.is-pending { border-color: var(--line); background: var(--surface-subtle); }
  .conversation-guidance { display: grid; gap: 20px; }
  .guidance-heading { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
  .guidance-heading h3 { margin: 0; color: var(--ink); font-size: 21px; letter-spacing: -.025em; }
  .guidance-heading > p:last-child { max-width: 72ch; margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
  .guidance-objectives { margin-top: 12px; }
  .guidance-question-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 12px; }
  .guidance-question-grid label { position: relative; display: flex; min-height: 44px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-subtle); color: var(--ink-soft); font-size: 12px; font-weight: 700; cursor: pointer; }
  .guidance-question-grid input { width: 17px; height: 17px; margin: 0 9px 0 0; accent-color: var(--blue); }
  .guidance-question-grid label:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); color: var(--ink); }
  .field-intro { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
  .guidance-custom { color: var(--ink-soft); font-size: 12px; font-weight: 750; }
  .guidance-custom textarea { display: block; width: 100%; min-height: 112px; margin-top: 7px; padding: 12px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; line-height: 1.5; resize: vertical; }
  .guidance-custom textarea:focus-visible { border-color: var(--focus); outline: 3px solid var(--focus); outline-offset: 2px; }
  .guidance-custom small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.45; }
  .follow-up-guidance { margin-top: 30px; padding-top: 4px; border-top: 1px solid var(--line); }
  .setup-choices { max-width: 820px; margin-bottom: 28px; }
  .source-inventory { max-width: 880px; margin: 0; padding: 0; border: 0; }
  .source-inventory > legend { padding: 0; color: var(--ink); font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
  .source-inventory > p { max-width: 68ch; margin: 6px 0 16px; color: var(--muted); font-size: 13px; line-height: 1.55; }
  .source-inventory > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
  .source-inventory label { position: relative; min-width: 0; min-height: 76px; cursor: pointer; }
  .source-inventory input { position: absolute; opacity: 0; pointer-events: none; }
  .source-inventory label > span {
    display: grid;
    min-height: 76px;
    grid-template-columns: 20px minmax(0, 1fr);
    align-content: center;
    column-gap: 11px;
    padding: 13px 14px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
  }
  .source-inventory label > span::before { grid-row: 1 / span 2; width: 18px; height: 18px; margin-top: 1px; border: 1px solid var(--line-strong); border-radius: 4px; content: ""; background: var(--surface-subtle); }
  .source-inventory input[type="radio"] + span::before { border-radius: 50%; }
  .source-inventory input:checked + span { position: relative; z-index: 1; background: var(--blue-soft); box-shadow: inset 3px 0 var(--blue); }
  .source-inventory input:checked + span::before { border-color: var(--blue); background: var(--blue); box-shadow: inset 0 0 0 4px var(--blue-soft); }
  .source-inventory input[type="checkbox"]:checked + span::before { box-shadow: none; background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 10 3 3 7-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px 16px no-repeat; }
  .source-inventory input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: -3px; }
  .source-inventory strong, .source-inventory small { display: block; min-width: 0; }
  .source-inventory strong { color: var(--ink); font-size: 13px; line-height: 1.3; }
  .source-inventory small { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.35; }
  .source-questionnaire .source-inventory > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .source-questionnaire .source-inventory label, .source-questionnaire .source-inventory label > .source-option { min-height: 86px; }
  .source-questionnaire .source-inventory label > .source-option { grid-template-columns: 42px minmax(0, 1fr) 20px; column-gap: 12px; }
  .source-questionnaire .source-inventory label > .source-option::before { grid-column: 3; grid-row: 1 / span 2; }
  .source-option-mark { display: grid; width: 38px; height: 38px; grid-column: 1; grid-row: 1 / span 2; place-items: center; align-self: center; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-subtle); }
  .source-option-mark > svg { width: 21px; height: 21px; fill: none; stroke: var(--ink-soft); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
  .source-option-mark .provider-logo { width: 25px; height: 25px; }
  .source-option-mark .provider-logo-wide { width: 31px; }
  .source-option-mark .provider-logo-pair { width: 34px; }
  .source-option-mark .provider-logo-pair img { width: 20px; height: 20px; }
  .source-questionnaire .source-inventory .source-option-label--network { grid-column: 1 / -1; }
  .source-questionnaire .source-inventory label > .source-option.source-option--network { grid-template-columns: 116px minmax(0, 1fr) 20px; }
  .source-option-mark.source-option--network { width: 112px; }
  .source-option-copy { min-width: 0; grid-column: 2; align-self: center; }
  .source-questionnaire .source-inventory strong { font-size: 14px; }
  .source-questionnaire .source-inventory small { font-size: 12px; }
  .inventory-summary { display: flex; max-width: 880px; align-items: flex-start; gap: 12px; margin-top: 22px; padding: 16px 18px; border-left: 3px solid var(--blue); background: var(--blue-soft); }
  .inventory-summary > svg { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: var(--blue); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
  .inventory-summary strong, .inventory-summary small { display: block; }
  .inventory-summary strong { color: var(--ink); font-size: 14px; }
  .inventory-summary small { margin-top: 3px; color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
  .owned-intake-boundary { display: flex; max-width: 880px; align-items: flex-start; gap: 12px; margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line); background: var(--surface-subtle); }
  .owned-intake-boundary > svg { width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: var(--ink-soft); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
  .owned-intake-boundary strong, .owned-intake-boundary small { display: block; }
  .owned-intake-boundary strong { color: var(--ink); font-size: 13px; }
  .owned-intake-boundary small { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.5; }
  .connection-plan-heading { display: flex; max-width: 960px; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line-strong); }
  .connection-plan-heading strong, .connection-plan-heading span { display: block; }
  .connection-plan-heading strong { color: var(--ink); font-size: 16px; }
  .connection-plan-heading span { margin-top: 3px; color: var(--muted); font-size: 12px; }
  .source-connection-list { display: grid; max-width: 960px; border-top: 1px solid var(--line); }
  .source-connection-row { display: grid; min-width: 0; min-height: 104px; grid-template-columns: 48px minmax(180px, 1fr) auto auto; grid-template-areas: "mark copy state actions" "mark launch state actions"; gap: 6px 14px; align-items: center; padding: 16px 4px; border-bottom: 1px solid var(--line); }
  .source-connection-mark { display: grid; width: 44px; height: 44px; grid-area: mark; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-subtle); }
  .source-connection-mark > svg { width: 22px; height: 22px; fill: none; stroke: var(--ink-soft); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
  .source-connection-mark .provider-logo { width: 27px; height: 27px; }
  .source-connection-mark .provider-logo-wide { width: 34px; }
  .source-connection-copy { display: flex; min-width: 0; grid-area: copy; align-items: center; gap: 10px; }
  .source-connection-copy strong, .source-connection-copy small { display: block; min-width: 0; }
  .source-connection-copy strong { color: var(--ink); font-size: 14px; }
  .source-connection-copy small { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.4; }
  .connection-truth { display: inline-flex; min-height: 26px; flex: 0 0 auto; align-items: center; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-subtle); color: var(--ink-soft); font-size: 12px; font-weight: 800; }
  .source-connection-state { display: inline-flex; min-height: 32px; grid-area: state; align-items: center; gap: 7px; padding: 0 10px; color: var(--ink-soft); font-size: 12px; font-weight: 750; white-space: nowrap; }
  .source-connection-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
  .source-connection-state.is-ready i { background: var(--green); }
  .source-connection-state.is-progress i { background: var(--blue); }
  .source-connection-state.is-warning i { background: var(--danger); }
  .launch-choice { display: inline-flex; width: fit-content; min-height: 44px; grid-area: launch; align-items: center; gap: 8px; cursor: pointer; }
  .launch-choice input { width: 17px; height: 17px; margin: 0; accent-color: var(--blue); }
  .launch-choice span { color: var(--muted); font-size: 12px; font-weight: 700; }
  .launch-choice:has(input:checked) span { color: var(--blue); }
  .launch-choice input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
  .launch-choice.is-configuration-only { color: var(--muted); cursor: default; font-size: 12px; font-weight: 800; letter-spacing: .01em; }
  .source-connection-actions { display: flex; min-width: 174px; grid-area: actions; flex-direction: column; align-items: stretch; gap: 5px; }
  .source-connection-actions .route-primary, .source-connection-actions .secondary-action { width: 100%; min-height: 44px; }
  .source-connection-actions .text-action { min-height: 44px; }
  .provider-entry-heading { max-width: 860px; }
  .onboarding-shell.is-provider-entry { display: block; max-width: 860px; min-height: 0; }
  .is-provider-entry .setup-workspace { min-height: 0; }
  .provider-entry-step { padding: 32px 34px; }
  .is-provider-entry:not(.has-provider-footer) .provider-entry-step { padding-bottom: 32px; }
  .provider-entry-lede { max-width: 66ch; margin: 0 0 22px; color: var(--muted); font-size: 14px; line-height: 1.6; }
  .provider-entry-surface { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface); }
  .provider-entry-list { display: grid; }
  .provider-entry-row {
    display: grid;
    min-width: 0;
    min-height: 92px;
    grid-template-columns: 48px minmax(0, 1fr) auto minmax(156px, auto);
    grid-template-areas: "mark copy state actions";
    gap: 14px;
    align-items: center;
    padding: 15px 18px;
    border-top: 1px solid var(--line);
  }
  .provider-entry-row:first-child { border-top: 0; }
  .provider-entry-row.is-connectable { background: color-mix(in srgb, var(--blue) 4%, var(--surface)); }
  .provider-entry-row.is-unavailable { grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: "mark copy state"; }
  .provider-entry-row .source-connection-mark { grid-area: mark; }
  .provider-entry-row .source-connection-copy { display: grid; grid-area: copy; gap: 3px; }
  .provider-entry-row .source-connection-state { grid-area: state; }
  .provider-entry-row .source-connection-actions { grid-area: actions; }
  .provider-entry-row:has(.provider-logo-pair) { grid-template-columns: 72px minmax(0, 1fr) auto; }
  .provider-entry-row .source-connection-mark:has(.provider-logo-pair) { width: 68px; }
  .provider-entry-row .provider-logo-pair { display: grid; width: 60px; height: 34px; place-items: center; gap: 1px; }
  .provider-entry-row .provider-logo-pair img { width: 31px; height: 17px; object-fit: contain; }
  .provider-entry-row .provider-logo-pair img + img { width: 58px; height: 11px; margin: 0; border: 0; border-radius: 0; background: transparent; }
  .source-connection-state.is-muted i { background: var(--muted); }
  .missing-facts { display: grid; gap: 18px; margin-bottom: 22px; padding: 20px; border: 1px solid var(--amber); border-radius: 9px; background: color-mix(in srgb, var(--amber) 8%, var(--surface)); }
  .missing-facts h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
  .missing-facts h2 + p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
  .missing-facts .setup-form-grid { grid-template-columns: 1fr; max-width: none; }
  .missing-facts .route-primary { width: fit-content; min-height: 48px; }
  .next-outcomes { margin-top: 18px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-subtle); }
  .next-outcomes summary { display: flex; min-height: 52px; align-items: center; justify-content: space-between; padding: 0 16px; color: var(--ink); font-size: 14px; font-weight: 800; cursor: pointer; }
  .next-outcomes summary::after { color: var(--blue); content: "+"; font-size: 21px; line-height: 1; }
  .next-outcomes[open] summary::after { content: "−"; }
  .next-outcomes ul { display: grid; gap: 10px; margin: 0; padding: 0 18px 18px 38px; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
  .provider-entry-help { margin-top: 12px; }
  .provider-entry-actions { grid-template-columns: 1fr auto; }
  .provider-entry-actions .save-state { justify-self: start; }
  .connection-ready { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 7px; color: var(--green); font-size: 12px; font-weight: 800; }
  .connection-ready svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.4; }
  .source-phone-note { max-width: 960px; margin-top: 22px; }
  .source-plan { max-width: 880px; margin-top: 30px; padding: 24px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-subtle); }
  .source-plan-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
  .source-plan-heading .step-count { margin-bottom: 4px; }
  .source-plan-heading h3 { margin: 0; color: var(--ink); font-size: 20px; letter-spacing: -.025em; }
  .source-plan-heading > span { display: inline-flex; min-height: 32px; flex: 0 0 auto; align-items: center; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink-soft); font-size: 12px; font-weight: 800; }
  .source-plan > p { max-width: 72ch; margin: 9px 0 18px; color: var(--muted); font-size: 13px; line-height: 1.55; }
  .source-plan .provider-choice { max-width: none; background: var(--surface); }
  .source-plan .provider-button { padding-inline: 12px; }
  .source-plan > .secondary-action { margin-top: 18px; }
  .source-route-summary { display: flex; align-items: flex-start; gap: 11px; margin-top: 16px; padding: 14px 15px; border-left: 3px solid var(--blue); background: var(--blue-soft); }
  .source-route-summary > svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: var(--blue); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
  .source-route-summary strong, .source-route-summary small { display: block; }
  .source-route-summary strong { color: var(--ink); font-size: 12px; }
  .source-route-summary small { margin-top: 4px; color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
  .source-plan .effect-note { max-width: none; margin-top: 16px; }
  .crm-plan .setup-form-grid { max-width: none; margin-top: 18px; }
  .source-questionnaire [hidden], .crm-questionnaire [hidden] { display: none !important; }
  .communication-step > [data-onboarding-form] { max-width: 820px; }
  .messaging-transport { max-width: 840px; margin: 24px 0 30px; padding: 20px; border: 1px solid var(--line-strong); background: var(--surface-subtle); }
  .messaging-transport h3 { margin: 3px 0 7px; font-family: var(--font-display); font-size: 20px; letter-spacing: -.025em; }
  .messaging-transport > div:first-child > p:last-child { max-width: 70ch; margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
  .messaging-transport .effect-note { max-width: none; margin-top: 16px; }
  .messaging-transport > .secondary-action { margin-top: 14px; }
  .compliance-packet { max-width: 840px; margin-top: 42px; padding-top: 34px; border-top: 1px solid var(--line-strong); }
  .compliance-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
  .compliance-heading h3 { margin: 0; color: var(--ink); font-size: 22px; letter-spacing: -.025em; }
  .compliance-heading h3 + p { max-width: 68ch; margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
  .compliance-state { display: inline-flex; min-height: 34px; flex: 0 0 auto; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface-subtle); color: var(--ink-soft); font-size: 12px; font-weight: 800; white-space: nowrap; }
  .compliance-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
  .compliance-state.is-ready_for_submission i, .compliance-state.is-submitted i, .compliance-state.is-in_review i { background: var(--blue); }
  .compliance-state.is-approved i { background: var(--green); }
  .compliance-state.is-rejected i, .compliance-state.is-suspended i { background: var(--danger); }
  .compliance-packet > .effect-note { max-width: none; margin: 20px 0 0; }
  .compliance-packet form { margin-top: 24px; border-top: 1px solid var(--line-strong); }
  .compliance-section { border-bottom: 1px solid var(--line-strong); }
  .compliance-section summary { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; list-style: none; }
  .compliance-section summary::-webkit-details-marker { display: none; }
  .compliance-section summary strong, .compliance-section summary small { display: block; }
  .compliance-section summary strong { color: var(--ink); font-size: 14px; }
  .compliance-section summary small { margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 500; }
  .compliance-section summary > svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: var(--amber); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.4; }
  .compliance-section .setup-form-grid { max-width: none; padding: 4px 0 28px; }
  .field-help { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.45; }
  .compliance-actions { display: flex; min-height: 82px; align-items: center; gap: 10px; }
  .compliance-actions .save-state { margin-left: auto; text-align: right; }
  .provider-choice { display: grid; max-width: 760px; border-top: 1px solid var(--line); }
  .provider-choice button { display: grid; min-height: 78px; grid-template-columns: 44px 1fr 22px; gap: 14px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
  .provider-choice strong, .provider-choice small { display: block; }
  .provider-choice strong { font-size: 14px; }
  .provider-choice small { margin-top: 4px; color: var(--muted); font-size: 12px; }
  .provider-choice > button > svg { width: 20px; height: 20px; fill: none; stroke: var(--green); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.4; }
  .effect-note { max-width: 760px; }
  .effect-note.is-warning { border-color: color-mix(in srgb, var(--amber) 46%, var(--line)); background: color-mix(in srgb, var(--amber) 12%, var(--surface)); }
  .effect-note.is-warning > svg { stroke: #bd8411; }
  .test-brief { display: grid; max-width: 840px; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--line); }
  .test-brief div { min-height: 82px; padding: 16px 18px 16px 0; border-bottom: 1px solid var(--line); }
  .test-brief div:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
  .test-brief dt { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
  .test-brief dd { margin: 6px 0 0; color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.5; }
  .test-total { display: flex; max-width: 840px; min-height: 61px; align-items: center; justify-content: space-between; padding: 0 18px; border: 1px solid var(--green); border-radius: 8px; background: var(--green-soft); color: var(--ink); font-size: 13px; font-weight: 700; }
  .test-total strong { color: var(--green); font-size: 18px; font-variant-numeric: tabular-nums; }
  .test-next-action { display: flex; max-width: 840px; min-height: 88px; align-items: center; justify-content: space-between; gap: 22px; margin: 22px 0 12px; padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-subtle); }
  .test-next-action strong { display: block; font-size: 14px; }
  .test-next-action p { max-width: 60ch; margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
  .test-next-action button { flex: 0 0 auto; }
  .provider-test-proof { max-width: 840px; margin-top: 34px; padding-top: 30px; border-top: 1px solid var(--line-strong); }
  .provider-test-proof h3 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
  .provider-test-proof > h3 + p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
  .provider-test-proof .test-total { margin-top: 18px; }
  .provider-test-empty { min-height: 130px; margin-top: 18px; border: 1px dashed var(--line-strong); border-radius: 8px; }
  .provider-test-empty h3 { font-size: 17px; }
  .provider-test-stages { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; margin: 18px 0 0; padding: 0; list-style: none; }
  .provider-test-stages li { display: grid; min-height: 68px; grid-template-columns: 24px 1fr; gap: 11px; align-items: center; border-bottom: 1px solid var(--line); }
  .provider-test-stages svg { width: 18px; height: 18px; fill: none; stroke: var(--amber); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.2; }
  .provider-test-stages li.is-complete svg { stroke: var(--green); }
  .provider-test-stages strong, .provider-test-stages small { display: block; }
  .provider-test-stages strong { font-size: 12px; }
  .provider-test-stages small { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.4; }
  .provider-test-action { margin-top: 18px; }
  .review-results { max-width: 840px; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
  .review-results > li { display: grid; min-height: 68px; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: start; padding: 15px 0; border-bottom: 1px solid var(--line); }
  .review-results > li > svg { width: 19px; height: 19px; fill: none; stroke: var(--green); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5; }
  .review-results > li > span > strong, .review-results > li > span > small { display: block; }
  .review-results > li > span > strong { font-size: 13px; }.review-results > li > span > small { margin-top: 3px; color: var(--muted); font-size: 12px; }
  .review-results > li > em { margin-top: 1px; color: var(--green); font-size: 12px; font-style: normal; font-weight: 800; }
  .certification-items { display: grid; gap: 5px; margin: 12px 0 0; padding: 0; list-style: none; }
  .certification-items li { display: flex; min-height: 28px; align-items: center; justify-content: space-between; gap: 18px; color: var(--ink-soft); font-size: 12px; }
  .certification-items em { color: var(--danger); font-size: 12px; font-style: normal; font-weight: 750; }
  .certification-items li.is-complete em { color: var(--green); }
  .review-next-action { display: flex; max-width: 840px; align-items: center; justify-content: space-between; gap: 22px; margin-top: 24px; padding: 18px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-subtle); }
  .review-next-action strong { font-size: 14px; }
  .review-next-action p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
  .review-next-action button { flex: 0 0 auto; }
  .activation-summary { display: grid; max-width: 760px; min-height: 92px; grid-template-columns: 48px 1fr auto; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
  .activation-summary strong, .activation-summary small { display: block; }.activation-summary small { margin-top: 4px; color: var(--muted); }
  .setup-actions { position: static; display: grid; min-height: 78px; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; margin-top: auto; padding: 14px 24px; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius-panel) var(--radius-panel); background: var(--surface); }
  .save-state { justify-self: center; color: var(--muted); font-size: 12px; font-weight: 650; }

  .help-panel { position: fixed; inset: 0; z-index: 100; }
  .help-backdrop { position: absolute; inset: 0; background: rgba(4, 12, 24, .46); }
  .help-panel > section { position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%); padding: 28px; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); box-shadow: -18px 0 54px rgba(6, 19, 39, .18); }
  .help-panel header { display: flex; align-items: flex-start; justify-content: space-between; }
  .help-panel h2 { margin: 0; font-size: 26px; letter-spacing: -.035em; }
  .help-panel header button { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; background: var(--surface-subtle); color: var(--ink); }
  .help-panel header button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 2; }
  .help-panel section > p { margin: 18px 0 24px; color: var(--muted); line-height: 1.65; }
  .help-panel textarea { min-height: 120px; padding: 12px; resize: vertical; }
  .help-panel .route-primary { width: 100%; margin-top: 14px; }
  .help-links { display: none; }
  .help-links button { min-height: 42px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 700; }
  .toast { position: fixed; right: 24px; bottom: 24px; z-index: 200; max-width: 380px; padding: 14px 17px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--ink); color: #fff; box-shadow: 0 15px 38px rgba(6, 19, 39, .24); font-size: 13px; font-weight: 650; }
}

@layer components {
  @keyframes bolt-charge {
    0% { transform: translate3d(0, 0, 0) rotate(0) scale(1); filter: drop-shadow(0 0 0 rgba(9, 104, 245, 0)); }
    17% { transform: translate3d(0, 0, 0) rotate(-3deg) scale(.93); filter: drop-shadow(0 0 2px rgba(255, 212, 61, .25)); }
    44% { transform: translate3d(1px, -1px, 0) rotate(2deg) scale(1.14); filter: drop-shadow(0 0 12px rgba(9, 104, 245, .88)) drop-shadow(0 0 5px rgba(255, 212, 61, .68)); }
    70% { transform: translate3d(0, 0, 0) rotate(-.5deg) scale(1.03); filter: drop-shadow(0 0 9px rgba(9, 104, 245, .7)) drop-shadow(0 0 3px rgba(255, 212, 61, .52)); }
    100% { transform: translate3d(0, 0, 0) rotate(0) scale(1); filter: drop-shadow(0 0 8px rgba(9, 104, 245, .58)) drop-shadow(0 0 2px rgba(255, 212, 61, .42)); }
  }
  @keyframes spark-one {
    0%, 20% { opacity: 0; transform: translate3d(3px, 3px, 0) scale(.5); }
    44% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
    78%, 100% { opacity: 0; transform: translate3d(-5px, -4px, 0) scale(1.08); }
  }
  @keyframes spark-two {
    0%, 20% { opacity: 0; transform: translate3d(-3px, 3px, 0) scale(.5); }
    44% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
    78%, 100% { opacity: 0; transform: translate3d(5px, -5px, 0) scale(1.08); }
  }
  @keyframes spark-three {
    0%, 20% { opacity: 0; transform: translate3d(3px, -3px, 0) scale(.5); }
    44% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
    78%, 100% { opacity: 0; transform: translate3d(-5px, 5px, 0) scale(1.08); }
  }
  @keyframes spark-four {
    0%, 20% { opacity: 0; transform: translate3d(-3px, -3px, 0) scale(.5); }
    44% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
    78%, 100% { opacity: 0; transform: translate3d(6px, 5px, 0) scale(1.08); }
  }

  .brand-name { transition: color 160ms ease-out, text-shadow 160ms ease-out; }
  .route-primary, .secondary-action, .primary-action, .nav-control, .text-action, .footer-control, .account-control {
    transition: transform 160ms var(--ease-out), background-color 180ms ease-out, border-color 180ms ease-out, color 180ms ease-out;
  }
  .route-primary:active, .secondary-action:active, .primary-action:active, .nav-control:active, .text-action:active, .footer-control:active, .account-control:active {
    transform: scale(.97);
    transition-duration: 0ms;
  }

  @media (hover: hover) and (pointer: fine) {
    .brand-lockup:hover .brand-bolt svg { animation: bolt-charge 520ms cubic-bezier(.16, 1, .3, 1) both; }
    .brand-lockup:hover .spark-one { animation: spark-one 520ms cubic-bezier(.16, 1, .3, 1) both; }
    .brand-lockup:hover .spark-two { animation: spark-two 520ms cubic-bezier(.16, 1, .3, 1) both; }
    .brand-lockup:hover .spark-three { animation: spark-three 520ms cubic-bezier(.16, 1, .3, 1) both; }
    .brand-lockup:hover .spark-four { animation: spark-four 520ms cubic-bezier(.16, 1, .3, 1) both; }
    .brand-lockup:hover .brand-name { color: #fff; text-shadow: 0 0 12px rgba(9, 104, 245, .5); }
    .nav-control:not(.is-active):hover, .footer-control:hover, .account-control:hover { background: rgba(255, 255, 255, .06); color: #fff; }
    .route-primary:not(:disabled):hover, .primary-action:hover { background: var(--action-blue-hover); }
    .secondary-action:not(:disabled):hover { border-color: var(--blue); color: var(--blue-strong); }
    .queue-row:hover { background: color-mix(in srgb, var(--blue) 6%, var(--surface)); }
  }

  .brand-lockup:focus-visible .brand-bolt svg {
    filter: drop-shadow(0 0 9px rgba(9, 104, 245, .72)) drop-shadow(0 0 3px rgba(255, 212, 61, .48));
  }
  .brand-lockup:active .brand-bolt svg { transform: scale(.96); }

  @media (prefers-reduced-motion: reduce) {
    .brand-lockup:hover .brand-bolt svg, .brand-lockup:hover .bolt-spark { animation: none !important; }
    .brand-lockup:hover .brand-bolt svg, .brand-lockup:focus-visible .brand-bolt svg { transform: none; filter: drop-shadow(0 0 8px rgba(9, 104, 245, .62)); }
    .brand-name, .route-primary, .secondary-action, .primary-action, .nav-control, .text-action, .footer-control, .account-control { transition-duration: 0ms; }
  }
}

@layer base {
  html.is-theme-changing *, html.is-theme-changing *::before, html.is-theme-changing *::after {
    animation: none !important;
    transition: none !important;
  }
  html[data-theme="dark"] body { background: #000; }
  html[data-theme="dark"] .section-label { color: #b8c0cf; }
}

@layer components {
  html[data-theme="dark"] .sidebar-surface { background: linear-gradient(180deg, #050505, #000); }
  html[data-theme="dark"] .account-avatar { background: #f2f2f2; color: #090909; }
  html[data-theme="dark"] .account-control small { color: #bdbdbd; }
  html[data-theme="dark"] .status-item,
  html[data-theme="dark"] .status-icon,
  html[data-theme="dark"] .lead-meta,
  html[data-theme="dark"] .request-summary > p,
  html[data-theme="dark"] .request-facts li,
  html[data-theme="dark"] .proof-trail strong,
  html[data-theme="dark"] .provider-row strong,
  html[data-theme="dark"] .billing-proof,
  html[data-theme="dark"] .handled-row,
  html[data-theme="dark"] .connection-health li,
  html[data-theme="dark"] .health-icon { color: var(--ink); }
  html[data-theme="dark"] .lead-age,
  html[data-theme="dark"] .proof-trail time,
  html[data-theme="dark"] .provider-row span,
  html[data-theme="dark"] .handled-head,
  html[data-theme="dark"] .handled-row button { color: var(--muted); }
  html[data-theme="dark"] .status-icon { border-color: #666; }
  html[data-theme="dark"] .lead-avatar { background: #13223d; color: #fff; }
  html[data-theme="dark"] .proof-trail li:not(:last-child)::after { background: var(--line-strong); }
  html[data-theme="dark"] .route-primary:disabled { background: #1d1d1d; color: #8d8d8d; }
  html[data-theme="dark"] .segmented-control button.is-selected { box-shadow: 0 1px 5px rgba(0, 0, 0, .55); }
  html[data-theme="dark"] .switch-control input:not(:checked) + span { background: #555; }
  html[data-theme="dark"] .theme-choices button[aria-pressed="true"] { background: #0d1728; }
  html[data-theme="dark"] .help-backdrop { background: rgba(0, 0, 0, .72); }
  html[data-theme="dark"] .help-panel > section { background: #111; box-shadow: -22px 0 56px rgba(0, 0, 0, .78); }
  html[data-theme="dark"] .toast { background: #fff; color: #000; box-shadow: 0 15px 42px rgba(0, 0, 0, .65); }
  html[data-theme="dark"] input,
  html[data-theme="dark"] select,
  html[data-theme="dark"] textarea { caret-color: #fff; }
  html[data-theme="dark"] input::placeholder,
  html[data-theme="dark"] textarea::placeholder { color: #808080; opacity: 1; }
}

@layer components {
  @media (min-width: 1181px) and (max-height: 820px) {
    .overview-page {
      display: grid;
      overflow-y: auto;
      grid-template-columns: minmax(0, 1fr) 278px;
      grid-template-areas:
        "heading heading"
        "status status"
        "lead health"
        "handled health";
      gap: 20px;
      align-content: start;
      padding: 28px;
    }
    .page-heading { position: static; grid-area: heading; }
    .page-heading h1 { font-size: 34px; }
    .global-status { position: static; grid-area: status; min-height: 80px; }
    .status-item { padding: 0 16px; font-size: 12px; white-space: normal; }
    .status-icon { width: 30px; height: 30px; margin-right: 8px; }
    .hot-lead { position: relative; top: auto; left: auto; grid-area: lead; width: auto; height: auto; min-height: 460px; }
    .hot-lead-header { height: 152px; }
    .lead-actions { right: 21px; width: 205px; }
    .lead-evidence { min-height: 307px; }
    .request-facts { gap: 14px; margin-top: 24px; }
    .request-facts li { font-size: 14px; }
    .request-facts svg { width: 20px; height: 20px; }
    .handled-today { position: relative; bottom: auto; left: auto; grid-area: handled; width: auto; height: auto; min-height: 270px; }
    .connection-health { position: relative; top: auto; right: auto; grid-area: health; width: auto; height: 100%; min-height: 750px; }
    .connection-health li { grid-template-columns: 32px 1fr; }
    .connection-health li em { grid-column: 2; margin-top: -14px; }
  }

  @media (min-width: 1181px) and (max-width: 1500px) {
    .nav-control { min-height: 48px; }
    .nav-control svg { width: 20px; height: 20px; }
    .account-control, .footer-control { min-height: 50px; }
    .global-status { min-height: 68px; }
    .status-icon { width: 31px; height: 31px; }
    .lead-actions { top: 51px; }
    .primary-action { min-height: 44px; }
    .lead-actions .text-action { min-height: 44px; margin-top: 2px; }
    .request-facts { gap: 13px; margin-top: 20px; }
    .request-facts li { font-size: 14px; }
    .request-facts svg { width: 19px; height: 19px; }
    .handled-heading { min-height: 40px; }
    .handled-head { min-height: 20px; }
    .handled-row { min-height: 58px; border-bottom: 0; }
    .handled-row.handled-head { min-height: 32px; }
    .connection-health li { min-height: 55px; }
    .connection-health > h2 { margin-top: 22px; margin-bottom: 11px; }
    .connection-health .provider-logo { width: 25px; height: 25px; }
    .connection-health .health-icon svg { width: 21px; height: 21px; }
  }

  @media (max-width: 1180px) {
    :root { --sidebar-w: 88px; }
    .brand-lockup { top: 18px; left: 18px; width: 52px; justify-content: center; }
    .brand-name { display: none; }
    .primary-nav { top: 98px; }
    .nav-control { width: 76px; min-height: 56px; justify-content: center; padding: 0; border-radius: 0 7px 7px 0; }
    .nav-control svg { width: 23px; height: 23px; margin: 0; }
    .nav-control > span { display: none; }
    .sidebar-footer { right: 10px; bottom: 18px; left: 10px; padding-top: 12px; }
    .account-control, .footer-control { justify-content: center; min-height: 52px; padding: 5px; }
    .account-avatar { width: 38px; height: 38px; margin: 0; }
    .account-control > span:not(.account-avatar), .account-control > svg, .footer-control > span { display: none; }
    .footer-control svg { margin: 0; }
    .account-menu { position: fixed; right: auto; bottom: 82px; left: 12px; width: 240px; }

    .overview-page {
      display: grid;
      overflow-y: auto;
      grid-template-columns: minmax(0, 1fr) 278px;
      grid-template-areas:
        "heading heading"
        "status status"
        "lead health"
        "handled health";
      gap: 20px;
      align-content: start;
      padding: 28px;
    }
    .page-heading { position: static; grid-area: heading; }
    .page-heading h1 { font-size: 34px; }
    .global-status { position: static; grid-area: status; min-height: 80px; }
    .status-item { padding: 0 16px; font-size: 12px; white-space: normal; }
    .status-icon { width: 30px; height: 30px; margin-right: 8px; }
    .hot-lead { position: relative; top: auto; left: auto; grid-area: lead; width: auto; height: auto; min-height: 460px; }
    .hot-lead-header { height: 152px; }
    .lead-actions { right: 21px; width: 205px; }
    .lead-evidence { min-height: 307px; }
    .request-facts { gap: 14px; margin-top: 24px; }
    .request-facts li { font-size: 14px; }
    .request-facts svg { width: 20px; height: 20px; }
    .handled-today { position: relative; bottom: auto; left: auto; grid-area: handled; width: auto; height: auto; min-height: 270px; }
    .connection-health { position: relative; top: auto; right: auto; grid-area: health; width: auto; height: 100%; min-height: 750px; }
    .connection-health li { grid-template-columns: 32px 1fr; }
    .connection-health li em { grid-column: 2; margin-top: -14px; }

    .route-page { padding: 28px 30px 56px; }
    .route-heading h1 { font-size: 34px; }
    .route-layout { grid-template-columns: minmax(0, 1fr) 260px; }
    .connection-row { grid-template-columns: 38px minmax(150px, 1fr) 72px 98px 76px; gap: 8px; padding-inline: 16px; }
    .onboarding-shell { grid-template-columns: 240px minmax(0, 1fr); }
    .setup-step { padding-inline: 28px; }
  }

  @media (max-width: 1080px) {
    .overview-page {
      grid-template-columns: 1fr;
      grid-template-areas: "heading" "status" "lead" "handled" "health";
    }
    .connection-health { min-height: auto; }
    .connection-health ul { grid-template-columns: 1fr 1fr; column-gap: 28px; }
    .connection-health li em { grid-column: auto; margin-top: 0; }
    .route-layout { grid-template-columns: 1fr; }
    .context-rail { order: 2; }
    .onboarding-shell { grid-template-columns: 210px minmax(0, 1fr); }
    .setup-progress small { display: none; }
    .setup-progress button { min-height: 54px; }
    .choice-row { grid-template-columns: 1fr; }
    .choice-row label > span { min-height: 68px; }
    .source-inventory > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .source-connection-row { grid-template-columns: 48px minmax(0, 1fr); grid-template-areas: "mark copy" "mark launch" "state state" "actions actions"; gap: 8px 12px; padding: 17px 2px; }
    .source-connection-copy { align-items: flex-start; justify-content: space-between; }
    .source-connection-state { padding-left: 0; white-space: normal; }
    .source-connection-actions { display: grid; min-width: 0; grid-template-columns: 1fr; align-items: center; }
    .source-connection-actions .route-primary, .source-connection-actions .secondary-action, .source-connection-actions .text-action { width: 100%; min-width: 0; }
  }

  @media (min-width: 821px) and (max-height: 800px) {
    .onboarding-shell { min-height: 0; margin-top: 12px; }
    .setup-progress { align-self: start; }
    .setup-progress small { display: none; }
    .setup-progress button { min-height: 52px; }
    .setup-progress li:not(:last-child)::after { top: 37px; bottom: -7px; }
    .setup-step { padding-block: 18px; }
    .setup-step > h2 + p { margin-bottom: 18px; }
    .setup-actions { min-height: 68px; padding-block: 10px; }
  }

  @media (max-width: 820px) {
    :root { --sidebar-w: 0px; --mobile-top: 72px; --mobile-nav: 68px; }
    body { overflow: hidden; }
    .shell-frame { height: 100vh; height: 100dvh; min-height: 0; }
    .sidebar-surface { position: fixed; inset: 0 0 auto; width: 100%; height: var(--mobile-top); border-bottom: 1px solid rgba(255, 255, 255, .12); }
    .shell-sidebar { position: fixed; inset: 0 0 auto; z-index: 80; width: 100%; height: var(--mobile-top); }
    .brand-lockup { top: 8px; left: 14px; width: 150px; min-height: 56px; justify-content: flex-start; }
    .brand-bolt { width: 36px; height: 46px; }
    .brand-name { display: block; margin-left: 7px; font-size: 14px; }
    .mobile-menu-trigger {
      position: fixed;
      top: 10px;
      right: 12px;
      z-index: 12;
      display: grid;
      width: 48px;
      height: 52px;
      place-items: center;
      border: 1px solid rgba(255, 255, 255, .18);
      border-radius: 8px;
      background: rgba(255, 255, 255, .06);
      color: #fff;
    }
    .mobile-menu-trigger svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
    .mobile-menu {
      position: fixed;
      top: calc(var(--mobile-top) - 1px);
      right: 12px;
      z-index: 11;
      display: grid;
      width: min(360px, calc(100vw - 24px));
      max-height: calc(100dvh - var(--mobile-top) - 12px);
      gap: 8px;
      padding: 10px;
      overflow-y: auto;
      overscroll-behavior: contain;
      border: 1px solid rgba(255, 255, 255, .18);
      border-radius: 0 0 10px 10px;
      background: #07172c;
      box-shadow: 0 22px 56px rgba(0, 0, 0, .42);
    }
    html[data-theme="dark"] .mobile-menu { background: #0a0a0a; }
    .mobile-menu nav { display: grid; gap: 2px; }
    .mobile-menu-route, .mobile-menu-utilities button {
      display: flex;
      width: 100%;
      min-height: 48px;
      align-items: center;
      gap: 12px;
      padding: 0 13px;
      border-radius: 7px;
      background: transparent;
      color: #edf3fb;
      font-size: 14px;
      font-weight: 750;
      text-align: left;
    }
    .mobile-menu-route svg, .mobile-menu-utilities svg { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
    .mobile-menu-route.is-active { background: #0968f5; color: #fff; }
    .mobile-menu-account-group { padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .15); }
    .mobile-menu-account {
      display: grid;
      width: 100%;
      min-height: 64px;
      grid-template-columns: 41px minmax(0, 1fr) 20px;
      gap: 10px;
      align-items: center;
      padding: 7px 10px;
      border-radius: 7px;
      background: transparent;
      color: #fff;
      text-align: left;
    }
    .mobile-menu-account .account-avatar { margin: 0; }
    .mobile-menu-account strong, .mobile-menu-account small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .mobile-menu-account strong { font-size: 14px; }.mobile-menu-account small { margin-top: 3px; color: #bdc9da; font-size: 12px; }
    .mobile-menu-account > svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; transform: rotate(90deg); }
    .mobile-menu-utilities { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 4px; }
    .mobile-menu-utilities button { justify-content: flex-start; font-size: 12px; }
    .primary-nav {
      position: fixed;
      top: auto;
      right: 0;
      bottom: 0;
      left: 0;
      display: grid;
      width: 100%;
      height: calc(var(--mobile-nav) + env(safe-area-inset-bottom));
      grid-template-columns: repeat(5, 1fr);
      padding-bottom: env(safe-area-inset-bottom);
      border-top: 1px solid rgba(255, 255, 255, .12);
      background: #050505;
    }
    .nav-control { width: 100%; min-height: var(--mobile-nav); flex-direction: column; padding-inline: 2px; border-radius: 0; font-size: 12px; }
    .nav-control + .nav-control { margin-top: 0; }
    .nav-control svg { width: 21px; height: 21px; margin: 0 0 5px; }
    .nav-control > span { display: block; letter-spacing: -.035em; }
    .nav-control.is-active { background: rgba(47, 128, 255, .16); }
    .nav-control.is-active::before { inset: 0 18px auto; width: auto; height: 3px; }
    .sidebar-footer { position: static; width: auto; padding: 0; border: 0; }
    .account-control, .footer-control { display: none; }
    .account-menu { position: fixed; top: calc(var(--mobile-top) + 8px); right: 12px; bottom: auto; left: auto; z-index: 12; width: min(360px, calc(100vw - 24px)); max-height: calc(100dvh - var(--mobile-top) - 20px); }

    .overview-page, .route-page { inset: var(--mobile-top) 0 calc(var(--mobile-nav) + env(safe-area-inset-bottom)) 0; }
    body.has-mobile-dirty-action .route-page:not([hidden]) { bottom: calc(var(--mobile-nav) + env(safe-area-inset-bottom) + 76px); }
    .overview-page { display: block; padding: 22px 16px 100px; }
    .overview-page > .route-loading, .overview-page > .route-error { position: static; }
    .overview-page > * + * { margin-top: 18px; }
    .page-heading h1 { font-size: 30px; }
    .global-status { display: grid; height: auto; min-height: 142px; grid-template-columns: 1fr 1fr; }
    .status-item { min-height: 70px; border-top: 1px solid var(--line); border-left: 0; }
    .status-item:nth-child(even) { border-left: 1px solid var(--line); }
    .status-item:nth-child(-n+2) { border-top: 0; }
    .status-dot { display: none; }
    .hot-lead, .handled-today, .connection-health { width: 100%; min-height: 0; margin-top: 18px; }
    .hot-lead-header { height: auto; min-height: 0; padding: 20px; }
    .lead-identity { position: static; margin-top: 18px; }
    .lead-avatar { width: 56px; height: 56px; margin-right: 14px; font-size: 18px; }
    .lead-identity h2 { font-size: 20px; }
    .lead-meta { font-size: 12px; white-space: normal; }
    .handoff-note { position: static; width: auto; margin-top: 5px; text-align: left; }
    .lead-actions { position: static; width: 100%; margin-top: 18px; }
    .lead-evidence { display: block; height: auto; min-height: 0; padding: 0 20px 22px; }
    .lead-evidence > section { padding: 22px 0 0; }
    .lead-evidence > section + section { margin-top: 22px; padding: 22px 0 0; border-top: 1px solid var(--line); border-left: 0; }
    .request-summary > p { max-width: none; }
    .request-facts { margin-top: 20px; }
    .request-facts li { font-size: 15px; }
    .proof-trail li { min-height: 64px; }
    .handled-today { overflow: visible; }
    .handled-heading { min-height: 56px; padding: 0 8px 0 18px; border-bottom: 1px solid var(--line); }
    .handled-row.handled-head { display: none; }
    .handled-row { position: relative; display: grid; min-height: 142px; grid-template-columns: minmax(0, 1fr) 44px; grid-template-rows: repeat(4, auto); gap: 7px 12px; align-content: center; padding: 16px 8px 16px 18px; font-size: 12px; }
    .handled-time { grid-column: 1; grid-row: 1; color: var(--muted); }
    .handled-lead { grid-column: 1; grid-row: 2; }
    .handled-source { grid-column: 1; grid-row: 3; }
    .handled-outcome { grid-column: 1; grid-row: 4; }
    .handled-response { position: absolute; top: 14px; right: 62px; color: var(--ink); font-weight: 700; }
    .handled-response::before { margin-right: 5px; color: var(--muted); content: "Response"; font-weight: 500; }
    .handled-row > button { position: absolute; top: 2px; right: 0; width: 44px; height: 44px; }
    .connection-health { height: auto; padding: 20px; }
    .connection-health ul { grid-template-columns: 1fr; }
    .connection-health li { grid-template-columns: 36px 1fr auto; }
    .connection-health li em { grid-column: auto; }

    .route-page { overflow-y: auto; padding: 22px 16px 125px; }
    body[data-active-route="onboarding"] .primary-nav { display: none; }
    body[data-active-route="onboarding"] .onboarding-page { bottom: 0; padding-bottom: 0; }
    .route-heading { display: block; min-height: 0; }
    .route-heading h1 { font-size: 29px; }
    .route-heading p { font-size: 14px; }
    .route-heading > .route-primary, .route-heading > .phone-link { position: static; width: 100%; min-height: 52px; margin-top: 18px; box-shadow: none; }
    .route-heading > .mobile-dirty-action:disabled { display: none; }
    .route-heading > .mobile-dirty-action:not(:disabled) {
      position: fixed;
      right: 16px;
      bottom: calc(var(--mobile-nav) + env(safe-area-inset-bottom) + 12px);
      left: 16px;
      z-index: 70;
      width: auto;
      margin: 0;
      box-shadow: 0 14px 30px rgba(0, 0, 0, .24);
    }
    .route-status { display: grid; grid-template-columns: 1fr 1fr; margin: 20px 0 16px; }
    .route-status > span { display: flex; min-height: 48px; align-items: center; padding: 0 10px; border-top: 1px solid var(--line); border-left: 0; font-size: 12px; }
    .route-status > span:nth-child(even) { border-left: 1px solid var(--line); }
    .route-status > span:nth-child(-n+2) { border-top: 0; }
    .surface-heading { display: block; padding: 18px; }
    .surface-heading > :last-child:not(:first-child) { margin-top: 14px; }
    .segmented-control { display: grid; width: 100%; grid-template-columns: repeat(3, 1fr); }
    .segmented-control button, .text-action, .back-link { min-height: 44px; }
    .queue-head { display: none; }
    .queue-row { position: relative; display: grid; min-height: 0; grid-template-columns: 1fr; gap: 15px; padding: 18px 42px 18px 18px; }
    .queue-row > svg { position: absolute; top: 20px; right: 16px; }
    .queue-row > span:not(.queue-person) { padding-top: 11px; border-top: 1px solid var(--line); }
    .next-action { padding-left: 18px !important; }
    .quiet-metrics div { min-height: 48px; }
    .detail-summary { grid-template-columns: 1fr; gap: 24px; padding: 20px; }
    .detail-summary dl { grid-template-columns: 1fr; }
    .lead-controls > summary { min-height: 0; flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px 20px; }
    .lead-control-state { align-self: flex-start; }
    .lead-controls-body { padding: 2px 20px 18px; }
    .lead-control-row, .lead-outcome-row { grid-template-columns: 1fr; gap: 14px; }
    .lead-control-row .secondary-action, .lead-outcome-actions { width: 100%; min-width: 0; }
    .lead-control-locked { text-align: left; }
    .lead-outcome-actions { grid-template-columns: 1fr; }
    .lead-outcome-actions .secondary-action { width: 100%; }
    .activity-timeline li { grid-template-columns: 76px 18px 1fr; }
    .activity-timeline li:not(:last-child)::after { left: 94px; }
    .connection-row { position: relative; grid-template-columns: 42px 1fr auto; grid-template-rows: auto auto; gap: 8px 12px; padding: 16px; }
    .connection-row > span:nth-child(1) { grid-column: 1; grid-row: 1 / 3; }
    .connection-row > span:nth-child(2) { grid-column: 2; grid-row: 1; }
    .connection-row > .health-state { grid-column: 3; grid-row: 1; }
    .connection-row > .rollout-state { grid-column: 2; grid-row: 2; }
    .connection-row > button { min-height: 44px; grid-column: 3; grid-row: 2; }
    .data-request-row { grid-template-rows: auto auto auto; }
    .data-request-row > .rollout-state { grid-column: 2 / 4; grid-row: 2; }
    .data-request-row > .data-request-actions { grid-column: 2 / 4; grid-row: 3; justify-content: flex-start; }
    .setting-block { display: block; padding: 22px 18px; }
    .switch-control, .time-fields { margin-top: 20px; }
    .time-fields { grid-template-columns: 1fr; }
    .settings-layout { grid-template-columns: 1fr; }
    .settings-nav { display: none; }
    .settings-mobile-select { display: grid; gap: 7px; color: var(--ink-soft); font-size: 12px; font-weight: 750; }
    .settings-mobile-select select { width: 100%; min-height: 48px; padding: 0 42px 0 13px; border: 1px solid var(--line-strong); border-radius: var(--radius-control); outline: none; background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 700; }
    .settings-mobile-select select:focus-visible { border-color: var(--focus); outline: 3px solid var(--focus); outline-offset: 2px; }
    .settings-form, .theme-choices { grid-template-columns: 1fr; padding: 20px; }
    .ai-preview-grid { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
    .ai-preview-website-form, .ai-preview-conversation-form, .ai-preview-result { padding: 17px; }
    .ai-preview-result { min-height: 420px; }
    .preview-message { max-width: 92%; }
    .notification-save-row { display: grid; }
    .notification-save-row .route-primary { width: 100%; }
    .full-field { grid-column: auto; }
    .mobile-session-actions { display: grid; gap: 16px; padding: 20px; border-top: 1px solid var(--line); }
    .mobile-session-actions h3 { margin: 0; font-size: 17px; }
    .mobile-session-actions p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
    .mobile-session-actions .secondary-action { width: 100%; }

    .onboarding-heading { padding-right: 64px; }
    .provider-entry-heading { padding-right: 64px; }
    .setup-time, .setup-progress { display: none; }
    .onboarding-shell { display: block; min-height: 0; margin-top: 18px; }
    .onboarding-shell.is-provider-entry { max-width: none; min-height: 0; }
    .setup-workspace {
      min-height: min(620px, calc(100vh - var(--mobile-top) - 150px));
      min-height: min(620px, calc(100dvh - var(--mobile-top) - 150px));
      border-radius: 9px;
    }
    .is-provider-entry .setup-workspace { min-height: 0; border-radius: 9px; }
    .setup-step { padding: 24px 18px 28px; }
    .provider-entry-step { padding: 22px 16px 28px; }
    .is-provider-entry:not(.has-provider-footer) .provider-entry-step { padding-bottom: 24px; }
    .setup-step > h2 { font-size: 25px; }
    .setup-form-grid, .test-brief { grid-template-columns: 1fr; }
    .business-logo-card { grid-template-columns: 58px minmax(0, 1fr); grid-template-areas: "preview copy" "actions actions" "status status"; gap: 12px; }
    .business-logo-preview { width: 58px; height: 58px; border-radius: 13px; font-size: 17px; }
    .business-logo-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
    .business-logo-actions .secondary-action { width: 100%; }
    .setup-section-heading { display: grid; gap: 4px; }
    .setup-section-heading small { text-align: left; }
    .guidance-objectives { grid-template-columns: 1fr; }
    .guidance-objectives label > span { min-height: 76px; }
    .assigned-number-card { grid-template-columns: 34px minmax(0, 1fr); }
    .assigned-number-card > span { grid-column: 2; justify-self: start; }
    .source-plan { padding: 18px; }
    .source-plan-heading { display: grid; gap: 12px; }
    .source-plan-heading > span { justify-self: start; }
    .connection-plan-heading { align-items: flex-start; }
    .source-connection-row { grid-template-columns: 48px minmax(0, 1fr); grid-template-areas: "mark copy" "mark launch" "state state" "actions actions"; gap: 8px 12px; padding: 17px 2px; }
    .source-connection-copy { align-items: flex-start; justify-content: space-between; }
    .source-connection-state { padding-left: 0; }
    .source-connection-actions { display: grid; min-width: 0; grid-template-columns: 1fr; align-items: center; }
    .source-connection-actions .route-primary, .source-connection-actions .secondary-action, .source-connection-actions .text-action { width: 100%; min-width: 0; }
    .provider-entry-row, .provider-entry-row.is-unavailable {
      min-height: 0;
      grid-template-columns: 48px minmax(0, 1fr);
      grid-template-areas: "mark copy" "state state" "actions actions";
      gap: 9px 12px;
      padding: 16px;
    }
    .provider-entry-row:has(.provider-logo-pair) { grid-template-columns: 72px minmax(0, 1fr); }
    .provider-entry-row .source-connection-state { padding-left: 0; white-space: normal; }
    .provider-entry-row .source-connection-actions { width: 100%; min-width: 0; }
    .provider-entry-row .source-connection-actions button { width: 100%; min-height: 48px; }
    .missing-facts { padding: 16px; }
    .missing-facts .route-primary { width: 100%; }
    .next-outcomes summary { min-height: 56px; }
    .provider-entry-actions { grid-template-columns: 1fr; }
    .provider-entry-actions .save-state { display: none; }
    .compliance-heading { display: grid; }
    .compliance-state { justify-self: start; white-space: normal; }
    .compliance-section summary { min-height: 68px; }
    .compliance-actions { display: grid; padding: 16px 0; }
    .compliance-actions button { width: 100%; }
    .compliance-actions .save-state { margin-left: 0; text-align: left; }
    .test-brief div, .test-brief div:nth-child(even) { padding: 15px 0; border-left: 0; }
    .test-total { display: grid; gap: 7px; padding: 14px; }
    .test-next-action { display: grid; gap: 14px; }
    .test-next-action button { width: 100%; }
    .provider-test-stages { grid-template-columns: 1fr; }
    .provider-test-action button { width: 100%; }
    .setup-actions { position: static; grid-template-columns: auto 1fr; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
    .setup-actions .save-state { display: none; }
    .setup-actions .route-primary { justify-self: stretch; }
    .setup-actions.provider-entry-actions { grid-template-columns: 1fr; }
    .setup-actions.provider-entry-actions .route-primary { width: 100%; }
    .review-results > li { grid-template-columns: 24px 1fr; padding: 12px 0; }
    .review-results > li > em { grid-column: 2; }
    .review-next-action { display: grid; }
    .review-next-action button { width: 100%; }
    .activation-summary { grid-template-columns: 44px 1fr; }
    .activation-summary .health-state { grid-column: 2; }
    .help-panel > section { padding: 22px 18px; }
    .toast { right: 16px; bottom: calc(var(--mobile-nav) + env(safe-area-inset-bottom) + 14px); left: 16px; max-width: none; }
    body[data-active-route="onboarding"] .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
  }

  @media (max-width: 360px) {
    .nav-control { font-size: 9.5px; }
    .nav-control svg { width: 20px; height: 20px; margin-bottom: 4px; }
    .nav-control > span { letter-spacing: -.02em; }
  }

  @media (max-width: 480px) {
    .source-inventory > div, .source-questionnaire .source-inventory > div { grid-template-columns: 1fr; }
    .source-inventory label, .source-inventory label > span { min-height: 70px; }
    .choice-row:has(input[name="propertyTypes"]) { grid-template-columns: 1fr; }
    .guidance-question-grid { grid-template-columns: 1fr; }
    .business-logo-actions { grid-template-columns: 1fr; }
    .business-logo-actions .text-action { justify-self: start; }
    .connection-plan-heading { display: grid; justify-content: stretch; }
    .connection-plan-heading .text-action { justify-self: start; }
    .source-connection-copy { display: grid; gap: 7px; }
    .connection-truth { width: fit-content; }
    .source-connection-actions { grid-template-columns: 1fr; }
    .source-connection-actions .text-action { width: 100%; }
    .brand-lockup { width: 150px; }
    .brand-name { font-size: 13px; }
    .page-heading h1, .route-heading h1 { font-size: 27px; }
    .global-status { grid-template-columns: 1fr; }
    .status-item, .status-item:nth-child(even), .status-item:nth-child(-n+2) { min-height: 58px; border-top: 1px solid var(--line); border-left: 0; }
    .status-item:first-child { border-top: 0; }
    .route-status { grid-template-columns: 1fr; }
    .route-status > span, .route-status > span:nth-child(even), .route-status > span:nth-child(-n+2) { min-height: 42px; border-top: 1px solid var(--line); border-left: 0; }
    .route-status > span:first-child { border-top: 0; }
    .lead-identity { align-items: flex-start; }
    .lead-meta { line-height: 1.5; }
    .request-facts li { font-size: 14px; white-space: normal; }
    .connection-health li { grid-template-columns: 32px 1fr; }
    .connection-health li em { grid-column: 2; margin-top: -11px; }
    .theme-choices button { min-height: 145px; }
    .setup-actions { grid-template-columns: 88px 1fr; }
  }
}
