/* ==========================================================================
   Engram Memory Vault — visual redesign
   Dark developer-tool aesthetic, light theme via [data-theme="light"].
   ========================================================================== */

/* ── Design tokens ─────────────────────────────────────────────────────── */

:root {
  /* surfaces */
  --bg: #0b0f14;
  --bg-raised: #11161d;
  --bg-panel: #151b24;
  --bg-hover: #1a2230;
  --border: #232c3a;
  --border-soft: #1c2430;

  /* text */
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-faint: #64748b;

  /* layers */
  --episodic: #f59e0b;
  --semantic: #3b82f6;
  --imagined: #8b5cf6;

  /* valence */
  --val-joyful: #10b981;
  --val-positive: #14b8a6;
  --val-neutral: #64748b;
  --val-challenging: #f59e0b;

  /* status */
  --grounded: #10b981;
  --quarantined: #8b5cf6;
  --decaying: #94a3b8;
  --danger: #ef4444;
  --ok: #10b981;
  --accent: #3b82f6;

  /* typography */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --text-xs: 11px;
  --text-sm: 12.5px;
  --text-base: 14px;
  --text-lg: 16px;
  --text-xl: 19px;
  --text-2xl: 24px;
  --text-3xl: 30px;

  /* spacing (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;

  /* shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);

  /* transitions */
  --t-fast: 100ms ease;
  --t-normal: 200ms ease;
  --t-slow: 400ms ease;
  --t: var(--t-normal); /* legacy alias */

  /* radii */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-full: 999px;

  /* layout metrics */
  --topbar-h: 94px;
  --statusbar-h: 28px;

  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg-raised: #ffffff;
  --bg-panel: #f1f5f9;
  --bg-hover: #e8eef5;
  --border: #e2e8f0;
  --border-soft: #edf1f6;

  --text: #0f172a;
  --text-muted: #475569;
  --text-faint: #94a3b8;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.12);

  color-scheme: light;
}

/* ── Base ──────────────────────────────────────────────────────────────── */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--text-base);
  line-height: 1.5;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: var(--topbar-h);
  padding-bottom: var(--statusbar-h);
}

::selection { background: rgba(59, 130, 246, 0.3); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, .mono { font-family: var(--mono); font-size: 0.92em; }

h2 {
  font-size: var(--text-xl);
  font-weight: 650;
  letter-spacing: 0.2px;
  margin: 0 0 var(--space-4);
}

/* utilities used by the JS templates */
.hidden { display: none !important; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.ml-auto { margin-left: auto; }
.ok { color: var(--ok); }
.warn { color: var(--episodic); }
.error { color: var(--danger); font-size: var(--text-sm); }

/* thin dark scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }

/* ── API unreachable banner ────────────────────────────────────────────── */

.api-banner {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  z-index: 45;
  background: rgba(245, 158, 11, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--episodic);
  padding: 6px 16px;
  font-size: var(--text-sm);
  text-align: center;
  animation: banner-in var(--t-slow) ease;
}
@keyframes banner-in {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.api-banner::first-letter {
  display: inline-block;
  animation: pulse-warn 1.6s ease-in-out infinite;
}
@keyframes pulse-warn {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ── Topbar ────────────────────────────────────────────────────────────── */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--bg-raised);
  background: color-mix(in srgb, var(--bg-raised) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--space-5);
}

.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  max-width: 1200px;
  margin: 0 auto;
}

.brand {
  color: var(--text);
  font-weight: 650;
  font-size: 15px;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.brand:hover { text-decoration: none; }
.brand-gem {
  color: var(--semantic);
  display: inline-block;
  transition: transform var(--t-normal);
}
.brand:hover .brand-gem { animation: gem-pulse 1.2s ease-in-out infinite; }
@keyframes gem-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 transparent); }
  50% { transform: scale(1.18); filter: drop-shadow(0 0 6px var(--semantic)); }
}
.brand-name { color: var(--text-muted); font-weight: 500; }

.topbar-right { display: flex; align-items: center; gap: 10px; }

.vault-selector {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  transition: border-color var(--t-fast), color var(--t-fast);
}
.vault-selector:hover { border-color: var(--text-faint); color: var(--text); }
.vault-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 6px var(--ok);
  animation: dot-pulse 2.4s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 3px var(--ok); }
  50% { box-shadow: 0 0 9px var(--ok); }
}
.chev { font-size: 10px; color: var(--text-faint); }

