/* Lumo dashboard: the sidebar view. media/ui.css carries the design (shadcn/ui's tokens and
   .ui-* components on VS Code's theme); this file only lays the dashboard out with them.
   Neutral surfaces, one accent (the hero's colour, --hero) used sparingly: the primary button,
   focus rings, progress fills and the current account's check. Spacing runs on 4/8/12/16. */

:root {
  --hero-2: var(--hero);
  --gutter: 12px;
  /* The hero's colour as text or an icon on the page's background: as is on dark themes,
     deepened on light ones so a gold check still reads on white. */
  --hero-text: var(--hero);
  /* The hero's colour for healthy bars and live dots; neutral when the hero is warm, red through
     gold, so it never reads as amber or red (set from JS). */
  --hero-safe: var(--hero);
  /* Tailwind's amber: a limit getting close (60%+). */
  --amber: #f59e0b;
}
body.vscode-light {
  --hero-text: color-mix(in srgb, var(--hero) 62%, #000);
  --amber: #d97706;
}
body.vscode-high-contrast,
body.vscode-high-contrast-light {
  --hero-text: var(--foreground);
}

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

html {
  /* VS Code paints the scrollbar track in the editor colour, over the page's right edge. */
  scrollbar-color: var(--vscode-scrollbarSlider-background, rgba(121, 121, 121, 0.4)) transparent;
}
html,
body {
  min-height: 100%;
}
body {
  margin: 0;
  padding: 0;
  background: var(--background);
  color: var(--foreground);
}
:where(.ui) p,
:where(.ui) h1,
:where(.ui) h2,
:where(.ui) h3 {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}
:where(.ui) button {
  font-family: var(--font-sans);
  color: inherit;
}
:where(.ui) img {
  max-width: none;
  max-height: none;
  user-select: none;
}
.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;
}
.spin {
  animation: lumo-spin 0.9s linear infinite;
}
@keyframes lumo-spin {
  to {
    transform: rotate(360deg);
  }
}

.lumo {
  container: lumo / inline-size;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto;
  padding: 10px var(--gutter) 24px;
}
.panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

/* ---------------------------------------------------------------- header: the team switcher */

.hd {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hd-wrap {
  position: relative;
}
.switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% + 12px);
  margin: 0 -6px;
  padding: 6px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--foreground);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s;
}
.switcher:hover,
.switcher[aria-expanded='true'] {
  background: var(--accent);
}
.switcher-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 1px;
  line-height: 1.25;
}
.switcher-title {
  font-size: 13px;
  font-weight: 600;
}
.switcher-sub {
  font-size: 12px;
  color: var(--muted-foreground);
}
.switcher-chev {
  color: var(--muted-foreground);
}
.hd-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 24px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  color: var(--muted-foreground);
}
.status-dot {
  margin: 0 4px 0 4px;
  color: var(--success);
}
.status .ui-icon {
  margin: 0 1px;
}
.status.is-busy {
  color: var(--foreground);
}
.status.is-busy .ui-icon {
  color: var(--muted-foreground);
}
.hd-refresh.ui-btn--icon {
  width: 24px;
  height: 24px;
  margin-right: -4px;
  color: var(--muted-foreground);
}
.hd-refresh:hover {
  color: var(--foreground);
}

/* --- avatars: the host's square pictures (a photo, or a monogram on the account's colour),
   centred. Rounded-md everywhere; rounded-lg for the header's. */
.ui-avatar .av-img {
  object-fit: cover;
  object-position: center;
}
.ui-avatar.av-hd {
  border-radius: var(--radius);
}
.av-initials,
.av-live {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}
.ui-avatar--sm .av-initials {
  font-size: 10px;
}
.ui-avatar.av-live {
  font-size: 15px;
  transition: background-color 0.15s;
}

/* --- the dropdown */
.menu {
  position: absolute;
  top: calc(100% + 4px);
  left: -6px;
  right: -6px;
  z-index: 30;
  padding: 4px;
  max-height: min(72vh, 520px);
  overflow-y: auto;
  animation: lumo-pop 0.12s ease-out;
}
@keyframes lumo-pop {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
}
.menu-label {
  padding: 6px 8px 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
}
.menu .menu-item {
  gap: 8px;
  padding: 6px 8px;
  border-radius: calc(var(--radius) - 3px);
  font-size: 13px;
  line-height: 1.25;
}
.menu .ui-row[aria-current='true'] {
  background: transparent;
}
.menu .ui-row--interactive:hover,
.menu .ui-row--interactive:focus-visible {
  background: var(--accent);
}
.menu .menu-item:focus-visible {
  outline: none;
}
body.vscode-high-contrast .menu .menu-item:focus-visible,
body.vscode-high-contrast-light .menu .menu-item:focus-visible {
  outline: 1px solid var(--vscode-focusBorder);
  outline-offset: -1px;
}
.menu-acc-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 1px;
}
.menu-acc-sub {
  font-size: 12px;
  color: var(--muted-foreground);
}
.trail {
  margin-left: auto;
  color: var(--muted-foreground);
}
.trail.is-current {
  color: var(--hero-text);
}
.menu-sep {
  width: auto;
  margin: 4px -4px;
}
.menu-ic {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted-foreground);
}
.menu-item-text {
  flex: 1;
  min-width: 0;
}
.menu-toggle {
  cursor: default;
}
.menu-switch {
  display: inline-flex;
}
.menu .confirm {
  padding: 2px 8px 8px 40px;
}

/* ---------------------------------------------------------------- tabs */

.tabs-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: -6px calc(-1 * var(--gutter));
  padding: 6px var(--gutter);
  background: var(--background);
}
.ui-tabs__list {
  height: 32px;
}
.ui-tabs__trigger {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 26px;
}
.tab-label {
  overflow: hidden;
  text-overflow: ellipsis;
}
.tab-ic {
  display: none;
}
.tab-text {
  position: relative;
  display: inline-flex;
  min-width: 0;
}
.tab-count {
  position: absolute;
  top: -7px;
  right: -15px;
  min-width: 14px;
  height: 14px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font: 600 9.5px/14px var(--font-mono);
  text-align: center;
}
.tab-dot {
  position: absolute;
  top: -1px;
  right: -6px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--hero-safe);
}

/* ---------------------------------------------------------------- cards */

.card {
  overflow: hidden;
  min-width: 0;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 12px 12px 0;
}
.card-head .ui-card-title {
  min-width: 0;
}
.card-side {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
}
.card-count {
  font-size: 12px;
  color: var(--muted-foreground);
}
.card-body {
  padding: 12px;
}
.group-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: -4px;
  padding: 0 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
}
.group-label:not(:first-child) {
  margin-top: 8px;
}

