/* =============================================================================
 *  spm-observability — visual redesign demo
 *  Design tokens copied verbatim from the storagetax marketing website so the
 *  product UI shares the same identity end-to-end.
 *
 *  Brand ramp:   #fbbf24 → #fb923c → #ef4444 → #ec4899  (yellow → orange → red → pink)
 *  Background:   #08070b → #06080d with amber top-left + pink bottom-right glows
 *  Live status:  emerald green #22c55e with a slow "I'm alive" pulse
 * ============================================================================ */

:root {
  --radius: 14px;

  /* Surfaces */
  --background:        #08070b;
  --background-bottom: #06080d;
  --bg-elev:           #14111a;
  --bg-soft:           #0e0c14;

  /* Ink */
  --foreground:  #ffffff;
  --ink-soft:    #cab8a8;
  --ink-mute:    #7a6b5c;

  /* Borders */
  --border:        rgba(255, 255, 255, 0.10);
  --border-soft:   rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.18);

  /* Brand ramp (poster) */
  --brand-1: #fbbf24;
  --brand-2: #fb923c;
  --brand-3: #ef4444;
  --brand-4: #ec4899;
  --primary: #fb923c;
  --primary-foreground: #1a0a05;

  --gradient-brand: linear-gradient(135deg,
    var(--brand-1) 0%, var(--brand-2) 35%, var(--brand-3) 70%, var(--brand-4) 100%);
  --gradient-brand-h: linear-gradient(90deg,
    var(--brand-1) 0%, var(--brand-2) 35%, var(--brand-3) 70%, var(--brand-4) 100%);
  --gradient-brand-rule: linear-gradient(90deg,
    rgba(239, 68, 68, 0)    0%,
    rgba(251, 146, 60, 0.8) 50%,
    rgba(236, 72, 153, 0)   100%);
  --gradient-orb: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-3) 100%);

  --brand-glow:      rgba(251, 146, 60, 0.45);
  --brand-glow-soft: rgba(251, 146, 60, 0.18);

  /* Live (heartbeat) */
  --live-green:      #22c55e;
  --live-green-soft: rgba(34, 197, 94, 0.18);
  --live-green-glow: rgba(34, 197, 94, 0.55);

  /* Shadows */
  --shadow-md: 0 10px 28px -10px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --shadow-lg: 0 30px 70px -22px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --shadow-glow: 0 30px 70px -24px var(--brand-glow);

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; border-color: var(--border); }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--background);
  background-image: linear-gradient(180deg, var(--background) 0%, var(--background-bottom) 100%);
  color: var(--foreground);
  min-height: 100vh;
}
::selection { background: rgba(251, 146, 60, 0.35); color: var(--foreground); }

/* =====  Page-wide ambient glow  ===== */
.bg-poster {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(55% 55% at 10% 5%,
      rgba(251, 191, 36, 0.20) 0%, rgba(251, 191, 36, 0) 60%),
    radial-gradient(55% 55% at 95% 95%,
      rgba(236, 72, 153, 0.20) 0%, rgba(236, 72, 153, 0) 65%);
}

/* =====  Keyframes  ===== */
@keyframes live-pulse {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%      { transform: scale(1.12); opacity: 0.92; }
}
@keyframes live-ring {
  0%   { transform: scale(1);   opacity: 0.55; }
  100% { transform: scale(2.4); opacity: 0; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 6px 18px -6px var(--brand-glow), 0 0 0 0 var(--brand-glow-soft); }
  50%      { box-shadow: 0 10px 28px -6px var(--brand-glow), 0 0 0 14px transparent; }
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* =====  Brand text utility  ===== */
.text-brand {
  background: var(--gradient-brand-h);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hr-brand {
  height: 1.5px; width: 100%;
  background: var(--gradient-brand-rule);
  border: 0;
}

/* =====  Logo  ===== */
.logo {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--gradient-orb);
  box-shadow: 0 6px 18px -6px var(--brand-glow), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  flex-shrink: 0;
}
.logo svg { width: 22px; height: 22px; }

/* =====  App shell — drawer + main  =====
 *  The sidebar is a hamburger-toggled DRAWER (overlay), not a pinned column.
 *  Closed by default — opens via .hamburger in the topbar, closes via
 *  .sidebar-close, backdrop click, or Escape.
 */

.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  /* 340px — wide enough that "STORAGE · PERFORMANCE · MONITORING" fits on
     a single line next to the logo, and the user-footer has room for the
     log-out button without crowding the avatar. */
  width: 340px;
  background: linear-gradient(180deg, rgba(10, 8, 14, 0.94) 0%, rgba(6, 8, 13, 0.94) 100%);
  backdrop-filter: blur(14px);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transform: translateX(-105%);
  transition: transform 0.34s var(--ease-out);
  will-change: transform;
}
.sidebar.open {
  transform: translateX(0);
  box-shadow: 24px 0 80px -24px rgba(0, 0, 0, 0.75);
}