.icon-btn, .theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 16px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  font-family: var(--sans);
  line-height: 1.4;
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast);
}
.icon-btn:hover, .theme-toggle:hover {
  color: var(--text);
  background: var(--bg-hover);
  border-color: var(--border);
  text-decoration: none;
}

/* ── Nav pills ─────────────────────────────────────────────────────────── */

.nav {
  display: flex;
  gap: 2px;
  max-width: 1200px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav a {
  position: relative;
  color: var(--text-muted);
  padding: 7px 14px 11px;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--t-fast);
}
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: transparent;
  transition: background var(--t-normal), box-shadow var(--t-normal);
}
.nav a.active { color: var(--text); }

/* per-section underline colors */
.nav a[data-route="#/"].active::after,
.nav a[data-route="#/context"].active::after {
  background: var(--episodic);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.7);
}
.nav a[data-route="#/memories"].active::after,
.nav a[data-route="#/consolidation"].active::after {
  background: var(--semantic);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.7);
}
.nav a[data-route="#/graph"].active::after {
  background: var(--imagined);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.7);
}

/* ── App layout ────────────────────────────────────────────────────────── */

.app {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-5) var(--space-8);
}

.page { animation: page-in 180ms ease; }
@keyframes page-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

.loading {
  color: var(--text-faint);
  padding: 64px 0;
  text-align: center;
  font-size: var(--text-sm);
}
.loading::before {
  content: "◆";
  display: block;
  font-size: 22px;
  color: var(--semantic);
  margin-bottom: var(--space-3);
  animation: gem-spin 1.4s ease-in-out infinite;
}
@keyframes gem-spin {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

.loading-sm {
  color: var(--text-faint);
  padding: var(--space-4);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.loading-sm::before {
  content: "";
  width: 12px; height: 12px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--danger);
  border-radius: var(--radius);
  padding: var(--space-6);
  margin-top: var(--space-6);
}
.error-panel h2 { margin: 0 0 var(--space-2); }
.error-panel p { color: var(--text-muted); margin: 0 0 var(--space-2); }

/* skeleton shimmer */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--bg-panel);
  border-radius: var(--radius-sm);
  min-height: 1em;
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.12), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

/* ── Panels & cards ────────────────────────────────────────────────────── */

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.panel-header {
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel > :not(.panel-header) { margin-left: 0; }
.panel .health-list, .panel .layer-breakdown, .panel .pattern-card { padding: var(--space-3) var(--space-4); }
.panel .feed-item { margin: 0 var(--space-2); }
.panel .feed-item:first-of-type { margin-top: var(--space-2); }
.panel .feed-item:last-of-type { margin-bottom: var(--space-2); }

.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

/* legacy grid aliases */
.grid { display: grid; gap: var(--space-4); }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3, .card-grid.three { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card, .feature-grid > * {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
}

/* ── Dashboard: stat cards ─────────────────────────────────────────────── */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.stat-card {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  padding-top: calc(var(--space-4) + 3px);
  overflow: hidden;
  transition: transform var(--t-normal), box-shadow var(--t-normal), border-color var(--t-normal);
}
.stat-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.stat-grid .stat-card:nth-child(1)::before { background: linear-gradient(90deg, var(--episodic), transparent); }
.stat-grid .stat-card:nth-child(2)::before { background: linear-gradient(90deg, var(--semantic), transparent); }
.stat-grid .stat-card:nth-child(3)::before { background: linear-gradient(90deg, var(--semantic), transparent); }
.stat-grid .stat-card:nth-child(4)::before { background: linear-gradient(90deg, var(--imagined), transparent); }

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}

.stat-num, .stat-value {
  font-size: 27px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.stat-label { color: var(--text-muted); font-size: var(--text-sm); margin-top: 3px; }
.stat-sub { color: var(--text-faint); font-size: var(--text-xs); margin-top: 2px; }

/* ── Dashboard: layer breakdown ────────────────────────────────────────── */

.layer-breakdown { display: flex; flex-direction: column; gap: 3px; }
.layer-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: var(--text);
  margin-top: var(--space-2);
}
.layer-row .faint { font-family: var(--mono); font-size: var(--text-xs); }

.layer-bar {
  height: 6px;
  background: rgba(148, 163, 184, 0.12);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.layer-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--t-slow);
}
.layer-bar-fill.episodic { background: var(--episodic); }
.layer-bar-fill.semantic { background: var(--semantic); }
.layer-bar-fill.imagined { background: var(--imagined); }

