:root {
  --bg: #090C08;
  --ink: #EAEAEA;
  --lav: #CBC5EA;
  --primary: #454E9E;
  --accent: #AF1B3F;
  --panel: rgba(14, 18, 12, 0.58);
  --line: rgba(203, 197, 234, 0.14);
  --font: "Nevanta", "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-oblique: "Nevanta Oblique", "Nevanta", "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.5s;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

#gl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

/* ---------- animated aurora background ----------
   Each blob is a pre-softened gradient that only ever moves by `transform`,
   so the whole background is composited on the GPU: no blur filters and no
   mix-blend-mode, which forced a full re-blur of every frame. */
#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, #0c1020 0%, var(--bg) 60%);
}

#bg .aurora {
  position: absolute;
  border-radius: 50%;
  opacity: 0.72;
  will-change: transform;
  pointer-events: none;
}

#bg .a1 {
  width: 60vw; height: 60vw;
  left: -15vw; top: -20vw;
  background: radial-gradient(closest-side, rgba(69, 78, 158, 0.85), rgba(69, 78, 158, 0.32) 42%, transparent 100%);
  animation: drift1 26s ease-in-out infinite;
}
#bg .a2 {
  width: 55vw; height: 55vw;
  right: -18vw; top: -12vw;
  background: radial-gradient(closest-side, rgba(175, 27, 63, 0.7), rgba(175, 27, 63, 0.24) 42%, transparent 100%);
  animation: drift2 32s ease-in-out infinite;
}
#bg .a3 {
  width: 50vw; height: 50vw;
  left: 25vw; bottom: -22vw;
  background: radial-gradient(closest-side, rgba(137, 117, 197, 0.66), rgba(137, 117, 197, 0.22) 42%, transparent 100%);
  animation: drift3 38s ease-in-out infinite;
}
#bg .a4 {
  width: 34vw; height: 34vw;
  left: 12vw; top: 32vh;
  background: radial-gradient(closest-side, rgba(198, 106, 151, 0.5), rgba(198, 106, 151, 0.16) 42%, transparent 100%);
  animation: drift4 30s ease-in-out infinite;
}
#bg .a5 {
  width: 28vw; height: 28vw;
  right: 8vw; top: 40vh;
  background: radial-gradient(closest-side, rgba(69, 78, 158, 0.8), rgba(69, 78, 158, 0.26) 42%, transparent 100%);
  animation: drift5 24s ease-in-out infinite;
}

@keyframes drift1 {
  0%, 100% { transform: translate3d(0, 0, 0); }
  33% { transform: translate3d(10vw, 8vh, 0); }
  66% { transform: translate3d(-6vw, 14vh, 0); }
}
@keyframes drift2 {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-12vw, 10vh, 0); }
}
@keyframes drift3 {
  0%, 100% { transform: translate3d(0, 0, 0); }
  40% { transform: translate3d(8vw, -12vh, 0); }
  75% { transform: translate3d(-10vw, -4vh, 0); }
}
@keyframes drift4 {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(14vw, 6vh, 0); }
}
@keyframes drift5 {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-8vw, -10vh, 0); }
}

#bg .stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(203, 197, 234, 0.8), transparent 55%),
    radial-gradient(1px 1px at 70% 15%, rgba(203, 197, 234, 0.6), transparent 55%),
    radial-gradient(2px 2px at 45% 60%, rgba(203, 197, 234, 0.5), transparent 55%),
    radial-gradient(1px 1px at 85% 45%, rgba(255, 255, 255, 0.6), transparent 55%),
    radial-gradient(1.5px 1.5px at 10% 70%, rgba(203, 197, 234, 0.55), transparent 55%),
    radial-gradient(1px 1px at 60% 85%, rgba(255, 255, 255, 0.5), transparent 55%),
    radial-gradient(2px 2px at 90% 80%, rgba(203, 197, 234, 0.6), transparent 55%),
    radial-gradient(1px 1px at 35% 12%, rgba(255, 255, 255, 0.7), transparent 55%);
  opacity: 0.5;
  animation: twinkle 9s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.65; }
}

@media (max-width: 720px) {
  /* two of the five blobs are enough on a small screen */
  #bg .a4, #bg .a5 { display: none; }
  #bg .a1 { width: 96vw; height: 96vw; left: -34vw; top: -36vw; }
  #bg .a2 { width: 92vw; height: 92vw; right: -38vw; top: 10vh; }
  #bg .a3 { width: 100vw; height: 100vw; left: -6vw; bottom: -46vw; }
}

@media (prefers-reduced-motion: reduce) {
  #bg .aurora, #bg .stars { animation: none; }
}

/* ---------- topup converter ---------- */
.conv-panel { display: grid; gap: 14px; }
.conv-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.conv-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(9, 12, 8, 0.45);
  color: var(--lav);
  font-family: var(--font);
  font-size: 14px;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
}
.conv-chip img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.conv-chip:hover { color: var(--ink); border-color: rgba(203, 197, 234, 0.35); }
.conv-chip.active {
  color: var(--ink);
  background: linear-gradient(135deg, rgba(69, 78, 158, 0.55), rgba(69, 78, 158, 0.2));
  box-shadow: inset 0 0 0 1px rgba(203, 197, 234, 0.25), 0 4px 18px rgba(69, 78, 158, 0.35);
}
.conv-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}
.conv-input { position: relative; }
.conv-input input {
  width: 100%;
  padding-right: 86px;
}
.conv-asset {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--lav);
  background: rgba(69, 78, 158, 0.25);
  border-radius: 8px;
  padding: 4px 10px;
}
.conv-arrow { color: var(--lav); display: flex; }
.conv-arrow svg { width: 22px; height: 22px; }
.conv-out { display: grid; gap: 4px; padding-left: 4px; }
.conv-tokens { font-size: 24px; font-weight: 700; }
.conv-usd { font-size: 14px; }
.conv-price { display: flex; align-items: center; gap: 8px; font-size: 13px; }
@media (max-width: 720px) {
  .conv-row { grid-template-columns: 1fr; }
  .conv-arrow { justify-content: center; transform: rotate(90deg); }
}

#vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 10%, transparent 40%, rgba(9, 12, 8, 0.55) 100%),
    linear-gradient(to top, rgba(9, 12, 8, 0.8), transparent 30%);
}

#grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='120' height='120' filter='url(%23n)' opacity='0.6'/></svg>");
}

.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.muted { color: var(--lav); opacity: 0.75; }

/* ---------- topbar ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px clamp(16px, 4vw, 48px);
  mask-image: linear-gradient(to bottom, black 70%, transparent);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  box-shadow: 0 0 24px rgba(69, 177, 255, 0.58);
}
.brand-name {
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav {
  position: relative;
  display: flex;
  gap: 4px;
  margin-left: auto;
  padding: 5px;
  border-radius: 99px;
  background: rgba(14, 18, 12, 0.62);
  border: 1px solid var(--line);
  /* the only backdrop blur left on the site: one small bar over scrolling text */
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 99px;
  color: var(--lav);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.03em;
  transition: color var(--dur) var(--ease-out), background var(--dur) var(--ease-out), box-shadow var(--dur);
}
.nav-link svg { width: 15px; height: 15px; }
.nav-link:hover { color: var(--ink); }
.nav-link.active {
  color: var(--ink);
  background: linear-gradient(135deg, rgba(69, 78, 158, 0.55), rgba(69, 78, 158, 0.2));
  box-shadow: inset 0 0 0 1px rgba(203, 197, 234, 0.25), 0 4px 18px rgba(69, 78, 158, 0.35);
}
.topbar-right { display: flex; align-items: center; gap: 10px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s, background 0.25s, border-color 0.25s;
}
.btn svg { width: 15px; height: 15px; }
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #5a63c4);
  border-color: transparent;
  box-shadow: 0 8px 30px rgba(69, 78, 158, 0.45);
}
.btn-primary:hover { box-shadow: 0 10px 42px rgba(69, 78, 158, 0.7); transform: translateY(-1px); }
.btn-ghost { background: rgba(16, 20, 14, 0.66); }
.btn-ghost:hover { border-color: rgba(203, 197, 234, 0.4); }
.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--lav);
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}
.icon-btn:disabled { opacity: 0.45; cursor: default; }
.icon-btn svg { width: 16px; height: 16px; }

