/* Millennial Ultra design system: tokens + components. Vendored from the "Millennial Ultra" design system; edit it there, not here. */
/* Millennial Ultra — generated from tokens.json */
:root, [data-theme="ink"] {
  --mus-violet-deep: #5b3df5;
  --mus-violet: #7c5cff;
  --mus-cyan: #22d3ee;
  --mus-cyan-soft: #8fe9fb;
  --mus-ink: #06080f;
  --mus-icon: #0a0d18;
  --mus-panel: #0e1220;
  --mus-panel-2: #131829;
  --mus-mist: #e7eaf4;
  --mus-slate: #98a2bd;
  --mus-paper: #f7f7fb;
  --mus-rule: #dfe2ea;
  --mus-graphite: #1a1d26;
  --mus-body: #4a5163;
  --mus-muted: #7a8194;
  --mus-live: #34d399;
  --mus-live-ink: #0f9d58;
  --mus-dev: #fbbf24;
  --mus-alert: #fb7185;
  --mus-alert-ink: #b3261e;
  --bg: #06080f;
  --surface: #0e1220;
  --surface-2: #131829;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e7eaf4;
  --text-soft: #98a2bd;
  --text-faint: #7c86a2;
  --link: #8fe9fb;
  --accent: #9580ff;
  --accent-fill: #5b3df5;
  --on-accent: #ffffff;
  --focus: #22d3ee;
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, 0.12);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.12);
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, 0.12);
  --info: #8fe9fb;
  --info-soft: rgba(34, 211, 238, 0.11);
  color-scheme: dark;
}

[data-theme="paper"] {
  --bg: #f7f7fb;
  --surface: #ffffff;
  --surface-2: #f0f1f6;
  --line: #dfe2ea;
  --line-strong: #c5c9d6;
  --text: #1a1d26;
  --text-soft: #4a5163;
  --text-faint: #5f6678;
  --link: #5b3df5;
  --accent: #5b3df5;
  --accent-fill: #5b3df5;
  --on-accent: #ffffff;
  --focus: #5b3df5;
  --ok: #0b7a45;
  --ok-soft: #e3f4ea;
  --warn: #8a5300;
  --warn-soft: #fdf3dc;
  --danger: #b3261e;
  --danger-soft: #fbe9e8;
  --info: #0b6683;
  --info-soft: #e2f2f7;
  color-scheme: light;
}

:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --mus-gradient: linear-gradient(120deg, #5b3df5, #7c5cff 45%, #22d3ee);
  --shadow-raised: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 30px 80px -34px rgba(0, 0, 0, 0.85);
  --shadow-glow: 0 24px 90px -34px rgba(124, 92, 255, 0.5);
  --shadow-paper: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 30px 80px -50px rgba(26, 29, 38, 0.45);
  --font-sans: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

.mu-display {
  font-family: var(--font-sans);
  font-size: 64px;
  line-height: 1.12;
  font-weight: 620;
  letter-spacing: -0.025em;
}

.mu-title {
  font-family: var(--font-sans);
  font-size: 46px;
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.mu-h3 {
  font-family: var(--font-sans);
  font-size: 24px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.mu-lede {
  font-family: var(--font-sans);
  font-size: 19px;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: 0;
}

.mu-body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: 0;
}

.mu-ui {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.467;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.mu-small {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0;
}

.mu-kpi-value {
  font-family: var(--font-sans);
  font-size: 32px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.mu-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.mu-mono {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Millennial Ultra — components. Every value comes from tokens.css (var(--…)). */

/* ------------------------------------------------------------------ base */

.mu-root {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
}
.mu-root *, .mu-root *::before, .mu-root *::after { box-sizing: border-box; }
[data-theme] { color: var(--text); }
.mu-root ::selection { background: var(--accent-fill); color: var(--on-accent); }

.mu-container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: max(16px, 4vw);
}

.mu-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------ type */

.mu-display {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(38px, 2.2rem + 2.6vw, 64px);
  line-height: 1.12;
  font-weight: 620;
  letter-spacing: -0.025em;
  color: var(--text);
  text-wrap: balance;
}
.mu-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(30px, 1.6rem + 1.5vw, 46px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
  text-wrap: balance;
}
.mu-h3 { margin: 0; color: var(--text); text-wrap: balance; }
.mu-lede { margin: 0; color: var(--text-soft); max-width: 60ch; text-wrap: pretty; }
.mu-body { margin: 0; color: var(--text-soft); max-width: 68ch; text-wrap: pretty; }
.mu-ui { color: var(--text); }
.mu-small { color: var(--text-soft); }
.mu-mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.mu-kpi-value { color: var(--text); }

.mu-eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.mu-eyebrow::before { content: "// "; color: var(--accent); letter-spacing: 0.06em; }

.mu-grad-text {
  background: var(--mus-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
@media (forced-colors: active) {
  .mu-grad-text { -webkit-text-fill-color: currentColor; color: CanvasText; background: none; }
}

.mu-link {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: currentColor;
  border-radius: 2px;
}
.mu-link:hover { color: var(--text); }
.mu-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.mu-arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--link);
  text-decoration: none;
  border-radius: 4px;
}
.mu-arrow-link:hover { color: var(--text); gap: 10px; }
.mu-arrow-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mu-arrow-link svg { width: 16px; height: 16px; flex: none; }

.mu-rule { height: 1px; margin: 0; border: 0; background: var(--line); }
.mu-rule--grad { background: var(--mus-gradient); }

/* --------------------------------------------------------------- buttons */

.mu-btn {
  box-sizing: border-box;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.mu-btn svg { width: 18px; height: 18px; flex: none; }
.mu-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mu-btn:active { transform: translateY(0) scale(0.985); }

/* Violet Deep fill inside a 1px gradient edge: the gradient stays a hairline. */
.mu-btn--primary {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--accent-fill), var(--accent-fill)) padding-box,
    var(--mus-gradient) border-box;
  color: var(--on-accent);
  box-shadow: var(--shadow-glow);
}
.mu-btn--primary:hover { transform: translateY(-1px); filter: brightness(1.07); }
.mu-btn--primary:active { transform: translateY(0) scale(0.985); filter: brightness(0.97); }

.mu-btn--secondary {
  border-color: var(--line-strong);
  background-color: transparent;
  color: var(--text);
}
.mu-btn--secondary:hover { border-color: var(--accent); background-color: var(--surface-2); transform: translateY(-1px); }

.mu-btn--ghost {
  border-color: transparent;
  background-color: transparent;
  color: var(--text-soft);
  padding-inline: 14px;
}
.mu-btn--ghost:hover { color: var(--text); background-color: var(--surface-2); }

.mu-btn--sm { min-height: 36px; padding: 0 14px; font-size: 13px; gap: 6px; }
.mu-btn--sm svg { width: 16px; height: 16px; }
/* Keeps a 44px touch target while the button draws at 36px. */
.mu-btn--sm::after { content: ""; position: absolute; inset: -4px 0; }
.mu-btn--ghost.mu-btn--sm { padding-inline: 10px; }

.mu-btn--block { display: flex; width: 100%; }

/* Icon-only: a 44px circle (36px with --sm, hit area kept at 44px). Always give it an aria-label. */
.mu-btn--icon { width: 44px; padding: 0; gap: 0; }
.mu-btn--icon.mu-btn--sm { width: 36px; padding: 0; }
.mu-btn--icon.mu-btn--sm::after { inset: -4px; }

.mu-btn:disabled,
.mu-btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  filter: none;
  box-shadow: none;
}
.mu-btn--secondary:disabled:hover,
.mu-btn--secondary[aria-disabled="true"]:hover { border-color: var(--line-strong); background-color: transparent; }
.mu-btn--ghost:disabled:hover,
.mu-btn--ghost[aria-disabled="true"]:hover { background-color: transparent; color: var(--text-soft); }

@media (forced-colors: active) {
  .mu-btn { border: 1px solid ButtonText; }
}

/* ------------------------------------------------------------------- nav */

.mu-nav {
  box-sizing: border-box;
  container-type: inline-size;
  position: relative;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-sans);
}
.mu-nav__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  min-height: 68px;
  padding-block: 10px;
}
.mu-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
}
.mu-nav__brand:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.mu-nav__brand img { display: block; height: auto; flex: none; }
.mu-nav__logo { width: 200px; }
.mu-nav__name { display: block; font-size: 17px; line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.mu-nav__sub { display: block; margin-top: 3px; font-size: 11px; line-height: 1.2; font-weight: 500; letter-spacing: 0.01em; color: var(--text-soft); }
.mu-nav__links { display: flex; align-items: center; gap: 24px; }
.mu-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--text-soft);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 4px;
}
.mu-nav__link:hover { color: var(--text); }
.mu-nav__link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mu-nav__link.is-active,
.mu-nav__link[aria-current="page"] { color: var(--text); }
.mu-nav__link.is-active::after,
.mu-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: var(--mus-gradient);
}
.mu-nav__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }

