/* ============================================================================
   Platform Cab — Design System  ·  "Universal Intelligence"
   A universal marketplace and platform by TRIZIST™  ·  www.trizist.com
   Design tokens + liquid animation flow + dark/light modes
   ============================================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Brand palette — derived from the U-cube mark (violet → magenta → green → lime) */
  --brand-violet: #6d28d9;
  --brand-violet-2: #7c3aed;
  --brand-magenta: #c026d3;
  --brand-green: #10b981;
  --brand-lime: #a3e635;
  --brand-cyan: #22d3ee;

  --ink: #0b0a1a;
  --ink-2: #1c1a33;
  --text: #16142b;
  --text-muted: #5b5878;
  --text-faint: #8b88a6;

  --surface: #ffffff;
  --surface-2: #f7f6fb;
  --surface-3: #efedf7;
  --border: #e4e1f0;
  --border-strong: #cfcadf;

  --success: #059669;
  --warning: #c2740a;
  --danger: #dc2626;
  --info: #2563eb;

  /* Typography */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Sora', var(--font-sans);
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

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

  /* Radii */
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 26px; --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(18, 12, 45, .06);
  --shadow-md: 0 6px 20px -6px rgba(18, 12, 45, .16);
  --shadow-lg: 0 24px 60px -20px rgba(18, 12, 45, .30);

  /* Brand gradients */
  --grad-brand: linear-gradient(120deg, var(--brand-violet) 0%, var(--brand-magenta) 42%, var(--brand-green) 100%);
  --grad-brand-soft: linear-gradient(120deg, rgba(109,40,217,.10), rgba(192,38,211,.09), rgba(16,185,129,.10));
  --grad-liquid: linear-gradient(135deg, #6d28d9 0%, #c026d3 30%, #22d3ee 62%, #10b981 100%);

  /* Motion */
  --ease-liquid: cubic-bezier(.22, 1, .36, 1);
  --dur-fast: .18s; --dur: .34s; --dur-slow: .7s;

  --header-h: 68px;
  color-scheme: light;
}

[data-theme='dark'] {
  --ink: #f4f2ff;
  --ink-2: #d9d5f0;
  --text: #ece9fb;
  --text-muted: #a6a1c6;
  --text-faint: #8079a6;

  --surface: #0e0c1d;
  --surface-2: #15122a;
  --surface-3: #1d1a37;
  --border: #2a2547;
  --border-strong: #3b3461;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.5);
  --shadow-md: 0 6px 24px -6px rgba(0,0,0,.6);
  --shadow-lg: 0 30px 70px -24px rgba(0,0,0,.75);
  --grad-brand-soft: linear-gradient(120deg, rgba(124,58,237,.20), rgba(192,38,211,.16), rgba(16,185,129,.16));
  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--surface);
  color: var(--text);
  line-height: 1.55;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background var(--dur) var(--ease-liquid), color var(--dur) var(--ease-liquid);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -.02em; font-weight: 700; }
:focus-visible { outline: 2px solid var(--brand-magenta); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(124,58,237,.28); }

