/* The Admin page on Munu Mise, Administration surface: the station page's tokens and components, dense tier and
   operator radii, mostly grey; the navy for the primary action and the chosen view only. Dark follows the computer. */

:root {
  --primary-50: #f0fbff;
  --primary-100: #d6f3ff;
  --primary-300: #8bcdf8;
  --primary-400: #5da7eb;
  --primary-500: #4083db;
  --primary-600: #2865c3;
  --primary-700: #1c4da4;
  --primary-950: #000743;

  --neutral-50: #f9fbff;
  --neutral-100: #eceff6;
  --neutral-200: #d9dae2;
  --neutral-300: #babdc7;
  --neutral-400: #8e90a2;
  --neutral-500: #6b6e7d;
  --neutral-600: #53546f;
  --neutral-700: #474a5e;
  --neutral-800: #393e4b;
  --neutral-900: #1c1e2b;
  --neutral-950: #0d101a;

  --error-50: #ffedec;
  --error-200: #ffbaba;
  --error-300: #ff8d8f;
  --error-600: #cf2141;
  --error-700: #ae1129;
  --success-50: #e4f7ec;
  --success-200: #a3e6bc;
  --success-300: #6ed091;
  --success-700: #008447;
  --success-800: #006d3e;
  --warning-50: #faf5e3;
  --warning-200: #f5dc98;
  --warning-400: #f6c34a;
  --warning-700: #b96912;
  --warning-800: #925019;

  --background: var(--neutral-50);
  --card: #ffffff;
  --popover: #ffffff;
  --popover-border: var(--neutral-200);
  --raised: var(--neutral-100);
  --on-track: #ffffff;
  --foreground: var(--neutral-950);
  --muted-foreground: var(--neutral-500);
  --muted-on-tint: var(--neutral-600);
  --label: var(--neutral-600);
  --border: var(--neutral-200);
  --input: var(--neutral-200);
  --border-strong: var(--neutral-300);
  --title: var(--primary-950);
  --primary: var(--primary-950);
  --primary-foreground: var(--neutral-50);
  --primary-hover: #002875;
  --ring: #002875;
  --link: var(--primary-700);
  --destructive: var(--error-600);

  --error-bg: var(--error-50);
  --error-border: var(--error-200);
  --error-text: var(--error-700);
  --success-bg: var(--success-50);
  --success-border: var(--success-200);
  --success-text: var(--success-800);
  --success-icon: var(--success-700);
  --warning-bg: var(--warning-50);
  --warning-border: var(--warning-200);
  --warning-text: var(--warning-800);
  --warning-icon: var(--warning-700);
  --info-bg: var(--neutral-100);
  --info-border: var(--neutral-200);
  --info-text: var(--primary-700);
  --info-icon: var(--primary-600);
  --neutral-bg: var(--neutral-100);
  --neutral-border: var(--neutral-200);
  --neutral-text: var(--neutral-600);
  --code-bg: var(--neutral-100);

  --chart-accent: var(--primary-700);
  --chart-context: var(--neutral-400);
  --chart-grid: var(--neutral-100);
  --chart-1: var(--primary-700);
  --chart-2: #c65d26;
  --chart-3: #14938d;
  --chart-4: #734dbe;

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --text-h1: 1.5rem;
  --text-h2: 1.25rem;
  --text-body: 1rem;
  --text-small: 0.875rem;
  --text-caption: 0.75rem;

  --s-2xs: 4px;
  --s-xs: 8px;
  --s-sm: 12px;
  --s-md: 16px;
  --s-lg: 20px;
  --s-xl: 24px;
  --s-2xl: 32px;
  --s-3xl: 48px;

  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;

  --shadow-raised: 0 1px 2px rgb(13 16 26 / 0.06), 0 1px 3px rgb(13 16 26 / 0.10);
  --shadow-floating: 0 2px 4px rgb(13 16 26 / 0.05), 0 6px 16px rgb(13 16 26 / 0.10);
  --shadow-modal: 0 2px 4px rgb(13 16 26 / 0.03), 0 24px 64px rgb(13 16 26 / 0.20);
  --scrim: rgb(13 16 26 / 0.4);

  --control-h: 36px;
  --row-h: 40px;
  --header-h: 36px;
  --cell-px: 12px;
  --hit: 36px;

  --ease-snappy: cubic-bezier(1, 0, 0, 1);
  --fast: 120ms;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --background: var(--neutral-950);
    --card: var(--neutral-900);
    --popover: var(--neutral-800);
    --popover-border: var(--neutral-700);
    --raised: var(--neutral-800);
    --on-track: var(--neutral-700);
    --foreground: var(--neutral-50);
    --muted-foreground: var(--neutral-300);
    --muted-on-tint: var(--neutral-300);
    --label: var(--neutral-300);
    --border: var(--neutral-800);
    --input: var(--neutral-800);
    --border-strong: var(--neutral-700);
    --title: var(--primary-100);
    --primary: var(--neutral-50);
    --primary-foreground: var(--primary-950);
    --primary-hover: var(--neutral-50);
    --ring: var(--neutral-50);
    --link: var(--primary-300);

    --error-bg: var(--neutral-800);
    --error-border: var(--error-600);
    --error-text: var(--error-300);
    --success-bg: var(--neutral-800);
    --success-border: var(--success-700);
    --success-text: var(--success-300);
    --success-icon: var(--success-300);
    --warning-bg: var(--neutral-800);
    --warning-border: var(--warning-700);
    --warning-text: var(--warning-400);
    --warning-icon: var(--warning-400);
    --info-bg: var(--neutral-800);
    --info-border: var(--neutral-700);
    --info-text: var(--primary-300);
    --info-icon: var(--primary-300);
    --neutral-bg: var(--neutral-800);
    --neutral-border: var(--neutral-700);
    --neutral-text: var(--neutral-300);
    --code-bg: var(--neutral-800);

    --chart-accent: var(--primary-400);
    --chart-context: var(--neutral-500);
    --chart-grid: var(--neutral-800);
    --chart-1: var(--primary-500);
    --chart-2: #cd632d;
    --chart-3: #009583;
    --chart-4: #9351bd;

    --shadow-raised: 0 1px 2px rgb(0 0 0 / 0.12), 0 1px 3px rgb(0 0 0 / 0.20);
    --shadow-floating: 0 2px 4px rgb(0 0 0 / 0.10), 0 6px 16px rgb(0 0 0 / 0.20);
    --shadow-modal: 0 2px 4px rgb(0 0 0 / 0.06), 0 24px 64px rgb(0 0 0 / 0.40);
    --scrim: rgb(0 0 0 / 0.6);
  }
}