.sidebar-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.34s var(--ease-out);
}
.sidebar-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-head {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.sidebar-head .brand-text {
  display: flex; flex-direction: column; line-height: 1;
  font-weight: 700; letter-spacing: -0.02em;
  min-width: 0;
}
.sidebar-head .brand-text .name { font-size: 1.05rem; }
.sidebar-head .brand-text .tag {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.55rem; font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
  /* Pin to one line — never wrap to a second row */
  white-space: nowrap;
}
.sidebar-close {
  margin-left: auto;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px;
  color: var(--ink-mute);
  cursor: pointer;
  display: inline-grid; place-items: center;
  transition: background 0.2s var(--ease-out), color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.sidebar-close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--foreground);
  border-color: var(--border);
}
.sidebar-close svg { width: 16px; height: 16px; }

.sidebar-section { padding: 16px 14px 6px; }
.sidebar-section-title {
  font-family: var(--font-mono);
  font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 6px 8px 8px;
}

.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out);
  cursor: pointer;
}
.sidebar-link:hover { background: rgba(255, 255, 255, 0.04); color: var(--foreground); }
.sidebar-link.active {
  background: rgba(251, 146, 60, 0.10);
  border: 1px solid rgba(251, 146, 60, 0.22);
  color: #fde9c8;
}
.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-link .count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-mute);
}
.sidebar-link .count.savings {
  /* Same full brand ramp as `.kpi-value.brand` / `.btn-primary` — so the
     chip reads as "this is the docs brand" rather than a generic amber. */
  background: linear-gradient(135deg,
    rgba(251,191,36,0.20),
    rgba(251,146,60,0.20) 40%,
    rgba(239,68,68,0.20)  70%,
    rgba(236,72,153,0.20));
  border: 1px solid rgba(251,146,60,0.35);
  color: #fde9c8;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.66rem;
  font-weight: 700;
}

.sidebar-vmlist { padding: 4px 14px 14px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sidebar-vmlist::-webkit-scrollbar { width: 4px; }
.sidebar-vmlist::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.sidebar-vmlist-skeleton { display: flex; flex-direction: column; gap: 2px; }
.sidebar-vmlist-skeleton .vm-item.skeleton {
  height: 46px; border-radius: 10px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  background-size: 200% 100%;
  animation: sidebar-skel 1.4s linear infinite;
}
.sidebar-vmlist-empty {
  padding: 22px 12px; font-size: 0.78rem; color: var(--ink-mute);
  font-family: var(--font-mono); text-align: center;
}
@keyframes sidebar-skel { from { background-position: 200% 0 } to { background-position: -200% 0 } }
.sidebar-vmlist .vm-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--ink-soft);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.sidebar-vmlist .vm-item:hover { background: rgba(255, 255, 255, 0.04); color: var(--foreground); }
.sidebar-vmlist .vm-item.active {
  background: rgba(251, 146, 60, 0.10);
  border: 1px solid rgba(251, 146, 60, 0.22);
  color: #fde9c8;
}
.sidebar-vmlist .vm-item-body { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.sidebar-vmlist .vm-item-name {
  font-size: 0.86rem; font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-vmlist .vm-item-meta {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--ink-mute);
}

.sidebar-foot {
  padding: 14px 16px;
  border-top: 1px solid var(--border-soft);
  display: flex; align-items: center; gap: 10px;
  font-size: 0.85rem;
}
.sidebar-foot-user {
  flex: 1; min-width: 0;
  line-height: 1.2;
}
.sidebar-foot-name {
  font-weight: 600; font-size: 0.86rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-foot-org {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--ink-mute);
}
.sidebar-logout {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 34px; height: 34px;
  display: inline-grid; place-items: center;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  flex-shrink: 0;
}
.sidebar-logout:hover {
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.32);
  color: #fecaca;
}
.sidebar-logout svg { width: 16px; height: 16px; }