/* ---------- Layout ---------- */
.wrap { width: min(1240px, 92vw); margin-inline: auto; }
.wrap-narrow { width: min(880px, 92vw); margin-inline: auto; }
.section { padding-block: var(--space-8); }
.section-tight { padding-block: var(--space-7); }
.grid { display: grid; gap: var(--space-5); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.center { text-align: center; }
.mono { font-family: var(--font-mono); }

/* ---------- Eyebrow / headings ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand-violet-2); font-family: var(--font-mono);
}
[data-theme='dark'] .eyebrow { color: var(--brand-lime); }
.h-display { font-size: clamp(2.2rem, 5.2vw, 4rem); }
.h-1 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
.h-2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.h-3 { font-size: 1.15rem; }
.lead { font-size: 1.08rem; color: var(--text-muted); max-width: 62ch; }
.grad-text { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 20px; border-radius: var(--r-pill);
  font-weight: 650; font-size: .93rem; white-space: nowrap;
  border: 1px solid transparent; position: relative; overflow: hidden;
  transition: transform var(--dur-fast) var(--ease-liquid), box-shadow var(--dur) var(--ease-liquid),
              background var(--dur) var(--ease-liquid), border-color var(--dur) var(--ease-liquid), color var(--dur) var(--ease-liquid);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled], .btn[aria-busy='true'] { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-md); background-size: 160% 160%; }
.btn-primary:hover { box-shadow: var(--shadow-lg); background-position: 90% 50%; transform: translateY(-1px); }
.btn-ink { background: var(--ink); color: var(--surface); }
[data-theme='dark'] .btn-ink { background: var(--brand-violet-2); color: #fff; }
.btn-ink:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.btn-outline:hover { border-color: var(--brand-violet-2); color: var(--brand-violet-2); }
[data-theme='dark'] .btn-outline:hover { color: var(--brand-lime); border-color: var(--brand-lime); }
.btn-ghost { color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: .84rem; }
.btn-lg { padding: 15px 30px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn .spinner { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: var(--r-pill); font-size: .72rem; font-weight: 650;
  background: var(--surface-3); color: var(--text-muted); border: 1px solid var(--border);
  white-space: nowrap;
}
.badge-verified { background: rgba(16,185,129,.13); color: var(--success); border-color: rgba(16,185,129,.30); }
.badge-new { background: rgba(37,99,235,.12); color: var(--info); border-color: rgba(37,99,235,.28); }
.badge-featured { background: var(--grad-brand-soft); color: var(--brand-violet-2); border-color: rgba(124,58,237,.30); }
[data-theme='dark'] .badge-featured { color: var(--brand-lime); }
.badge-demo { background: rgba(194,116,10,.14); color: var(--warning); border-color: rgba(194,116,10,.30); }
.badge-digital { background: rgba(34,211,238,.14); color: #0891b2; border-color: rgba(34,211,238,.30); }
.badge-subscription { background: rgba(192,38,211,.13); color: var(--brand-magenta); border-color: rgba(192,38,211,.28); }
.badge-enterprise { background: rgba(109,40,217,.13); color: var(--brand-violet); border-color: rgba(109,40,217,.28); }
[data-theme='dark'] .badge-enterprise { color: var(--brand-violet-2); }
.badge-pending { background: rgba(194,116,10,.13); color: var(--warning); }
.badge-active { background: rgba(5,150,105,.13); color: var(--success); }
.badge-uai { background: var(--ink); color: var(--brand-lime); border-color: transparent; font-family: var(--font-mono); }
[data-theme='dark'] .badge-uai { background: var(--surface-3); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden; position: relative;
  transition: transform var(--dur) var(--ease-liquid), box-shadow var(--dur) var(--ease-liquid), border-color var(--dur) var(--ease-liquid);
}
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.card-pad { padding: var(--space-5); }
.card-glass { background: color-mix(in srgb, var(--surface) 78%, transparent); backdrop-filter: blur(14px); }

/* Liquid sheen sweep on hover */
.sheen::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.35) 48%, transparent 62%);
  transform: translateX(-120%); transition: transform var(--dur-slow) var(--ease-liquid);
}
.sheen:hover::after { transform: translateX(120%); }
[data-theme='dark'] .sheen::after { background: linear-gradient(115deg, transparent 30%, rgba(163,230,53,.14) 48%, transparent 62%); }

/* ---------- Thumb / media ---------- */
.thumb {
  aspect-ratio: 16/10; position: relative; overflow: hidden;
  background: var(--grad-brand-soft); display: grid; place-items: center;
}
.thumb i { font-size: 2.6rem; color: var(--brand-violet-2); opacity: .55; }
[data-theme='dark'] .thumb i { color: var(--brand-lime); }
.thumb-lg { aspect-ratio: 4/3; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 70; height: var(--header-h);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: var(--space-5); }
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-display); font-weight: 750; font-size: 1.06rem; letter-spacing: -.03em; }
.brand-sub { font-size: .62rem; letter-spacing: .15em; text-transform: uppercase; color: var(--text-faint); font-family: var(--font-mono); }

