/* ============================================================
   COMPONENTS — KPI · Card · TaskRow · Pill · Kanban · Drawer · Palette
   ============================================================ */

/* ── KPICard (§6.1) ── */
.kpi {
  min-width: 200px;
  height: 112px;
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-8);
  display: flex; flex-direction: column;
  gap: var(--s-2);
  transition: background var(--t-fast);
}
.kpi:hover { background: var(--bg-soft); }
.kpi-label { font-size: var(--t-xs); line-height: var(--lh-xs); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.kpi-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-2); }
.kpi-value { font-size: var(--t-display); line-height: var(--lh-display); font-weight: 700; letter-spacing: -0.01em; color: var(--text-primary); }
.kpi-delta {
  font-size: var(--t-xs); font-weight: 500;
  padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--status-on-track-bg); color: var(--status-on-track-fg);
}
.kpi-delta.neg { background: var(--status-off-track-bg); color: var(--status-off-track-fg); }
.kpi-sub { font-size: var(--t-sm); color: var(--text-secondary); }

/* ── Project card (§6.2) ── */
.pcard {
  width: 100%;
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-8);
  display: flex; flex-direction: column; gap: var(--s-3);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.pcard:hover { border-color: var(--border-strong); box-shadow: 0 0 0 1px var(--border-soft), var(--shadow-sm); }
.pcard:focus-visible { box-shadow: var(--focus-ring); border-color: var(--border-medium); outline: none; }
.pcard:active { background: var(--bg-soft); }
.pcard[aria-selected="true"] { border-color: var(--asana-coral); box-shadow: var(--shadow-sm); }
.pcard-head { display: flex; align-items: center; gap: var(--s-2); }
.pcard-name { font-size: var(--t-lg); line-height: var(--lh-lg); font-weight: 600; color: var(--text-primary); }
.pcard-sub { font-size: var(--t-sm); color: var(--text-secondary); }
.pcard-pills { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.pcard-progress { height: 4px; background: var(--bg-soft); border-radius: var(--r-pill); overflow: hidden; }
.pcard-progress-fill { height: 100%; background: var(--asana-coral); border-radius: var(--r-pill); }
.pcard-metrics { display: flex; gap: var(--s-3); font-size: var(--t-sm); color: var(--text-secondary); }

/* ── TaskRow (§6.3) ── */
.task-row {
  display: flex; align-items: center; gap: var(--s-2);
  height: 36px; padding: 0 var(--s-3) 0 var(--s-2);
  border-bottom: 1px solid var(--border-faint);
  transition: background var(--t-fast);
}
.task-row:hover { background: var(--bg-hover); }
.task-row:focus-visible { box-shadow: var(--focus-ring) inset; outline: none; }
.task-row[aria-selected="true"] { background: var(--asana-coral-tint); border-left: 2px solid var(--asana-coral); padding-left: 6px; }
.task-cb {
  width: 18px; height: 18px;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--r-4);
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface);
  cursor: pointer;
}
.task-cb[data-checked="true"] {
  background: var(--asana-coral); border-color: var(--asana-coral);
  color: var(--on-coral);
}
.task-name { flex: 1; font-size: var(--t-base); color: var(--text-primary); }
.task-row[data-done="true"] .task-name { color: var(--text-muted); text-decoration: line-through; }
.task-meta { display: flex; align-items: center; gap: var(--s-2); flex-shrink: 0; }

/* ── Section (List view) ── */
.section-row {
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-2);
  font-size: var(--t-md); font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-soft);
}
.section-row .lucide { color: var(--text-secondary); }

/* ── Status pill variants (§6.4) — extend canonical .pill from base.css.
   Shape (height, padding, font) lives there; only color + dot live here. */
.pill[data-status] { border-color: transparent; }
.pill[data-status]::before {
  content: ""; width: 8px; height: 8px; border-radius: var(--r-pill);
  background: currentColor;
}
.pill[data-status="on-track"]  { background: var(--status-on-track-bg);  color: var(--status-on-track-fg); }
.pill[data-status="at-risk"]   { background: var(--status-at-risk-bg);   color: var(--status-at-risk-fg); }
.pill[data-status="off-track"] { background: var(--status-off-track-bg); color: var(--status-off-track-fg); }
.pill[data-status="complete"]  { background: var(--status-complete-bg);  color: var(--status-complete-fg); }
.pill[data-status="on-hold"]   { background: var(--status-on-hold-bg);   color: var(--status-on-hold-fg); }