/* ---------- pages ---------- */
#stage { position: relative; z-index: 10; height: 100dvh; }
:root { --header-h: 100px; }
.page {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  padding: 96px clamp(20px, 6vw, 96px) 72px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
.page.active { visibility: visible; opacity: 1; pointer-events: auto; }
.page-inner {
  width: min(680px, 100%);
  display: grid;
  gap: 26px;
  transition: transform 0.7s var(--ease-out), opacity 0.7s var(--ease-out), filter 0.7s;
  transform: translateY(26px);
  filter: blur(6px);
}
.page.active .page-inner { transform: translateY(0); filter: blur(0); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--lav);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.eyebrow svg { width: 14px; height: 14px; }
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: #7CFF9B;
  box-shadow: 0 0 12px #7CFF9B;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.display {
  margin: 0;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.display em, .page-head em {
  font-family: var(--font-oblique);
  font-style: italic;
  font-weight: 400;
  color: transparent;
  background: linear-gradient(120deg, var(--lav), var(--primary) 60%, var(--accent));
  background-clip: text;
  -webkit-background-clip: text;
}
.lede {
  margin: 0;
  max-width: 52ch;
  color: var(--lav);
  font-size: 16px;
  line-height: 1.65;
}
.lede code {
  font-size: 13px;
  padding: 2px 7px;
  border-radius: 7px;
  background: rgba(69, 78, 158, 0.25);
  border: 1px solid var(--line);
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.page-head h2 {
  margin: 0;
  font-size: clamp(34px, 4.5vw, 54px);
  font-weight: 900;
  letter-spacing: -0.01em;
}

/* ---------- home scroll ---------- */
.page-scroll {
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: var(--header-h) clamp(16px, 5vw, 72px) 110px;
  scroll-behavior: smooth;
}
.page-scroll.active { align-content: unset; }
.page-scroll::-webkit-scrollbar { width: 6px; }
.page-scroll::-webkit-scrollbar-thumb { background: rgba(203, 197, 234, 0.2); border-radius: 9px; }
.page-scroll::-webkit-scrollbar-track { background: transparent; }

.home-hero {
  max-width: 1200px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 52px;
}
.home-hero-text { display: grid; gap: 18px; }
@media (max-width: 980px) {
  .home-hero { grid-template-columns: 1fr; gap: 28px; max-width: 720px; }
}
.home-hero-text { min-width: 0; }
/* ---------- hero badge (the "40× less" / "The value table" chip) ----------
   The original frosted-glass chip: a translucent tint, a blurred backdrop and
   a fine grain. The lights inside are gradient circles placed once and then
   moved by transform/opacity only, so nothing here lays out, paints or
   re-blurs per frame. */
.display .hero-savings {
  display: inline-block;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  vertical-align: middle;
  padding: .12em .19em .16em;
  border: 1px solid rgba(234, 234, 234, .24);
  border-radius: .24em;
  font-weight: 700;
  font-style: normal;
  white-space: nowrap;
  color: #EAEAEA;
  background: rgba(203, 197, 234, .08);
  background-clip: padding-box;
  -webkit-background-clip: padding-box;
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  box-shadow: inset 0 1px 0 rgba(234, 234, 234, .25), inset 0 -1px 12px rgba(9, 12, 8, .25), 0 8px 24px rgba(9, 12, 8, .2);
  text-shadow: 0 2px 5px rgba(9, 12, 8, .45);
}
.hero-savings > span { position: relative; z-index: 4; }
.display .models-title-glass { white-space: normal; max-width: 100%; }
.hero-savings .num { letter-spacing: -.065em; }
.hero-savings-label { font-size: .8em; }

.savings-glow {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: .9;
}
.savings-glow > i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--c) 0%, var(--c-soft) 46%, transparent 100%);
  will-change: transform, opacity;
  transform: translate(-50%, -50%);
  animation: light-drift var(--t) ease-in-out var(--d) infinite alternate;
}
/* four soft colour washes + a wine glow, the way light sits behind frosted glass */
.savings-glow > i:nth-child(1) { --x: 20%; --y: 88%; --w: 3.4em; --h: 2.6em; --c: rgba(203, 197, 234, .62);  --c-soft: rgba(203, 197, 234, .2);  --t: 9s;   --d: -2s;  --lo: .6;  --hi: 1;   --dx: .28em;  --dy: -.14em; }
.savings-glow > i:nth-child(2) { --x: 79%; --y: 12%; --w: 3.2em; --h: 2.4em; --c: rgba(198, 106, 151, .64);  --c-soft: rgba(198, 106, 151, .2);  --t: 11s;  --d: -6s;  --lo: .55; --hi: 1;   --dx: -.3em;  --dy: .16em; }
.savings-glow > i:nth-child(3) { --x: 34%; --y: 6%;  --w: 2.6em; --h: 2.2em; --c: rgba(69, 78, 158, .8);    --c-soft: rgba(69, 78, 158, .24);   --t: 8s;   --d: -4s;  --lo: .6;  --hi: 1;   --dx: .22em;  --dy: .12em; }
.savings-glow > i:nth-child(4) { --x: 63%; --y: 96%; --w: 2.8em; --h: 2.2em; --c: rgba(137, 117, 197, .66);  --c-soft: rgba(137, 117, 197, .21); --t: 10s;  --d: -1s;  --lo: .55; --hi: 1;   --dx: -.24em; --dy: -.14em; }
.savings-glow > i:nth-child(5) { --x: 51%; --y: 2%;  --w: 1.7em; --h: 1.5em; --c: rgba(175, 27, 63, .72);    --c-soft: rgba(175, 27, 63, .22);   --t: 7.4s; --d: -5s;  --lo: .45; --hi: .9;  --dx: -.16em; --dy: .12em; }
/* out-of-focus highlights: lavender and white bokeh */
.savings-glow > i:nth-child(6)  { --x: 8%;  --y: 32%; --w: .58em; --h: .58em; --c: rgba(236, 233, 250, .85); --c-soft: rgba(214, 208, 246, .24); --t: 5.2s; --d: -1s;   --lo: .3;  --hi: .95; --dx: .12em;  --dy: -.08em; }
.savings-glow > i:nth-child(7)  { --x: 27%; --y: 64%; --w: .76em; --h: .76em; --c: rgba(203, 197, 234, .7);  --c-soft: rgba(203, 197, 234, .2);  --t: 6.4s; --d: -3.2s; --lo: .35; --hi: .9;  --dx: -.14em; --dy: .1em; }
.savings-glow > i:nth-child(8)  { --x: 44%; --y: 22%; --w: .5em;  --h: .5em;  --c: rgba(244, 214, 228, .8);  --c-soft: rgba(232, 180, 204, .22); --t: 4.6s; --d: -.6s;  --lo: .25; --hi: .9;  --dx: .1em;   --dy: .1em; }
.savings-glow > i:nth-child(9)  { --x: 58%; --y: 72%; --w: .66em; --h: .66em; --c: rgba(203, 197, 234, .72); --c-soft: rgba(203, 197, 234, .2);  --t: 5.8s; --d: -2.4s; --lo: .3;  --hi: .95; --dx: -.12em; --dy: -.1em; }
.savings-glow > i:nth-child(10) { --x: 74%; --y: 34%; --w: .46em; --h: .46em; --c: rgba(240, 238, 250, .85); --c-soft: rgba(214, 208, 246, .24); --t: 4.2s; --d: -4.4s; --lo: .25; --hi: 1;   --dx: .1em;   --dy: -.08em; }
.savings-glow > i:nth-child(11) { --x: 92%; --y: 62%; --w: .7em;  --h: .7em;  --c: rgba(203, 197, 234, .68); --c-soft: rgba(203, 197, 234, .18); --t: 6s;   --d: -1.8s; --lo: .3;  --hi: .9;  --dx: -.12em; --dy: .08em; }
/* pin-points that twinkle */
.savings-glow > i:nth-child(12) { --x: 16%; --y: 18%; --w: .16em; --h: .16em; --c: rgba(255, 255, 255, 1);   --c-soft: rgba(226, 220, 255, .42); --t: 2.8s; --d: -1.2s; --lo: .15; --hi: 1; --dx: .03em;  --dy: -.03em; }
.savings-glow > i:nth-child(13) { --x: 36%; --y: 82%; --w: .14em; --h: .14em; --c: rgba(248, 240, 255, 1);   --c-soft: rgba(214, 190, 255, .42); --t: 3.4s; --d: -2.1s; --lo: .1;  --hi: 1; --dx: -.03em; --dy: -.04em; }
.savings-glow > i:nth-child(14) { --x: 52%; --y: 46%; --w: .13em; --h: .13em; --c: rgba(255, 255, 255, 1);   --c-soft: rgba(240, 226, 250, .42); --t: 2.4s; --d: -.4s;  --lo: .2;  --hi: 1; --dx: .03em;  --dy: .03em; }
.savings-glow > i:nth-child(15) { --x: 67%; --y: 12%; --w: .15em; --h: .15em; --c: rgba(255, 255, 255, 1);   --c-soft: rgba(226, 220, 255, .42); --t: 3.1s; --d: -1.6s; --lo: .15; --hi: 1; --dx: -.03em; --dy: .03em; }
.savings-glow > i:nth-child(16) { --x: 84%; --y: 78%; --w: .13em; --h: .13em; --c: rgba(250, 236, 244, 1);   --c-soft: rgba(236, 190, 214, .42); --t: 2.6s; --d: -.9s;  --lo: .15; --hi: 1; --dx: .03em;  --dy: -.03em; }
.savings-glow > i:nth-child(17) { --x: 96%; --y: 26%; --w: .14em; --h: .14em; --c: rgba(255, 255, 255, 1);   --c-soft: rgba(226, 220, 255, .42); --t: 3.6s; --d: -2.8s; --lo: .2;  --hi: 1; --dx: -.03em; --dy: -.03em; }
@keyframes light-drift {
  from { transform: translate(-50%, -50%) scale(.92); opacity: var(--lo); }
  to   { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.1); opacity: var(--hi); }
}
/* the fine grain of the glass */
.hero-savings::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  background: url("/assets/glass-grain.svg") repeat;
  background-size: 128px 128px;
  opacity: .48;
}
.page:not(.active) .savings-glow > i { animation-play-state: paused; }