/* --- session */
.ses-head {
  align-items: flex-start;
}
.ses-id {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.ses-title {
  font-size: 12px;
  line-height: 1.3;
  color: var(--muted-foreground);
}

/* --- meters: a label and value, the bar, a muted line */
.meters {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.meter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.meter-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  line-height: 1.2;
}
.meter-label {
  font-weight: 500;
}
.meter-value {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.meter-unit,
.meter-sub {
  color: var(--muted-foreground);
}
.meter-sub {
  font-size: 12px;
  line-height: 1.2;
}
.meter-sub.ui-mono {
  font-size: 11px;
}
.meter .ui-mono {
  font-size: 11.5px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 10px 12px;
}
.stat + .stat {
  border-left: 1px solid var(--border);
}
.stat-v {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stat-l {
  font-size: 12px;
  color: var(--muted-foreground);
}

/* --- usage source */
.src .ui-dot {
  color: var(--muted-foreground);
}
.src.is-live .ui-dot {
  color: var(--success);
}
.ui-badge--outline {
  color: var(--muted-foreground);
}

/* --- best pick */
.pick {
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
}
.pick > .ui-icon {
  grid-row: 1 / span 2;
  align-self: start;
  margin-top: 2px;
  color: var(--muted-foreground);
}
.pick .ui-alert__title,
.pick .ui-alert__description {
  min-width: 0;
}
.pick-btn.ui-btn {
  grid-column: 2;
  justify-self: start;
  margin-top: 8px;
}
@container lumo (min-width: 360px) {
  .pick-btn.ui-btn {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
    margin-top: 0;
  }
}
.pick .confirm {
  grid-column: 2 / -1;
  padding: 2px 0 0;
}
.pick.is-confirming .ui-alert__title {
  display: none;
}

/* --- the inline confirm */
.confirm {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.confirm-q {
  font-size: 12.5px;
  font-weight: 500;
}
.confirm-hint {
  font-size: 12px;
  color: var(--muted-foreground);
}
.confirm-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* --- running */
.runs {
  display: flex;
  flex-direction: column;
  padding: 6px 4px;
}
.runs.is-finished {
  border-top: 1px solid var(--border);
}
.run {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 5px 8px;
  font-size: 13px;
}
.run-st {
  display: inline-flex;
  color: var(--muted-foreground);
}
.run-st.is-failed {
  color: var(--destructive);
}
.run:not(.is-running) .run-title {
  color: var(--muted-foreground);
}
.run-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.run-live {
  font-size: 11px;
  color: var(--muted-foreground);
}
.run-time {
  font-size: 11px;
  color: var(--muted-foreground);
}
.runs-none {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted-foreground);
}
/* --- agents (the Activity tab): the latest wave, one segment and one bar each */
.agents-body {
  display: flex;
  flex-direction: column;
  padding-bottom: 6px;
}
.agents-sum {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-bottom: 10px;
}
.agents-sum-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  line-height: 1.2;
}
.agents-sum-label {
  font-weight: 500;
}
.agents-sum-time {
  font-size: 11px;
  color: var(--muted-foreground);
}
.agents-seg {
  display: flex;
  gap: 3px;
}
.agents-seg-i {
  position: relative;
  flex: 1 1 0;
  min-width: 3px;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--secondary);
}
.agents-seg-i::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--value, 0) * 1%);
  border-radius: inherit;
  background: var(--primary);
  transition: width 0.4s ease;
}
.agents-seg-i.is-done::before {
  background: var(--success);
}
.agents-seg-i.is-failed::before {
  background: var(--destructive);
}
.agents-seg-i.is-stopped::before {
  background: var(--muted-foreground);
}
/* Working, no steps reported: a sweep, not a made-up percentage. */
.agents-seg-i.is-unknown::before,
.agent-bar.is-unknown .ui-progress__bar {
  width: 40%;
  animation: agent-sweep 1.6s ease-in-out infinite;
}
@keyframes agent-sweep {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(250%);
  }
}
.agents {
  display: flex;
  flex-direction: column;
}
.agent {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  min-width: 0;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.agent .run-st,
.agent .run-time {
  margin-top: 1px;
}
.agent-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.agent-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.agent-title {
  flex: 1 1 auto;
  min-width: 0;
}
.agent:not(.is-running) .agent-title {
  color: var(--muted-foreground);
}
.agent-steps {
  flex: none;
  font-size: 11px;
}
.agent-sub {
  font-size: 11px;
  color: var(--muted-foreground);
}
.agent-bar {
  grid-column: 2 / -1;
  margin-top: -2px;
}
.agents-body > .fin-toggle.ui-btn {
  margin: 4px 0 2px;
}
.agents.is-earlier {
  opacity: 0.85;
}
@media (prefers-reduced-motion: reduce) {
  .agents-seg-i.is-unknown::before,
  .agent-bar.is-unknown .ui-progress__bar {
    width: 100%;
    animation: none !important;
    opacity: 0.35;
  }
}

.fin-toggle.ui-btn {
  align-self: flex-start;
  gap: 4px;
  margin: 0 6px 8px;
  padding: 0 6px;
  color: var(--muted-foreground);
}
.fin-toggle .ui-icon {
  transform: rotate(-90deg);
  transition: transform 0.15s;
}
.fin-toggle.is-open .ui-icon {
  transform: none;
}
.card > .fin-toggle {
  display: inline-flex;
}

/* ---------------------------------------------------------------- accounts
   Headroom first (the account to use now, every account's room as a rack), then a card per account
   with its two windows as rings that drain (% left, the rack's unit). Severity colours the rings and
   cells (the charts' accent, amber, red); an account's own colour stays on its picture; the hero's
   safe colour tints the current card. The text columns line up on a 36px picture plus 10px. */

/* --- headroom */
.headroom {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
}
.hr-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--muted-foreground);
}
.hr-label .ui-icon {
  color: var(--hero-text);
}
.hr-label-t {
  flex: 1;
  min-width: 0;
}
.hr-roomy {
  flex: none;
  font-weight: 400;
}
.headroom.is-alert .hr-label .ui-icon {
  color: var(--destructive);
}
.hr-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.hr-av {
  position: relative;
  display: inline-flex;
}
.hr-av .av {
  width: 36px;
  height: 36px;
}
.hr-av.is-empty,
.hr-av.is-tile {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: calc(var(--radius) - 2px);
  background: var(--muted);
  color: var(--muted-foreground);
}
/* On the best account already: a quiet success tile, not the picture a fourth time. */
.hr-av.is-tile {
  background: color-mix(in srgb, var(--success) 14%, transparent);
  color: var(--success);
}
.hr-av.is-tile .ui-icon {
  width: 18px;
  height: 18px;
}
.hr-av-check {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: var(--hero);
  color: var(--hero-foreground);
  box-shadow: 0 0 0 2px var(--card);
}
.hr-av-check .ui-icon {
  width: 9px;
  height: 9px;
  stroke-width: 3.5;
}
.hr-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.hr-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.hr-sub {
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted-foreground);
}
.hr-big {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1;
}
.hr-big-n {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.hr-big-n .hr-pct {
  margin-left: 1px;
  font-size: 14px;
  letter-spacing: 0;
}
.hr-big-l {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted-foreground);
}
.hr-cta.ui-btn {
  width: 100%;
}
.headroom > .confirm {
  padding-left: 46px;
}
@container lumo (min-width: 360px) {
  .hr-cta.ui-btn {
    align-self: flex-start;
    width: auto;
    margin-left: 46px;
  }
}

