/*
 * feedback.css — OAIT Design System 2.1.0 reference CSS, unit c-feedback.
 *
 * Components: snackbar (and its host), banner (with the form error summary), page strip,
 * linear progress, spinner, skeleton, in-content empty state, full-page state, status indicator.
 *
 * Implements: D-CSN-25, D-CSN-26, D-CSN-27, D-CSN-28, D-CSN-29, D-CSN-30, D-CSN-06 (placement only),
 * D-ARC-08 (snackbar on the inverse roles with an outline edge), D-ARC-10 (skeleton roles),
 * D-ARC-14 (radius names), D-ARC-17 (motion names), D-ARC-20 and D-ARC-21 (type styles),
 * D-ARC-23 (tile and icon sizes), D-ARC-26 (z-snackbar), D-ARC-35 (status dot sizes),
 * D-COL-05 and D-ARC-33 (state layers), D-COL-20 (focus-ring re-point), D-SEM-10 (edges),
 * D-SEM-16 (snackbar enter and exit), D-CAI-06 (the spinner in a banner action),
 * D-BCP-20 (copy lives in the docs).
 * Canonical: §2.6, §2.7, §2.8, §6.3, §7.3, §7.4, §10.0, §10.21–§10.24, §13.
 *
 * Tokens read: --color-inverse-surface, --color-inverse-on-surface, --color-inverse-primary,
 * --color-outline, --color-outline-variant, --color-focus-ring (re-pointed), --color-on-surface,
 * --color-on-surface-variant, --color-surface-container-high, --color-surface-container-highest,
 * --color-primary-ink, --color-secondary-container, --color-on-secondary-container,
 * --color-info, --color-info-container, --color-on-info-container, --color-success,
 * --color-success-container, --color-on-success-container, --color-warning, --color-warning-container,
 * --color-on-warning-container, --color-error, --color-error-container, --color-on-error-container,
 * --color-skeleton, --color-skeleton-highlight; --z-behind; --radius-12px, --radius-box, --radius-4px,
 * --radius-card, --radius-full, --radius-chip; --shadow-elevation-3; --z-snackbar;
 * --container-snackbar, --container-form; --size-touch-target, --size-button-sm, --size-icon-sm,
 * --size-icon-md, --size-icon-4xl, --size-tile-xl, --size-tile-2xl, --size-avatar-sm;
 * --space-1, --space-2, --space-2-5, --space-3, --space-3-5, --space-4, --space-5, --space-6,
 * --space-10, --space-12, --space-14, --space-24; --text-body-lg, --text-body-md, --text-body-sm,
 * --text-label-md, --text-label-sm, --text-title-lg, --text-headline-md, --text-code-xs (with their
 * --line-height, --letter-spacing, and --font-weight companions); --font-mono;
 * --opacity-state-hover, --opacity-state-pressed; --duration-short-3, --duration-medium-2;
 * --ease-standard, --ease-emphasized, --ease-emphasized-accelerate; --animate-spinner,
 * --animate-skeleton, --animate-live.
 *
 * Classes: .oa-snackbar-host (+ --nav-bar), .oa-snackbar (+ __message, __action, __close),
 * .oa-banner (+ --info, --success, --warning, --error, --neutral; __icon, __content, __title,
 * __message, __list, __actions, __action, __close), .oa-page-strip (+ --warning; __chip),
 * .oa-progress (+ --thin; __label, __value, __track, __indicator), .oa-spinner (+ --sm, --lg),
 * .oa-skeleton (+ --line, --title, --block, --circle), .oa-empty (+ __disc, __art, __title, __body,
 * __actions), .oa-state-page (+ __icon, __disc, __title, __body, __actions, __code),
 * .oa-status (+ --live, --success, --pending, --error, --off, --info, --lg, --sm; __dot, __label).
 *
 * Context properties read: --oa-state (state layer), --oa-link (set to currentColor in banners and
 * strips). Component-local: --oa-snackbar-host-offset, --oa-banner-line, --oa-progress-value,
 * --oa-spinner-size, --oa-spinner-stroke, --oa-spinner-arc, --oa-spinner-track, --oa-status-size,
 * --oa-status-color, --oa-status-halo.
 * Component constants from canonical (raw px allowed): progress 8px / 4px, spinner 20px / 2px and
 * 48px / 4px, status dot 12px with a 5px halo and 8px, skeleton lines 16px / 24px, the
 * illustration cap 160px, the 40ch measure of the empty-state body.
 */