@container (max-width: 1100px) {
  .mu-nav__optional { display: none; }
}
@container (max-width: 960px) {
  .mu-nav__inner { gap: 4px 16px; }
  .mu-nav__actions { order: 2; }
  .mu-nav__links {
    order: 3;
    flex: 1 0 100%;
    gap: 22px;
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline: -2px;
    padding-inline: 2px;
    border-top: 1px solid var(--line);
  }
  .mu-nav__links::-webkit-scrollbar { display: none; }
  .mu-nav__link.is-active::after,
  .mu-nav__link[aria-current="page"]::after { bottom: 4px; }
}
@container (max-width: 520px) {
  .mu-nav__logo { width: 160px; }
}

/* ------------------------------------------------------- console sidebar */

.mu-side {
  box-sizing: border-box;
  container-type: inline-size;
  flex: 1 1 240px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  padding: 20px 14px;
  background: var(--bg);
  border-right: 1px solid var(--line);
  font-family: var(--font-sans);
}
.mu-side__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 8px;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.mu-side__brand:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mu-side__brand img { display: block; height: auto; flex: none; }
.mu-side__name { display: block; font-size: 15px; line-height: 1.15; font-weight: 600; letter-spacing: -0.015em; }
.mu-side__sub {
  display: block; margin-top: 2px;
  font-family: var(--font-mono); font-size: 11px; line-height: 1.2;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint);
}
.mu-side__label {
  margin: 0 0 6px;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.mu-side__nav { display: grid; gap: 2px; }
.mu-side__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
}
.mu-side__item svg { width: 18px; height: 18px; flex: none; }
.mu-side__item:hover { background: var(--surface); color: var(--text); }
.mu-side__item:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.mu-side__item.is-active,
.mu-side__item[aria-current="page"] { background: var(--surface-2); color: var(--text); }
.mu-side__item.is-active svg,
.mu-side__item[aria-current="page"] svg { color: var(--accent); }
.mu-side__item.is-active::before,
.mu-side__item[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  bottom: 11px;
  width: 2px;
  border-radius: 2px;
  background: var(--mus-gradient);
}
.mu-side__count {
  margin-left: auto;
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--danger-soft);
  color: var(--danger);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
/* Follows the nav directly: the sidebar is not sticky, so a foot pinned to the bottom would sit off-screen on long pages. */
.mu-side__foot {
  margin-top: 8px;
  justify-items: start;
  display: grid;
  gap: 12px;
  padding: 16px 4px 0;
  border-top: 1px solid var(--line);
}
.mu-side__user { font-size: 13px; color: var(--text-soft); padding: 0 4px; overflow-wrap: anywhere; }

/* Stacked above the content (phone and narrow windows): a wrapping row. */
@container (min-width: 340px) {
  .mu-side__nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .mu-side__item.is-active::before,
  .mu-side__item[aria-current="page"]::before { left: 12px; right: 12px; top: auto; bottom: 0; width: auto; height: 2px; }
  .mu-side__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-top: 0; }
  .mu-side__foot .mu-btn--block { width: auto; }
}

/* ---------------------------------------------------------------- footer */

.mu-footer {
  box-sizing: border-box;
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 64px 0 32px;
  font-family: var(--font-sans);
  color: var(--text-soft);
}
.mu-footer__top { display: flex; flex-wrap: wrap; gap: 48px; }
.mu-footer__brand { flex: 1 1 280px; max-width: 440px; display: grid; gap: 16px; align-content: start; }
.mu-footer__brand img { display: block; height: auto; }
.mu-footer__blurb { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-soft); max-width: 40ch; }
.mu-footer__cols { flex: 2 1 460px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 32px; }
.mu-footer__col { display: grid; gap: 2px; align-content: start; }
.mu-footer__title {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.mu-footer__col a,
.mu-footer__col span {
  display: block;
  padding: 5px 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-soft);
  text-decoration: none;
}
.mu-footer__col a { border-radius: 4px; }
.mu-footer__col a:hover { color: var(--text); }
.mu-footer__col a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mu-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-faint);
}
.mu-footer__bottom p { margin: 0; }