.nav-main { display: flex; align-items: center; gap: 2px; flex: 1; overflow: hidden; }
.nav-link {
  padding: 8px 12px; border-radius: var(--r-sm); font-size: .9rem; font-weight: 550;
  color: var(--text-muted); position: relative; white-space: nowrap;
  transition: color var(--dur-fast), background var(--dur-fast);
}
.nav-link:hover, .nav-link[aria-current='page'] { color: var(--text); background: var(--surface-2); }
.nav-link[aria-current='page']::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px;
  background: var(--grad-brand); border-radius: 2px;
}
.header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  color: var(--text-muted); transition: background var(--dur-fast), color var(--dur-fast);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.burger { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: var(--space-8) var(--space-7); }
.hero::before {
  content: ''; position: absolute; inset: -30% -10% auto; height: 620px; z-index: -2;
  background:
    radial-gradient(46% 60% at 22% 30%, rgba(124,58,237,.30), transparent 70%),
    radial-gradient(42% 58% at 78% 22%, rgba(192,38,211,.26), transparent 70%),
    radial-gradient(40% 60% at 55% 85%, rgba(16,185,129,.22), transparent 70%);
  filter: blur(8px);
  animation: drift 22s var(--ease-liquid) infinite alternate;
}
@keyframes drift {
  0% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(2%, -3%, 0) scale(1.06); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.02); }
}
.hero-cube {
  position: absolute; right: -60px; top: 40px; width: 380px; z-index: -1;
  opacity: .9; filter: drop-shadow(0 30px 60px rgba(124,58,237,.35));
  animation: float 9s var(--ease-liquid) infinite alternate;
}
@keyframes float { from { transform: translateY(-10px) rotate(-3deg); } to { transform: translateY(14px) rotate(3deg); } }
.hero-inner { max-width: 760px; }

/* ---------- Universal search ---------- */
.search-shell { position: relative; margin-top: var(--space-5); }
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--r-pill);
  padding: 7px 7px 7px 20px; box-shadow: var(--shadow-md);
  transition: border-color var(--dur), box-shadow var(--dur), transform var(--dur) var(--ease-liquid);
}
.search-bar:focus-within { border-color: var(--brand-violet-2); box-shadow: 0 0 0 5px rgba(124,58,237,.14), var(--shadow-lg); transform: translateY(-1px); }
.search-bar input { flex: 1; border: none; outline: none; background: none; color: var(--text); font-size: 1rem; padding: 9px 0; }
.search-bar input::placeholder { color: var(--text-faint); }
.search-clear { color: var(--text-faint); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.search-clear:hover { background: var(--surface-2); color: var(--text); }
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 10px); z-index: 40;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); overflow: hidden; display: none;
  animation: dropIn var(--dur) var(--ease-liquid);
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.suggest.open { display: block; }
.suggest-group { padding: 8px 0; border-bottom: 1px solid var(--border); }
.suggest-group:last-child { border-bottom: none; }
.suggest-label { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); padding: 4px 18px; font-family: var(--font-mono); }
.suggest-item { display: flex; align-items: center; gap: 12px; padding: 10px 18px; cursor: pointer; transition: background var(--dur-fast); }
.suggest-item:hover, .suggest-item[data-active='true'] { background: var(--surface-2); }
.suggest-item i { color: var(--brand-violet-2); width: 18px; }
[data-theme='dark'] .suggest-item i { color: var(--brand-lime); }
.suggest-item .si-sub { font-size: .78rem; color: var(--text-faint); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: var(--space-4); }
.chip {
  padding: 7px 14px; border-radius: var(--r-pill); border: 1px solid var(--border-strong);
  font-size: .84rem; color: var(--text-muted); background: var(--surface);
  transition: all var(--dur-fast) var(--ease-liquid);
}
.chip:hover { border-color: var(--brand-violet-2); color: var(--brand-violet-2); transform: translateY(-1px); }
.chip.active { background: var(--ink); color: var(--surface); border-color: transparent; }

/* ---------- Stats strip ---------- */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
.stat { padding: var(--space-5); border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--border); }
.stat-num { font-family: var(--font-display); font-size: 1.9rem; font-weight: 750; letter-spacing: -.03em; }
.stat-lab { font-size: .8rem; color: var(--text-muted); }

/* ---------- Product card ---------- */
.pcard { display: flex; flex-direction: column; }
.pcard .thumb { position: relative; }
.pcard-body { padding: var(--space-4) var(--space-4) var(--space-5); display: flex; flex-direction: column; gap: 9px; flex: 1; }
.pcard-title { font-family: var(--font-display); font-weight: 650; font-size: 1.02rem; letter-spacing: -.01em; }
.pcard-meta { font-size: .82rem; color: var(--text-faint); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.pcard-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 6px; }
.price { font-family: var(--font-display); font-weight: 700; font-size: 1.06rem; }
.price small { font-weight: 500; font-size: .74rem; color: var(--text-faint); display: block; }
.pcard-actions { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; z-index: 2; }
.pill-icon {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(8px);
  color: var(--text-muted); border: 1px solid var(--border);
  transition: all var(--dur-fast) var(--ease-liquid);
}
.pill-icon:hover { color: var(--brand-magenta); transform: scale(1.08); }
.pill-icon.on { color: var(--brand-magenta); background: rgba(192,38,211,.14); border-color: rgba(192,38,211,.3); }

