/* ── Phone numbers ────────────────────────────────────────────────────────────
 * Agent Studio's page (.agents-page / .agents-heading / .agents-filters in
 * app.css) with the numbers as one inset grouped list. Everything here is built
 * from the Apple-grade tokens; the dialogs are the shared .modal and only get
 * layout from this file, never their own field styles. */
.numbers-page [hidden] { display: none !important; }
.numbers-page .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
                         clip-path: inset(50%); white-space: nowrap; border: 0; }

/* the heading: title on the left, the one way in ("Get a number") on the right */
.numbers-heading { align-items: flex-end; }
.numbers-actions { display: flex; gap: 8px; flex-shrink: 0; margin: 0 0 4px; }
.numbers-actions button { display: inline-flex; align-items: center; gap: 6px; margin: 0;
                          min-height: 34px; padding: 8px 14px; font-size: 13px; font-weight: 600;
                          border-radius: var(--ui-r-control); }
.numbers-actions button.ghost { font-weight: 500; color: var(--c-ink); border-color: var(--ui-edge); }
#numbers-add { padding-left: 11px; }
.numbers-actions svg { width: 15px; height: 15px; }

/* status: a quiet line while loading; a notice card when something failed */
#numbers-status { margin: 0 0 16px; font-size: 13px; color: var(--c-ink-3); }
#numbers-status:empty { display: none; }
#numbers-status.numbers-error { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  color: var(--c-alarm-ink); background: var(--c-alarm-bg); border-radius: var(--ui-r-card);
  box-shadow: inset 0 0 0 1px var(--c-alarm-line); line-height: 1.5; }
/* ■ solid = bad (app.css rule 2): the shape says it as well as the tint */
#numbers-status.numbers-error::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 6px;
  border-radius: 2px; background: var(--c-alarm); }
.numbers-retry { display: none; margin: -4px 0 20px; min-height: 32px; font-size: 12.5px;
                 border-radius: var(--ui-r-control); }
.numbers-page[data-state="error"] .numbers-retry { display: inline-flex; }
/* With nothing yet the empty state's two choices are the actions; the guide stays. */
.numbers-page[data-empty="true"] :is(#numbers-add, #numbers-refresh) { visibility: hidden; }
.numbers-page[data-state="error"] :is(.numbers-inventory, .numbers-connections, .numbers-staff, .numbers-segments, .numbers-pools, .numbers-accounts-empty),
.numbers-page[data-state="loading"] :is(.numbers-inventory, .numbers-connections, .numbers-staff, .numbers-segments, .numbers-pools, .numbers-accounts-empty) { display: none; }

/* ── one row shape for numbers, the shared number and connections ──────── */
.numbers-group { background: var(--c-surface); border-radius: var(--ui-r-card);
                 box-shadow: var(--ui-card); overflow: hidden; }
.numbers-group:empty { display: none; }
.number-row, .number-connection {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 4px 14px;
  align-items: start; padding: 14px 16px; }
/* inset separators, as in every grouped list on a Mac: the line starts at the text */
.number-row + .number-row, .number-connection + .number-connection {
  background-image: linear-gradient(var(--ui-sep), var(--ui-sep));
  background-size: calc(100% - 66px) 1px; background-position: 66px 0; background-repeat: no-repeat; }
.number-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px;
               color: var(--c-ink-2); background: var(--c-sunk); box-shadow: inset 0 0 0 1px var(--c-line); }
.number-icon svg { width: 17px; height: 17px; }
.number-icon-plain { font: 600 13px/1 var(--sans); }
.number-main { min-width: 0; }
.number-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-height: 22px; }
.number-title strong { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; color: var(--c-ink);
                       overflow-wrap: anywhere; }
.number-phone { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }
.number-meta { margin: 3px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--c-ink-3); }
.number-note { margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--c-ink-2); max-width: 60ch; }
.number-note.numbers-error { color: var(--c-alarm-ink); }
.number-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.number-actions button, .number-assign-control button {
  margin: 0; min-height: 30px; padding: 6px 12px; font-size: 12.5px; border-radius: var(--ui-r-control); }
.number-actions button.ghost, .number-assign-control button.ghost {
  color: var(--c-ink); background: var(--ui-fill-2); border-color: transparent; }
.number-actions button.ghost:hover, .number-assign-control button.ghost:hover { background: var(--ui-fill); }

/* State pill. Never hue alone (app.css rule 2): ○ ring = fine, ▨ hatch =
 * waiting on someone, ■ solid = broken, nothing = archived. */
.number-state { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 3px 8px 3px 7px;
                border-radius: 999px; font: 600 11px/1.2 var(--sans); color: var(--c-ink-2);
                background: var(--ui-fill-2); white-space: nowrap; }
.number-state::before { content: ""; width: 7px; height: 7px; flex: none; box-sizing: border-box; }
.number-state[data-tone="ok"]::before { border: 1.5px solid var(--c-ink-3); border-radius: 50%; }
.number-state[data-tone="open"] { color: var(--c-open-ink); background: var(--c-open-bg); }
.number-state[data-tone="open"]::before { border: 1px solid var(--c-open-line); border-radius: 1px;
  background: repeating-linear-gradient(135deg, var(--c-open-hatch) 0 1.5px, transparent 1.5px 3px); }