.model-conveyor {
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.model-conveyor:focus-visible { outline: 2px solid var(--lav); outline-offset: 4px; }
.model-conveyor-track { display: flex; width: max-content; }
.model-conveyor-track.is-ready { animation: model-conveyor 32s linear infinite; }
.model-conveyor-group {
  display: flex;
  flex: none;
  align-items: center;
  gap: 22px;
  margin: 0;
  padding: 6px 22px 10px 0;
  list-style: none;
}
.model-conveyor-group li { display: flex; align-items: center; gap: 7px; color: var(--lav); font-size: 14px; white-space: nowrap; }
.model-conveyor-group img { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .3)); }
.model-conveyor:hover .model-conveyor-track,
.model-conveyor:focus-within .model-conveyor-track,
.page:not(.active) .model-conveyor-track { animation-play-state: paused; }
@keyframes model-conveyor { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .model-conveyor { overflow-x: auto; mask-image: none; -webkit-mask-image: none; }
  .model-conveyor-track.is-ready { animation: none; }
  .model-conveyor-group[aria-hidden="true"] { display: none; }
}
.home-section {
  max-width: 840px;
  margin: 0 auto 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}
.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.01em;
}
.section-sub {
  margin: 0;
  color: var(--lav);
  font-size: 15px;
  line-height: 1.7;
  max-width: 54ch;
}

.feature-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.feature {
  padding: 20px 22px;
  gap: 10px;
}
.feature svg { width: 22px; height: 22px; color: #7F88D9; }
.feature h3 { margin: 0; font-size: 16px; font-weight: 700; }
.feature p { margin: 0; color: var(--lav); font-size: 14px; line-height: 1.6; }

.compare-strip {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.explainer {
  padding: 26px 28px;
  gap: 14px;
  max-width: 860px;
}
.explainer h3 { margin: 0; font-size: 18px; font-weight: 700; }
.explainer p { margin: 0; color: var(--lav); font-size: 15px; line-height: 1.75; max-width: 68ch; }
.explainer p em { font-style: normal; color: var(--primary); font-weight: 600; }
.explainer-math {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 6px;
}
.explainer-math .kpi { padding: 16px 18px; }
.explainer-math .kpi b { font-size: 34px; }

.client-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 4px 0 0;
  list-style: none;
}
.client-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  min-width: 0;
  border: 1px solid rgba(203, 197, 234, .16);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(203, 197, 234, .09), rgba(9, 12, 8, .3));
  box-shadow: inset 0 1px 0 rgba(234, 234, 234, .06);
  transition: border-color .2s, background-color .2s;
}
.client-card:hover { border-color: rgba(203, 197, 234, .4); background-color: rgba(69, 78, 158, .12); }
.client-card img { width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 6px 5px rgba(0, 0, 0, .3)); }
.client-card div { display: grid; gap: 6px; }
.client-card b { font-size: 16px; color: var(--ink); }
.client-card span { font-size: 12px; color: var(--lav); }
.client-card-custom { border-style: dashed; }
.client-card-custom > svg { width: 72px; height: 72px; padding: 19px; color: var(--lav); stroke-width: 1.25; }
@media (max-width: 720px) {
  .client-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .client-card { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .client-card { transition: none; }
}
.chip {
  padding: 9px 16px;
  border-radius: 99px;
  font-size: 13px;
  border: 1px solid var(--line);
  background: rgba(14, 18, 12, 0.7);
  color: var(--lav);
}
.chip b { color: var(--ink); }

.faq-list { display: grid; gap: 12px; }
.faq {
  padding: 0;
  transition: box-shadow 0.3s;
}
.faq[open] { box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 30px rgba(69, 78, 158, 0.2); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq summary::after { content: "+"; font-size: 22px; color: var(--lav); transition: transform 0.25s; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0; padding: 0 22px 20px; color: var(--lav); font-size: 14px; line-height: 1.7; }

.home-cta {
  text-align: center;
  padding: 36px 0 0;
  border-top: 1px solid var(--line);
  margin-top: 0 !important;
}
.home-cta .section-sub { margin: 0 auto 8px; }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 14px; }

/* ---------- calculator ---------- */
.calc-card {
  padding: 34px 36px 30px;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 40px rgba(69, 78, 158, 0.25);
}
.calc { display: grid; gap: 22px; }
.calc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.calc-head b { font-size: 16px; letter-spacing: 0.04em; }
.calc-amount {
  font-family: "Space Grotesk", var(--font);
  font-feature-settings: "tnum";
  font-size: 48px;
  font-weight: 700;
  color: var(--lav);
  text-shadow: 0 0 24px rgba(69, 78, 158, 0.6);
}
.calc-amount output { font-size: inherit; }
.calc-scale {
  font-family: "Space Grotesk", var(--font);
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  color: var(--lav);
  opacity: 0.65;
  margin-top: -14px;
}
.calc-result {
  display: grid;
  gap: 4px;
  padding: 20px 22px;
  border-radius: 16px;
  background: rgba(69, 78, 158, 0.14);
  border: 1px solid var(--line);
}
.calc-result b {
  font-family: "Space Grotesk", var(--font);
  font-feature-settings: "tnum";
  font-size: 33px;
  font-weight: 700;
}
.calc-result span { font-size: 15px; color: var(--lav); }
.calc-rate-line { display: flex; align-items: center; gap: 8px; }
.calc-rate-line b {
  font-family: "Space Grotesk", var(--font);
  font-feature-settings: "tnum";
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}
.calc-result .mult {
  font-family: "Space Grotesk", var(--font);
  font-size: 21px;
  font-weight: 700;
  color: var(--lav);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 9px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 99px;
  background: var(--ink);
  border: 3px solid var(--primary);
  box-shadow: 0 0 18px rgba(69, 78, 158, 0.7);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 99px;
  background: var(--ink);
  border: 3px solid var(--primary);
  box-shadow: 0 0 18px rgba(69, 78, 158, 0.7);
  cursor: pointer;
}

/* ---------- numeric font ---------- */
.num, .kpi b {
  font-family: "Space Grotesk", var(--font);
  font-feature-settings: "tnum";
}
.mono {
  font-family: "JetBrains Mono", "Space Grotesk", monospace;
  font-feature-settings: "tnum";
  letter-spacing: 0.01em;
}

/* ---------- models value table ---------- */
.models-hero {
  max-width: none;
  min-height: calc(100dvh - 190px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 46px;
}
.models-hero .lede { margin: 0 auto; }
.models-scroll-cue { display: none; }
@media (min-width: 1024px) {
  .models-scroll-cue {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    margin: 32px auto 0;
    padding: 0;
    border: 1px solid rgba(203, 197, 234, .3);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 20%, rgba(203, 197, 234, .18), rgba(69, 78, 158, .12));
    color: var(--lav);
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
  }
  .models-scroll-cue svg { width: 48px; height: 48px; stroke-width: 1.5; }
  .models-scroll-cue:hover { background: rgba(69, 78, 158, .35); color: var(--ink); }
  .models-scroll-cue:focus-visible { outline: 2px solid var(--lav); outline-offset: 5px; }
}
.models-section { scroll-margin-top: 92px; }
.models-tools { justify-content: center; margin-top: 14px; }
.filter-chip { cursor: pointer; user-select: none; transition: all 0.25s var(--ease-out); }
.filter-chip.active {
  color: var(--ink);
  border-color: rgba(69, 78, 158, 0.7);
  background: linear-gradient(135deg, rgba(69, 78, 158, 0.45), rgba(69, 78, 158, 0.15));
  box-shadow: 0 4px 18px rgba(69, 78, 158, 0.35);
}
.model-cell { display: flex; align-items: center; gap: 13px; min-width: 0; }
/* ---------- models: cards on every screen ----------
   One card per model: logo + name on top, six figures in a 3×2 grid below.
   The grid fills with as many ~300px columns as fit (3 on a desktop, 2 on a
   tablet, 1 on a phone), and the sort bar sticks to the header while scrolling. */
.models-section { max-width: 1200px; }

/* the page scroller keeps its top padding inside the scrollport, so the
   offset is measured from under that padding: 100 - 22 = 78px on screen */
.models-toolbar {
  position: sticky;
  top: calc(78px - var(--header-h));
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(9, 12, 8, .94), rgba(9, 12, 8, .84));
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}
.models-search {
  position: relative;
  display: flex;
  align-items: center;
  order: 3;
  flex: 1 1 160px;
  max-width: 340px;
  min-width: 0;
}
.models-search svg {
  position: absolute;
  left: 13px;
  width: 18px;
  height: 18px;
  color: var(--lav);
  opacity: .75;
  pointer-events: none;
}
.models-search input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 42px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(9, 12, 8, .6);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.models-search input:focus { border-color: rgba(69, 78, 158, .85); box-shadow: 0 0 0 3px rgba(69, 78, 158, .25); }
.models-search input::placeholder { color: rgba(203, 197, 234, .45); }
.models-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* on wide screens the chip groups lay out directly in the toolbar;
   the wrapper only becomes a box (one sideways-scrolling row) on phones */
