/* Instrument Sans, SIL OFL 1.1. Inter is retained for the Linial wordmark.
   Fonts are served locally; change --linial-font to change product typography. */
@font-face {
  font-family: 'InterVariable';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/service-font-inter-variable.woff2') format('woff2');
}
@font-face {
  font-family: 'InterVariable';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('/service-font-inter-variable-italic.woff2') format('woff2');
}
/* latin-ext */
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/service-font-instrument-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/service-font-instrument-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Instrument Sans';
  font-style: italic;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/service-font-instrument-latin-ext-italic.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Instrument Sans';
  font-style: italic;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/service-font-instrument-latin-italic.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --linial-font: 'Instrument Sans', Arial, sans-serif;
  --linial-page-gutter: clamp(20px, 4.1667vw, 72px);
  --linial-page-width: min(1760px, calc(100% - 2 * var(--linial-page-gutter)));
  --linial-page-inset: max(var(--linial-page-gutter), calc((100vw - 1760px) / 2));
}
@layer linial-type {
  html, body, body :is(button, input, select, textarea, summary) {
    font-family: var(--linial-font) !important;
    font-optical-sizing: auto;
    font-synthesis: none;
  }
  body :is(.home-brand-name,.clinic-brand-name,.brand-name,.availability-brand,.agent-screen-identity strong) {
    font-family: InterVariable, Arial, sans-serif !important;
  }
  body :is(h1, h2, h3, h4, h5, h6, [data-linial-type="question"]) {
    letter-spacing: normal !important;
  }
}

/* Shared visual rules for Linial's product pages. Keep each page's layout and
   controls; align the common colour, type, spacing and focus treatment. */
:root {
  --linial-bg: #141514;
  --linial-surface: #1b1d1b;
  --linial-surface-raised: #202320;
  --linial-rule: #343833;
  --linial-text: #edeee9;
  --linial-muted: #a6aaa3;
  --linial-gold: #d8bd78;
  --linial-copy: 15px;
  --linial-small: 14px;
  --linial-radius: 8px;
  --linial-space-close: 8px;
  --linial-space-group: 16px;
  --linial-space-section: 24px;
}

