/* ===========================================================================
   Onboarding — the setup wizard
   ---------------------------------------------------------------------------
   A full-screen shell of its own rather than a route inside the app, because
   until it finishes there is no pipeline, no ICP and no voice for the app to
   show. It is also the only surface that repaints itself in the customer's own
   colours: the reveal step transitions this shell from Candid's ink to their
   brand, which is why the palette is held in custom properties and everything
   that uses one carries a background-color transition.
   =========================================================================== */

.ob {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column;
  --ob-main: var(--ink);
  --ob-accent: var(--teal);
  background: var(--ob-main); color: var(--on-ink);
  font-family: var(--ob-body, var(--font-body)), 'Geist', var(--font-stack);
  transition: background-color .8s cubic-bezier(.4, 0, .2, 1);
}

.ob__bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 24px 32px; pointer-events: none;
}
.ob__bar img {
  height: calc(24px * var(--logo-scale)); width: auto; max-width: calc(var(--vw) * .46);
  display: block; filter: var(--logo-filter);
}
.ob__bar button {
  display: flex; align-items: center; gap: 6px;
  pointer-events: auto; background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: var(--weight-strong); color: color-mix(in srgb, var(--on-ink) 60%, transparent);
}
.ob__bar button:hover { color: var(--on-ink) }
.ob__bar button .ms { font-size: 17px }

.ob__scroll {
  position: relative; z-index: 1; flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; align-items: center;
  padding: 80px 32px 48px;
}
.ob__group {
  margin: auto 0; width: 100%; max-width: 660px;
  display: flex; flex-direction: column; align-items: stretch; gap: 18px;
}
/* The question card is a different height on every question, and the group is
   centred as a whole — so a short question used to pull the checklist above it
   down the screen and a long one pushed it back up. On a desktop there is room
   to hold the group to one height instead: the checklist sits at the top of
   that fixed box and stays where it is, and the card grows and shrinks into
   the space below it. The 100% keeps the box inside the viewport on a short
   window, where it fills the space and the checklist sits at the top of it. */
@media (min-width: 901px) {
  .ob__group--prog { min-height: min(640px, 100%) }
  /* Otherwise the card would take the spare height as flex growth and every
     question would be one tall box with the answers stranded at the top. */
  .ob__group--prog > .ob__card { flex: 0 0 auto }
}

.ob__card {
  flex: 1 1 0; min-width: 0; width: auto; box-sizing: border-box;
  background: var(--card); color: var(--text);
  border-radius: 28px; padding: 38px 40px;
  box-shadow: var(--shadow-top);
  transition: background-color .8s cubic-bezier(.4, 0, .2, 1);
}
.ob__card h1 {
  margin: 0 0 10px; font-size: 29px; font-weight: var(--weight-strong);
  letter-spacing: -.03em; line-height: 1.15; text-wrap: balance;
  font-family: var(--ob-head, var(--font-head)), 'Geist', var(--font-stack);
}
.ob__label { font-size: 12px; color: var(--muted); margin-bottom: 6px }
.ob__label span { color: #9A9A9A; font-weight: 400 }
/* Slightly tighter than the app's fields: the design uses a 12px radius here,
   not the 14px used everywhere else. */
.ob .input, .ob .select, .ob .textarea { border-radius: 12px; padding: 12px 14px }

.ob__foot { display: flex; align-items: center; gap: 16px; margin-top: 26px; flex-wrap: wrap }

/* The welcome's plan: the steps setup is made of, and how long each one takes.
   The times are the promise the screen makes, so they hold a column of their
   own and line up down the list rather than running on after the words. Rows
   split by hairlines, not cards: a list of four things is a list. */
.obplan { display: flex; flex-direction: column; margin: 2px 0 4px }
.obplan__step { display: flex; align-items: flex-start; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line) }
.obplan__step:first-child { border-top: 0; padding-top: 0 }
.obplan__step > .ms { font-size: 22px; color: var(--teal); margin-top: 1px }
.obplan__main { flex: 1; min-width: 0 }
.obplan__name { font-size: 14.5px; font-weight: var(--weight-strong) }
.obplan__mins {
  flex: 0 0 auto; padding-top: 2px; font-size: 12.5px; font-weight: 500;
  color: var(--muted); font-variant-numeric: tabular-nums;
}

/* Waiting on IT (stepWaiting): the inbox as one row, the welcome plan's
   rhythm, its state in amber at the far end; the actions under it. Sits on
   the card between hairlines rather than in a box of its own. */