/* legacy alias from the brief */
.layer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }

/* ── Dashboard: health ─────────────────────────────────────────────────── */

.health-list { display: flex; flex-direction: column; }
.health-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-soft);
}
.health-row:last-child { border-bottom: none; }
.health-row > span:first-child { font-family: var(--mono); color: var(--text); }
.health-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.health-dot.ok { background: var(--ok); box-shadow: 0 0 6px rgba(16, 185, 129, 0.6); }
.health-dot.warn { background: var(--episodic); box-shadow: 0 0 6px rgba(245, 158, 11, 0.5); }
.health-panel { /* legacy alias */ }

/* ── Feed items (dashboard recent captures, links, run history) ────────── */

.feed-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 12px;
  border-left: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  overflow: hidden;
  transition: background var(--t-fast), border-color var(--t-fast);
}
a.feed-item { text-decoration: none; }
a.feed-item:hover { background: var(--bg-hover); text-decoration: none; }
.feed-item .faint { flex: none; font-size: var(--text-xs); }
.feed-item .layer-icon { flex: none; }

/* layer-colored timeline border when the row carries a layer icon */
.feed-item:has(.layer-icon.episodic) { border-left-color: var(--episodic); }
.feed-item:has(.layer-icon.semantic) { border-left-color: var(--semantic); }
.feed-item:has(.layer-icon.imagined) { border-left-color: var(--imagined); }

/* legacy alias */
.feed-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: background var(--t-fast);
}
.feed-row:last-child { border-bottom: none; }
.feed-row:hover { background: var(--bg-hover); }

/* ── Badges, tags, icons, valence ──────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 1.5px 9px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.06);
  white-space: nowrap;
}
.badge-episodic, .badge.episodic { color: var(--episodic); border-color: rgba(245, 158, 11, 0.35); background: rgba(245, 158, 11, 0.08); }
.badge-semantic, .badge.semantic { color: var(--semantic); border-color: rgba(59, 130, 246, 0.35); background: rgba(59, 130, 246, 0.08); }
.badge-imagined, .badge.imagined { color: var(--imagined); border-color: rgba(139, 92, 246, 0.35); background: rgba(139, 92, 246, 0.08); }
.badge-quarantined, .badge.warn { color: var(--quarantined); border-color: rgba(139, 92, 246, 0.45); background: rgba(139, 92, 246, 0.1); }
.badge.ok { color: var(--grounded); border-color: rgba(16, 185, 129, 0.4); }
.badge .layer-icon { font-size: 9px; }

.tag, .tag-chip {
  display: inline-block;
  font-size: var(--text-xs);
  font-family: var(--mono);
  color: var(--text-muted);
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 5px;
  padding: 0 6px;
  margin: 0 4px 3px 0;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.tag:hover, .tag-chip:hover { color: var(--semantic); border-color: var(--semantic); }
.tag-chip .x { margin-left: 4px; color: var(--text-faint); }
.tag-chip .x:hover { color: var(--danger); }

.layer-icon { font-style: normal; }
.layer-icon.episodic { color: var(--episodic); }
.layer-icon.semantic { color: var(--semantic); }
.layer-icon.imagined { color: var(--imagined); }

.valence { font-size: var(--text-sm); white-space: nowrap; }
.valence.joyful { color: var(--val-joyful); }
.valence.positive { color: var(--val-positive); }
.valence.neutral { color: var(--val-neutral); }
.valence.challenging { color: var(--val-challenging); }

/* ── Strength bars ─────────────────────────────────────────────────────── */

.mini-bar {
  position: relative;
  height: 5px;
  min-width: 64px;
  flex: none;
  background: rgba(148, 163, 184, 0.14);
  border-radius: var(--radius-full);
  overflow: hidden;
  align-self: center;
}
.mini-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: var(--radius-full);
  animation: bar-grow 500ms ease;
}
@keyframes bar-grow { from { width: 0 !important; } }

/* larger variant on the detail page */
.detail-card .mini-bar { height: 8px; min-width: 140px; }