/* ----------------------------------------------------------------- panel */

.mu-panel {
  box-sizing: border-box;
  position: relative;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.mu-panel--feature {
  border-color: var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised);
}
[data-theme="paper"] .mu-panel--feature { box-shadow: var(--shadow-paper); }
.mu-panel--feature::before {
  content: "";
  position: absolute;
  top: -1px;
  left: var(--radius-lg);
  right: var(--radius-lg);
  height: 1px;
  background: var(--mus-gradient);
  pointer-events: none;
}
.mu-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  min-height: 56px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}
.mu-panel__title { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.mu-panel__meta { font-size: 13px; color: var(--text-soft); }
.mu-panel__body { padding: 20px; }
.mu-panel__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-soft);
}

/* ---------------------------------------------------------------- signal */
/* The mark's four bars as a status meter. 54 x 35 units, like the mark:
   bars 7 wide, gaps 4, the fourth is the arrow (21 wide). */

.mu-signal {
  --_h: 16px;
  --_bar: calc(var(--_h) * 0.2);
  --_gap: calc(var(--_h) * 0.1143);
  display: inline-flex;
  align-items: flex-end;
  gap: var(--_gap);
  height: var(--_h);
  flex: none;
  vertical-align: -0.12em;
}
.mu-signal--sm { --_h: 14px; }
.mu-signal--lg { --_h: 20px; }
.mu-signal i {
  display: block;
  width: var(--_bar);
  border-radius: var(--radius-pill);
  background: var(--text-faint);
  font-style: normal;
}
.mu-signal i:nth-child(1) { height: 40%; }
.mu-signal i:nth-child(2) { height: 63%; }
.mu-signal i:nth-child(3) { height: 86%; }
/* The arrow bar: a 70% stem with the chevron cap reaching the top of the box. */
.mu-signal i:nth-child(4) {
  width: calc(var(--_bar) * 3);
  height: 100%;
  border-radius: 0;
  clip-path: polygon(39.71% 0, 60.29% 0, 98.24% 45.54%, 68.43% 54.49%, 66.67% 52.37%, 66.67% 100%, 33.33% 100%, 33.33% 52.37%, 31.57% 54.49%, 1.76% 45.54%);
}
/* Snap bars and gaps to whole pixels so the meter stays crisp at 14-20px. */
@supports (width: round(nearest, 3.2px, 1px)) {
  .mu-signal {
    --_bar: round(nearest, calc(var(--_h) * 0.2), 1px);
    --_gap: round(nearest, calc(var(--_h) * 0.1143), 1px);
  }
  .mu-signal i:nth-child(1) { height: round(nearest, calc(var(--_h) * 0.4), 1px); }
  .mu-signal i:nth-child(2) { height: round(nearest, calc(var(--_h) * 0.63), 1px); }
  .mu-signal i:nth-child(3) { height: round(nearest, calc(var(--_h) * 0.86), 1px); }
}
.mu-signal[data-state="live"] i { background: var(--text-soft); }
.mu-signal[data-state="live"] i:nth-child(4) { background: var(--ok); }
.mu-signal[data-state="build"] i { background: var(--warn); }
.mu-signal[data-state="build"] i:nth-child(4) { background: var(--line-strong); }
.mu-signal[data-state="paused"] i { background: var(--text-faint); }
.mu-signal[data-state="down"] i { background: var(--text-soft); }
.mu-signal[data-state="down"] i:nth-child(4) { background: var(--danger); }
@media (forced-colors: active) {
  .mu-signal i { background: CanvasText; }
  .mu-signal[data-state="build"] i:nth-child(4),
  .mu-signal[data-state="paused"] i { background: GrayText; }
}

/* Signal + word, the only way a signal appears. */
.mu-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--text-soft);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ pill */