.obwait {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.obwait > svg { display: block }
/* Which tenant, asked with no lede between: the heading's 16px to its content. */
/* With no lede under any heading, every step's content sits the heading's
   16px below it: the providers, the welcome's plan, the import. */
.ob__card h1 + .ob__providers, .ob__card h1 + .obplan, .ob__card h1 + .csvflow { margin-top: 16px }
.obwait__main { flex: 1; min-width: 0 }
.obwait__name { font-size: 14.5px; font-weight: var(--weight-strong) }
.obwait__when { font-size: 12.5px; font-weight: 500; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums }
.obwait__state {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: var(--weight-strong); color: #6B4A00;
}
.obwait__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber) }
.obwait__acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px }
.obwait__acts .btn { text-decoration: none }

/* Sales steps (salesStepsEditor), in Settings. A step is a row: its number in
   a ring, joined to the next by a rail so the list reads as one path from New
   to Proposal; its name over what happens there, written straight on the row
   (a field shows only on hover and while typing); what moves a deal in; and
   its menu. Rows are split by hairlines that start where the words do, not
   boxed. Where the list has room a step is one line, the column of what moves
   a deal in named once above it; where it has not, what moves a deal in goes
   under the name, named on the row. Won and Lost sit under a hairline, after
   Add a step, their ring in the outcome's colour. */
.steps { --rail-y: 30px; container-type: inline-size; display: flex; flex-direction: column }
.ob__card h1 + .steps { margin-top: 6px }
.steps__open { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none }
.salestep {
  position: relative;
  display: grid; grid-template-columns: 28px minmax(0, 1fr) var(--control-h);
  grid-template-areas: "num field more" ". moves moves";
  column-gap: var(--sp-3); row-gap: var(--sp-2); align-items: center;
  padding-block: var(--sp-3);
}
/* The hairline between two steps, from the words' edge to the row's end. */
:is(.steps, .steps__open, .steps__done) > .salestep + .salestep::after {
  content: ""; position: absolute; top: 0; left: calc(28px + var(--sp-3)); right: 0;
  border-top: 1px solid var(--hair);
}
/* The rail: down from the first open step's ring to the last one's. */
:is(.steps, .steps__open) > .salestep[data-kind="open"]::before {
  content: ""; position: absolute; left: 13px; top: 0; bottom: 0; width: 2px;
  background: color-mix(in srgb, var(--text) 12%, transparent);
}
:is(.steps, .steps__open) > .salestep[data-kind="open"]:first-child::before { top: var(--rail-y) }
:is(.steps, .steps__open) > .salestep[data-kind="open"]:not(:has(+ .salestep[data-kind="open"]))::before { bottom: auto; height: var(--rail-y) }
:is(.steps, .steps__open) > .salestep[data-kind="open"]:first-child:not(:has(+ .salestep[data-kind="open"]))::before { display: none }

.salestep__num {
  grid-area: num; align-self: start; position: relative; z-index: 1;
  width: 28px; height: 28px; margin-top: calc(var(--rail-y) - var(--sp-3) - 14px);
  display: grid; place-items: center; border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--text) 22%, transparent); background: var(--card);
  font-size: 13px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums;
}
.salestep__num .ms { font-size: 16px }
.salestep[data-kind="won"] .salestep__num { border-color: transparent; background: color-mix(in srgb, var(--good) 14%, var(--card)); color: var(--good) }
.salestep[data-kind="lost"] .salestep__num { border-color: transparent; background: color-mix(in srgb, var(--bad) 12%, var(--card)); color: var(--bad) }

/* The name and what happens are one control: written on the row until you
   point at it, then a soft fill field (css/forms.css), one edge and one focus
   ring round both. */