/* Touch: the default tier, from a phone's width down */
@media (max-width: 639px) {
  :root {
    --control-h: 48px;
    --row-h: 48px;
    --header-h: 40px;
    --cell-px: 16px;
    --hit: 48px;
  }
}

/* ---- base ---- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 500;
  font-size: var(--text-small);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; }
h1 { font-size: var(--text-h1); line-height: 1.05; font-weight: 700; color: var(--title); }
h2 { font-size: var(--text-h2); line-height: 1.1; font-weight: 700; color: var(--title); }
h3, .h3 { font-size: var(--text-body); line-height: 1.2; font-weight: 600; color: var(--foreground); }
h4 { font-size: var(--text-small); line-height: 1.3; font-weight: 600; color: var(--label); }
p { margin: 0; }
code { font-family: var(--mono); font-size: var(--text-small); letter-spacing: 0; background: var(--code-bg); padding: 2px var(--s-2xs); border-radius: var(--r-sm); }
.mono { font-family: var(--mono); letter-spacing: 0; }

:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
[tabindex='-1']:focus { outline: none; }

.caption { display: block; font-size: var(--text-caption); line-height: 1.3; color: var(--muted-foreground); }
p.caption { max-width: 75ch; }
.text-muted { color: var(--muted-foreground); }
.text-warning { color: var(--warning-text); }
.empty { color: var(--label); line-height: 1.5; max-width: 70ch; }
.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;
}
.icon { width: 16px; height: 16px; flex: none; fill: currentColor; }

/* ---- page ---- */
.page { max-width: 1440px; margin: 0 auto; padding: var(--s-3xl) var(--s-2xl); }
.page-header { display: grid; gap: var(--s-2xs); margin-bottom: var(--s-xl); }
.app { display: grid; gap: var(--s-xl); min-width: 0; }
.panel { display: grid; gap: var(--s-xl); min-width: 0; }
.section { display: grid; gap: var(--s-sm); min-width: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-md); flex-wrap: wrap; }
.title-row { display: flex; align-items: center; gap: var(--s-sm); flex-wrap: wrap; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-md); flex-wrap: wrap; }
.toolbar-end { display: flex; align-items: center; gap: var(--s-xs); flex-wrap: wrap; }
.usage-body { display: grid; gap: var(--s-xl); min-width: 0; }
@media (max-width: 639px) {
  .page { padding: var(--s-xl) var(--s-md) var(--s-2xl); }
}