/* The rack: one cell per account, filled to its room, in the cards' order. */
.hr-rack {
  display: grid;
  grid-template-columns: repeat(var(--cells, 4), minmax(0, 1fr));
  gap: 4px;
  margin: 0 -4px;
  border-radius: var(--radius);
}
.hr-rack:focus-visible {
  outline-offset: 0;
}
/* One focus mark at a time: once a cell is active, its ring is the focus. */
.hr-rack:focus-visible:has(.is-active) {
  outline: none;
}
.hr-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 6px 0 4px;
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  transition: background-color 0.12s;
}
.hr-cell:hover,
.hr-cell.is-active {
  background: var(--accent);
}
.hr-cell.is-active {
  box-shadow: inset 0 0 0 2px var(--ring);
}
.hr-cell.is-more {
  cursor: default;
}
.hr-track {
  position: relative;
  display: block;
  width: 26px;
  height: 46px;
  overflow: hidden;
  border-radius: 6px;
  background: color-mix(in srgb, var(--foreground) 8%, transparent);
}
.hr-cell.is-unknown .hr-track,
.hr-cell.is-more .hr-track {
  border: 1px dashed var(--input);
  background: transparent;
}
.hr-track.ui-skeleton {
  border: 0;
}
/* Both windows reset since the reading: likely full, but unmeasured, so dashed. */
.hr-cell.is-fresh .hr-track {
  border: 1px dashed var(--success);
  background: color-mix(in srgb, var(--success) 12%, transparent);
}
.hr-glyph {
  width: 11px;
  height: 11px;
  color: var(--success);
}
.hr-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--room, 0) * 1%);
  min-height: 2px;
  border-radius: 3px 3px 0 0;
  background: var(--bar);
  transition: height 0.25s ease-out;
}
.hr-who {
  position: relative;
  display: inline-flex;
}
.ui-avatar--xs {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}
.ui-avatar--xs .av-initials {
  font-size: 9px;
}
.hr-more {
  font-size: 9px;
  font-weight: 600;
}
/* The current account: a neutral ring, so blue (the focus colour) only ever means focus. */
.hr-cell.is-current .ui-avatar--xs {
  box-shadow:
    0 0 0 1.5px var(--card),
    0 0 0 3px color-mix(in srgb, var(--foreground) 50%, transparent);
}
/* The host's pick: a plain success dot. */
.hr-pip {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 1.5px var(--card);
}
.hr-num {
  display: inline-flex;
  align-items: center;
  min-height: 11px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.hr-pct,
.hr-cell.is-unknown .hr-num {
  font-weight: 400;
  color: var(--muted-foreground);
}
.hr-foot {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted-foreground);
}
.hr-foot > .ui-icon {
  margin-top: 1px;
}
.hr-foot-text {
  min-width: 0;
}
/* Wide: the headline on the left, the rack on the right. */
@container lumo (min-width: 420px) {
  .headroom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-content: start;
    column-gap: 20px;
  }
  .headroom > * {
    grid-column: 1;
  }
  .headroom > .hr-label,
  .headroom > .hr-foot {
    grid-column: 1 / -1;
  }
  .headroom > .hr-rack {
    grid-column: 2;
    grid-row: 2 / span 2;
    align-self: center;
  }
  .hr-cta.ui-btn {
    justify-self: start;
  }
  /* The big number under the title, so the rack has the right column to itself. */
  .hr-head {
    grid-template-columns: auto minmax(0, 1fr);
    row-gap: 4px;
  }
  .hr-big {
    grid-column: 2;
    flex-direction: row;
    align-items: baseline;
    gap: 4px;
    margin-top: 2px;
  }
  .hr-big-l {
    margin-top: 0;
  }
}

/* --- account cards */
.accs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.acc {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition:
    border-color 0.15s,
    background-color 0.15s,
    box-shadow 0.2s;
}
/* The hero's safe colour: a gold hero would make the current card read as a warning. */
.acc.is-current {
  border-color: color-mix(in srgb, var(--hero-safe) 40%, var(--border));
  background: linear-gradient(160deg, color-mix(in srgb, var(--hero-safe) 9%, var(--card)), var(--card) 62%);
}
.acc.is-confirming,
.acc.is-editing {
  background: color-mix(in srgb, var(--foreground) 4%, var(--card));
}
.acc.is-flash {
  box-shadow: 0 0 0 2px var(--ring);
}
.acc-row {
  display: block;
  min-width: 0;
}
.acc-hit {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  transition: background-color 0.12s;
}
.acc-hit > .av {
  width: 36px;
  height: 36px;
}
.acc-hit.is-interactive {
  cursor: pointer;
}
.acc-hit.is-interactive:hover {
  background: var(--accent);
}
.acc.is-confirming .acc-hit,
.acc.is-editing .acc-hit {
  background: transparent;
}
.acc-hit:focus-visible {
  outline-offset: -2px;
  border-radius: calc(var(--radius) + 1px);
}
.acc-hit:focus:not(:focus-visible) {
  outline: none;
}
.acc-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
/* The name keeps its room; a chip that does not fit moves to its own line instead of cutting it.
   Only this row clears the pencil; the meta line runs to the card's edge. */