.salestep__field {
  grid-area: field; min-width: 0; display: flex; flex-direction: column; gap: 2px;
  padding: 6px 10px; margin-left: -11px;
  border: 1px solid transparent; border-radius: var(--r-input); background: transparent;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.salestep__field:hover:not(:focus-within) { background-color: var(--field); border-color: var(--field-edge) }
.salestep__field:focus-within { background-color: var(--card); border-color: var(--field-focus); box-shadow: inset 0 0 0 .5px var(--field-focus) }
.salestep__name, .salestep__said {
  display: block; width: 100%; margin: 0; padding: 0; border: 0; outline: none;
  background: none; font-family: inherit; color: var(--text);
}
.salestep__name { font-size: 15px; font-weight: 500; line-height: 1.4 }
.salestep__said {
  font-size: 13px; line-height: 1.45; color: var(--muted);
  resize: none; overflow: hidden; min-height: 1.45em; text-wrap: pretty;
}
.salestep__name::placeholder, .salestep__said::placeholder { color: var(--field-ph); opacity: 1 }
.salestep__title { font-size: 15px; font-weight: 500; line-height: 1.4 }
.salestep__about { font-size: 13px; line-height: 1.45; color: var(--muted); text-wrap: pretty }

.salestep__moves {
  grid-area: moves; min-width: 0; display: flex; align-items: center; gap: 10px;
  font-size: 12.5px; font-weight: 500; color: var(--muted);
}
.salestep__label { flex: 0 0 auto }
/* The select carries its trigger's icon: the hand when you move it, teal when
   Candid does. It is drawn as the menu button beside it: white, the button
   hairline, a grey wash on hover. */
.salestep__pick { position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: center }
.salestep__pick > .ms { position: absolute; left: 12px; z-index: 1; font-size: 18px; color: var(--muted); pointer-events: none }
.salestep__pick.is-auto > .ms { color: color-mix(in srgb, var(--teal) 62%, var(--ink)) }
.salestep__pick .select {
  width: 100%; padding: 10px 12px 10px 38px; font-size: 13px; font-weight: 500; color: var(--text);
  background: var(--card); border-color: var(--btn-edge);
  transition: background-color .16s ease, border-color .16s ease;
}
.salestep__pick .select:hover:not([aria-expanded="true"]) { background-color: var(--btn-wash) }
.salestep__more { grid-area: more; align-self: start }

.steps__head { display: none }
.steps__add { align-self: flex-start; margin: var(--sp-1) 0 var(--sp-4) calc(28px + var(--sp-3) - 11px) }
.steps__done { display: flex; flex-direction: column; border-top: 1px solid var(--hair); padding-top: var(--sp-1) }

/* Settings shows a member the steps as text. */
.steps--static { --rail-y: 26px }
.steps--static .salestep__field { padding: 0; margin-left: 0; border: 0; background: none }
.steps--static .salestep__pick { gap: 8px; font-size: 13px; color: var(--text) }
.steps--static .salestep__pick > .ms { position: static }

@container (min-width: 600px) {
  .salestep, .steps__head {
    grid-template-columns: 28px minmax(0, 1fr) 220px var(--control-h);
    grid-template-areas: "num field moves more";
  }
  .salestep:is([data-kind="won"], [data-kind="lost"]) { grid-template-areas: "num field . ." }
  .steps__head { display: grid; column-gap: var(--sp-3); margin-bottom: -4px; font-size: 12.5px; font-weight: 500; color: var(--muted) }
  .steps__head > span { grid-area: moves; padding-left: 13px }
  .steps--static .steps__head { display: none }
  .salestep__label { display: none }
  :is(.salestep__more, .salestep__skmore) { align-self: center }
}

/* Settings' Pipeline while it loads: the rows above, in grey. */
.salestep__skname { height: 12px; margin: 5px 0 }
.salestep__sksaid { height: 10px; margin: 4px 0 5px }
.salestep__skpick { flex: 1 1 auto; height: var(--control-h) }
.salestep__skmore { grid-area: more; align-self: start; width: var(--control-h); height: var(--control-h) }

/* Setup's sales steps (salesStepsSetup): the business's own steps as plain
   numbered rows split by hairlines, the add row where the next step lands
   (numbered as it), then Won and Lost. A qualifier that is one of Candid's
   triggers is teal, with the trigger's icon. Where the card has room the add
   row's two fields and its button sit on one line. */
.ssetup { container-type: inline-size; display: flex; flex-direction: column }
/* Collapses with the heading's own 10px: 16px from heading to list. */
.ob__card h1 + .ssetup { margin-top: 16px }
.ssetup__list { margin: 0; padding: 0; list-style: none }
.ssetup__row {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) var(--control-h);
  column-gap: 12px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--hair);
}
.ssetup__list > .ssetup__row:first-child { border-top: 0; padding-top: 0 }
.ssetup > .ssetup__add:first-child { border-top: 0; padding-top: 0 }
/* Beside Continue while there are too few steps to go on. */
.ssetup__need {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 500; color: var(--muted);
}
.ssetup__need:empty { display: none }
.ssetup__need .ms { font-size: 17px }
/* A phone has no room beside Continue: the line goes over the buttons. */
@media (max-width: 480px) { .ssetup__need { order: -1; flex-basis: 100%; justify-content: flex-end } }
/* Beside it, Continue gives up its own push to the right so the two sit together. */
@media (min-width: 481px) { .ssetup__need:not(:empty) + .setupconfirm { margin-left: 0 } }
/* The number sits on its title's baseline (in the add and edit rows, on the
   "Step" label's); the title centres on the menu button when it is one line. */
