/* The console shell (shared/ui/shell/*.tsx): ShellFrame (the shadcn
   "sidebar-07" layout), Sidebar, the content header, GlobalBanner,
   OverviewGrid/OverviewCard, GetStartedPanel, FilterRail/Catalog, TweaksPanel.

   Every colour, radius, font and space is a token from shared/ui/tokens.css;
   nothing here names a colour, so one stylesheet serves light and dark. Class
   prefix: cc-. Import once per console from its main.tsx, after primitives.css. */

/* ── Frame: sidebar | (banner, header, page) ───────────────────────── */
.cc-shell {
  /* The shared assist dock pads <body> by --assist-footer-h; stay above it. */
  display: flex; flex-direction: row; align-items: stretch; width: 100%;
  height: calc(100dvh - var(--assist-footer-h, 0px)); min-height: 0;
  overflow: hidden; position: relative;
  font-family: var(--font-sans); color: var(--fg); background: var(--bg);
}
.cc-shell__col { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; min-height: 0; }
.cc-shell__main {
  position: relative; display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; min-height: 0;
  overflow: hidden;
}
.cc-shell__main--scroll { overflow: auto; }

/* ── Content header ────────────────────────────────────────────────── */
.cc-shell__header {
  display: flex; flex: 0 0 auto; align-items: center; gap: var(--space-2);
  height: var(--topbar-h); min-width: 0; padding: 0 var(--space-3) 0 var(--space-2);
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.cc-shell__toggle { flex: 0 0 auto; }
.cc-shell__sep { flex: 0 0 auto; width: 1px; height: 16px; background: var(--border); }
.cc-crumbs { min-width: 0; flex: 1 1 auto; }
.cc-crumbs ol { display: flex; align-items: center; gap: var(--space-1); min-width: 0; margin: 0; padding: 0; list-style: none; }
.cc-crumbs li { display: inline-flex; align-items: center; gap: var(--space-1); min-width: 0; font-size: var(--text-sm); color: var(--fg-muted); white-space: nowrap; }
.cc-crumbs li > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.cc-crumbs li:last-child { color: var(--fg); font-weight: 500; }
.cc-crumbs__sep { display: inline-flex; color: var(--fg-subtle); }
.cc-shell__actions { display: flex; flex: 0 1 auto; align-items: center; justify-content: flex-end; gap: var(--space-2); min-width: 0; margin-left: auto; }
.cc-shell__actions .cc-tag { height: 20px; }
@media (max-width: 767px) {
  .cc-crumbs__org { display: none !important; }
  .cc-crumbs__org + li .cc-crumbs__sep { display: none; }
}

/* ── Global banner strip (above the content header) ────────────────── */
.cc-banner-strip { display: flex; flex: 0 0 auto; flex-direction: column; }
.cc-banner-strip .cc-banner {
  border-radius: 0; border-left-width: 0; border-top: 0; border-right: 0;
  padding: var(--space-2) var(--space-4);
  background: var(--bg-elevated);
}
.cc-banner-strip .cc-banner--info   { background: var(--info-soft); }
.cc-banner-strip .cc-banner--warn   { background: var(--warn-soft); }
.cc-banner-strip .cc-banner--danger { background: var(--danger-soft); }
.cc-banner-strip .cc-banner--ok     { background: var(--ok-soft); }

/* ── Rail ──────────────────────────────────────────────────────────── */
.cc-rail {
  display: flex; flex: 0 0 auto; flex-direction: column; width: var(--rail-w); min-height: 0;
  background: var(--rail-bg); border-right: 1px solid var(--border); overflow: hidden;
  transition: width .15s ease;
}
.cc-rail.is-collapsed { width: var(--rail-w-collapsed); }
.cc-rail__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: var(--space-2) var(--space-2) var(--space-3); }
.cc-rail__group { display: flex; flex-direction: column; gap: 1px; padding-top: var(--space-2); }
.cc-rail__group:first-child { padding-top: 0; }
.cc-rail__label {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-1); width: 100%;
  padding: var(--space-2) var(--space-2) var(--space-1);
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 500; letter-spacing: var(--tracking-caps); text-transform: uppercase;
  color: var(--fg-subtle); background: none; border: 0; border-radius: var(--radius-sm); text-align: left; cursor: default;
}
button.cc-rail__label { cursor: pointer; }
button.cc-rail__label:hover { color: var(--fg-muted); }
button.cc-rail__label:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ring); }
.cc-rail__caret { display: inline-flex; flex: 0 0 auto; transition: transform .15s; }
.cc-rail__label.is-open .cc-rail__caret { transform: rotate(90deg); }
.cc-rail__item {
  position: relative; display: flex; align-items: center; gap: var(--space-2); width: 100%; height: 32px; padding: 0 var(--space-2);
  font: inherit; font-size: var(--text-sm); color: var(--fg-muted);
  background: transparent; border: 0; border-radius: var(--radius-sm); text-decoration: none; text-align: left;
  white-space: nowrap; cursor: pointer;
}
.cc-rail__item:hover { color: var(--fg); background: var(--bg-sunken); }
.cc-rail__item:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ring); }
.cc-rail__item.is-active { color: var(--fg); font-weight: 500; background: var(--accent-soft); }
.cc-rail__item.is-active::before {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: 1px; background: var(--accent);
}
.cc-rail__item.is-indent { padding-left: calc(var(--space-2) + 20px); }
.cc-rail__item:disabled, .cc-rail__item[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.cc-rail__icon { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 16px; height: 16px; color: var(--fg-subtle); }
.cc-rail__icon > svg { width: 16px; height: 16px; }
.cc-rail__item.is-active .cc-rail__icon { color: var(--accent); }
.cc-rail__text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cc-rail__badge {
  flex: 0 0 auto; padding: 0 5px; line-height: 16px;
  font-family: var(--font-mono); font-size: calc(var(--text-xs) - 1px); font-variant-numeric: tabular-nums;
  color: var(--fg-subtle); background: var(--bg-sunken); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.cc-rail__dot { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cc-rail__extra { display: flex; flex-direction: column; gap: 1px; }
.cc-rail__foot-note { padding: var(--space-1) var(--space-2) 0; font-size: var(--text-xs); line-height: var(--leading-normal); color: var(--fg-subtle); }
.cc-rail.is-collapsed .cc-rail__label,
.cc-rail.is-collapsed .cc-rail__text,
.cc-rail.is-collapsed .cc-rail__badge,
.cc-rail.is-collapsed .cc-rail__dot,
.cc-rail.is-collapsed .cc-rail__extra,
.cc-rail.is-collapsed .cc-rail__foot-note { display: none; }
.cc-rail.is-collapsed .cc-rail__scroll { padding-left: var(--space-1); padding-right: var(--space-1); }
.cc-rail.is-collapsed .cc-rail__item { justify-content: center; width: 40px; padding: 0; margin: 0 auto; }
.cc-rail.is-collapsed .cc-rail__item.is-indent { padding-left: 0; }

/* Beta: a quiet outlined label, not an accent fill (the Apps flyout, the brand line). */
.cc-apps__beta {
  flex: 0 0 auto;
  padding: 0 5px; line-height: 16px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: var(--tracking-caps); text-transform: uppercase;
  color: var(--fg-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.cc-menu__item.is-current .cc-apps__beta { color: var(--fg-muted); border-color: var(--border-strong); }

/* ── Sidebar (sidebar.tsx): header, nav, footer ────────────────────── */
.cc-sb { position: relative; z-index: 2; }
.cc-sb__header { display: flex; flex: 0 0 auto; flex-direction: column; gap: var(--space-1); padding: var(--space-2); }
.cc-sb__org, .cc-sb__user {
  display: flex; align-items: center; gap: var(--space-2); width: 100%; min-height: 48px; padding: var(--space-2);
  font: inherit; color: var(--fg); text-align: left; text-decoration: none;
  background: transparent; border: 0; border-radius: var(--radius-md); cursor: pointer;
}
.cc-sb__org:hover, .cc-sb__user:hover, .cc-sb__org[aria-expanded="true"], .cc-sb__user[aria-expanded="true"] { background: var(--bg-sunken); }
.cc-sb__org:focus-visible, .cc-sb__user:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ring); }
.cc-sb__org.is-static { cursor: default; }
.cc-sb__org.is-static:hover { background: transparent; }
.cc-sb__tile {
  display: grid; place-items: center; flex: 0 0 auto; overflow: hidden;
  font-size: var(--text-sm); font-weight: 600; color: var(--accent-fg); background: var(--accent); border-radius: var(--radius-sm);
}
.cc-sb__tile > img { width: 100%; height: 100%; object-fit: cover; }
.cc-menu .cc-sb__tile { font-size: var(--text-xs); }
.cc-sb__mark {
  display: grid; place-items: center; flex: 0 0 auto; overflow: hidden;
  color: var(--topbar-fg); background: var(--topbar-bg); border-radius: var(--radius-sm);
}
.cc-sb__mark > img { display: block; object-fit: contain; }
.cc-sb__org-text { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; line-height: var(--leading-tight); }
.cc-sb__org-name { overflow: hidden; font-size: var(--text-sm); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.cc-sb__org-sub {
  display: flex; align-items: center; gap: var(--space-1); overflow: hidden;
  font-size: var(--text-xs); color: var(--fg-muted); text-overflow: ellipsis; white-space: nowrap;
}
.cc-sb__chev { display: inline-flex; flex: 0 0 auto; margin-left: auto; color: var(--fg-subtle); }
.cc-sb__brand {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; padding: 2px var(--space-2) var(--space-1);
  font-size: var(--text-xs); color: var(--fg-muted); text-decoration: none; border-radius: var(--radius-sm);
}
.cc-sb__brand:hover { color: var(--fg); }
.cc-sb__brand:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ring); }
.cc-sb__brand-name { font-family: var(--font-brand, var(--font-sans)); font-weight: 600; white-space: nowrap; }
.cc-sb__brand-sep { color: var(--fg-subtle); }
/* The product name shows whole ("Afterburner"); the line wraps before it cuts. */
.cc-sb__brand-product { white-space: nowrap; }
/* The org row and the collapse button beside it. */
.cc-sb__head-row { display: flex; align-items: center; gap: var(--space-1); min-width: 0; }
.cc-sb__head-row > :first-child { flex: 1 1 auto; min-width: 0; }
.cc-sb__toggle { flex: 0 0 auto; color: var(--fg-subtle); }
.cc-sb__toggle:hover { color: var(--fg); }
.cc-sb.is-collapsed .cc-sb__head-row > :first-child { flex: 0 0 auto; }
.cc-sb.is-collapsed .cc-sb__toggle { margin-bottom: var(--space-1); }
/* Workspace switcher under the org row: one segmented control, full width. */
.cc-sb__workspaces { flex: 0 0 auto; padding: 0 var(--space-2) var(--space-2); }
.cc-sb__workspaces .cc-tabs { display: flex; width: 100%; }
.cc-sb__workspaces .cc-tab { flex: 1 1 0; min-width: 0; justify-content: center; text-align: center; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-sb__extra { flex: 0 0 auto; padding: var(--space-1) var(--space-2); border-top: 1px solid var(--border); }
.cc-sb__footer { display: flex; flex: 0 0 auto; flex-direction: column; gap: 1px; padding: var(--space-2); border-top: 1px solid var(--border); }
.cc-sb__row .cc-sb__trail { display: inline-flex; flex: 0 0 auto; margin-left: auto; color: var(--fg-subtle); }
.cc-sb__row[aria-expanded="true"] { color: var(--fg); background: var(--bg-sunken); }
.cc-sb__slot { display: block; }
.cc-sb__slot:empty { display: none; }
.cc-sb__user { margin-top: var(--space-1); }
.cc-sb__avatar {
  display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px;
  font-size: var(--text-xs); font-weight: 600; color: var(--fg); background: var(--bg-sunken);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.cc-sb__menu-head { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2); }
.cc-sb__swatches { display: flex; flex-wrap: wrap; gap: 6px; padding: var(--space-1) var(--space-2) var(--space-2); }
.cc-sb__swatches .cc-tweaks__swatch { width: 20px; height: 20px; }
/* The user menu holds the theme; the floating gear is for consoles without the sidebar. */
body:has(.cc-sb) .cc-tweaks-fab { display: none; }

/* Icons only. */
.cc-sb.is-collapsed .cc-sb__header { align-items: center; padding: var(--space-2) var(--space-1); }
.cc-sb.is-collapsed .cc-sb__org, .cc-sb.is-collapsed .cc-sb__user { justify-content: center; width: 48px; padding: var(--space-2) 0; }
.cc-sb.is-collapsed .cc-sb__org-text, .cc-sb.is-collapsed .cc-sb__chev,
.cc-sb.is-collapsed .cc-sb__trail, .cc-sb.is-collapsed .cc-sb__extra { display: none; }
.cc-sb.is-collapsed .cc-sb__footer { align-items: center; padding-left: var(--space-1); padding-right: var(--space-1); }
.cc-sb.is-collapsed .cc-sb__footer .cc-rail__item { justify-content: center; width: 40px; padding: 0; }

/* Phone width: an off-canvas sheet the content header opens. */
.cc-sb.is-sheet {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 880;
  width: min(288px, 88vw); height: 100dvh;
  transform: translateX(-105%); transition: transform .18s ease-out;
  box-shadow: none;
}
.cc-sb.is-sheet.is-open { transform: none; box-shadow: var(--shadow-md); }
.cc-sb-backdrop { position: fixed; inset: 0; z-index: 870; background: var(--bg-overlay); animation: cc-fade-in .15s ease-out; }

/* ── Overview grid ─────────────────────────────────────────────────── */
.cc-ovsection { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.cc-ovsection__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.cc-ovsection__title {
  margin: 0; font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 500;
  letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--fg-muted);
}
.cc-ovsection__aside { font-size: var(--text-xs); color: var(--fg-subtle); }
.cc-ovgrid { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(var(--cc-ovcard-min, 240px), 1fr)); }
.cc-ovgrid--dense { --cc-ovcard-min: 180px; }
.cc-ovcard {
  position: relative; display: flex; flex-direction: column; gap: var(--space-2); min-width: 0;
  padding: var(--space-4); color: var(--fg); background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--radius-md);
}
.cc-ovcard.is-locked { color: var(--fg-muted); }
.cc-ovcard.is-locked .cc-ovcard__icon { color: var(--fg-subtle); background: var(--bg-sunken); }
.cc-ovcard--link { cursor: pointer; text-decoration: none; }
.cc-ovcard--link:hover { border-color: var(--border-strong); }
.cc-ovcard--link:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.cc-ovcard__head { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.cc-ovcard__icon {
  display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px;
  color: var(--accent); background: var(--accent-soft); border-radius: var(--radius-sm);
}
.cc-ovcard__icon > svg { width: 16px; height: 16px; }
.cc-ovcard__title { margin: 0; flex: 1 1 auto; min-width: 0; font-size: var(--text-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-ovcard__tags { display: inline-flex; flex: 0 0 auto; gap: var(--space-1); }
.cc-ovcard__value { font-size: var(--text-2xl); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cc-ovcard__value .cc-ovcard__unit { margin-left: 4px; font-size: var(--text-sm); font-weight: 500; letter-spacing: 0; color: var(--fg-muted); }
.cc-ovcard--ok .cc-ovcard__value { color: var(--ok); }
.cc-ovcard--warn .cc-ovcard__value { color: var(--warn); }
.cc-ovcard--danger .cc-ovcard__value { color: var(--danger); }
.cc-ovcard.is-empty .cc-ovcard__value { color: var(--fg-subtle); }
.cc-ovcard__body {
  font-size: var(--text-sm); line-height: var(--leading-normal); color: var(--fg-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cc-ovcard__extra { min-width: 0; }
.cc-ovcard__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-top: auto; padding-top: var(--space-1); }
.cc-ovcard__meta { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--fg-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-ovcard__action { display: inline-flex; flex: 0 0 auto; margin-left: auto; }

/* ── Get started panel ─────────────────────────────────────────────── */
.cc-getstarted {
  background: var(--bg-elevated); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg);
}
.cc-getstarted .cc-empty__icon { color: var(--accent); background: var(--accent-soft); border-color: transparent; }

/* ── Catalog + filter rail ─────────────────────────────────────────── */
.cc-catalog { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--space-4); align-items: start; min-width: 0; }
.cc-catalog--no-rail { grid-template-columns: minmax(0, 1fr); }
.cc-catalog__rail { position: sticky; top: 0; display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.cc-catalog__main { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.cc-catalog__toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.cc-catalog__search { flex: 1 1 220px; max-width: 360px; }
.cc-catalog__count { font-family: var(--font-mono); font-size: var(--text-xs); font-variant-numeric: tabular-nums; color: var(--fg-subtle); white-space: nowrap; }
.cc-catalog__tools { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
.cc-catalog__items--grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(var(--cc-catalog-min, 240px), 1fr)); }
.cc-catalog__items--list { display: flex; flex-direction: column; gap: var(--space-2); }
.cc-catalog__detail { min-width: 0; }
@media (max-width: 900px) {
  .cc-catalog { grid-template-columns: minmax(0, 1fr); }
  .cc-catalog__rail { position: static; }
}
.cc-filter-rail { display: flex; flex-direction: column; gap: var(--space-4); }
.cc-filter-rail__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.cc-filter-group { display: flex; flex-direction: column; gap: var(--space-2); }
.cc-filter-group__label {
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 500; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--fg-muted);
}
.cc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-chip {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px;
  font: inherit; font-size: var(--text-xs); font-weight: 500; white-space: nowrap;
  color: var(--fg-muted); background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-full);
  cursor: pointer; transition: background-color .12s, border-color .12s, color .12s;
}
.cc-chip:hover:not(:disabled) { color: var(--fg); border-color: var(--border-strong); }
.cc-chip:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ring); }
.cc-chip.is-on { color: var(--fg); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.cc-chip:disabled { opacity: .5; cursor: not-allowed; }
.cc-chip__count { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--fg-subtle); }
.cc-chip.is-on .cc-chip__count { color: var(--fg-muted); }

/* ── Tweaks panel ──────────────────────────────────────────────────── */
.cc-tweaks-fab {
  position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: 2147483645;
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  color: var(--fg-muted); background: var(--bg-elevated); border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); cursor: pointer;
}
.cc-tweaks-fab:hover { color: var(--fg); }
.cc-tweaks-fab:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring), var(--shadow-md); }
.cc-tweaks {
  position: fixed; right: var(--space-4); bottom: calc(var(--space-4) + 44px); z-index: 2147483646;
  display: flex; flex-direction: column; width: 280px; max-height: calc(100dvh - 80px);
  color: var(--fg); background: var(--bg-elevated); border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); overflow: hidden; animation: cc-pop-in .15s ease-out;
}
.cc-tweaks__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-3) var(--space-3) var(--space-2) var(--space-4); }
.cc-tweaks__title { margin: 0; font-size: var(--text-sm); font-weight: 600; }
.cc-tweaks__body { display: flex; flex-direction: column; gap: var(--space-3); min-height: 0; padding: 0 var(--space-4) var(--space-4); overflow-y: auto; }
.cc-tweaks__section {
  padding-top: var(--space-2); font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--fg-subtle);
}
.cc-tweaks__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); font-size: var(--text-sm); }
.cc-tweaks__swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-tweaks__swatch {
  width: 24px; height: 24px; padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--cc-swatch, var(--accent)); cursor: pointer;
}
.cc-tweaks__swatch--none { background: var(--bg-sunken); display: grid; place-items: center; color: var(--fg-muted); }
.cc-tweaks__swatch.is-on { box-shadow: 0 0 0 2px var(--bg-elevated), 0 0 0 4px var(--fg); }
.cc-tweaks__swatch:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg-elevated), 0 0 0 4px var(--ring); }
.cc-tweaks__slider { display: flex; align-items: center; gap: var(--space-2); }
.cc-tweaks__slider input[type="range"] { flex: 1 1 auto; accent-color: var(--accent); min-width: 0; }
.cc-tweaks__slider output { min-width: 36px; text-align: right; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--fg-muted); }

@media (prefers-reduced-motion: reduce) {
  .cc-rail, .cc-rail__caret, .cc-chip, .cc-tweaks, .cc-sb.is-sheet, .cc-sb-backdrop { transition: none; animation: none; }
}
