/* =====================================================================
   Robot Café shared component library — base + primitives
   Requires tokens.css. Class prefix: rc-. No inline styles anywhere.
   ===================================================================== */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--rc-font);
  font-size: var(--rc-text-body);
  line-height: var(--rc-lh-body);
  font-weight: var(--rc-weight-regular);
  color: var(--rc-ink-900);
  background: var(--rc-wash-top), var(--rc-page);
  background-repeat: no-repeat;
  background-color: var(--rc-page);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01" 0;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--rc-blue-700); }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--rc-focus-color); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--rc-blue-200); }
.rc-num, .rc-money { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; white-space: nowrap; }
.rc-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.rc-skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: #fff; border-radius: 999px; box-shadow: var(--rc-shadow-2); font-weight: 700; }
.rc-skip:focus { top: 12px; }

/* ---------- Typography roles ---------- */
.rc-eyebrow {
  font-size: var(--rc-text-eyebrow); line-height: 1.33; font-weight: var(--rc-weight-bold);
  letter-spacing: var(--rc-tracking-eyebrow); text-transform: uppercase; color: var(--rc-blue-700);
}
.rc-display { font-size: var(--rc-text-display); line-height: var(--rc-lh-display); font-weight: 780; letter-spacing: var(--rc-tracking-title); }
.rc-title { font-size: var(--rc-text-title); line-height: var(--rc-lh-title); font-weight: 760; letter-spacing: var(--rc-tracking-title); }
.rc-h2 { font-size: var(--rc-text-section); line-height: var(--rc-lh-section); font-weight: 720; letter-spacing: var(--rc-tracking-tight); }
.rc-h3 { font-size: 1rem; line-height: 1.45; font-weight: 700; letter-spacing: -.01em; }
.rc-body { font-size: var(--rc-text-body); line-height: var(--rc-lh-body); }
.rc-small { font-size: var(--rc-text-small); line-height: var(--rc-lh-small); }
.rc-meta { font-size: var(--rc-text-meta); line-height: var(--rc-lh-meta); color: var(--rc-ink-500); }
.rc-muted { color: var(--rc-ink-600); }
.rc-strong { font-weight: 700; }
.rc-lede { font-size: var(--rc-text-body); line-height: 1.55; color: var(--rc-ink-600); max-width: var(--rc-measure); }
.rc-prose { max-width: var(--rc-measure); }
.rc-prose > * + * { margin-top: 12px; }
.rc-mono { font-variant-numeric: tabular-nums; letter-spacing: .03em; font-weight: 750; }