.ssetup__num {
  text-align: center;
  font-size: 15px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums;
}
/* The icon font's glyph sits high of the text beside it. */
.ssetup__num .ms { font-size: 18px; translate: 0 3px }
.ssetup__row[data-kind="won"] .ssetup__num { color: var(--good) }
.ssetup__row[data-kind="lost"] .ssetup__num { color: #C0362C }
.ssetup__main { min-width: 0; min-height: var(--control-h); display: flex; flex-direction: column; justify-content: center; gap: 3px }
.ssetup__title { font-size: 15px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere }
.ssetup__qual {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: 13.5px; line-height: 1.45; color: var(--muted); text-wrap: pretty; overflow-wrap: anywhere;
}
.ssetup__qual .ms { font-size: 17px; margin-top: 1px }
.ssetup__qual.is-auto { color: color-mix(in srgb, var(--teal) 55%, var(--ink)) }
.ssetup__more { grid-column: 3; align-self: center }

/* Recommended steps: greyed out until kept, with a tick, a cross and a
   pencil, the pencil in the column the other rows' menus use. */
/* On a phone the three sit under the step, the pencil still at the edge. */
.ssetup__row.is-suggested { grid-template-columns: 24px minmax(0, 1fr) }
.ssetup__row.is-suggested :is(.ssetup__num, .ssetup__title, .ssetup__qual, .ssetup__qual.is-auto) { color: #767676 }
.ssetup__pick { grid-column: 2; justify-self: end; margin-top: 10px; display: flex; align-items: center; gap: 8px }
@container (min-width: 520px) {
  .ssetup__row.is-suggested { grid-template-columns: 24px minmax(0, 1fr) auto }
  .ssetup__pick { grid-column: 3; align-self: center; margin-top: 0 }
}
.ssetup__keep, .ssetup__drop, .ssetup__edit { flex: 0 0 auto }

.ssetup__form { grid-column: 2 / -1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px }
.ssetup__field { display: flex; flex-direction: column; gap: 6px; min-width: 0 }
.ssetup__name, .ssetup__said { min-width: 0 }
/* The guess sits greyed in the empty field (its placeholder); the tick at
   the field's end takes it. */
.ssetup__guess { position: relative; display: block }
.ssetup__guess .ssetup__said { width: 100%; padding-right: 48px }
.ssetup__use {
  position: absolute; right: 6px; top: 50%; translate: 0 -50%;
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 1px solid var(--btn-edge); border-radius: var(--r-btn-sm);
  background: var(--card); color: var(--text); cursor: pointer;
}
.ssetup__use:hover { background: var(--page) }
.ssetup__use[hidden] { display: none }
.ssetup__use .ms { font-size: 18px }
.ssetup__done { display: flex; flex-direction: column }
.ssetup__label { font-size: 12.5px; font-weight: 500; color: var(--muted) }
.ssetup__acts { display: flex; align-items: center; gap: 8px }
@container (min-width: 520px) {
  /* One set of tracks for the add row and an edited step, so their fields
     start in the same place: the add row's button takes the last; an edited
     step's qualifier runs across it, with Save and Cancel underneath. */
  .ssetup__form { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) 120px; align-items: end }
  .ssetup__acts { justify-content: flex-end }
  .ssetup__acts .btn { height: 44px }
  /* The fields stand beside that button, so they share its height and shape. */
  .ssetup__form .input { height: 44px; padding-block: 0; border-radius: var(--r-btn-lg) }
  .ssetup__row.is-editing .ssetup__field:nth-child(2) { grid-column: 2 / -1 }
  .ssetup__row.is-editing .ssetup__acts { grid-column: 1 / -1; justify-content: flex-start }
  .ssetup__row.is-editing .ssetup__acts .btn { height: var(--control-h) }
}
.ob__status { font-size: 12.5px; color: var(--muted) }
.ob__cta {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  border: none; background: var(--ob-main); color: var(--on-ink);
  font-family: inherit; font-size: 14px; font-weight: var(--weight-strong);
  height: max(44px, var(--control-h)); padding: 0 28px; border-radius: var(--r-btn); cursor: pointer;
  transition: background-color .8s cubic-bezier(.4, 0, .2, 1), opacity .16s ease;
}
.ob__cta:disabled { opacity: .45; cursor: not-allowed }
/* The large button size (design/corners-and-spacing.md, "Buttons"): the icon side 24, icon 20.
   A label before a trailing arrow sits in a span: :first-child does not see bare
   text, so without it the arrow would count as a leading icon. */
.ob__cta .ms { font-size: 20px }
.ob__cta:has(> .ms:first-child) { padding-left: 24px }
.ob__cta:has(> .ms:last-child:not(:first-child)) { padding-right: 24px }
.ob__back {
  display: flex; align-items: center; gap: 5px; min-height: 44px; background: none; border: none;
  font-family: inherit; font-size: 12.5px; font-weight: var(--weight-strong); color: var(--text); cursor: pointer;
}
.ob__back .ms { font-size: 16px }
.ob__back[hidden] { display: none }
/* 44px tall though the words are small: on the LinkedIn step it is the only way on. */
.ob__skip {
  display: flex; align-items: center; gap: 5px; min-height: 44px;
  background: none; border: none; font-family: inherit;
  font-size: 12.5px; font-weight: var(--weight-strong); color: var(--muted); cursor: pointer;
}
.ob__skip .ms { font-size: 16px }
.ob__skip:hover { color: var(--text) }
/* A step's forward button, held at the far end of the setup row, Back at the start. */
.ob__next { margin-left: auto; display: flex; gap: 10px }
.ob__next:empty { display: none }

/* mailbox / calendar pickers */
.ob__providers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px }
.ob__provider {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left;
  border: 1px solid #E4E4E4; border-radius: 16px; padding: 16px 17px;
  background: var(--card); cursor: pointer; font-family: inherit; color: var(--text);
  transition: border-color .18s ease;
}
.ob__provider:hover:not(:disabled) { border-color: var(--ink) }
.ob__provider:disabled { opacity: .5; cursor: not-allowed }
/* Opening the provider's screen: the card stays solid and its mark turns. */
.ob__provider[aria-busy="true"] { opacity: 1; cursor: progress; border-color: var(--ink) }
.ob__provider[aria-busy="true"] .provider__mark .ms { animation: cdSpin 1s linear infinite; color: var(--muted) }
.ob__provider b { display: block; font-size: 14px; font-weight: var(--weight-strong) }
.ob__provider small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px }
/* One account to connect (LinkedIn) takes the full row rather than half of it. */
.ob__providers--one { grid-template-columns: minmax(0, 1fr) }