/* Category pill — dot rendered as inline element (not ::before) so the
   canonical pill ::before stays available for status. */
.pill.cat { position: relative; padding-left: 18px; }
.pill.cat .pill-dot {
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: var(--r-pill);
  background: var(--cat-color, var(--text-muted));
}

/* ── Buttons (§6.8) ── */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  height: 32px; padding: 0 14px;
  font-size: var(--t-base); font-weight: 500;
  border-radius: var(--r-6);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}
.btn-primary { background: var(--asana-coral); color: var(--on-coral); }
.btn-primary:hover { background: var(--asana-coral-hover); }
.btn-primary:active { background: var(--asana-coral-press); }
.btn-secondary { background: var(--surface); border: 1px solid var(--border-medium); color: var(--text-primary); }
.btn-secondary:hover { background: var(--bg-soft); }
.btn-ghost { background: transparent; color: var(--text-primary); }
.btn-ghost:hover { background: var(--bg-hover); }
.btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; color: var(--text-secondary); }
.btn-icon:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Avatar (§6.9) ── */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-pill);
  background: var(--asana-coral);
  color: var(--on-coral); font-weight: 500;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}
.avatar.size-20 { width: 20px; height: 20px; font-size: var(--t-xs); letter-spacing: 0; text-transform: none; }
.avatar.size-24 { width: 24px; height: 24px; font-size: var(--t-sm); letter-spacing: 0; text-transform: none; }
.avatar.size-28 { width: 28px; height: 28px; font-size: var(--t-sm); letter-spacing: 0; text-transform: none; }
.avatar.size-32 { width: 32px; height: 32px; font-size: var(--t-base); letter-spacing: 0; text-transform: none; }
.avatar.size-40 { width: 40px; height: 40px; font-size: var(--t-md); font-weight: 600; letter-spacing: 0; text-transform: none; }
.avatar.size-80 { width: 80px; height: 80px; font-size: var(--t-3xl); letter-spacing: 0; text-transform: none; }

/* ── Kanban (§6.5) ── */
.kanban {
  display: grid; grid-auto-flow: column; grid-auto-columns: var(--kanban-col-w);
  gap: var(--s-4);
  padding: var(--s-2) 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.kcol { scroll-snap-align: start; }
.kcol {
  background: var(--bg-soft);
  border-radius: var(--r-8);
  padding: var(--s-3);
  display: flex; flex-direction: column; gap: var(--s-2);
  min-height: 200px;
}
.kcol-head { display: flex; align-items: center; gap: var(--s-2); padding: 0 var(--s-1) var(--s-2); }
.kcol-name { font-size: var(--t-sm); font-weight: 500; color: var(--text-primary); }
.kcol-count { font-size: var(--t-xs); color: var(--text-secondary); background: var(--bg-hover); padding: 0 6px; border-radius: var(--r-pill); }
.kcard {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-6);
  padding: var(--s-3);
  font-size: var(--t-base);
  color: var(--text-primary);
  transition: box-shadow var(--t-fast), border-color var(--t-fast);
}
.kcard:hover { box-shadow: 0 0 0 1px var(--border-soft), var(--shadow-sm); border-color: var(--border-strong); }
.kcard:focus-visible { box-shadow: var(--focus-ring); outline: none; }

/* ── DashboardWidget (§6.7) ── */
.widget {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-8);
  display: flex; flex-direction: column;
  min-height: 240px;
  overflow: hidden;
}
.widget-head {
  padding: var(--s-3) var(--s-4);
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--t-md); font-weight: 600;
  color: var(--text-primary);
}
.widget-body { flex: 1; padding: var(--s-3) var(--s-4); display: flex; flex-direction: column; min-height: 0; }
.widget-foot {
  padding: var(--s-3) var(--s-4);
  border-top: 1px solid var(--border-faint);
  font-size: var(--t-sm); color: var(--text-muted);
}
.widget-tile-value { font-size: var(--t-display); line-height: var(--lh-display); font-weight: 700; color: var(--text-primary); }
.widget-tile-sub { font-size: var(--t-sm); color: var(--text-secondary); margin-top: var(--s-1); }

