/* Voice mode page (pages-voice.js): the switch's radios, a refused save's
   ways forward, the re-embed panel, the working-set memory meter and the
   latency check's stage labels. Everything else is the design system's
   (cards, kv lists, tiles, badges, the waterfall). */
.vo-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.vo-fieldset legend { font-size: 11px; font-weight: 680; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; padding: 0; }
.vo-fieldset label { align-items: flex-start; line-height: 1.5; }
.vo-fieldset input[type=radio] { width: 15px; height: 15px; margin: 3px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.vo-fieldset input[type=radio]:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

.card.vo-refusal {
  background:
    linear-gradient(180deg, rgba(244, 104, 95, 0.07), rgba(244, 104, 95, 0.02)) padding-box,
    linear-gradient(var(--bg-1), var(--bg-1)) padding-box,
    linear-gradient(135deg, rgba(244, 104, 95, 0.42), rgba(244, 104, 95, 0.12)) border-box;
}
.vo-refusal p { margin: 0 0 8px; color: var(--text-2); font-size: 13px; line-height: 1.6; }
.vo-way { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.vo-way .eyebrow { margin-bottom: 6px; }
.vo-way p.rd-sub { margin: 0 0 8px; }
.vo-steps { margin: 6px 0 0; padding-left: 20px; color: var(--text-2); font-size: 13px; line-height: 1.6; }
.vo-steps li + li { margin-top: 4px; }

.vo-meter { height: 6px; margin-top: 12px; border-radius: 4px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.vo-meter span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #22d3ee, #6c6ff5); }

/* A stage's label is words and the stage's name: the label column takes a
   third of the row, not the shared waterfall's sixth. */
.vo-wf .wf-row { grid-template-columns: minmax(150px, 2fr) 4fr max-content; }
.vo-wf .wf-row .wf-label { font-family: inherit; font-size: 12px; }

/* The refusal, the re-embed panel and the live region sit between the page's
   two grids, which the design system spaces only when they are siblings. */
#vo-refusal:not(:empty), .card.vo-reembed { margin-top: 14px; }
.vo-sr + .grid { margin-top: 14px; }

/* Read by a screen reader, not shown. */
.vo-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* The re-embed panel ("Move this store to voice mode"): its form, its
   estimate, its progress bars and its blockers. Tokens only, so it follows
   the design system's theme. */
.card.vo-reembed[hidden] { display: none; }
.card.vo-reembed {
  background:
    linear-gradient(180deg, var(--accent-soft), transparent 60%) padding-box,
    linear-gradient(var(--bg-1), var(--bg-1)) padding-box,
    linear-gradient(135deg, var(--accent-line), var(--line)) border-box;
}
#vo-re-heading { outline: none; border-radius: 4px; scroll-margin-top: calc(var(--topbar-h) + 24px); }
#vo-re-heading:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
.vo-reembed p.s .mono, .vo-re-job .mono { font-size: 11.5px; overflow-wrap: anywhere; }
.vo-re-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 18px; align-items: start; }
.vo-re-form .field { margin: 0; }
.vo-re-check { display: flex; gap: 9px; align-items: flex-start; margin-top: 22px; font-size: 13px; line-height: 1.5; color: var(--text-2); cursor: pointer; }
.vo-re-check input[type=checkbox] { margin: 3px 0 0; flex-shrink: 0; }
.vo-re-check input[type=checkbox]:focus-visible, .vo-reembed select:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.vo-re-job { margin: 0 0 12px; color: var(--text-2); font-size: 13px; line-height: 1.6; }
#vo-re-estimate-out:not(:empty) { margin-top: 16px; }
.vo-re-tiles { margin: 0 0 12px; }
.vo-re-tiles .t-value { font-size: 20px; }
.vo-re-tiles .t-sub { white-space: normal; }
.vo-reembed .table-wrap { margin-bottom: 12px; }
.vo-reembed .kv { margin: 0 0 12px; }
.vo-re-note { margin: 0 0 12px; }
.vo-re-blockers ul { margin: 6px 0 0; padding-left: 18px; }
.vo-re-blockers li + li { margin-top: 6px; }
.vo-re-blockers .rd-sub { margin-top: 2px; }
/* One grid for every family's row, so the bars line up. */
.vo-re-bars { display: grid; grid-template-columns: minmax(150px, 1.4fr) 3fr max-content; gap: 8px 12px; align-items: center; margin: 0 0 14px; font-size: 13px; }
.vo-re-row { display: contents; }
.vo-re-none { grid-column: 2 / -1; }
#vo-re-live { margin-top: 16px; }
.vo-re-count { font-variant-numeric: tabular-nums; text-align: right; color: var(--text-2); white-space: nowrap; }
.vo-bar { display: block; height: 8px; border-radius: 999px; background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.vo-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-3)); transition: width 0.4s ease; }
.vo-reembed .vo-way { margin-top: 16px; }
@media (max-width: 820px) {
  .vo-re-form { grid-template-columns: 1fr; }
  .vo-re-check { margin-top: 0; }
  .vo-re-bars { grid-template-columns: 1fr; gap: 4px; }
  .vo-re-none { grid-column: auto; }
  .vo-re-label { margin-top: 6px; }
  .vo-re-count { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .vo-bar > span { transition: none; } }