.acc-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 6px;
  min-width: 0;
  padding-right: 24px;
}
.acc-who {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.acc-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
/* Monochrome: in the account's colour it would borrow a status colour (a red asterisk, a gold dot). */
.acc-emblem {
  flex: none;
  font-size: 11px;
  line-height: 1;
  color: var(--muted-foreground);
}
.acc-chip.ui-badge {
  flex: 0 1 auto;
  gap: 3px;
  min-width: 0;
  height: 18px;
  padding: 0 6px;
  overflow: hidden;
  font-size: 10.5px;
}
.acc-chip.ui-badge--destructive {
  color: color-mix(in srgb, var(--destructive) 80%, #fff);
}
body.vscode-light .acc-chip.ui-badge--destructive {
  color: color-mix(in srgb, var(--destructive) 66%, #000);
}
.acc-chip .ui-icon {
  width: 11px;
  height: 11px;
}
.acc-chip.is-current {
  background: color-mix(in srgb, var(--hero) 16%, transparent);
  color: var(--hero-text);
}
body.vscode-light .acc-chip.is-current {
  color: color-mix(in srgb, var(--hero) 52%, #000);
}
.acc-chip.is-pick {
  background: color-mix(in srgb, var(--success) 14%, transparent);
  color: var(--foreground);
}
.acc-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.3;
  color: var(--muted-foreground);
}
/* The freshness and "Switch ›" stacked in one cell at the line's end: the slot is as wide as the
   wider of the two, so swapping them on hover moves nothing. */
.acc-slot {
  display: grid;
  flex: none;
  justify-items: end;
  margin-left: auto;
}
.acc-slot > * {
  grid-area: 1 / 1;
}
.src--quiet {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  white-space: nowrap;
}
.acc-go {
  display: none;
  align-items: center;
  gap: 1px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--foreground);
  visibility: hidden;
}
.acc-go .ui-icon {
  width: 12px;
  height: 12px;
}
@container lumo (min-width: 230px) {
  .acc-go {
    display: inline-flex;
  }
  .acc-hit:hover .acc-go,
  .acc-hit:focus-visible .acc-go,
  .acc-go.is-pick {
    visibility: visible;
    animation: lumo-fade 0.12s ease-out;
  }
  .acc-hit:hover .src--quiet,
  .acc-hit:focus-visible .src--quiet,
  .acc.is-pick .src--quiet {
    visibility: hidden;
  }
  .acc.is-confirming .acc-go {
    visibility: hidden;
  }
  .acc.is-confirming .src--quiet {
    visibility: visible;
  }
}
@keyframes lumo-fade {
  from {
    opacity: 0;
  }
}
.acc-side {
  position: absolute;
  top: 9px;
  right: 8px;
  display: flex;
}
.acc-edit.ui-btn--icon {
  width: 26px;
  height: 26px;
  color: var(--muted-foreground);
  opacity: 0.7;
}
.acc:hover .acc-edit,
.acc-edit:focus-visible,
.acc-edit[aria-expanded='true'] {
  opacity: 1;
}
.acc-edit:hover,
.acc-edit[aria-expanded='true'] {
  color: var(--foreground);
}
.acc-gauges {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.acc-none {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted-foreground);
}
.acc .confirm {
  margin: 0 12px;
  padding: 10px 0 12px;
  border-top: 1px solid var(--border);
}

/* --- ring gauges: % left, draining from 12 o'clock, the number inside */
.gauge {
  --ring: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.gauge-ring {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: var(--ring);
  height: var(--ring);
  border-radius: 999px;
}
.gauge-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.gauge-track,
.gauge-arc {
  fill: none;
  stroke-width: 4;
}
.gauge-track {
  stroke: color-mix(in srgb, var(--foreground) 10%, transparent);
}
.gauge-arc {
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transform-box: fill-box;
  transition:
    stroke-dasharray 0.25s ease-out,
    stroke 0.25s;
}
.gauge.is-reset .gauge-track,
.gauge.is-none .gauge-track {
  stroke-width: 2;
  stroke-dasharray: 4 4.333;
  stroke: color-mix(in srgb, var(--foreground) 28%, transparent);
}
/* Refilled is the commonest state: its dashed ring clears 3:1, where "no reading" stays quiet. */
.gauge.is-reset .gauge-track {
  stroke: color-mix(in srgb, var(--foreground) 45%, transparent);
}
body.vscode-light .gauge.is-reset .gauge-track {
  stroke: color-mix(in srgb, var(--foreground) 60%, transparent);
}
/* The UI font, tabular: the editor's mono slashes its zero, which reads as "none". */
.gauge-num {
  position: relative;
  display: inline-flex;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.02em;
}
.gauge-num.is-3 {
  font-size: 10px;
  letter-spacing: -0.03em;
}
.gauge.is-none .gauge-num {
  font-weight: 400;
  color: var(--muted-foreground);
}
.gauge-glyph {
  width: 13px;
  height: 13px;
  color: var(--success);
}
body.vscode-light .gauge-glyph,
body.vscode-light .hr-glyph {
  color: #15803d;
}
.gauge-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.gauge-label {
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--muted-foreground);
}
.gauge-sub {
  display: block;
  font-size: 12px;
  line-height: 1.3;
  text-wrap: balance;
}
.gauge.is-none .gauge-sub {
  color: var(--muted-foreground);
}
.g-short {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  vertical-align: top;
}
.g-time {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.gauge-ic {
  width: 11px;
  height: 11px;
}
.g-long {
  display: none;
}
.gauge .ui-skeleton.sk-g1,
.gauge .ui-skeleton.sk-g2 {
  display: block;
  height: 9px;
}
.sk-g1 {
  width: 40px;
}
.sk-g2 {
  width: 56px;
}
/* Wide: the words spelled out. The ring stays 36px, so the columns still line up. */
@container lumo (min-width: 380px) {
  .g-long {
    display: inline;
  }
  .gauge-label .g-long {
    font-weight: 400;
    color: var(--muted-foreground);
  }
  .g-short {
    display: none;
  }
}

/* --- add an account: an empty seat */
.acc-add {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px dashed var(--input);
  border-radius: calc(var(--radius) + 2px);
  background: transparent;
  color: var(--foreground);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    background-color 0.12s,
    border-color 0.12s;
}
.acc-add:hover {
  border-color: color-mix(in srgb, var(--foreground) 32%, transparent);
  background: var(--accent);
}
.acc-add-ic {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px dashed var(--input);
  border-radius: 999px;
  color: var(--muted-foreground);
  transition: color 0.12s;
}
.acc-add:hover .acc-add-ic {
  border-style: solid;
  color: var(--foreground);
}
.acc-add-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.acc-add-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}
.acc-add-desc {
  font-size: 12px;
  line-height: 1.3;
  color: var(--muted-foreground);
  text-wrap: balance;
}
.srow-ic {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: -2px;
  border-radius: calc(var(--radius) - 2px);
  background: var(--muted);
  color: var(--muted-foreground);
}
.srow-ic .ui-icon {
  width: 15px;
  height: 15px;
}

/* Narrow: the big number moves under the title, so the headline keeps to a line or two. */
@container lumo (max-width: 269.98px) {
  .hr-head {
    grid-template-columns: auto minmax(0, 1fr);
    row-gap: 4px;
  }
  .hr-big {
    grid-column: 2;
    flex-direction: row;
    align-items: baseline;
    gap: 4px;
    margin-top: 2px;
  }
  .hr-big-l {
    margin-top: 0;
  }
}
/* Tight (the sidebar near its minimum): one column of rings, the headline stacked, smaller pictures. */
@container lumo (max-width: 239.98px) {
  .hr-roomy,
  .acc-fresh-sum,
  .srow-ic {
    display: none;
  }
  .hr-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .hr-av,
  .hr-av.is-empty,
  .hr-av.is-tile {
    display: none;
  }
  .hr-big {
    grid-column: 1;
    flex-direction: row;
    align-items: baseline;
    gap: 4px;
    margin-top: 0;
    order: -1;
  }
  .hr-big-l {
    margin-top: 0;
  }
  .hr-cta.ui-btn,
  .headroom > .confirm {
    margin-left: 0;
    padding-left: 0;
  }
  .hr-rack {
    gap: 2px;
  }
  .hr-track {
    width: 20px;
  }
  .acc-hit {
    grid-template-columns: 24px minmax(0, 1fr);
    column-gap: 8px;
    padding: 10px;
  }
  .acc-hit > .av {
    width: 24px;
    height: 24px;
  }
  .acc-hit > .av .av-initials {
    font-size: 9px;
  }
  .acc-hit {
    align-items: start;
  }
  .acc-sub,
  .acc-emblem {
    display: none;
  }
  .acc-slot {
    justify-items: start;
    margin-left: 0;
  }
  .acc-name {
    padding-right: 22px;
  }
  .acc-side {
    top: 7px;
    right: 6px;
  }
  .acc-gauges {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-top: 10px;
  }
  .acc .confirm,
  .acc .profile {
    margin: 0 10px;
  }
  .acc-add {
    padding: 10px;
  }
  .acc-add-ic {
    width: 28px;
    height: 28px;
  }
  .acc-add-desc {
    display: none;
  }
}

/* --- the profile form */
.profile {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.acc .profile {
  margin: 0 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.menu .profile {
  padding: 4px 8px 8px;
}
.profile-pic {
  display: flex;
  align-items: center;
  gap: 12px;
}
.profile-pic-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.profile .ui-field {
  gap: 6px;
}
.ui-input:focus-visible {
  outline: none;
}
.ui-input.ui-input--sm {
  height: 30px;
  font-size: 13px;
  background: var(--background);
}
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.swatch {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #000 12%, transparent);
  cursor: pointer;
  transition: transform 0.1s;
}
.swatch:hover {
  transform: scale(1.08);
}
.swatch[aria-checked='true'] {
  box-shadow:
    0 0 0 2px var(--card),
    0 0 0 3.5px var(--swatch);
}
.menu .swatch[aria-checked='true'] {
  box-shadow:
    0 0 0 2px var(--popover),
    0 0 0 3.5px var(--swatch);
}
.swatch .ui-icon {
  width: 13px;
  height: 13px;
  stroke-width: 3;
}
.profile-btns {
  display: flex;
  gap: 6px;
}

/* ---------------------------------------------------------------- switch rows */

.card-head + .srows {
  margin-top: 4px;
}
.srows > .srow + .srow {
  border-top: 1px solid var(--border);
}
.srow {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
}
.srow-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.srow-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}
.srow-desc {
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted-foreground);
}
.mod-scope.ui-badge {
  flex: none;
  height: 18px;
  padding: 0 6px;
  font-size: 10.5px;
  font-weight: 500;
}

/* ---------------------------------------------------------------- activity */

.tl {
  margin: 0;
  padding: 6px 4px;
  list-style: none;
}
.tl-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  font-size: 12.5px;
  line-height: 1.35;
}
.tl-ic {
  color: var(--muted-foreground);
}
.tl-verb {
  font-weight: 500;
}
.tl-rest {
  color: var(--muted-foreground);
}
.tl-time {
  font-size: 11px;
  color: var(--muted-foreground);
}
.tl-more.ui-btn {
  width: calc(100% - 8px);
  margin: 0 4px 6px;
  color: var(--muted-foreground);
}

/* ---------------------------------------------------------------- settings */

.skins {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 112px), 1fr));
  gap: 8px;
}
.skin.ui-radio-card {
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 8px 10px;
}
.skin.ui-radio-card input {
  margin: 0;
}
.skin-name {
  flex: 1;
  font-size: 12.5px;
  font-weight: 500;
}
.skin-dots {
  display: inline-flex;
  flex: none;
}
.skin-dots i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow:
    0 0 0 1.5px var(--background),
    inset 0 0 0 1px var(--border);
}
.skin-dots i + i {
  margin-left: -3px;
}
.skin-desc {
  margin-top: -4px;
  padding: 0 2px;
  font-size: 12px;
  color: var(--muted-foreground);
}
.layer-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
}
.layer-text {
  flex: 1;
  min-width: 0;
}
.layer-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}
.layer-desc {
  font-size: 12px;
  color: var(--muted-foreground);
}
.layer-badge .ui-dot {
  color: var(--warning);
}
.layer-badge.is-on .ui-dot {
  color: var(--success);
}
.layer-acts {
  display: flex;
  gap: 4px;
  padding: 6px;
  border-top: 1px solid var(--border);
}
.layer-acts .ui-btn,
.acts .ui-btn {
  color: var(--foreground);
}
.layer-acts .ui-icon,
.acts .ui-icon {
  color: var(--muted-foreground);
}
.acts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  padding: 6px;
}
.act.ui-btn {
  justify-content: flex-start;
  min-width: 0;
  padding: 0 8px;
}
.ver {
  padding-top: 4px;
  text-align: center;
  font-size: 11px;
  color: var(--muted-foreground);
}
.credit {
  text-align: center;
  font-size: 11px;
  color: var(--muted-foreground);
}
.credit-link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--foreground);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
  cursor: pointer;
}
.credit-link:hover {
  text-decoration-color: currentColor;
}
.credit-link:focus-visible {
  outline: 1px solid var(--ring);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------------------------------------------------------------- empty, toast, loading */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 24px 16px;
  text-align: center;
}
.empty-ic {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 6px;
  border-radius: var(--radius);
  background: var(--muted);
  color: var(--muted-foreground);
}
.empty-title {
  font-size: 13px;
  font-weight: 500;
}
.empty-text {
  max-width: 240px;
  font-size: 12px;
  color: var(--muted-foreground);
}
.empty-btn.ui-btn {
  margin-top: 10px;
}