.models-chips { display: contents; }
.models-chips-break { display: none; flex-basis: 100%; height: 0; }
.models-chips-break.after-caps { display: block; order: 4; }
.models-sort, .models-caps, .models-vendors {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.models-vendors { order: 5; flex-wrap: wrap; }
/* a chip group never gets squeezed: it moves to the next line as a whole */
.models-sort, .models-caps { flex: none; }
.models-sort-label {
  margin-right: 4px;
  color: var(--lav);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.models-toolbar .chip { flex: 0 0 auto; box-sizing: border-box; min-height: 38px; padding: 8px 12px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.models-sort .chip::after { content: "↕"; margin-left: 6px; opacity: .5; }
.models-sort .chip.asc::after { content: "↑"; opacity: 1; }
.models-sort .chip.desc::after { content: "↓"; opacity: 1; }
.models-caps .chip svg { width: 18px; height: 18px; stroke-width: 2; }
.models-caps .chip { gap: 8px; padding: 8px 13px; font-size: 13px; }
.models-vendors .chip { padding: 4px 12px 4px 5px; }
.vendor-chip { gap: 9px; font-size: 13px; }
.vendor-chip img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 9px;
}
.vendor-chip:not(.active) img { opacity: .82; }

.models-status { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; min-height: 0; font-size: 13px; margin: -8px 4px 0; }
.models-status:empty { display: none; }
.models-status button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(203, 197, 234, .35);
  text-underline-offset: 3px;
  cursor: pointer;
}
.models-tbl tr.models-empty { display: block; padding: 36px 16px; text-align: center; color: var(--lav); font-size: 14px; }
.models-tbl tr.models-empty button { margin-left: 8px; color: var(--ink); font-family: var(--font); font-size: 14px; font-weight: 600; background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* narrower screens: search, sort and capabilities on the first line,
   the vendors on their own line below */
@media (max-width: 1300px) {
  .models-sort-label { display: none; }
  .models-search { order: -1; flex: 0 0 170px; max-width: none; }
}

/* ---- models toolbar on touch-sized screens (≤ 900px): one search field,
   then every chip in a single sideways-scrolling row ---- */
@media (max-width: 900px) {
  .models-toolbar {
    top: calc(var(--header-h) - 16px);
    display: block;
    padding: 8px;
    border-radius: 14px;
  }
  .models-search { order: 0; flex: none; max-width: none; }
  .models-search input { height: 38px; font-size: 16px; }
  .models-chips {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent);
  }
  .models-chips::-webkit-scrollbar { display: none; }
  .models-chips > * { display: contents; }
  .models-chips .chip { flex: 0 0 auto; }
  .models-sort-label { display: none; }
  .models-caps .chip:first-child, .models-vendors .chip:first-child { margin-left: 14px; }
  .models-chips-break { display: none; }
  .models-toolbar .chip { padding: 8px 12px; font-size: 12px; }
  .models-vendors .chip { padding: 4px 12px 4px 5px; }
}

.models-panel { padding: 12px 0 0; background: transparent; border: 0; box-shadow: none; overflow: visible; }
.models-tbl thead { display: none; }
.models-tbl, .models-tbl tbody { display: block; }
.models-tbl tbody {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.models-tbl tr {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 14px 12px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(234, 234, 234, .045), rgba(234, 234, 234, 0) 30%),
    rgba(13, 16, 11, 0.74);
  box-shadow: inset 0 1px 0 rgba(234, 234, 234, .07), 0 10px 26px rgba(0, 0, 0, .28);
  transition: border-color .2s, background-color .2s;
}
.models-tbl td { padding: 0; border: 0; }
.models-tbl td:first-child { grid-column: 1 / -1; padding-right: 96px; }
.models-tbl .model-cell { min-width: 0; gap: 12px; }
.models-tbl .mlogo { width: 44px; height: 44px; }
.models-tbl .model-names { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.models-tbl .model-names b { font-size: 15px; overflow-wrap: anywhere; }
.models-tbl .model-company { font-size: 11px; overflow-wrap: anywhere; }
.models-tbl td.num-col::before {
  content: attr(data-label);
  display: block;
  margin-bottom: 4px;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--lav);
  opacity: .7;
}
.models-tbl td.num-col .price { font-size: 15px; }
.models-tbl .price-official { opacity: .72; font-size: 14.5px; }
.models-tbl .price-na { opacity: .5; }
.models-tbl .skills-cell { position: absolute; top: 18px; right: 14px; }

.model-names { display: grid; gap: 1px; }
.model-names b { font-size: 14px; font-weight: 700; }
.model-company { font-size: 11px; color: var(--lav); opacity: 0.8; }
.model-company .mono { font-size: 10px; }

.mlogo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: transparent;
  flex-shrink: 0;
  color: #454e9e;
}
.mlogo-svg, .mlogo-img { width: 100%; height: 100%; object-fit: contain; }
.mlogo-img { filter: drop-shadow(0 5px 4px rgba(0, 0, 0, .3)); }
.mlogo-svg { fill: currentColor; }
.mlogo-fallback { position: relative; }
.mlogo-fallback::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.num-col {
  font-family: "Space Grotesk", var(--font);
  font-feature-settings: "tnum";
  white-space: nowrap;
}
.price { color: var(--lav); }
.price-hot {
  color: transparent;
  background: linear-gradient(120deg, #7CFF9B, var(--lav));
  background-clip: text;
  -webkit-background-clip: text;
  font-weight: 700;
}
.tok { font-weight: 700; }

.skills-cell { white-space: nowrap; }
.skill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  margin-right: 5px;
  border: 1px solid var(--line);
  background: rgba(203, 197, 234, 0.05);
  color: var(--lav);
}
.skill svg { width: 13px; height: 13px; }
/* phones repeat the skills under the name (see the phone layout) */
.model-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.model-company { min-width: 0; }
.model-skills-inline { display: none; flex: none; gap: 5px; }
.model-skills-inline:empty { display: none; }
.model-skills-inline .skill { margin-right: 0; }
.models-tbl .model-names { row-gap: 4px; }
.skill-brain {
  color: #CFFFD9;
  border-color: rgba(124, 255, 155, 0.3);
  background: rgba(124, 255, 155, 0.07);
}