/* ---- navigation tabs: Stations and Usage ---- */
.nav-tabs { display: flex; gap: var(--s-2xs); flex-wrap: wrap; }
.nav-tab {
  display: inline-flex; align-items: center; gap: var(--s-xs);
  height: var(--control-h); padding: 0 var(--s-sm);
  border: 0; border-radius: var(--r-md); background: transparent;
  font: inherit; font-weight: 500; color: var(--muted-foreground); cursor: pointer;
  transition: background-color var(--fast) var(--ease-snappy);
}
.nav-tab[aria-selected='true'] { background: var(--primary); color: var(--primary-foreground); }
@media (hover: hover) {
  .nav-tab:not([aria-selected='true']):hover { background: var(--raised); color: var(--foreground); }
}

/* ---- inline tabs: Chart and Table ---- */
.tabs-small { display: inline-flex; padding: 2px; border-radius: var(--r-md); background: var(--raised); }
.tab {
  height: calc(var(--control-h) - 8px); padding: 0 var(--s-sm);
  border: 0; border-radius: var(--r-sm); background: transparent;
  font: inherit; font-size: var(--text-small); color: var(--muted-on-tint); cursor: pointer;
}
.tab[aria-selected='true'] { background: var(--on-track); color: var(--foreground); font-weight: 600; box-shadow: var(--shadow-raised); }
@media (hover: hover) {
  .tab:not([aria-selected='true']):hover { color: var(--foreground); }
}

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2xs);
  height: var(--control-h); padding: 0 var(--s-sm);
  border-radius: var(--r-md); border: 1px solid transparent;
  font: inherit; font-weight: 500; font-size: var(--text-small);
  cursor: pointer; white-space: nowrap;
  transition: background-color var(--fast) var(--ease-snappy), border-color var(--fast) var(--ease-snappy);
}
.btn[aria-busy='true'] { cursor: progress; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--card); color: var(--foreground); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--raised); }
.btn[aria-disabled='true'] { opacity: 0.5; cursor: not-allowed; }
.btn-secondary[aria-disabled='true']:hover { background: var(--card); }
.btn-small { height: calc(var(--control-h) - 8px); padding: 0 var(--s-xs); font-size: var(--text-caption); }
.link-button {
  display: inline-flex; align-items: center; min-height: 24px; padding: 0; border: 0; background: none;
  font: inherit; font-weight: 600; color: var(--link); cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
}
.spinner {
  flex: none; width: 16px; height: 16px; border-radius: 50%; display: inline-block;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 800ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; border-right-color: currentColor; opacity: 0.6; }
  * { transition: none !important; }
}
.action-bar { display: flex; flex-wrap: wrap; gap: var(--s-xs) var(--s-xl); }
.action-group { display: flex; flex-wrap: wrap; gap: var(--s-xs); }
.row-actions { display: flex; gap: var(--s-xs); justify-content: flex-end; }