/* legacy aliases */
.strength-bar {
  position: relative;
  height: 5px;
  background: rgba(148, 163, 184, 0.14);
  border-radius: 3px;
  overflow: hidden;
  min-width: 60px;
}
.strength-fill { position: absolute; inset: 0 auto 0 0; border-radius: 3px; }

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-hover);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 550;
  font-family: var(--sans);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast),
              color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.btn:hover { border-color: var(--text-faint); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: default; }

.btn-primary, .btn.primary {
  background: var(--semantic);
  border-color: var(--semantic);
  color: #fff;
}
.btn-primary:hover, .btn.primary:hover {
  border-color: var(--semantic);
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.35);
  filter: brightness(1.1);
}

.btn-danger, .btn.danger {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.4);
  background: transparent;
}
.btn-danger:hover, .btn.danger:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: var(--danger);
}

.btn-sm, .btn.small { padding: 4px 10px; font-size: 12px; }
.btn.ghost { background: transparent; }

/* ── Forms ─────────────────────────────────────────────────────────────── */

input[type="text"], input[type="search"], input[type="number"],
input[type="time"], select, textarea {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 11px;
  font-size: 13px;
  font-family: var(--sans);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--semantic);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

select, .filter-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.input-sm { width: 84px; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  flex: 1;
  min-width: 140px;
  background: linear-gradient(90deg, var(--semantic), var(--episodic), var(--danger));
  border: none;
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
  padding: 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg-raised);
  border: 2px solid var(--semantic);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg-raised);
  border: 2px solid var(--semantic);
  box-shadow: var(--shadow-sm);
}
input[type="range"]::-moz-range-track {
  height: 5px;
  background: linear-gradient(90deg, var(--semantic), var(--episodic), var(--danger));
  border-radius: var(--radius-full);
}

input[type="checkbox"], input[type="radio"] { accent-color: var(--semantic); }

/* CSS-only toggle switch (opt-in via .toggle) */
input[type="checkbox"].toggle {
  appearance: none;
  -webkit-appearance: none;
  width: 36px; height: 20px;
  border-radius: var(--radius-full);
  background: var(--border);
  position: relative;
  cursor: pointer;
  transition: background var(--t-normal);
  border: none;
}
input[type="checkbox"].toggle::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg-raised);
  transition: transform var(--t-normal);
}
input[type="checkbox"].toggle:checked { background: var(--ok); }
input[type="checkbox"].toggle:checked::after { transform: translateX(16px); }

input[type="file"] { font-size: var(--text-sm); color: var(--text-muted); }

/* ── Explorer ──────────────────────────────────────────────────────────── */

.search-bar {
  position: relative;
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.search-bar::before {
  content: "🔍";
  position: absolute;
  left: 12px;
  top: 9px;
  font-size: 13px;
  opacity: 0.55;
  pointer-events: none;
  z-index: 1;
}
.search-input { flex: 1; }
.search-bar .search-input { padding-left: 34px; font-size: 14px; padding-top: 8px; padding-bottom: 8px; }
.search-input:focus { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16), 0 0 18px rgba(59, 130, 246, 0.12); }

.filter-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.filter-row .faint { font-family: var(--mono); font-size: var(--text-xs); }

.explorer-results {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.memory-card {
  display: block;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--t-normal), box-shadow var(--t-normal),
              border-color var(--t-normal), background var(--t-normal);
}
.memory-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: var(--bg-hover);
  border-color: var(--border);
}
.memory-card:active { transform: scale(0.99); }
.memory-card:has(.card-top .layer-icon.episodic) { border-left-color: var(--episodic); }
.memory-card:has(.card-top .layer-icon.semantic) { border-left-color: var(--semantic); }
.memory-card:has(.card-top .layer-icon.imagined) { border-left-color: var(--imagined); }

.card-top {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.card-source { font-size: var(--text-xs); }
.card-top .mini-bar { margin-left: var(--space-2); }

.card-content {
  position: relative;
  margin: var(--space-2) 0;
  font-size: 13.5px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: var(--text-faint);
}

/* keyboard hint, CSS-only */
.explorer::after {
  content: "j/k to navigate · Enter to open";
  position: fixed;
  right: var(--space-5);
  bottom: calc(var(--statusbar-h) + var(--space-3));
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-faint);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px 9px;
  opacity: 0.8;
  pointer-events: none;
  z-index: 30;
}