.number-state[data-tone="bad"] { color: var(--c-alarm-ink); background: var(--c-alarm-bg); }
.number-state[data-tone="bad"]::before { background: var(--c-alarm); border-radius: 1.5px; }
.number-state[data-tone="muted"] { color: var(--c-ink-3); background: var(--ui-fill); }
.number-state[data-tone="muted"]::before { display: none; }

/* Under the facts: the setup checklist, a "change who answers" disclosure,
 * or a note. It spans the text column and the actions. */
.number-body { grid-column: 2 / -1; min-width: 0; }
.number-body:empty { display: none; }
.number-assign-control { display: flex; align-items: center; gap: 6px; min-width: 0; }
.number-assign-control select { min-width: 0; width: 220px; max-width: 100%; min-height: 30px; padding: 5px 30px 5px 10px;
  font-size: 12.5px; border: 1px solid var(--ui-edge); border-radius: var(--ui-r-control);
  appearance: none; -webkit-appearance: none;
  background: var(--c-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%236f6c65' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 4.75 6 2.5l2.5 2.25M3.5 7.25 6 9.5l2.5-2.25'/%3E%3C/svg%3E") no-repeat right 9px center / 11px 11px; }
.number-assign-control select:focus { outline: none; border-color: rgba(27, 26, 22, 0.34); box-shadow: var(--ui-ring); }

/* The checklist: two numbered steps in a quiet inset, each with its control on
 * the right. A finished step turns into a tick and drops back in weight, so
 * the eye lands on the one still to do. */
.number-steps { list-style: none; margin: 10px 0 2px; padding: 4px 14px; border-radius: var(--ui-r-card);
                background: var(--c-sunk); counter-reset: none; }
.number-steps > li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center;
                     gap: 4px 12px; padding: 10px 0; }
.number-steps > li + li { border-top: 1px solid var(--ui-sep); }
.number-step-mark { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 999px;
                    font: 600 11.5px/1 var(--sans); color: var(--c-ink); background: var(--c-surface);
                    box-shadow: inset 0 0 0 1.5px var(--c-ink-3); }
.number-steps > li[data-done] .number-step-mark { color: var(--c-surface); background: var(--c-ink-2); box-shadow: none; }
.number-step-mark svg { width: 12px; height: 12px; }
.number-steps strong { display: block; font-size: 13px; font-weight: 600; color: var(--c-ink); }
.number-steps li[data-done] strong { font-weight: 500; color: var(--c-ink-2); }
.number-steps p { margin: 1px 0 0; font-size: 12px; line-height: 1.45; color: var(--c-ink-3); }
.number-steps > li > button { margin: 0; min-height: 30px; padding: 6px 14px; font-size: 12.5px;
                              border-radius: var(--ui-r-control); }

/* a live number keeps its one setting one click away, not on show */
.number-change { margin: 6px 0 0; }
.number-change > summary { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; list-style: none;
                           font-size: 12.5px; color: var(--c-ink-3); padding: 2px 0; }
.number-change > summary::-webkit-details-marker { display: none; }
.number-change > summary::after { content: "›"; font-size: 14px; line-height: 1; transition: transform 140ms var(--ease-out); }
.number-change[open] > summary::after { transform: rotate(90deg); }
.number-change > summary:hover { color: var(--c-ink); }
.number-change .number-assign-control { margin: 8px 0 2px; }

/* The ONE next step of a number that does not take calls yet: what is
 * missing on the left, its control on the right, in a quiet inset. */
.number-next { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 14px;
               margin: 10px 0 2px; padding: 12px 14px; border-radius: var(--ui-r-card); background: var(--c-sunk); }
.number-next strong { display: block; font-size: 13px; font-weight: 600; color: var(--c-ink); }
.number-next p { margin: 1px 0 0; font-size: 12px; line-height: 1.45; color: var(--c-ink-3); }
.number-next > button { margin: 0; min-height: 30px; padding: 6px 14px; font-size: 12.5px;
                        border-radius: var(--ui-r-control); }
.number-next + .number-change { margin-top: 8px; }

/* ── hear your agent on your phone: only while the shared line is on ──── */
#numbers-shared:empty { display: none; }
.numbers-try { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 4px 16px;
               margin: 30px 0 0; padding: 18px 20px; border-radius: var(--ui-r-card);
               background: var(--c-surface); box-shadow: var(--ui-card); }
.numbers-try-icon { display: grid; place-items: center; width: 40px; height: 40px; align-self: start;
                    border-radius: 11px; color: var(--c-surface); background: var(--c-ink); }
.numbers-try-icon svg { width: 19px; height: 19px; }
.numbers-try h2 { margin: 0; font: 600 15px/1.35 var(--sans); letter-spacing: -0.01em; color: var(--c-ink); }
.numbers-try h2 + p { margin: 3px 0 0; font-size: 13px; line-height: 1.5; color: var(--c-ink-2); }
.numbers-try > button { margin: 0; min-height: 36px; padding: 8px 16px; font-size: 13px; font-weight: 600;
                        border-radius: var(--ui-r-control); }

/* ── one line while a rental waits on business verification ──────────── */
/* ▨ hatch = waiting on someone (app.css rule 2), the same mark as the pill. */
#numbers-ready:empty { display: none; }
.numbers-banner { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; padding: 8px 8px 8px 14px;
                  border-radius: var(--ui-r-card); background: var(--c-open-bg);
                  box-shadow: inset 0 0 0 1px var(--c-open-hatch); }
.numbers-banner-mark { flex: none; width: 8px; height: 8px; box-sizing: border-box; border-radius: 1.5px;
                       border: 1px solid var(--c-open-line);
                       background: repeating-linear-gradient(135deg, var(--c-open-hatch) 0 1.5px, transparent 1.5px 3px); }
.numbers-banner p { flex: 1; min-width: 0; margin: 0; font-size: 13px; line-height: 1.45; color: var(--c-open-ink); }
.numbers-banner strong { font-weight: 600; }
.numbers-banner button { flex: none; margin: 0; min-height: 30px; padding: 6px 12px; font-size: 12.5px;
                         border-radius: var(--ui-r-control); color: var(--c-ink); background: var(--c-surface);
                         border-color: var(--c-open-hatch); }

/* ── the Rent dialog's three steps ───────────────────────────────────── */
/* The row checklist's inset, in the dialog: a finished step folds to one
 * ✓ line, the open step carries its one action, a later step waits quietly. */
.numbers-stepper { margin: 0 0 18px; }
.numbers-stepper > li[data-done] { padding: 8px 0; }
.number-step-line { font-size: 13px; line-height: 1.45; color: var(--c-ink-3); }
.number-steps .number-step-line strong { display: inline; }
.numbers-stepper > li[data-current] .number-step-mark { box-shadow: inset 0 0 0 1.5px var(--c-ink); }
.numbers-stepper > li[data-later] strong { font-weight: 500; color: var(--c-ink-3); }
.numbers-stepper > li[data-later] .number-step-mark { color: var(--c-ink-3); box-shadow: inset 0 0 0 1.5px var(--c-ink-4); }
.numbers-stepper > li > button.ghost { color: var(--c-ink); background: var(--c-surface); border-color: var(--ui-edge); }
.numbers-stepper p { max-width: 58ch; }
.numbers-market-verification > .modal-help { margin: -8px 0 14px; }
.numbers-market-verification > .modal-help:empty { display: none; }
.numbers-verify-row:not(:has(> :not([hidden]))) { display: none; }
/* what still blocks renting: one line, right above the list it is about */
.numbers-market-blocker { display: flex; align-items: baseline; gap: 8px; margin: 0 0 10px;
                          font-size: 12.5px; line-height: 1.5; color: var(--c-open-ink); }
.numbers-market-blocker::before { content: ""; flex: none; width: 7px; height: 7px; box-sizing: border-box;
  border: 1px solid var(--c-open-line); border-radius: 1px; transform: translateY(1px);
  background: repeating-linear-gradient(135deg, var(--c-open-hatch) 0 1.5px, transparent 1.5px 3px); }

/* section heads */
.numbers-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
                   flex-wrap: wrap; margin: 0 0 12px; }