/* ---------- Facets / filter panel ---------- */
.layout-split { display: grid; grid-template-columns: 268px 1fr; gap: var(--space-6); align-items: start; }
.facets { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: var(--space-5); }
.facet { border-bottom: 1px solid var(--border); padding-bottom: var(--space-4); }
.facet:last-child { border-bottom: none; }
.facet-title { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.facet-opt { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: .88rem; cursor: pointer; color: var(--text-muted); }
.facet-opt:hover { color: var(--text); }
.facet-opt input { accent-color: var(--brand-violet-2); width: 15px; height: 15px; }
.facet-opt .count { margin-left: auto; font-size: .74rem; color: var(--text-faint); font-family: var(--font-mono); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-5); }

/* ---------- Select / input ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .82rem; font-weight: 600; color: var(--text-muted); }
.field .help { font-size: .76rem; color: var(--text-faint); }
.field .err { font-size: .76rem; color: var(--danger); display: none; }
.field.invalid .err { display: block; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.input, .select, .textarea {
  width: 100%; padding: 11px 14px; border-radius: var(--r-md);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  transition: border-color var(--dur), box-shadow var(--dur);
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand-violet-2); box-shadow: 0 0 0 4px rgba(124,58,237,.13); }
.req { color: var(--brand-magenta); }

/* ---------- Toggle ---------- */
.toggle { display: inline-flex; align-items: center; gap: 11px; cursor: pointer; font-size: .9rem; }
.toggle input { display: none; }
.track { width: 42px; height: 24px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background var(--dur) var(--ease-liquid); flex-shrink: 0; }
.track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease-liquid); }
.toggle input:checked + .track { background: var(--grad-brand); }
.toggle input:checked + .track::after { transform: translateX(18px); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab {
  padding: 11px 16px; font-size: .9rem; font-weight: 600; color: var(--text-muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
  transition: color var(--dur-fast), border-color var(--dur-fast);
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-color: var(--brand-magenta); }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); background: var(--surface-2); font-weight: 700; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: none; }