/* logo and font drop targets */
.ob__drop {
  width: 100%; border: 1.5px dashed #C9C9C9; border-radius: 14px; padding: 22px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  cursor: pointer; background: var(--card); font-family: inherit; color: var(--text);
}
.ob__drop:hover, .ob__drop[data-over="1"] { border-color: var(--teal) }
.ob__drop--filled { padding: 14px 16px }
.ob__chip {
  width: 62px; height: 62px; flex: 0 0 62px; border-radius: 12px;
  border: 1px solid #E4E4E4; display: grid; place-items: center; background-color: #FFF;
  /* Chequerboard, so a transparent logo reads as transparent rather than white. */
  background-image:
    linear-gradient(45deg, #EFEFEF 25%, transparent 25%, transparent 75%, #EFEFEF 75%),
    linear-gradient(45deg, #EFEFEF 25%, transparent 25%, transparent 75%, #EFEFEF 75%);
  background-size: 12px 12px; background-position: 0 0, 6px 6px;
}
.ob__chip img { max-width: 44px; max-height: 44px; width: auto; height: auto; display: block }

/* logo scale — only shown once there is a logo of the customer's own to size */
.ob__scale { display: flex; align-items: center; gap: 14px; margin-top: 12px }
.ob__scale[hidden] { display: none }
.ob__scale .slider { flex: 1; min-width: 0 }
.ob__scaleval {
  flex: 0 0 auto; min-width: 52px; text-align: right;
  font-size: 12.5px; font-weight: var(--weight-strong); color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.ob__scalereset {
  flex: 0 0 auto; border: none; background: none; padding: 0; cursor: pointer;
  font-family: inherit; font-size: 12.5px; font-weight: var(--weight-strong);
  color: var(--muted);
}
.ob__scalereset:hover { color: var(--text) }
.ob__scalereset:disabled { opacity: 0; pointer-events: none }

.ob__swatch { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px; border: 1px solid #E4E4E4 }

/* The swatch *is* the colour picker.
 *
 * A hex field alone asks the customer to already know their brand code, which
 * half of them do not — and a swatch that only reports the colour is a control
 * that looks pressable and is not. Native input[type=color] gives the OS picker
 * with an eyedropper for free; all it needs is the browser's own chrome taken
 * off so it reads as the same 38px tile the design drew. */
input.ob__swatch {
  padding: 0; cursor: pointer; background: none; -webkit-appearance: none; appearance: none;
}
input.ob__swatch::-webkit-color-swatch-wrapper { padding: 0 }
input.ob__swatch::-webkit-color-swatch { border: none; border-radius: 11px }
input.ob__swatch::-moz-color-swatch { border: none; border-radius: 11px }

.ob__hex {
  width: 116px; flex: 0 0 116px; text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.ob__hex[aria-invalid="true"] { border-color: var(--bad) }

/* --- the type picker ------------------------------------------------------
   A combobox rather than a <select>, because the list is every Google font.
   1,820 native options cannot be searched, cannot be filtered by category, and
   render every name in the interface face — which loses the one thing a font
   list is for. */
.fontpick__pair { display: flex; align-items: stretch; gap: 10px }
.fontpick { position: relative; flex: 1 1 auto; min-width: 0 }

.fontpick__weight {
  flex: 0 0 152px; height: 46px; padding: 0 34px 0 13px;
  border-radius: var(--r-input); border: 1px solid var(--field-edge);
  background-color: var(--field); color: var(--text);
  font-family: inherit; font-size: 14px; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
/* Drawn as Soft fill fields (css/forms.css), states and all. */
.fontpick__weight:hover:not(:focus):not(:disabled), .fontpick__btn:hover:not([aria-expanded="true"]) { background-color: var(--field-hover); border-color: var(--field-edge-hover) }
.fontpick__weight:focus, .fontpick__btn[aria-expanded="true"], .fontpick__btn:focus-visible {
  outline: none; background-color: var(--card); border-color: var(--field-focus); box-shadow: inset 0 0 0 .5px var(--field-focus);
}
.fontpick__weight:disabled { opacity: .5; cursor: not-allowed; background-image: none }

@media (max-width: 560px) {
  .fontpick__pair { flex-wrap: wrap }
  .fontpick__weight { flex: 1 1 100% }
}

.fontpick__btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  height: 46px; padding: 0 13px 0 15px; border-radius: var(--r-input);
  border: 1px solid var(--field-edge); background: var(--field); color: var(--text);
  font-family: inherit; font-size: 14px; cursor: pointer; text-align: left;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.fontpick__btn .ms { margin-left: auto; font-size: 20px; color: var(--muted); flex: 0 0 auto }
.fontpick__name {
  flex: 1; min-width: 0; font-size: 16px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.fontpick__pop {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0;
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 16px; background: var(--card);
  box-shadow: var(--shadow-top);
  overflow: hidden;
  animation: cdRise .16s ease both;
}
.fontpick__pop[hidden] { display: none }

.fontpick__search { display: flex; align-items: center; gap: 9px; padding: 12px 14px 10px }
.fontpick__search .ms { font-size: 19px; color: var(--muted); flex: 0 0 auto }
.fontpick__input {
  flex: 1; min-width: 0; border: none; outline: none; background: none;
  font-family: inherit; font-size: 14px; color: var(--text);
}
.fontpick__input::-webkit-search-cancel-button { filter: grayscale(1) opacity(.5) }

.fontpick__cats {
  display: flex; gap: 6px; padding: 0 14px 11px; overflow-x: auto;
  border-bottom: 1px solid var(--hair); scrollbar-width: none;
}
.fontpick__cats::-webkit-scrollbar { display: none }
.fontpick__cat {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--card);
  border-radius: var(--r-btn-sm); padding: 5px 11px; cursor: pointer;
  font-family: inherit; font-size: 11.5px; font-weight: var(--weight-strong); color: var(--muted);
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.fontpick__cat[aria-pressed="true"] {
  background: var(--ink); border-color: var(--ink); color: var(--on-ink);
}

/* Fixed height rather than max-height: a list that changes height as you type
   walks the panel up and down the page under the pointer. */
.fontpick__list { height: 268px; overflow-y: auto; padding: 6px }

.fontpick__group {
  padding: 10px 10px 5px; font-size: 11px; font-weight: var(--weight-strong);
  letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
}

.fontpick__row {
  display: flex; align-items: baseline; gap: 12px; width: 100%;
  padding: 8px 10px; border: none; border-radius: 10px; background: none;
  font-family: inherit; text-align: left; cursor: pointer; color: var(--text);
}
.fontpick__row:hover, .fontpick__row--active { background: var(--page) }
.fontpick__row[aria-selected="true"] { background: var(--ink); color: var(--on-ink) }
.fontpick__rowname {
  flex: 1; min-width: 0; font-size: 17px; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fontpick__rowcat { flex: 0 0 auto; font-size: 10.5px; font-weight: var(--weight-strong); color: var(--muted) }
.fontpick__row[aria-selected="true"] .fontpick__rowcat { color: inherit; opacity: .7 }

/* Both the "still loading" marker and the sentinel that loads it. */
.fontpick__more, .fontpick__none {
  padding: 14px 10px; font-size: 12.5px; color: var(--muted); text-align: center;
}

.fontpick__upload {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 13px 16px; border: none; border-top: 1px solid var(--hair);
  background: var(--card); font-family: inherit; font-size: 13px;
  font-weight: var(--weight-strong); color: var(--text); cursor: pointer; text-align: left;
}
.fontpick__upload:hover { background: var(--page) }
.fontpick__upload .ms { font-size: 19px; color: var(--muted) }

/* Set inline to the face being previewed, so the sample is the answer to
   "what does this look like" rather than a description of it. */
.ob__sample { font-size: 21px; line-height: 1.25; margin-top: 10px; color: var(--text) }
.ob__sample small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 5px }

/* --- the live preview -----------------------------------------------------
   Three colours, a logo and two faces are six decisions whose only real test
   is what they look like together. This is that test, at a size that fits
   beside the controls: the sidebar in the main colour with the logo on it, a
   record mark in the secondary, a progress bar and a button in the accent. */
.ob__preview {
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  display: grid; grid-template-columns: 96px minmax(0, 1fr); min-height: 188px;
  background: var(--card);
}
.ob__pvside {
  padding: 14px 12px; display: flex; flex-direction: column; gap: 14px;
  transition: background-color .4s ease;
}
.ob__pvlogo { min-height: 20px; display: flex; align-items: center }
.ob__pvlogo img { max-width: 100%; width: auto; display: block }
.ob__pvnav { font-size: 11px; font-weight: var(--weight-strong); padding: 6px 8px; border-radius: var(--r-pill) }
.ob__pvbody { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; background: var(--page) }
.ob__pvhead { font-size: 17px; font-weight: var(--weight-strong); letter-spacing: -.02em; margin: 0 }
.ob__pvcopy { font-size: 12.5px; line-height: 1.55; margin: 0 }
.ob__pvrow { display: flex; align-items: center; gap: 10px; margin-top: auto }
.ob__pvmark {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px;
  display: grid; place-items: center; font-size: 11px; font-weight: var(--weight-strong);
}
.ob__pvtrack { flex: 1; height: 7px; border-radius: var(--r-pill); background: #E2E2E2; overflow: hidden }
.ob__pvtrack > div { width: 64%; height: 100% ; border-radius: var(--r-pill) }
.ob__pvbtn {
  border: none; border-radius: var(--r-btn-sm); height: 30px; padding: 0 15px;
  font-family: inherit; font-size: 12px; font-weight: var(--weight-strong);
}

/* The reveal, and the signup password meter, both used to live here.
   ---------------------------------------------------------------------------
   The reveal was the onboarding step that spent seven seconds animating a
   customer's colours onto the interface. It went when the platform console took
   over collecting branding: the business is created already branded, so
   applyBrand() runs at sign-in before any screen is drawn and there is nothing
   left to reveal. The meter went earlier, with the signup screen, when Candid
   became sold rather than self-served.

   Their rules are deleted rather than left in place. Dead CSS naming a screen
   that no longer exists is worse than no CSS: it reads as a feature to whoever
   finds it next, and it is the sort of thing somebody restores a broken version
   of because the styles were still there. */

/* ---------------------------------------------------------------------------
   Connecting an account (stepConnecting in app/onboarding-wizard.js)
   ---------------------------------------------------------------------------
   The account's own mark in a ring. Connecting: an arc turns round it.
   Connected: the ring fills with the accent and a tick pops in at its edge,
   then setup moves on by itself. Didn't connect: the ring goes coral. */
.obconn { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 28px 0 8px; text-align: center }
.obconn__ring {
  position: relative; display: grid; place-items: center;
  width: 96px; height: 96px; border-radius: 50%;
  border: 3px solid #EDEDED;
  transition: border-color .3s ease, background-color .3s ease;
}
/* The turning arc: one coloured quarter of the ring, rotating. */
.obconn[data-status="connecting"] .obconn__ring::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 3px solid transparent; border-top-color: var(--ob-accent);
  animation: cdSpin .9s linear infinite;
}
.obconn__mark { display: grid; place-items: center }
.obconn__mark .ms { font-size: 32px; color: var(--text) }
.obconn[data-status="done"] .obconn__ring { border-color: var(--ob-accent); background: color-mix(in srgb, var(--ob-accent) 10%, var(--card)) }
.obconn[data-status="failed"] .obconn__ring { border-color: var(--coral) }
.obconn__tick {
  position: absolute; right: -4px; bottom: -4px;
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--ob-accent); color: var(--on-ink); box-shadow: 0 0 0 4px var(--card);
  animation: obconnTick .45s cubic-bezier(.34, 1.56, .64, 1) both;
}
.obconn__tick .ms { font-size: 20px; font-weight: 700 }
@keyframes obconnTick { from { transform: scale(0); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.obconn__words { margin: 0; font-size: 22px; text-wrap: balance }
@media (prefers-reduced-motion: reduce) {
  .obconn[data-status="connecting"] .obconn__ring::after { animation-duration: 2.4s }
  .obconn__tick { animation: none }
}

/* ---------------------------------------------------------------------------
   Where setup has got to (setupStepper in app/onboarding-wizard.js)
   ---------------------------------------------------------------------------
   The welcome's four steps across the top bar, between the logo and Log out:
   a numbered mark and a name each, joined by a short rule; done is a tick,
   current is filled with the accent. On a phone only the current is named. */
.obsteps {
  display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; list-style: none;
  pointer-events: none; min-width: 0;
}
.obsteps__step { display: flex; align-items: center; gap: 8px; min-width: 0; color: color-mix(in srgb, var(--on-ink) 55%, transparent) }
.obsteps__step + .obsteps__step::before {
  content: ""; width: 28px; height: 1px; margin-right: 2px;
  background: color-mix(in srgb, var(--on-ink) 22%, transparent);
}
.obsteps__mark {
  display: grid; place-items: center; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums;
  border: 1.5px solid color-mix(in srgb, var(--on-ink) 30%, transparent);
}
.obsteps__mark .ms { font-size: 15px; font-weight: 700 }
.obsteps__name { font-size: 12.5px; font-weight: 500; white-space: nowrap }
.obsteps__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap }
.obsteps__step[data-state="done"] { color: color-mix(in srgb, var(--on-ink) 80%, transparent) }
.obsteps__step[data-state="done"] .obsteps__mark { border-color: var(--ob-accent); color: var(--ob-accent) }
.obsteps__step[data-state="current"] { color: var(--on-ink) }
.obsteps__step[data-state="current"] .obsteps__mark { border-color: var(--ob-accent); background: var(--ob-accent); color: var(--ob-main) }
.obsteps__step[data-state="current"] .obsteps__name { font-weight: 600 }
@media (max-width: 860px) {
  .obsteps { gap: 6px }
  .obsteps__step + .obsteps__step::before { width: 10px }
  .obsteps__step:not([data-state="current"]) .obsteps__name { display: none }
}

/* ---------------------------------------------------------------------------
   Accounts as rows (connectStep, stepChannels)
   ---------------------------------------------------------------------------
   One account a row, as Patreon and Perplexity list theirs: its mark, its
   name and a line, then Connect at the far end so the row reads as the
   action; a connected one says so in the accent instead. */
.ob__providers--list { grid-template-columns: minmax(0, 1fr); gap: 10px }
.ob__provider-text { flex: 1; min-width: 0 }
.ob__go {
  display: inline-flex; align-items: center; gap: 2px; flex: 0 0 auto;
  font-size: 13px; font-weight: 600; color: var(--text);
  padding: 7px 8px 7px 14px; border-radius: var(--r-btn); border: 1px solid var(--line);
  transition: background-color .16s ease, border-color .16s ease;
}
.ob__go .ms { font-size: 18px }
.ob__provider:hover:not(:disabled) .ob__go { background: var(--btn-wash); border-color: var(--btn-edge, var(--line)) }
.ob__provider[aria-busy="true"] .ob__go { visibility: hidden }
.ob__provider--done { cursor: default }
.ob__state {
  display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto;
  font-size: 13px; font-weight: 600; color: color-mix(in srgb, var(--ob-accent) 70%, var(--text));
}
.ob__state .ms { font-size: 18px; color: var(--ob-accent) }
/* A phone: only the step you are on, its number and name, so the logo and
   Log out keep their room; Log out stays on one line. */
@media (max-width: 560px) {
  .obsteps__step:not([data-state="current"]) { display: none }
  .obsteps__step + .obsteps__step::before { display: none }
}
.ob__bar button { white-space: nowrap }