/* ---- badges and notices ---- */
.badge {
  display: inline-flex; align-items: center; gap: var(--s-2xs);
  height: 24px; padding: 0 var(--s-xs);
  border-radius: var(--r-sm); border: 1px solid var(--neutral-border);
  font-size: var(--text-caption); font-weight: 500; white-space: nowrap;
  background: var(--neutral-bg); color: var(--neutral-text);
}
.badge-success { background: var(--success-bg); border-color: var(--success-border); color: var(--success-text); }
.badge-success .icon { color: var(--success-icon); }
.badge-warning { background: var(--warning-bg); border-color: var(--warning-border); color: var(--warning-text); }
.badge-warning .icon { color: var(--warning-icon); }
.badge-error { background: var(--error-bg); border-color: var(--error-border); color: var(--error-text); }
.badge-info { background: var(--info-bg); border-color: var(--info-border); color: var(--info-text); }
.badge-info .icon { color: var(--info-icon); }

.notice {
  display: flex; gap: var(--s-xs); align-items: flex-start;
  padding: var(--s-sm); border-radius: var(--r-md); border: 1px solid var(--neutral-border);
  background: var(--neutral-bg); color: var(--neutral-text);
}
.notice-icon { width: 16px; height: 16px; flex: none; margin-top: 2px; fill: currentColor; }
.notice-body { line-height: 1.5; max-width: 70ch; }
.notice-actions { margin-top: var(--s-xs); }
.notice-info { background: var(--info-bg); border-color: var(--info-border); color: var(--info-text); }
.notice-success { background: var(--success-bg); border-color: var(--success-border); color: var(--success-text); }
.notice-success .notice-icon { color: var(--success-icon); }
.notice-warning { background: var(--warning-bg); border-color: var(--warning-border); color: var(--warning-text); }
.notice-warning .notice-icon { color: var(--warning-icon); }
.notice-error { background: var(--error-bg); border-color: var(--error-border); color: var(--error-text); }

/* ---- facts ---- */
.relay, .station, .chart-card, .tile {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); min-width: 0;
}
.relay { display: grid; gap: var(--s-sm); padding: var(--s-md); }
.facts { display: flex; flex-wrap: wrap; gap: var(--s-sm) var(--s-2xl); margin: 0; }
.fact { display: grid; gap: var(--s-2xs); align-content: start; }
.fact dt { font-size: var(--text-caption); color: var(--muted-foreground); }
.fact dd { margin: 0; min-height: 24px; display: flex; align-items: center; }
.facts-stacked { display: grid; gap: var(--s-xs); }
.facts-stacked .fact { grid-template-columns: 7rem minmax(0, 1fr); gap: var(--s-sm); align-items: baseline; }
.facts-stacked .fact dt { font-size: var(--text-small); color: var(--label); }
.facts-stacked .fact dd { min-height: 0; overflow-wrap: anywhere; }

/* ---- a station, opened ---- */
.station { display: grid; gap: var(--s-md); padding: var(--s-xl); }
.station > .section { margin-top: var(--s-md); }
@media (max-width: 639px) {
  .station { padding: var(--s-md); }
}
.sign-ins { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--s-xs); }
.sign-ins li {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-xs);
  padding: var(--s-xs) var(--s-sm); border: 1px solid var(--border); border-radius: var(--r-md);
}
.command { display: inline-flex; align-items: center; gap: var(--s-xs); flex-wrap: wrap; }
.command code { white-space: nowrap; }
.access-message { display: grid; gap: var(--s-xs); justify-items: start; }
.list-command { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-xs); }
.list-command .caption { display: inline; }
.points summary { cursor: pointer; color: var(--link); padding: var(--s-2xs) 0; }
.points .table-scroll { margin-top: var(--s-xs); max-height: 480px; overflow-y: auto; }