.mu-pill {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px 0 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-soft);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
.mu-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.mu-pill[data-tone="ok"] { background: var(--ok-soft); color: var(--ok); box-shadow: none; }
.mu-pill[data-tone="warn"] { background: var(--warn-soft); color: var(--warn); box-shadow: none; }
.mu-pill[data-tone="danger"] { background: var(--danger-soft); color: var(--danger); box-shadow: none; }
.mu-pill[data-tone="info"] { background: var(--info-soft); color: var(--info); box-shadow: none; }
.mu-pill[data-tone="accent"] { color: var(--accent); }
.mu-pill[data-tone="neutral"] { color: var(--text-soft); }
@media (forced-colors: active) { .mu-pill { border: 1px solid CanvasText; } }

/* ------------------------------------------------------------------- tag */

.mu-tag {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.mu-tag svg { width: 12px; height: 12px; flex: none; }
.mu-tag[data-tone="warn"] { border-color: transparent; background: var(--warn-soft); color: var(--warn); }
.mu-tag[data-tone="ok"] { border-color: transparent; background: var(--ok-soft); color: var(--ok); }
.mu-tag[data-tone="danger"] { border-color: transparent; background: var(--danger-soft); color: var(--danger); }
.mu-tag[data-tone="info"] { border-color: transparent; background: var(--info-soft); color: var(--info); }
.mu-tag[data-tone="accent"] { color: var(--accent); }
/* Keeps the value's own case for machine values a developer reads or copies (key prefixes). */
.mu-tag--code { text-transform: none; letter-spacing: 0.01em; font-size: 12px; font-weight: 500; }

/* ------------------------------------------------------------------- kpi */

.mu-kpi {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 18px 20px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0;
}
.mu-kpi__label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.mu-kpi__value {
  margin: 4px 0 0;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mu-kpi__unit { margin-right: 6px; font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--text-soft); }
.mu-kpi__note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-soft); }
.mu-kpi[data-tone="ok"] .mu-kpi__value { color: var(--ok); }
.mu-kpi[data-tone="warn"] .mu-kpi__value { color: var(--warn); }
.mu-kpi[data-tone="danger"] .mu-kpi__value { color: var(--danger); }
.mu-kpi[data-tone="danger"] { border-color: var(--danger-soft); box-shadow: inset 0 2px 0 var(--danger); }
.mu-kpi[data-tone="warn"] { box-shadow: inset 0 2px 0 var(--warn); }

/* ----------------------------------------------------------------- table */

.mu-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: inherit; }
.mu-table-wrap:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.mu-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.mu-table caption { caption-side: top; text-align: left; padding: 0 16px 10px; font-size: 13px; color: var(--text-soft); }
.mu-table th {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: bottom;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}
.mu-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.mu-table tbody tr:last-child td { border-bottom: 0; }
.mu-table tbody tr:hover td { background: var(--surface-2); }
.mu-table .is-num,
.mu-table .mu-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mu-table .is-muted { color: var(--text-soft); }
.mu-table .mu-mono { font-family: var(--font-mono); font-size: 13px; white-space: nowrap; }
.mu-table a { color: var(--text); font-weight: 500; text-decoration: none; border-radius: 3px; }
.mu-table a:hover { color: var(--link); }
.mu-table a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mu-table--compact td { padding-block: 9px; }
/* Empty state: one full-width cell that says what will appear. */
.mu-table td.mu-table__empty { padding: 20px 16px; color: var(--text-soft); white-space: normal; }
.mu-table tbody tr:hover td.mu-table__empty { background: transparent; }

/* ----------------------------------------------------------------- field */