/* ---------- Layout primitives ---------- */
.rc-stack { display: flex; flex-direction: column; gap: var(--rc-stack-related); }
.rc-stack--xs { gap: var(--rc-space-1); }
.rc-stack--sm { gap: var(--rc-space-2); }
.rc-stack--md { gap: var(--rc-space-4); }
.rc-stack--lg { gap: var(--rc-space-6); }
.rc-stack--section { gap: var(--rc-section-gap); }
.rc-row { display: flex; align-items: center; gap: var(--rc-space-3); flex-wrap: wrap; }
.rc-row--nowrap { flex-wrap: nowrap; }
.rc-row--spread { justify-content: space-between; }
.rc-row--top { align-items: flex-start; }
.rc-row--tight { gap: var(--rc-space-2); }
.rc-grow { flex: 1 1 auto; min-width: 0; }
.rc-grid { display: grid; gap: var(--rc-space-4); }
.rc-grid--2 { grid-template-columns: 1fr; }
.rc-grid--3 { grid-template-columns: 1fr; }
.rc-grid--metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--rc-space-3); }
@media (min-width: 768px) {
  .rc-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rc-grid--metrics { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--rc-space-4); }
}
.rc-split { display: grid; gap: var(--rc-space-6); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1024px) {
  .rc-split { grid-template-columns: minmax(0, 1fr) 360px; gap: var(--rc-space-7); }
  .rc-split--wide-aside { grid-template-columns: minmax(0, 1fr) 400px; }
  .rc-split--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.rc-narrow { max-width: var(--rc-content-narrow); }
.rc-form-width { max-width: var(--rc-measure-form); }
.rc-center { margin-inline: auto; }
.rc-divider { height: 1px; background: var(--rc-line); border: 0; margin: 0; }
.rc-sticky { position: sticky; top: calc(var(--rc-space-6)); }

/* ---------- Buttons (A01 white pill + gradient border) ---------- */
.rc-btn {
  --_ring: var(--rc-grad-secondary);
  --_ring-hover: var(--rc-grad-secondary-hover);
  --_bw: var(--rc-border-action);
  --_fg: var(--rc-ink-900);
  --_tint: var(--rc-blue-50);
  --_press: var(--rc-blue-100);
  --_shadow: 0 0 0 0 rgba(0,0,0,0);
  --_halo: var(--rc-halo);
  position: relative;
  isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--rc-icon-to-label);
  min-height: var(--rc-btn-h);
  /* Visual correction: keep label clear of the gradient ring (was nearly touching). */
  padding: 0 28px;
  border: var(--_bw) solid transparent;
  box-sizing: border-box;
  border-radius: var(--rc-radius-pill);
  background: linear-gradient(#fff, #fff) padding-box, var(--_ring) border-box;
  color: var(--_fg);
  font-family: var(--rc-font);
  font-size: 1rem; line-height: 1.25; font-weight: 720; letter-spacing: -.006em;
  text-align: center; text-decoration: none; white-space: nowrap;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  box-shadow: var(--_shadow);
  transition: box-shadow var(--rc-dur-micro) var(--rc-ease-standard), color var(--rc-dur-micro) var(--rc-ease-standard);
}
.rc-btn::before { /* tint layer: fades, never resizes */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--_tint); opacity: 0;
  transition: opacity var(--rc-dur-micro) var(--rc-ease-standard), background-color var(--rc-dur-instant) linear;
}
.rc-btn > svg { flex: none; width: 18px; height: 18px; }
.rc-btn__label { display: inline-block; padding-bottom: 1px; /* optical centring for Manrope cap height */ }
@media (hover: hover) {
  .rc-btn:hover { background: linear-gradient(#fff, #fff) padding-box, var(--_ring-hover) border-box; box-shadow: var(--_shadow), var(--_halo); }
  .rc-btn:hover::before { opacity: 1; }
}
.rc-btn:active::before { opacity: 1; background: var(--_press); }
.rc-btn:focus-visible { outline: none; border-radius: var(--rc-radius-pill); box-shadow: var(--_shadow), var(--rc-focus-ring); }
.rc-btn[aria-pressed="true"] { background: linear-gradient(#fff,#fff) padding-box, var(--rc-grad-primary) border-box; }
.rc-btn[aria-pressed="true"]::before { opacity: 1; background: var(--rc-blue-50); }

.rc-btn--primary {
  --_ring: var(--rc-grad-primary);
  --_ring-hover: var(--rc-grad-primary-hover);
  --_bw: var(--rc-border-action-strong);
  --_shadow: var(--rc-shadow-primary);
  font-weight: 780;
}
.rc-btn--secondary { --_fg: var(--rc-ink-700); }
/* Manus Clear Service quiet: borderless icon+text link, not a bordered pill. */
.rc-btn--quiet {
  --_ring: linear-gradient(transparent, transparent);
  --_ring-hover: linear-gradient(transparent, transparent);
  --_bw: 0;
  --_fg: var(--rc-blue-700);
  --_shadow: 0 0 0 0 transparent;
  background: transparent;
  padding: 0 14px;
  font-weight: 700;
}
.rc-btn--quiet.rc-btn--sm { padding: 0 14px; }
@media (hover: hover) { .rc-btn--quiet:hover { background: transparent; box-shadow: none; } }
.rc-btn--quiet:focus-visible { box-shadow: var(--rc-focus-ring); }
.rc-btn--danger {
  --_ring: var(--rc-grad-danger);
  --_ring-hover: linear-gradient(115deg, #A93226 0%, #CF6440 100%);
  --_fg: var(--rc-danger-fg);
  --_tint: var(--rc-danger-bg);
  --_press: #FADCD8;
  --_halo: var(--rc-halo-danger);
}
.rc-btn--sm { min-height: var(--rc-btn-h-sm); padding: 0 22px; font-size: .9375rem; }
.rc-btn--sm::after { content: ""; position: absolute; inset: -4px -2px; } /* 44px hit area */
.rc-btn--lg { min-height: 52px; padding: 0 34px; font-size: 1.0625rem; }
.rc-btn--block { display: flex; width: 100%; }
.rc-btn--icon { padding: 0; width: var(--rc-btn-h); }
.rc-btn--icon.rc-btn--sm { width: var(--rc-btn-h-sm); }

/* Disabled: still legible (ink-500 ≥ 4.5:1), clearly inert */
.rc-btn:disabled, .rc-btn[aria-disabled="true"] {
  --_ring: var(--rc-grad-disabled); --_ring-hover: var(--rc-grad-disabled);
  --_fg: var(--rc-ink-500); --_shadow: 0 0 0 0 rgba(0,0,0,0); --_halo: 0 0 0 0 rgba(0,0,0,0);
  cursor: not-allowed;
}
.rc-btn:disabled::before, .rc-btn[aria-disabled="true"]::before { opacity: 0; }
/* Pending: label changes to an -ing verb, spinner appears, width is locked by rc.js */
.rc-btn[aria-busy="true"] { cursor: progress; pointer-events: none; --_halo: 0 0 0 0 rgba(0,0,0,0); }
.rc-btn[aria-busy="true"]::before { opacity: 1; background: var(--rc-blue-25); }
/* Success: brief confirmation, then rc.js restores or replaces */
.rc-btn.is-success { --_ring: var(--rc-grad-success); --_ring-hover: var(--rc-grad-success); --_fg: var(--rc-success-fg); --_tint: var(--rc-success-bg); --_shadow: 0 4px 14px rgba(30,138,87,.14); }

.rc-spinner {
  width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 2px solid var(--rc-blue-200); border-top-color: var(--rc-blue-600);
  animation: rc-spin 720ms linear infinite;
}
@keyframes rc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rc-spinner { animation-duration: 2400ms; } }

/* Action groups — centred by default (owner direction), explicit exceptions */
.rc-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--rc-action-gap); }
.rc-actions--start { justify-content: flex-start; }   /* toolbar / row exception */
.rc-actions--end { justify-content: flex-end; }       /* table row exception */
.rc-actions--spread { justify-content: space-between; }
.rc-actions--stack { flex-direction: column; align-items: stretch; max-width: 420px; margin-inline: auto; width: 100%; }
@media (max-width: 599px) {
  .rc-actions--stack-phone { flex-direction: column; align-items: stretch; width: 100%; }
  .rc-actions--stack-phone > .rc-btn { width: 100%; }
}
.rc-actions-follow { margin-top: var(--rc-content-to-actions); }

/* Links */
.rc-link {
  color: var(--rc-blue-700); font-weight: 680; text-decoration: underline;
  text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: rgba(0,90,134,.35);
  transition: text-decoration-color var(--rc-dur-micro) var(--rc-ease-standard);
  border-radius: 4px;
}
.rc-link:hover { text-decoration-color: currentColor; }
.rc-link--standalone { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.rc-link--standalone:hover { text-decoration: underline; text-underline-offset: 3px; }
.rc-link--standalone svg { width: 16px; height: 16px; transition: transform var(--rc-dur-micro) var(--rc-ease-standard); }
.rc-link--standalone:hover svg.rc-arrow { transform: translateX(2px); }
.rc-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 680; color: var(--rc-ink-700); text-decoration: none; border-radius: 8px; padding-right: 8px; }
.rc-back svg { width: 18px; height: 18px; }
.rc-back:hover { color: var(--rc-blue-700); }

/* Icon action (non-pill: circular ghost for toolbars, close, more) */
.rc-icon-btn {
  display: inline-grid; place-items: center; width: var(--rc-target); height: var(--rc-target); flex: none;
  border: 0; border-radius: 50%; background: transparent; color: var(--rc-ink-700); cursor: pointer;
  transition: background-color var(--rc-dur-micro) var(--rc-ease-standard), color var(--rc-dur-micro) var(--rc-ease-standard);
}
.rc-icon-btn svg { width: 20px; height: 20px; }
.rc-icon-btn:hover { background: var(--rc-blue-50); color: var(--rc-ink-900); }
.rc-icon-btn:active { background: var(--rc-blue-100); }
.rc-icon-btn:focus-visible { outline: none; box-shadow: var(--rc-focus-ring); border-radius: 50%; }
.rc-icon-btn--outlined { border: 1.5px solid var(--rc-line-strong); background: #fff; }

/* ---------- Fields ---------- */
.rc-form { display: flex; flex-direction: column; gap: var(--rc-field-gap); }
.rc-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--rc-field-gap); }
.rc-legend { padding: 0; font-size: var(--rc-text-section); font-weight: 720; margin-bottom: 4px; }
.rc-field { display: flex; flex-direction: column; gap: var(--rc-label-to-control); min-width: 0; }
.rc-label { font-size: .9375rem; line-height: 1.4; font-weight: 680; color: var(--rc-ink-900); }
.rc-label .rc-optional { font-weight: 500; color: var(--rc-ink-500); margin-left: 6px; }
.rc-label .rc-required { font-weight: 600; color: var(--rc-ink-700); margin-left: 6px; }
.rc-hint { font-size: var(--rc-text-meta); line-height: var(--rc-lh-meta); color: var(--rc-ink-500); margin-top: calc(var(--rc-control-to-help) - var(--rc-label-to-control)); }
.rc-error-msg { display: flex; gap: 6px; align-items: flex-start; font-size: .9375rem; line-height: 1.4; font-weight: 680; color: var(--rc-danger-fg); }
.rc-error-msg svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.rc-input, .rc-select, .rc-textarea {
  width: 100%; min-height: var(--rc-control-h); padding: 0 14px;
  border: var(--rc-border-control) solid var(--rc-control-border); border-radius: var(--rc-radius-sm);
  background: #fff; font-size: 1rem; line-height: 1.4; color: var(--rc-ink-900);
  transition: border-color var(--rc-dur-micro) var(--rc-ease-standard), box-shadow var(--rc-dur-micro) var(--rc-ease-standard);
}
.rc-textarea { padding: 12px 14px; min-height: 112px; resize: vertical; }
.rc-input::placeholder, .rc-textarea::placeholder { color: var(--rc-ink-500); opacity: 1; }
.rc-input:hover, .rc-select:hover, .rc-textarea:hover { border-color: var(--rc-ink-600); }
.rc-input:focus, .rc-select:focus, .rc-textarea:focus { outline: none; border-color: var(--rc-blue-600); box-shadow: 0 0 0 3px rgba(0,124,185,.22); }
.rc-input[aria-invalid="true"], .rc-select[aria-invalid="true"], .rc-textarea[aria-invalid="true"] { border-color: var(--rc-danger-dot); border-width: 2px; }
.rc-input:disabled, .rc-select:disabled { background: var(--rc-neutral-bg); color: var(--rc-ink-500); border-color: var(--rc-line-strong); cursor: not-allowed; }
.rc-input[readonly] { background: var(--rc-surface-soft); }
.rc-select {
  appearance: none; padding-right: 42px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%232F4B5B' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
}
.rc-search {
  padding-left: 44px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235E7684' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center;
}
.rc-input-group { display: flex; align-items: stretch; }
.rc-input-group__prefix {
  display: inline-flex; align-items: center; padding: 0 12px; border: var(--rc-border-control) solid var(--rc-control-border);
  border-right: 0; border-radius: var(--rc-radius-sm) 0 0 var(--rc-radius-sm); background: var(--rc-surface-tint); font-weight: 650; color: var(--rc-ink-700);
}
.rc-input-group .rc-input { border-radius: 0 var(--rc-radius-sm) var(--rc-radius-sm) 0; }
.rc-field-row { display: grid; gap: var(--rc-field-gap); grid-template-columns: 1fr; }
@media (min-width: 600px) { .rc-field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--rc-space-4); } .rc-field-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rc-counter { text-align: right; }

