/* ==========================================================================
   TAQDOM.AI — Design System
   Deep-space command deck for the agent economy
   ========================================================================== */

:root {
  --bg-0: #05060f;
  --bg: #0a0a1f;
  --panel: #01102e;
  --panel-70: color-mix(in oklab, #01102e 70%, #000);
  --panel-40: color-mix(in oklab, #01102e 40%, transparent);
  --mint: #74f7b2;
  --mint-dim: rgba(116, 247, 178, 0.12);
  --cyan: #6ee7ff;
  --violet: #a78bfa;
  --amber: #ffd166;
  --danger: #ff6b8a;
  --text: #f2f5fa;
  --muted: #7a8292;
  --line: hsla(0, 0%, 100%, 0.15);
  --line-soft: hsla(0, 0%, 100%, 0.08);
  --font-latin: "Hanken Grotesk", "Tajawal", system-ui, sans-serif;
  --font-ar: "Tajawal", "Hanken Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 40px;
  --r-pill: 999px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.57, -0.21, 0, 0.74);
  --header-h: 72px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-latin);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html[lang="ar"] body { font-family: var(--font-ar); }

::selection { background: var(--mint); color: #01102e; }

/* ---------- Living background ---------- */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

.bg-veil {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 75% 8%, rgba(116, 247, 178, 0.06), transparent 60%),
    radial-gradient(ellipse 50% 40% at 15% 85%, rgba(110, 231, 255, 0.05), transparent 60%),
    radial-gradient(ellipse 90% 70% at 50% 50%, transparent 40%, rgba(5, 6, 15, 0.82) 100%);
}

.bg-veil::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(hsla(0, 0%, 100%, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 70%);
}

#bg-toggle {
  position: fixed;
  bottom: 20px;
  inset-inline-end: 20px;
  z-index: 60;
  width: 44px;
  height: 44px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--panel-70);
  backdrop-filter: blur(8px);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 0.3s, border-color 0.3s;
}

#bg-toggle:hover { color: var(--mint); border-color: var(--mint); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  background: color-mix(in oklab, var(--bg-0) 72%, transparent);
  backdrop-filter: blur(14px);
}

.header-inner {
  width: min(1280px, 100% - 48px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand svg { flex: none; }

.brand small {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: var(--mint);
  text-transform: uppercase;
  line-height: 1;
}

.main-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }

.main-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  transition: color 0.25s, background 0.25s;
  white-space: nowrap;
}

.main-nav a:hover { color: var(--text); background: hsla(0, 0%, 100%, 0.06); }
.main-nav a[aria-current="page"] { color: var(--mint); }

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-pill);
  padding: 6px 12px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  animation: pulse 2s infinite;
  flex: none;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(116, 247, 178, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(116, 247, 178, 0); }
}

/* Language switcher */
.lang-switch { position: relative; }

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--line-soft);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 7px 12px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: border-color 0.25s;
}

.lang-btn:hover { border-color: var(--mint); }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 170px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 6px;
  display: none;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}

.lang-menu.open { display: block; }

.lang-menu button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: none;
  border: 0;
  color: var(--text);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  text-align: start;
}

.lang-menu button:hover { background: var(--mint-dim); color: var(--mint); }
.lang-menu button.active { color: var(--mint); }
.lang-menu .code { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }

.nav-toggle { display: none; }

/* ---------- Layout helpers ---------- */
.container { width: min(1280px, 100% - 48px); margin-inline: auto; }
.container-narrow { width: min(880px, 100% - 48px); margin-inline: auto; }

.section { padding: 96px 0; position: relative; }
.section-tint { background: color-mix(in oklab, var(--panel) 24%, transparent); border-block: 1px solid var(--line-soft); }

/* Folio label — the archival signature */
.folio {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 20px;
}

.folio::before { content: ""; width: 32px; height: 1px; background: var(--mint); opacity: 0.6; }

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; }