.mu-field { display: grid; gap: 8px; align-content: start; min-width: 0; font-family: var(--font-sans); }
/* A fieldset of .mu-choice options: no browser frame, the legend reads as the label. */
fieldset.mu-field { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
/* Floating the legend makes it an ordinary grid item, so the 8px field gap applies. */
fieldset.mu-field > legend { float: left; width: 100%; margin: 0; padding: 0; }
.mu-field > label,
.mu-field__label { font-size: 14px; line-height: 1.4; font-weight: 500; color: var(--text); }
.mu-field__opt { font-weight: 400; color: var(--text-faint); }
.mu-field input:not([type="checkbox"]):not([type="radio"]),
.mu-field select,
.mu-field textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background-color: var(--bg);
  box-shadow: inset 0 -1px 0 var(--text-faint);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.mu-field textarea { min-height: 104px; padding: 11px 14px; line-height: 1.5; resize: vertical; }
.mu-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-soft) 50%),
    linear-gradient(135deg, var(--text-soft) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.mu-field input::placeholder,
.mu-field textarea::placeholder { color: var(--text-faint); opacity: 1; }
.mu-field input:not([type="checkbox"]):not([type="radio"]):hover,
.mu-field select:hover,
.mu-field textarea:hover { border-color: var(--text-faint); }
.mu-field input:not([type="checkbox"]):not([type="radio"]):focus,
.mu-field select:focus,
.mu-field textarea:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--accent);
  box-shadow: none;
}
.mu-field [aria-invalid="true"] { border-color: var(--danger) !important; box-shadow: inset 0 -1px 0 var(--danger) !important; }
.mu-field input:disabled,
.mu-field select:disabled,
.mu-field textarea:disabled { opacity: 0.55; cursor: not-allowed; background-color: var(--surface-2); }
.mu-field input[readonly] { background-color: var(--surface-2); box-shadow: none; }
.mu-field input[type="checkbox"],
.mu-field input[type="radio"] { width: 18px; height: 18px; margin: 0; accent-color: var(--accent-fill); flex: none; }
.mu-field__hint { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-soft); }
.mu-field__error { margin: 0; display: flex; align-items: flex-start; gap: 6px; font-size: 13px; line-height: 1.5; font-weight: 500; color: var(--danger); }
.mu-field__error svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }

/* A selectable option card: radio or checkbox inside a label. No default selection for decisions. */
.mu-choice {
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.4;
  cursor: pointer;
}
.mu-choice input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent-fill); flex: none; }
.mu-choice:hover { border-color: var(--text-faint); }
.mu-choice:has(input:checked) { border-color: var(--accent); background: var(--surface-2); }
.mu-choice:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.mu-choice small { display: block; margin-top: 2px; font-size: 13px; color: var(--text-soft); }

/* ------------------------------------------------------------------ code */

.mu-code {
  box-sizing: border-box;
  display: block;
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  background: var(--mus-ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--mus-mist);
  color-scheme: dark;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  font-variant-numeric: tabular-nums;
  white-space: pre;
  tab-size: 2;
}
.mu-code:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mu-code code { font: inherit; color: inherit; background: none; padding: 0; }
.mu-code .k { color: var(--mus-violet); }
.mu-code .s { color: var(--mus-cyan-soft); }
.mu-code .c { color: var(--mus-slate); font-style: normal; }
.mu-code .n { color: var(--mus-dev); }
.mu-code .f { color: var(--mus-mist); font-weight: 600; }

/* ---------------------------------------------------------------- ledger */
/* Proof over promise: machine lines, time · ref · amount · method · state. */

.mu-ledger {
  box-sizing: border-box;
  container-type: inline-size;
  position: relative;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}