/* ---------- Accordion ---------- */
.acc { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.acc-item { border-bottom: 1px solid var(--border); }
.acc-item:last-child { border-bottom: none; }
.acc-head { width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px 20px; text-align: left; font-weight: 600; transition: background var(--dur-fast); }
.acc-head:hover { background: var(--surface-2); }
.acc-head .chev { margin-left: auto; transition: transform var(--dur) var(--ease-liquid); color: var(--text-faint); }
.acc-item.open .acc-head .chev { transform: rotate(180deg); }
.acc-body { display: none; padding: 0 20px 20px; color: var(--text-muted); font-size: .92rem; }
.acc-item.open .acc-body { display: block; animation: dropIn var(--dur) var(--ease-liquid); }
.acc-body ul { margin: 8px 0 0 18px; }
.acc-body li { margin: 5px 0; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: min(360px, 90vw); }
.toast {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  animation: toastIn var(--dur) var(--ease-liquid); font-size: .89rem;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.toast.out { animation: toastOut var(--dur) var(--ease-liquid) forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }
.toast i { margin-top: 1px; }
.toast.success i { color: var(--success); } .toast.info i { color: var(--info); }
.toast.warning i { color: var(--warning); } .toast.error i { color: var(--danger); }
.toast-title { font-weight: 650; }

/* ---------- Modal / drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(11,10,26,.55); backdrop-filter: blur(3px); z-index: 120; opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease-liquid); }
.overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  position: fixed; z-index: 130; left: 50%; top: 50%; transform: translate(-50%, -46%) scale(.97);
  width: min(520px, 92vw); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: all var(--dur) var(--ease-liquid); max-height: 88vh; overflow: auto;
}
.modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.modal-head { padding: 22px 24px 0; display: flex; align-items: flex-start; gap: 12px; }
.modal-body { padding: 16px 24px; }
.modal-foot { padding: 0 24px 22px; display: flex; gap: 10px; justify-content: flex-end; }
.drawer {
  position: fixed; z-index: 130; top: 0; bottom: 0; right: 0; width: min(420px, 94vw);
  background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform var(--dur) var(--ease-liquid); display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head { padding: 20px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.drawer-body { padding: 20px 22px; overflow: auto; flex: 1; }
.drawer-foot { padding: 18px 22px; border-top: 1px solid var(--border); }

/* ---------- Progress / stepper ---------- */
.stepper { display: flex; gap: 6px; margin-bottom: var(--space-6); }
.step { flex: 1; text-align: center; font-size: .76rem; color: var(--text-faint); position: relative; padding-top: 22px; }
.step::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 100%; height: 3px; background: var(--border); border-radius: 3px; }
.step:first-child::before { left: 50%; width: 100%; }
.step.done::before, .step.active::before { background: var(--grad-brand); }
.step.active { color: var(--text); font-weight: 650; }

/* ---------- Empty / skeleton ---------- */
.empty { text-align: center; padding: var(--space-8) var(--space-5); display: grid; place-items: center; gap: var(--space-4); }
.empty i { font-size: 2.6rem; color: var(--text-faint); }
.skeleton { background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface-3) 50%, var(--surface-2) 70%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r-md); }
@keyframes shimmer { to { background-position: -200% 0; } }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease-liquid), transform .6s var(--ease-liquid); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface-2); padding-block: var(--space-7) var(--space-5); margin-top: var(--space-8); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: var(--space-6); }
.footer-col h4 { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 14px; font-family: var(--font-mono); }
.footer-col a { display: block; font-size: .88rem; color: var(--text-muted); padding: 5px 0; transition: color var(--dur-fast); }
.footer-col a:hover { color: var(--text); }
.footer-bottom { margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; align-items: center; font-size: .84rem; color: var(--text-faint); }
.footer-note { font-size: .82rem; color: var(--text-faint); max-width: 34ch; }
.social { display: flex; gap: 8px; }

/* ---------- Bottom mobile nav ---------- */
.bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px);
  border-top: 1px solid var(--border); padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}
.bottom-nav ul { display: flex; list-style: none; padding: 0; }
.bottom-nav li { flex: 1; }
.bottom-nav a { display: grid; place-items: center; gap: 3px; padding: 6px; font-size: .66rem; color: var(--text-muted); border-radius: var(--r-sm); }
.bottom-nav a[aria-current='page'] { color: var(--brand-violet-2); }
[data-theme='dark'] .bottom-nav a[aria-current='page'] { color: var(--brand-lime); }
.bottom-nav a i { font-size: 1.05rem; }

/* ---------- Hero wordmark ---------- */
.wordmark { font-family: var(--font-display); font-weight: 800; letter-spacing: -.045em; }
.align-banner { display: flex; align-items: center; gap: var(--space-5); padding: var(--space-5); border-radius: var(--r-xl); background: var(--grad-brand-soft); border: 1px solid var(--border); }

/* ---------- Prose ---------- */
.prose h2 { margin-top: var(--space-6); margin-bottom: 12px; font-size: 1.4rem; }
.prose h3 { margin-top: var(--space-5); margin-bottom: 8px; font-size: 1.1rem; }
.prose p { margin-bottom: 14px; color: var(--text-muted); }
.prose ul { margin: 12px 0 16px 20px; color: var(--text-muted); }
.prose li { margin: 6px 0; }
.prose strong { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .g-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr repeat(2, 1fr); }
}
@media (max-width: 920px) {
  .nav-main { display: none; }
  .burger { display: grid; }
  .layout-split { grid-template-columns: 1fr; }
  .facets { position: static; }
  .hero::before { filter: blur(14px); }
}
@media (max-width: 760px) {
  .g-3, .g-2 { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .g-4 { grid-template-columns: 1fr; }
  .hero-cube { width: 240px; right: -70px; opacity: .55; }
  .bottom-nav { display: block; }
  body { padding-bottom: 68px; }
  .desktop-only { display: none !important; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding-block: var(--space-7); }
}
@media (min-width: 761px) { .mobile-only { display: none !important; } }

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