/* empty states */
.explorer-results > .faint,
#recent-feed > .faint {
  display: block;
  text-align: center;
  padding: var(--space-8) var(--space-5) !important;
}
.explorer-results > .faint::before {
  content: "◆";
  display: block;
  font-size: 34px;
  opacity: 0.2;
  margin-bottom: var(--space-3);
}

/* ── Detail page ───────────────────────────────────────────────────────── */

.back-link {
  color: var(--text-muted);
  font-size: 13px;
  display: inline-block;
  margin-bottom: var(--space-4);
  transition: color var(--t-fast), transform var(--t-fast);
}
.back-link:hover { color: var(--text); text-decoration: none; transform: translateX(-2px); }

.detail-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  box-shadow: var(--shadow-sm);
}

.detail-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-soft);
}
.detail-header .layer-icon { font-size: 20px; }
.detail-layer {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text-muted);
}
.detail-header > .faint:last-child { font-family: var(--mono); font-size: var(--text-xs); }

.detail-content {
  font-size: 15px;
  line-height: 1.7;
  max-width: 720px;
  margin: var(--space-4) 0;
  white-space: pre-wrap;
  color: var(--text);
}

.detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2) var(--space-6);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-soft);
}
.meta-row {
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.meta-row .faint {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  min-width: 96px;
}

.detail-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

/* link rows inside the links panel reuse .feed-item; glyph colors: */
.detail .feed-item > span:first-child,
.page .panel .feed-item > .faint { color: var(--text-faint); }

/* legacy detail aliases */
.meta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 24px; margin: 14px 0; }
.meta-item .k { color: var(--text-faint); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.6px; }
.meta-item .v { font-family: var(--mono); font-size: var(--text-sm); margin-top: 1px; word-break: break-all; }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.json-block {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 12px;
  overflow: auto;
  white-space: pre;
  color: var(--text-muted);
  max-height: 340px;
}

/* ── Graph page ────────────────────────────────────────────────────────── */

.graph-page { position: relative; }

.graph-filters {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.graph-canvas {
  position: relative;
  background:
    radial-gradient(circle, rgba(148, 163, 184, 0.13) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: calc(100vh - 140px - var(--topbar-h) - var(--statusbar-h));
  box-shadow: var(--shadow-sm) inset;
}
.graph-canvas svg { border-radius: var(--radius); }

/* SVG node / edge polish (CSS overrides SVG presentation attributes) */
.graph-canvas circle {
  stroke-width: 2;
  stroke-opacity: 0.6;
  stroke: currentColor;
  transition: opacity var(--t-normal);
  transform-box: fill-box;
  transform-origin: center;
}
.graph-canvas circle:hover {
  stroke-width: 3;
  stroke-opacity: 1;
  transform: scale(1.35);
}
.graph-canvas line { stroke-opacity: 0.35; }
.graph-canvas text { user-select: none; pointer-events: none; }

.graph-legend {
  position: absolute;
  left: var(--space-3);
  bottom: var(--space-3);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  background: var(--bg-raised);
  background: color-mix(in srgb, var(--bg-raised) 82%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 8px 13px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  pointer-events: none;
  line-height: 1.9;
  z-index: 2;
}

/* ── Context page ──────────────────────────────────────────────────────── */

.config-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  flex-wrap: wrap;
}
.config-row label {
  min-width: 170px;
  color: var(--text-muted);
  font-size: 13px;
}
.config-row .mono { min-width: 56px; text-align: right; font-variant-numeric: tabular-nums; }

.preview-box {
  margin: 0 var(--space-4) var(--space-4);
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  font-family: var(--mono);
  font-size: 12.5px;
  min-height: 48px;
}
.preview-box:empty { display: none; }
.preview-box > .faint { font-size: var(--text-xs); }

.messages-preview {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-height: 480px;
  overflow-y: auto;
}
.msg-row {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
  animation: msg-in 200ms ease;
}
@keyframes msg-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }
.msg-role {
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-right: 6px;
}

/* legacy context aliases */
.context-layout { display: grid; grid-template-columns: minmax(380px, 5fr) minmax(420px, 6fr); gap: 16px; align-items: start; }
.prio-required { color: var(--danger); }
.prio-high { color: var(--episodic); }
.prio-normal { color: var(--semantic); }
.prio-low { color: var(--text-faint); }

/* ── Consolidation page ────────────────────────────────────────────────── */

/* run history as a vertical timeline */
.consolidation-page .panel:first-of-type .feed-item,
.consolidation-page .panel .feed-item {
  position: relative;
  border-left: none;
  margin-left: var(--space-4);
  padding-left: var(--space-4);
}
.consolidation-page .panel .feed-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 14px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--text-faint);
}
.consolidation-page .panel .feed-item:has(.badge)::before { border-color: var(--semantic); }

