/* Pace product UI.
 *
 * Two colours do the work: navy for everything structural, electric blue
 * reserved for exactly three things — the primary action, focus, and the step
 * you are currently on. If blue starts appearing anywhere else it has stopped
 * meaning anything.
 *
 * Neutrals are mixed from the navy rather than taken from a grey ramp, so the
 * page reads as one temperature instead of colour-on-grey.
 */

:root {
  --ink:        #0B1220;   /* navy: primary text, dark surfaces */
  --ink-2:      #3A4658;   /* secondary text */
  --ink-3:      #6E7C90;   /* muted, captions, help */
  --line:       #E2E7EF;   /* hairline */
  --line-2:     #EFF2F7;   /* softer divider */
  --canvas:     #F6F8FC;   /* page ground */
  --surface:    #FFFFFF;

  --blue:       #2D7FF9;
  --blue-press: #1B62D6;
  --blue-wash:  #EDF4FE;

  --green:      #0E7C56;  --green-wash: #E7F5EF;
  --red:        #B32F46;  --red-wash:   #FCEDF0;
  --amber:      #8A5A10;  --amber-wash: #FAF1E2;

  --r:   6px;              /* one radius, used nearly everywhere */
  --r-s: 4px;
  --shadow: 0 1px 2px rgba(11, 18, 32, .05), 0 1px 1px rgba(11, 18, 32, .04);

  --font: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system,
          "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --- layout ------------------------------------------------------------- */

main.shell { max-width: 880px; margin: 0 auto; padding: 32px 24px 80px; }

main.auth {
  max-width: 404px;
  margin: 0 auto;
  padding: 72px 24px 80px;
}
main.auth .card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 36px 32px 32px;
  box-shadow: var(--shadow);
}
main.auth .below { margin: 20px 4px 0; font-size: 13.5px; color: var(--ink-3); }

/* --- type --------------------------------------------------------------- */

h1 {
  margin: 0 0 8px;
  font-size: 27px;
  line-height: 1.22;
  font-weight: 600;
  letter-spacing: -.021em;
}
h2 {
  margin: 32px 0 10px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -.012em;
}
p { margin: 0 0 14px; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-press); text-decoration: underline; }

.muted { color: var(--ink-3); }
.lede  { font-size: 15.5px; color: var(--ink-2); margin-bottom: 26px; }

/* The one uppercase treatment in the system. Used for step numerals and stat
   captions only — it loses its force the moment it decorates a heading. */
.eyebrow, .stats .k, .step-num {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .085em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

/* --- brand bar ---------------------------------------------------------- */

nav.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
nav.topbar .brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -.02em;
  color: var(--ink);
}
nav.topbar .brand:hover { text-decoration: none; }
nav.topbar .who { font-size: 13px; color: var(--ink-3); }
nav.topbar .who a { color: var(--ink-2); }

.wordmark {
  display: flex; align-items: center; gap: 9px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.022em;
  color: var(--ink);
  margin-bottom: 28px;
}

/* The logo mark sits in front of every "Pace" wordmark. Sized in em so it
   tracks whatever size the wordmark is set at. */
.mark { width: 1.45em; height: 1.45em; flex: 0 0 auto; display: block; }

/* --- the setup step rail ------------------------------------------------ */
/* A top bar per step rather than pills: pills all look equally clickable and
   equally important, which is the opposite of what a progress indicator is
   for. The bar carries the state; the label just names it. */

ol.steps {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  list-style: none;
  margin: 4px 0 34px;
  padding: 0;
}
ol.steps li {
  padding: 10px 2px 0;
  border-top: 2px solid var(--line);
  color: var(--ink-3);
  transition: border-color .15s ease, color .15s ease;
}
ol.steps li .step-num   { display: block; color: var(--ink-3); margin-bottom: 1px; }
ol.steps li .step-label { display: block; font-size: 13.5px; line-height: 1.3; }

ol.steps li.done { border-top-color: var(--blue); color: var(--ink-2); }
ol.steps li.done .step-num { color: var(--blue); }

ol.steps li.now {
  border-top-color: var(--blue);
  color: var(--ink);
}
ol.steps li.now .step-num   { color: var(--blue); }
ol.steps li.now .step-label { font-weight: 600; }