/* ------------------------------------------------------------------------------------------ */
/* Snackbar host: one polite live region per page, mounted empty at load (canonical §10.21).    */
/* ------------------------------------------------------------------------------------------ */

.oa-snackbar-host {
  position: fixed;
  z-index: var(--z-snackbar);
  inset-inline: calc(var(--space-4) + var(--oa-safe-start)) calc(var(--space-4) + var(--oa-safe-end));
  inset-block-end: calc(var(--oa-snackbar-host-offset, var(--space-4)) + var(--oa-safe-bottom));
  display: flex;
  justify-content: flex-start;
  pointer-events: none;
}

/* Above the phone navigation bar: calc(6rem + var(--oa-safe-bottom)), 16px over the 80px bar.
   Other bottom chrome (the sticky action bar, below 1024px) sets --oa-snackbar-host-offset to its
   height plus 16px while it shows. */
.oa-snackbar-host--nav-bar {
  --oa-snackbar-host-offset: var(--space-24);
}

@media (min-width: 48rem) {
  /* From 768px: 24px from the inline start and from the bottom, or above a sticky action bar that
     still shows (it lasts until 1024px); the rail replaces the navigation bar. */
  .oa-snackbar-host {
    inset-inline: calc(var(--space-6) + var(--oa-safe-start)) calc(var(--space-6) + var(--oa-safe-end));
    inset-block-end: calc(var(--oa-snackbar-host-offset, var(--space-6)) + var(--oa-safe-bottom));
  }

  .oa-snackbar-host--nav-bar {
    --oa-snackbar-host-offset: var(--space-6);
  }
}

/* While a snackbar shows over an app shell, the shell's scrolling region gains room at its end, so
   its last control can scroll clear of the bar and a focused control is never hidden under it
   (WCAG 2.4.11, canonical §4.10, §10.21). A shell whose main meets the bottom edge (no navigation
   bar under it) adds the bottom inset as well. */
:root:has(.oa-snackbar-host > .oa-snackbar:not([hidden])) .oa-app-shell__main {
  padding-block-end: calc(var(--space-6) + var(--size-scroll-offset));
  scroll-padding-block-end: var(--size-scroll-offset);
}

:root:has(.oa-snackbar-host > .oa-snackbar:not([hidden])) .oa-app-shell:where(:not(.oa-app-shell--rail)) > .oa-app-shell__main {
  padding-block-end: calc(var(--space-6) + var(--size-scroll-offset) + var(--oa-safe-bottom));
  scroll-padding-block-end: calc(var(--size-scroll-offset) + var(--oa-safe-bottom));
}

@media (min-width: 48rem) {
  :root:has(.oa-snackbar-host > .oa-snackbar:not([hidden])) .oa-app-shell > .oa-app-shell__main {
    padding-block-end: calc(var(--space-6) + var(--size-scroll-offset) + var(--oa-safe-bottom));
    scroll-padding-block-end: calc(var(--size-scroll-offset) + var(--oa-safe-bottom));
  }
}

@media print {
  .oa-snackbar-host {
    display: none;
  }
}

/* ------------------------------------------------------------------------------------------ */
/* Snackbar: inverse surface in both themes, outline edge, elevation-3 (D-CSN-25, D-ARC-08).   */
/* ------------------------------------------------------------------------------------------ */