.toast {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  bottom: var(--gutter);
  z-index: 50;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 536px;
  margin: 0 auto;
  padding: 10px 8px 10px 12px;
  font-size: 12.5px;
  line-height: 1.45;
  animation: lumo-toast 0.18s ease-out;
  transition:
    opacity 0.18s,
    transform 0.18s;
}
@keyframes lumo-toast {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.toast.is-leaving {
  opacity: 0;
  transform: translateY(6px);
}
.toast-ic {
  margin-top: 1px;
  color: var(--muted-foreground);
}
.toast-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.toast-x.ui-btn--icon {
  width: 22px;
  height: 22px;
  margin: -2px 0;
  color: var(--muted-foreground);
}

.sk-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.sk-av {
  flex: none;
  width: 32px;
  height: 32px;
}
.sk-lines {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
}
.sk-l1 {
  width: 45%;
  height: 12px;
}
.sk-l2 {
  width: 70%;
  height: 10px;
}
.sk-tabs {
  height: 32px;
}
.sk-card {
  height: 150px;
  border-radius: calc(var(--radius) + 2px);
}

/* ---------------------------------------------------------------- widths and themes */

/* Too narrow for four labels: the chosen tab keeps its label, the others show their icon. */
@container lumo (max-width: 271.98px) {
  .tab-ic {
    display: block;
  }
  .ui-tabs__trigger[aria-selected='false'] {
    flex: 1 1 0;
  }
  .ui-tabs__trigger[aria-selected='false'] .tab-label {
    display: none;
  }
  .ui-tabs__trigger[aria-selected='false'] .tab-text {
    position: absolute;
    top: 5px;
    right: 50%;
    margin-right: -9px;
  }
  .ui-tabs__trigger[aria-selected='true'] {
    flex: none;
    padding: 0 10px;
  }
  .acts {
    grid-template-columns: minmax(0, 1fr);
  }
  /* Skins: no room for the radio circle; the ring on the card says which is chosen. */
  .skin.ui-radio-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }
  .skin.ui-radio-card:has(input:focus-visible) {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
  }
}
@container lumo (max-width: 279.98px) {
  .stat {
    padding: 10px 8px;
  }
  .headroom > .confirm {
    padding-left: 0;
  }
}

body.vscode-high-contrast .ui-progress,
body.vscode-high-contrast-light .ui-progress {
  outline: 1px solid var(--border);
}
body.vscode-high-contrast .acc.is-current,
body.vscode-high-contrast-light .acc.is-current {
  border-color: var(--vscode-contrastActiveBorder, var(--border));
  background: var(--card);
}
body.vscode-high-contrast .gauge-track,
body.vscode-high-contrast-light .gauge-track {
  stroke: color-mix(in srgb, var(--foreground) 40%, transparent);
}
body.vscode-high-contrast .hr-track,
body.vscode-high-contrast-light .hr-track {
  outline: 1px solid var(--border);
}
body.vscode-high-contrast .acc-hit.is-interactive:hover,
body.vscode-high-contrast-light .acc-hit.is-interactive:hover,
body.vscode-high-contrast .switcher:hover,
body.vscode-high-contrast-light .switcher:hover {
  outline: 1px dashed var(--vscode-contrastActiveBorder, var(--border));
  outline-offset: -1px;
}

/* Restraint: on/off and choice controls stay neutral (shadcn's zinc primary), so the hero's colour
   is left for the primary button, progress, focus and the current account. */
.ui-switch[aria-checked='true'] {
  background: var(--foreground);
}
.ui-switch[aria-checked='true'] .ui-switch__thumb {
  background: var(--background);
}
.ui-radio-card:has(input:checked) {
  border-color: var(--foreground);
  box-shadow: 0 0 0 1px var(--foreground);
}
.ui-radio-card input:checked {
  border-color: var(--foreground);
}
.ui-radio-card input::before {
  background: var(--foreground);
}
body.vscode-high-contrast .ui-switch[aria-checked='false'],
body.vscode-high-contrast-light .ui-switch[aria-checked='false'] {
  background: transparent;
  border-color: var(--border);
}
body.vscode-high-contrast .ui-switch[aria-checked='false'] .ui-switch__thumb,
body.vscode-high-contrast-light .ui-switch[aria-checked='false'] .ui-switch__thumb {
  background: var(--foreground);
}

/* Lumo's forks: the offer to switch, and the way back */
.adopt {
  margin-bottom: 12px;
}
.adopt-btn {
  grid-column: 2;
  justify-self: start;
  margin-top: 8px;
}
.revert-btn {
  margin: -4px 0 12px;
  color: var(--muted-foreground);
}

/* Four labels need about 340px in VS Code's 13px UI font: below that the chosen
   tab keeps its label and the others show their icon (instead of "Overvi…"). */
@container lumo (max-width: 339.98px) {
  .tab-ic {
    display: block;
  }
  .ui-tabs__trigger[aria-selected='false'] {
    flex: 1 1 0;
  }
  .ui-tabs__trigger[aria-selected='false'] .tab-label {
    display: none;
  }
  .ui-tabs__trigger[aria-selected='false'] .tab-text {
    position: absolute;
    top: 5px;
    right: 50%;
    margin-right: -9px;
  }
  .ui-tabs__trigger[aria-selected='true'] {
    flex: none;
    padding: 0 10px;
  }
}