.h-display { font-size: clamp(2.6rem, 1.4rem + 5.4vw, 5.2rem); font-weight: 800; }
.h-1 { font-size: clamp(2.1rem, 1.5rem + 2.8vw, 3.4rem); font-weight: 800; }
.h-2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); font-weight: 700; }
.h-3 { font-size: 1.25rem; font-weight: 700; }

.lead { font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.25rem); color: var(--muted); max-width: 62ch; }
.accent { color: var(--mint); }
.mono { font-family: var(--font-mono); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s, background 0.3s, border-color 0.3s, color 0.3s;
}

.btn:active { transform: translateY(1px) scale(0.99); }

.btn-mint { background: var(--mint); color: #01102e; }
.btn-mint:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(116, 247, 178, 0.25); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--mint); color: var(--mint); }

.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }

.btn-sm { padding: 9px 18px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- Cards / dossiers ---------- */
.dossier {
  background: var(--panel-70);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
  transition: transform 0.4s var(--ease-out), border-color 0.4s, box-shadow 0.4s;
}

.dossier:hover { transform: translateY(-4px); border-color: rgba(116, 247, 178, 0.35); box-shadow: 0 24px 56px rgba(0, 0, 0, 0.4); }

.dossier .glow-orb {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(116, 247, 178, 0.16), transparent 70%);
  filter: blur(28px);
  inset-inline-end: -60px;
  bottom: -60px;
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.dossier:hover .glow-orb { opacity: 1; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Hero ---------- */
.hero {
  min-height: calc(92vh - var(--header-h));
  display: flex;
  align-items: center;
  position: relative;
  padding: 64px 0 96px;
}

.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(116, 247, 178, 0.35);
  background: var(--mint-dim);
  color: var(--mint);
  border-radius: var(--r-pill);
  padding: 8px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  margin-bottom: 28px;
}

.hero-actions { display: flex; gap: 16px; margin-top: 40px; flex-wrap: wrap; }

.hero-meta {
  display: flex;
  gap: 40px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line-soft);
  flex-wrap: wrap;
}

.hero-meta .num { font-family: var(--font-mono); font-size: 28px; font-weight: 700; color: var(--mint); }
.hero-meta .lbl { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }

/* Orbit visual */
.orbit-stage { position: relative; aspect-ratio: 1; max-width: 520px; margin-inline: auto; width: 100%; }
.orbit-ring {
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(116, 247, 178, 0.22);
  border-radius: 50%;
  animation: spin 60s linear infinite;
}
.orbit-ring.r2 { inset: 14%; animation-duration: 42s; animation-direction: reverse; border-color: rgba(110, 231, 255, 0.2); }
.orbit-ring.r3 { inset: 28%; animation-duration: 30s; border-color: rgba(167, 139, 250, 0.2); }

.orbit-sat {
  position: absolute;
  top: -7px;
  left: 50%;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--mint);
  box-shadow: 0 0 18px rgba(116, 247, 178, 0.8);
}
.orbit-ring.r2 .orbit-sat { background: var(--cyan); box-shadow: 0 0 18px rgba(110, 231, 255, 0.8); border-radius: 50%; }
.orbit-ring.r3 .orbit-sat { background: var(--violet); box-shadow: 0 0 18px rgba(167, 139, 250, 0.8); }

@keyframes spin { to { transform: rotate(360deg); } }

.orbit-core {
  position: absolute;
  inset: 38%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #123a5c, var(--panel) 65%);
  border: 1px solid rgba(116, 247, 178, 0.4);
  display: grid;
  place-items: center;
  box-shadow: 0 0 60px rgba(116, 247, 178, 0.15), inset 0 0 40px rgba(116, 247, 178, 0.06);
  animation: core-breathe 4s ease-in-out infinite;
}

@keyframes core-breathe {
  0%, 100% { box-shadow: 0 0 60px rgba(116, 247, 178, 0.12), inset 0 0 40px rgba(116, 247, 178, 0.05); }
  50% { box-shadow: 0 0 90px rgba(116, 247, 178, 0.25), inset 0 0 40px rgba(116, 247, 178, 0.12); }
}