.oa-snackbar {
  --color-focus-ring: var(--color-inverse-primary);
  pointer-events: auto;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  inline-size: 100%;
  max-inline-size: var(--container-snackbar);
  min-block-size: var(--space-14);
  padding-block: var(--space-1);
  padding-inline: var(--space-4) var(--space-1);
  border: 1px solid var(--color-outline);
  border-radius: var(--radius-12px);
  background-color: var(--color-inverse-surface);
  color: var(--color-inverse-on-surface);
  box-shadow: var(--shadow-elevation-3);
  font-size: var(--text-body-md);
  line-height: var(--text-body-md--line-height);
  letter-spacing: var(--text-body-md--letter-spacing);
  font-weight: var(--text-body-md--font-weight);
  opacity: 1;
  transition: opacity var(--duration-short-3) var(--ease-emphasized);
}

/* Enter: fades in over short-3 (canonical §7.3). */
@starting-style {
  .oa-snackbar {
    opacity: 0;
  }
}

/* Exit: the script sets hidden, then removes the bar after --duration-short-3 (never on transitionend). */
.oa-snackbar[hidden] {
  display: none;
  opacity: 0;
  transition:
    opacity var(--duration-short-3) var(--ease-emphasized-accelerate),
    display var(--duration-short-3) allow-discrete;
}

.oa-snackbar__message {
  flex: 1 1 auto;
  min-inline-size: 0;
  margin: 0;
  padding-block: var(--space-2-5);
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.oa-snackbar__action,
.oa-snackbar__close,
.oa-banner__action,
.oa-banner__close {
  position: relative;
  isolation: isolate;
  flex: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  background-color: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* State layer: currentColor at --oa-state over the control, below its label (canonical §2.7). It
   covers the border box (inset -1px over the 1px edge), so hover shows no lighter rim. */
.oa-snackbar__action::before,
.oa-snackbar__close::before,
.oa-banner__action::before,
.oa-banner__close::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: var(--z-behind);
  border-radius: inherit;
  background-color: currentColor;
  opacity: var(--oa-state, 0);
  pointer-events: none;
  transition: opacity var(--duration-short-3) var(--ease-standard);
}

@media (hover: hover) {
  .oa-snackbar__action:hover,
  .oa-snackbar__close:hover,
  .oa-banner__action:hover,
  .oa-banner__close:hover {
    --oa-state: var(--opacity-state-hover);
  }
}

.oa-snackbar__action:active,
.oa-snackbar__close:active,
.oa-banner__action:active,
.oa-banner__close:active {
  --oa-state: var(--opacity-state-pressed);
}

/* Press shows at once; release fades back over short-3. */
.oa-snackbar__action:active::before,
.oa-snackbar__close:active::before,
.oa-banner__action:active::before,
.oa-banner__close:active::before {
  transition: none;
}

/* One optional action: a 48px text button in inverse-primary, label-md. */
.oa-snackbar__action {
  min-block-size: var(--size-touch-target);
  padding-inline: var(--space-3-5);
  color: var(--color-inverse-primary);
  white-space: nowrap;
  font-size: var(--text-label-md);
  line-height: var(--text-label-md--line-height);
  letter-spacing: var(--text-label-md--letter-spacing);
  font-weight: var(--text-label-md--font-weight);
}

/* The close button, always present: 48px circle, 24px close icon, named "Close message". */
.oa-snackbar__close {
  inline-size: var(--size-touch-target);
  block-size: var(--size-touch-target);
  padding: 0;
  color: var(--color-inverse-on-surface);
}

/* ------------------------------------------------------------------------------------------ */
/* Banner: one inline notice in five tones (D-CSN-26).                                         */
/* ------------------------------------------------------------------------------------------ */

/* The banner's first-line height as a length, so the 20px icon centers on the first line in
   every language (Latin 20px, Arabic 24.5px). Unsupported browsers fall back to 0px: icon on top. */
@property --oa-banner-line {
  syntax: "<length>";
  inherits: true;
  initial-value: 0px;
}

.oa-banner {
  --oa-link: currentColor;
  --oa-banner-line: 1lh;
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  inline-size: 100%;
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-box);
  background-color: var(--color-surface-container-high);
  color: var(--color-on-surface);
  text-align: start;
  font-size: var(--text-body-md);
  line-height: var(--text-body-md--line-height);
  letter-spacing: var(--text-body-md--letter-spacing);
  font-weight: var(--text-body-md--font-weight);
}