/* ---------------------------------------------------------------- analytics
   Charts follow one system: the hero's colour marks the point (today, the busiest hours, the top
   tool, the latest reading), everything else is a recessive grey; hairline solid grid; 4px rounded
   data-ends, square at the baseline; a 2px surface gap between touching marks. Models are the one
   categorical chart: three validated slots (Opus, Sonnet, Haiku), the rest fold into "Other".
   Declared on body, not :root, so the steps below resolve against the light theme's deeper accent. */
body {
  --viz-accent: var(--hero-safe);
  --viz-muted: color-mix(in srgb, var(--foreground) 24%, transparent);
  --viz-muted-on: color-mix(in srgb, var(--foreground) 42%, transparent);
  --viz-grid: color-mix(in srgb, var(--foreground) 8%, transparent);
  --viz-axis: color-mix(in srgb, var(--foreground) 18%, transparent);
  --viz-empty: color-mix(in srgb, var(--foreground) 6%, transparent);
  --hm-1: color-mix(in srgb, var(--viz-accent) 26%, transparent);
  --hm-2: color-mix(in srgb, var(--viz-accent) 50%, transparent);
  --hm-3: color-mix(in srgb, var(--viz-accent) 75%, transparent);
  --hm-4: var(--viz-accent);
  --viz-1: #3987e5;
  --viz-2: #d95926;
  --viz-3: #199e70;
  --viz-other: color-mix(in srgb, var(--foreground) 30%, transparent);
  /* A limit on the Accounts tab's rings and rack: amber from 60%, red from 85%. */
  --gauge-warn: var(--amber);
  --gauge-bad: var(--destructive);
}
/* On light themes the accent is deepened to clear 3:1 on the card (gold and sky would not): its
   lightness only where the engine can, so sky stays blue instead of going slate. */
body.vscode-light {
  --viz-accent: color-mix(in oklch, var(--hero-safe) 74%, #000);
  --viz-muted: color-mix(in srgb, var(--foreground) 20%, transparent);
  --viz-muted-on: color-mix(in srgb, var(--foreground) 36%, transparent);
  --viz-1: #2a78d6;
  --viz-2: #eb6834;
  --viz-3: #1baf7a;
  /* Deeper, to clear 3:1 against the track on white. */
  --gauge-warn: #b45309;
  --gauge-bad: #dc2626;
}
@supports (color: oklch(from red l c h)) {
  body.vscode-light {
    --viz-accent: oklch(from var(--hero-safe) calc(l * 0.74) c h);
  }
}
body.vscode-high-contrast,
body.vscode-high-contrast-light {
  --viz-muted: color-mix(in srgb, var(--foreground) 50%, transparent);
  --viz-muted-on: var(--foreground);
  --viz-grid: color-mix(in srgb, var(--foreground) 35%, transparent);
  --viz-axis: var(--foreground);
  --viz-empty: transparent;
}

/* --- the group's side: updated, refresh */
.an-side {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 400;
}
.an-upd {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
}
.an-refresh.ui-btn--icon {
  width: 22px;
  height: 22px;
  margin: -4px -4px -4px 0;
  color: var(--muted-foreground);
}
.an-refresh:hover {
  color: var(--foreground);
}

/* --- segmented control (shadcn's ToggleGroup / small Tabs) */
.seg {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 2px;
  height: 26px;
  padding: 2px;
  border-radius: calc(var(--radius) - 1px);
  background: var(--muted);
}
.seg-btn {
  height: 22px;
  padding: 0 8px;
  border: 0;
  border-radius: calc(var(--radius) - 3px);
  background: transparent;
  color: var(--muted-foreground);
  font: 500 11.5px/1 var(--font-sans);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.12s, background-color 0.12s;
}
.seg-btn:hover {
  color: var(--foreground);
}
.seg-btn[aria-pressed='true'],
.seg-btn[aria-selected='true'] {
  background: var(--background);
  color: var(--foreground);
  box-shadow: var(--shadow-sm);
}

/* --- KPI row */
.kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.kpi {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 12px;
}
.kpi:nth-child(even) {
  border-left: 1px solid var(--border);
}
.kpi:nth-child(n + 3) {
  border-top: 1px solid var(--border);
}
.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.2;
  color: var(--muted-foreground);
}
.kpi-ic {
  color: var(--muted-foreground);
}
.kpi-v {
  margin-top: 4px;
  overflow: hidden;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kpi-u {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted-foreground);
}
.kpi-s {
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--muted-foreground);
}
.kpi-d {
  font-size: 11px;
}
.kpi-lines {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 9px 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted-foreground);
}
.kpi-diff {
  display: inline-flex;
  flex: none;
  gap: 5px;
  font-size: 11.5px;
}
.kpi-diff .is-add {
  color: var(--success);
}
.kpi-diff .is-del {
  color: var(--destructive);
}
.kpi-sep {
  color: var(--muted-foreground);
  opacity: 0.6;
}

/* --- charts: the frame */
.viz-body {
  padding-top: 10px;
}
.viz {
  position: relative;
  min-width: 0;
  border-radius: 4px;
  touch-action: pan-y;
}
.ui .viz:focus-visible {
  outline-offset: 4px;
}
.viz-svg {
  display: block;
  overflow: visible;
}
.viz-grid {
  stroke: var(--viz-grid);
  stroke-width: 1;
}
.viz-axis {
  stroke: var(--viz-axis);
  stroke-width: 1;
}
.viz-tick {
  font: 10px/1 var(--font-mono);
  font-variant-numeric: tabular-nums;
  fill: var(--muted-foreground);
}
.viz-lab {
  font: 500 11px/1 var(--font-sans);
  fill: var(--muted-foreground);
}
.viz-x {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
  font: 10px/1 var(--font-mono);
  color: var(--muted-foreground);
}
.viz-band {
  fill: var(--accent);
}

/* --- the tooltip: values lead (strong, aligned), labels follow */
.viz-tip {
  position: absolute;
  z-index: 5;
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 6px;
  row-gap: 1px;
  padding: 6px 8px;
  border-radius: calc(var(--radius) - 2px);
  font-size: 11.5px;
  line-height: 1.35;
  white-space: nowrap;
  pointer-events: none;
  animation: lumo-tip 0.1s ease-out;
}
@keyframes lumo-tip {
  from {
    opacity: 0;
  }
}
.viz-tip-t {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--popover-foreground);
}
.viz-tip-r {
  display: contents;
}
.viz-tip-v {
  font-size: 11px;
  font-weight: 600;
  text-align: right;
  color: var(--popover-foreground);
}
.viz-tip-l {
  color: var(--muted-foreground);
}

/* --- the 14 days */
.days-head {
  flex-wrap: wrap;
  align-items: flex-start;
  row-gap: 8px;
}
.days-id {
  display: flex;
  flex: 1 1 120px;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.days-desc {
  font-size: 12px;
  line-height: 1.3;
  color: var(--muted-foreground);
}
.viz-bar {
  fill: var(--viz-muted);
  transition:
    y 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
    height 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
    fill 0.12s;
}
.viz-bar.is-on {
  fill: var(--viz-muted-on);
}
.viz-bar.is-now {
  fill: var(--viz-accent);
}
.viz-bar.is-now.is-on {
  fill: color-mix(in srgb, var(--viz-accent) 82%, var(--foreground));
}

/* --- when you work */
.hm {
  fill: var(--viz-empty);
}
.hm.l1 {
  fill: var(--hm-1);
}
.hm.l2 {
  fill: var(--hm-2);
}
.hm.l3 {
  fill: var(--hm-3);
}
.hm.l4 {
  fill: var(--hm-4);
}
.hm.is-on {
  stroke: var(--foreground);
  stroke-width: 1.5;
}
.hm-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 8px;
  margin-top: 10px;
  font-size: 11.5px;
  line-height: 1.2;
  color: var(--muted-foreground);
}
.hm-best .ui-mono {
  font-size: 11px;
  color: var(--foreground);
}
.hm-best {
  white-space: nowrap;
}
.hm-scale {
  display: inline-flex;
  flex: none;
  margin-left: auto;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
}
.hm-sw {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--viz-empty);
}
.hm-sw.l0 {
  margin-left: 3px;
}
.hm-sw.l1 {
  background: var(--hm-1);
}
.hm-sw.l2 {
  background: var(--hm-2);
}
.hm-sw.l3 {
  background: var(--hm-3);
}
.hm-sw.l4 {
  margin-right: 3px;
  background: var(--hm-4);
}