/* ---------- Ticker ---------- */
.ticker-band {
  border-block: 1px solid var(--line-soft);
  background: var(--panel-40);
  overflow: hidden;
  padding: 14px 0;
  direction: ltr;
}

.ticker-track { display: flex; gap: 56px; width: max-content; animation: ticker 38s linear infinite; }
.ticker-band:hover .ticker-track { animation-play-state: paused; }

@keyframes ticker { to { transform: translateX(-50%); } }

.ticker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.ticker-item b { color: var(--mint); font-weight: 600; }

/* ---------- Ledger rows ---------- */
.ledger { border-top: 1px solid var(--line-soft); }

.ledger-row {
  display: grid;
  grid-template-columns: 64px 1.6fr 1fr auto auto;
  gap: 20px;
  align-items: center;
  padding: 20px 8px;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  color: var(--text);
  transition: background 0.25s;
}

.ledger-row:hover { background: hsla(0, 0%, 100%, 0.03); }
.ledger-row .idx { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.ledger-row .price { font-family: var(--font-mono); color: var(--mint); font-size: 14px; }
.ledger-row .arrow { color: var(--muted); transition: transform 0.3s var(--ease-out), color 0.3s; }
.ledger-row:hover .arrow { transform: translate(3px, -3px); color: var(--mint); }
html[dir="rtl"] .ledger-row:hover .arrow { transform: translate(-3px, -3px); }

/* ---------- Tags & badges ---------- */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid rgba(110, 231, 255, 0.3);
  border-radius: var(--r-pill);
  padding: 4px 12px;
}

.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--mint);
}