/* Checkbox & radio */
.rc-check { display: flex; align-items: flex-start; gap: 12px; min-height: var(--rc-target); padding: 10px 0; cursor: pointer; font-size: 1rem; line-height: 1.45; }
.rc-check input {
  appearance: none; flex: none; width: 22px; height: 22px; margin: 1px 0 0; border: 2px solid var(--rc-control-border); border-radius: 6px; background: #fff; cursor: pointer;
  display: grid; place-items: center; transition: border-color var(--rc-dur-micro) var(--rc-ease-standard), background-color var(--rc-dur-micro) var(--rc-ease-standard);
}
.rc-check input[type="radio"] { border-radius: 50%; }
.rc-check input::after { content: ""; width: 12px; height: 7px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: translateY(-1px) rotate(-45deg) scale(.6); opacity: 0; transition: opacity var(--rc-dur-micro), transform var(--rc-dur-micro) var(--rc-ease-standard); }
.rc-check input[type="radio"]::after { width: 10px; height: 10px; border: 0; border-radius: 50%; background: #fff; transform: scale(.6); }
.rc-check input:checked { background: var(--rc-blue-600); border-color: var(--rc-blue-600); }
.rc-check input:checked::after { opacity: 1; transform: translateY(-1px) rotate(-45deg) scale(1); }
.rc-check input[type="radio"]:checked::after { transform: scale(1); }
.rc-check input:focus-visible { outline: none; box-shadow: var(--rc-focus-ring); }
.rc-check__text { display: flex; flex-direction: column; gap: 2px; }
.rc-check__text .rc-meta { font-size: .875rem; }

/* Choice cards (radio as card) */
.rc-choices { display: grid; gap: var(--rc-space-3); grid-template-columns: 1fr; }
@media (min-width: 600px) { .rc-choices--2 { grid-template-columns: repeat(2, 1fr); } .rc-choices--3 { grid-template-columns: repeat(3, 1fr); } }
.rc-choice { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--rc-line-strong); border-radius: var(--rc-radius-md); background: #fff; cursor: pointer; transition: border-color var(--rc-dur-micro) var(--rc-ease-standard), box-shadow var(--rc-dur-micro) var(--rc-ease-standard), background-color var(--rc-dur-micro); }
.rc-choice:hover { border-color: var(--rc-blue-300); }
.rc-choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.rc-choice__mark { flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--rc-control-border); background: #fff; transition: border-color var(--rc-dur-micro), box-shadow var(--rc-dur-micro); }
.rc-choice:has(input:checked) { border-color: transparent; background: linear-gradient(var(--rc-blue-25), var(--rc-blue-25)) padding-box, var(--rc-grad-primary) border-box; border-width: 2px; padding: 13.5px 15.5px; }
.rc-choice:has(input:checked) .rc-choice__mark { border-color: var(--rc-blue-600); box-shadow: inset 0 0 0 4px #fff; background: var(--rc-blue-600); }
.rc-choice:has(input:focus-visible) { box-shadow: var(--rc-focus-ring); }
.rc-choice__body { display: flex; flex-direction: column; gap: 2px; }
.rc-choice__title { font-weight: 720; }

/* Segmented control */
.rc-segmented { display: inline-flex; padding: 4px; gap: 4px; border-radius: var(--rc-radius-pill); background: var(--rc-neutral-bg); border: 1px solid var(--rc-line); max-width: 100%; }
.rc-segmented label { position: relative; }
.rc-segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rc-segmented span { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 16px; border-radius: var(--rc-radius-pill); font-weight: 680; color: var(--rc-ink-600); transition: background-color var(--rc-dur-micro) var(--rc-ease-standard), color var(--rc-dur-micro), box-shadow var(--rc-dur-micro); white-space: nowrap; }
.rc-segmented span svg { width: 18px; height: 18px; }
.rc-segmented label:hover span { color: var(--rc-ink-900); }
.rc-segmented input:checked + span { background: #fff; color: var(--rc-blue-800); box-shadow: var(--rc-shadow-1), 0 0 0 1px var(--rc-blue-200); }
.rc-segmented input:focus-visible + span { box-shadow: var(--rc-focus-ring); }
.rc-segmented--block { display: flex; width: 100%; }
.rc-segmented--block label { flex: 1; }
.rc-segmented--block span { width: 100%; }

/* Quantity stepper */
.rc-stepper { display: inline-flex; align-items: center; gap: 4px; border: 1.5px solid var(--rc-line-strong); border-radius: var(--rc-radius-pill); padding: 2px; background: #fff; }
.rc-stepper .rc-icon-btn { width: 40px; height: 40px; }
.rc-stepper output { min-width: 28px; text-align: center; font-weight: 760; font-variant-numeric: tabular-nums; }

/* ---------- Badges ---------- */
.rc-badge {
  --_fg: var(--rc-neutral-fg); --_bg: var(--rc-neutral-bg); --_line: var(--rc-neutral-line); --_dot: var(--rc-neutral-dot);
  display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 10px 2px 9px;
  border-radius: var(--rc-radius-pill); border: 1px solid var(--_line); background: var(--_bg); color: var(--_fg);
  font-size: .8125rem; line-height: 1.3; font-weight: 720; white-space: nowrap; letter-spacing: .005em;
}
.rc-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--_dot); flex: none; }
.rc-badge--plain::before { display: none; }
.rc-badge--success { --_fg: var(--rc-success-fg); --_bg: var(--rc-success-bg); --_line: var(--rc-success-line); --_dot: var(--rc-success-dot); }
.rc-badge--warning { --_fg: var(--rc-warning-fg); --_bg: var(--rc-warning-bg); --_line: var(--rc-warning-line); --_dot: var(--rc-warning-dot); }
.rc-badge--danger  { --_fg: var(--rc-danger-fg);  --_bg: var(--rc-danger-bg);  --_line: var(--rc-danger-line);  --_dot: var(--rc-danger-dot); }
.rc-badge--info    { --_fg: var(--rc-info-fg);    --_bg: var(--rc-info-bg);    --_line: var(--rc-info-line);    --_dot: var(--rc-info-dot); }
.rc-badge--review  { --_fg: var(--rc-review-fg);  --_bg: var(--rc-review-bg);  --_line: var(--rc-review-line);  --_dot: var(--rc-review-dot); }
/* Shape cue in addition to colour */
.rc-badge--success::before { width: 9px; height: 5px; border-radius: 0; background: transparent; border: solid var(--_dot); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.rc-badge--danger::before { border-radius: 2px; transform: rotate(45deg); width: 7px; height: 7px; }
.rc-badge--review::before { background: transparent; border: 2px solid var(--_dot); width: 8px; height: 8px; }
.rc-badge--warning::before { border-radius: 50%; box-shadow: 0 0 0 2px rgba(217,154,18,.22); }
.rc-badge--lg { min-height: 30px; font-size: .875rem; padding: 3px 12px 3px 11px; }
.rc-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 1px 8px; border-radius: 6px; background: var(--rc-surface-tint); color: var(--rc-ink-700); font-size: .8125rem; font-weight: 680; }
.rc-tag--demo { background: #FFF1D6; color: #6E4500; border: 1px dashed #E3B65B; }

/* ---------- Alerts ---------- */
.rc-alert {
  --_fg: var(--rc-info-fg); --_bg: var(--rc-info-bg); --_line: var(--rc-info-line); --_dot: var(--rc-info-dot);
  display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 4px 12px; align-items: start;
  padding: 14px 16px; border: 1px solid var(--_line); border-radius: var(--rc-radius-md); background: var(--_bg); color: var(--rc-ink-900);
}
.rc-alert > svg { width: 22px; height: 22px; color: var(--_dot); margin-top: 1px; }
.rc-alert__title { font-weight: 740; color: var(--_fg); line-height: 1.45; }
.rc-alert__body { grid-column: 2; font-size: .9375rem; line-height: 1.5; color: var(--rc-ink-700); }
.rc-alert__body > * + * { margin-top: 6px; }
.rc-alert__actions { grid-column: 2; margin-top: 10px; display: flex; flex-wrap: wrap; gap: 10px; }
.rc-alert--success { --_fg: var(--rc-success-fg); --_bg: var(--rc-success-bg); --_line: var(--rc-success-line); --_dot: var(--rc-success-dot); }
.rc-alert--warning { --_fg: var(--rc-warning-fg); --_bg: var(--rc-warning-bg); --_line: var(--rc-warning-line); --_dot: var(--rc-warning-dot); }
.rc-alert--danger  { --_fg: var(--rc-danger-fg);  --_bg: var(--rc-danger-bg);  --_line: var(--rc-danger-line);  --_dot: var(--rc-danger-dot); }
.rc-alert--review  { --_fg: var(--rc-review-fg);  --_bg: var(--rc-review-bg);  --_line: var(--rc-review-line);  --_dot: var(--rc-review-dot); }
.rc-alert--neutral { --_fg: var(--rc-ink-900);    --_bg: var(--rc-surface-soft); --_line: var(--rc-line);       --_dot: var(--rc-ink-500); }
.rc-error-summary { border-width: 2px; border-color: var(--rc-danger-dot); background: #fff; }
.rc-error-summary ul { margin: 4px 0 0; padding-left: 18px; }
.rc-error-summary li + li { margin-top: 4px; }
.rc-error-summary a { color: var(--rc-danger-fg); font-weight: 700; }

/* ---------- Progress ---------- */
.rc-steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); column-gap: 6px; counter-reset: step; }
.rc-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: .8125rem; line-height: 1.3; font-weight: 650; color: var(--rc-ink-500); padding: 0; overflow-wrap: normal; word-break: normal; hyphens: none; }
.rc-step::before { /* connector */
  content: ""; position: absolute; top: 13px; right: 50%; width: calc(100% + 6px); height: 2px; background: var(--rc-line-strong); z-index: 0;
}
.rc-step:first-child::before { display: none; }
.rc-step__mark { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--rc-line-strong); color: var(--rc-ink-500); transition: background-color var(--rc-dur-micro-slow) var(--rc-ease-standard), border-color var(--rc-dur-micro-slow); }
.rc-step__mark svg { width: 14px; height: 14px; }
.rc-step.is-done { color: var(--rc-ink-700); }
.rc-step.is-done::before, .rc-step.is-current::before { background: var(--rc-blue-400); }
.rc-step.is-done .rc-step__mark { background: var(--rc-blue-600); border-color: var(--rc-blue-600); color: #fff; }
.rc-step.is-current { color: var(--rc-ink-900); font-weight: 760; }
.rc-step.is-current .rc-step__mark { border: 3px solid var(--rc-blue-500); box-shadow: 0 0 0 4px var(--rc-blue-100); }
.rc-step.is-current .rc-step__mark::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rc-blue-600); }
.rc-step.is-problem .rc-step__mark { border-color: var(--rc-danger-dot); color: var(--rc-danger-fg); background: var(--rc-danger-bg); }
.rc-step.is-problem { color: var(--rc-danger-fg); }