/* ── Drawer (§6.10) ── */
.drawer-scrim {
  position: fixed; inset: 0;
  background: var(--scrim);
  z-index: 90;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-normal);
}
.drawer-scrim[data-open="true"] { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: var(--drawer-w); max-width: 100vw;
  background: var(--surface);
  border-left: 1px solid var(--border-soft);
  box-shadow: var(--shadow-pop);
  z-index: 100;
  transform: translateX(100%);
  transition: transform var(--t-normal);
  display: flex; flex-direction: column;
  overflow: hidden;
}
/* Reserve a compositor layer only during the slide animation, not at rest.
   Permanent will-change holds GPU memory for a closed drawer 99% of the
   time — wasteful. Apply only while opening/closing. */
.drawer[data-open="true"],
.drawer-scrim[data-open="true"] ~ .drawer { will-change: transform; }
.drawer[data-open="true"] { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--border-soft);
}
.drawer-body { flex: 1; overflow-y: auto; padding: var(--s-6); }
.drawer-spacer { flex: 1; }
.drawer-title-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 360px; }
@media (max-width: 1024px) { .drawer { width: 100vw; } }

/* ── Command Palette · inline dropdown attached to topbar search ──
   No modal · no scrim. The .palette element lives inside the .tb-search
   wrapper and absolutely positions below the input as a dropdown.
   Category color theme is wired via .pl-row[data-tint="*"] selectors. */

.palette {
  position: absolute;
  /* Tight 6px gap below the bar — bar and dropdown read as paired siblings */
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  width: 100%;
  max-height: min(560px, calc(100vh - 120px));
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-12);
  box-shadow: var(--shadow-overlay);
  z-index: 120;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.palette[data-open="true"] {
  display: flex;
  animation: pl-enter 140ms ease-out;
}
@keyframes pl-enter {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.palette-results {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Filter pills row — compact · category-coded · aligned to 16px master inset */
.pl-pills {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-faint);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-shrink: 0;
}
.pl-pills::-webkit-scrollbar { display: none; }

.pl-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-pill);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 80ms ease, border-color 80ms ease, color 80ms ease;
}
.pl-pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.pl-pill-icon svg {
  width: 14px;
  height: 14px;
  display: block;
}
.pl-pill:hover {
  background: var(--bg-hover);
  border-color: var(--border-medium);
}

/* Icon color — always tinted to its category, regardless of active state.
   Mirrors Asana's behaviour where Tasks (green), Projects (blue), People
   (purple), Portfolios (red) icons are always coloured. */
.pl-pill[data-tint="growth"]  .pl-pill-icon { color: var(--cat-growth);  }
.pl-pill[data-tint="product"] .pl-pill-icon { color: var(--cat-product); }
.pl-pill[data-tint="it-ai"]   .pl-pill-icon { color: var(--cat-it-ai);   }
.pl-pill[data-tint="brand"]   .pl-pill-icon { color: var(--cat-brand);   }
.pl-pill:not([data-tint])     .pl-pill-icon { color: var(--text-secondary); }

/* Active state — neutral fallback for "All" pill */
.pl-pill.is-active {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

/* Category-coded pills — soft tinted background when active */
.pl-pill[data-tint="growth"].is-active {
  background: var(--tint-growth);
  border-color: rgba(74,222,128,0.32);
  color: var(--cat-growth);
}
.pl-pill[data-tint="product"].is-active {
  background: var(--tint-product);
  border-color: rgba(91,141,239,0.32);
  color: var(--cat-product);
}
.pl-pill[data-tint="it-ai"].is-active {
  background: var(--tint-it-ai);
  border-color: rgba(231,111,81,0.32);
  color: var(--cat-it-ai);
}
.pl-pill[data-tint="brand"].is-active {
  background: var(--tint-brand);
  border-color: rgba(245,158,11,0.32);
  color: var(--cat-brand);
}

/* Body — scrollable inner area · 8px top cushion · no horizontal padding
   (children own their 16px inset via the master content grid) */
.pl-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 0 12px;
}

/* Section · children handle spacing · last section breathes below */
.pl-section {
  padding: 10px 0 4px;
}
.pl-section + .pl-section {
  border-top: 1px solid var(--border-faint);
}