.numbers-toolbar h2 { display: flex; align-items: center; gap: 8px; }
.numbers-toolbar-end { display: flex; align-items: center; gap: 8px; }
.numbers-quiet { margin: 0; min-height: 28px; padding: 5px 11px; font-size: 12.5px; border-radius: var(--ui-r-control);
                 color: var(--c-ink-2); background: var(--ui-fill-2); border-color: transparent; }
.numbers-quiet:hover { background: var(--ui-fill); color: var(--c-ink); }
.numbers-toolbar h2, .numbers-section-head h2 { margin: 0; font: 600 17px/1.3 var(--sans);
                                                 letter-spacing: -0.015em; color: var(--c-ink); }
.numbers-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 12px; }
.numbers-section-head p { margin: 3px 0 0; font-size: 13px; color: var(--c-ink-3); }
.numbers-section-head button { margin: 0; min-height: 30px; padding: 6px 12px; font-size: 12.5px;
                               border-radius: var(--ui-r-control); color: var(--c-ink-2);
                               background: var(--ui-fill-2); border-color: transparent; }
.numbers-section-head button:hover { background: var(--ui-fill); color: var(--c-ink); }
.numbers-connections { margin-top: 36px; }
/* Mirai's own Plivo accounts, for staff only: smaller, flatter, last. */
.numbers-staff { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--ui-sep); }
.numbers-staff .numbers-section-head h2 { font-size: 13.5px; color: var(--c-ink-2); }
.numbers-staff .numbers-section-head p { font-size: 12px; }
.numbers-staff .numbers-group { background: transparent; box-shadow: inset 0 0 0 1px var(--c-line); }
.numbers-group-empty { margin: 0; padding: 16px 18px; font-size: 13px; color: var(--c-ink-3); }
#numbers-connections:has(.numbers-group-empty) { box-shadow: inset 0 0 0 1px var(--c-line); background: transparent; }

/* No numbers yet: the two ways to get one, side by side, and how a number
 * works in three steps — the page's whole idea before any of its controls.
 * The "Get a number" dialog asks the same question, stacked. */
