/* ============================================================
   ÁGORA — design tokens + glass utilities
   Forest-night palette · glassmorphism · responsive-first
   v2 — adds: safe-area-inset, dvh/svh, finer breakpoints,
   reduced-motion, hamburger menu support, refined focus states
   ============================================================ */

:root {
  /* ---------- core palette ---------- */
  --bg-deep: #0A1520;
  --bg-night: #1A2E42;

  --glass-base:   rgba(15, 30, 40, 0.55);
  --glass-light:  rgba(255, 255, 255, 0.08);
  --glass-strong: rgba(15, 30, 40, 0.72);
  --glass-border: rgba(255, 255, 255, 0.10);

  --accent-moon:      #F5E8C8;
  --accent-moon-glow: rgba(200, 216, 184, 0.30);
  --accent-forest:    #4A9A7A;
  --accent-emerald:   #6FBF8E;
  --accent-leaf:      #7FE3B5;

  --status-active:   #6FBF8E;
  --status-inactive: #F5C97B;
  --status-error:    #E85D75;

  --text-primary:   #F5F4EA;
  --text-secondary: #A8B5B0;
  --text-muted:     #6B7A75;

  --cta-white: #FFFFFF;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  /* Tweakable — overridden by tweaks.jsx */
  --glass-blur: 16px;
  --glass-alpha: 0.55;
  --accent-primary: var(--accent-emerald);
  --accent-primary-soft: rgba(111, 191, 142, 0.25);

  /* ---------- spacing rhythm ---------- */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;

  /* ---------- radii ---------- */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 100px;

  /* ---------- z-index ---------- */
  --z-bg:       0;
  --z-content:  5;
  --z-chrome:   20;
  --z-dropdown: 30;
  --z-nav:      40;
  --z-modal:    100;
  --z-tweaks:   1000;

  /* ---------- safe-area-inset (notched devices) ---------- */
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left:   env(safe-area-inset-left, 0px);
  --safe-right:  env(safe-area-inset-right, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  background: #050B12;
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 180ms cubic-bezier(.34, 1.56, .64, 1),
    box-shadow 220ms ease,
    background 220ms ease,
    color 180ms ease;
}
button:active { transform: scale(0.94); }
button:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

input, textarea, select {
  font-family: inherit;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 1px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   GLASS UTILITIES
   ============================================================ */

.glass-pill {
  position: relative;
  background: var(--glass-base);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 0.5px solid var(--glass-border);
  border-radius: var(--radius-pill);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

.glass-card {
  position: relative;
  background: var(--glass-base);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 0.5px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

.glass-strong {
  position: relative;
  background: var(--glass-strong);
  backdrop-filter: blur(calc(var(--glass-blur) * 1.4)) saturate(170%);
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) * 1.4)) saturate(170%);
  border: 0.5px solid var(--glass-border);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.20);
}

.glass-light {
  position: relative;
  background: var(--glass-light);
  backdrop-filter: blur(calc(var(--glass-blur) * 0.7)) saturate(160%);
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) * 0.7)) saturate(160%);
  border: 0.5px solid var(--glass-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

button.glass-pill::before,
button.glass-light::before,
button.glass-strong::before,
button.liquid::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.04) 40%,
    transparent 60%);
  pointer-events: none;
  opacity: 0.9;
  transition: opacity 180ms ease;
}
button.glass-pill:hover::before,
button.glass-light:hover::before,
button.glass-strong:hover::before,
button.liquid:hover::before { opacity: 1; }
button.glass-pill:active::before,
button.glass-light:active::before,
button.glass-strong:active::before,
button.liquid:active::before { opacity: 0.5; }

.liquid {
  position: relative;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

/* ============================================================
   STATUS DOTS
   ============================================================ */

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.status-dot.active   { background: var(--status-active);   box-shadow: 0 0 8px var(--status-active); }
.status-dot.inactive { background: var(--status-inactive); box-shadow: 0 0 6px rgba(245, 201, 123, 0.5); }
.status-dot.error    { background: var(--status-error);    box-shadow: 0 0 8px var(--status-error); }

/* ============================================================
   FOREST BACKGROUND
   ============================================================ */

.forest-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(180deg,
    #0A1520 0%,
    #1A2E42 30%,
    #1F3D3A 62%,
    #1A3A2E 100%);
  z-index: 0;
}
.forest-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.forest-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(5, 11, 18, 0) 0%,
    rgba(5, 11, 18, 0.15) 55%,
    rgba(5, 11, 18, 0.55) 100%);
  pointer-events: none;
}

/* ============================================================
   SCROLLBAR HIDDEN
   ============================================================ */