.pl-section-head {
  padding: 8px 16px 6px;
  margin-bottom: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-eyebrow);
}

/* Chip row · aligned to 16px master inset */
.pl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 16px 8px;
}
/* Canonical pill — used by category filters AND contact-me action pills.
   ALL future pills in the search dropdown must use this same shape:
     · 26px height
     · 0 10px / 0 8px padding (slight left bias for icon weight)
     · 5px gap between icon and label
     · 14px icon (centered via flex)
     · 1px border, transparent at rest, tinted via [data-tint] / .is-active
   Both .pl-pill and .pl-chip share these exact dimensions. */
.pl-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-pill);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 80ms ease, border-color 80ms ease, color 80ms ease;
}
.pl-chip:hover { text-decoration: none; }
.pl-chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.pl-chip-icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

/* Category-coded chip theming — only the ICON is colored. Background and
   label stay neutral so .pl-chip mirrors the .pl-pill behavior exactly. */
.pl-chip[data-tint="growth"]  .pl-chip-icon { color: var(--cat-growth);  }
.pl-chip[data-tint="product"] .pl-chip-icon { color: var(--cat-product); }
.pl-chip[data-tint="it-ai"]   .pl-chip-icon { color: var(--cat-it-ai);   }
.pl-chip[data-tint="brand"]   .pl-chip-icon { color: var(--cat-brand);   }
.pl-chip[data-tint="digital"] .pl-chip-icon { color: var(--cat-digital); }
.pl-chip[data-tint="ux"]      .pl-chip-icon { color: var(--cat-ux);      }
.pl-chip:not([data-tint])     .pl-chip-icon { color: var(--text-secondary); }
/* Hover — subtle background bump, no tint flood */
.pl-chip:hover {
  background: var(--bg-hover);
  border-color: var(--border-medium);
}

/* Rows container */
.pl-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Result row — 3 columns: icon · main · ↵
   Flat rectangular hover; accent rail rendered by ::before pseudo-element
   so it can be precisely inset and vertically centered within the row. */
.pl-row {
  --pl-rail: var(--asana-coral);
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 16px;
  background: transparent;
  border: none;
  border-radius: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 80ms ease;
  position: relative;
}
.pl-row:hover,
.pl-row.is-selected {
  background: var(--bg-hover);
}
/* Accent rail — inset 5px from modal edge, vertically contained within row padding */
.pl-row:hover::before,
.pl-row.is-selected::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: var(--r-2);
  background: var(--pl-rail);
}
.pl-row:focus-visible { outline: none; }

/* Color-coded rail per project bucket — scoped via CSS custom property */
.pl-row[data-tint="growth"]  { --pl-rail: var(--cat-growth);  }
.pl-row[data-tint="product"] { --pl-rail: var(--cat-product); }
.pl-row[data-tint="it-ai"]   { --pl-rail: var(--cat-it-ai);   }
.pl-row[data-tint="brand"]   { --pl-rail: var(--cat-brand);   }
.pl-row[data-tint="digital"] { --pl-rail: var(--cat-digital); }
.pl-row[data-tint="ux"]      { --pl-rail: var(--cat-ux);      }

/* Live badge — subtle dot + small uppercase label · readable but quiet */
.pl-row-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--status-on-track-fg);
  white-space: nowrap;
  flex-shrink: 0;
  opacity: 0.92;
}
.pl-row-live::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: var(--r-pill);
  background: var(--status-on-track-fg);
  box-shadow: 0 0 0 2px rgba(74,222,128,0.18);
}

.pl-row-icon {
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-6);
  font-size: 13px;
  opacity: 0.9;
  transition: opacity 120ms ease;
  flex-shrink: 0;
}
.pl-row-icon svg {
  width: 14px;
  height: 14px;
  display: block;
}
.pl-row:hover .pl-row-icon,
.pl-row.is-selected .pl-row-icon { opacity: 1; }

.pl-row-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 3px;
}
.pl-row-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.pl-row-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 1 auto;
  min-width: 0;
  letter-spacing: -0.005em;
  line-height: 18px;
}
.pl-row-sub {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 15px;
}
.pl-row-key {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 120ms ease;
}
.pl-row:hover .pl-row-key,
.pl-row.is-selected .pl-row-key { opacity: 0.6; }