.numbers-start { padding: 26px; border-radius: var(--ui-r-card); background: var(--c-surface); box-shadow: var(--ui-card); }
.numbers-start h3 { margin: 0; font: 600 17px/1.3 var(--sans); letter-spacing: -0.015em; color: var(--c-ink); }
.numbers-start > p { margin: 4px 0 18px; font-size: 13px; color: var(--c-ink-3); }
.numbers-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.numbers-choice { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
                  margin: 0; padding: 18px; text-align: left; white-space: normal; line-height: 1.5;
                  color: var(--c-ink); background: var(--c-surface); border: 1px solid var(--c-line-strong);
                  border-radius: var(--ui-r-card); transition: border-color 120ms ease, box-shadow 120ms ease; }
.numbers-choice:hover { background: var(--c-surface); border-color: var(--c-ink-3); box-shadow: var(--ui-card); }
.numbers-choice:active { transform: scale(0.99); }
.numbers-choice strong { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.numbers-choice > span { font-size: 12.5px; font-weight: 400; color: var(--c-ink-3); }
.numbers-choice > .numbers-choice-go { margin-top: auto; padding-top: 6px; font-weight: 600; color: var(--c-ink); }
.numbers-choice-tag { position: absolute; top: 16px; right: 16px; padding: 3px 7px; border-radius: 999px;
                      font: 600 10.5px/1.2 var(--sans) !important; color: var(--c-ink-2) !important; background: var(--ui-fill); }
.numbers-choose .numbers-choices { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.numbers-choose .numbers-choice { padding: 16px 18px; padding-right: 96px; }
.numbers-choose .numbers-choice strong { font-size: 14px; }
.numbers-how { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 18px 0 0; padding: 14px 0 0; list-style: none;
               border-top: 1px solid var(--ui-sep); font-size: 12.5px; color: var(--c-ink-2); }
.numbers-how li { display: flex; align-items: center; gap: 8px; }
.numbers-how span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 999px;
                    font: 600 11px/1 var(--sans); color: var(--c-ink-2); box-shadow: inset 0 0 0 1.5px var(--c-ink-4); }

/* ── dialogs: layout only, the .modal owns the look ─────────────────────── */
.numbers-more { display: block; margin: 12px auto 0; min-height: 32px; font-size: 12.5px;
                border-radius: var(--ui-r-control); }
.numbers-pick { box-shadow: inset 0 0 0 1px var(--c-line); }
.number-discovery-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; }
.number-discovery-row + .number-discovery-row { border-top: 1px solid var(--ui-sep); }
.number-discovery-row strong { font-size: 14px; font-weight: 600; }
.number-discovery-row button { margin: 0; min-height: 30px; padding: 6px 14px; font-size: 12.5px;
                               border-radius: var(--ui-r-control); }

.numbers-verify { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 0 0 16px; }
.numbers-verify > button, .numbers-code button { margin: 0; min-height: 34px; font-size: 13px; border-radius: var(--ui-r-control); }
.numbers-code { display: flex; align-items: flex-end; gap: 8px; width: 100%; }
.numbers-code .modal-field { flex: 1; margin: 0; }
.modal-note.numbers-verification-progress strong { display: block; font-size: 13.5px; }
.numbers-verification-progress p { margin: 4px 0 0; }
.numbers-verification-progress p:empty { display: none; }
.numbers-verification-progress button { margin: 12px 0 0; min-height: 30px; font-size: 12.5px; border-radius: var(--ui-r-control); }

/* the market: the steps, a search, then what's available */
.numbers-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; align-items: end; margin: 0 0 2px; }
.numbers-search-account { grid-column: 1 / -1; }
.numbers-search-go { margin: 0 0 16px; min-height: 36px; padding: 8px 16px; font-size: 13px; border-radius: var(--ui-r-control); }
.numbers-verify-row { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px 14px; margin: -6px 0 16px; }
.numbers-verify-row > button { margin: 0; min-height: 30px; font-size: 12.5px; border-radius: var(--ui-r-control); }
.numbers-details > summary { cursor: pointer; font-size: 12.5px; color: var(--c-ink-2); padding: 6px 0; }
.numbers-details > summary:hover { color: var(--c-ink); }
.numbers-details[open] > summary { margin-bottom: 4px; }
.numbers-req-list { margin: 6px 0; padding-left: 18px; }
.numbers-req-list li { margin: 4px 0; }
.numbers-table-wrap { overflow: auto; max-height: 44vh; border-radius: var(--ui-r-card);
                      box-shadow: inset 0 0 0 1px var(--c-line); }
.numbers-table-wrap:has(tbody:empty) { display: none; }
.numbers-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
.numbers-table th { position: sticky; top: 0; z-index: 1; padding: 9px 14px; font: 500 12px/1.3 var(--sans);
                    letter-spacing: 0; text-transform: none; color: var(--c-ink-3);
                    background: var(--c-sunk); box-shadow: inset 0 -1px 0 var(--c-line); }
.numbers-table td { padding: 11px 14px; white-space: nowrap; vertical-align: middle; color: var(--c-ink-2); }
.numbers-table tbody tr + tr td { border-top: 1px solid var(--ui-sep); }
.numbers-table b { font-size: 13.5px; font-weight: 600; color: var(--c-ink); font-variant-numeric: tabular-nums; }
.numbers-table small { display: block; margin-top: 2px; font-size: 12px; color: var(--c-ink-3); }
.numbers-table td:last-child { text-align: right; }
.numbers-table button { margin: 0; min-height: 30px; padding: 6px 14px; font-size: 12.5px; border-radius: var(--ui-r-control); }