.noscroll::-webkit-scrollbar { display: none; }
.noscroll { scrollbar-width: none; }

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes breathe {
  0%, 100% { transform: scale(1);    opacity: 0.92; }
  50%      { transform: scale(1.03); opacity: 1; }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
@keyframes moon-glow {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.55; }
}
@keyframes slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@keyframes slide-down {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}
@keyframes slide-left {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
@keyframes slide-in-left {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes voice-fade-in {
  from { opacity: 0; backdrop-filter: blur(0px); }
  to   { opacity: 1; backdrop-filter: blur(10px); }
}
@keyframes slide-down-fade {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}
@keyframes typing-dot {
  0%, 60%, 100% { transform: translateY(0);    opacity: 0.3; }
  30%           { transform: translateY(-4px); opacity: 1; }
}
@keyframes liquid-pop {
  0%   { opacity: 0; transform: scale(0.7); }
  60%  { opacity: 1; transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   FAB ROBOT TAP FEEDBACK
   ============================================================ */

.fab-robot:active {
  transform: scale(0.88) !important;
  box-shadow:
    0 0 34px rgba(111, 191, 142, 0.75),
    0 4px 10px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

/* ============================================================
   AGENT EMOJI TOOLTIP
   ============================================================ */

.agent-emoji { position: relative; }
.agent-emoji::after {
  content: attr(data-name);
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(4px);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: rgba(20, 28, 35, 0.92);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--text-primary);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 180ms cubic-bezier(.34, 1.56, .64, 1);
  z-index: 50;
}
.agent-emoji:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ============================================================
   AVATAR PILL
   ============================================================ */

.avatar-pill {
  position: relative;
  background: rgba(245, 244, 234, 0.06);
  border: 1px solid rgba(245, 244, 234, 0.22);
  border-radius: var(--radius-pill);
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    0 0 60px rgba(127, 227, 181, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 0 40px rgba(245, 232, 200, 0.06);
}
.avatar-pill::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: radial-gradient(ellipse at 50% 35%,
    rgba(245, 232, 200, 0.15) 0%,
    transparent 60%);
  pointer-events: none;
}

.hairline {
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent);
}

/* ============================================================
   RESPONSIVE BREAKPOINTS (xs/sm/md/lg/xl)
   xs ≤ 479 · sm 480-767 · md 768-1023 · lg 1024-1439 · xl ≥1440
   ============================================================ */

.grid-1 { display: grid; grid-template-columns: 1fr;     gap: var(--space-4); }
.grid-2 { display: grid; grid-template-columns: 1fr;     gap: var(--space-4); }
.grid-3 { display: grid; grid-template-columns: 1fr;     gap: var(--space-4); }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}

.field-span-1 { grid-column: span 1; }
.field-span-2 { grid-column: span 1; }
.field-span-3 { grid-column: span 1; }
.field-span-4 { grid-column: span 1; }

@media (min-width: 640px) {
  .field-span-2 { grid-column: span 2; }
  .field-span-3 { grid-column: span 2; }
  .field-span-4 { grid-column: span 2; }
}
@media (min-width: 1024px) {
  .field-span-3 { grid-column: span 3; }
  .field-span-4 { grid-column: span 4; }
}

.hide-mobile { display: none !important; }
.show-mobile { display: flex; }
@media (min-width: 640px) {
  .hide-mobile { display: flex !important; }
  .show-mobile { display: none !important; }
}
@media (max-width: 1199px) {
  .hide-below-desktop { display: none !important; }
}

/* ============================================================
   PHONE BEZEL FILL ON MOBILE
   ============================================================ */

.device-mobile .phone-bezel {
  border-radius: 0 !important;
  box-shadow: none !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
}
.device-mobile .phone-bezel > .phone-inner {
  transform: none !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
}
.device-mobile .phone-dynamic-island,
.device-mobile .phone-status-bar { display: none !important; }
.device-mobile .app-stage {
  padding: 0 !important;
  min-height: 100dvh !important;
}

/* ============================================================
   PREFERENCES OVERLAY DRAWER
   ============================================================ */

.prefs-sidebar-drawer {
  position: absolute;
  top: 56px;
  bottom: 62px;
  left: 0;
  z-index: 50;
  width: 78vw !important;
  max-width: 320px;
  box-shadow: 8px 0 40px rgba(0, 0, 0, 0.5);
  animation: slide-in-left 220ms cubic-bezier(.2, .8, .2, 1);
}
.prefs-backdrop {
  position: absolute;
  top: 56px;
  bottom: 62px;
  left: 0;
  right: 0;
  background: rgba(5, 11, 18, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 40;
  animation: fade-in 160ms ease;
}

@media (max-width: 640px) {
  .prefs-footer-hint { display: none; }
  .prefs-content { padding: 18px 16px 30px !important; }
  .prefs-hero h2 { font-size: 20px !important; }
  .prefs-hero { gap: 12px !important; padding-bottom: 16px !important; margin-bottom: 16px !important; }
  .prefs-hero-icon { width: 42px !important; height: 42px !important; }
}

/* ============================================================
   CHAT MODAL TABLET+
   ============================================================ */

@media (min-width: 640px) {
  .chat-modal-window {
    width: min(520px, 92vw) !important;
    height: min(720px, 86vh) !important;
    inset: auto !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6) !important;
  }
  .chat-modal-scrim {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(5, 11, 18, 0.65) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }
}

.matrix-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.matrix-scroll::-webkit-scrollbar { height: 6px; }
.matrix-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

/* ============================================================
   HAMBURGER MENU (NEW · v2)
   Top-left navigation hub · home tab only
   ============================================================ */

.hamburger-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition:
    background 220ms ease,
    transform 180ms cubic-bezier(.34, 1.56, .64, 1);
}
.hamburger-btn:hover { background: rgba(255, 255, 255, 0.06); }

.hamburger-icon {
  width: 18px;
  height: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hamburger-icon span {
  display: block;
  width: 100%;
  height: 1.8px;
  background: currentColor;
  border-radius: 2px;
  transition:
    transform 240ms cubic-bezier(.34, 1.56, .64, 1),
    opacity 180ms ease,
    width 240ms ease;
}
.hamburger-icon span:nth-child(2) { width: 75%; }

.hamburger-btn.is-open .hamburger-icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.hamburger-btn.is-open .hamburger-icon span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}
.hamburger-btn.is-open .hamburger-icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.hamburger-panel {
  position: absolute;
  top: 104px;
  left: 14px;
  width: 180px;
  max-height: calc(100% - 200px);
  z-index: var(--z-dropdown);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slide-down-fade 240ms cubic-bezier(.2, .8, .2, 1);
}

.hamburger-section-label {
  padding: 12px 16px 6px;
  font-size: 9px;
  letter-spacing: 1.6px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.hamburger-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  text-align: left;
  color: var(--text-primary);
  border-radius: 0;
  font-size: 13px;
  font-weight: 500;
  position: relative;
  transition: background 160ms ease, padding 200ms ease;
}
.hamburger-item:hover {
  background: rgba(255, 255, 255, 0.04);
  padding-left: 20px;
}
.hamburger-item .icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(111, 191, 142, 0.10);
  color: var(--accent-primary);
  flex-shrink: 0;
}
.hamburger-item.danger .icon-wrap {
  background: rgba(232, 93, 117, 0.10);
  color: var(--status-error);
}
.hamburger-item.danger { color: var(--status-error); }
.hamburger-item-meta {
  font-size: 10px;
  color: var(--text-muted);
  margin-left: auto;
  letter-spacing: 0.3px;
}
.hamburger-divider {
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent);
  margin: 6px 0;
}
.hamburger-agent-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  text-align: left;
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 500;
  transition: background 160ms ease, padding 200ms ease;
  position: relative;
}
.hamburger-agent-row:hover {
  background: rgba(255, 255, 255, 0.04);
  padding-left: 20px;
}
.hamburger-agent-row .agent-num {
  font-size: 9.5px;
  color: var(--text-muted);
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  min-width: 18px;
}
.hamburger-agent-row .agent-emoji-static {
  font-size: 16px;
  line-height: 1;
}
.hamburger-agent-row .agent-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   CHROME LAYOUT (top-bar v2 · symmetric grid)
   ============================================================ */