/* ---- tables (Mise table anatomy) ---- */
.table-scroll { position: relative; overflow-x: auto; max-width: 100%; }
.table {
  border-collapse: separate; border-spacing: 0; width: 100%;
  background: var(--card); border: 1px solid var(--border-strong); border-radius: var(--r-lg);
}
.table thead th {
  height: var(--header-h); padding: 0 var(--cell-px); text-align: left;
  font-size: var(--text-caption); font-weight: 500; color: var(--muted-foreground);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table tbody th, .table td {
  height: var(--row-h); padding: var(--s-xs) var(--cell-px); text-align: left;
  border-bottom: 1px solid var(--border); vertical-align: middle;
}
.table tbody th { font-size: var(--text-small); font-weight: 600; color: var(--foreground); white-space: nowrap; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table > thead > tr:first-child > :first-child { border-top-left-radius: calc(var(--r-lg) - 1px); }
.table > thead > tr:first-child > :last-child { border-top-right-radius: calc(var(--r-lg) - 1px); }
.table > tbody:last-child > tr:last-child > :first-child { border-bottom-left-radius: calc(var(--r-lg) - 1px); }
.table > tbody:last-child > tr:last-child > :last-child { border-bottom-right-radius: calc(var(--r-lg) - 1px); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .nowrap { white-space: nowrap; }
.table td.mono { white-space: nowrap; }
.table-scroll .table tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--card); }
.fleet tr.row-open > * { background: var(--raised); }
.fleet tr.row-open > :first-child { background: var(--raised); }
@media (max-width: 639px) {
  .table-scroll > .table { min-width: 640px; }
}
.cell-strong { font-weight: 600; }
.cell-stack { display: grid; gap: var(--s-2xs); justify-items: start; }
.cell-health { display: inline-flex; align-items: center; gap: var(--s-xs); white-space: nowrap; }
.cell-actions { text-align: right; white-space: nowrap; width: 1%; }
.cell-bar { width: 136px; }
.sort {
  display: inline-flex; align-items: center; gap: var(--s-2xs); height: var(--header-h); padding: 0; border: 0; background: none;
  font: inherit; color: inherit; cursor: pointer;
}
.table thead th.num .sort { width: 100%; justify-content: flex-end; }
.sort-icon { width: 12px; height: 12px; color: var(--muted-foreground); }
.sort-on { color: var(--foreground); }
.features-body { display: grid; gap: var(--s-xs); }
.empty-block { display: grid; gap: var(--s-xs); justify-items: start; padding: var(--s-md) 0; }

/* ---- fields ---- */
.filters { display: flex; flex-wrap: wrap; gap: var(--s-xs); align-items: center; }
.search { position: relative; display: inline-flex; }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted-foreground); pointer-events: none; }
.search .input { padding-left: 32px; width: min(16rem, 100%); }
.input {
  height: var(--control-h); padding: 0 var(--s-sm);
  border: 1px solid var(--input); border-radius: var(--r-md);
  background: var(--card); color: var(--foreground); font: inherit; font-size: var(--text-small);
}
.input::placeholder { color: var(--muted-foreground); }
.input[aria-invalid='true'] { border-color: var(--destructive); }
.input-full { width: 100%; }
.field { display: grid; gap: var(--s-2xs); }
.field > label { font-size: var(--text-small); color: var(--label); }
.field-error { color: var(--error-text); font-size: var(--text-caption); line-height: 1.5; }
.choice { display: flex; align-items: flex-start; gap: var(--s-xs); min-height: var(--hit); cursor: pointer; }
.choice input { margin: 2px 0 0; width: 16px; height: 16px; accent-color: var(--primary); }
.choice > span { display: grid; gap: var(--s-2xs); }

/* ---- the dialog ---- */
.modal {
  width: min(460px, calc(100% - 2 * var(--s-md))); padding: 0; border: 0; border-radius: var(--r-lg);
  background: var(--popover); color: var(--foreground); box-shadow: var(--shadow-modal);
}
.modal::backdrop { background: var(--scrim); }
.modal-head { padding: var(--s-xl) var(--s-xl) 0; }
.modal-body { padding: var(--s-md) var(--s-xl) 0; line-height: 1.5; display: grid; gap: var(--s-md); }
.modal-foot { display: flex; justify-content: flex-end; gap: var(--s-xs); flex-wrap: wrap; padding: var(--s-xl); }