.badge-verified::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); animation: pulse 2s infinite; }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.input, .select, .textarea {
  width: 100%;
  background: color-mix(in oklab, var(--panel) 55%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 13px 16px;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(116, 247, 178, 0.15);
}

.textarea { min-height: 130px; resize: vertical; }
.select option { background: var(--panel); }

.form-note { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* ---------- Tables ---------- */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
  text-align: start;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.data-table td { padding: 14px; border-bottom: 1px solid var(--line-soft); }
.data-table tr:hover td { background: hsla(0, 0%, 100%, 0.02); }
.data-table .num { font-family: var(--font-mono); }

.status-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  border: 1px solid;
}
.status-pending { color: var(--amber); border-color: rgba(255, 209, 102, 0.4); }
.status-paid, .status-completed, .status-active, .status-delivered { color: var(--mint); border-color: rgba(116, 247, 178, 0.4); }
.status-cancelled, .status-refunded, .status-paused { color: var(--danger); border-color: rgba(255, 107, 138, 0.4); }

/* ---------- Stat tiles ---------- */
.stat-tile { padding: 24px; }
.stat-tile .num { font-family: var(--font-mono); font-size: 34px; font-weight: 700; color: var(--text); }
.stat-tile .num.mint { color: var(--mint); }
.stat-tile .lbl { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.stat-tile .delta { font-family: var(--font-mono); font-size: 11px; color: var(--mint); margin-top: 8px; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(5, 6, 15, 0.8);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop.open { display: flex; }

.modal {
  width: min(560px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 36px;
  animation: modal-in 0.35s var(--ease-spring);
}

@keyframes modal-in { from { transform: translateY(24px) scale(0.97); opacity: 0; } }

.modal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.modal-close { background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--text); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line-soft); margin-bottom: 32px; flex-wrap: wrap; }
.tab-btn {
  background: none;
  border: 0;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 18px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.25s, border-color 0.25s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--mint); border-bottom-color: var(--mint); }

/* ---------- Chat ---------- */
.chat-shell { display: flex; flex-direction: column; height: 480px; }
.chat-log { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }

.chat-msg { max-width: 78%; }
.chat-msg .meta { font-family: var(--font-mono); font-size: 10px; color: var(--muted); margin-bottom: 4px; }
.chat-msg .bubble {
  background: var(--panel-70);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.chat-msg.mine { align-self: flex-end; }
.chat-msg.mine .bubble { background: var(--mint-dim); border-color: rgba(116, 247, 178, 0.3); }
html[dir="rtl"] .chat-msg.mine { align-self: flex-start; }

.chat-input-row { display: flex; gap: 10px; padding: 16px; border-top: 1px solid var(--line-soft); }
.chat-input-row .input { border-radius: var(--r-pill); }

/* ---------- Code blocks ---------- */
.code-block {
  background: #03040c;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  direction: ltr;
  text-align: left;
  color: #c9d4e3;
}
.code-block .k { color: var(--mint); }
.code-block .s { color: var(--amber); }
.code-block .c { color: var(--muted); }

/* ---------- Article ---------- */
.article-body { font-size: 17px; line-height: 1.85; color: #cfd6e2; }
.article-body h2 { margin: 48px 0 16px; }
.article-body h3 { margin: 36px 0 12px; }
.article-body p { margin-bottom: 20px; }
.article-body ul { margin: 0 0 20px 24px; }
.article-body li { margin-bottom: 8px; }
.article-body blockquote {
  border-inline-start: 3px solid var(--mint);
  padding-inline-start: 20px;
  color: var(--muted);
  margin: 28px 0;
}

/* ---------- Toast ---------- */
.toast-stack { position: fixed; top: 88px; inset-inline-end: 24px; z-index: 120; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--panel);
  border: 1px solid var(--mint);
  color: var(--text);
  border-radius: var(--r-md);
  padding: 14px 20px;
  font-size: 14px;
  min-width: 260px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.45s var(--ease-spring);
}
.toast.err { border-color: var(--danger); }
@keyframes toast-in { from { transform: translateX(30px); opacity: 0; } }
html[dir="rtl"] .toast { animation-name: toast-in-rtl; }
@keyframes toast-in-rtl { from { transform: translateX(-30px); opacity: 0; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); background: var(--panel-40); padding: 72px 0 40px; margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; }
.footer-col h4 { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.footer-col a { display: block; color: #c9d4e3; text-decoration: none; font-size: 14px; margin-bottom: 10px; transition: color 0.25s; }
.footer-col a:hover { color: var(--mint); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

/* ---------- Filter bar ---------- */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; }
.chip {
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all 0.25s;
}
.chip:hover { color: var(--text); border-color: var(--text); }
.chip.active { background: var(--mint); color: #01102e; border-color: var(--mint); font-weight: 700; }

/* ---------- Empty / loading states ---------- */
.loading-dots { display: inline-flex; gap: 5px; }
.loading-dots i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--mint);
  animation: dot-bounce 0.8s infinite;
}
.loading-dots i:nth-child(2) { animation-delay: -0.27s; }
.loading-dots i:nth-child(3) { animation-delay: -0.53s; }
@keyframes dot-bounce { 0%, 100% { transform: scale(0.75); opacity: 0.4; } 50% { transform: scale(1); opacity: 1; } }

.empty-state { text-align: center; padding: 64px 24px; color: var(--muted); }

/* ---------- Reveal on scroll ---------- */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
[data-reveal].revealed { opacity: 1; transform: none; }

/* ---------- Chart canvases ---------- */
.chart-box { width: 100%; height: 260px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .orbit-stage { max-width: 380px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .section { padding: 64px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .ledger-row { grid-template-columns: 40px 1fr auto; }
  .ledger-row .hide-m { display: none; }
  .header-status { display: none; }
  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-0);
    border-bottom: 1px solid var(--line);
    padding: 16px 24px 24px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .nav-toggle {
    display: grid;
    place-items: center;
    width: 42px; height: 42px;
    background: none; border: 1px solid var(--line); border-radius: 12px;
    color: var(--text); cursor: pointer; font-size: 18px;
  }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}