/* Marker | event text | timestamp — distinct tracks so labels never overprint times. */
.rc-timeline { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.rc-timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  column-gap: 12px;
  row-gap: 4px;
  align-items: start;
  padding-bottom: 18px;
}
.rc-timeline__item::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 22px;
  bottom: 0;
  width: 2px;
  background: var(--rc-line);
  z-index: 0;
}
.rc-timeline__item:last-child { padding-bottom: 0; }
.rc-timeline__item:last-child::before { display: none; }
.rc-timeline__dot {
  position: relative;
  z-index: 1;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--rc-blue-50);
  border: 2px solid var(--rc-blue-300);
  flex-shrink: 0;
}
.rc-timeline__dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rc-blue-600); }
.rc-timeline__item.is-muted .rc-timeline__dot { background: #fff; border-color: var(--rc-line-strong); }
.rc-timeline__item.is-muted .rc-timeline__dot::after { background: var(--rc-ink-300); }
.rc-timeline__item.is-success .rc-timeline__dot { border-color: var(--rc-success-line); background: var(--rc-success-bg); }
.rc-timeline__item.is-success .rc-timeline__dot::after { background: var(--rc-success-dot); }
.rc-timeline__item.is-danger .rc-timeline__dot { border-color: var(--rc-danger-line); background: var(--rc-danger-bg); }
.rc-timeline__item.is-danger .rc-timeline__dot::after { background: var(--rc-danger-dot); }
.rc-timeline__body { min-width: 0; }
.rc-timeline__title { font-weight: 700; line-height: 1.45; margin: 0; overflow-wrap: anywhere; }
.rc-timeline__meta { font-size: var(--rc-text-meta); color: var(--rc-ink-500); margin: 0; overflow-wrap: anywhere; }
.rc-timeline__time {
  margin: 0;
  white-space: nowrap;
  text-align: right;
  font-size: var(--rc-text-meta);
  color: var(--rc-ink-500);
  line-height: 1.45;
  justify-self: end;
}

.rc-meter { height: 8px; border-radius: 99px; background: var(--rc-neutral-bg); overflow: hidden; }
.rc-meter > span { display: block; height: 100%; border-radius: inherit; background: var(--rc-grad-primary); }
.rc-meter--25 > span { width: 25%; } .rc-meter--50 > span { width: 50%; } .rc-meter--75 > span { width: 75%; } .rc-meter--100 > span { width: 100%; }

/* Programmatic focus targets (route change -> #page-title) do not show a ring; keyboard focus on controls always does */
[tabindex="-1"]:focus:not(:focus-visible), h1[tabindex="-1"]:focus { outline: none; box-shadow: none; }
@media (max-width: 419px) { .rc-steps { column-gap: 2px; } .rc-step { font-size: .75rem; letter-spacing: -.01em; } .rc-step.is-current { font-weight: 720; } .rc-step::before { width: calc(100% + 2px); } }
@media (max-width: 419px) { .rc-card > .rc-steps, .rc-card--raised > .rc-steps { margin-inline: calc(var(--rc-space-3) * -1); } }
.rc-segmented--block { display: flex; flex-wrap: wrap; border-radius: 22px; }
.rc-segmented--block label { flex: 1 1 auto; }
.rc-segmented--block span { width: 100%; }
@media (max-width: 479px) { .rc-segmented span { white-space: normal; text-align: center; padding: 6px 12px; } }
.rc-link:has(> svg:first-child) { display: inline-flex; align-items: center; gap: 6px; }
.rc-link > svg { width: 18px; height: 18px; flex: none; }