.oa-banner--neutral {
  background-color: var(--color-surface-container-high);
  color: var(--color-on-surface);
}

.oa-banner--info {
  background-color: var(--color-info-container);
  color: var(--color-on-info-container);
}

.oa-banner--success {
  background-color: var(--color-success-container);
  color: var(--color-on-success-container);
}

.oa-banner--warning {
  background-color: var(--color-warning-container);
  color: var(--color-on-warning-container);
}

.oa-banner--error {
  background-color: var(--color-error-container);
  color: var(--color-on-error-container);
}

.oa-banner__icon {
  flex: none;
  font-size: var(--size-icon-md);
  margin-block-start: max(0px, calc((var(--oa-banner-line) - var(--size-icon-md)) / 2));
}

.oa-banner__content {
  flex: 1 1 auto;
  min-inline-size: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
}

.oa-banner__title {
  margin: 0;
  color: inherit;
  text-wrap: balance;
  font-size: var(--text-label-md);
  line-height: var(--text-label-md--line-height);
  letter-spacing: var(--text-label-md--letter-spacing);
  font-weight: var(--text-label-md--font-weight);
}

.oa-banner__message {
  margin: 0;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

/* Error summary: one link per invalid field, each a standalone 48px link in the on-color. */
.oa-banner__list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.oa-banner__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-block-start: var(--space-1);
}

/* A text button in the banner's on-color: 40px with its hit area extended to 48px. */
.oa-banner__action {
  min-block-size: var(--size-button-sm);
  padding-inline: var(--space-5);
  color: inherit;
  white-space: nowrap;
  font-size: var(--text-label-md);
  line-height: var(--text-label-md--line-height);
  letter-spacing: var(--text-label-md--letter-spacing);
  font-weight: var(--text-label-md--font-weight);
}

.oa-banner__action::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block: -5px;
}

/* A retry action while it waits: aria-busy="true" with aria-disabled="true". Colors and focus stay
   and the state layer stays off; the spinner leads the waiting words ("Sending…"), its arc in the
   label color with no track, at the small button's icon size (D-CAI-06). */
.oa-banner__action:is([aria-busy="true"], [aria-disabled="true"]) {
  --oa-state: 0;
  cursor: default;
}

.oa-banner__action .oa-spinner {
  --oa-spinner-arc: currentColor;
  --oa-spinner-track: transparent;
  --oa-spinner-size: var(--size-icon-sm);
}

/* Dismissible banners only: a 48px close button at the inline end, 4px inside the inline-end
   padding edge; it reaches over the 12px block padding so its icon sits on the first line. */
.oa-banner__close {
  inline-size: var(--size-touch-target);
  block-size: var(--size-touch-target);
  margin-block: calc(var(--space-3) * -1);
  margin-inline-end: calc(var(--space-3) * -1);
  padding: 0;
  color: inherit;
}

/* ------------------------------------------------------------------------------------------ */
/* Page strip: DEMO, practice, and staging notices, full width under the header (D-CSN-26).    */
/* ------------------------------------------------------------------------------------------ */

.oa-page-strip {
  --oa-link: currentColor;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-1) var(--space-3);
  inline-size: 100%;
  margin: 0;
  padding: var(--space-2) var(--space-4);
  border-block: 1px solid transparent;
  background-color: var(--color-info-container);
  color: var(--color-on-info-container);
  text-align: center;
  font-size: var(--text-body-md);
  line-height: var(--text-body-md--line-height);
  letter-spacing: var(--text-body-md--letter-spacing);
  font-weight: var(--text-body-md--font-weight);
}

/* The private host screen (keep it off the projector). */
.oa-page-strip--warning {
  background-color: var(--color-warning-container);
  color: var(--color-on-warning-container);
}