/* the quote: the number and what it costs now, then the terms */
.number-quote { display: flex; align-items: center; gap: 14px; padding: 16px; margin: 0 0 16px;
                border-radius: var(--ui-r-card); background: var(--c-sunk); }
.number-quote p { margin: 0; }
.number-quote-phone { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.number-quote-total { margin-top: 2px !important; font-size: 22px; font-weight: 650; letter-spacing: -0.02em; }
.number-quote-total small { font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--c-ink-3); }
.number-quote .number-icon { background: var(--c-surface); }
.number-quote-terms { margin: 0 0 12px; padding-left: 18px; font-size: 13px; line-height: 1.55; color: var(--c-ink-2); }
.number-quote-terms li + li { margin-top: 6px; }
#numbers-quote-details > .modal-help { margin-bottom: 14px; }
.numbers-page .modal a { color: var(--c-ink); text-decoration: underline; text-underline-offset: 2px;
                         text-decoration-color: var(--c-ink-4); }
.numbers-page .modal a:hover { text-decoration-color: currentColor; }

/* business verification */
.numbers-business fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.numbers-business legend { padding: 0; margin: 4px 0 8px; font: 600 13.5px/1.4 var(--sans); color: var(--c-ink); }
.numbers-business-saved p { margin: 2px 0; }
.numbers-business-saved { overflow-wrap: anywhere; }
.numbers-business-grid { margin-top: 12px; }
.numbers-business-grid .numbers-wide { grid-column: 1 / -1; }
.numbers-optional { margin-left: 6px; font-weight: 400; color: var(--c-ink-3); }
.numbers-business-document { padding: 14px 0 0; }
.numbers-business-document + .numbers-business-document { border-top: 1px solid var(--ui-sep); margin-top: 14px; }
.numbers-business-document h4 { margin: 0; font-size: 13px; font-weight: 600; }
.numbers-business-document > .modal-help { margin: 2px 0 12px; }
.numbers-business .modal-section { margin-bottom: 18px; }
.numbers-business .modal-acts { margin-top: 4px; }
/* the footer is for the status and "Continue"; with neither, it has nothing to hold */
.numbers-business-foot:has(.modal-status:empty):not(:has(button:not([hidden]))) { display: none; }

/* ══ NUMBERS S2: segments, health, pools ═════════════════════════════════
 * Plan §5.1–5.2 (docs/sprints/prod/PLAN_NUMBER_MANAGEMENT.md). Console tokens
 * only, no new hues. Health is a WORD and a GLYPH, never a colour: every
 * health pill keeps the neutral pill and changes only its mark —
 *   ○ ring = live · ◌ dashed ring = warming up · ◐ half = resting ·
 *   ● full = cooling (waits for a person) · no mark, muted = retired. */

/* Numbers · Pools · Accounts: the campaign page's switch, one bar edge to edge */
.numbers-segments { display: flex; margin: 4px 0 22px; padding: 3px; border-radius: 12px; }
.numbers-segments .agents-filter { flex: 1 1 0; min-width: 0; min-height: 40px; padding: 9px 16px;
  font-size: 14px; font-weight: 600; letter-spacing: -0.006em; border-radius: 9px; }
.numbers-segments .agents-filter[aria-selected="true"] { background: var(--c-surface); color: var(--c-ink); box-shadow: var(--ui-raise); }
.numbers-lede { margin: 3px 0 0; max-width: 64ch; font-size: 13px; line-height: 1.5; color: var(--c-ink-3); }

.number-state[data-health="warming"]::before { border: 1.5px dashed var(--c-ink-3); border-radius: 50%; background: none; }
.number-state[data-health="resting"]::before { border: 1.5px solid var(--c-ink-3); border-radius: 50%;
  background: linear-gradient(90deg, var(--c-ink-3) 50%, transparent 50%); }
.number-state[data-health="cooling"]::before { border: 1.5px solid var(--c-ink-3); border-radius: 50%; background: var(--c-ink-3); }
.number-state[data-health="retired"] { color: var(--c-ink-3); background: var(--ui-fill); }
.number-state[data-health="retired"]::before { display: none; }

/* how a number is doing, under its facts: this hour · 7 days ▂▄▅▆ · its pools */
.number-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; margin: 3px 0 0;
  font-size: 12.5px; line-height: 1.45; color: var(--c-ink-3); }
.number-dot { white-space: pre; }
/* seven days, seven bars, one ink: the shape of the week, not a chart */
.nh-spark { display: inline-flex; align-items: flex-end; gap: 2px; height: 13px; margin: 0 0 0 7px; vertical-align: -2px; }
.nh-spark i { display: block; width: 4px; min-height: 2px; border-radius: 1px; background: var(--c-ink-3); }
.nh-spark i.nh-gap { height: 2px; background: var(--c-ink-4); }
.nh-spark-wide { height: 44px; gap: 3px; margin: 0; width: 100%; }
.nh-spark-wide i { flex: 1 1 0; width: auto; border-radius: 2px; }

/* Rest…: a menu that hangs from its button, in the picker's material
 * (app.css .cf-pop): grows from the corner it hangs off, out faster than in. */