/* =====  Hamburger (drawer trigger) — lives in the topbar  ===== */
.hamburger {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  color: var(--ink-soft);
  cursor: pointer;
  display: inline-grid; place-items: center;
  transition: background 0.2s var(--ease-out), color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.hamburger:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--foreground);
  border-color: var(--border-strong);
}
.hamburger svg { width: 18px; height: 18px; }
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--gradient-orb);
  display: grid; place-items: center;
  font-weight: 700;
  color: var(--primary-foreground);
  font-size: 0.78rem;
  flex-shrink: 0;
}

/* =====  Main area & topbar  =====
 *  Main always takes full viewport width. Drawer overlays it (does not push).
 */
.main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

.topbar {
  position: sticky; top: 0; z-index: 30;
  padding: 16px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  background: linear-gradient(180deg, rgba(8, 7, 11, 0.78) 0%, rgba(8, 7, 11, 0.55) 100%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.topbar-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.topbar .vm-name {
  font-size: 1.15rem; font-weight: 700;
  letter-spacing: -0.02em;
}
.topbar .vm-meta {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-mute);
  margin-top: 2px;
}
.topbar-right { display: flex; align-items: center; gap: 10px; }

/* =====  Tabs  ===== */
.tabs {
  display: flex; gap: 4px;
  padding: 8px 28px 0;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(8, 7, 11, 0.55) 0%, transparent 100%);
}
.tab {
  position: relative;
  padding: 10px 14px;
  font-size: 0.9rem; font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.tab:hover { color: var(--foreground); }
.tab.active {
  color: var(--foreground);
  border-bottom: 2px solid transparent;
}
.tab.active::after {
  content: ""; position: absolute;
  left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--gradient-brand-h);
}

/* =====  Page content  ===== */
.page {
  flex: 1;
  padding: 28px;
}
.page-title {
  font-size: 1.55rem; font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 6px;
}
.page-subtitle {
  font-size: 0.94rem;
  color: var(--ink-soft);
  margin: 0 0 22px;
}

/* =====  Component primitives  ===== */
.card {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s var(--ease-out), border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: 0 28px 50px -22px rgba(0,0,0,0.6), 0 0 0 1px rgba(251, 146, 60, 0.18);
}
.card-soft {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px;
}

.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(251, 146, 60, 0.10);
  border: 1px solid rgba(251, 146, 60, 0.24);
  color: #fde9c8;
  font-size: 0.78rem; font-weight: 500;
}
.dot-brand {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.20);
}

/* Live heartbeat (emerald green) */
.dot-live {
  position: relative;
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--live-green);
  box-shadow: 0 0 0 2px var(--live-green-soft), 0 0 12px var(--live-green-glow);
  animation: live-pulse 2.6s ease-in-out infinite;
  flex-shrink: 0;
}
.dot-live::before {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit;
  background: var(--live-green);
  animation: live-ring 2.6s ease-out infinite;
}
.chip-live {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(34, 197, 94, 0.10);
  border: 1px solid rgba(34, 197, 94, 0.30);
  color: #bbf7d0;
}
.chip-soon {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--ink-soft);
}
.dot-soon {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.7;
  box-shadow: 0 0 0 2px rgba(251, 146, 60, 0.16);
}