/* The "DEMO" chip: the strip's colors reversed, a small status-chip shape. */
.oa-page-strip__chip {
  box-sizing: border-box;
  display: inline-flex;
  flex: none;
  align-items: center;
  min-block-size: var(--space-6);
  padding-inline: var(--space-3);
  border-radius: var(--radius-chip);
  background-color: var(--color-on-info-container);
  color: var(--color-info-container);
  white-space: nowrap;
  font-size: var(--text-label-sm);
  line-height: var(--text-label-sm--line-height);
  letter-spacing: var(--text-label-sm--letter-spacing);
  font-weight: var(--text-label-sm--font-weight);
}

.oa-page-strip--warning .oa-page-strip__chip {
  background-color: var(--color-on-warning-container);
  color: var(--color-warning-container);
}

/* ------------------------------------------------------------------------------------------ */
/* Linear progress: primary-ink on surface-container-highest, never primary (D-CSN-28).        */
/* ------------------------------------------------------------------------------------------ */

.oa-progress {
  --oa-progress-value: 0%;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  inline-size: 100%;
}

/* The value is always also in words: the words, then an optional figure at the inline end. */
.oa-progress__label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  margin: 0;
  color: var(--color-on-surface);
  font-size: var(--text-body-md);
  line-height: var(--text-body-md--line-height);
  letter-spacing: var(--text-body-md--letter-spacing);
  font-weight: var(--text-body-md--font-weight);
}

.oa-progress__value {
  color: var(--color-on-surface-variant);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: var(--text-label-md);
  line-height: var(--text-label-md--line-height);
  letter-spacing: var(--text-label-md--letter-spacing);
  font-weight: var(--text-label-md--font-weight);
}

/* The role="progressbar" element: 8px, or 4px thin; forced colors give it an edge (end of file). */
.oa-progress__track {
  box-sizing: border-box;
  display: block;
  inline-size: 100%;
  block-size: 8px;
  overflow: hidden;
  border-radius: var(--radius-full);
  background-color: var(--color-surface-container-highest);
}

.oa-progress--thin .oa-progress__track {
  block-size: 4px;
}

/* Grows from the inline start (from the right in Arabic); width over medium-2 emphasized. */
.oa-progress__indicator {
  display: block;
  block-size: 100%;
  inline-size: var(--oa-progress-value);
  max-inline-size: 100%;
  border-radius: var(--radius-full);
  background-color: var(--color-primary-ink);
  transition: inline-size var(--duration-medium-2) var(--ease-emphasized);
}

/* ------------------------------------------------------------------------------------------ */
/* Spinner: a quarter arc in primary-ink on an outline-variant track, always with words; inside */
/* a button, button.css points the arc at the label color and drops the track (D-CAI-06).       */
/* ------------------------------------------------------------------------------------------ */

.oa-spinner,
.oa-spinner--sm {
  --oa-spinner-size: 20px;
  --oa-spinner-stroke: 2px;
}

.oa-spinner--lg {
  --oa-spinner-size: 48px;
  --oa-spinner-stroke: 4px;
}

.oa-spinner {
  /* A container whose ground is not a surface re-points these on its spinners with a selector of its
     own, as button.css does (.oa-btn .oa-spinner: the arc in the label color, no track, the icon's
     size) and as the banner action does above. */
  --oa-spinner-arc: var(--color-primary-ink);
  --oa-spinner-track: var(--color-outline-variant);
  box-sizing: border-box;
  display: inline-block;
  flex: none;
  vertical-align: middle;
  inline-size: var(--oa-spinner-size);
  block-size: var(--oa-spinner-size);
  border: var(--oa-spinner-stroke) solid var(--oa-spinner-track);
  border-block-start-color: var(--oa-spinner-arc);
  border-radius: var(--radius-full);
  animation: var(--animate-spinner);
}

/* ------------------------------------------------------------------------------------------ */
/* Skeleton: blocks in the final layout, swept only while motion is allowed (D-CSN-29).         */
/* ------------------------------------------------------------------------------------------ */