.number-actions { position: relative; }
/* The menu hangs from the row's actions, not the button: under the facts on
 * a narrow row it opens from their left edge, beside them on a wide one from
 * their right, and never off the side of the window. */
.number-rest-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; display: grid; width: 260px;
  padding: 5px; background: var(--c-surface); border-radius: 12px; box-shadow: var(--ui-float);
  transform-origin: top right; transform: scale(0.96); opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform 100ms var(--ease-out), opacity 100ms var(--ease-out), visibility 0s linear 100ms; }
.number-rest[data-open] .number-rest-menu { transform: none; opacity: 1; visibility: visible; pointer-events: auto;
  transition: transform 150ms var(--ease-out), opacity 120ms var(--ease-out), visibility 0s; }
.number-actions .number-rest-menu button { display: grid; justify-items: start; gap: 1px; width: 100%; min-height: 34px; margin: 0;
  padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--c-ink);
  font: 400 13px/1.35 var(--sans); text-align: left; }
.number-actions .number-rest-menu button:hover, .number-actions .number-rest-menu button:focus-visible { background: var(--ui-fill-2); outline: none; }
.number-actions .number-rest-menu button:active { transform: none; background: var(--ui-fill); }
.number-rest-menu .number-rest-retire { margin-top: 4px !important; border-top: 1px solid var(--ui-sep) !important; border-radius: 0 0 8px 8px !important; }
.number-rest-retire span { font-size: 12px; color: var(--c-ink-3); }

/* ── Pools: one row per pool, the whole row opens it ─────────────────── */
.numbers-pools .numbers-toolbar { align-items: flex-end; }
.numbers-pools .numbers-toolbar-end button { display: inline-flex; align-items: center; gap: 6px; margin: 0; min-height: 34px;
  padding: 8px 14px 8px 11px; font-size: 13px; font-weight: 600; border-radius: var(--ui-r-control); }
.numbers-pools .numbers-toolbar-end svg { width: 15px; height: 15px; }
.numbers-pools-list:empty { display: none; }
.numbers-pool + .numbers-pool { background-image: linear-gradient(var(--ui-sep), var(--ui-sep));
  background-size: calc(100% - 16px) 1px; background-position: 16px 0; background-repeat: no-repeat; }
.numbers-pool-open { display: grid; grid-template-columns: minmax(0, 1fr) auto 16px; align-items: center; gap: 4px 16px;
  width: 100%; margin: 0; padding: 14px 14px 14px 16px; border: 0; border-radius: 0; background: none;
  color: var(--c-ink); font: inherit; text-align: left; white-space: normal; line-height: 1.45; }
.numbers-pool-open:hover { background: var(--ui-fill-2); }
.numbers-pool-open:active { transform: none; background: var(--ui-fill); }
.numbers-pool-open:focus-visible { outline: 2px solid var(--c-ink); outline-offset: -2px; }
.numbers-pool-main { display: grid; gap: 2px; min-width: 0; }
.numbers-pool-main strong { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.numbers-pool-main .number-meta { margin: 0; }
.numbers-pool-purpose { padding: 2px 7px; border-radius: 999px; font: 500 11px/1.3 var(--sans); color: var(--c-ink-2); background: var(--ui-fill-2); }
.numbers-pool-rate { display: inline-flex; align-items: center; font-size: 12.5px; color: var(--c-ink-3); white-space: nowrap; }
.numbers-pool-rate b { margin-right: 4px; font-size: 13.5px; font-weight: 600; color: var(--c-ink); }
.numbers-pool-go { width: 16px; height: 16px; color: var(--c-ink-4); }
.numbers-pools-empty { display: flex; align-items: center; justify-content: space-between; gap: 12px 18px; flex-wrap: wrap; padding: 18px; }
.numbers-pools-empty p { flex: 1 1 320px; margin: 0; font-size: 13px; line-height: 1.55; color: var(--c-ink-2); max-width: 62ch; }
.numbers-pools-empty strong { color: var(--c-ink); font-weight: 600; }
.numbers-pools-empty button { margin: 0; min-height: 34px; padding: 8px 15px; font-size: 13px; border-radius: var(--ui-r-control); }
.numbers-accounts-empty { margin: 0 0 24px; }
.numbers-accounts-empty > button { margin: 0; min-height: 34px; padding: 8px 15px; font-size: 13px; border-radius: var(--ui-r-control); }
.numbers-panel > .numbers-connections:first-child, .numbers-accounts-empty[hidden] + .numbers-connections { margin-top: 0; }

/* ── the pool sheet: the .modal shell, cut as a right-hand sheet ─────────
 * In from the right and out to the right, always (where it lives); the
 * entrance on the panel spring, the exit quicker. A phone keeps the modal's
 * bottom sheet, same path in and out. Reduced motion: a cross-fade only. */
@media (min-width: 641px) {
  dialog.modal.numbers-sheet { padding: 12px; justify-content: flex-end; align-items: stretch; }
  dialog.modal.numbers-sheet .modal-panel { width: min(520px, 100%); height: 100%; max-height: none; }
  dialog.modal.numbers-sheet:not([open]) .modal-panel { transform: translateX(28px); transition: transform 160ms var(--ease-out); }
  dialog.modal.numbers-sheet[open] .modal-panel { transform: none; transition: transform 300ms var(--ui-spring); }
  @starting-style { dialog.modal.numbers-sheet[open] .modal-panel { transform: translateX(28px); } }
}
@media (prefers-reduced-motion: reduce) {
  dialog.modal.numbers-sheet:not([open]) .modal-panel, dialog.modal.numbers-sheet[open] .modal-panel { transform: none; transition: none; }
  @starting-style { dialog.modal.numbers-sheet[open] .modal-panel { transform: none; } }
  .number-rest-menu, .number-rest[data-open] .number-rest-menu { transform: none; transition: opacity 120ms ease, visibility 0s linear 120ms; }
}
.numbers-fieldset { min-width: 0; margin: 0 0 16px; padding: 0; border: 0; }
.numbers-fieldset > legend { padding: 0; margin: 0 0 6px; }
.numbers-fieldset > legend .numbers-optional { margin-left: 4px; }
/* purpose: four chips, one choice, the meaning under them */
.numbers-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.numbers-chip { position: relative; display: inline-flex; cursor: pointer; }
.numbers-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.numbers-chip span { display: inline-flex; align-items: center; min-height: 32px; padding: 6px 14px; border-radius: 999px;
  font: 500 13px/1.2 var(--sans); color: var(--c-ink-2); background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--ui-edge);
  transition: background-color 120ms ease, color 120ms ease, box-shadow 120ms ease, transform 140ms var(--ease-out); }