/* --- the last 7 days: tools, models, projects */
.brk-head {
  flex-wrap: wrap;
  row-gap: 8px;
}
.brk-panel {
  min-width: 0;
}
.hbars {
  display: flex;
  flex-direction: column;
  padding: 8px 12px 10px;
}
.hbar {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) minmax(0, 1.15fr) 34px;
  align-items: center;
  gap: 8px;
  min-height: 25px;
  font-size: 12.5px;
}
.hbar-ic {
  color: var(--muted-foreground);
}
.hbar-track {
  display: flex;
  height: 8px;
}
.hbar-fill {
  min-width: 2px;
  height: 100%;
  border-radius: 0 4px 4px 0;
  background: var(--viz-muted);
}
.hbar.is-top .hbar-fill {
  background: var(--viz-accent);
}
.hbar-v {
  font-size: 11px;
  text-align: right;
  color: var(--muted-foreground);
}
.hbar.is-top .hbar-v {
  color: var(--foreground);
}

.models {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 12px 10px;
}
.stack {
  display: flex;
  gap: 2px;
  height: 10px;
}
.stack-seg {
  flex: 0 1 0;
  min-width: 3px;
  height: 100%;
}
.stack-seg:first-child {
  border-radius: 4px 0 0 4px;
}
.stack-seg:last-child {
  border-radius: 0 4px 4px 0;
}
.stack-seg:only-child {
  border-radius: 4px;
}
.c0 {
  background: var(--viz-other);
}
.c1 {
  background: var(--viz-1);
}
.c2 {
  background: var(--viz-2);
}
.c3 {
  background: var(--viz-3);
}
.legend {
  display: flex;
  flex-direction: column;
}
.legend-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto 34px;
  align-items: center;
  gap: 8px;
  min-height: 25px;
  font-size: 12.5px;
}
.legend-sw {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}
.legend-n,
.legend-p {
  font-size: 11px;
  text-align: right;
}
.legend-n {
  color: var(--muted-foreground);
}

.projs {
  padding: 6px 12px 8px;
}
.proj {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 50px 58px;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  font-size: 12.5px;
}
.projs [role='list'] > .proj {
  border-top: 1px solid var(--border);
}
.proj-head {
  min-height: 22px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-foreground);
}
.proj-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.proj-ic {
  color: var(--muted-foreground);
}
.proj-n,
.proj-at {
  text-align: right;
}
.proj .proj-n.ui-mono,
.proj .proj-at.ui-mono {
  font-size: 11px;
}
.proj-at {
  color: var(--muted-foreground);
}

/* --- the limits' trend, in the Usage card */
.trend {
  margin: 0 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.trend-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.2;
}
.trend-span {
  font-size: 11px;
  color: var(--muted-foreground);
}
.trend-none {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted-foreground);
}
.trend-x {
  padding-left: 44px;
}
.spark-line {
  fill: none;
  stroke: var(--muted-foreground);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.spark-area {
  fill: color-mix(in srgb, var(--muted-foreground) 7%, transparent);
}
.spark-end {
  fill: var(--viz-accent);
  stroke: var(--card);
  stroke-width: 2;
}
.spark-dot {
  fill: var(--foreground);
  stroke: var(--card);
  stroke-width: 2;
}
.spark-cross {
  stroke: var(--viz-axis);
  stroke-width: 1;
}

/* --- loading */
.sk-k1 {
  width: 58%;
  height: 10px;
}
.sk-k2 {
  width: 42%;
  height: 18px;
  margin-top: 6px;
}
.sk-k3 {
  width: 66%;
  height: 9px;
  margin-top: 4px;
}
.sk-cols {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 92px;
}
.sk-cols > span {
  flex: 1;
  border-radius: 4px 4px 0 0;
}

@container lumo (max-width: 319.98px) {
  .kpi-vs,
  .kpi-ic {
    display: none;
  }
  .kpi {
    padding: 10px;
  }
  .hbar {
    grid-template-columns: 14px minmax(0, 1fr) minmax(0, 0.55fr) 32px;
    gap: 6px;
  }
}

body.vscode-high-contrast .seg,
body.vscode-high-contrast-light .seg {
  border: 1px solid var(--border);
}
body.vscode-high-contrast .seg-btn[aria-pressed='true'],
body.vscode-high-contrast .seg-btn[aria-selected='true'],
body.vscode-high-contrast-light .seg-btn[aria-pressed='true'],
body.vscode-high-contrast-light .seg-btn[aria-selected='true'] {
  outline: 1px solid var(--vscode-contrastActiveBorder, var(--foreground));
  outline-offset: -1px;
}
/* High contrast: empty hours are drawn as outlines, so the grid still reads on a black or white page. */
body.vscode-high-contrast .hm.l0,
body.vscode-high-contrast-light .hm.l0 {
  stroke: var(--border);
  stroke-width: 1;
}
body.vscode-high-contrast .hm-sw.l0,
body.vscode-high-contrast-light .hm-sw.l0 {
  box-shadow: inset 0 0 0 1px var(--border);
}
body.vscode-high-contrast .hm.is-on,
body.vscode-high-contrast-light .hm.is-on {
  stroke: var(--vscode-contrastActiveBorder, var(--foreground));
  stroke-width: 2;
}

/* You should know: Claude's side agent's notes */
.know-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.know-row {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--know, #2dd4bf);
  border-radius: calc(var(--radius) - 2px);
  background: color-mix(in srgb, var(--know, #2dd4bf) 5%, transparent);
}
body.vscode-light .know-row {
  --know: #0f9d8a;
}
.know-ic {
  color: var(--know, #2dd4bf);
  margin-top: 2px;
}
.know-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.know-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.know-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--know, #2dd4bf);
}
.know-time {
  font-size: 11px;
  color: var(--muted-foreground);
}
.know-text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Switching while Claude works: the reload would stop it. */
.confirm-warn {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--vscode-editorWarning-foreground, #cca700);
}
.confirm-warn .ui-icon {
  flex: none;
  margin-top: 2px;
}

/* --- activity kept from before a reload */
.tl-row.tl-before {
  position: relative;
  margin-top: 26px;
}
.tl-row.tl-before::before {
  content: attr(data-before);
  position: absolute;
  top: -22px;
  left: 0;
  right: 0;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
  font-size: 11px;
  color: var(--muted-foreground);
}

/* --- analytics: a failed update, details on request */
.an-error-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 8px;
}
.an-error-details summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted-foreground);
}
.an-error-details code {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.4;
  word-break: break-all;
  color: var(--muted-foreground);
}