/* No-match state — tight padding, no cavernous empty space */
.pl-no-match {
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
}
.pl-no-match strong { color: var(--text-primary); font-weight: 600; }
.pl-no-match-hint { color: var(--text-muted); margin-top: var(--s-1); font-size: 12px; }
.pl-no-match em {
  font-style: normal;
  color: var(--text-link);
  cursor: pointer;
  padding: 0 2px;
}
.pl-no-match em:hover { text-decoration: underline; }

/* Mobile — full-screen sheet
   CRITICAL: must use position:fixed (not absolute) to escape the .tb-search
   wrapper which is only ~36px wide on mobile. Without this, the palette
   anchors absolute to the tiny wrapper and renders as a right-side panel. */
@media (max-width: 640px) {
  .palette {
    position: fixed;
    top: 0; left: 0; right: 0;
    transform: none;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: none;
    animation: none;
  }
  .palette-input,
  #palette-input { height: 60px; font-size: 16px; }   /* prevent iOS auto-zoom */
  .pl-row { padding: 14px 16px; min-height: 56px; }
  .pl-row-icon { width: 36px; height: 36px; font-size: 16px; }
  .pl-row-key { display: none; }
  .pl-chip { height: 32px; padding: 0 16px; }
}

/* ── Lucide icon sizing — locked 3-tier ramp ──
   Default (medium) is 16px. Two opt-in variants:
     .size-12 — inline chips, link badges, secondary affordances
     .size-20 — topbar / chrome buttons, primary controls
   Any other size is a violation. Keep the 1.5 stroke on .size-12 so the
   smaller glyph stays visually crisp against a 16px baseline. */
.lucide          { width: 16px; height: 16px; stroke-width: 1.75; flex-shrink: 0; }
.lucide.size-12  { width: 12px; height: 12px; stroke-width: 1.5;  }
.lucide.size-20  { width: 20px; height: 20px; stroke-width: 1.75; }

/* ── Skeleton loading ──
   Tokens (--skel-base / --skel-shine / --skel-border) live in tokens.css
   alongside the rest of the theme vocabulary, with light-theme overrides
   in the [data-theme="light"] block. */
@keyframes skel-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skel {
  display: block;
  border-radius: var(--r-6);
  background-color: var(--skel-base);
  background-image: linear-gradient(
    90deg,
    transparent 0%,
    var(--skel-shine) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  background-repeat: no-repeat;
  background-position: -200% 0;
  animation: skel-shimmer 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  will-change: background-position;
}
.skel-circle { border-radius: var(--r-pill); }
.skel-pill   { border-radius: var(--r-pill); }
.skel-card {
  border-radius: var(--r-12);
  border: 1px solid var(--skel-border);
  background-color: var(--skel-base);
  position: relative;
  overflow: hidden;
  /* No ::after shimmer — inner .skel bars carry the animation. Each card
     used to run two shimmer keyframes simultaneously (card + bars); now
     only one. Halves the animation count on the boot screen. */
}

/* Layout helpers */
.skel-row    { display: flex; gap: 12px; align-items: center; }
.skel-col    { display: flex; flex-direction: column; gap: 10px; }
.skel-grid   { display: grid; gap: 16px; }
.skel-spread { justify-content: space-between; }

/* Page-level skeleton shell — mirrors .h3-page geometry */
.skel-page {
  display: flex;
  flex-direction: column;
  gap: 80px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 32px 24px 48px;
}

@media (prefers-reduced-motion: reduce) {
  .skel,
  .skel-card::after {
    animation: none;
    background-image: none;
  }
}

@media (max-width: 640px) {
  .skel-page { gap: 56px; padding: 20px 16px 32px; }
}

/* Sidebar skeleton — disable hover/active so the placeholder feels inert */
.sb-item--skel,
.sb-item--skel:hover,
.sb-item--skel:focus,
.sb-item--skel:active {
  background: transparent !important;
  cursor: default;
  pointer-events: none;
}
.sb-heading--skel {
  padding-top: 4px;
  padding-bottom: 4px;
}
.app[data-sidebar="collapsed"] .sb-item--skel span:not(.skel-circle):not(.lucide) {
  display: none;
}