.numbers-chip:hover span { color: var(--c-ink); box-shadow: inset 0 0 0 1px rgba(27, 26, 22, 0.26); }
.numbers-chip:active span { transform: scale(0.97); }
.numbers-chip input:checked + span { color: var(--c-surface); background: var(--c-ink); box-shadow: none; }
.numbers-chip input:focus-visible + span { outline: 2px solid var(--c-ink); outline-offset: 2px; }
/* numbers: a checklist in an inset group, each with its status and week */
.numbers-pool-pick { max-height: 292px; overflow: auto; overscroll-behavior: contain; border-radius: var(--ui-r-card);
  box-shadow: inset 0 0 0 1px var(--c-line); }
.numbers-pool-number { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 2px 12px; align-items: center;
  padding: 10px 12px; cursor: pointer; }
.numbers-pool-number + .numbers-pool-number { border-top: 1px solid var(--ui-sep); }
.numbers-pool-number:hover { background: var(--ui-fill-2); }
.numbers-pool-number.is-off { cursor: default; opacity: 0.6; }
.numbers-pool-number.is-off:hover { background: none; }
.numbers-pool-number-main { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-width: 0; }
.numbers-pool-number-main strong { font-size: 13.5px; font-weight: 600; }
.numbers-pool-number-facts { grid-column: 2; font-size: 12px; line-height: 1.45; color: var(--c-ink-3); }
.numbers-pool-more { margin: 8px 0 0 !important; }
.numbers-pool-more .linkbtn { padding: 0; font-size: 12.5px; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--c-ink-4); }
/* pace: a stepper and the line that says what it means, as it changes */
.numbers-stepper { display: inline-flex; align-items: stretch; width: max-content; border-radius: var(--ui-r-control);
  box-shadow: inset 0 0 0 1px var(--ui-edge); background: var(--c-surface); }
.numbers-stepper button { min-width: 38px; min-height: 36px; margin: 0; padding: 0 10px; border: 0; border-radius: 0;
  background: none; color: var(--c-ink); font: 500 16px/1 var(--sans); }
.numbers-stepper button:first-child { border-radius: var(--ui-r-control) 0 0 var(--ui-r-control); }
.numbers-stepper button:last-child { border-radius: 0 var(--ui-r-control) var(--ui-r-control) 0; }
.numbers-stepper button:hover:not(:disabled) { background: var(--ui-fill-2); }
.numbers-stepper button:disabled { color: var(--c-ink-4); background: none; }
.modal .numbers-stepper input { width: 72px; min-height: 36px; border: 0; border-left: 1px solid var(--ui-sep); border-right: 1px solid var(--ui-sep);
  border-radius: 0; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; -moz-appearance: textfield; }
.modal .numbers-stepper input:focus { box-shadow: var(--ui-ring); }
.numbers-stepper input::-webkit-inner-spin-button, .numbers-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.numbers-pace-line { margin: 4px 0 0; padding: 10px 12px; border-radius: var(--ui-r-card); background: var(--c-sunk);
  font-size: 12.5px; line-height: 1.55; color: var(--c-ink-2); }