.oa-skeleton {
  box-sizing: border-box;
  display: block;
  inline-size: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius-4px);
  background-color: var(--color-skeleton);
}

/* A body text line (16px); shorten the last lines of a paragraph to 80% and 60%. */
.oa-skeleton--line {
  block-size: 16px;
}

/* A title line (24px). */
.oa-skeleton--title {
  block-size: 24px;
}

/* A media block: give it the size or aspect ratio of what it stands for; it keeps a card's corners
   unless the final element has others. */
.oa-skeleton--block {
  border-radius: var(--radius-card);
}

/* An avatar or disc: 40px (avatar-sm) unless the final avatar is larger. */
.oa-skeleton--circle {
  flex: none;
  inline-size: var(--size-avatar-sm);
  block-size: auto;
  aspect-ratio: 1;
  border-radius: var(--radius-full);
}

@media (prefers-reduced-motion: no-preference) {
  .oa-skeleton {
    background-image: linear-gradient(90deg, var(--color-skeleton), var(--color-skeleton-highlight), var(--color-skeleton));
    background-size: 220% 100%;
    animation: var(--animate-skeleton);
  }
}

/* ------------------------------------------------------------------------------------------ */
/* In-content empty state (D-CSN-30): disc, title, body, one action.                           */
/* ------------------------------------------------------------------------------------------ */

.oa-empty {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  inline-size: 100%;
  padding: var(--space-12) var(--space-6);
  text-align: center;
}

.oa-empty__disc {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  inline-size: var(--size-tile-xl);
  block-size: var(--size-tile-xl);
  border-radius: var(--radius-full);
  background-color: var(--color-secondary-container);
  color: var(--color-on-secondary-container);
}

/* A product illustration may replace the disc: 160px or less, aria-hidden. */
.oa-empty__art {
  display: block;
  flex: none;
  max-inline-size: 160px;
  max-block-size: 160px;
}

.oa-empty__title {
  margin: 0;
  color: var(--color-on-surface);
  text-wrap: balance;
  font-size: var(--text-title-lg);
  line-height: var(--text-title-lg--line-height);
  letter-spacing: var(--text-title-lg--letter-spacing);
  font-weight: var(--text-title-lg--font-weight);
}

.oa-empty__body {
  max-inline-size: 40ch;
  margin: 0;
  color: var(--color-on-surface-variant);
  text-wrap: pretty;
  font-size: var(--text-body-md);
  line-height: var(--text-body-md--line-height);
  letter-spacing: var(--text-body-md--letter-spacing);
  font-weight: var(--text-body-md--font-weight);
}

.oa-empty__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-block-start: var(--space-1);
}

/* ------------------------------------------------------------------------------------------ */
/* Full-page state (404, error, offline, not set up, expired link), inside the product shell.  */
/* ------------------------------------------------------------------------------------------ */

.oa-state-page {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  inline-size: 100%;
  max-inline-size: var(--container-form);
  margin-inline: auto;
  margin-block: auto;
  padding-block: var(--space-10);
  text-align: center;
}

/* The bare icon: icon-4xl in primary-ink. */
.oa-state-page__icon {
  flex: none;
  font-size: var(--size-icon-4xl);
  color: var(--color-primary-ink);
}

/* Problem states (not set up, expired link): a tile-2xl tonal disc with an icon-3xl icon. */
.oa-state-page__disc {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  inline-size: var(--size-tile-2xl);
  block-size: var(--size-tile-2xl);
  border-radius: var(--radius-full);
  background-color: var(--color-warning-container);
  color: var(--color-on-warning-container);
}

.oa-state-page__title {
  margin: 0;
  color: var(--color-on-surface);
  text-wrap: balance;
  font-size: var(--text-headline-md);
  line-height: var(--text-headline-md--line-height);
  letter-spacing: var(--text-headline-md--letter-spacing);
  font-weight: var(--text-headline-md--font-weight);
}