@media (max-width: 640px) {
  ol.steps { grid-auto-flow: row; grid-auto-columns: auto; gap: 0; }
  ol.steps li { border-top: 0; border-left: 2px solid var(--line);
                padding: 6px 0 6px 12px; }
  ol.steps li.done, ol.steps li.now { border-left-color: var(--blue); }
}

/* The live stage line under "Writing your assistant". */
.stage {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--blue);
  background: var(--blue-wash);
  border-radius: var(--r-s);
  padding: 3px 9px;
  font-variant-numeric: tabular-nums;
}

/* --- forms -------------------------------------------------------------- */

label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin: 18px 0 6px;
}
.help { font-size: 12.5px; color: var(--ink-3); margin: -2px 0 6px; }

input[type=text], input[type=email], input[type=password],
input[type=number], input[type=tel], select, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 9px 11px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
input::placeholder, textarea::placeholder { color: #9AA6B6; }
input:focus, select:focus, textarea:focus {
  outline: 0;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-wash);
}
textarea { min-height: 88px; resize: vertical; line-height: 1.55; }

fieldset {
  margin: 28px 0;
  padding: 4px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
legend {
  padding: 0 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.008em;
  color: var(--ink);
}
.service-slot {
  padding: 16px 0;
  border-bottom: 1px solid var(--line-2);
}
.service-slot:last-child { border-bottom: 0; padding-bottom: 0; }

/* --- buttons ------------------------------------------------------------ */

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -.005em;
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: var(--r);
  padding: 9px 18px;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
button:hover, .button:hover {
  background: var(--blue-press);
  border-color: var(--blue-press);
  text-decoration: none;
  color: #fff;
}
button:focus-visible, .button:focus-visible {
  outline: 0; box-shadow: 0 0 0 3px var(--blue-wash);
}
button.wide, .button.wide { width: 100%; padding: 11px 18px; }

button.secondary, .button.secondary {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}
button.secondary:hover, .button.secondary:hover {
  background: #FAFBFD; border-color: #CFD7E3; color: var(--ink);
}
a.button { text-decoration: none; }

/* --- notices ------------------------------------------------------------ */

.error, .saved, .notice {
  font-size: 13.5px;
  border: 1px solid;
  border-radius: var(--r);
  padding: 10px 13px;
  margin: 0 0 14px;
}
.error  { color: var(--red);   background: var(--red-wash);   border-color: #F3CFD7; }
.saved  { color: var(--green); background: var(--green-wash); border-color: #C8E6DA; }
.notice { color: var(--ink-2); background: var(--surface);    border-color: var(--line); }

/* --- tables ------------------------------------------------------------- */

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  font-size: 14px;
}
th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: #FAFBFD;
}
th, td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
tr:last-child td { border-bottom: 0; }

/* --- tabs, stats, pills, transcript ------------------------------------- */

.tabs {
  display: flex;
  gap: 20px;
  margin: 0 0 24px;
  border-bottom: 1px solid var(--line);
}
.tabs a {
  padding: 0 0 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--blue); }

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 0 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.stats div {
  flex: 1 1 120px;
  padding: 14px 18px;
  border-right: 1px solid var(--line-2);
}
.stats div:last-child { border-right: 0; }
.stats .n {
  display: block;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.stats .k { display: block; color: var(--ink-3); margin-top: 2px; }

.pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line);
  color: var(--ink-2);
  background: var(--surface);
}
.pill.booked    { color: var(--green); background: var(--green-wash); border-color: #C8E6DA; }
.pill.lost      { color: var(--ink-3); background: #F4F6FA;           border-color: var(--line); }
.pill.escalated { color: var(--amber); background: var(--amber-wash); border-color: #EFDCBE; }
.pill.error     { color: var(--red);   background: var(--red-wash);   border-color: #F3CFD7;
                  padding: 2px 9px; margin: 0; font-size: 12px; }

.msg {
  margin: 12px 0;
  padding: 10px 14px;
  border-radius: 8px;
  max-width: 40rem;
  white-space: pre-wrap;
  /* A pasted URL or an unbroken blob would otherwise stretch the bubble past
     its max-width and push the page sideways. */
  overflow-wrap: anywhere;
  font-size: 14px;
}
.msg.lead { background: var(--surface); border: 1px solid var(--line); }
.msg.bot  { background: var(--blue-wash); margin-left: 56px; }
.msg .meta {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-bottom: 3px;
  font-weight: 500;
}

/* --- completeness meter -------------------------------------------------- */
/* A thin track, not a chunky bar. It is a status line, not a feature. */

.progress { display: flex; align-items: center; gap: 12px; margin: 0 0 28px; }
.progress .track {
  flex: 1; height: 4px; background: var(--line);
  border-radius: 2px; overflow: hidden;
}
.progress .fill { height: 100%; background: var(--blue); border-radius: 2px; }
.progress .count {
  font-size: 12.5px; color: var(--ink-3);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* --- callout ------------------------------------------------------------- */
/* Guidance, deliberately not .error. "Don't guess" is the most important
   instruction on the intake form, but it is advice, not a failure — styling it
   red taught people to dismiss it alongside real validation messages. */

.callout {
  border-left: 2px solid var(--blue);
  background: var(--surface);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 13px 16px;
  margin: 0 0 26px;
  font-size: 14px;
  color: var(--ink-2);
}
.callout strong { color: var(--ink); font-weight: 600; }

.backlink {
  display: inline-block; font-size: 13.5px; font-weight: 500;
  color: var(--ink-3); margin-bottom: 16px;
}
.backlink:hover { color: var(--ink); text-decoration: none; }

/* --- service slots ------------------------------------------------------- */
/* Two columns so price and duration sit together instead of each owning a
   full-width row — five stacked slots of five stacked fields reads as a wall. */

.service-slot { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.service-slot .f      { grid-column: span 2; }
.service-slot .f-half { grid-column: span 1; }
.slot-head {
  grid-column: span 2;
  display: flex; align-items: baseline; gap: 9px;
  margin-top: 2px;
}
.slot-head .eyebrow { color: var(--ink-2); }
.optional { font-size: 11.5px; color: var(--ink-3); font-weight: 500; }

@media (max-width: 560px) {
  .service-slot { grid-template-columns: 1fr; }
  .service-slot .f, .service-slot .f-half { grid-column: span 1; }
}

.actions {
  display: flex; gap: 10px; align-items: center;
  margin: 32px 0 0; flex-wrap: wrap;
}
.actions .spacer { flex: 1; }

/* --- billing ------------------------------------------------------------- */

.summary {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 20px 22px; margin: 0 0 26px;
}
.summary ul { margin: 0; padding: 0; list-style: none; }
.summary li {
  position: relative; padding-left: 22px; margin: 0 0 9px;
  font-size: 14px; color: var(--ink-2);
}
.summary li:last-child { margin-bottom: 0; }
.summary li::before {
  content: ""; position: absolute; left: 4px; top: 8px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--blue);
}

.trust {
  font-size: 12.5px; color: var(--ink-3);
  margin: 16px 0 0; line-height: 1.55;
}

/* No spinner. A page that is waiting on a webhook should look calm, not busy. */
.waiting {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13.5px; font-weight: 500; color: var(--blue);
  background: var(--blue-wash); border-radius: 20px; padding: 5px 14px;
}
.waiting .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--blue);
}

.price { display: flex; align-items: baseline; gap: 10px; margin: 0 0 22px; }
.price .figure {
  font-size: 30px; font-weight: 600; letter-spacing: -.028em;
  color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.1;
}
.price .note { font-size: 13.5px; color: var(--ink-3); }

/* ==========================================================================
   App shell
   A floating navy panel inset from the window, not a full-bleed rail. The
   inset is what keeps a large dark block from reading as browser chrome.
   ========================================================================== */

:root {
  --sb-w:        248px;
  --sb-inset:    12px;
  --sb-bg:       #0B1220;
  --sb-text:     #A9B4C6;
  --sb-hi:       #FFFFFF;
  --sb-hover:    rgba(255, 255, 255, .05);
  --sb-active:   rgba(255, 255, 255, .085);
  --sb-group:    #5E6C83;
  --sb-line:     rgba(255, 255, 255, .09);
}

body.app { background: var(--canvas); }

.sidebar {
  position: fixed;
  left: var(--sb-inset); top: var(--sb-inset); bottom: var(--sb-inset);
  width: var(--sb-w);
  display: flex; flex-direction: column;
  background: var(--sb-bg);
  border-radius: 12px;          /* the one place a larger radius is allowed */
  padding: 18px 12px 12px;
  z-index: 40;
}

.sb-wordmark {
  display: flex; align-items: center; gap: 9px; padding: 0 8px;
  font-size: 17px; font-weight: 600; letter-spacing: -.022em;
  color: var(--sb-hi);
}

.workspace {
  display: flex; align-items: center; gap: 9px;
  margin: 16px 0 6px; padding: 8px;
  background: var(--sb-hover); border-radius: var(--r);
}
a.workspace { text-decoration: none; }
a.workspace:hover { background: var(--sb-active); text-decoration: none; }
.ws-name {
  font-size: 13.5px; font-weight: 500; color: var(--sb-hi);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.avatar {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: #24304a; color: var(--sb-hi);
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
}
.avatar.sq { border-radius: var(--r-s); }

.sb-nav { flex: 1; overflow-y: auto; margin-top: 10px; }
.sb-group {
  padding: 16px 8px 6px;
  font-size: 10px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--sb-group);
}
.sb-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; margin-bottom: 1px;
  border-radius: var(--r);
  font-size: 13.5px; font-weight: 500;
  color: var(--sb-text);
  transition: background .12s ease, color .12s ease;
}
.sb-item:hover { background: var(--sb-hover); color: var(--sb-hi); text-decoration: none; }
/* Active state is a lighter navy, never blue — blue stays spent on primary
   actions, focus and links, and an always-on blue row would outrank them. */
.sb-item.on { background: var(--sb-active); color: var(--sb-hi); }
.sb-item .ic { flex: 0 0 auto; opacity: .85; }
.sb-item.on .ic { opacity: 1; }

.sb-foot {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 8px 4px; margin-top: 8px;
  border-top: 1px solid var(--sb-line);
}
.sb-foot .who { flex: 1; min-width: 0; line-height: 1.3; }
/* The email is the whole identity here, so it gets the weight a name would
   have had. It truncates, and the title attribute carries the full address. */
.sb-foot .em {
  display: block; font-size: 12.5px; font-weight: 500; color: var(--sb-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sb-logout { color: var(--sb-group); display: inline-flex; padding: 4px; border-radius: var(--r-s); }
.sb-logout:hover { color: var(--sb-hi); background: var(--sb-hover); }

.app-main {
  margin-left: calc(var(--sb-w) + var(--sb-inset) * 2);
  padding: 40px 32px 80px;
}
.app-main .col { max-width: 880px; margin: 0 auto; }

/* --- drawer under 800px --------------------------------------------------- */

.topbar-mobile, .nav-scrim { display: none; }

@media (max-width: 800px) {
  .topbar-mobile {
    display: flex; align-items: center; gap: 12px;
    height: 54px; padding: 0 16px;
    background: var(--sb-bg); position: sticky; top: 0; z-index: 30;
  }
  .nav-toggle {
    display: inline-flex; padding: 6px; margin-left: -6px;
    color: var(--sb-text); border-radius: var(--r-s); cursor: pointer;
  }
  .nav-toggle:hover { color: var(--sb-hi); background: var(--sb-hover); }

  .sidebar {
    top: 0; bottom: 0; left: 0; border-radius: 0;
    transform: translateX(-102%);
    transition: transform .18s ease;
  }
  .nav-checkbox:checked ~ .sidebar { transform: none; }
  .nav-checkbox:checked ~ .nav-scrim {
    display: block; position: fixed; inset: 0;
    background: rgba(11, 18, 32, .45); z-index: 35;
  }
  .app-main { margin-left: 0; padding: 24px 18px 64px; }
}

/* --- get started ---------------------------------------------------------- */

.featured {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 22px 24px; margin: 0 0 40px;
  box-shadow: var(--shadow);
}
.featured .ft-text { flex: 1 1 320px; min-width: 0; }
.featured .eyebrow { display: block; color: var(--ink-3); margin-bottom: 6px; }
.featured h2 { margin: 0 0 6px; font-size: 19px; }
.featured p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.featured .ft-action { flex: 0 0 auto; }

.grid-head { margin: 0 0 14px; font-size: 15px; }
.grid-note { margin-top: 18px; font-size: 13px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 860px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

.card.step {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 16px 17px 13px;
}
.card.step h3 {
  margin: 12px 0 5px; font-size: 14.5px; font-weight: 600;
  letter-spacing: -.01em;
}
.card.step .blurb { flex: 1; margin: 0 0 14px; font-size: 13px; color: var(--ink-3); line-height: 1.5; }
.card.step.current { border-color: #C9D6EA; box-shadow: var(--shadow); }
.card.step.upcoming { background: #FCFDFE; }
.card.step.upcoming .tile, .card.step.upcoming h3 { opacity: .72; }

.tile {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: var(--r);
  background: #EEF1F6; color: var(--ink-2);
}
.tile.lg { width: 44px; height: 44px; }
.card.step.done .tile { background: var(--green-wash); color: var(--green); }

.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; font-size: 13px;
}
.card-foot form { display: inline; }
.status { font-size: 12.5px; font-weight: 600; letter-spacing: .02em; }
.status.done     { color: var(--green); }
.status.current  { color: var(--ink); }
.status.upcoming { color: var(--ink-3); font-weight: 500; }

/* A submit button that has to read as a link, for the one step whose action is
   a POST (connect) sitting beside four that are plain anchors. */
.linkish {
  background: none; border: 0; padding: 0;
  color: var(--blue); font-size: 13px; font-weight: 500;
  font-family: inherit; cursor: pointer;
}
.linkish:hover { background: none; color: var(--blue-press); text-decoration: underline; }

/* --- the managed subscription state ------------------------------------- */

.plan {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 18px 22px; margin: 0 0 20px;
}
.plan-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.plan-price {
  font-size: 21px; font-weight: 600; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.plan-note { font-size: 13px; color: var(--ink-3); }
.plan-managed { font-size: 13px; max-width: 30rem; line-height: 1.5; }
.pill.active { color: var(--green); background: var(--green-wash); border-color: #C8E6DA; }

.staff-note {
  margin: 32px 0 0; padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px; color: var(--ink-3);
}
.staff-note .eyebrow { color: var(--ink-3); margin-right: 8px; }
.staff-note code {
  font-family: ui-monospace, monospace; font-size: 12px;
  background: #F2F5F9; border-radius: var(--r-s); padding: 1px 5px;
  color: var(--ink-2);
}

/* --- list pages ---------------------------------------------------------- */

.searchbar { display: flex; gap: 8px; align-items: center; margin: 0 0 20px; }
.searchbar input[type=search] { max-width: 320px; }
.searchbar .clear { font-size: 13px; color: var(--ink-3); }
.searchbar .clear:hover { color: var(--ink); text-decoration: none; }

th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
td.nowrap { white-space: nowrap; color: var(--ink-3); font-size: 13px; }
td.preview { color: var(--ink-3); max-width: 24rem; }
.sub {
  display: block; font-size: 12px; color: var(--ink-3); margin-top: 1px;
}
.mono { font-family: ui-monospace, monospace; font-size: 11.5px; }

.pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin: 16px 2px 0; font-size: 13px;
}
.pager-links { display: flex; gap: 18px; }

.empty {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 34px 28px; text-align: center;
  color: var(--ink-3); font-size: 14.5px;
}
.empty p { margin: 0 0 6px; }
.empty p:last-child { margin-bottom: 0; }

/* --- one conversation ----------------------------------------------------- */

.thread-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 20px;
}
.thread-head h1 { margin-bottom: 2px; }
.thread-head p { margin: 0; }
.thread { margin-top: 26px; }
/* The stat strip shows timestamps, which do not want the 22px numeral size
   the count fields use. */
.thread ~ .stats .n, .stats .n { font-size: 15px; }
.stats div:first-child .n { font-size: 22px; }

/* --- AI agent ------------------------------------------------------------ */

.testnote {
  background: var(--blue-wash);
  border: 1px solid #CFE2FD;
  border-radius: var(--r);
  padding: 12px 15px; margin: 0 0 18px;
  font-size: 13.5px; color: var(--ink-2); line-height: 1.5;
}
.testnote strong { color: var(--ink); display: block; margin-bottom: 2px; }

.thread.test { margin: 18px 0 4px; }

.wouldhave {
  font-size: 13px; color: var(--amber);
  background: var(--amber-wash); border: 1px solid #EFDCBE;
  border-radius: var(--r); padding: 8px 12px; margin: 0 0 8px;
}

.testform { display: flex; gap: 8px; align-items: center; margin: 16px 0 0; }
.testform input[type=text] { flex: 1; }
.testform .clear { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.testform .clear:hover { color: var(--ink); text-decoration: none; }

.faq-count { font-size: 13px; margin: 0 0 14px; }
.faq-section {
  margin: 26px 0 10px; font-size: 12px; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3);
}
.faqs {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden;
}
.faq { padding: 13px 16px; border-bottom: 1px solid var(--line-2); }
.faq:last-child { border-bottom: 0; }
.faq .q { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.faq .a { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }

.rawfaq {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 14px 16px; margin: 0 0 8px;
  font-family: ui-monospace, monospace; font-size: 12.5px; line-height: 1.55;
  color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere;
  max-height: 22rem; overflow-y: auto;
}

/* --- integrations ------------------------------------------------------- */

.integration {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; margin: 0 0 12px; background: var(--surface);
}
.integration.warn { border-color: #EFDCBE; }
.integration.soonish { background: transparent; }
.integration .ihead { display: flex; align-items: flex-start; gap: 13px; }
.integration .iname { flex: 1; min-width: 0; }
.integration .iname h2 { margin: 0; font-size: 15px; }
.integration .iname p { margin: 3px 0 0; font-size: 13px; }
.integration .notice { margin: 13px 0 0; }
.integration form { margin: 14px 0 0; }

.idetail {
  margin: 13px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line-2);
  display: grid; grid-template-columns: max-content 1fr; gap: 5px 18px;
  font-size: 13px;
}
.idetail dt { color: var(--ink-3); }
.idetail dd { margin: 0; color: var(--ink-2); }

h2.ilater { margin: 26px 0 4px; font-size: 15px; }

/* --- the FAQ editor ----------------------------------------------------- */

.faqedit { margin: 0 0 8px; }
.faqedit .faqrow {
  border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 16px 14px; margin: 0 0 10px; background: var(--surface);
}
.faqedit .faqrow legend {
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-3); padding: 0 6px;
}
.faqedit .faqrow.new { border-style: dashed; }
.faqedit label { display: block; font-size: 12.5px; font-weight: 600;
                 margin: 8px 0 4px; }
.faqedit label.del {
  font-weight: 400; color: var(--ink-3); font-size: 12.5px;
  display: flex; align-items: center; gap: 7px; margin-top: 10px;
}
.faqedit label.del input { width: auto; margin: 0; }
.faqedit textarea { min-height: 62px; }

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

.soon { max-width: 460px; margin: 48px auto; text-align: center; }
.soon h1 { margin: 18px 0 8px; }
.soon .lede { margin-bottom: 14px; }

/* ==========================================================================
   Public landing page (/ when signed out)
   Same two colours as the app: navy carries the page, blue is only ever the
   sign-up button. The example conversation is the one dark surface, so the
   eye lands on what the product actually does.
   ========================================================================== */

main.landing { max-width: 1080px; margin: 0 auto; padding: 0 24px 48px; }

.lp-nav {
  display: flex; justify-content: space-between; align-items: center;
  height: 72px;
}
.lp-nav nav { display: flex; align-items: center; gap: 18px; }
.lp-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 19px; letter-spacing: -.025em; color: var(--ink);
}
a.lp-brand:hover { text-decoration: none; color: var(--ink); }
.lp-signin { color: var(--ink-2); font-weight: 500; font-size: 14.5px; }
.lp-signin:hover { color: var(--ink); }

.lp-hero {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px;
  align-items: center; padding: 56px 0 72px;
}
.lp-hero h1 {
  font-size: 48px; line-height: 1.08; letter-spacing: -.035em;
  font-weight: 700; margin: 0 0 20px;
}
.lp-lede { font-size: 18px; line-height: 1.6; color: var(--ink-2); margin: 0 0 30px; max-width: 34em; }
.lp-ctas { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.button.lp-big { font-size: 16px; padding: 13px 26px; }
.lp-ctanote { font-size: 13.5px; color: var(--ink-3); max-width: 22em; line-height: 1.5; }

.lp-phone {
  margin: 0; background: var(--ink); color: #fff; border-radius: 22px;
  padding: 18px 16px 16px; box-shadow: 0 24px 48px -16px rgba(11, 18, 32, .35);
  max-width: 400px; justify-self: end; width: 100%;
}
.lp-phone-head {
  display: flex; align-items: center; gap: 11px; padding: 2px 6px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .1); font-size: 14px;
}
.lp-phone-head strong { display: block; font-weight: 600; }
.lp-sub { display: block; font-size: 12px; color: rgba(255, 255, 255, .55); }
.lp-avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .12); font-weight: 600; font-size: 14px;
}
.lp-thread { display: flex; flex-direction: column; gap: 8px; padding: 16px 4px 12px; }
.lp-msg {
  margin: 0; padding: 9px 13px; border-radius: 16px; font-size: 14px;
  line-height: 1.45; max-width: 82%;
}
.lp-msg.in  { background: rgba(255, 255, 255, .1); align-self: flex-start; border-bottom-left-radius: 5px; }
.lp-msg.out { background: #fff; color: var(--ink); align-self: flex-end; border-bottom-right-radius: 5px; }
.lp-booked {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500;
  color: #8FE0BF; padding: 10px 6px 0; border-top: 1px solid rgba(255, 255, 255, .1);
}
.lp-booked::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: #8FE0BF;
}

.lp-section { padding: 56px 0; border-top: 1px solid var(--line); }
.lp-section h2 { font-size: 28px; letter-spacing: -.025em; margin: 0 0 28px; }
.lp-section h3 { font-size: 16px; font-weight: 600; margin: 0 0 6px; letter-spacing: -.01em; }
.lp-section p { color: var(--ink-2); font-size: 14.5px; margin: 0; }

.lp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.lp-feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 22px 20px;
}

.lp-steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
}
.lp-steps .eyebrow { color: var(--ink-3); display: block; margin-bottom: 8px; }