.numbers-pace-line b { color: var(--c-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.numbers-pace-caution { display: block; margin-top: 4px; color: var(--c-open-ink); }
/* Advanced, folded */
.numbers-pool-advanced { margin: 0 0 4px; }
.numbers-pool-advanced[open] > summary { margin-bottom: 8px; }
.numbers-min-healthy { align-items: center; flex-wrap: wrap; cursor: default; }
.numbers-min-healthy label { font: 400 13px/1.5 var(--sans); color: var(--c-ink); }
.modal .numbers-min-healthy input { width: 64px; min-height: 30px; padding: 4px 8px; text-align: center; font-variant-numeric: tabular-nums; }
/* edit mode: Health first */
.numbers-pool-health { margin: 0 0 20px; padding: 14px; border-radius: var(--ui-r-card); background: var(--c-sunk); }
.numbers-pool-health h3 { margin: 0; font: 600 13.5px/1.4 var(--sans); color: var(--c-ink); }
.numbers-pool-summary { margin: 2px 0 10px !important; font-size: 12.5px; color: var(--c-ink-3); }
.numbers-pool-chart:empty { display: none; }
.numbers-pool-chart { margin: 0 0 12px; }
.numbers-pool-chart-axis { display: flex; justify-content: space-between; margin-top: 4px; font-size: 11px; color: var(--c-ink-3); }
.numbers-pool-rows { border-radius: var(--ui-r-control); background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--c-line); }
.numbers-pool-rows:empty { display: none; }
.numbers-pool-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; padding: 9px 12px; font-size: 12.5px; color: var(--c-ink-3); }
.numbers-pool-row + .numbers-pool-row { border-top: 1px solid var(--ui-sep); }
.numbers-pool-row strong { font-size: 13px; font-weight: 600; color: var(--c-ink); }
.numbers-pool-row > .number-state { justify-self: end; }
.numbers-pool-row > .numbers-pool-row-facts { grid-column: 1 / -1; display: inline-flex; align-items: center; flex-wrap: wrap; }
.numbers-pool-delete { order: -1; margin-right: auto !important; color: var(--c-alarm-ink) !important; }
/* the sheet's footer: three buttons on one line, the status above them when it speaks */
#numbers-pool-dialog .modal-status { flex-basis: 100%; order: -2; }
#numbers-pool-dialog .modal-status:empty { display: none; }
.numbers-pools .numbers-toolbar > div:first-child { flex: 1 1 360px; min-width: 0; }

@container (max-width: 640px) {
  .number-row, .number-connection { grid-template-columns: 36px minmax(0, 1fr); }
  .numbers-try { grid-template-columns: 40px minmax(0, 1fr); }
  .numbers-try > button { grid-column: 2; justify-self: start; margin-top: 8px; }
  .numbers-choices { grid-template-columns: minmax(0, 1fr); }
  .number-steps > li { grid-template-columns: 22px minmax(0, 1fr); }
  .number-steps > li > :last-child:not(div) { grid-column: 2; justify-self: start; }
  .number-steps .number-assign-control { grid-column: 2; }
  .number-next { grid-template-columns: minmax(0, 1fr); }
  .number-next > button { justify-self: start; }
  .number-actions { grid-column: 2; justify-content: flex-start; margin-top: 8px; }
  .number-rest-menu { right: auto; left: 0; transform-origin: top left; max-width: calc(100cqw - 66px); }
}
@media (max-width: 760px) {
  .numbers-heading { flex-wrap: wrap; align-items: flex-start; }
  .numbers-heading > div:first-child { flex: 1 1 100%; }
  .numbers-actions { flex: 1 1 100%; margin: 0; }
  .numbers-actions button { flex: 1 1 0; justify-content: center; min-height: 40px; }
  /* stacked, a hidden button would leave a button-sized hole above the choices */
  .numbers-page[data-empty="true"] #numbers-add { display: none; }
  .numbers-actions .guide-top { flex: none; }
  .numbers-toolbar { align-items: stretch; }
  .numbers-section-head { align-items: flex-start; }
  .number-row, .number-connection { padding: 14px; gap: 4px 12px; }
  .numbers-try { padding: 16px; }
  .numbers-banner { flex-wrap: wrap; padding: 10px 12px; }
  .numbers-banner p { flex-basis: calc(100% - 20px); }
  .numbers-banner button { margin-left: 18px; }
  .numbers-choose .numbers-choice { padding-right: 18px; }
  .numbers-choose .numbers-choice-tag { position: static; order: -1; }
  .numbers-start { padding: 18px; }
  .number-assign-control { flex: 1 1 100%; }
  .number-assign-control select { flex: 1; width: auto; min-height: 36px; font-size: 16px; }
  .number-assign-control button, .number-actions button { min-height: 36px; }
  .numbers-search-go { min-height: 40px; }
  .numbers-table thead { display: none; }
  .numbers-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 10px 14px; }
  .numbers-table tbody tr + tr { border-top: 1px solid var(--ui-sep); }
  .numbers-table tbody tr + tr td { border-top: 0; }
  .numbers-table td { padding: 2px 0; white-space: normal; }
  .numbers-table td:first-child { grid-column: 1; }
  .numbers-table td:nth-child(2), .numbers-table td:nth-child(3) { grid-column: 1; font-size: 12.5px; color: var(--c-ink-3); }
  .numbers-table td:last-child { grid-column: 2; grid-row: 1 / span 3; }
  .numbers-code { flex-wrap: wrap; }
  .numbers-segments .agents-filter { padding: 9px 8px; font-size: 13.5px; }
  .numbers-pool-open { grid-template-columns: minmax(0, 1fr) 16px; }
  .numbers-pool-rate { grid-column: 1; grid-row: 2; }
  .numbers-pool-go { grid-row: 1 / span 2; grid-column: 2; }
  .numbers-pools .numbers-toolbar { flex-wrap: wrap; }
  .numbers-pools .numbers-toolbar-end { flex: 1 1 100%; }
  .numbers-pools .numbers-toolbar-end button { flex: 1 1 auto; justify-content: center; min-height: 40px; }
}