.pattern-card {
  position: relative;
  padding-left: 38px !important;
}
.pattern-card::before {
  content: "💡";
  position: absolute;
  left: 14px;
  top: 14px;
  font-size: 16px;
  opacity: 0.85;
}
.pattern-card .card-content { font-style: italic; margin: 0 0 var(--space-2); }

#btn-decay::before { content: "▶ "; font-size: 10px; }
#btn-consolidate::before { content: "▶ "; font-size: 10px; }

/* legacy timeline aliases */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }

/* ── Settings page ─────────────────────────────────────────────────────── */

.settings-page .health-row {
  padding: 8px var(--space-2);
  border-radius: var(--radius-sm);
}
.settings-page .health-row:nth-child(odd) { background: rgba(148, 163, 184, 0.05); }
.settings-page .health-row > .mono { word-break: break-all; }

/* legacy settings aliases */
.kv-row { display: flex; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; align-items: center; }
.kv-row:last-child { border-bottom: none; }
.kv-row .k { color: var(--text-faint); min-width: 150px; }
.kv-row .v { font-family: var(--mono); font-size: var(--text-sm); word-break: break-all; }
.dropzone {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast);
}
.dropzone:hover, .dropzone.over { border-color: var(--semantic); color: var(--text-muted); }

/* ── Statusbar ─────────────────────────────────────────────────────────── */

.statusbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--statusbar-h);
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
  padding: 0 var(--space-5);
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: nowrap;
  overflow: hidden;
  font-family: var(--mono);
  z-index: 40;
}
.status-item { white-space: nowrap; }
.status-item.ok { color: var(--ok); animation: status-glow 2.6s ease-in-out infinite; }
@keyframes status-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}
.status-item.warn { color: var(--episodic); }
.status-sep { color: var(--border); }
.status-ok { color: var(--ok); }
.status-warn { color: var(--episodic); }

/* ── Toasts ────────────────────────────────────────────────────────────── */

.toast-root {
  position: fixed;
  bottom: calc(var(--statusbar-h) + var(--space-4));
  right: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  z-index: 100;
}

.toast {
  position: relative;
  overflow: hidden;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 10px 16px 12px;
  font-size: 13px;
  box-shadow: var(--shadow-md);
  max-width: 360px;
  animation: slide-in-right 200ms ease;
}
.toast-ok, .toast.ok { border-left-color: var(--ok); }
.toast-error, .toast.error { border-left-color: var(--danger); }
.toast-warn, .toast.warn { border-left-color: var(--episodic); }
.toast-info { border-left-color: var(--accent); }

/* auto-dismiss progress bar (matches the 3s JS timeout) */
.toast::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: currentColor;
  opacity: 0.5;
  transform-origin: left;
  animation: toast-progress 3s linear forwards;
}
@keyframes toast-progress { from { transform: scaleX(1); } to { transform: scaleX(0); } }

.toast.out { animation: slide-out-right 200ms ease forwards; }
@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: none; }
}
@keyframes slide-out-right {
  from { opacity: 1; }
  to   { opacity: 0; transform: translateX(24px); }
}

/* ── Modal ─────────────────────────────────────────────────────────────── */

.modal-overlay, .modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 10, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fade-in 150ms ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal, .modal-box {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: min(460px, 92vw);
  box-shadow: var(--shadow-lg);
  animation: modal-in 180ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5) 0;
}
.modal-header h2, .modal-title { margin: 0; font-size: var(--text-lg); font-weight: 650; }
.modal-close {
  background: transparent;
  border: none;
  color: var(--text-faint);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: color var(--t-fast), background var(--t-fast);
}
.modal-close:hover { color: var(--text); background: var(--bg-hover); }

.modal-body {
  padding: var(--space-3) var(--space-5) var(--space-5);
  color: var(--text-muted);
  font-size: 13.5px;
}
.modal-body .modal-actions, .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.modal-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-hover);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 550;
  font-family: var(--sans);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.modal-btn:hover { border-color: var(--text-faint); }