.lp-pricing { display: flex; justify-content: center; }
.lp-plan {
  width: 100%; max-width: 440px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 32px;
  box-shadow: var(--shadow);
}
.lp-plan h2 { margin-bottom: 14px; }
.lp-plan .summary { padding: 0; border: 0; margin: 0 0 24px; background: none; }

.lp-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  flex-wrap: wrap; padding: 28px 0 0; border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--ink-3);
}
.lp-foot .lp-brand { font-size: 16px; }

@media (max-width: 900px) {
  .lp-hero { grid-template-columns: 1fr; gap: 40px; padding: 32px 0 56px; }
  .lp-phone { justify-self: start; }
  .lp-grid, .lp-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  main.landing { padding: 0 16px 40px; }
  .lp-hero h1 { font-size: 36px; }
  .lp-lede { font-size: 16.5px; }
  .lp-grid, .lp-steps { grid-template-columns: 1fr; }
  .lp-nav nav { gap: 12px; }
  .lp-plan { padding: 24px 20px; }
}
.lp-section .lp-plan .trust { margin-top: 14px; font-size: 12.5px; color: var(--ink-3); }

/* --- workflow setup links ------------------------------------------------ */

.wfsteps { margin: 14px 0 12px; padding-left: 20px; font-size: 13.5px;
           color: var(--ink-2); line-height: 1.55; }