.chrome-top {
  position: absolute;
  top: 58px;
  left: 14px;
  right: 14px;
  z-index: 28; /* above scrim (25), below panel (30) so button stays clickable while open */
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.chrome-top > * { pointer-events: auto; }
.chrome-top .chrome-center {
  display: flex;
  justify-content: center;
}

.tokens-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  border-radius: var(--radius-pill);
}
.tokens-chip .tokens-icon {
  width: 22px;
  height: 22px;
  border-radius: 11px;
  background: var(--accent-primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
}
.tokens-chip .tokens-meta {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.tokens-chip .tokens-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.tokens-chip .tokens-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  letter-spacing: 0.3px;
}

.guardian-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  color: var(--text-primary);
  border-radius: var(--radius-pill);
}
.guardian-btn .guardian-count {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--accent-primary-soft);
  color: var(--accent-primary);
}

/* ============================================================
   FORM PRIMITIVES (refined)
   ============================================================ */

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 0.5px solid rgba(255, 255, 255, 0.10);
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.4;
  transition: border-color 180ms ease, background 180ms ease;
}
.form-input:hover,
.form-textarea:hover,
.form-select:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--accent-primary);
  background: rgba(111, 191, 142, 0.06);
  outline: none;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 60px; font-family: inherit; }

.toggle-track {
  width: 38px;
  height: 22px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.10);
  border: 0.5px solid rgba(255, 255, 255, 0.10);
  position: relative;
  cursor: pointer;
  transition: background 220ms ease;
  flex-shrink: 0;
}
.toggle-track.is-on {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}
.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 220ms cubic-bezier(.34, 1.56, .64, 1);
}
.toggle-track.is-on .toggle-thumb { transform: translateX(16px); }

.pills-track {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  gap: 2px;
}
.pills-track button {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.2px;
  transition: all 180ms ease;
}
.pills-track button.is-active {
  background: var(--accent-primary-soft);
  color: var(--accent-primary);
}

.fade-in       { animation: fade-in 240ms ease both; }
.slide-up      { animation: slide-up 320ms cubic-bezier(.2, .8, .2, 1) both; }
.slide-in-left { animation: slide-in-left 240ms cubic-bezier(.2, .8, .2, 1) both; }
