/* Ifá Corpus Command Center — "Ọpọ́n" design system
   Sacred Earth palette: mahogany depths, gold light, ember heat, adire indigo. */

:root {
  --canvas: #120A05;
  --sunk: #0C0603;
  --surface: #1A100A;
  --raised: #22160E;
  --overlay: #2B1C12;
  --line: rgba(232, 198, 110, .09);
  --line-2: rgba(232, 198, 110, .16);
  --line-3: rgba(232, 198, 110, .28);
  --text: #F4E8D2;
  --text-2: #CDB896;
  --text-3: #A08A6C;
  --gold: #D4A843;
  --gold-hi: #EACB78;
  --gold-soft: rgba(212, 168, 67, .13);
  --gold-glow: rgba(212, 168, 67, .32);
  --on-gold: #1A0F06;
  --ember: #D0612F;
  --ember-deep: #8A3B12;
  --indigo: #7F8FD8;
  --clay: #B98A62;
  --ok: #79C48B;
  --ok-soft: rgba(121, 196, 139, .13);
  --warn: #E5A83D;
  --warn-soft: rgba(229, 168, 61, .14);
  --bad: #EC6B55;
  --bad-soft: rgba(236, 107, 85, .14);
  --shadow: 0 18px 40px -22px rgba(0, 0, 0, .85);
  --hi: inset 0 1px 0 rgba(255, 236, 200, .045);
  --grid-line: rgba(232, 198, 110, .07);

  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-ui: "Figtree", "Segoe UI", system-ui, sans-serif;

  --r-xs: 6px; --r-sm: 9px; --r-md: 13px; --r-lg: 18px; --r-xl: 26px; --r-pill: 999px;
  --dur-i: 90ms; --dur-f: 160ms; --dur-b: 240ms; --dur-s: 480ms; --dur-h: 900ms;
  --ease: cubic-bezier(.16, 1, .3, 1); --ease-io: cubic-bezier(.65, 0, .35, 1);
  --side: 252px; --top: 64px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --canvas: #F3EBDD;
  --sunk: #EADFCC;
  --surface: #FBF6EE;
  --raised: #FFFDF9;
  --overlay: #FFFFFF;
  --line: rgba(74, 46, 22, .10);
  --line-2: rgba(74, 46, 22, .16);
  --line-3: rgba(74, 46, 22, .28);
  --text: #26170B;
  --text-2: #5B4431;
  --text-3: #7A624B;
  --gold: #9C7418;
  --gold-hi: #B8891F;
  --gold-soft: rgba(156, 116, 24, .12);
  --gold-glow: rgba(156, 116, 24, .22);
  --on-gold: #FFF8EA;
  --ember: #B34E1E;
  --indigo: #4B5CA8;
  --clay: #8E6440;
  --ok: #2E8A4A; --ok-soft: rgba(46, 138, 74, .12);
  --warn: #A86A08; --warn-soft: rgba(168, 106, 8, .12);
  --bad: #C0392B; --bad-soft: rgba(192, 57, 43, .10);
  --shadow: 0 18px 40px -26px rgba(74, 46, 22, .45);
  --hi: inset 0 1px 0 rgba(255, 255, 255, .7);
  --grid-line: rgba(74, 46, 22, .08);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--canvas); color: var(--text); font: 15px/1.5 var(--f-ui);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent; overflow-x: hidden;
}
body::after { /* grain */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 400; opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="light"] body::after { opacity: .05; mix-blend-mode: multiply; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--gold-soft); color: var(--text); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.num, .tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1, "lnum" 1; }
.muted { color: var(--text-2); } .subtle { color: var(--text-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ── Boot ─────────────────────────────────────────────────────────────── */
.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--canvas); }
.boot-mark { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--line-3); position: relative; animation: spin 2.4s linear infinite; }
.boot-mark::after { content: ""; position: absolute; top: -3px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 14px var(--gold); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Login ────────────────────────────────────────────────────────────── */
.login { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; overflow: auto; }
.login canvas, .login .login-fallback { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.login-fallback {
  background: radial-gradient(60% 50% at 30% 30%, rgba(208, 97, 47, .45), transparent 70%),
    radial-gradient(50% 60% at 75% 70%, rgba(212, 168, 67, .35), transparent 70%), #120A05;
  animation: drift 18s var(--ease-io) infinite alternate;
}
@keyframes drift { to { background-position: 40px -30px, -50px 40px, 0 0; filter: hue-rotate(-8deg); } }
.login-veil { position: fixed; inset: 0; z-index: 1; background: radial-gradient(80% 70% at 50% 50%, transparent 30%, rgba(8, 4, 1, .75) 100%); pointer-events: none; }
.login-card {
  position: relative; z-index: 2; width: min(420px, 100%); padding: 34px 30px 28px; border-radius: var(--r-xl);
  background: rgba(22, 13, 7, .52); backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid rgba(234, 203, 120, .20); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 236, 200, .08);
  color: #F4E8D2; animation: rise .7s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.login-brand .mark { width: 40px; height: 40px; }
.login-brand b { font: 500 19px/1.1 var(--f-display); color: #EACB78; letter-spacing: .01em; }
.login-brand span { display: block; font-size: 12.5px; color: #CDB896; }
.login h1 { font: 400 34px/1.08 var(--f-display); margin: 0 0 8px; letter-spacing: -.01em; font-variation-settings: "opsz" 96; }
.login p.lead { margin: 0 0 24px; color: #CDB896; font-size: 14.5px; }
.login .field input { background: rgba(10, 5, 2, .55); border-color: rgba(234, 203, 120, .18); color: #F4E8D2; }
.login .field label { color: #CDB896; }
.login-foot { margin-top: 18px; font-size: 12.5px; color: #A08A6C; display: flex; align-items: center; gap: 8px; }

/* ── Forms ────────────────────────────────────────────────────────────── */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.field .help { font-size: 12.5px; color: var(--text-3); }
.field .err { font-size: 12.5px; color: var(--bad); }
.input, .field input, .field select, .field textarea {
  width: 100%; height: 44px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: var(--sunk); color: var(--text); outline: none; transition: border-color var(--dur-f), box-shadow var(--dur-f);
}
.field textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.55; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.pw-wrap { position: relative; } .pw-wrap button { position: absolute; right: 6px; top: 6px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); cursor: pointer; transition: border-color var(--dur-f), background var(--dur-f); }
.check:hover { border-color: var(--line-2); }
.check.on { border-color: color-mix(in oklab, var(--gold) 55%, transparent); background: var(--gold-soft); }
.check input { accent-color: var(--gold); width: 16px; height: 16px; margin-top: 2px; }
.check b { display: block; font-weight: 600; font-size: 14px; } .check small { color: var(--text-3); font-size: 12.5px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--raised); color: var(--text);
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; user-select: none;
  transition: transform var(--dur-i) var(--ease), background var(--dur-f), border-color var(--dur-f), color var(--dur-f), opacity var(--dur-f);
}
.btn:hover { border-color: var(--line-3); background: var(--overlay); }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.primary { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--on-gold); border-color: transparent; box-shadow: 0 6px 18px -8px var(--gold-glow), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--gold-soft); color: var(--text); }
.btn.danger { color: var(--bad); border-color: color-mix(in oklab, var(--bad) 35%, transparent); background: transparent; }
.btn.danger:hover { background: var(--bad-soft); }
.btn.danger.solid { background: var(--bad); color: #fff; border-color: transparent; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.icon { width: 40px; padding: 0; } .btn.icon.sm { width: 32px; }
.btn.block { width: 100%; height: 48px; font-size: 15px; }
.btn .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
kbd { font: 600 11px/1 var(--f-ui); padding: 3px 6px; border-radius: 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; color: var(--text-3); background: var(--sunk); }

/* ── App shell ────────────────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.app.rail { --side: 76px; }
.side {
  position: sticky; top: 0; height: 100vh; background: var(--sunk); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 16px 12px; z-index: 20; transition: width var(--dur-b) var(--ease);
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 18px; min-height: 58px; }
.side-brand .mark { width: 34px; height: 34px; flex: none; }
.side-brand b { font: 500 16.5px/1.1 var(--f-display); color: var(--gold-hi); display: block; white-space: nowrap; }
.side-brand span { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.nav { display: grid; gap: 2px; overflow-y: auto; }
.nav-group { font-size: 12px; color: var(--text-3); padding: 14px 12px 6px; white-space: nowrap; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: var(--r-sm);
  color: var(--text-2); font-weight: 500; white-space: nowrap; transition: background var(--dur-f), color var(--dur-f);
}
.nav a:hover { background: color-mix(in oklab, var(--gold-soft) 60%, transparent); color: var(--text); }
.nav a.on { background: var(--gold-soft); color: var(--gold-hi); }
.nav a.on::before { content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.nav a .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--ember); color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.app.rail .side-brand div, .app.rail .nav-group, .app.rail .nav a span, .app.rail .side-foot .who { display: none; }
.app.rail .nav a { justify-content: center; padding: 0; } .app.rail .nav a .count { position: absolute; top: 3px; right: 6px; min-width: 16px; height: 16px; font-size: 10px; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.side-foot .who { min-width: 0; } .side-foot .who b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who span { font-size: 12px; color: var(--text-3); text-transform: capitalize; }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--on-gold);
  background: conic-gradient(from 200deg, var(--gold-hi), var(--ember), var(--gold)); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25); }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 15; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 28px;
  transition: background var(--dur-b), border-color var(--dur-b); border-bottom: 1px solid transparent;
}
.top.scrolled { background: color-mix(in oklab, var(--canvas) 78%, transparent); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border-bottom-color: var(--line); }
.top h1 { font: 400 22px/1 var(--f-display); margin: 0; letter-spacing: -.005em; white-space: nowrap; font-variation-settings: "opsz" 48; }
.top .spacer { flex: 1; }
.search-btn { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px 0 14px; min-width: 240px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text-3); cursor: pointer; transition: border-color var(--dur-f); }
.search-btn:hover { border-color: var(--line-3); color: var(--text-2); } .search-btn span { flex: 1; text-align: left; }
.live-pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: var(--r-pill); background: var(--ok-soft); color: var(--ok); font-weight: 600; font-size: 13px; white-space: nowrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; position: relative; }
.live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid currentColor; opacity: 0; animation: ping 2s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(1.8); opacity: 0; } }
.bell { position: relative; } .bell .dot { position: absolute; top: 7px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 2px var(--canvas); }

.page { padding: 8px 28px 60px; max-width: 1480px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 6px 0 22px; }
.page-head .t { flex: 1; min-width: 220px; }
.page-head h2 { font: 400 30px/1.1 var(--f-display); margin: 0 0 6px; letter-spacing: -.012em; font-variation-settings: "opsz" 72; }
.page-head p { margin: 0; color: var(--text-2); font-size: 14px; }
.enter > * { animation: rise .5s var(--ease) both; }
.enter > *:nth-child(2) { animation-delay: .05s; } .enter > *:nth-child(3) { animation-delay: .1s; } .enter > *:nth-child(4) { animation-delay: .15s; }
.enter > *:nth-child(5) { animation-delay: .2s; } .enter > *:nth-child(n+6) { animation-delay: .24s; }

/* ── Segmented / tabs ─────────────────────────────────────────────────── */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { position: relative; height: 32px; padding: 0 13px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--text-2); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; transition: color var(--dur-f); }
.seg button:hover { color: var(--text); }
.seg button.on { color: var(--on-gold); background: linear-gradient(180deg, var(--gold-hi), var(--gold)); box-shadow: 0 4px 14px -6px var(--gold-glow); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs button { position: relative; height: 42px; padding: 0 14px; background: none; border: 0; color: var(--text-2); font-weight: 600; cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--text); }
.tabs button.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.tabs button .n { margin-left: 6px; color: var(--text-3); font-weight: 500; }

/* ── Panels ───────────────────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; }
.c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
.panel {
  position: relative; background: linear-gradient(180deg, color-mix(in oklab, var(--surface) 100%, #fff 1.5%), var(--surface));
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--hi), var(--shadow); min-width: 0;
}
.panel.pad { padding: 20px 22px; }
.panel-h { display: flex; align-items: center; gap: 12px; padding: 18px 22px 0; }
.panel-h h3 { font-size: 15px; font-weight: 600; margin: 0; letter-spacing: .005em; }
.panel-h .sub { color: var(--text-3); font-size: 13px; }
.panel-h .act { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.panel-b { padding: 16px 22px 20px; }
.panel.flat { box-shadow: none; background: var(--surface); }

/* KPI strip */
.kpis { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); }
.kpi { padding: 20px 22px; position: relative; min-width: 0; }
.kpi + .kpi::before { content: ""; position: absolute; left: 0; top: 20px; bottom: 20px; width: 1px; background: var(--line); }
.kpi .l { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 7px; }
.kpi .l svg.ic { width: 15px; height: 15px; color: var(--text-3); }
.kpi .v { font: 600 30px/1.1 var(--f-ui); letter-spacing: -.025em; margin: 8px 0 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi .v .u { font-size: .58em; color: var(--text-3); font-weight: 500; letter-spacing: 0; margin-right: 2px; }
.delta { font-size: 12.5px; color: var(--text-3); display: inline-flex; gap: 5px; align-items: center; }
.delta b { font-weight: 700; } .delta.up b { color: var(--ok); } .delta.down b { color: var(--bad); }

/* Overview hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 18px; margin-bottom: 18px; }
.hero-rev { overflow: hidden; padding: 24px 26px 8px; isolation: isolate; min-height: 340px; display: flex; flex-direction: column; }
.hero-rev .glow { position: absolute; inset: -30%; z-index: -1; pointer-events: none; opacity: .55;
  background: radial-gradient(38% 42% at 18% 20%, rgba(208, 97, 47, .30), transparent 70%),
    radial-gradient(35% 40% at 82% 12%, rgba(212, 168, 67, .26), transparent 70%),
    radial-gradient(30% 35% at 60% 90%, rgba(138, 59, 18, .30), transparent 70%);
  animation: ember 22s var(--ease-io) infinite alternate; }
:root[data-theme="light"] .hero-rev .glow { opacity: .35; }
@keyframes ember { 50% { transform: translate(3%, 2%) rotate(4deg) scale(1.05); } 100% { transform: translate(-3%, -2%) rotate(-3deg) scale(1.02); } }
.hero-rev .l { color: var(--text-2); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.hero-num { font: 400 64px/1 var(--f-display); letter-spacing: -.025em; margin: 12px 0 10px; font-variant-numeric: lining-nums tabular-nums; font-variation-settings: "opsz" 144; white-space: nowrap; }
.hero-num .u { font-size: .5em; color: var(--gold); margin-right: 4px; vertical-align: .32em; }
.hero-num .d { font-size: .45em; color: var(--text-3); }
.hero-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; color: var(--text-2); }
.hero-meta b { color: var(--text); font-weight: 600; }
.hero-chart { margin: auto -26px 0; }

/* Ọpọ́n live tray (signature) */
.opon { padding: 20px 22px; display: flex; flex-direction: column; align-items: center; overflow: hidden; }
.opon-h { align-self: stretch; display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.opon-h h3 { margin: 0; font-size: 15px; font-weight: 600; }
.opon-tray { position: relative; width: min(270px, 100%); aspect-ratio: 1; margin: 6px 0 10px; }
.opon-tray svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.opon-ring { transform-origin: 50% 50%; animation: spin 120s linear infinite; }
.opon-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; pointer-events: none; }
.opon-center b { display: block; font: 400 56px/1 var(--f-display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.opon-center span { font-size: 13px; color: var(--text-2); }
.seed { transition: transform 1.2s var(--ease), opacity .6s; }
.seed circle.core { fill: var(--gold-hi); }
.seed circle.halo { fill: var(--gold); opacity: .25; animation: breathe 2.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes breathe { 50% { opacity: .05; transform: scale(1.8); } }
.opon-list { align-self: stretch; display: grid; gap: 6px; font-size: 13px; }
.opon-list div { display: flex; justify-content: space-between; gap: 10px; color: var(--text-2); }
.opon-list div b { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Activity feed */
.feed { display: grid; }
.feed-i { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: center; cursor: pointer; }
.feed-i:last-child { border-bottom: 0; }
.feed-i:hover .ft { color: var(--gold-hi); }
.feed-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.feed-ic.payment { background: var(--ok-soft); color: var(--ok); } .feed-ic.checkout { background: var(--gold-soft); color: var(--gold); }
.feed-ic.lead { background: color-mix(in oklab, var(--indigo) 16%, transparent); color: var(--indigo); }
.feed-b { min-width: 0; flex: 1; } .ft { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color var(--dur-f); }
.fd { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-r { text-align: right; flex: none; } .feed-r .amt { font-weight: 600; font-variant-numeric: tabular-nums; } .feed-r .time { font-size: 12px; color: var(--text-3); }

/* Status */
.st { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.st.ok { color: var(--ok); } .st.warn { color: var(--warn); } .st.bad { color: var(--bad); } .st.info { color: var(--indigo); } .st.gold { color: var(--gold); } .st.dim { color: var(--text-3); }
.st.dim::before { box-shadow: none; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; background: var(--overlay); border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.chip.gold { background: var(--gold-soft); color: var(--gold-hi); border-color: transparent; }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip button { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; display: grid; }

/* ── Tables ───────────────────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { position: sticky; top: 0; text-align: left; font-size: 12.5px; font-weight: 600; color: var(--text-3); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
.tbl th.sort { cursor: pointer; user-select: none; } .tbl th.sort:hover { color: var(--text-2); }
.tbl th .arr { opacity: 0; margin-left: 4px; } .tbl th.sort:hover .arr, .tbl th.sorted .arr { opacity: 1; } .tbl th.sorted { color: var(--gold); }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background var(--dur-i); }
.tbl tbody tr.click { cursor: pointer; } .tbl tbody tr.click:hover { background: color-mix(in oklab, var(--raised) 80%, transparent); }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .who b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.tbl .who span { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 260px; }
.person { display: flex; align-items: center; gap: 11px; min-width: 0; }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); gap: 10px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.search { position: relative; flex: 1 1 240px; max-width: 360px; }
.search svg.ic { position: absolute; left: 12px; top: 11px; color: var(--text-3); }
.search input { width: 100%; height: 40px; padding: 0 12px 0 38px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--sunk); outline: none; }
.search input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
select.input { height: 40px; border-radius: var(--r-pill); width: auto; padding: 0 34px 0 14px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A08A6C' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.cards-m { display: none; }

/* ── Bars & lists ─────────────────────────────────────────────────────── */
.bars { display: grid; gap: 4px; }
.bar-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 36px; padding: 0 12px; border-radius: var(--r-xs); font-size: 13.5px; overflow: hidden; }
.bar-row .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: var(--r-xs); background: var(--gold-soft); transform-origin: left; animation: grow .8s var(--ease) both; }
.bar-row.alt .fill { background: color-mix(in oklab, var(--ember) 16%, transparent); }
.bar-row.ind .fill { background: color-mix(in oklab, var(--indigo) 16%, transparent); }
@keyframes grow { from { transform: scaleX(0); } }
.bar-row span, .bar-row b { position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row b { font-weight: 600; font-variant-numeric: tabular-nums; flex: none; }
.bar-row small { color: var(--text-3); font-weight: 500; margin-left: 6px; }
.flag { display: inline-grid; place-items: center; width: 26px; height: 18px; border-radius: 4px; font-size: 10px; font-weight: 700; background: var(--overlay); color: var(--text-2); border: 1px solid var(--line); margin-right: 8px; letter-spacing: .04em; }

/* funnel */
.funnel { display: grid; gap: 10px; }
.fstep { display: grid; grid-template-columns: minmax(150px, 220px) 1fr 70px; align-items: center; gap: 14px; font-size: 13.5px; }
.fstep .ft2 b { display: block; font-weight: 600; } .fstep .ft2 span { font-size: 12px; color: var(--text-3); }
.fbar { height: 30px; border-radius: 8px; background: var(--sunk); position: relative; overflow: hidden; border: 1px solid var(--line); }
.fbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; background: linear-gradient(90deg, var(--ember-deep), var(--ember) 40%, var(--gold)); transform-origin: left; animation: grow 1s var(--ease) both; }
.fbar em { position: absolute; left: 10px; top: 5px; font-style: normal; font-weight: 700; font-size: 13px; color: #FFF3DC; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); font-variant-numeric: tabular-nums; }
.fstep .pct { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-2); }

/* ── Charts ───────────────────────────────────────────────────────────── */
.chart { position: relative; width: 100%; user-select: none; touch-action: pan-y; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .gridl { stroke: var(--grid-line); stroke-width: 1; }
.chart .axis { fill: var(--text-3); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.1s var(--ease) .1s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .area { opacity: 0; animation: fadein .9s var(--ease) .35s forwards; }
@keyframes fadein { to { opacity: 1; } }
.chart .cross { stroke: var(--line-3); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .dotp { stroke: var(--surface); stroke-width: 2.5; }
.chart .colb { transform-box: fill-box; transform-origin: bottom; animation: rise-bar .7s var(--ease) both; transition: opacity var(--dur-f); }
@keyframes rise-bar { from { transform: scaleY(0); } }
.chart.hovering .colb { opacity: .45; } .chart.hovering .colb.hot { opacity: 1; }
.tip { position: absolute; pointer-events: none; z-index: 5; padding: 10px 12px; border-radius: 12px; min-width: 130px;
  background: color-mix(in oklab, var(--overlay) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-2); box-shadow: var(--shadow); transform: translate(-50%, -110%); transition: left 60ms linear, top 60ms linear; }
.tip b { display: block; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tip span { display: block; font-size: 12px; color: var(--text-3); }
.tip i { font-style: normal; font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.tip i::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c, var(--gold)); }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; background: var(--c); }

/* ── States ───────────────────────────────────────────────────────────── */
.skel { background: linear-gradient(90deg, var(--raised) 0%, color-mix(in oklab, var(--raised), #fff 5%) 50%, var(--raised) 100%); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; border-radius: var(--r-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { display: grid; place-items: center; text-align: center; padding: 42px 20px; color: var(--text-2); gap: 10px; }
.empty .em-art { width: 84px; height: 84px; opacity: .9; }
.empty b { color: var(--text); font-size: 15.5px; font-weight: 600; } .empty p { margin: 0; max-width: 380px; font-size: 13.5px; }
.errbox { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r-md); background: var(--bad-soft); color: var(--bad); font-size: 14px; }
.note { padding: 12px 14px; border-radius: var(--r-md); background: var(--gold-soft); color: var(--text-2); font-size: 13.5px; display: flex; gap: 10px; }
.note svg.ic { color: var(--gold); margin-top: 1px; }

/* ── Overlays ─────────────────────────────────────────────────────────── */
.scrim { position: fixed; inset: 0; z-index: 100; background: rgba(8, 4, 1, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fadein .18s ease forwards; opacity: 0; }
.drawer { position: fixed; z-index: 101; top: 10px; right: 10px; bottom: 10px; width: min(560px, calc(100vw - 20px)); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8);
  animation: slidein .32s var(--ease) both; overflow: hidden; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }
.drawer-h { display: flex; align-items: flex-start; gap: 14px; padding: 22px 22px 16px; border-bottom: 1px solid var(--line); }
.drawer-h h3 { margin: 0; font: 400 24px/1.15 var(--f-display); word-break: break-word; }
.drawer-b { padding: 18px 22px 28px; overflow-y: auto; flex: 1; }
.modal { position: fixed; z-index: 101; left: 50%; top: 50%; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow-y: auto;
  transform: translate(-50%, -50%); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .85);
  animation: pop .22s var(--ease) both; }
.modal.wide { width: min(720px, calc(100vw - 24px)); }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -48%) scale(.96); } }
.modal-h { padding: 22px 24px 4px; } .modal-h h3 { margin: 0 0 6px; font: 400 24px/1.2 var(--f-display); } .modal-h p { margin: 0; color: var(--text-2); font-size: 14px; }
.modal-b { padding: 18px 24px; } .modal-f { padding: 14px 24px 22px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.secret { font: 600 18px/1.4 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .06em; padding: 14px 16px; border-radius: var(--r-md); background: var(--sunk); border: 1px dashed var(--line-3); text-align: center; word-break: break-all; color: var(--gold-hi); }

/* palette */
.palette { position: fixed; z-index: 120; left: 50%; top: 12vh; width: min(640px, calc(100vw - 24px)); transform: translateX(-50%);
  background: color-mix(in oklab, var(--overlay) 92%, transparent); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .85); overflow: hidden; animation: popt .16s var(--ease) both; }
@keyframes popt { from { opacity: 0; transform: translateX(-50%) scale(.96); } }
.palette-in { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.palette-in input { flex: 1; height: 58px; border: 0; background: none; outline: none; font-size: 17px; }
.palette-l { max-height: min(420px, 60vh); overflow-y: auto; padding: 8px; }
.palette-g { font-size: 12px; color: var(--text-3); padding: 10px 12px 4px; }
.palette-i { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); cursor: pointer; }
.palette-i.on { background: var(--gold-soft); } .palette-i.on .pt { color: var(--gold-hi); }
.palette-i .pt { font-weight: 600; font-size: 14.5px; } .palette-i .ps { font-size: 12.5px; color: var(--text-3); }
.palette-i .pk { margin-left: auto; }
.palette-f { display: flex; gap: 14px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); }

/* menu */
.menu-w { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 220px; padding: 6px; border-radius: var(--r-md);
  background: var(--overlay); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: popm .16s var(--ease) both; transform-origin: top right; }
.menu.up { top: auto; bottom: calc(100% + 8px); left: 0; right: auto; transform-origin: bottom left; }
@keyframes popm { from { opacity: 0; transform: scale(.95) translateY(-4px); } }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: var(--r-sm); font-size: 14px; cursor: pointer; text-align: left; color: var(--text); }
.menu button:hover, .menu a:hover { background: var(--gold-soft); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu .danger { color: var(--bad); }

/* toasts */
.toasts { position: fixed; z-index: 200; right: 18px; bottom: 18px; display: grid; gap: 10px; width: min(380px, calc(100vw - 36px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border-radius: var(--r-md); background: var(--overlay); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: toastin .35s var(--ease) both; font-size: 14px; }
.toast.out { animation: toastout .2s ease forwards; }
@keyframes toastin { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes toastout { to { opacity: 0; transform: translateY(6px); } }
.toast .ti { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--gold-soft); color: var(--gold); }
.toast.success .ti { background: var(--ok-soft); color: var(--ok); } .toast.danger .ti { background: var(--bad-soft); color: var(--bad); } .toast.warn .ti { background: var(--warn-soft); color: var(--warn); }
.toast b { display: block; font-weight: 600; } .toast span { color: var(--text-2); font-size: 13px; }
.toast .tx { flex: 1; min-width: 0; } .toast a { color: var(--gold-hi); font-weight: 600; font-size: 13px; }

/* switch */
.switch { position: relative; width: 40px; height: 24px; flex: none; border-radius: 12px; background: var(--overlay); border: 1px solid var(--line-2); cursor: pointer; transition: background var(--dur-f); padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-3); transition: transform var(--dur-b) var(--ease), background var(--dur-f); }
.switch.on { background: var(--gold); border-color: transparent; } .switch.on::after { transform: translateX(16px); background: var(--on-gold); }

/* settings layout */
.set { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 2fr); gap: 28px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.set:last-child { border-bottom: 0; }
.set h4 { margin: 0 0 6px; font-size: 15px; font-weight: 600; } .set p { margin: 0; color: var(--text-3); font-size: 13.5px; }
.alert-row { display: grid; grid-template-columns: 1fr 70px 70px; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.alert-row.h { font-size: 12px; color: var(--text-3); padding-top: 0; } .alert-row .sw { display: grid; place-items: center; }
.alert-row small { display: block; color: var(--text-3); font-size: 12.5px; }

/* health */
.health { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.hcard { padding: 14px 16px; border-radius: var(--r-md); background: var(--raised); border: 1px solid var(--line); display: grid; gap: 4px; }
.hcard.down { border-color: color-mix(in oklab, var(--bad) 45%, transparent); background: color-mix(in oklab, var(--bad) 7%, var(--raised)); }
.hcard .ht { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.hcard .hd { font-size: 12.5px; color: var(--text-3); }
.meter { height: 8px; border-radius: 4px; background: var(--sunk); overflow: hidden; border: 1px solid var(--line); }
.meter i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--gold), var(--gold-hi)); transform-origin: left; animation: grow 1s var(--ease) both; }
.meter.low i { background: linear-gradient(90deg, var(--bad), var(--warn)); }
.bal { display: grid; gap: 10px; }
.bal-v { font: 400 38px/1 var(--f-display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.bal-v .u { font-size: .55em; color: var(--gold); margin-right: 3px; }
.pl { display: grid; gap: 0; }
.pl div { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px dashed var(--line-2); font-size: 14px; }
.pl div b { font-variant-numeric: tabular-nums; font-weight: 600; } .pl div.tot { border-bottom: 0; font-size: 16px; } .pl div.tot b { font-size: 20px; }

/* timeline */
.tl { display: grid; gap: 0; position: relative; }
.tl-i { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding-bottom: 18px; position: relative; }
.tl-i::before { content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 1px; background: var(--line-2); }
.tl-i:last-child::before { display: none; }
.tl-d { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); border: 1px solid var(--line-2); }
.tl-d svg.ic { width: 15px; height: 15px; }
.tl-d.payment { color: var(--ok); } .tl-d.checkout { color: var(--gold); } .tl-d.lead { color: var(--indigo); }
.tl-b b { display: block; font-weight: 600; font-size: 14px; } .tl-b span { font-size: 12.5px; color: var(--text-3); }
.dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.dl div { padding: 12px 14px; border-radius: var(--r-md); background: var(--raised); border: 1px solid var(--line); }
.dl dt { font-size: 12px; color: var(--text-3); } .dl dd { margin: 3px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; word-break: break-word; }
.sec-t { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 20px 0 10px; }

/* bottom tab bar + sheet (mobile) */
.tabbar { display: none; }
.sheet { position: fixed; z-index: 101; left: 8px; right: 8px; bottom: 8px; max-height: 80vh; overflow-y: auto; padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, .8); animation: sheetin .3s var(--ease) both; }
@keyframes sheetin { from { transform: translateY(40px); opacity: 0; } }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line-3); margin: 2px auto 10px; }
.sheet a, .sheet button.item { display: flex; align-items: center; gap: 14px; width: 100%; height: 50px; padding: 0 14px; border-radius: var(--r-md); border: 0; background: none; font-size: 15px; font-weight: 500; color: var(--text); cursor: pointer; }
.sheet a.on { background: var(--gold-soft); color: var(--gold-hi); }
.sheet a:active, .sheet button.item:active { background: var(--gold-soft); }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr; }
  .c3 { grid-column: span 6; } .c4, .c5, .c7, .c8 { grid-column: span 12; } .c6 { grid-column: span 12; }
  .search-btn { min-width: 0; } .search-btn span, .search-btn kbd { display: none; }
}
@media (max-width: 860px) {
  .app, .app.rail { grid-template-columns: 1fr; }
  .side { display: none; }
  .top { padding: 0 14px; height: 58px; padding-top: env(safe-area-inset-top); height: calc(58px + env(safe-area-inset-top)); }
  .top h1 { font-size: 20px; }
  .page { padding: 4px 14px calc(96px + env(safe-area-inset-bottom)); }
  .page-head { margin: 4px 0 16px; } .page-head h2 { font-size: 25px; }
  .grid { gap: 12px; } .c3 { grid-column: span 12; }
  .kpis { grid-template-columns: repeat(var(--n, 4), minmax(170px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .kpis::-webkit-scrollbar { display: none; }
  .kpi { scroll-snap-align: start; padding: 16px 18px; } .kpi .v { font-size: 26px; }
  .hero-num { font-size: 50px; } .hero-rev { padding: 20px 18px 6px; min-height: 300px; } .hero-chart { margin: auto -18px 0; }
  .panel-h { padding: 16px 16px 0; } .panel-b { padding: 14px 16px 16px; } .panel.pad { padding: 16px; }
  .tbl-wrap.m-cards { display: none; } .cards-m { display: grid; }
  .mcard { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
  .mcard:last-child { border-bottom: 0; } .mcard .mm { flex: 1; min-width: 0; }
  .mcard .mm b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mcard .mm span { display: block; font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mcard .mr { text-align: right; flex: none; font-size: 13px; } .mcard .mr b { display: block; font-variant-numeric: tabular-nums; }
  .set { grid-template-columns: 1fr; gap: 14px; }
  .fstep { grid-template-columns: 1fr 58px; } .fstep .ft2 { grid-column: 1 / -1; } .fstep .fbar { grid-column: 1; }
  .dl { grid-template-columns: 1fr 1fr; }
  .drawer { top: auto; left: 6px; right: 6px; bottom: 6px; width: auto; max-height: 92vh; border-radius: var(--r-xl); animation: sheetin .32s var(--ease) both; }
  .toasts { bottom: calc(86px + env(safe-area-inset-bottom)); right: 12px; left: 12px; width: auto; }
  .tabbar { display: flex; position: fixed; z-index: 30; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); height: 64px; padding: 6px;
    border-radius: 22px; background: color-mix(in oklab, var(--surface) 82%, transparent); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid var(--line-2); box-shadow: 0 20px 50px -18px rgba(0, 0, 0, .8); }
  .tabbar a, .tabbar button { flex: 1; display: grid; place-items: center; gap: 2px; padding-top: 6px; border: 0; background: none; color: var(--text-3); font-size: 11px; font-weight: 600; border-radius: 16px; position: relative; cursor: pointer; }
  .tabbar a.on { color: var(--gold-hi); background: var(--gold-soft); }
  .tabbar svg.ic { width: 21px; height: 21px; }
  .tabbar .count { position: absolute; top: 4px; right: calc(50% - 20px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--ember); color: #fff; font-size: 10px; display: grid; place-items: center; padding: 0 4px; }
  .hide-m { display: none !important; }
  .opon-tray { width: min(230px, 80%); }
}
@media (min-width: 861px) { .show-m { display: none !important; } }
@media (max-width: 380px) { .hero-num { font-size: 42px; } .dl { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .chart .draw { stroke-dashoffset: 0; }
}
.set > div, .grid > *, .hero > * { min-width: 0; }
.feed, .bars, .tl, .funnel, .health, .pl { grid-template-columns: minmax(0, 1fr); }
.health { grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }
.feed-i, .bar-row, .tl-i > *, .fstep > * { min-width: 0; }