/* --- analytics: what they cover, and this project's share */
.an-scope {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: -2px 12px 8px;
  font-size: 12px;
  color: var(--muted-foreground);
}
.here {
  padding: 10px 12px;
}
.here-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
}
.here-head .ui-icon {
  color: var(--primary);
}
.here-title {
  font-weight: 600;
}
.here-sub {
  color: var(--muted-foreground);
}
.here-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.here-stat {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.here-v {
  font-size: 15px;
  font-weight: 600;
}
.here-l {
  font-size: 11px;
  color: var(--muted-foreground);
}
.here-none {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted-foreground);
}

/* --- projects at narrow widths: the figures go under the name */
@container lumo (max-width: 279.98px) {
  .proj-head {
    display: none;
  }
  .projs [role='list'] > .proj {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 'name name' 'n at';
    row-gap: 2px;
    padding: 5px 0;
  }
  .projs [role='list'] > .proj .proj-name {
    grid-area: name;
  }
  .projs [role='list'] > .proj .proj-n {
    grid-area: n;
    text-align: left;
    padding-left: 22px;
    color: var(--muted-foreground);
  }
  .projs [role='list'] > .proj .proj-at {
    grid-area: at;
  }
}

.proj-unit {
  display: none;
}
@container lumo (max-width: 279.98px) {
  .proj-unit {
    display: inline;
  }
}

/* --- the first-run card */
.intro-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0 12px;
  list-style: none;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted-foreground);
}
.intro-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 8px;
}
.intro-row b {
  font-weight: 600;
  color: var(--foreground);
}
.intro-ic {
  margin-top: 2px;
  color: var(--primary);
}
.intro-ok.ui-btn {
  margin: 10px 12px 12px;
}
.intro-tour.ui-btn {
  margin: 10px 0 12px 12px;
}
.intro-tour + .intro-ok.ui-btn {
  margin-left: 6px;
}

/* --- accounts: compact and full views. The chevron points up while the cards are full (fold them)
   and turns down once they are compact; the big gauges fold away and two small ones slide in. */
.acc-head-side {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.acc-fold-btn.ui-btn--icon {
  width: 22px;
  height: 22px;
  margin-right: -4px;
  color: var(--muted-foreground);
}
.acc-fold-btn.ui-btn--icon:hover {
  color: var(--foreground);
}
.acc-fold-btn .ui-icon {
  transition: transform 0.22s ease;
}
.acc-fold-btn[aria-expanded='true'] .ui-icon {
  transform: rotate(180deg);
}
.acc-fold {
  display: grid;
  grid-column: 1 / -1;
  grid-template-rows: 1fr;
  opacity: 1;
  transition:
    grid-template-rows 0.24s ease,
    opacity 0.18s ease;
}
.acc-fold-in {
  min-height: 0;
  overflow: hidden;
}
.acc-meta {
  max-height: 2.6em;
  overflow: hidden;
  transition:
    max-height 0.24s ease,
    opacity 0.18s ease;
}
.acc-hit {
  transition:
    background-color 0.12s,
    padding 0.24s ease;
}
.acc-hit > .av {
  transition:
    width 0.24s ease,
    height 0.24s ease;
}
.acc-mini {
  display: grid;
  grid-template-columns: auto 40px 3ch;
  align-items: center;
  gap: 2px 6px;
  max-width: 0;
  margin-left: auto;
  overflow: hidden;
  opacity: 0;
  font-size: 10.5px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  transition:
    max-width 0.24s ease,
    opacity 0.18s ease;
}
.mb-label {
  color: var(--muted-foreground);
}
.mb-track {
  position: relative;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--muted);
}
.mb-track.is-reset {
  background: transparent;
  outline: 1px dashed color-mix(in srgb, var(--success) 60%, transparent);
  outline-offset: -1px;
}
.mb-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
}
.mb-num {
  font-weight: 600;
  text-align: right;
  color: var(--foreground);
}
.mb-num.is-muted {
  font-weight: 400;
  color: var(--muted-foreground);
}

.accs.is-compact {
  gap: 6px;
}
.accs.is-compact .acc-hit {
  padding-block: 8px;
}
.accs.is-compact .acc-hit > .av {
  width: 28px;
  height: 28px;
}
.accs.is-compact .acc-hit {
  grid-template-columns: 28px minmax(0, 1fr);
}
.accs.is-compact .acc-fold {
  grid-template-rows: 0fr;
  opacity: 0;
}
.accs.is-compact .acc-meta {
  max-height: 0;
  opacity: 0;
}
.accs.is-compact .acc-mini {
  max-width: 120px;
  opacity: 1;
}
.accs.is-compact .acc-chip,
.accs.is-compact .acc-emblem {
  display: none;
}
.accs.is-compact .acc-side {
  top: 50%;
  transform: translateY(-50%);
}
.accs.is-compact .acc-name {
  flex-wrap: nowrap;
}
.accs.is-compact .acc .confirm,
.accs.is-compact .acc .profile {
  border-top: 1px solid var(--border);
}
@media (prefers-reduced-motion: reduce) {
  .acc-fold,
  .acc-meta,
  .acc-mini,
  .acc-hit,
  .acc-hit > .av,
  .acc-fold-btn .ui-icon {
    transition: none;
  }
}

/* --- the first-run tour: a light around one part of the sidebar and a card beside it */
.tour {
  position: fixed;
  inset: 0;
  z-index: 60;
}
.tour-block {
  position: fixed;
  inset: 0;
}
.tour-shade {
  position: fixed;
  border-radius: calc(var(--radius) + 3px);
  box-shadow:
    0 0 0 2px var(--ring),
    0 0 0 9999px color-mix(in srgb, var(--background) 30%, rgb(0 0 0 / 0.62));
  pointer-events: none;
  transition:
    left 0.24s ease,
    top 0.24s ease,
    width 0.24s ease,
    height 0.24s ease;
}
.tour-shade.is-full {
  inset: 0;
  border-radius: 0;
  box-shadow: inset 0 0 0 9999px color-mix(in srgb, var(--background) 30%, rgb(0 0 0 / 0.62));
}
.tour-pop {
  position: fixed;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 12px 10px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  background: var(--popover, var(--card));
  color: var(--popover-foreground, var(--foreground));
  box-shadow: var(--shadow-md);
  transition:
    left 0.24s ease,
    top 0.24s ease;
}
.tour-pop:focus,
.tour-pop:focus-visible {
  outline: none;
}
.tour-arrow {
  position: absolute;
  left: calc(var(--arrow-x, 50%) - 6px);
  width: 12px;
  height: 12px;
  border: 1px solid var(--border);
  background: inherit;
  transform: rotate(45deg);
}
.tour-pop[data-side='below'] .tour-arrow {
  top: -7px;
  border-right: 0;
  border-bottom: 0;
}
.tour-pop[data-side='above'] .tour-arrow {
  bottom: -7px;
  border-top: 0;
  border-left: 0;
}
.tour-pop[data-side='none'] .tour-arrow {
  display: none;
}
.tour-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -2px -4px -2px 0;
}
.tour-count {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.tour-x.ui-btn--icon {
  width: 22px;
  height: 22px;
  color: var(--muted-foreground);
}
.tour-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  text-wrap: balance;
}
.tour-text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted-foreground);
}
.tour-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.tour-dots {
  display: inline-flex;
  flex: 1;
  gap: 4px;
}
.tour-dots i {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--input);
}
.tour-dots i.is-done {
  background: color-mix(in srgb, var(--foreground) 45%, transparent);
}
.tour-dots i.is-on {
  width: 14px;
  background: var(--foreground);
}
.intro-tour {
  gap: 6px;
}
@media (prefers-reduced-motion: reduce) {
  .tour-shade,
  .tour-pop {
    transition: none;
  }
}
@media (forced-colors: active) {
  .tour-shade {
    outline: 2px solid Highlight;
  }
}