/* status pills */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.06em;
}
.pill-ok      { background: rgba(34, 197, 94, 0.14);  color: #bbf7d0; border: 1px solid rgba(34, 197, 94, 0.30); }
.pill-warn    { background: rgba(251, 146, 60, 0.16); color: #fde9c8; border: 1px solid rgba(251, 146, 60, 0.30); }
.pill-danger  { background: rgba(239, 68, 68, 0.16);  color: #fecaca; border: 1px solid rgba(239, 68, 68, 0.30); }
.pill-info    { background: rgba(255, 255, 255, 0.04); color: var(--ink-soft); border: 1px solid var(--border); }
.pill-magenta { background: rgba(236, 72, 153, 0.18); color: #ffd1e6; border: 1px solid rgba(236, 72, 153, 0.30); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 0;
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background .25s var(--ease-out),
              border-color .25s var(--ease-out), filter .25s var(--ease-out);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary {
  background: var(--gradient-brand);
  color: var(--primary-foreground);
  box-shadow: 0 8px 24px -10px var(--brand-glow), inset 0 1px 0 rgba(255,255,255,0.20);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-secondary {
  background: var(--bg-elev);
  color: var(--foreground);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: rgba(255,255,255,0.06); border-color: var(--border-strong); }
.btn-ghost {
  background: transparent; color: var(--ink-soft);
}
.btn-ghost:hover { color: var(--foreground); }
.btn-icon { padding: 8px; }

/* Form fields */
.field {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--foreground);
  font-size: 0.92rem;
}
.field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.22);
}

/* =====  KPI tile  ===== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.kpi {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  overflow: hidden;
}
.kpi-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.kpi-value {
  margin-top: 8px;
  font-size: 1.85rem; font-weight: 700;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.kpi-value.brand { background: var(--gradient-brand-h); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.kpi-meta {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.kpi-spark {
  position: absolute;
  right: -8px; bottom: -4px;
  width: 80px; height: 38px;
  opacity: 0.6;
}

/* =====  Table  ===== */
.tbl-wrap {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.tbl th {
  font-family: var(--font-mono);
  font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: 14px 18px;
  text-align: left;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}
.tbl td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--ink-soft);
}
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: rgba(255, 255, 255, 0.02); color: var(--foreground); }
.tbl .mono { font-family: var(--font-mono); font-size: 0.85rem; color: var(--foreground); }
.tbl .num { font-variant-numeric: tabular-nums; text-align: right; }

/* =====  Bars / charts helpers  ===== */
.bar {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
}
.bar-fill {
  position: absolute; inset: 0;
  background: var(--gradient-brand-h);
  border-radius: 999px;
  box-shadow: 0 0 12px -2px rgba(251, 146, 60, 0.5);
}
.bar-fill-soft {
  position: absolute; inset: 0;
  background: rgba(251, 146, 60, 0.22);
  border-radius: 999px;
}

.spark {
  width: 100%; height: 56px;
}

/* =====  Section header  ===== */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 26px 0 14px;
  gap: 12px;
}
.section-head h2 {
  margin: 0;
  font-size: 1.05rem; font-weight: 600;
  letter-spacing: -0.015em;
}

/* =====  Grid helpers  ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.col { display: flex; flex-direction: column; gap: 14px; }

/* Animated reveal */
.reveal { animation: fade-up .6s var(--ease-out) both; }

/* =====  Demo hub (index.html only)  ===== */
.demo-hub {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 32px;
}
.demo-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.35s var(--ease-out), border-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.demo-card:hover {
  transform: translateY(-3px);
  border-color: rgba(251, 146, 60, 0.28);
  box-shadow: 0 28px 50px -22px rgba(0,0,0,0.6), 0 0 0 1px rgba(251, 146, 60, 0.2);
}

/* Mobile (rough) — drawer pattern is identical across breakpoints; only
   trim the drawer width and collapse grids. */
@media (max-width: 880px) {
  .sidebar { width: 88%; max-width: 320px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .tabs { padding: 8px 16px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .page, .topbar { padding-left: 16px; padding-right: 16px; }
}

/* Page-level loading state shown while async fetch resolves. */
.loading-shell {
  padding: 40px;
  text-align: center;
  color: var(--ink-mute);
  font-family: var(--font-mono);
  font-size: 0.86rem;
}