.models-note { font-size: 12px; margin: 4px 6px 0; }

/* ---------- auth ---------- */
.auth-inner { width: min(460px, 100%); margin: 0 auto; }
.auth-card {
  padding: 30px 32px 24px;
  border-radius: 24px;
  display: grid;
  gap: 20px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.55), 0 0 44px rgba(69, 78, 158, 0.28);
  max-height: 85vh;
  overflow-y: auto;
}
.auth-head { display: flex; gap: 15px; align-items: center; }
.auth-head h2 { margin: 0; font-size: 26px; font-weight: 900; }
.auth-head p { margin: 3px 0 0; font-size: 13px; }
.auth-mark img {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  box-shadow: 0 0 26px rgba(69, 78, 158, 0.5);
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 5px;
  border-radius: 14px;
  background: rgba(9, 12, 8, 0.55);
  border: 1px solid var(--line);
}
.auth-tab {
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--lav);
  font-family: var(--font);
  font-size: 14px;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
}
.auth-tab.active {
  color: var(--ink);
  background: linear-gradient(135deg, rgba(69, 78, 158, 0.55), rgba(69, 78, 158, 0.2));
  box-shadow: inset 0 0 0 1px rgba(203, 197, 234, 0.25);
}
.auth-form { display: grid; gap: 14px; }
.auth-step { display: grid; gap: 14px; }
.btn-full { width: 100%; justify-content: center; }
.auth-hint { margin: -2px 0 0; font-size: 12px; text-align: center; }
.auth-hint a {
  color: var(--lav);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease, border-bottom-color 0.2s ease;
  border-bottom: 1px solid transparent;
}
.auth-hint a:hover {
  color: rgba(203, 197, 234, 0.85);
  border-bottom-color: rgba(203, 197, 234, 0.4);
}

.field { display: grid; gap: 7px; }
.field span {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lav);
}
.field input {
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(9, 12, 8, 0.55);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field input:focus {
  border-color: rgba(69, 78, 158, 0.8);
  box-shadow: 0 0 0 3px rgba(69, 78, 158, 0.25);
}
.field input::placeholder { color: rgba(203, 197, 234, 0.35); }
.totp-input {
  font-size: 24px !important;
  letter-spacing: 0.4em;
  text-align: center;
}

.auth-error {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #FFC2CC;
  background: rgba(175, 27, 63, 0.16);
  border: 1px solid rgba(175, 27, 63, 0.45);
}
.auth-ok {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #CFFFD9;
  background: rgba(124, 255, 155, 0.09);
  border: 1px solid rgba(124, 255, 155, 0.3);
}
.auth-foot {
  padding-top: 4px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12px;
}
.auth-card.busy { position: relative; }
.auth-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid rgba(69, 78, 158, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  opacity: 0;
  pointer-events: none;
}
.auth-card.busy .auth-spinner {
  opacity: 1;
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.auth-card.busy .auth-form,
.auth-card.busy #authError,
.auth-card.busy #authOk,
.auth-card.busy #turnstileBox {
  opacity: 0.3;
  pointer-events: none;
}

/* ---------- app pages (dash/topup/tickets/settings/guide/admin) ---------- */
.dash { max-width: 900px; }
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.dash-balance .balance-num {
  font-family: "Space Grotesk", var(--font);
  font-size: 52px;
  font-weight: 700;
  line-height: 1.05;
  display: block;
  margin: 10px 0 4px;
  text-shadow: 0 0 30px rgba(69, 78, 158, 0.5);
}
.dash-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 6px; }
.key-view {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(9, 12, 8, 0.6);
  border: 1px solid var(--line);
  font-size: 13px;
  word-break: break-all;
  color: var(--lav);
  margin-top: 10px;
}
.panel-title { margin: 0 0 8px; font-size: 16px; font-weight: 700; }


/* ---------- topup ---------- */
.turnstile-box { width: 100%; min-height: 70px; margin-top: 10px; display: flex; justify-content: center; }

.net-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.net-card {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  color: var(--ink);
  transition: all 0.25s var(--ease-out);
}
.net-card:hover { border-color: rgba(69, 78, 158, 0.7); transform: translateY(-2px); }
.net-card b { font-size: 17px; }
.net-card .muted { font-size: 12px; }
.net-icon-3d, .coin-icon-3d {
  display: inline-grid;
  place-items: center;
  perspective: 500px;
  transform-style: preserve-3d;
}
.net-icon-3d { width: 48px; height: 48px; margin-bottom: 6px; }
.coin-icon-3d { width: 24px; height: 24px; margin-right: 7px; vertical-align: middle; }
.net-icon-face, .coin-icon-face {
  display: grid;
  place-items: center;
  border-radius: 50%;
  transform: rotateX(10deg) rotateY(-14deg);
  transform-style: preserve-3d;
  background: linear-gradient(145deg, #fff, #c5c9e8 48%, #686fae);
  box-shadow: 5px 7px 0 #7379ac, 0 7px 18px rgba(69, 78, 158, .42);
}
.net-icon-face { width: 42px; height: 42px; padding: 3px; animation: coin-float 4s ease-in-out infinite; }
.coin-icon-face { width: 21px; height: 21px; padding: 2px; }
.net-icon-face img, .coin-icon-face img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
@keyframes coin-float { 0%, 100% { transform: rotateX(10deg) rotateY(-14deg) translateY(0); } 50% { transform: rotateX(10deg) rotateY(14deg) translateY(-3px); } }
.net-card:hover .net-icon-face { animation-duration: 2s; }
.net-icon-3d { width: 100%; height: 112px; }
.net-icon-face { width: 108px; height: 108px; padding: 0; }
.net-icon-face, .coin-icon-face { background: transparent; box-shadow: none; }
.net-icon-face img, .coin-icon-face img { border-radius: 0; filter: drop-shadow(0 12px 9px rgba(0, 0, 0, .3)); }
.page:not(.active) .net-icon-face { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .net-icon-face, .coin-icon-face { animation: none; }
  .net-card { transition: none; }
}

.topup-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.topup-tab {
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--muted-txt);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.topup-tab:hover { color: var(--ink); }
.topup-tab.active {
  color: var(--ink);
  border-bottom-color: var(--primary);
}

.topup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 16px;
  align-items: start;
}
.coin-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}
.coin-strip li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 13px;
  font-weight: 600;
  color: var(--lav);
}
.coin-strip li svg { width: 15px; height: 15px; }
.amount-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  cursor: pointer;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--lav);
  border-radius: 9px;
  padding: 7px 13px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.chip-btn:hover { border-color: var(--primary); color: var(--ink); }
.chip-btn.chip-on {
  border-color: var(--primary);
  color: var(--ink);
  box-shadow: 0 0 12px rgba(69, 78, 158, 0.5);
}