.mu-ledger__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.mu-ledger__live { position: relative; display: inline-flex; align-items: center; padding-left: 18px; color: var(--text); }
.mu-ledger__live::before,
.mu-ledger__live::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--ok);
}
.mu-ledger__live::after { background: transparent; border: 1px solid var(--ok); animation: mu-ping 2.4s cubic-bezier(0, 0, 0.2, 1) infinite; }
.mu-ledger__meta { color: var(--text-faint); letter-spacing: 0.08em; }
.mu-ledger__rows { margin: 0; padding: 0; list-style: none; }
.mu-ledger__row,
.mu-ledger__cols {
  position: relative;
  display: grid;
  grid-template-columns: 8ch minmax(13ch, 1fr) 12ch minmax(10ch, 14ch) minmax(11ch, auto);
  grid-template-areas: "time ref amount method state";
  align-items: center;
  gap: 4px 24px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.mu-ledger__rows > :last-child { border-bottom: 0; }
.mu-ledger__cols {
  padding-block: 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.mu-ledger__time { grid-area: time; color: var(--text-faint); white-space: nowrap; }
.mu-ledger__ref { grid-area: ref; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mu-ledger__amount { grid-area: amount; color: var(--text); text-align: right; white-space: nowrap; }
.mu-ledger__method { grid-area: method; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mu-ledger__state { grid-area: state; justify-self: end; }
.mu-ledger__row.is-new { background: var(--surface-2); }
.mu-ledger__row.is-new::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: var(--mus-gradient);
}
.mu-ledger__foot { margin: 0; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-faint); }

@container (max-width: 560px) {
  .mu-ledger__cols { display: none; }
  .mu-ledger__row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "ref ref amount"
      "time method state";
    gap: 4px 12px;
  }
}

@keyframes mu-ping {
  0% { transform: scale(1); opacity: 0.8; }
  80%, 100% { transform: scale(2.6); opacity: 0; }
}

/* --------------------------------------------------------------- endorse */
/* Product name in its own identity; Millennial Ultra signs underneath, smaller, one line. */

.mu-endorse { display: inline-grid; gap: 8px; justify-items: start; font-family: var(--font-sans); }
.mu-endorse__product { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mu-endorse__swatch {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: var(--radius-sm);
  background: var(--mu-product, var(--accent-fill));
  box-shadow: inset 0 0 0 1px var(--line-strong);
  /* Initials: white by default; set --mu-product-on: var(--mus-ink) where white reads under 4.5:1
     on the accent (Deliver Now #F0561D 3.5:1, ZimLayby #0F8B5C 4.3:1). */
  color: var(--mu-product-on, var(--on-accent));
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.mu-endorse__name { font-size: 18px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; color: var(--mu-product-text, var(--text)); }
.mu-endorse__line { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 1.3; color: var(--text-soft); white-space: nowrap; }
.mu-endorse__line img { display: block; height: 16px; width: auto; flex: none; }
/* Larger lockup for checkout headers and product heroes. */
.mu-endorse--lg { gap: 10px; }
.mu-endorse--lg .mu-endorse__product { gap: 12px; }
.mu-endorse--lg .mu-endorse__swatch { width: 40px; height: 40px; border-radius: 10px; font-size: 15px; }
.mu-endorse--lg .mu-endorse__name { font-size: 24px; line-height: 1.15; letter-spacing: -0.025em; }
.mu-endorse--lg .mu-endorse__line { font-size: 13px; }

/* --------------------------------------------------------------- callout */

.mu-callout {
  box-sizing: border-box;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
}
.mu-callout svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.mu-callout[data-tone="ok"] { background: var(--ok-soft); border-color: transparent; }
.mu-callout[data-tone="ok"] svg { color: var(--ok); }
.mu-callout[data-tone="warn"] { background: var(--warn-soft); border-color: transparent; }
.mu-callout[data-tone="warn"] svg { color: var(--warn); }
.mu-callout[data-tone="danger"] { background: var(--danger-soft); border-color: transparent; }
.mu-callout[data-tone="danger"] svg { color: var(--danger); }
.mu-callout[data-tone="info"] { background: var(--info-soft); border-color: transparent; }
.mu-callout[data-tone="info"] svg { color: var(--info); }

/* ---------------------------------------------------------------- motion */
/* Transitions run only while an element is hovered or pressed, so nothing animates
   from browser defaults when the stylesheet arrives late (canvas thumbnails, slow loads). */
.mu-btn:hover, .mu-btn:active, .mu-link:hover, .mu-arrow-link:hover, .mu-nav__link:hover,
.mu-side__item:hover, .mu-footer__col a:hover, .mu-table tbody tr:hover td, .mu-choice:hover,
.mu-field input:hover, .mu-field select:hover, .mu-field textarea:hover {
  transition:
    color 0.15s ease,
    background-color 0.15s ease,
    border-color 0.15s ease,
    filter 0.15s ease,
    gap 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}


@media (prefers-reduced-motion: reduce) {
  .mu-btn:hover, .mu-btn:active, .mu-link:hover, .mu-arrow-link:hover, .mu-nav__link:hover,
  .mu-side__item:hover, .mu-footer__col a:hover, .mu-table tbody tr:hover td, .mu-choice:hover,
  .mu-field input:hover, .mu-field select:hover, .mu-field textarea:hover { transition: none; }
  .mu-btn:hover, .mu-btn:active,
  .mu-btn--primary:hover, .mu-btn--secondary:hover { transform: none; }
  .mu-arrow-link:hover { gap: 6px; }
  .mu-ledger__live::after { animation: none; opacity: 0; }
}