.linial-install-action {
  flex: 0 0 auto;
  min-height: 34px;
  margin-inline-start: auto;
  padding: 6px 10px;
  border: 1px solid var(--linial-rule);
  border-radius: 7px;
  background: transparent;
  color: var(--linial-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 450;
  cursor: pointer;
}
.linial-install-action:hover { border-color: #73796f; color: var(--linial-text); }
.linial-install-action:focus-visible { outline: 2px solid var(--linial-gold); outline-offset: 2px; }
.linial-install-dialog {
  width: min(calc(100% - 32px), 380px);
  padding: 22px;
  border: 1px solid var(--linial-rule);
  border-radius: 10px;
  background: var(--linial-surface);
  color: var(--linial-text);
}
.linial-install-dialog::backdrop { background: #080908b8; }
.linial-install-dialog form { display: grid; gap: 12px; }
.linial-install-dialog h2 { margin: 0; font-size: 17px; font-weight: 500; }
.linial-install-dialog p { margin: 0; color: var(--linial-muted); font-size: 14px; line-height: 1.55; }
.linial-install-dialog button { justify-self: end; min-height: 38px; padding: 7px 12px; border: 1px solid var(--linial-rule); border-radius: 7px; background: transparent; color: var(--linial-text); font: inherit; }

body:has(.setup-shell),
body:has(.staff-shell),
body:has(.demo-shell),
body:has(.plans-shell),
body:has(.phone-demo-shell),
body:has(.personal-shell),
body:has(.conversation-surface),
body:has(.home-shell),
body:has(.conversation),
body:has(.chat) {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--linial-text);
  background-color: var(--linial-bg);
  -webkit-font-smoothing: antialiased;
}

:is(body.setup-page, body:has(.staff-shell), body:has(.demo-shell), body:has(.plans-shell), body:has(.phone-demo-shell), body:has(.personal-shell), body:has(.conversation-surface), body:has(.home-shell), body:has(.conversation), body:has(.chat))
  :is(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--linial-gold);
  outline-offset: 2px;
}

/* Forms and decision controls use the same practical target size across
   setup, staff, demo and payment surfaces; inline text links remain links. */
:is(body.setup-page, body:has(.staff-shell), body:has(.demo-shell), body:has(.plans-shell), body:has(.personal-shell))
  :is(.setup-form, .connection-form, .demo-actions, .plans-billing, .login)
  :is(button, select, input:not([type="checkbox"]):not([type="radio"]), textarea) {
  min-height: 42px;
  box-sizing: border-box;
}

/* Keep the native select interaction, but give its indicator a deliberate,
   centred position. Platform arrows otherwise sit against the field border. */
:is(.connection-form, .setup-form) select:not([multiple]):not([size]) {
  appearance: none;
  -webkit-appearance: none;
  min-height: 44px;
  padding-inline-end: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23a6aaa3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}
@media (forced-colors: active) {
  :is(.connection-form, .setup-form) select:not([multiple]):not([size]) {
    appearance: auto;
    -webkit-appearance: auto;
    background-image: none;
  }
}

/* Searchable provider fields have two native actions. Give both the same
   icon box and optical centre; keep native clear and suggestion behavior. */
input[type="search"][list] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23a6aaa3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}
input[type="search"][list]::-webkit-search-cancel-button,
input[type="search"][list]::-webkit-calendar-picker-indicator {
  -webkit-appearance: none;
  display: block;
  align-self: center;
  width: 16px;
  height: 16px;
  margin-block: 0;
  padding: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  cursor: pointer;
}
input[type="search"][list]::-webkit-search-cancel-button {
  margin-inline: 0 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 4 8 8m0-8-8 8' fill='none' stroke='%23a6aaa3' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}
input[type="search"][list]::-webkit-calendar-picker-indicator {
  margin-inline: 0;
  /* Keep its native click target, but paint the arrow on the field itself so
     the browser's baseline-dependent glyph cannot drift below the clear ×. */
  opacity: 0;
}
@media (forced-colors: active) {
  input[type="search"][list] { background-image: none; }
  input[type="search"][list]::-webkit-search-cancel-button,
  input[type="search"][list]::-webkit-calendar-picker-indicator {
    -webkit-appearance: auto;
    background-image: none;
    opacity: 1;
  }
}

/* My calls used to be the only bright, green-accented surface. */
body:has(.personal-shell) { color-scheme: dark; }
body:has(.personal-shell) { min-height: 100dvh; }
body:has(.personal-shell) .personal-shell {
  width: min(calc(100% - 48px), 760px);
  padding: 28px 0 64px;
}
body:has(.personal-shell) .page-head {
  min-height: 64px;
  align-items: center;
  gap: 11px;
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--linial-rule);
}
body:has(.personal-shell) .brand-mark { width: 30px; height: 30px; flex: 0 0 30px; color: var(--linial-gold); }
body:has(.personal-shell) .brand-mark svg { width: 100%; height: 100%; }
body:has(.personal-shell) .brand { color: var(--linial-muted); font-size: 13px; font-weight: 500; }
body:has(.personal-shell) .personal-shell h1 { color: var(--linial-text); font-size: 22px; font-weight: 500; letter-spacing: -.015em; }
body:has(.personal-shell) .personal-shell h2 { margin: 0 0 8px; color: var(--linial-text); font-size: 16px; font-weight: 500; letter-spacing: 0; }
body:has(.personal-shell) .personal-shell h3 { margin: 0 0 7px; color: var(--linial-text); font-size: 14px; font-weight: 500; }
body:has(.personal-shell) .intro { max-width: 62ch; margin: 0; color: #c7cbc4; font-size: var(--linial-copy); line-height: 1.55; }
body:has(.personal-shell) .personal-shell section { margin: 20px 0 0; padding: 20px 0 0; border-top: 1px solid var(--linial-rule); }
body:has(.personal-shell) .personal-shell label { margin: 0 0 6px; color: #c4c8c1; font-size: var(--linial-small); font-weight: 400; }
body:has(.personal-shell) .personal-shell input {
  height: 46px;
  margin: 0 0 12px;
  padding: 0 12px;
  border: 1px solid #454942;
  border-radius: var(--linial-radius);
  background: var(--linial-surface-raised);
  color: var(--linial-text);
  font-size: 16px;
}
body:has(.personal-shell) .personal-shell button {
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid #454942;
  border-radius: 7px;
  background: transparent;
  color: var(--linial-text);
  font-size: 14px;
  font-weight: 450;
}
body:has(.personal-shell) .personal-shell button:hover { border-color: #73796f; background: #202320; }
body:has(.personal-shell) .personal-shell button.primary { border-color: var(--linial-gold); background: var(--linial-gold); color: #1b1a15; }
body:has(.personal-shell) .personal-shell button.primary:hover { background: #e7d096; }
body:has(.personal-shell) .personal-shell a { color: var(--linial-gold); text-underline-offset: 3px; }
body:has(.personal-shell) .personal-shell .note,
body:has(.personal-shell) .personal-shell .empty { color: var(--linial-muted); font-size: var(--linial-small); line-height: 1.5; }
body:has(.personal-shell) #notice:not(:empty) { margin: 0 0 14px; padding: 11px 13px; border: 1px solid var(--linial-rule); border-radius: 7px; background: var(--linial-surface); color: var(--linial-text); }
body:has(.personal-shell) .code-line { gap: 10px; margin: 12px 0; }
body:has(.personal-shell) .code-line code { color: var(--linial-gold); font-size: 19px; font-weight: 500; }
body:has(.personal-shell) .call-row { padding: 15px 0; border-color: var(--linial-rule); }
body:has(.personal-shell) .call-meta,
body:has(.personal-shell) .call-line span { color: var(--linial-muted); }
body:has(.personal-shell) .call-summary { margin-bottom: 8px; color: #e4e7e1; font-size: 15px; line-height: 1.5; }
body:has(.personal-shell) .call-row summary { color: #c8b477; }
body:has(.personal-shell) .call-line { border-color: #2d302c; }

/* Shared page frame: consistent header and restrained reading hierarchy. */
:is(.demo-shell, .plans-shell, .phone-demo-shell) { padding-right: 24px; padding-left: 24px; }
:is(.demo-head, .plans-head, .phone-demo-head) { min-height: 72px; }
body:has(.demo-shell) .demo-head { width: min(100%, 680px); margin-inline: auto; }
:is(.demo-intro h1, .plans-intro h1, .phone-demo-intro h1) {
  font-size: clamp(23px, 3vw, 26px);
  font-weight: 520;
  line-height: 1.32;
  letter-spacing: -.015em;
}
:is(.demo-intro p, .plans-intro > p:not(.eyebrow), .phone-demo-intro p) {
  color: var(--linial-muted);
  font-size: var(--linial-copy);
  line-height: 1.55;
}
:is(.demo-intro, .plans-intro, .phone-demo-intro) { margin-top: 36px; }
:is(.demo-workspace, .demo-controls, .demo-result, .forwarding-request) { border-color: var(--linial-rule); }
:is(.demo-result h2, .forwarding-request h3, .plan h2) { font-size: 16px; font-weight: 500; line-height: 1.4; }
:is(.demo-actions button, .quiet-button) { min-height: 44px; border-radius: 7px; }
.demo-actions #talk-demo { border-color: var(--linial-gold); background: var(--linial-gold); }
.demo-actions #talk-demo:hover { background: #e7d096; }
.demo-owner-next a { min-height: 42px; border-radius: 7px; font-size: 14px; font-weight: 450; }
.plans-head, .phone-demo-head, .demo-head { border-color: var(--linial-rule); }
.plans-intro .draft-note { color: var(--linial-muted); }
.plan-list { border-top: 1px solid var(--linial-rule); }
.plan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  column-gap: 28px;
  row-gap: 8px;
  align-items: start;
  min-width: 0;
  padding: 20px 0;
  border: 0;
  border-bottom: 1px solid var(--linial-rule);
  border-radius: 0;
  background: transparent;
}
.plan-name { grid-column: 1; grid-row: 1; min-width: 0; }
.plan-name h2 { margin: 0; color: var(--linial-text); line-height: 1.4; }
.plan-fit { margin: 4px 0 0; color: var(--linial-muted); font-size: 14px; line-height: 1.45; }
.plan-description { grid-column: 1; grid-row: 2; margin: 0; max-width: 58ch; color: #c2c6c2; font-size: 14px; line-height: 1.5; }
.plan-price { grid-column: 2; grid-row: 1 / span 2; display: grid; justify-items: end; align-content: start; gap: 14px; margin: 0; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.plan-price > p { margin: 0; }
.plan-price strong { font-size: 18px; font-weight: 500; }
.plan-price span { margin-left: 4px; color: var(--linial-muted); font-size: 13px; }
.plan-action { display: inline-flex; align-items: center; justify-content: flex-end; min-height: 40px; color: var(--linial-gold); text-underline-offset: 3px; }
.plan-action:hover { text-decoration: underline; }
.plan-action:focus-visible { outline: 2px solid var(--linial-gold); outline-offset: 4px; border-radius: 2px; }
.phone-demo-intro { margin-bottom: 24px; }
.phone-fields { gap: 14px; }
.mode { padding: 12px 0; border-color: var(--linial-rule); }
.mode.selected { padding-left: 10px; border-left: 2px solid var(--linial-gold); background: #1b1d1b; }
.mode.selected strong { color: var(--linial-gold); }
.call-path li { border-color: var(--linial-rule); }
.demo-footnote, .plans-foot { color: var(--linial-muted); }

@media (max-width: 640px) {
  :is(.demo-shell, .plans-shell, .phone-demo-shell) { padding-right: 18px; padding-left: 18px; }
  :is(.demo-head, .plans-head, .phone-demo-head) { min-height: 66px; }
  :is(.demo-intro, .plans-intro, .phone-demo-intro) { margin-top: 28px; }
  .plan { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 18px 0; }
  .plan-name { grid-column: 1; grid-row: 1; }
  .plan-price { grid-column: 1; grid-row: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; text-align: left; }
  .plan-price span { display: inline; margin-left: 4px; font-size: 12px; }
  .plan-action { min-height: 40px; }
  .plan-description { grid-column: 1; grid-row: 2; }
  .plan-price strong { font-size: 17px; }
  body:has(.personal-shell) .personal-shell { width: min(calc(100% - 36px), 760px); padding-top: 20px; }
  body:has(.personal-shell) .page-head { margin-bottom: 17px; }
  body:has(.personal-shell) .personal-shell section { margin-top: 18px; padding-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  body:has(.personal-shell) .brand-mark svg { animation: none; }
}

body.team-join-page { display: block; min-height: 100svh; margin: 0; padding: 0 16px; background: var(--linial-bg); color: var(--linial-text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
.team-join-page *, .team-join-page *::before, .team-join-page *::after { box-sizing: border-box; }
.team-join-shell { width: min(100%, 760px); margin: 0 auto; padding-bottom: 48px; }
.team-join-shell > header { display: flex; align-items: center; height: 72px; margin: 0 0 24px; border-bottom: 1px solid var(--linial-rule); }
.team-join-shell > section { max-width: 600px; }
.team-join-shell .sunflower { width: 30px; height: 30px; color: var(--linial-gold); }
.team-join-shell .sunflower svg { display: block; width: 100%; height: 100%; }
.team-join-shell h1 { margin: 0; font-size: 19px; font-weight: 520; line-height: 1.4; }
.team-join-shell p { margin: 7px 0 0; color: var(--linial-muted); font-size: 15px; line-height: 1.55; }
.team-join-shell .join-explainer { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--linial-rule); }
.team-join-shell :is(button,a) { display: inline-flex; align-items: center; min-height: 42px; margin-top: 20px; padding: 8px 13px; border: 1px solid #454942; border-radius: 7px; background: transparent; color: var(--linial-text); font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; }
.team-join-shell button.primary { border-color: var(--linial-gold); background: var(--linial-gold); color: #1b1a15; }
.team-join-shell :is(button,a):hover { border-color: #73796f; }
.team-join-shell :is(button,a):focus-visible { outline: 2px solid var(--linial-gold); outline-offset: 2px; }
.team-join-shell [hidden] { display: none !important; }
@media (max-width: 480px) { .team-join-shell > header { height: 64px; margin-bottom: 20px; } }
body.team-join-page.wrong-account .team-join-shell > header { margin-bottom: 24px; }
body.team-join-page.wrong-account #transfer-title { margin: 0 0 9px; font-size: 23px; font-weight: 600; line-height: 1.25; letter-spacing: -.025em; }
body.team-join-page.wrong-account #transfer-status { margin: 0; color: var(--linial-text); font-size: 16px; line-height: 1.5; }
body.team-join-page.wrong-account #switch-account { margin-top: 15px; }
body.team-join-page.wrong-account .switch-account-note { margin: 0; color: var(--linial-muted); font-size: 14px; line-height: 1.45; }
body.team-join-page.wrong-account #switch-account button { margin-top: 16px; }

/* Shared layout corrections: one reading scale, no enclosing dashboard card. */
:root {
  --linial-body-line: 1.55;
  --linial-space-1: 6px;
  --linial-space-2: 10px;
  --linial-space-3: 16px;
  --linial-space-4: 24px;
}
/* Onboarding: align every step and history turn to one readable column. */
body.setup-page { display: block; min-height: 100dvh; padding: 0; background: var(--linial-bg); }
body.setup-page .setup-shell {
  width: min(calc(100% - 48px), 960px);
  max-width: 960px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0;
}
body.setup-page .setup-conversation {
  min-height: 100dvh;
  max-height: 100dvh;
  border: 0;
  border-radius: 0;
  background: transparent;
}
body.setup-page .setup-head {
  position: relative;
  width: 100%;
  height: 56px;
  flex: 0 0 56px;
  margin: 0 auto;
  padding: 0 calc((100% - min(100%, 860px)) / 2 + 22px);
  border: 0;
}
body.setup-page .setup-head::after {
  position: absolute;
  inset-inline-start: calc((100% - min(100%, 860px)) / 2 + 22px);
  inset-block-end: 0;
  width: min(var(--setup-content-width), calc(min(100%, 860px) - 44px));
  height: 1px;
  background: var(--linial-rule);
  content: "";
}
body.setup-page .setup-head .sunflower { width: 30px; height: 30px; margin-left: 0; color: var(--linial-gold); }
body.setup-page .setup-thread {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 24px 22px 16px;
}
body.setup-page { --setup-content-width: 680px; }
body.setup-page .setup-source-review .setup-facts > div { grid-template-columns: minmax(108px,140px) minmax(0,1fr); gap: 8px 18px; }
body.setup-page .setup-source-review .setup-facts label { margin: 9px 0 0; color: var(--linial-text); font-size: 15px; font-weight: 500; line-height: 1.55; }
body.setup-page .setup-source-review .setup-facts textarea { display: block; box-sizing: border-box; width: 100%; min-width: 0; min-height: 64px; margin: 0; padding: 8px 10px; border: 1px solid var(--linial-rule); border-radius: 5px; background: transparent; color: var(--linial-text); font: inherit; font-size: 15px; line-height: 1.55; resize: vertical; }
body.setup-page .setup-source-review .setup-facts textarea:focus { outline: 2px solid var(--linial-gold); outline-offset: 2px; }
body.setup-page .setup-source-review .setup-review-value { display: grid; min-width: 0; gap: 6px; }
body.setup-page .setup-source-review .setup-facts input { box-sizing: border-box; width: 100%; min-width: 0; margin: 0; padding: 8px 10px; border: 1px solid var(--linial-rule); border-radius: 5px; background: transparent; color: var(--linial-text); font: inherit; font-size: 15px; line-height: 1.55; }
body.setup-page .setup-source-review .setup-facts input:focus { outline: 2px solid var(--linial-gold); outline-offset: 2px; }
body.setup-page .setup-review-citations, body.setup-page .setup-review-original { color: var(--linial-muted); font-size: 13px; line-height: 1.5; }
body.setup-page .setup-review-citations a { color: inherit; text-underline-offset: 2px; }
body.setup-page .setup-review-original p { margin: 6px 0 0; font-size: 13px; }
body.setup-page .setup-review-evidence { color: var(--linial-muted); font-size: 13px; line-height: 1.5; }
body.setup-page .setup-review-evidence summary { width: fit-content; cursor: pointer; text-underline-offset: 3px; }
body.setup-page .setup-review-evidence-item { margin-top: 7px; padding-left: 10px; border-left: 2px solid var(--linial-rule); }
body.setup-page .setup-review-evidence-item blockquote { margin: 0; color: var(--linial-text); font-size: 13px; line-height: 1.5; }
body.setup-page .setup-review-provenance { color: var(--linial-muted); font-size: 12px; line-height: 1.45; }
body.setup-page .setup-review-add { margin: 12px 0 0; }
body.setup-page .setup-review-add-form { margin: 12px 0 0; }
body.setup-page .setup-review-add-form[hidden] { display: none; }
body.setup-page .setup-review-help { margin: 10px 0 0; color: var(--linial-muted); font-size: 13px; font-weight: 400; line-height: 1.5; }
@media(max-width:640px){body.setup-page .setup-source-review .setup-facts > div { grid-template-columns: minmax(0,1fr); }body.setup-page .setup-source-review .setup-facts label { margin-top: 0; }}
/* Keep streamed onboarding text anchored at the start of the conversation.
   Bottom anchoring made each streamed line push the opening copy upward. */
body.setup-page .setup-current { min-height: 0; align-content: start; gap: 17px; margin-top: 0; padding-top: 12px; }
body.setup-page .setup-current > .setup-message,
body.setup-page .setup-step,
body.setup-page .setup-handoff-step,
body.setup-page .setup-phone-form-step,
body.setup-page .setup-knowledge-step,
body.setup-page .setup-knowledge-topics,
body.setup-page .setup-source-actions,
body.setup-page .setup-source-secondary,
body.setup-page .setup-candidate-footer,
body.setup-page .setup-facts,
body.setup-page .setup-handoff-options,
body.setup-page .setup-transfer-triggers,
body.setup-page .setup-focus-options,
body.setup-page .setup-form,
body.setup-page .setup-phone-handoff,
body.setup-page .setup-phone-provider-request,
body.setup-page .setup-other-connections {
  width: 100%;
  max-width: var(--setup-content-width);
}
body.setup-page .setup-message { color: #d5d9d1; font-size: 15px; line-height: var(--linial-body-line); }
/* Paragraphs are prose by default. Only explicit prompts are emphasized. */
body.setup-page .setup-message > p {
  margin: 0 0 8px;
  color: #d5d9d1;
  font-size: 15px;
  font-weight: 400;
  line-height: var(--linial-body-line);
}
body.setup-page .setup-message > .setup-question,
body.setup-page .setup-message > .setup-title,
body.setup-page .setup-step > .setup-step-title,
body.setup-page .setup-knowledge-topics > .setup-title {
  margin: 0 0 7px;
  color: var(--linial-text);
  font-size: 15px;
  font-weight: 600;
  line-height: var(--linial-body-line);
}
body.setup-page .setup-introduction > p:first-child,
body.setup-page .setup-introduction > p.setup-question { font-size: 15px; line-height: var(--linial-body-line); }
body.setup-page .setup-introduction > p:first-child { font-weight: 400; }
body.setup-page .setup-introduction > p.setup-question { font-weight: 400; }
body.setup-page .setup-message small,
body.setup-page .setup-step > .setup-step-detail,
body.setup-page .setup-knowledge-topics > small { color: var(--linial-muted); font-size: 14.5px; line-height: var(--linial-body-line); }
body.setup-page .setup-history { gap: 32px; padding-bottom: 32px; }
body.setup-page .setup-history-turn { gap: 12px; padding: 0; }
body.setup-page .setup-history:not(:empty) + .setup-current { padding-top: 0; }
body.setup-page .setup-turn-answer {
  position: relative;
  align-self: flex-end;
  width: fit-content;
  max-width: min(88%, 680px);
  gap: 0;
  outline: none;
}
body.setup-page .setup-turn-question { color: #c6cbc2; font-size: 15px; font-weight: 500; line-height: 1.55; }
body.setup-page .setup-turn-answer > p { color: #e7e3d5; font-size: 15px; font-weight: 400; line-height: 1.55; }
body.setup-page .setup-turn-question { max-width: min(88%, 680px); }
body.setup-page .setup-turn-answer > p { max-width: 100%; margin: 0; }
/* On long choice steps, retain the readable/editable chat history but give
   the actual choices enough of the viewport to be discoverable. */
body.setup-page #setup-thread:has(.setup-connection-hub, .setup-knowledge-topics) .setup-history {
  gap: 32px;
  padding-bottom: 12px;
}
body.setup-page #setup-thread:has(.setup-connection-hub, .setup-knowledge-topics) .setup-history-turn { gap: 12px; }
body.setup-page #setup-thread:has(.setup-connection-hub, .setup-knowledge-topics) .setup-turn-question {
  max-width: min(92%, 720px);
  padding: 6px 10px;
}
body.setup-page #setup-thread:has(.setup-connection-hub, .setup-knowledge-topics) .setup-turn-answer {
  max-width: min(96%, 760px);
}
body.setup-page #setup-thread:has(.setup-connection-hub, .setup-knowledge-topics) .setup-turn-answer > p { padding: 6px 10px; }
body.setup-page .setup-turn-answer .setup-edit-message {
  position: absolute;
  top: 100%;
  right: 0;
  min-height: 28px;
  opacity: 0;
  pointer-events: none;
}
body.setup-page .setup-turn-answer:focus-within .setup-edit-message {
  opacity: 1;
  pointer-events: auto;
}
body.setup-page .setup-turn-answer:focus-visible > p {
  outline: 2px solid var(--linial-gold);
  outline-offset: 3px;
}
@media (hover: hover) {
  body.setup-page .setup-turn-answer:hover .setup-edit-message {
    opacity: 1;
    pointer-events: auto;
  }
}
body.setup-page .setup-form { gap: 12px; margin-top: 15px; }
body.setup-page .setup-form label { gap: 6px; font-size: 14px; line-height: 1.45; }
body.setup-page .pms-capability-choices {
  display: grid;
  gap: 9px;
  margin: 2px 0 0;
  padding: 13px 14px 14px;
  border: 1px solid var(--linial-rule);
  border-radius: 7px;
}
body.setup-page .pms-capability-choices legend {
  padding: 0 5px;
  color: var(--linial-text);
  font-size: 14px;
  font-weight: 600;
}
body.setup-page .pms-capability-choices > p { margin: 0 0 2px; }
body.setup-page .pms-capability-choices > label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  margin: 0;
  padding: 3px 0;
  color: var(--linial-text);
}
body.setup-page .pms-capability-choices input[type="checkbox"] { margin: 2px 0 0; }
body.setup-page .pms-capability-choices label span { display: grid; gap: 2px; }
body.setup-page .pms-capability-choices label strong { font-size: 14px; font-weight: 500; line-height: 1.35; }
body.setup-page .pms-capability-choices label small { color: var(--linial-muted); font-size: 13px; line-height: 1.4; }
body.setup-page .setup-form input:not([type="checkbox"]),
body.setup-page .setup-form select,
body.setup-page .setup-form textarea { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
body.setup-page .setup-actions,
body.setup-page .setup-step-actions,
body.setup-page .setup-form-actions,
body.setup-page .setup-knowledge-actions,
body.setup-page .setup-question-actions,
body.setup-page .setup-handoff-actions,
body.setup-page .setup-handoff-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px 14px;
  width: 100%;
  max-width: var(--setup-content-width);
  margin-top: 14px;
  padding: 0;
  border: 0;
}
body.setup-page .setup-step-actions .primary,
body.setup-page .setup-form-actions .primary,
body.setup-page .setup-knowledge-actions .primary,
body.setup-page .setup-source-actions > .primary { min-height: 40px; padding: 8px 13px; font-size: 14px; }
body.setup-page .setup-step-actions > .setup-skip,
body.setup-page .setup-form-actions > .setup-skip,
body.setup-page .setup-form-actions > button[data-skip-setup] {
  min-height: 40px;
  padding: 8px 13px !important;
  border: 1px solid #424841 !important;
  border-radius: 7px;
  background: transparent !important;
  color: #c9cec6 !important;
  font-size: 14px !important;
  line-height: 1.25;
  box-sizing: border-box;
}
body.setup-page .setup-step-actions > .setup-skip:hover,
body.setup-page .setup-form-actions > .setup-skip:hover,
body.setup-page .setup-form-actions > button[data-skip-setup]:hover { background: #242722 !important; }
body.setup-page .setup-back {
  display: inline-flex !important;
  align-items: center;
  min-height: 34px;
  margin: 0 !important;
  padding: 0 2px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--linial-muted) !important;
  font-size: 13px !important;
}
body.setup-page .setup-back:hover { color: var(--linial-gold) !important; text-decoration: underline; text-underline-offset: 3px; }
body.setup-page .setup-phone-route { justify-items: start; gap: 6px; margin-top: 12px; }
body.setup-page .setup-phone-route > span { font-size: 14px; line-height: var(--linial-body-line); }
body.setup-page .setup-phone-route-target strong { font-size: 16px; }
body.setup-page .setup-phone-test { margin-top: 17px; padding-top: 14px; }
body.setup-page .setup-other-connections { margin-top: 17px; padding-top: 13px; }
body.setup-page .setup-source-secondary { justify-content: flex-start; gap: 8px 16px; margin-top: 12px; padding-top: 0; border: 0; }
body.setup-page .setup-focus-options { gap: 8px; }
body.setup-page .setup-focus-options button { min-height: 44px; padding: 9px 11px; border-radius: 7px; font-size: 14px; }
body.setup-page .setup-knowledge-topics > small { display: block; }
body.setup-page .setup-knowledge-custom { width: 100%; max-width: var(--setup-content-width); }
body.setup-page .setup-knowledge-custom input { width: 100%; box-sizing: border-box; }
body.setup-page .setup-composer {
  width: min(100%, 860px);
  min-height: 72px;
  margin: 0 auto;
  padding: 12px 22px;
  border-top: 1px solid var(--linial-rule);
}
body.setup-page .setup-composer input { min-width: 0; font-size: 15px; }
body.setup-page .setup-composer button { width: 44px; height: 44px; flex: 0 0 44px; }
body.setup-page .setup-notice { width: min(100%, 860px); margin: 0 auto; padding: 0 22px 10px; }

/* Staff workspace: consistent title, field and section rhythm without cards. */
body:has(.staff-shell) .staff-shell { width: min(calc(100% - 48px), 1120px); margin: 0 auto; }
body:has(.staff-shell) .staff-nav { gap: 4px; }
body:has(.staff-shell) .staff-nav button { min-height: 38px; padding: 8px 11px; font-size: 14px; }
body:has(.staff-shell) .staff-detail > .detail-header { padding: 20px 0 17px; }
body:has(.staff-shell) .staff-detail > :is(.detail-header, .connection-detail-header) h1 { margin: 0; }
body:has(.staff-shell) .staff-detail h2,
body:has(.staff-shell) .staff-queue h2 { color: var(--linial-text); font-size: 21px; font-weight: 520; line-height: 1.35; }
body:has(.staff-shell) #business-form > .section > h3,
body:has(.staff-shell) .staff-detail > .section > h3 { color: var(--linial-text); font-size: 16px; font-weight: 520; line-height: 1.4; }
body:has(.staff-shell) .staff-detail .section { margin-top: 22px; padding-top: 20px; }
body:has(.staff-shell) .staff-shell .field { gap: 6px; }
body:has(.staff-shell) .staff-shell .field > span,
body:has(.staff-shell) .staff-shell label { color: #c2c7be; font-size: 14px; line-height: 1.45; }
body:has(.staff-shell) .staff-shell :is(input, select, textarea) { max-width: 100%; min-width: 0; font-size: 15px; }
body:has(.staff-shell) .staff-status,
body:has(.staff-shell) .staff-shell .empty { color: var(--linial-muted); font-size: 14px; line-height: var(--linial-body-line); }
body:has(.staff-shell) #today-work > .empty { padding: 20px 0; text-align: left; }
body:has(.staff-shell) .staff-shell :is(button, a.primary) { border-radius: 7px; }
body:has(.staff-shell) .onboarding-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--linial-space-group); }
body:has(.staff-shell) .onboarding-actions a { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 12px; font-size: 14px; font-weight: 500; line-height: 1.4; box-sizing: border-box; }
body:has(.staff-shell) .onboarding-actions .quiet-link { color: var(--linial-muted); padding: 10px 14px !important; }
body:has(.staff-shell) .staff-detail > .section:not(#business-form .section) { padding-bottom: 20px; }

/* Voice demos: keep the action visible, trim dead vertical space. */
:is(.demo-shell, .plans-shell, .phone-demo-shell) { width: min(calc(100% - 48px), 900px); margin: 0 auto; }
:is(.demo-intro, .plans-intro, .phone-demo-intro) { margin-top: 26px; }
:is(.demo-intro h1, .plans-intro h1, .phone-demo-intro h1) { font-size: 22px; font-weight: 520; line-height: 1.4; }
:is(.demo-intro p, .plans-intro > p:not(.eyebrow), .phone-demo-intro p) { max-width: 64ch; font-size: 15px; line-height: var(--linial-body-line); }
.demo-workspace { margin-top: 18px; }
.demo-owner-next { margin-top: 15px; }
.demo-owner-next a { min-height: 40px; padding: 9px 12px; }
:is(.demo-actions button, .phone-demo-shell button) { min-height: 42px; font-size: 14px; }
@media (max-width: 640px) {
  body.setup-page .setup-shell { width: 100%; }
  body.setup-page .setup-head { padding: 0 16px; }
  body.setup-page .setup-head::after { inset-inline-start: 16px; width: calc(100% - 32px); }
  body.setup-page .setup-thread { padding: 20px 16px 14px; }
  body.setup-page .setup-current { gap: 15px; }
  body.setup-page .setup-turn-question,
  body.setup-page .setup-turn-answer { max-width: 94%; }
  body.setup-page .setup-composer { padding: 10px 16px; }
  body.setup-page .setup-notice { padding: 0 16px 10px; }
  body:has(.staff-shell) .staff-shell { width: calc(100% - 32px); }
  :is(.demo-shell, .plans-shell, .phone-demo-shell) { width: calc(100% - 32px); }
}

/* Business matches: make the identity easy to scan and keep fallback actions distinct. */
body.setup-page .setup-candidates button { gap: 5px; }
body.setup-page .setup-candidates button > span {
  color: var(--linial-text);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}
body.setup-page .setup-candidates button > small {
  color: var(--linial-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}
body.setup-page .setup-candidate-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 20px;
  row-gap: 12px;
  margin-top: 18px;
}
body.setup-page .setup-candidate-footer > small { max-width: 52ch; margin: 0; }
body.setup-page .setup-candidate-footer .setup-back { justify-self: end; min-height: 32px; }
body.setup-page .setup-plan-choice { margin: 12px 0 0; color: var(--linial-muted); font-size: 13px; line-height: 1.45; }

@media (max-width: 640px) {
  body.setup-page .setup-candidate-footer { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
  body.setup-page .setup-candidate-footer .setup-back { justify-self: start; }
}

/* Staff pages share a clear identity, generous tab targets, and the same quiet rhythm. */
body:has(.staff-shell) .staff-shell .app-head {
  display: flex;
  justify-content: flex-start;
  height: 72px;
  padding: 0;
  border-bottom: 1px solid var(--linial-rule);
}
body:has(.staff-shell) .staff-nav[hidden] { display: none !important; }
body:has(.staff-shell) .staff-layout.auth-pending .staff-queue { display: none; }
body:has(.staff-shell) .staff-layout.auth-pending .staff-detail { max-width: 900px; }
body:has(.staff-shell) .staff-identity {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
body:has(.staff-shell) .staff-identity .staff-sunflower {
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  color: var(--linial-gold);
}
body:has(.staff-shell) .staff-sunflower svg { display: block; width: 100%; height: 100%; }
body:has(.staff-shell) .staff-identity strong {
  color: var(--linial-text);
  font-size: 15px;
  font-weight: 450;
  line-height: 1.35;
  letter-spacing: 0;
}
body:has(.staff-shell) .staff-plan-link {
  align-self: center;
  margin-left: auto;
  color: var(--linial-muted);
  font-size: 13px;
  text-underline-offset: 3px;
}
body:has(.staff-shell) .staff-plan-link:hover { color: var(--linial-text); }
body:has(.staff-shell) .staff-shell .staff-nav {
  width: min(100%, 900px);
  min-height: 48px;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
  margin: 0 auto 18px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--linial-rule);
}
body:has(.staff-shell) .staff-shell .staff-nav::-webkit-scrollbar { display: none; }
body:has(.staff-shell) .staff-shell .staff-nav button {
  min-width: max-content;
  min-height: 46px;
  padding: 11px 12px 9px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--linial-muted);
  font-size: 14px;
  line-height: 1.3;
  white-space: nowrap;
}
body:has(.staff-shell) .staff-shell .staff-nav button:hover { background: transparent; color: var(--linial-text); }
body:has(.staff-shell) .staff-shell .staff-nav button.active {
  border-bottom-color: var(--linial-gold);
  color: var(--linial-text);
}
body:has(.staff-shell) .staff-shell .staff-nav button:focus-visible { outline-offset: -4px; }
body:has(.staff-shell) .menu-source .add-menu {
  display: inline-flex;
  align-items: center;
  align-self: center;
  min-height: 40px;
  margin: 0;
  padding: 8px 5px;
  color: var(--linial-muted);
}
body:has(.staff-shell) .menu-source .add-menu:hover { background: transparent; color: var(--linial-text); }
@media (max-width: 700px) {
  body:has(.staff-shell) .staff-shell .app-head { height: 64px; }
  body:has(.staff-shell) .staff-identity .staff-sunflower { width: 27px; height: 27px; flex-basis: 27px; }
  body:has(.staff-shell) .staff-shell .staff-nav {
    width: calc(100% + 32px);
    justify-content: flex-start;
    gap: 2px;
    margin-left: -16px;
    margin-bottom: 14px;
    scrollbar-width: thin;
    scrollbar-color: var(--linial-rule) transparent;
  }
  body:has(.staff-shell) .staff-shell .staff-nav::-webkit-scrollbar { display: block; height: 3px; }
  body:has(.staff-shell) .staff-shell .staff-nav::-webkit-scrollbar-thumb { background: var(--linial-rule); }
  body:has(.staff-shell) .staff-shell .staff-nav button { flex: 0 0 auto; min-height: 44px; padding: 10px 5px 8px; font-size: 14px; letter-spacing: 0; }
  body:has(.staff-shell) .staff-detail > header > button.subtle { flex: 0 0 auto; padding-inline: 0; font-size: 14px; white-space: nowrap; }
  body:has(.staff-shell) .menu-source .add-menu { align-self: flex-start; }
}

@media (max-width: 360px) {
  body:has(.staff-shell) .staff-shell .staff-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 2px;
    overflow: visible;
  }
  body:has(.staff-shell) .staff-shell .staff-nav button {
    min-width: 0;
  }
}

@media (max-width: 520px) {
  body:has(.staff-shell) .staff-detail > header.connection-detail-header { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 6px; }
  body:has(.staff-shell) .staff-detail > header.connection-detail-header .connection-back { justify-self: start; }
}

/* Employee setup is part of onboarding, but remains one quiet optional step. */
body.setup-page .setup-team-step { max-width: 620px; }
body.setup-page .setup-team-members {
  display: grid;
  gap: 0;
  margin-top: 16px;
  border-top: 1px solid var(--linial-rule);
}
body.setup-page .setup-team-members > div {
  display: grid;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--linial-rule);
}
body.setup-page .setup-team-members span { color: var(--linial-text); font-size: 14px; }
body.setup-page .setup-team-members small { color: var(--linial-muted); font-size: 13px; }
body.setup-page .setup-team-status { margin: 14px 0 0; color: var(--linial-muted); font-size: 13px; line-height: 1.5; }
body.setup-page .setup-team-direct { max-width: 620px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--linial-rule); }
body.setup-page .setup-team-direct > summary { cursor: pointer; color: var(--linial-muted); font-size: 13px; line-height: 1.5; }
body.setup-page .setup-team-direct > .setup-step-detail { display: block; margin-top: 10px; }
body.setup-page #setup-team-form {
  grid-template-columns: minmax(0, 1fr) minmax(150px, .7fr);
  align-items: start;
  max-width: 620px;
}
body.setup-page #setup-team-form label:nth-of-type(3),
body.setup-page #setup-team-form > button { grid-column: 1 / -1; }
body.setup-page #setup-team-form label > small { display: inline; margin-left: 4px; font-size: 12px; }
body.setup-page #setup-team-form textarea { min-height: 68px; resize: vertical; }
@media (max-width: 560px) {
  body.setup-page #setup-team-form { grid-template-columns: minmax(0, 1fr); }
  body.setup-page #setup-team-form label:nth-of-type(3),
  body.setup-page #setup-team-form > button { grid-column: auto; }
}

/* Connection state follows its title on a phone instead of squeezing the
   description into a three-column row. This applies to every provider row. */
@media (max-width: 640px) {
  body:has(.staff-shell) .connection-row {
    grid-template-columns: minmax(0, 1fr) 20px !important;
    gap: 4px 10px;
  }
  body:has(.staff-shell) .connection-row > div { grid-column: 1; grid-row: 1; min-width: 0; }
  body:has(.staff-shell) .connection-row > .connection-state {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
    white-space: normal;
  }
  body:has(.staff-shell) .connection-row > span:last-child {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
  }
}

/* One compact signal controls whether new work should route to this employee. */
body:has(.staff-shell) .employee-availability {
  display: grid;
  grid-template-columns: auto minmax(150px, 220px) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--linial-rule);
}
body:has(.staff-shell) .employee-availability > label { color: var(--linial-text); font-size: 14px; }
body:has(.staff-shell) .employee-availability select { min-height: 38px; }
body:has(.staff-shell) .employee-schedule {
  margin: 14px 0;
  padding: 10px 0;
  border-top: 1px solid var(--linial-rule);
  border-bottom: 1px solid var(--linial-rule);
}
body:has(.staff-shell) .employee-schedule > summary { cursor: pointer; color: var(--linial-text); font-size: 14px; }
body:has(.staff-shell) .schedule-days { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
body:has(.staff-shell) .schedule-days label { position: relative; cursor: pointer; }
body:has(.staff-shell) .schedule-days input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
body:has(.staff-shell) .schedule-days span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--linial-rule);
  border-radius: 50%;
  color: var(--linial-muted);
}
body:has(.staff-shell) .schedule-days input:checked + span { border-color: var(--linial-accent); color: var(--linial-text); background: color-mix(in srgb, var(--linial-accent) 14%, transparent); }
body:has(.staff-shell) .schedule-days input:focus-visible + span { outline: 2px solid var(--linial-accent); outline-offset: 2px; }
body:has(.staff-shell) .schedule-times { display: grid; grid-template-columns: repeat(2, minmax(0, 180px)); gap: 10px; }
body:has(.staff-shell) .team-member { align-items: center; }
body:has(.staff-shell) .team-member .staff-status { display: block; margin-top: 2px; }
body:has(.staff-shell) .member-access { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
body:has(.staff-shell) .member-access select { width: auto; min-width: 92px; min-height: 36px; padding: 6px 28px 6px 9px; }
body:has(.staff-shell) .member-access button { padding-inline: 6px; }
body:has(.staff-shell) #business-form[aria-readonly="true"] :is(input,textarea,select,button) { opacity: .72; }
body:has(.staff-shell) .team-share { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px 20px; align-items: start; margin: 16px 0; padding: 16px 0; border-block: 1px solid var(--linial-rule); }
body:has(.staff-shell) .team-share strong { display: block; margin: 0 0 4px; font-size: 14px; font-weight: 520; }
body:has(.staff-shell) .team-share p { max-width: 56ch; margin: 0; color: var(--linial-muted); font-size: 13px; line-height: 1.5; }
body:has(.staff-shell) .team-share-actions { display: flex; gap: 8px; align-items: center; }
body:has(.staff-shell) .team-share-options { position: relative; }
body:has(.staff-shell) .team-share-options > summary { min-width: 38px; padding: 8px; color: var(--linial-muted); cursor: pointer; list-style: none; text-align: center; letter-spacing: 1px; }
body:has(.staff-shell) .team-share-options > summary::-webkit-details-marker { display: none; }
body:has(.staff-shell) .team-share-options > button { position: absolute; z-index: 3; top: 38px; right: 0; width: max-content; padding: 8px 10px; background: var(--linial-panel-strong); font-size: 13px; }
body:has(.staff-shell) .team-email-invite { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: end; max-width: 620px; margin: 0; padding-top: 4px; }
body:has(.staff-shell) .team-email-invite[hidden] { display: none; }
body:has(.staff-shell) .team-email-invite .field { margin: 0; }
body:has(.staff-shell) .team-email-invite textarea { min-height: 84px; resize: vertical; }
body:has(.staff-shell) .team-email-invite p { grid-column: 1; margin: 0; }
body:has(.staff-shell) .team-email-actions { display: flex; gap: 8px; align-items: center; }
body:has(.staff-shell) .team-link-fallback { grid-column: 1 / -1; margin: 0; }
body:has(.staff-shell) .team-direct-add { margin-top: 14px; }
body:has(.staff-shell) .team-direct-add > summary { cursor: pointer; color: var(--linial-muted); font-size: 13px; line-height: 1.5; }
body:has(.staff-shell) .team-direct-add > .staff-status { margin-top: 10px; }

/* Connection choices use the same restrained hierarchy as the surrounding chat. */
body.setup-page .setup-connection-hub,
body.setup-page .setup-connection-step,
body.setup-page .setup-connection-complete { max-width: var(--setup-content-width); margin-top: 26px; }
body.setup-page .setup-connection-hub > .setup-title,
body.setup-page .setup-connection-step > .setup-title,
body.setup-page .setup-connection-complete > .setup-title { margin: 0 0 7px; font-size: 17px; font-weight: 500; line-height: 1.45; }
body.setup-page .setup-connection-hub > small,
body.setup-page .setup-connection-step > small { display: block; max-width: 58ch; color: var(--linial-muted); font-size: 14px; font-weight: 400; line-height: 1.5; }
body.setup-page .setup-connection-group { margin-top: 14px; }
body.setup-page .setup-connection-group > p { margin: 0; color: #c5c9c1; }
body.setup-page .setup-connection-list { margin-top: 16px; border-top: 1px solid var(--linial-rule); }
body.setup-page .setup-connection-group .setup-connection-list { margin-top: 5px; }
body.setup-page .setup-connection-choice { display: grid; grid-template-columns: 18px minmax(0,1fr) minmax(112px,auto); gap: 8px 14px; align-items: center; min-height: 58px; margin: 0; padding: 9px 0; border-bottom: 1px solid var(--linial-rule); cursor: pointer; }
body.setup-page .setup-connection-choice > input { width: 16px; height: 16px; margin: 0; accent-color: var(--linial-gold); }
body.setup-page .setup-connection-choice-copy { display: block; min-width: 0; }
body.setup-page .setup-connection-choice-copy > span { display: block; font-size: 15px; font-weight: 500; line-height: 1.4; }
body.setup-page .setup-connection-choice-copy > small { display: block; margin-top: 3px; color: var(--linial-muted); font-size: 13px; font-weight: 400; line-height: 1.45; }
body.setup-page .setup-connection-status { color: var(--linial-muted); font-size: 12px; font-weight: 400; line-height: 1.4; text-align: right; }
body.setup-page .setup-connection-choice.is-unavailable { cursor: not-allowed; }
body.setup-page .setup-connection-choice.is-unavailable .setup-connection-choice-copy,
body.setup-page .setup-connection-choice.is-unavailable .setup-connection-status { opacity: .68; }
body.setup-page .setup-connection-note { max-width: 58ch; margin: 12px 0 0; color: var(--linial-muted); font-size: 13px; font-weight: 400; line-height: 1.5; }
body.setup-page .setup-connection-progress { margin: 0 0 10px; color: var(--linial-muted); font-size: 12px; font-weight: 400; line-height: 1.4; }
body.setup-page .setup-connection-substep { max-width: var(--setup-content-width); margin-top: 18px; }
body.setup-page .setup-connection-substep > .setup-connection-progress { margin-bottom: 8px; }
body.setup-page .setup-connection-substep > .quiet-link { margin-top: 9px; }
body.setup-page .setup-connection-phone-actions { max-width: var(--setup-content-width); margin-top: 14px; }
body.setup-page .setup-connection-step-status { margin: 16px 0 0; color: var(--linial-muted); font-size: 13px; font-weight: 400; line-height: 1.45; }
body.setup-page .setup-connection-hub .setup-step-actions,
body.setup-page .setup-connection-step .setup-step-actions,
body.setup-page .setup-connection-complete .setup-step-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 17px; }
body.setup-page .setup-connection-step .setup-step-actions .primary:disabled,
body.setup-page .setup-connection-hub .setup-step-actions .primary:disabled { opacity: .45; cursor: not-allowed; }
/* Long choice screens keep their action row visible; only the choices scroll. */
body.setup-page:has(.setup-connection-hub, .setup-knowledge-topics) .setup-conversation {
  min-height: 100dvh;
  max-height: 100dvh;
}
body.setup-page #setup-thread:has(.setup-connection-hub, .setup-knowledge-topics) {
  overflow-y: auto;
}
body.setup-page .setup-current:has(.setup-connection-hub, .setup-knowledge-topics) {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  min-height: 0;
  gap: 0;
}
body.setup-page .setup-current:has(.setup-connection-hub, .setup-knowledge-topics) > .setup-handoff-footer {
  flex: 0 0 auto;
}
body.setup-page .setup-connection-substep:has(.setup-knowledge-topics) {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  min-height: 0;
  margin-top: 14px;
}
body.setup-page .setup-connection-substep:has(.setup-knowledge-topics) > .setup-connection-progress {
  flex: 0 0 auto;
}
body.setup-page .setup-connection-hub,
body.setup-page .setup-knowledge-topics {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  min-height: 0;
  margin-top: 14px;
}
body.setup-page .setup-connection-options,
body.setup-page .setup-knowledge-options {
  position: relative;
  flex: 0 0 auto;
  min-height: 0;
  max-height: min(52dvh, 460px);
  margin-top: 12px;
  padding-bottom: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #686d65 transparent;
  scrollbar-width: thin;
}
body.setup-page :is(.setup-connection-options, .setup-knowledge-options)::-webkit-scrollbar { width: 6px; }
body.setup-page :is(.setup-connection-options, .setup-knowledge-options)::-webkit-scrollbar-track { background: transparent; }
body.setup-page :is(.setup-connection-options, .setup-knowledge-options)::-webkit-scrollbar-thumb { border-radius: 6px; background: #686d65; }
body.setup-page .setup-scroll-hint:not([hidden]) { display: block; flex: 0 0 auto; margin: 5px 0 0; color: var(--linial-muted); font-size: 12px; font-weight: 400; line-height: 1.35; }
body.setup-page .setup-connection-footer { max-width: var(--setup-content-width); margin-top: 2px; }
body.setup-page .setup-connection-footer > .setup-back { display: inline-flex; min-height: 34px; margin: 0 !important; padding: 0 2px !important; }
body.setup-page .setup-connection-hub .setup-step-actions,
body.setup-page .setup-knowledge-topics .setup-step-actions {
  flex: 0 0 auto;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--linial-rule);
}
body.setup-page .setup-connection-options > .setup-connection-group:first-child,
body.setup-page .setup-knowledge-options > .setup-focus-options:first-child { margin-top: 0; }
body.setup-page .setup-connection-summary { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--linial-rule); }
body.setup-page .setup-connection-summary > span { font-size: 14px; font-weight: 500; line-height: 1.45; }
body.setup-page .setup-connection-summary > small { color: var(--linial-muted); font-size: 12px; line-height: 1.4; text-align: right; }
body.setup-page .setup-subscription { display: flex; align-items: center; gap: 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--linial-rule); }
body.setup-page .setup-subscription > div { flex: 1; min-width: 0; }
body.setup-page .setup-subscription p { margin: 0 0 3px; font-size: 14px; font-weight: 500; line-height: 1.45; }
body.setup-page .setup-subscription small { display: block; color: var(--linial-muted); font-size: 13px; font-weight: 400; line-height: 1.45; }
body.setup-page .setup-subscription > a { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 38px; font-size: 14px; color: var(--linial-gold); }

body:has(.staff-shell) .request-policy-settings { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--linial-rule); }
body:has(.staff-shell) .request-policy-settings > h3 { margin: 0 0 5px; font-size: 15px; font-weight: 500; line-height: 1.4; }
body:has(.staff-shell) .request-policy-settings > p { max-width: 64ch; margin: 5px 0 0; color: var(--linial-muted); font-size: 13px; line-height: 1.5; }
body:has(.staff-shell) .request-policy-settings .settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }

/* One authority for type. This named layer's important declarations take
   precedence over legacy component-level !important typography, regardless
   of selector specificity, while leaving component layout and colour alone. */
:root {
  --linial-type-display: 26px;
  --linial-type-identity: 20px;
  --linial-type-subheading: 16px;
  --linial-type-metric: 17px;
  --linial-type-copy: 15px;
  --linial-type-detail: 14px;
  --linial-type-meta: 13px;
  --linial-type-lead-headline: 18px;
}
@layer linial-type {
  body [data-linial-type="page-title"] { font-size: var(--linial-type-display) !important; font-weight: 400 !important; line-height: 1.25 !important; }
  body [data-linial-type="business-identity"] { font-size: var(--linial-type-identity) !important; font-weight: 400 !important; line-height: 1.35 !important; }
  body [data-linial-type="section-heading"] { font-size: 18px !important; font-weight: 400 !important; line-height: 1.4 !important; }
  body [data-linial-type="subsection-heading"] { font-size: var(--linial-type-subheading) !important; font-weight: 400 !important; line-height: 1.4 !important; }
  body [data-linial-type="group-heading"] { font-size: var(--linial-type-detail) !important; font-weight: 500 !important; line-height: 1.45 !important; }
  body [data-linial-type="lead-headline"] { font-size: var(--linial-type-lead-headline) !important; font-weight: 600 !important; line-height: 1.4 !important; }
  body [data-linial-type="question"] { font-size: var(--linial-type-copy) !important; font-weight: 600 !important; line-height: 1.55 !important; }
  body.setup-page .setup-introduction [data-linial-type="question"] { font-weight: 400 !important; }
  body [data-linial-type="history-question"] { font-size: var(--linial-type-copy) !important; font-weight: 500 !important; line-height: 1.55 !important; }
  body [data-linial-type="answer"], body [data-linial-type="body"] { font-size: var(--linial-type-copy) !important; font-weight: 400 !important; line-height: 1.55 !important; }
  body [data-linial-type="supporting"] { font-size: var(--linial-type-detail) !important; font-weight: 400 !important; line-height: 1.5 !important; }
  body [data-linial-type="metadata"] { font-size: var(--linial-type-meta) !important; font-weight: 400 !important; line-height: 1.4 !important; }
  body [data-linial-type="status"] { font-size: var(--linial-type-detail) !important; font-weight: 400 !important; line-height: 1.45 !important; }
  body [data-linial-type="field-label"] { font-size: var(--linial-type-detail) !important; font-weight: 500 !important; line-height: 1.45 !important; }
  body [data-linial-type="control"] { font-size: var(--linial-type-detail) !important; font-weight: 500 !important; line-height: 1.35 !important; }
  body [data-linial-type="link"] { font-weight: inherit !important; }
  body [data-linial-type="emphasis"] { font-weight: 600 !important; }
  body [data-linial-type="metric"] { font-size: var(--linial-type-metric) !important; font-weight: 600 !important; line-height: 1.3 !important; }
}

body.setup-page .setup-context { margin: 0 0 4px !important; color: var(--linial-text); }

@media (max-width: 560px) {
  body:has(.staff-shell) .request-policy-settings .settings-grid { grid-template-columns: minmax(0, 1fr); }
  body:has(.staff-shell) .employee-availability { grid-template-columns: auto minmax(0, 1fr); }
  body:has(.staff-shell) .employee-availability .staff-status { grid-column: 1 / -1; }
  body:has(.staff-shell) .schedule-times { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body:has(.staff-shell) .team-member { align-items: flex-start; flex-direction: column; }
  body:has(.staff-shell) .member-access { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  body:has(.staff-shell) .team-share { grid-template-columns: minmax(0,1fr); gap: 12px; }
  body:has(.staff-shell) .team-share-actions { flex-wrap: wrap; }
  body:has(.staff-shell) .team-email-invite { grid-template-columns: minmax(0, 1fr); }
  body:has(.staff-shell) .team-email-actions { grid-row: 3; }
  body.setup-page .setup-connection-choice { grid-template-columns: 18px minmax(0,1fr); gap: 5px 10px; padding: 11px 0; }
  body.setup-page .setup-connection-choice > input { grid-column: 1; grid-row: 1 / span 2; align-self: start; margin-top: 2px; }
  body.setup-page .setup-connection-choice-copy { grid-column: 2; }
  body.setup-page .setup-connection-choice .setup-connection-status { grid-column: 2; text-align: left; }
  body.setup-page .setup-connection-summary { align-items: flex-start; flex-direction: column; gap: 2px; }
  body.setup-page .setup-connection-summary > small { text-align: left; }
  body.setup-page .setup-connection-hub .setup-step-actions,
  body.setup-page .setup-connection-step .setup-step-actions,
  body.setup-page .setup-connection-complete .setup-step-actions { gap: 6px 12px; }
}

/* Plans and the phone example used an outer width reduction plus inner padding.
   On narrow phones that doubled the gutter and cramped both reading columns. */
@media (max-width: 640px) {
  :is(.plans-shell, .phone-demo-shell) {
    width: 100%;
    padding-inline: 16px;
  }
}

/* Keep secondary choices grouped as controls and navigation on its own line.
   The inherited "quiet-link" treatment was reducing these to a cluster of
   bare words; the Back action also sat inline with the decisions it reverses. */
body.setup-page .setup-source-actions { gap: 8px; }
body.setup-page .setup-source-secondary { gap: 8px 10px; }
/* The opening is a compact conversation, not a full-height panel. Keep the
   response field close to the prompt instead of stretching the thread. */
body.setup-page:has(.setup-introduction) .setup-conversation {
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
}
body.setup-page:has(.setup-introduction) .setup-thread { flex: 0 0 auto; padding-bottom: 0; }
body.setup-page .setup-composer {
  position: relative;
  flex: 0 0 auto;
  margin-top: 0;
  border-top: 0;
}
body.setup-page .setup-composer::before {
  position: absolute;
  top: 0;
  left: 22px;
  width: min(var(--setup-content-width), calc(100% - 44px));
  height: 1px;
  background: var(--linial-rule);
  content: "";
}
body.setup-page .setup-composer input {
  flex: 0 1 calc(var(--setup-content-width) - 58px);
  max-width: calc(var(--setup-content-width) - 58px);
  box-sizing: border-box;
}
body.setup-page :is(.setup-source-secondary, .setup-actions, .setup-step-actions,
  .setup-form-actions, .setup-knowledge-actions) > .quiet-link:not(.setup-back) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 11px !important;
  border: 1px solid #3a3e39 !important;
  border-radius: 7px;
  background: transparent !important;
  color: #c8ccc5 !important;
  font-size: 14px !important;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
}
body.setup-page :is(.setup-source-secondary, .setup-actions, .setup-step-actions,
  .setup-form-actions, .setup-knowledge-actions) > .quiet-link:not(.setup-back):hover,
body.setup-page :is(.setup-source-secondary, .setup-actions, .setup-step-actions,
  .setup-form-actions, .setup-knowledge-actions) > .quiet-link:not(.setup-back):focus-visible {
  border-color: #555b52 !important;
  background: #202320 !important;
  color: var(--linial-text) !important;
}
body.setup-page [data-finish-setup] {
  min-height: 40px;
  padding: 8px 14px !important;
  font-size: 16px !important;
  line-height: 1.35;
}
body.setup-page .setup-email-signin [data-signin-status] { margin: 12px 0 0; }
body.setup-page .setup-signin-secondary:not([hidden]) { display: flex; gap: 16px; margin-top: 14px; }
body.setup-page :is(.setup-source-secondary, .setup-actions, .setup-step-actions,
  .setup-form-actions, .setup-knowledge-actions, .setup-question-actions,
  .setup-handoff-actions, .setup-handoff-footer, .setup-candidate-footer) > .setup-back {
  flex: 0 0 auto;
  order: 10;
  width: max-content;
  max-width: 100%;
  min-height: 34px;
  margin: 4px 0 0 !important;
  padding: 0 2px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--linial-muted) !important;
  text-align: left;
}
body.setup-page .setup-source-secondary > .setup-back { flex-basis: 100%; }
body.setup-page .setup-handoff-actions > .setup-handoff-other {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  min-height: 40px !important;
  box-sizing: border-box;
  padding: 8px 11px !important;
  border: 1px solid #3a3e39;
  border-radius: 7px;
  background: transparent;
  color: #c8ccc5;
  font-size: 14px !important;
  line-height: 1.35 !important;
  text-align: center;
  white-space: normal;
}
body.setup-page .setup-handoff-actions > .setup-handoff-other:hover,
body.setup-page .setup-handoff-actions > .setup-handoff-other:focus-visible {
  border-color: #555b52;
  background: #202320;
  color: var(--linial-text);
}
body.setup-page .setup-handoff-actions > .setup-back { flex-basis: 100%; align-self: flex-start; }
body.setup-page :is(.setup-actions, .setup-step-actions, .setup-form-actions, .setup-knowledge-actions, .setup-question-actions) > .setup-back { flex-basis: 100%; align-self: flex-start; }
body.setup-page .setup-candidate-footer { flex-direction: column; align-items: flex-start; }
body.setup-page .setup-candidate-footer > .setup-back { align-self: flex-start; }
body.setup-page .setup-handoff-footer > .setup-back { flex-basis: 100%; }
@media (max-width: 640px) {
  body.setup-page .setup-composer::before { left: 16px; width: calc(100% - 32px); }
}

/* Keep the source-review state visually anchored. The lookup result is one
   decision surface: status, editable details, then approval and secondary
   actions. Do not let the conversation flex rules scatter these controls. */
body.setup-page .setup-source-review {
  width: 100%;
  max-width: var(--setup-content-width);
  box-sizing: border-box;
}
body.setup-page .setup-source-review .setup-source-details {
  width: 100%;
  box-sizing: border-box;
  margin-top: 14px;
  padding: 0 16px 14px;
  border: 1px solid var(--linial-rule);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
}
body.setup-page .setup-source-review .setup-facts > div {
  grid-template-columns: minmax(108px, 136px) minmax(0, 1fr);
  gap: 10px 16px;
  padding: 13px 0;
}
body.setup-page .setup-source-review .setup-facts > div:last-child {
  border-bottom: 0;
}
body.setup-page .setup-source-review .setup-facts label {
  margin: 8px 0 0;
  color: var(--linial-text);
  font-weight: 500;
}
body.setup-page .setup-source-review .setup-review-help {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--linial-rule);
}
body.setup-page .setup-source-review .setup-review-add {
  display: inline-flex;
  margin-top: 12px;
}
body.setup-page .setup-source-review .setup-source-actions {
  width: 100%;
  max-width: var(--setup-content-width);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
  margin-top: 16px;
}
body.setup-page .setup-source-review .setup-source-actions > .primary {
  margin: 0;
}
body.setup-page .setup-source-review .setup-source-secondary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px 12px;
  margin: 0;
}
body.setup-page .setup-source-review .setup-source-secondary > .setup-back {
  flex-basis: auto;
  margin: 0 0 0 auto !important;
}
@media (max-width: 640px) {
  body.setup-page .setup-source-review .setup-source-details {
    padding-inline: 13px;
  }
  body.setup-page .setup-source-review .setup-facts > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    padding: 12px 0;
  }
  body.setup-page .setup-source-review .setup-facts label {
    margin: 0;
  }
  body.setup-page .setup-source-review .setup-source-secondary {
    align-items: flex-start;
    flex-direction: column;
  }
  body.setup-page .setup-source-review .setup-source-secondary > .setup-back {
    margin-left: 0 !important;
  }
}


/* Final source-review contract: keep a failed lookup in one readable card.
   Earlier iterations of this stylesheet tried several flex/grid arrangements
   for the same markup; these rules are the single authority at the end of the
   cascade so the result cannot scatter across the conversation surface. */
body.setup-page:has(.setup-source-review) .setup-current {
  min-height: 0 !important;
  align-content: start !important;
  gap: 0 !important;
  padding-top: 0 !important;
}

body.setup-page .setup-source-review,
body.setup-page .setup-source-review.setup-agent {
  display: block !important;
  width: min(100%, var(--setup-content-width, 680px)) !important;
  max-width: var(--setup-content-width, 680px) !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

body.setup-page .setup-source-review .setup-source-card {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 16px !important;
  border: 1px solid var(--linial-rule, #343934) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .018) !important;
}

body.setup-page .setup-source-review .setup-source-intro,
body.setup-page .setup-source-review .setup-source-details,
body.setup-page .setup-source-review .setup-source-actions {
  position: static !important;
  float: none !important;
  clear: both !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

body.setup-page .setup-source-review .setup-source-intro {
  display: block !important;
  margin: 0 0 14px !important;
}

body.setup-page .setup-source-review .setup-source-details {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

body.setup-page .setup-source-review .setup-facts {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
}

body.setup-page .setup-source-review .setup-facts > div {
  display: grid !important;
  grid-template-columns: minmax(112px, 136px) minmax(0, 1fr) !important;
  align-items: start !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 12px 0 !important;
  gap: 10px 16px !important;
  border-bottom: 1px solid var(--linial-rule, #343934) !important;
}

body.setup-page .setup-source-review .setup-facts > div:last-child {
  border-bottom: 0 !important;
}

body.setup-page .setup-source-review .setup-facts > div[style] {
  opacity: 1 !important;
  transform: none !important;
}

body.setup-page .setup-source-review .setup-facts label,
body.setup-page .setup-source-review .setup-facts small,
body.setup-page .setup-source-review .setup-facts span,
body.setup-page .setup-source-review .setup-review-value {
  display: block !important;
  min-width: 0 !important;
  margin: 0 !important;
}

body.setup-page .setup-source-review .setup-facts label {
  padding-top: 4px !important;
}

body.setup-page .setup-source-review .setup-review-value {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 6px !important;
}

body.setup-page .setup-source-review .setup-facts input,
body.setup-page .setup-source-review .setup-facts textarea,
body.setup-page .setup-source-review .setup-review-value > * {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

body.setup-page .setup-source-review .setup-review-help {
  margin: 12px 0 0 !important;
  padding-top: 12px !important;
  border-top: 1px solid var(--linial-rule, #343934) !important;
}

body.setup-page .setup-source-review .setup-source-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  justify-items: start !important;
  gap: 10px !important;
  margin: 16px 0 0 !important;
  padding: 16px 0 0 !important;
  border-top: 1px solid var(--linial-rule, #343934) !important;
}

body.setup-page .setup-source-review .setup-source-actions > .primary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: max-content !important;
  max-width: 100% !important;
  min-height: 40px !important;
  margin: 0 !important;
}

body.setup-page .setup-source-review .setup-source-secondary {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  min-width: 0 !important;
  gap: 8px 10px !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.setup-page .setup-source-review .setup-source-secondary > .quiet-link:not(.setup-back) {
  display: inline-flex !important;
  align-items: center !important;
  width: max-content !important;
  max-width: 100% !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 8px 11px !important;
  box-sizing: border-box !important;
  border: 1px solid #3a3e39 !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: var(--linial-text, #edeee9) !important;
  text-align: left !important;
  white-space: normal !important;
}

body.setup-page .setup-source-review .setup-source-secondary > .setup-back {
  flex-basis: 100% !important;
  width: max-content !important;
  max-width: 100% !important;
  margin: 2px 0 0 !important;
  padding: 0 2px !important;
  border: 0 !important;
  background: transparent !important;
}

@media (max-width: 640px) {
  body.setup-page .setup-source-review .setup-source-card {
    padding: 14px !important;
  }

  body.setup-page .setup-source-review .setup-facts > div {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 5px !important;
  }

  body.setup-page .setup-source-review .setup-facts label {
    padding-top: 0 !important;
  }

  body.setup-page .setup-source-review .setup-source-secondary {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 7px !important;
  }

  body.setup-page .setup-source-review .setup-source-secondary > .quiet-link:not(.setup-back),
  body.setup-page .setup-source-review .setup-source-secondary > .setup-back {
    width: max-content !important;
  }
}

/* Source review: the result, its context, and its actions are one readable
   form.  Keep the previous answer inside the same column instead of letting
   the chat bubble float against the opposite edge of the viewport. */
body.setup-page .setup-history,
body.setup-page .setup-history-turn {
  width: 100% !important;
  max-width: var(--setup-content-width) !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}
body.setup-page .setup-history-turn {
  margin-inline: 0 !important;
}
body.setup-page .setup-history-turn .setup-user,
body.setup-page .setup-history-turn .setup-turn-answer {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}
body.setup-page .setup-history-turn .setup-user {
  justify-content: flex-end !important;
}
body.setup-page .setup-history-turn .setup-user > p {
  max-width: min(78%, 460px) !important;
}

/* The outer review section owns the visual surface.  This remains correct if
   an older generated module places the action row beside the inner card. */
body.setup-page .setup-source-review,
body.setup-page .setup-source-review.setup-agent {
  display: block !important;
  width: min(100%, var(--setup-content-width)) !important;
  max-width: var(--setup-content-width) !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  border: 1px solid var(--linial-rule, #343934) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .018) !important;
}
body.setup-page .setup-source-review .setup-source-card {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}
body.setup-page .setup-source-review .setup-source-intro,
body.setup-page .setup-source-review .setup-source-details,
body.setup-page .setup-source-review .setup-source-actions {
  position: static !important;
  float: none !important;
  clear: both !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}
body.setup-page .setup-source-review .setup-source-intro {
  margin: 0 0 14px !important;
}
body.setup-page .setup-source-review .setup-source-details {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
body.setup-page .setup-source-review .setup-source-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  justify-items: start !important;
  gap: 10px !important;
  margin: 16px 0 0 !important;
  padding: 16px 0 0 !important;
  border-top: 1px solid var(--linial-rule, #343934) !important;
}
body.setup-page .setup-source-review .setup-source-actions > .primary {
  display: inline-flex !important;
  width: max-content !important;
  max-width: 100% !important;
  margin: 0 !important;
}
body.setup-page .setup-source-review .setup-source-secondary {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: start !important;
  justify-items: start !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  gap: 7px !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.setup-page .setup-source-review .setup-source-secondary > .quiet-link:not(.setup-back) {
  display: inline-flex !important;
  width: max-content !important;
  max-width: 100% !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 8px 11px !important;
  box-sizing: border-box !important;
  text-align: left !important;
  white-space: normal !important;
}
body.setup-page .setup-source-review .setup-source-secondary > .setup-back {
  grid-column: 1 !important;
  width: max-content !important;
  max-width: 100% !important;
  margin: 2px 0 0 !important;
}

/* Source review is one decision surface. Keep every child in normal flow so
   legacy onboarding rules cannot scatter the status, fields, and actions. */
body.setup-page:has(.setup-source-review) .setup-current {
  min-height: 0 !important;
  align-content: start !important;
  gap: 0 !important;
  padding-top: 0 !important;
}
body.setup-page .setup-source-review.setup-agent {
  display: block !important;
  position: static !important;
  width: 100% !important;
  max-width: var(--setup-content-width, 680px) !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
body.setup-page .setup-source-review .setup-source-card,
body.setup-page .setup-source-review .setup-source-intro,
body.setup-page .setup-source-review .setup-source-details,
body.setup-page .setup-source-review .setup-source-actions {
  position: static !important;
  float: none !important;
  clear: both !important;
  grid-column: 1 / -1 !important;
}
body.setup-page .setup-source-review .setup-source-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-content: start !important;
  align-items: stretch !important;
  gap: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  border: 1px solid var(--linial-rule, #343934) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .018) !important;
}
body.setup-page .setup-source-review .setup-source-intro {
  display: block !important;
  width: 100% !important;
  max-width: 66ch !important;
  min-width: 0 !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
}
body.setup-page .setup-source-review .setup-source-details {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
body.setup-page .setup-source-review .setup-facts {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
}
body.setup-page .setup-source-review .setup-facts > div {
  display: grid !important;
  grid-template-columns: minmax(112px, 136px) minmax(0, 1fr) !important;
  align-items: start !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 12px 0 !important;
  box-sizing: border-box !important;
  gap: 10px 16px !important;
  border-bottom: 1px solid var(--linial-rule, #343934) !important;
}
body.setup-page .setup-source-review .setup-facts > div:last-child {
  border-bottom: 0 !important;
}
body.setup-page .setup-source-review .setup-facts > div[style] {
  opacity: 1 !important;
  transform: none !important;
}
body.setup-page .setup-source-review .setup-facts label {
  display: block !important;
  min-width: 0 !important;
  margin: 4px 0 0 !important;
  padding: 0 !important;
}
body.setup-page .setup-source-review .setup-review-value {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  min-width: 0 !important;
  gap: 6px !important;
}
body.setup-page .setup-source-review .setup-facts input,
body.setup-page .setup-source-review .setup-facts textarea,
body.setup-page .setup-source-review .setup-facts span,
body.setup-page .setup-source-review .setup-review-value > * {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}
body.setup-page .setup-source-review .setup-review-evidence,
body.setup-page .setup-source-review .setup-review-provenance { width: 100% !important; }
body.setup-page .setup-source-review .setup-review-evidence summary { width: fit-content !important; }
body.setup-page .setup-source-review .setup-review-help {
  display: block !important;
  width: 100% !important;
  margin: 14px 0 0 !important;
  padding: 14px 0 0 !important;
  border-top: 1px solid var(--linial-rule, #343934) !important;
}
body.setup-page .setup-source-review .setup-review-add,
body.setup-page .setup-source-review .setup-review-add-form {
  display: block !important;
  width: max-content !important;
  max-width: 100% !important;
  margin: 10px 0 0 !important;
}
body.setup-page .setup-source-review .setup-source-actions {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 16px 0 0 !important;
  padding: 16px 0 0 !important;
  border-top: 1px solid var(--linial-rule, #343934) !important;
  gap: 10px !important;
}
body.setup-page .setup-source-review .setup-source-actions > .primary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: max-content !important;
  max-width: 100% !important;
  min-height: 40px !important;
  margin: 0 !important;
}
body.setup-page .setup-source-review .setup-source-secondary {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 8px 12px !important;
}
body.setup-page .setup-source-review .setup-source-secondary > .quiet-link:not(.setup-back) {
  display: inline-flex !important;
  align-items: center !important;
  width: max-content !important;
  max-width: 100% !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 8px 11px !important;
  box-sizing: border-box !important;
  border: 1px solid #3a3e39 !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: var(--linial-text, #edeee9) !important;
  text-align: left !important;
  white-space: normal !important;
}
body.setup-page .setup-source-review .setup-source-secondary > .setup-back {
  flex-basis: 100% !important;
  order: 3 !important;
  width: max-content !important;
  max-width: 100% !important;
  min-height: 34px !important;
  margin: 2px 0 0 !important;
  padding: 0 2px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--linial-muted, #aeb5aa) !important;
}
@media (max-width: 640px) {
  body.setup-page .setup-source-review .setup-source-card {
    padding: 14px !important;
  }
  body.setup-page .setup-source-review .setup-facts > div {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 5px !important;
  }
  body.setup-page .setup-source-review .setup-facts label {
    margin-top: 0 !important;
  }
  body.setup-page .setup-source-review .setup-source-secondary {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 7px !important;
  }
  body.setup-page .setup-source-review .setup-source-secondary > .quiet-link:not(.setup-back),
  body.setup-page .setup-source-review .setup-source-secondary > .setup-back {
    width: max-content !important;
  }
}

/* Source-review layout contract 581. Keep the whole decision in one reading
   column: status, details, approval, recovery, then navigation. The older
   onboarding stylesheet contains historical source-review rules, so these
   final selectors intentionally reset the layout instead of relying on their
   ordering. */
body.setup-page:has(.setup-source-review) .setup-current {
  min-height: 0 !important;
  align-content: start !important;
  gap: 0 !important;
  padding-top: 0 !important;
}
body.setup-page .setup-source-review {
  display: block !important;
  width: min(100%, var(--setup-content-width, 680px)) !important;
  max-width: var(--setup-content-width, 680px) !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.setup-page .setup-source-review .setup-source-card {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 18px !important;
  box-sizing: border-box !important;
  border: 1px solid var(--linial-rule, #343934) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .018) !important;
}
body.setup-page .setup-source-review .setup-source-intro {
  display: block !important;
  width: 100% !important;
  max-width: 66ch !important;
  margin: 0 0 16px !important;
}
body.setup-page .setup-source-review .setup-source-details {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
body.setup-page .setup-source-review .setup-facts {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
}
body.setup-page .setup-source-review .setup-facts > div {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: start !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 12px 0 !important;
  box-sizing: border-box !important;
  gap: 6px !important;
  border-bottom: 1px solid var(--linial-rule, #343934) !important;
}
body.setup-page .setup-source-review .setup-facts > div:last-child {
  border-bottom: 0 !important;
}
body.setup-page .setup-source-review .setup-facts > div[style] {
  opacity: 1 !important;
  transform: none !important;
}
body.setup-page .setup-source-review .setup-facts label {
  display: block !important;
  min-width: 0 !important;
  margin: 0 !important;
}
body.setup-page .setup-source-review .setup-review-value {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  min-width: 0 !important;
  gap: 6px !important;
}
body.setup-page .setup-source-review .setup-facts input,
body.setup-page .setup-source-review .setup-facts textarea,
body.setup-page .setup-source-review .setup-review-value,
body.setup-page .setup-source-review .setup-review-value > * {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
body.setup-page .setup-source-review .setup-review-help {
  margin: 14px 0 0 !important;
  padding-top: 14px !important;
  border-top: 1px solid var(--linial-rule, #343934) !important;
}
body.setup-page .setup-source-review .setup-review-add,
body.setup-page .setup-source-review .setup-review-add-form {
  margin-top: 10px !important;
}
body.setup-page .setup-source-review .setup-source-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  justify-items: start !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 18px 0 0 !important;
  padding: 0 !important;
  gap: 10px !important;
  border: 0 !important;
}
body.setup-page .setup-source-review .setup-source-actions > .primary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: max-content !important;
  max-width: 100% !important;
  margin: 0 !important;
}
body.setup-page .setup-source-review .setup-source-secondary {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  justify-items: start !important;
  align-items: start !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 7px !important;
}
body.setup-page .setup-source-review .setup-source-secondary > .quiet-link {
  display: inline-flex !important;
  align-items: center !important;
  width: max-content !important;
  max-width: 100% !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 8px 11px !important;
  box-sizing: border-box !important;
  border: 1px solid #3a3e39 !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: var(--linial-text, #edeee9) !important;
  white-space: normal !important;
  text-align: left !important;
}
body.setup-page .setup-source-review .setup-source-secondary > .quiet-link:hover,
body.setup-page .setup-source-review .setup-source-secondary > .quiet-link:focus-visible {
  border-color: var(--linial-gold, #d8bd78) !important;
  background: rgba(216, 189, 120, .08) !important;
}
body.setup-page .setup-source-review .setup-source-secondary > .setup-back {
  min-height: 34px !important;
  margin-top: 2px !important;
  padding: 0 2px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--linial-muted, #aeb5aa) !important;
}
@media (min-width: 641px) {
  body.setup-page .setup-source-review .setup-source-secondary {
    grid-template-columns: max-content max-content !important;
    gap: 8px 10px !important;
  }
  body.setup-page .setup-source-review .setup-source-secondary > .setup-back {
    grid-column: 1 / -1 !important;
  }
}
@media (max-width: 640px) {
  body.setup-page .setup-source-review .setup-source-card {
    padding: 14px !important;
  }
}

/* Source review: one stable reading order. This is intentionally the final
   rule set because older onboarding experiments above used incompatible
   flex/grid arrangements for the same markup. */
body.setup-page:has(.setup-source-review) .setup-current {
  min-height: 0 !important;
  align-content: start !important;
  gap: 0 !important;
  padding-top: 0 !important;
}
body.setup-page .setup-source-review {
  display: block !important;
  width: min(100%, var(--setup-content-width, 66ch)) !important;
  max-width: var(--setup-content-width, 66ch) !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
body.setup-page .setup-source-review .setup-source-card {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  border: 1px solid var(--linial-rule, #343934) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.018) !important;
}
body.setup-page .setup-source-review .setup-source-intro {
  display: block !important;
  width: 100% !important;
  max-width: 66ch !important;
  margin: 0 0 14px !important;
}
body.setup-page .setup-source-review .setup-source-details {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
body.setup-page .setup-source-review .setup-facts {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
}
body.setup-page .setup-source-review .setup-facts > div {
  display: grid !important;
  grid-template-columns: minmax(112px, 136px) minmax(0, 1fr) !important;
  align-items: start !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 12px 0 !important;
  box-sizing: border-box !important;
  gap: 10px 16px !important;
  border-bottom: 1px solid var(--linial-rule, #343934) !important;
}
body.setup-page .setup-source-review .setup-facts > div:last-child {
  border-bottom: 0 !important;
}
body.setup-page .setup-source-review .setup-facts > div[style] {
  opacity: 1 !important;
  transform: none !important;
}
body.setup-page .setup-source-review .setup-facts small,
body.setup-page .setup-source-review .setup-facts span,
body.setup-page .setup-source-review .setup-facts label {
  min-width: 0 !important;
  margin: 0 !important;
}
body.setup-page .setup-source-review .setup-facts label {
  display: block !important;
  padding-top: 4px !important;
}
body.setup-page .setup-source-review .setup-facts span,
body.setup-page .setup-source-review .setup-facts textarea,
body.setup-page .setup-source-review .setup-facts input {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}
body.setup-page .setup-source-review .setup-review-help {
  margin: 12px 0 0 !important;
  padding-top: 12px !important;
  border-top: 1px solid var(--linial-rule, #343934) !important;
}
body.setup-page .setup-source-review .setup-source-actions {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 16px 0 0 !important;
  padding: 0 !important;
  gap: 10px !important;
  border: 0 !important;
}
body.setup-page .setup-source-review .setup-source-actions > .primary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: max-content !important;
  max-width: 100% !important;
  margin: 0 !important;
}
body.setup-page .setup-source-review .setup-source-secondary {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 8px 14px !important;
}
body.setup-page .setup-source-review .setup-source-secondary > .quiet-link {
  display: inline-flex !important;
  width: max-content !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.setup-page .setup-source-review .setup-source-secondary > .setup-back {
  flex-basis: 100% !important;
  order: 3 !important;
  margin-top: 2px !important;
}
@media (max-width: 640px) {
  body.setup-page .setup-source-review .setup-source-card {
    padding-inline: 13px !important;
  }
  body.setup-page .setup-source-review .setup-facts > div {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 5px !important;
  }
  body.setup-page .setup-source-review .setup-facts label {
    padding-top: 0 !important;
  }
  body.setup-page .setup-source-review .setup-source-secondary {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 7px !important;
  }
  body.setup-page .setup-source-review .setup-source-secondary > .setup-back {
    grid-column: 1 !important;
  }
}

/* Source-review failure is a form, not a conversation of floating fragments.
   Keep its reading order explicit even when the surrounding onboarding thread
   changes its flex/grid rules. */
body.setup-page .setup-source-review {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  justify-items: stretch;
  width: min(100%, var(--setup-content-width));
  max-width: var(--setup-content-width);
  min-width: 0;
  margin: 0;
  gap: 0;
}
body.setup-page .setup-source-review .setup-source-card {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 16px 16px 15px;
  border: 1px solid var(--linial-rule);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
}
body.setup-page .setup-source-review .setup-source-intro {
  display: block;
  width: 100%;
  max-width: 66ch;
  margin: 0 0 14px !important;
}
body.setup-page .setup-source-review .setup-source-details {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
body.setup-page .setup-source-review .setup-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  margin: 0;
  gap: 0;
}
body.setup-page .setup-source-review .setup-facts > div {
  display: grid;
  grid-template-columns: minmax(112px, 136px) minmax(0, 1fr);
  align-items: start;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  gap: 10px 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--linial-rule);
}
body.setup-page .setup-source-review .setup-facts > div:last-child {
  border-bottom: 0;
}
body.setup-page .setup-source-review .setup-facts label {
  display: block;
  min-width: 0;
  margin: 8px 0 0 !important;
}
body.setup-page .setup-source-review .setup-review-value {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 6px;
}
body.setup-page .setup-source-review .setup-facts input,
body.setup-page .setup-source-review .setup-facts textarea {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
body.setup-page .setup-source-review .setup-review-help {
  margin: 12px 0 0 !important;
  padding-top: 12px;
  border-top: 1px solid var(--linial-rule);
}
body.setup-page .setup-source-review .setup-review-add {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  margin: 12px 0 0;
}
body.setup-page .setup-source-review .setup-source-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  width: 100%;
  max-width: var(--setup-content-width);
  min-width: 0;
  margin: 16px 0 0 !important;
  padding: 0;
  gap: 10px;
}
body.setup-page .setup-source-review .setup-source-actions > .primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  margin: 0;
}
body.setup-page .setup-source-review .setup-source-secondary {
  display: grid !important;
  grid-template-columns: repeat(2, max-content);
  align-items: center;
  justify-content: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  gap: 8px 10px;
}
body.setup-page .setup-source-review .setup-source-secondary > .quiet-link:not(.setup-back) {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  margin: 0 !important;
}
body.setup-page .setup-source-review .setup-source-secondary > .setup-back {
  grid-column: 1 / -1;
  width: max-content;
  max-width: 100%;
  margin: 2px 0 0 !important;
}
@media (max-width: 640px) {
  body.setup-page .setup-source-review .setup-source-card {
    padding-inline: 13px;
  }
  body.setup-page .setup-source-review .setup-facts > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    padding: 12px 0;
  }
  body.setup-page .setup-source-review .setup-facts label {
    margin: 0 !important;
  }
  body.setup-page .setup-source-review .setup-source-secondary {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }
  body.setup-page .setup-source-review .setup-source-secondary > .quiet-link:not(.setup-back),
  body.setup-page .setup-source-review .setup-source-secondary > .setup-back {
    width: max-content;
  }
}


/* Source review must finish as one ordered flow, after all legacy overrides. */
body.setup-page:has(.setup-source-review) .setup-current {
  min-height: 0 !important;
  align-content: start !important;
  gap: 0 !important;
  padding-top: 0 !important;
}
body.setup-page .setup-source-review,
body.setup-page .setup-source-review.setup-agent {
  display: block !important;
  width: min(100%, var(--setup-content-width, 680px)) !important;
  max-width: var(--setup-content-width, 680px) !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  border: 1px solid var(--linial-rule, #343934) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .018) !important;
}
body.setup-page .setup-source-review .setup-source-card,
body.setup-page .setup-source-review .setup-source-intro,
body.setup-page .setup-source-review .setup-source-details,
body.setup-page .setup-source-review .setup-source-actions {
  position: static !important;
  display: block !important;
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}
body.setup-page .setup-source-review .setup-source-card {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
body.setup-page .setup-source-review .setup-source-intro {
  margin: 0 0 14px !important;
}
body.setup-page .setup-source-review .setup-source-details {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
body.setup-page .setup-source-review .setup-source-actions {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 10px !important;
  margin: 16px 0 0 !important;
  padding: 16px 0 0 !important;
  border-top: 1px solid var(--linial-rule, #343934) !important;
}
body.setup-page .setup-source-review .setup-source-actions > .primary {
  display: inline-flex !important;
  width: max-content !important;
  max-width: 100% !important;
  margin: 0 !important;
}
body.setup-page .setup-source-review .setup-source-secondary {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 8px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.setup-page .setup-source-review .setup-source-secondary > .quiet-link:not(.setup-back) {
  display: inline-flex !important;
  width: max-content !important;
  max-width: 100% !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 8px 11px !important;
  box-sizing: border-box !important;
  border: 1px solid #3a3e39 !important;
  border-radius: 7px !important;
  background: transparent !important;
  text-align: left !important;
  white-space: normal !important;
}
body.setup-page .setup-source-review .setup-source-secondary > .setup-back {
  flex: 0 0 auto !important;
  order: 10 !important;
  width: max-content !important;
  max-width: 100% !important;
  margin: 2px 0 0 !important;
  padding: 0 2px !important;
  border: 0 !important;
  background: transparent !important;
}
@media (max-width: 640px) {
  body.setup-page .setup-source-review {
    padding: 14px !important;
  }
  body.setup-page .setup-source-review .setup-source-secondary > .quiet-link:not(.setup-back) {
    width: 100% !important;
  }
}


/* Final source-review layout contract. This deliberately comes last because
   this stylesheet contains legacy onboarding overrides from earlier routes. */
body.setup-page .setup-source-review {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-content: start !important;
  justify-items: stretch !important;
  width: min(100%, var(--setup-content-width)) !important;
  max-width: var(--setup-content-width) !important;
  min-width: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
}
body.setup-page .setup-source-review .setup-source-card {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  padding: 16px !important;
  border: 1px solid var(--linial-rule) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.018) !important;
}
body.setup-page .setup-source-review .setup-source-intro {
  display: block !important;
  width: 100% !important;
  max-width: 66ch !important;
  margin: 0 0 14px !important;
}
body.setup-page .setup-source-review .setup-source-details {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
body.setup-page .setup-source-review .setup-facts {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
}
body.setup-page .setup-source-review .setup-facts > div {
  display: grid !important;
  grid-template-columns: minmax(112px, 136px) minmax(0, 1fr) !important;
  align-items: start !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  gap: 10px 16px !important;
  padding: 12px 0 !important;
  border-bottom: 1px solid var(--linial-rule) !important;
}
body.setup-page .setup-source-review .setup-facts > div:last-child {
  border-bottom: 0 !important;
}
body.setup-page .setup-source-review .setup-facts label {
  display: block !important;
  min-width: 0 !important;
  margin: 8px 0 0 !important;
}
body.setup-page .setup-source-review .setup-review-value {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  min-width: 0 !important;
  gap: 6px !important;
}
body.setup-page .setup-source-review .setup-facts input,
body.setup-page .setup-source-review .setup-facts textarea {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}
body.setup-page .setup-source-review .setup-review-help {
  margin: 12px 0 0 !important;
  padding-top: 12px !important;
  border-top: 1px solid var(--linial-rule) !important;
}
body.setup-page .setup-source-review .setup-source-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  justify-items: start !important;
  width: 100% !important;
  max-width: var(--setup-content-width) !important;
  min-width: 0 !important;
  margin: 16px 0 0 !important;
  padding: 0 !important;
  gap: 10px !important;
}
body.setup-page .setup-source-review .setup-source-actions > .primary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: max-content !important;
  max-width: 100% !important;
  margin: 0 !important;
}
body.setup-page .setup-source-review .setup-source-secondary {
  display: grid !important;
  grid-template-columns: repeat(2, max-content) !important;
  align-items: center !important;
  justify-content: start !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 8px 10px !important;
}
body.setup-page .setup-source-review .setup-source-secondary > .quiet-link:not(.setup-back) {
  display: inline-flex !important;
  width: max-content !important;
  max-width: 100% !important;
  margin: 0 !important;
}
body.setup-page .setup-source-review .setup-source-secondary > .setup-back {
  grid-column: 1 / -1 !important;
  width: max-content !important;
  max-width: 100% !important;
  margin: 2px 0 0 !important;
}
@media (max-width: 640px) {
  body.setup-page .setup-source-review .setup-source-card {
    padding-inline: 13px !important;
  }
  body.setup-page .setup-source-review .setup-facts > div {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 5px !important;
    padding: 12px 0 !important;
  }
  body.setup-page .setup-source-review .setup-facts label {
    margin: 0 !important;
  }
  body.setup-page .setup-source-review .setup-source-secondary {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
  }
  body.setup-page .setup-source-review .setup-source-secondary > .quiet-link:not(.setup-back),
  body.setup-page .setup-source-review .setup-source-secondary > .setup-back {
    width: max-content !important;
  }
}

/* The lookup result is one decision surface. Keep the explanation, any
   actual fields, and the recovery controls in a stable reading order. */
body.setup-page .setup-source-review {
  display: block !important;
  width: 100%;
  max-width: var(--setup-content-width);
  min-width: 0;
  box-sizing: border-box;
}
body.setup-page .setup-source-review .setup-source-card {
  width: 100%;
  box-sizing: border-box;
  padding: 15px 16px 16px;
  border: 1px solid var(--linial-rule);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
}
body.setup-page .setup-source-review .setup-source-intro {
  display: block;
  width: 100%;
  max-width: 66ch;
  margin: 0 !important;
}
body.setup-page .setup-source-review .setup-source-details {
  display: block;
  width: 100%;
  margin: 14px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
body.setup-page .setup-source-review .setup-facts {
  display: grid;
  width: 100%;
  min-width: 0;
  margin: 0;
}
body.setup-page .setup-source-review .setup-facts > div {
  display: grid;
  grid-template-columns: minmax(108px, 136px) minmax(0, 1fr);
  align-items: start;
  gap: 10px 16px;
  width: 100%;
  min-width: 0;
  padding: 12px 0;
  box-sizing: border-box;
}
body.setup-page .setup-source-review .setup-facts > div[style] {
  opacity: 1 !important;
  transform: none !important;
}
body.setup-page .setup-source-review .setup-facts label {
  display: block;
  min-width: 0;
  margin: 8px 0 0 !important;
}
body.setup-page .setup-source-review .setup-review-value {
  display: grid;
  min-width: 0;
  gap: 6px;
}
body.setup-page .setup-source-review .setup-facts input,
body.setup-page .setup-source-review .setup-facts textarea {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
body.setup-page .setup-source-review .setup-source-empty {
  display: block;
  margin: 0;
  padding: 10px 0 2px;
  color: var(--linial-muted);
}
body.setup-page .setup-source-review .setup-review-help {
  margin: 12px 0 0 !important;
  padding-top: 12px;
  border-top: 1px solid var(--linial-rule);
}
body.setup-page .setup-source-review .setup-review-add {
  display: inline-flex;
  margin: 12px 0 0;
}
body.setup-page .setup-source-review .setup-source-actions {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  justify-items: initial;
  width: 100%;
  max-width: var(--setup-content-width);
  margin: 16px 0 0 !important;
  padding: 0;
  gap: 10px;
  box-sizing: border-box;
}
body.setup-page .setup-source-review .setup-source-actions > .primary {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  margin: 0;
}
body.setup-page .setup-source-review .setup-source-secondary {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 8px 10px;
  margin: 0 !important;
  padding: 0 !important;
}
body.setup-page .setup-source-review .setup-source-secondary > .quiet-link:not(.setup-back) {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  margin: 0 !important;
}
body.setup-page .setup-source-review .setup-source-secondary > .setup-back {
  flex-basis: 100%;
  width: max-content;
  max-width: 100%;
  margin: 2px 0 0 !important;
}
@media (max-width: 640px) {
  body.setup-page .setup-source-review .setup-source-card {
    padding-inline: 13px;
  }
  body.setup-page .setup-source-review .setup-facts > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }
  body.setup-page .setup-source-review .setup-facts label {
    margin: 0 !important;
  }
  body.setup-page .setup-source-review .setup-source-secondary {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }
  body.setup-page .setup-source-review .setup-source-secondary > .quiet-link:not(.setup-back),
  body.setup-page .setup-source-review .setup-source-secondary > .setup-back {
    width: max-content;
  }
}


/* Keep the public-lookup result as one predictable decision surface.  The
   failure state has one primary decision, two related recovery actions, and
   one navigation action; they should never look like unrelated floating text. */
body.setup-page .setup-source-review {
  display: block;
  min-width: 0;
}
body.setup-page .setup-source-review .setup-source-details,
body.setup-page .setup-source-review .setup-source-actions {
  position: relative;
  z-index: 0;
}
body.setup-page .setup-source-review .setup-source-details {
  margin-top: 16px;
}
body.setup-page .setup-source-review .setup-source-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  gap: 12px;
  margin-top: 16px;
}
body.setup-page .setup-source-review .setup-source-actions > .primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 100%;
  margin: 0;
}
body.setup-page .setup-source-review .setup-source-secondary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
  gap: 8px 10px;
  margin: 0;
}
body.setup-page .setup-source-review .setup-source-secondary > .quiet-link:not(.setup-back) {
  flex: 0 1 auto;
  margin: 0;
}
body.setup-page .setup-source-review .setup-source-secondary > .setup-back {
  flex: 0 0 100%;
  order: 10;
  width: max-content;
  max-width: 100%;
  margin: 3px 0 0 !important;
  padding: 0 2px !important;
}
@media (max-width: 640px) {
  body.setup-page .setup-source-review .setup-source-actions {
    gap: 10px;
  }
  body.setup-page .setup-source-review .setup-source-secondary {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }
  body.setup-page .setup-source-review .setup-source-secondary > .quiet-link:not(.setup-back),
  body.setup-page .setup-source-review .setup-source-secondary > .setup-back {
    width: max-content;
    max-width: 100%;
  }
  body.setup-page .setup-source-review .setup-source-secondary > .setup-back {
    margin-top: 2px !important;
  }
}

/* Source-review state: one ordered, readable decision surface. */
body.setup-page:has(.setup-source-review) .setup-current {
  min-height: 0 !important;
  align-content: start !important;
  gap: 0 !important;
  padding-top: 0 !important;
}
body.setup-page .setup-source-review,
body.setup-page .setup-source-review.setup-agent {
  display: block !important;
  width: min(100%, var(--setup-content-width, 680px)) !important;
  max-width: var(--setup-content-width, 680px) !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  border: 1px solid var(--linial-rule, #343934) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .018) !important;
}
body.setup-page .setup-source-review [hidden] {
  display: none !important;
}
body.setup-page .setup-source-review .setup-source-card,
body.setup-page .setup-source-review .setup-source-intro,
body.setup-page .setup-source-review .setup-source-details,
body.setup-page .setup-source-review .setup-source-actions {
  position: static !important;
  display: block !important;
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}
body.setup-page .setup-source-review .setup-source-card {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
body.setup-page .setup-source-review .setup-source-intro {
  margin: 0 0 14px !important;
}
body.setup-page .setup-source-review .setup-source-details {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
body.setup-page .setup-source-review .setup-facts {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.setup-page .setup-source-review .setup-facts > div {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: var(--linial-space-close) !important;
  align-items: start !important;
  width: 100% !important;
  margin: 0 !important;
  padding: var(--linial-space-group) 0 !important;
  box-sizing: border-box !important;
  border-bottom: 1px solid var(--linial-rule, #343934) !important;
}
body.setup-page .setup-source-review .setup-facts > div:last-child {
  border-bottom: 0 !important;
}
body.setup-page .setup-source-review .setup-facts label {
  display: block !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.setup-page .setup-source-review .setup-review-value {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 6px !important;
  min-width: 0 !important;
  margin: 0 !important;
}
body.setup-page .setup-source-review .setup-facts input,
body.setup-page .setup-source-review .setup-facts textarea,
body.setup-page .setup-source-review .setup-review-value > * {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}
body.setup-page .setup-source-review .setup-review-help {
  margin: 12px 0 0 !important;
  padding-top: 12px !important;
  border-top: 1px solid var(--linial-rule) !important;
}
body.setup-page .setup-source-review .setup-source-actions {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 10px !important;
  margin: 16px 0 0 !important;
  padding: 16px 0 0 !important;
  border-top: 1px solid var(--linial-rule, #343934) !important;
}
body.setup-page .setup-source-review .setup-source-actions > .primary {
  display: inline-flex !important;
  width: max-content !important;
  max-width: 100% !important;
  margin: 0 !important;
}
body.setup-page .setup-source-review .setup-source-secondary {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 8px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.setup-page .setup-source-review .setup-source-secondary > .quiet-link:not(.setup-back) {
  display: inline-flex !important;
  align-items: center !important;
  width: max-content !important;
  max-width: 100% !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 8px 11px !important;
  box-sizing: border-box !important;
  border: 1px solid #3a3e39 !important;
  border-radius: 7px !important;
  background: transparent !important;
  text-align: left !important;
  white-space: normal !important;
}
body.setup-page .setup-source-review .setup-source-secondary > .setup-back {
  flex: 0 0 auto !important;
  order: 10 !important;
  width: max-content !important;
  max-width: 100% !important;
  margin: 2px 0 0 !important;
  padding: 0 2px !important;
  border: 0 !important;
  background: transparent !important;
}
@media (max-width: 640px) {
  body.setup-page .setup-source-review {
    padding: 14px !important;
  }
  body.setup-page .setup-source-review .setup-facts > div {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 5px !important;
  }
  body.setup-page .setup-source-review .setup-facts label {
    margin-top: 0 !important;
  }
  body.setup-page .setup-source-review .setup-source-secondary > .quiet-link:not(.setup-back) {
    width: 100% !important;
  }
}
#staff-detail label.field:has(input[data-field-key="requested_items"]){display:none}
body.setup-page .setup-source-review .setup-facts .setup-review-field-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 8px !important;
  min-width: 0 !important;
}
body.setup-page .setup-source-review .setup-facts .setup-review-field-head > label:not(.setup-review-include) {
  display: block !important;
  min-width: 0 !important;
  margin: 4px 0 0 !important;
  padding: 0 !important;
  color: var(--linial-text) !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
}
body.setup-page .setup-source-review .setup-facts .setup-review-include {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  gap: 5px !important;
  margin: 0 !important;
  padding: 3px 0 0 !important;
  color: var(--linial-muted) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  white-space: nowrap !important;
  cursor: pointer;
}
body.setup-page .setup-source-review .setup-facts .setup-review-include input {
  display: block !important;
  flex: 0 0 14px !important;
  width: 14px !important;
  height: 14px !important;
  min-height: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: var(--linial-gold);
}
body.setup-page .setup-source-review .setup-facts .setup-review-include span {
  display: inline !important;
  width: auto !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
}

/* Public lead evidence in an employee task: readable, restrained, source-first. */
body:has(.staff-shell) .staff-detail .public-lead-context > h3 {
  margin: 0 0 12px;
  color: var(--linial-text);
  font-size: 16px;
  font-weight: 520;
  line-height: 1.4;
}
body:has(.staff-shell) .staff-detail .public-lead-post {
  max-width: 68ch;
  margin: 0 0 10px;
  color: var(--linial-text);
  font-size: 15px;
  line-height: 1.55;
}
body:has(.staff-shell) .staff-detail .public-lead-detail {
  max-width: 68ch;
  margin: 12px 0;
  color: var(--linial-text);
  font-size: 14px;
  line-height: 1.5;
}
body:has(.staff-shell) .staff-detail .public-lead-detail > span {
  display: block;
  margin-bottom: 3px;
  color: var(--linial-muted);
  font-size: 12px;
  line-height: 1.4;
}

/* Public introduction and operational work use one deliberate type hierarchy. */
@layer linial-type {
  body.linial-home-page .home-hero h1 { font-size:clamp(32px,3.4vw,48px) !important; font-weight:400 !important; line-height:1.08 !important; letter-spacing:-.025em !important; }
  body.linial-home-page .footer-brand { color:#aaaaaa !important; }
  body.linial-home-page .home-capabilities h3 { font-size:24px !important; font-weight:400 !important; line-height:1.15 !important; letter-spacing:-.02em !important; }
  body.linial-home-page .home-capabilities p { font-size:16px !important; line-height:1.5 !important; letter-spacing:0 !important; }
  body.linial-home-page .hero-lede { font-size:18px !important; font-weight:400 !important; line-height:1.6 !important; letter-spacing:0 !important; }
  body.linial-home-page .hero-clinic { font-size:15px !important; font-weight:400 !important; line-height:1.6 !important; }
  body.linial-home-page .workflow-preview > h2 { font-size:24px !important; font-weight:400 !important; line-height:1.25 !important; letter-spacing:0 !important; }
  body.linial-home-page .home-handoff h3 { font-size:14px !important; font-weight:400 !important; line-height:1.4 !important; }
  body.linial-home-page .home-handoff p { font-size:13px !important; font-weight:400 !important; line-height:1.55 !important; }
  body.linial-home-page .home-principles h2 { font-size:15px !important; font-weight:400 !important; line-height:1.4 !important; letter-spacing:0 !important; }
  body.linial-home-page .home-principles p { font-size:14px !important; font-weight:400 !important; line-height:1.6 !important; }
  body.linial-monochrome [data-linial-type="page-title"] { font-size:30px !important; font-weight:400 !important; line-height:1.15 !important; letter-spacing:-.02em !important; }
  body.linial-monochrome [data-linial-type="section-heading"] { font-size:22px !important; font-weight:400 !important; line-height:1.3 !important; letter-spacing:0 !important; }
  body.linial-monochrome [data-linial-type="subsection-heading"] { font-weight:400 !important; }
  body.linial-monochrome.setup-page .clinic-setup-title { font-size:18px !important; font-weight:400 !important; line-height:1.5 !important; letter-spacing:0 !important; }
  body.linial-monochrome.setup-page :is([data-linial-type="question"],.setup-title,.setup-step-title) { font-size:26px !important; font-weight:400 !important; line-height:1.25 !important; letter-spacing:-.015em !important; }
  body.linial-monochrome.setup-page [data-linial-type="history-question"] { font-size:14px !important; font-weight:400 !important; }
  body.linial-monochrome.setup-page [data-linial-type="answer"] { font-size:15px !important; font-weight:400 !important; }
  body.linial-monochrome :is(.clinic-brand-name,.brand-name,.availability-brand,.agent-screen-identity strong) { font-size:24px !important; font-weight:400 !important; letter-spacing:0 !important; }
  body.linial-monochrome .clinic-task-choice strong { font-size:16px !important; font-weight:500 !important; line-height:1.3 !important; letter-spacing:-.01em !important; }
  body.linial-monochrome .clinic-choice-next { font-size:13px !important; font-weight:400 !important; line-height:1.5 !important; }
  body.linial-monochrome .clinic-choice-meta { font-size:12px !important; font-weight:400 !important; line-height:1.4 !important; }
  body.linial-monochrome :is(.clinic-task-heading h2,.clinic-demo-task-title) { font-size:24px !important; font-weight:400 !important; line-height:1.2 !important; letter-spacing:-.02em !important; }
  body.linial-monochrome .clinic-demo-owner { font-size:13px !important; font-weight:400 !important; line-height:1.5 !important; letter-spacing:0 !important; }
  body.linial-monochrome :is(.clinic-workflow>p,.clinic-demo-next) { font-size:16px !important; line-height:1.5 !important; letter-spacing:0 !important; }
  body.linial-monochrome :is(.clinic-fields,.setup-form,.connection-form) label { font-size:14px !important; font-weight:500 !important; line-height:1.4 !important; }
  body.linial-monochrome :is(input,select,textarea) { font-size:15px !important; font-weight:400 !important; line-height:1.4 !important; }
  @media(max-width:760px) {
    body.linial-monochrome :is(input,select,textarea) { font-size:16px !important; }
    body.linial-home-page .home-hero h1 { font-size:30px !important; line-height:1.15 !important; }
    body.linial-home-page .home-capabilities h3 { font-size:23px !important; }
    body.linial-home-page .home-capabilities p { font-size:16px !important; }
    body.linial-home-page .hero-lede { font-size:17px !important; }
    body.linial-home-page .workflow-preview > h2 { font-size:22px !important; }
    body.linial-monochrome [data-linial-type="page-title"] { font-size:26px !important; }
    body.linial-monochrome [data-linial-type="section-heading"] { font-size:20px !important; }
    body.linial-monochrome :is(.clinic-brand-name,.brand-name,.availability-brand,.agent-screen-identity strong) { font-size:22px !important; }
    body.linial-monochrome.setup-page .clinic-setup-title { font-size:14px !important; }
    body.linial-monochrome.setup-page :is([data-linial-type="question"],.setup-title,.setup-step-title) { font-size:22px !important; line-height:1.3 !important; }
  }
}

/* Keep the full setup navigation on narrow phones without wrapping its labels. */
@layer linial-type {
  @media(max-width:380px) {
    body.linial-monochrome .setup-head :is(.clinic-setup-back,.linial-install-action) { font-size:12px !important; }
  }
}