.payment-info {
  padding: 16px;
  background: rgba(69, 78, 158, 0.05);
  border-radius: 12px;
  margin-top: 12px;
}
.payment-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.payment-row:last-child { border-bottom: none; }
.payment-row .label {
  flex: 0 0 140px;
  color: var(--muted-txt);
  font-weight: 500;
}
.payment-row code {
  flex: 1;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  overflow-x: auto;
}
.addr-panel { margin-top: 4px; }
.req-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.req-create { display: grid; gap: 12px; }
.req-active { display: grid; gap: 12px; }
.req-active .addr-row { margin: 0; }
.addr-row { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.qr-box {
  background: #EAEAEA;
  padding: 10px;
  border-radius: 14px;
  line-height: 0;
}
.qr-box svg { width: 150px; height: 150px; }
.addr-copy { display: grid; gap: 10px; min-width: 240px; }
.addr-copy code {
  padding: 13px 16px;
  border-radius: 12px;
  background: rgba(9, 12, 8, 0.6);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  word-break: break-all;
  user-select: all;
}

/* ---------- tickets ---------- */
.tickets-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.ticket-list { display: grid; gap: 10px; }
.ticket-card { cursor: pointer; transition: all 0.25s var(--ease-out); }
.ticket-card:hover { border-color: rgba(69, 78, 158, 0.6); }
.ticket-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.thread-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.thread-head h3 { margin: 0; font-size: 18px; }
.thread-msgs {
  display: grid;
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
  padding: 4px;
}
.msg { padding: 12px 15px; border-radius: 14px; max-width: 85%; }
.msg p { margin: 4px 0 0; font-size: 14px; line-height: 1.55; }
.msg-head { font-size: 11px; color: var(--lav); opacity: 0.75; letter-spacing: 0.04em; }
.msg-user { background: rgba(69, 78, 158, 0.18); border: 1px solid rgba(69, 78, 158, 0.35); justify-self: end; }
.msg-admin { background: rgba(124, 255, 155, 0.07); border: 1px solid rgba(124, 255, 155, 0.25); }
.msg-system { background: rgba(203, 197, 234, 0.06); font-size: 12px; }
.thread-reply { display: grid; gap: 10px; margin-top: 12px; }
.thread-reply textarea, .field textarea, .field select {
  padding: 12px 15px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(9, 12, 8, 0.55);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  resize: vertical;
}
.thread-actions { display: flex; gap: 10px; }
textarea:focus, select:focus { border-color: rgba(69, 78, 158, 0.8) !important; }

/* ---------- guide ---------- */
.guide-os { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 2px; }
.guide-os-label { color: var(--lav); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.guide-os .guide-tabs { margin: 0; }
.guide-os .guide-client-icons img { width: 28px; height: 28px; }
.guide-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.guide-tabs .chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 7px; border-radius: 16px; }
.guide-client-icons { display: inline-flex; align-items: center; flex-shrink: 0; }
.guide-client-icons img { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .3)); }
.guide-client-icons img + img { margin-left: -10px; }
.guide-tabs .chip:focus-visible { outline: 2px solid var(--lav); outline-offset: 3px; }
.guide-panel { gap: 12px; }
.guide-panel h4 { margin: 6px 0 2px; font-size: 15px; }
.guide-panel p { margin: 0; color: var(--lav); font-size: 14px; line-height: 1.6; }
.guide-panel pre {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(9, 12, 8, 0.65);
  border: 1px solid var(--line);
  overflow-x: auto;
}
.guide-panel code { color: #CFFFD9; font-size: 13px; }
.guide-panel a, .faq a, .ticket-card a {
  color: var(--lav);
  text-decoration-color: rgba(203, 197, 234, .35);
  text-underline-offset: 3px;
  transition: color .2s, text-decoration-color .2s;
}
.guide-panel a:hover, .faq a:hover { color: var(--ink); text-decoration-color: currentColor; }

/* ---------- settings ---------- */
.cred-list { display: grid; gap: 8px; margin: 10px 0; }
.totp-setup { display: grid; gap: 12px; place-items: start; }
.totp-qr img, .totp-qr svg { border-radius: 12px; background: #EAEAEA; padding: 6px; }
.totp-qr svg { width: 180px; height: 180px; }
.totp-secret { display: grid; gap: 6px; max-width: 100%; }
.totp-secret-row { display: flex; gap: 8px; align-items: flex-start; }
.totp-secret code {
  word-break: break-all;
  user-select: all;
  font-size: 13px;
  line-height: 1.5;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(69, 78, 158, 0.35);
  background: rgba(9, 12, 8, 0.55);
  color: var(--ink);
}
.wd-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wd-row select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(120, 130, 200, 0.22);
  background: rgba(9, 12, 8, 0.55);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  outline: none;
}

/* ---------- admin ---------- */
.admin-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-search { max-width: 320px; }
.admin-tab { display: grid; gap: 16px; margin-top: 4px; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- auth extras ---------- */
.hash-code {
  display: block;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(9, 12, 8, 0.65);
  border: 1px solid rgba(69, 78, 158, 0.5);
  color: #CFFFD9;
  font-size: 13px;
  word-break: break-all;
  user-select: all;
}
.hash-actions { margin: 4px 0; }
.auth-hint.left { text-align: left; }
.warn { color: #FFC2CC; }

/* ---------- home stat-strip override ---------- */

/* ---------- stats / panels ---------- */
.stat-strip {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.stat b { display: block; font-size: 24px; font-weight: 700; }
.stat span { color: var(--lav); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }

/* Panels used to carry `backdrop-filter: blur(18px)`. With ~30 of them stacked
   over a moving background the browser re-blurred every panel on every frame,
   which is what cooked phones and PCs. The backdrop is a soft gradient anyway,
   so the same glass read comes from a faint top sheen and a tighter shadow. */
.glass {
  background:
    linear-gradient(180deg, rgba(234, 234, 234, .045), rgba(234, 234, 234, 0) 34%),
    rgba(13, 16, 11, 0.7);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow:
    inset 0 1px 0 rgba(234, 234, 234, .07),
    0 16px 40px rgba(0, 0, 0, 0.34);
}

.panel { padding: 22px 24px; display: grid; gap: 14px; position: relative; }
.panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(203, 197, 234, 0.05);
  border: 1px solid var(--line);
}
.panel-row .muted { margin: 4px 0 0; font-size: 13px; }
.panel-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.badge {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 99px;
  border: 1px solid var(--line);
  color: var(--lav);
}
.badge-ok {
  color: #CFFFD9;
  border-color: rgba(124, 255, 155, 0.35);
  background: rgba(124, 255, 155, 0.08);
}

.usage-grid, .admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}
.kpi { position: relative; overflow: hidden; }
.kpi b {
  font-size: 54px;
  font-weight: 700;
  line-height: 1.05;
}
.kpi > span { color: var(--lav); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; }
.kpi b .num, .kpi b span { font-size: inherit; }
.kpi-glow {
  position: absolute;
  right: -30px;
  top: -30px;
  width: 100px;
  height: 100px;
  border-radius: 99px;
  background: radial-gradient(circle, rgba(69, 78, 158, 0.5), transparent 70%);
  filter: blur(8px);
}

.chart-panel { gap: 10px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; }
.chart-head b { font-size: 14px; letter-spacing: 0.04em; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--lav); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 99px; }
.dot-primary { background: var(--primary); box-shadow: 0 0 10px var(--primary); }
.dot-accent { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.chart { width: 100%; height: 210px; }
.chart .line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart .line-in { stroke: var(--lav); filter: drop-shadow(0 0 6px rgba(203, 197, 234, 0.6)); }
.chart .line-out { stroke: var(--accent); filter: drop-shadow(0 0 6px rgba(175, 27, 63, 0.6)); }
.chart-grid line { stroke: rgba(203, 197, 234, 0.1); stroke-width: 1; }
.chart-axis { fill: rgba(203, 197, 234, 0.55); font-size: 10px; font-family: inherit; }
.chart-axis-r { fill: rgba(232, 121, 168, 0.8); }
.chart-bars rect { fill: rgba(175, 27, 63, 0.35); }
.chart-bars rect:hover { fill: rgba(175, 27, 63, 0.6); }
.chart-dot { fill: var(--lav); stroke: rgba(9, 10, 26, 0.9); stroke-width: 1.5; }
.chart-hover { stroke: rgba(203, 197, 234, 0.35); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-tip {
  position: absolute; top: 8px; z-index: 5; pointer-events: none;
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 12px; border-radius: 12px;
  background: rgba(13, 15, 38, 0.96); border: 1px solid var(--line);
  font-size: 12px; color: var(--lav); min-width: 150px;
}
.chart-tip b { color: #fff; font-size: 12px; }
.chart-tip span { display: inline-flex; align-items: center; gap: 6px; }
.chart-tip .dot { flex: none; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; padding: 14px 2px 2px; }
.pager .pager-btn { min-width: 34px; padding: 6px 10px; font-size: 13px; }
.pager .pager-btn.active { border-color: var(--primary); color: #fff; box-shadow: 0 0 12px rgba(69, 78, 158, 0.5); }

.table-panel { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left;
  padding: 10px 14px;
  color: var(--lav);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.tbl td { padding: 13px 14px; border-bottom: 1px solid rgba(203, 197, 234, 0.07); }
.tbl tr:last-child td { border-bottom: none; }
.pill { font-size: 12px; padding: 4px 10px; border-radius: 99px; }
.pill-ok { color: #CFFFD9; background: rgba(124, 255, 155, 0.1); }

/* ---------- footer ---------- */
.foot {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  padding: 14px clamp(20px, 6vw, 96px);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.hidden { display: none !important; }

.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 9px; }

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

/* ================= promo code info (registration) ================= */
.promo-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 12px;
  border: 1px solid rgba(139, 168, 255, .25);
  background: rgba(69, 78, 158, .12);
  font-size: .9rem;
}
.promo-info .promo-gift { flex: 0 0 auto; }
.promo-info .promo-gift i, .promo-info .promo-gift svg { width: 22px; height: 22px; color: #CBC5EA; }
.promo-info .promo-text b { color: #fff; }
.promo-info .promo-left {
  margin-left: auto;
  white-space: nowrap;
  font-size: .8rem;
  color: #CBC5EA;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(139, 168, 255, .3);
}
.promo-info.promo-bad { border-color: rgba(175, 27, 63, .5); background: rgba(175, 27, 63, .1); }

/* ================= Google sign-in ================= */
.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(203, 197, 234, .6);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .14em;
}
.auth-or::before, .auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.btn-google {
  background: #f5f6f8;
  color: #1f2937;
  border-color: transparent;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
}
.btn-google:hover {
  background: #ffffff;
  color: #111827;
  transform: translateY(-1px);
  box-shadow: 0 10px 36px rgba(0, 0, 0, .45);
}
.btn-google svg { width: 20px; height: 20px; flex: 0 0 auto; }
.btn-google.btn-lg { padding: 11px 20px; font-weight: 700; }
.google-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.google-link-row p { margin: 0 0 6px; }
.google-link-row .btn { flex: 0 0 auto; }
@media (max-width: 720px) {
  .google-link-row { flex-direction: column; align-items: stretch; }
  .google-link-row .btn { justify-content: center; }
}

/* ---- dashboard log table ---- */
.tbl-logs .log-date { white-space: nowrap; font-size: 12.5px; color: rgba(203, 197, 234, .75); }
.tbl-logs .model-cell { min-width: 230px; }
.tbl-logs .badge-group {
  display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  vertical-align: 1px;
}
.tbl-logs .badge-group-unstable {
  color: #9DB4FF; background: rgba(69, 78, 158, .16); border: 1px solid rgba(139, 168, 255, .4);
}
.tbl-logs .badge-group-stable {
  color: #7FE3B0; background: rgba(63, 185, 128, .12); border: 1px solid rgba(63, 185, 128, .4);
}
.tbl-logs .log-tokens { white-space: nowrap; }
.tbl-logs .tok {
  display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums;
  font-size: 13px; padding: 2px 9px; border-radius: 999px; margin-right: 6px;
  border: 1px solid transparent;
}
.tbl-logs .tok i, .tbl-logs .tok svg { width: 12px; height: 12px; }
.tbl-logs .tok-in { color: #9DB4FF; background: rgba(69, 78, 158, .16); border-color: rgba(139, 168, 255, .3); }
.tbl-logs .tok-out { color: #7FE3B0; background: rgba(63, 185, 128, .12); border-color: rgba(63, 185, 128, .32); }
.tbl-logs .price-sep { padding: 0 3px; opacity: .6; }
.tbl-logs .status-pill {
  display: inline-block; min-width: 42px; text-align: center; padding: 2px 9px;
  border-radius: 999px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.tbl-logs .status-pill.ok { color: #7FE3B0; background: rgba(63, 185, 128, .12); border: 1px solid rgba(63, 185, 128, .35); }
.tbl-logs .status-pill.err { color: #FFA9BB; background: rgba(175, 27, 63, .16); border: 1px solid rgba(175, 27, 63, .5); }
@media (max-width: 900px) {
  .tbl-logs th:nth-child(4), .tbl-logs td:nth-child(4),
  .tbl-logs th:nth-child(6), .tbl-logs td:nth-child(6) { display: none; }
  .tbl-logs .model-cell { min-width: 0; }
}

/* official-API price + savings columns on the models table */
.price-official { opacity: .55; }
.price-official::first-line { color: inherit; }
.price-save {
  color: #7CFF9B;
  font-weight: 700;
}
.price-na { opacity: .35; }

/* =======================================================================
   PHONE LAYOUT (≤ 720px)
   The page is scrolled by the document itself instead of an inner box, which
   keeps scrolling on the compositor and avoids the 100dvh resize jump when
   the browser bar collapses.
   ======================================================================= */
@media (max-width: 720px) {
  :root { --header-h: 122px; }

  html, body { height: auto; }
  /* only the root becomes the scroller: an overflow on <body> as well would
     be a second scroll box and pin the sticky sort bar in place */
  html { overflow-x: hidden; overflow-y: auto; }
  body { overflow: visible; }
  #stage { height: auto; min-height: 100svh; }
  .page { display: none; }
  .page.active { display: block; position: relative; inset: auto; overflow-x: clip; }
  .page.active:not(.page-scroll) {
    display: grid;
    min-height: 100svh;
    padding: calc(var(--header-h) + 8px) 16px 32px;
  }
  .page-scroll {
    overflow: visible;
    padding: var(--header-h) 16px calc(32px + env(safe-area-inset-bottom));
    scroll-behavior: auto;
  }

  /* header: brand + account on top, a scrollable row of labelled nav chips below */
  .topbar {
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
    mask-image: none;
    -webkit-mask-image: none;
    background: linear-gradient(180deg, rgba(9, 12, 8, .97), rgba(9, 12, 8, .9) 78%, rgba(9, 12, 8, .82));
    border-bottom: 1px solid rgba(203, 197, 234, .09);
  }
  .brand { gap: 10px; min-width: 0; }
  .brand-mark img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 0 18px rgba(69, 177, 255, .4); }
  .brand-name { display: block; font-size: 15px; letter-spacing: .08em; }
  .topbar-right { gap: 6px; margin-left: auto; }
  .topbar-right .btn, .icon-btn { height: 36px; }
  .topbar-right .btn { padding: 0 12px; border-radius: 10px; }
  #navUsername { display: none; }
  .icon-btn { width: 36px; border-radius: 10px; }
  .nav {
    order: 3;
    flex: 1 0 100%;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0 2px 2px;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    background: transparent;
    border: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 32px), transparent);
  }
  .nav.at-end, .nav.at-start {
    -webkit-mask-image: none;
    mask-image: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-link {
    flex: 0 0 auto;
    padding: 8px 13px;
    border: 1px solid transparent;
    font-size: 13px;
    line-height: 1.2;
    -webkit-tap-highlight-color: transparent;
  }
  .nav-link svg { width: 14px; height: 14px; }
  .nav-link.active { border-color: rgba(203, 197, 234, .22); }

  /* the fixed footer is dropped on phones: it only sat on top of the content */
  .foot { display: none; }

  /* typography + spacing */
  .display { font-size: clamp(38px, 11.2vw, 50px); line-height: 1.02; }
  .section-title { font-size: clamp(26px, 7.6vw, 34px); }
  .lede { font-size: 15px; line-height: 1.6; }
  .section-sub { font-size: 14px; line-height: 1.65; }
  .home-hero { gap: 20px; padding-bottom: 24px; margin-bottom: 34px; }
  .home-hero-text { gap: 16px; }
  .home-section { gap: 14px; margin-bottom: 40px; }
  .home-section.dash, .home-section.tickets, .home-section.guide, .home-section.settings, .home-section.adminp, .home-section.topup { gap: 14px; }
  .display .models-title-glass { font-size: .76em; vertical-align: top; }

  .hero-cta { gap: 10px; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; white-space: nowrap; padding: 12px 14px; font-size: 13px; }
  .model-conveyor-group { gap: 16px; }
  .model-conveyor-group img { width: 44px; height: 44px; }
  .model-conveyor-group li { font-size: 13px; }

  /* feature cards: icon beside the title so six of them do not become a wall */
  .feature {
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    column-gap: 12px;
    padding: 16px 18px;
  }
  .feature svg { width: 24px; height: 24px; }
  .feature h3 { font-size: 15px; }
  .feature p { grid-column: 1 / -1; font-size: 13.5px; }
  .compare-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .compare-strip .kpi { padding: 16px; gap: 4px; }
  .kpi b { font-size: clamp(26px, 7.4vw, 38px); }
  .explainer { padding: 20px; }
  .explainer-math .kpi b { font-size: clamp(24px, 6.6vw, 32px); }
  .explainer-math { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .explainer-math .kpi:last-child { grid-column: 1 / -1; }
  .client-card img { width: 56px; height: 56px; }
  .client-card-custom > svg { width: 56px; height: 56px; padding: 14px; }
  .faq summary { padding: 16px 18px; font-size: 14px; }
  .faq p { padding: 0 18px 16px; font-size: 13.5px; }
  .home-cta { padding-top: 28px; }
  .btn-lg { padding: 14px 22px; font-size: 15px; border-radius: 14px; }
  .panel { padding: 18px 16px; }

  /* models: no full-screen hero, single-column cards, sort bar scrolls sideways */
  .models-hero { min-height: 0; margin-bottom: 26px; padding-bottom: 22px; }
  .models-hero .lede { font-size: 14px; }
  .models-section { scroll-margin-top: calc(var(--header-h) + 4px); }
  .models-status { font-size: 13px; margin: -6px 4px 0; }
  .models-panel { padding-top: 10px; }
  .models-tbl tbody { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .models-tbl tr { padding: 16px 16px 14px; gap: 12px 10px; }
  .models-note { font-size: 11.5px; line-height: 1.6; margin: 2px 4px 0; }
  .tbl-logs .model-names b { font-size: 14.5px; }
  .models-tbl td:first-child { padding-right: 0; }
  .models-tbl .skills-cell { display: none; }
  .model-skills-inline { display: inline-flex; }

  /* dashboard */
  .dash-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .dash-balance .balance-num { font-size: 44px; }
  .chart { height: 190px; }
  .chart-head { gap: 10px; flex-wrap: wrap; }
  .chart-tip { min-width: 130px; }

  .tbl-logs th:nth-child(4), .tbl-logs td:nth-child(4),
  .tbl-logs th:nth-child(6), .tbl-logs td:nth-child(6) { display: table-cell; }
  .tbl-logs, .tbl-logs tbody { display: block; }
  .tbl-logs tbody { display: grid; gap: 10px; }
  .tbl-logs thead { display: none; }
  .tbl-logs tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(13, 16, 11, 0.74);
  }
  .tbl-logs td { padding: 0; border: 0; min-width: 0; }
  .tbl-logs td:nth-child(4) { display: none; }
  .tbl-logs td:nth-child(1) { grid-column: 1; grid-row: 2; align-self: center; }
  .tbl-logs td:nth-child(5) { grid-column: 2; grid-row: 2; text-align: right; align-self: center; }
  .tbl-logs td:nth-child(6) { grid-column: 2; grid-row: 1; justify-self: end; align-self: start; }
  .tbl-logs td:nth-child(3) { grid-column: 1 / -1; grid-row: 3; }
  .tbl-logs .model-cell { min-width: 0; gap: 10px; }
  .tbl-logs .mlogo { width: 36px; height: 36px; }
  .tbl-logs .log-date { font-size: 12px; }
  .tbl-logs .tok { font-size: 12px; padding: 2px 8px; }
  .tbl-logs tr:only-child td[colspan] { grid-column: 1 / -1; }

  /* top up, tickets, settings, guide, admin */
  .coin-strip { gap: 8px; margin-bottom: 4px; }
  .coin-strip li { padding: 5px 12px 5px 6px; }
  .amount-chips { gap: 6px; }
  .chip-btn { padding: 9px 12px; }
  .payment-row { align-items: flex-start; }
  .payment-row .label { flex-basis: 104px; }
  .tickets-head { gap: 10px; }
  .msg { max-width: 92%; }
  .thread-actions .btn { flex: 1 1 auto; justify-content: center; }
  .wd-row { grid-template-columns: minmax(0, 1fr); }
  .guide-tabs { gap: 8px; }
  .guide-tabs .chip { padding: 6px 12px 6px 6px; }
  .guide-client-icons img { width: 30px; height: 30px; }
  .guide-panel { min-width: 0; padding: 16px 14px; }
  .guide-panel pre { padding: 12px; font-size: 12px; }
  .guide-panel code { font-size: 12px; }
  .guide-panel table { display: block; overflow-x: auto; }
  .admin-tabs { gap: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tabs .chip { flex: 0 0 auto; }
  .admin-search { max-width: none; }

  /* 16px inputs: iOS Safari zooms the page in on anything smaller */
  .field input, .field textarea, .field select, .thread-reply textarea,
  .wd-row select, .topup input, .auth-tab {
    font-size: 16px;
  }
  .field input, .field textarea, .field select { padding: 12px 14px; }
  .totp-input { font-size: 22px !important; }
  .auth-card { padding: 22px 18px 18px; gap: 16px; max-height: none; overflow: visible; }
  .auth-head h2 { font-size: 23px; }
  .auth-mark img { width: 46px; height: 46px; border-radius: 13px; }
  .promo-info { flex-wrap: wrap; }

    /* payment history: the same card treatment */
  #npHistory thead { display: none; }
  #npHistory, #npHistory tbody { display: block; }
  #npHistory tbody { display: grid; gap: 10px; }
  #npHistory tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(13, 16, 11, 0.74);
  }
  #npHistory td { padding: 0; border: 0; }
  #npHistory td:nth-child(1) { grid-column: 1; grid-row: 1; align-self: center; }
  #npHistory td:nth-child(2) { grid-column: 2; grid-row: 1; text-align: right; font-size: 16px; }
  #npHistory td:nth-child(3) { grid-column: 1; grid-row: 2; }
  #npHistory td:nth-child(4) { grid-column: 2; grid-row: 2; text-align: right; }
  #npHistory td:nth-child(5) { grid-column: 1; grid-row: 3; justify-self: start; }
  #npHistory td:nth-child(6) { grid-column: 2; grid-row: 3; text-align: right; }
  #npHistory td[colspan] { grid-column: 1 / -1; }

/* no hover on a finger: keep tapped buttons from sticking in their hover state */
  .models-tbl tbody tr:hover { border-color: var(--line); background-color: rgba(13, 16, 11, .74); }
}

@media (hover: hover) {
  .models-tbl tbody tr:hover { border-color: rgba(203, 197, 234, .3); background-color: rgba(69, 78, 158, .1); }
}
@media (hover: none) {
  .btn:hover, .btn-primary:hover, .net-card:hover { transform: none; }
  .btn-primary:hover { box-shadow: 0 8px 30px rgba(69, 78, 158, 0.45); }
  .btn-ghost:hover { border-color: var(--line); }
  .nav-link:hover { color: var(--lav); }
  .nav-link.active:hover { color: var(--ink); }
  .client-card:hover { border-color: rgba(203, 197, 234, .16); background-color: transparent; }
  .ticket-card:hover { border-color: var(--line); }
}