/* ---- stat tiles ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--s-md); }
.tile { display: grid; gap: var(--s-2xs); align-content: start; padding: var(--s-md); }
.tile-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-xs); min-height: 24px; }
.tile-label { color: var(--label); }
.tile-value { font-size: var(--text-h1); line-height: 1.15; font-weight: 700; color: var(--foreground); font-variant-numeric: tabular-nums; }
.tile-badge { margin: var(--s-2xs) 0; }

/* ---- charts ---- */
.chart-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: var(--s-md); }
.chart-card { display: grid; gap: var(--s-sm); padding: var(--s-md); align-content: start; }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-sm); flex-wrap: wrap; }
.chart-head h4 { color: var(--foreground); }
.chart-body { min-width: 0; }
.chart { width: 100%; min-width: 0; overflow: hidden; border-radius: var(--r-md); }
.chart:focus-visible { outline-offset: 0; }
.chart-svg { display: block; overflow: visible; font-family: var(--font); }
.chart-svg .grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart-svg .axis { stroke: var(--border-strong); stroke-width: 1; }
.chart-svg .tick { fill: var(--muted-foreground); font-size: 11px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.chart-svg .tick-warning { fill: var(--warning-text); }
.chart-svg .warning-line { stroke: var(--warning-icon); stroke-width: 1; stroke-dasharray: 4 4; }
.chart-svg .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-svg .line.line-accent { stroke: var(--chart-accent); }
.chart-svg .line.line-context { stroke: var(--chart-context); }
.chart-svg circle.line-accent { fill: var(--chart-accent); }
.chart-svg circle.line-context { fill: var(--chart-context); }
.chart-svg .last-point, .chart-svg .marker-dot { stroke: var(--card); stroke-width: 2; }
.chart-svg .end-label { fill: var(--label); font-size: 12px; letter-spacing: 0; }
.chart-svg .marker-line { stroke: var(--border-strong); stroke-width: 1; }
.chart-marker, .tip { pointer-events: none; }
.chart-hits rect { fill: transparent; }
.tip-box { fill: var(--popover); stroke: var(--popover-border); }
.tip-text { fill: var(--foreground); font-size: 12px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.tip-head { font-weight: 600; }
.fill-1 { fill: var(--chart-1); }
.fill-2 { fill: var(--chart-2); }
.fill-3 { fill: var(--chart-3); }
.fill-4 { fill: var(--chart-4); }
.fill-5, .fill-context { fill: var(--chart-context); }
.fill-accent { fill: var(--chart-accent); }
.legend {
  list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2xs) var(--s-md);
  font-size: var(--text-caption); color: var(--label);
}
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.swatch { flex: none; }
.share-bar { display: block; width: 120px; height: 8px; }
.share-track { fill: var(--raised); }
.share-fill { fill: var(--chart-accent); }

/* ---- skeletons, static ---- */
.skeleton { display: grid; gap: var(--s-xs); }
.skeleton .tiles { margin-bottom: var(--s-md); }
.skeleton-line { height: var(--row-h); background: var(--raised); border-radius: var(--r-md); }
.skeleton-block { height: 120px; background: var(--raised); border-radius: var(--r-lg); margin-bottom: var(--s-md); }
.skeleton-tile { height: 104px; background: var(--raised); border-radius: var(--r-lg); }
.skeleton-chart { height: 260px; background: var(--raised); border-radius: var(--r-lg); margin-bottom: var(--s-md); }

/* ---- the harness version ---- */
.captions { display: grid; gap: var(--s-2xs); }
.changes { display: grid; gap: var(--s-2xs); }
.changes ul { margin: 0; padding-left: var(--s-xl); display: grid; gap: var(--s-2xs); line-height: 1.4; overflow-wrap: anywhere; }
.changes a { color: var(--link, var(--foreground)); text-decoration: underline; text-underline-offset: 2px; }