.modal-btn:active { transform: scale(0.97); }
.modal-btn-danger, .modal-btn.danger {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.4);
}
.modal h3 { margin: 0 0 8px; font-size: 15.5px; }
.modal p { color: var(--text-muted); font-size: 13.5px; margin: 0 0 18px; }

/* ── Tables (priority table, vault info) ───────────────────────────────── */

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left;
  color: var(--text-faint);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
}
.table td { padding: 7px 10px; border-bottom: 1px solid var(--border-soft); }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:nth-child(even) { background: rgba(148, 163, 184, 0.04); }

/* ── SVG chart text (if rendered) ──────────────────────────────────────── */

.chart-bar-label { font-size: 11px; fill: var(--text-muted); font-family: var(--sans); }
.chart-bar-value { font-size: 11px; fill: var(--text-faint); font-family: var(--mono); }
.chart-axis { stroke: var(--border); stroke-width: 1; }
.chart-grid { stroke: var(--border-soft); stroke-width: 1; stroke-dasharray: 2 4; }
.chart-text { font-size: 10.5px; fill: var(--text-faint); font-family: var(--mono); }

/* ── Misc shared ───────────────────────────────────────────────────────── */

.result-meta {
  font-size: 12px;
  color: var(--text-faint);
  margin: 12px 2px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.kbd-hint {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 5px;
}
.empty-state {
  text-align: center;
  color: var(--text-faint);
  padding: 48px 20px;
  font-size: 13.5px;
}
.empty-state .big { font-size: 30px; display: block; margin-bottom: 10px; opacity: 0.6; }
.empty-state::before {
  content: "◆";
  display: block;
  font-size: 40px;
  opacity: 0.2;
  margin-bottom: var(--space-3);
}
.pill {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  padding: 3px 12px;
  font-size: 12px;
  font-family: var(--sans);
  cursor: pointer;
  transition: all var(--t-fast);
}
.pill:hover { color: var(--text); border-color: var(--text-faint); }
.pill.active { color: var(--text); border-color: var(--semantic); background: rgba(59, 130, 246, 0.12); transform: scale(1.04); }
.pill.active.pill-episodic { border-color: var(--episodic); background: rgba(245, 158, 11, 0.12); }
.pill.active.pill-semantic { border-color: var(--semantic); background: rgba(59, 130, 246, 0.12); }
.pill.active.pill-imagined { border-color: var(--imagined); background: rgba(139, 92, 246, 0.12); }
.pill-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.pill-label { color: var(--text-faint); font-size: 12px; min-width: 52px; }
h2.section {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 26px 0 12px;
}

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 1023px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .nav a { font-size: 12.5px; padding: 7px 11px 10px; }
  .graph-canvas { min-height: 60vh; }
  .context-layout { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  :root { --topbar-h: 90px; }
  .topbar { padding: 0 var(--space-3); }
  .brand-name { display: none; }
  .app { padding: var(--space-4) var(--space-3) var(--space-7); }
  .stat-grid, .panel-grid, .grid-2, .grid-3, .card-grid.three, .layer-grid { grid-template-columns: 1fr; }
  .detail-meta { grid-template-columns: 1fr; }
  .detail-card { padding: var(--space-4); }
  .search-bar { flex-wrap: wrap; }
  .filter-row { gap: 6px; }
  .memory-card { border-radius: var(--radius-sm); }
  .explorer::after { display: none; }
  .graph-canvas { min-height: 0; }
  .graph-canvas svg { max-height: 70vh; }
  .graph-legend { position: static; margin-top: var(--space-2); pointer-events: auto; }
  .config-row label { min-width: 0; width: 100%; }
  .feed-item { flex-wrap: wrap; }
  .statusbar { justify-content: flex-start; gap: var(--space-3); overflow-x: auto; }
  .vault-selector { display: none; }
}

@media (max-width: 479px) {
  :root { --topbar-h: 86px; }
  html, body { font-size: 13.5px; }
  .app { padding: var(--space-3) var(--space-2) var(--space-6); }
  .stat-num, .stat-value { font-size: 22px; }
  .topbar-row { height: 46px; }
  .nav a { font-size: 12px; padding: 6px 9px 9px; }
  .toast { max-width: calc(100vw - 32px); }
  .toast-root { right: var(--space-3); }
}

/* ── Reduced motion ────────────────────────────────────────────────────── */

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