.oa-state-page__body {
  margin: 0;
  color: var(--color-on-surface-variant);
  text-wrap: pretty;
  font-size: var(--text-body-lg);
  line-height: var(--text-body-lg--line-height);
  letter-spacing: var(--text-body-lg--letter-spacing);
  font-weight: var(--text-body-lg--font-weight);
}

/* One filled lg button first, full width below 640px, then an optional quieter action. */
.oa-state-page__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  inline-size: 100%;
}

.oa-state-page__actions > :first-child {
  align-self: stretch;
}

@media (min-width: 40rem) {
  .oa-state-page__actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .oa-state-page__actions > :first-child {
    align-self: auto;
  }
}

/* The error code comes last and small; the code itself is mono and left to right. */
.oa-state-page__code {
  margin: 0;
  color: var(--color-on-surface-variant);
  font-size: var(--text-body-sm);
  line-height: var(--text-body-sm--line-height);
  letter-spacing: var(--text-body-sm--letter-spacing);
  font-weight: var(--text-body-sm--font-weight);
}

.oa-state-page__code code {
  font-family: var(--font-mono);
  font-size: var(--text-code-xs);
  line-height: var(--text-code-xs--line-height);
  letter-spacing: var(--text-code-xs--letter-spacing);
  font-weight: var(--text-code-xs--font-weight);
}

/* ------------------------------------------------------------------------------------------ */
/* Status indicator: a dot and words; only real-time live states pulse (D-CSN-27).            */
/* ------------------------------------------------------------------------------------------ */

.oa-status {
  --oa-status-size: 8px;
  --oa-status-color: var(--color-outline);
  --oa-status-halo: var(--color-surface-container-highest);
  display: inline-flex;
  align-items: flex-start;
  gap: var(--space-2);
  max-inline-size: 100%;
}

.oa-status--sm {
  --oa-status-size: 8px;
}

.oa-status--lg {
  --oa-status-size: 12px;
  display: flex;
  gap: var(--space-3);
}

.oa-status--live,
.oa-status--success {
  --oa-status-color: var(--color-success);
  --oa-status-halo: var(--color-success-container);
}

.oa-status--pending {
  --oa-status-color: var(--color-warning);
  --oa-status-halo: var(--color-warning-container);
}

.oa-status--error {
  --oa-status-color: var(--color-error);
  --oa-status-halo: var(--color-error-container);
}

.oa-status--off {
  --oa-status-color: var(--color-outline);
  --oa-status-halo: var(--color-surface-container-highest);
}

.oa-status--info {
  --oa-status-color: var(--color-info);
  --oa-status-halo: var(--color-info-container);
}

/* Decorative (aria-hidden); centered on the first line of the words it stands beside. The dot sets
   no font-size, so 1lh is the line height of its status line in every language. */
.oa-status__dot {
  flex: none;
  box-sizing: border-box;
  inline-size: var(--oa-status-size);
  block-size: var(--oa-status-size);
  margin-block-start: max(0px, calc((1lh - var(--oa-status-size)) / 2));
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  color: var(--oa-status-color);
  background-color: currentColor;
}

/* Large: a 5px halo in the container color, 5px in from the inline start so it never clips. */
.oa-status--lg .oa-status__dot {
  margin-inline-start: 5px;
  box-shadow: 0 0 0 5px var(--oa-status-halo);
}

/* Only a real-time live state pulses, on the large dot; it stands still under reduced motion. */
.oa-status--lg.oa-status--live .oa-status__dot {
  animation: var(--animate-live);
}

.oa-status__label {
  min-inline-size: 0;
}

/* ------------------------------------------------------------------------------------------ */
/* Forced colors: keep the parts whose meaning is a fill visible.                             */
/* ------------------------------------------------------------------------------------------ */

@media (forced-colors: active) {
  .oa-progress__track {
    border: 1px solid CanvasText;
  }

  .oa-progress__indicator {
    forced-color-adjust: none;
    background-color: Highlight;
  }

  .oa-spinner {
    forced-color-adjust: none;
    border-color: GrayText;
    border-block-start-color: Highlight;
  }
}