.wfsteps li { margin: 0 0 4px; }
.wflabel { display: block; font-size: 12.5px; font-weight: 600; margin: 10px 0 4px; }
.wfurl { display: flex; gap: 8px; align-items: center; }
.wfurl input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular,
               Menlo, monospace; font-size: 12.5px; }
.wfurl button { flex: none; }
.help.wfgap, .help.wfdone { margin-top: 14px; }

/* --- help (Pace support chat) -------------------------------------------- */

.msg.staff { background: var(--green-wash); border: 1px solid #C8E6DA; margin-left: 56px; }
.supportform { align-items: flex-end; }
.supportform textarea { flex: 1; resize: vertical; }
.support-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; }
.support-note { font-size: 12.5px; margin: 18px 0 0; }
pre.facts {
  white-space: pre-wrap; font-size: 13px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px;
}

/* --- businesses ---------------------------------------------------------- */

.bizlist { display: flex; flex-direction: column; gap: 8px; margin: 0 0 10px; }
.biz {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 12px 16px; color: var(--ink);
}
.biz:hover { text-decoration: none; border-color: #C9D6EA; }
.biz.on { border-color: #C9D6EA; box-shadow: var(--shadow); }
.biz .avatar { background: #E9EEF6; color: var(--ink-2); }
.biz-name { flex: 1; min-width: 0; font-weight: 500;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bizcount { font-size: 13px; margin: 0 0 32px; }
.bizform { display: flex; flex-direction: column; align-items: flex-start;
           gap: 8px; max-width: 420px; margin-top: 14px; }
.bizform input { width: 100%; }
.upsell h2 { margin: 0 0 4px; }
.upsell p { margin: 0; }

/* --- plan choice on the billing page ------------------------------------ */

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
         gap: 14px; margin: 0 0 22px; }
.plan-card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 18px 20px; cursor: pointer;
}
.plan-card:has(input:checked) { border-color: var(--blue); box-shadow: var(--shadow); }
.plan-card.disabled { opacity: .6; cursor: not-allowed; }
.plan-card .plan-head { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.plan-card .plan-head input { margin: 0; }
.plan-card .muted { font-size: 13px; }
.plan-switch { display: flex; flex-direction: column; gap: 10px; margin: 0 0 20px; }
.plan-switch .plan { margin: 0; }
@media (max-width: 640px) { .plans { grid-template-columns: 1fr; } }

/* --- landing: two plans -------------------------------------------------- */

.lp-pricing-wrap { text-align: center; }
.lp-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 20px; max-width: 900px; margin: 0 auto; text-align: left; }
.lp-plans .lp-plan { max-width: none; }
.lp-plan .lp-plan-name { font-size: 13px; font-weight: 600; letter-spacing: .04em;
                         text-transform: uppercase; color: var(--ink-3); margin: 0 0 6px; }
.lp-plan.lp-plan-top { border-color: var(--blue); }
@media (max-width: 700px) { .lp-plans { grid-template-columns: 1fr; } }
.lp-pricing-wrap .lp-lede { margin: -12px auto 30px; }
.lp-pricing-wrap > .trust { margin: 18px auto 0; font-size: 12.5px; color: var(--ink-3); }

/* --- staff console (/admin) ---------------------------------------------- */
/* Staff-only pages. Same pills and tables as everywhere else; the only new
   idea is the health level, which reuses the outcome colours so red still
   means "broken" and amber still means "look at this". */

main.shell.wide { max-width: 1140px; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scroll table { min-width: 720px; }
.pill.problem   { color: var(--red);   background: var(--red-wash);   border-color: #F3CFD7; }
.pill.attention { color: var(--amber); background: var(--amber-wash); border-color: #EFDCBE; }
.pill.ok        { color: var(--green); background: var(--green-wash); border-color: #C8E6DA; }
.pill.off       { color: var(--ink-3); background: #F4F6FA;           border-color: var(--line); }
.issues { margin: 0; padding: 0; list-style: none; font-size: 13.5px; }
.issues li { margin: 0 0 3px; }
.issues li.problem::before   { content: "●"; color: var(--red);   margin-right: 6px; font-size: 10px; }
.issues li.attention::before { content: "●"; color: var(--amber); margin-right: 6px; font-size: 10px; }
.issues li.off::before       { content: "●"; color: var(--ink-3); margin-right: 6px; font-size: 10px; }
.issues .fix { color: var(--ink-3); }
.ops-bar { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; margin: 0 0 22px; font-size: 14px; }
.ops-bar form { margin: 0 0 0 auto; }
.ops-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 0 0 8px; }
@media (max-width: 720px) { .ops-actions { grid-template-columns: 1fr; } }
.ops-actions .box {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 16px 18px;
}
.ops-actions .box h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.ops-actions .box p { font-size: 13.5px; color: var(--ink-2); }
.ops-actions input[type=text], .ops-actions input[type=email], .ops-actions select {
  width: 100%; margin: 0 0 10px; padding: 8px 10px; font: inherit; font-size: 14px;
  border: 1px solid var(--line); border-radius: var(--r);
}
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 18px; font-size: 14px; margin: 0 0 22px; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; }
.copy-link { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; word-break: break-all;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; overflow-wrap: anywhere; }
td form { margin: 0; }
button.small { padding: 4px 10px; font-size: 12.5px; }
.scroll + p.muted { margin-top: 8px; }
