/* ============================================================
   Infinity Panel — "Nova" design system
   Vivid, animated, modern. Dark by default (html.dark-mode),
   airy light alternate. This file styles the full shell and
   every shared component used across the site.
   ============================================================ */

/* ---------- Tokens: light (alternate) ---------- */
:root {
  --bg: #f6f7fb;
  --bg-2: #eef1f8;
  --paper: #ffffff;
  --paper-2: #f8f9fd;
  --panel-2: #eef1f8;
  --ink: #101425;
  --muted: #5a6280;
  --faint: #8b93ad;
  --line: rgba(16, 20, 37, 0.09);
  --line-2: rgba(16, 20, 37, 0.055);
  --line-strong: rgba(16, 20, 37, 0.18);

  --brand: #6d4aff;
  --brand-2: #22b8e6;
  --brand-ink: #5b3df5;
  --brand-soft: rgba(109, 74, 255, 0.09);
  --brand-2-soft: rgba(34, 184, 230, 0.1);
  --grad: linear-gradient(120deg, #7c5cff 0%, #5b8cff 45%, #22d3ee 100%);
  --grad-soft: rgba(109, 74, 255, 0.07);
  --on-accent: #ffffff;

  --accent: #ff5c8a;
  --accent-soft: rgba(255, 92, 138, 0.1);

  --ok: #12b981;
  --warn: #f59e0b;
  --danger: #ef4d6b;
  --danger-soft: rgba(239, 77, 107, 0.1);

  --footer-bg: #ffffff;
  --footer-ink: #101425;
  --footer-muted: #5a6280;
  --footer-line: rgba(16, 20, 37, 0.09);
  --surface: #ffffff;
  --surface-2: #f7f8fd;

  --radius: 10px;
  --radius-l: 16px;
  --radius-xl: 22px;

  --soft-shadow: 0 1px 2px rgba(16, 20, 37, 0.04), 0 6px 20px -12px rgba(16, 20, 37, 0.14);
  --shadow-s: 0 2px 6px rgba(16, 20, 37, 0.05), 0 10px 24px -14px rgba(16, 20, 37, 0.16);
  --shadow: 0 6px 16px rgba(16, 20, 37, 0.07), 0 24px 50px -28px rgba(16, 20, 37, 0.28);
  --shadow-l: 0 10px 28px rgba(16, 20, 37, 0.09), 0 40px 80px -44px rgba(16, 20, 37, 0.35);
  --glow: 0 10px 30px -10px rgba(109, 74, 255, 0.45);

  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-ui: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --nav-h: 64px;
  --container: 1280px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Tokens: dark (signature, default) ---------- */
:root.dark-mode {
  --bg: #06070f;
  --bg-2: #0b0e1c;
  --paper: rgba(255, 255, 255, 0.045);
  --paper-2: rgba(255, 255, 255, 0.03);
  --panel-2: rgba(255, 255, 255, 0.06);
  --ink: #eaeefc;
  --muted: #9aa3c0;
  --faint: #6b738f;
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.055);
  --line-strong: rgba(255, 255, 255, 0.2);

  --brand: #8b6cff;
  --brand-2: #38d6f5;
  --brand-ink: #a996ff;
  --brand-soft: rgba(139, 108, 255, 0.16);
  --brand-2-soft: rgba(56, 214, 245, 0.14);
  --grad: linear-gradient(120deg, #8b6cff 0%, #5b8cff 45%, #38d6f5 100%);
  --grad-soft: rgba(139, 108, 255, 0.12);

  --accent: #ff6f9c;
  --accent-soft: rgba(255, 111, 156, 0.14);

  --footer-bg: #0b0e1c;
  --footer-ink: #eef1f8;
  --footer-muted: #949cb8;
  --footer-line: rgba(255, 255, 255, 0.09);

  --ok: #34e3a4;
  --warn: #ffc94d;
  --danger: #ff6b8a;
  --danger-soft: rgba(255, 107, 138, 0.14);
  --surface: #141832;
  --surface-2: #10142a;

  --soft-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 30px -18px rgba(0, 0, 0, 0.9);
  --shadow-s: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 16px 34px -22px rgba(0, 0, 0, 0.95);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 28px 60px -30px rgba(0, 0, 0, 1);
  --shadow-l: 0 1px 0 rgba(255, 255, 255, 0.07) inset, 0 48px 96px -40px rgba(0, 0, 0, 1);
  --glow: 0 12px 40px -12px rgba(139, 108, 255, 0.55);
}

/* ---------- Aurora background ---------- */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
}
body::before {
  width: 46vw; height: 46vw;
  top: -14vw; left: -10vw;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.5), transparent 68%);
  animation: aurora-a 22s ease-in-out infinite alternate;
}
body::after {
  width: 40vw; height: 40vw;
  top: 8vw; right: -12vw;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.42), transparent 68%);
  animation: aurora-b 26s ease-in-out infinite alternate;
}
:root:not(.dark-mode) body::before,
:root:not(.dark-mode) body::after { opacity: 0.28; }
@keyframes aurora-a {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(6vw, 4vw, 0) scale(1.15); }
  100% { transform: translate3d(-2vw, 8vw, 0) scale(1.05); }
}
@keyframes aurora-b {
  0%   { transform: translate3d(0, 0, 0) scale(1.05); }
  50%  { transform: translate3d(-5vw, 6vw, 0) scale(0.95); }
  100% { transform: translate3d(3vw, -3vw, 0) scale(1.1); }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 15.5px/1.65 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
}
::selection { background: var(--brand-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: linear-gradient(var(--brand), var(--brand-2));
  border: 3px solid transparent;
  background-clip: padding-box;
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--grad);
  z-index: 300;
  box-shadow: 0 0 12px rgba(139, 108, 255, 0.7);
}

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 26px; }
@media (max-width: 640px) { .container { padding: 0 18px; } }
body.wide .container, body.wide .nav-inner {
  max-width: none;
  padding-left: clamp(18px, 2.4vw, 44px);
  padding-right: clamp(18px, 2.4vw, 44px);
}
.section { padding: 84px 0; position: relative; }
@media (max-width: 760px) { .section { padding: 56px 0; } }

/* ---------- Surfaces ---------- */
.card, .panel, .glass {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.card:hover, .glass:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}
.card { padding: 24px; }

/* ---------- Heads ---------- */
.section-head { max-width: 700px; margin: 0 auto 44px; text-align: center; }
.section-head .num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 30px; padding: 0 12px;
  border-radius: 99px;
  background: var(--brand-soft);
  border: 1px solid var(--line);
  color: var(--brand-ink);
  font: 700 11px/1 var(--font-mono);
  letter-spacing: .16em;
  margin-bottom: 16px;
}
.section-head h2 { font-size: clamp(28px, 3.6vw, 44px); margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 16px; line-height: 1.7; max-width: 600px; margin: 0 auto; }
.page-head { padding: 76px 0 40px; position: relative; }
.page-head h1 { font-size: clamp(34px, 5vw, 62px); margin-bottom: 14px; }
.page-head p { color: var(--muted); font-size: 17px; max-width: 640px; line-height: 1.65; }
.page-head .btns { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 11px/1 var(--font-mono);
  text-transform: uppercase; letter-spacing: .18em;
  color: var(--brand-ink);
  padding: 7px 14px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--brand-soft);
  margin-bottom: 20px;
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--tag-accent, var(--brand-2));
  box-shadow: 0 0 10px var(--brand-2);
  animation: nodepulse 2.2s ease-in-out infinite;
}
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.text-muted { color: var(--muted); }
.sub { color: var(--muted); font-size: 15px; }
.em { color: var(--faint); font-size: 13px; font-style: normal; }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 14px/1 var(--font-ui);
  padding: 12px 22px;
  border-radius: 99px;
  background: var(--paper-2);
  color: var(--ink);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .25s var(--ease-spring), box-shadow .25s var(--ease), border-color .25s, background .25s, color .25s;
  white-space: nowrap;
  user-select: none;
}
.btn:hover { transform: translateY(-2px); border-color: var(--line-strong); background: var(--panel-2); }
.btn:active { transform: translateY(0) scale(.985); }
.btn-primary {
  background: var(--grad);
  color: var(--on-accent);
  border-color: transparent;
  font-weight: 700;
  background-size: 180% 180%;
  animation: gradshift 8s ease infinite;
}
.btn-primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.4) 50%, transparent 80%);
  transform: translateX(-120%);
}
.btn-primary:hover::after { animation: sweep .9s var(--ease) forwards; }
.btn-primary:hover { box-shadow: var(--glow); }
.btn-accent {
  background: linear-gradient(120deg, var(--accent), #ff9a6c);
  color: var(--on-accent); border-color: transparent; font-weight: 700;
}
.btn-accent:hover { box-shadow: 0 12px 34px -12px var(--accent); }
.btn-outline { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }
.btn-ghost { color: var(--muted); border-color: transparent; background: transparent; padding: 10px 14px; }
.btn-ghost:hover { color: var(--ink); background: var(--brand-soft); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger-soft); }
.btn-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn .spin {
  width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes gradshift { 50% { background-position: 100% 50%; } }
@keyframes sweep { to { transform: translateX(120%); } }

/* ---------- Chips / tags / pills / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 12px/1 var(--font-ui);
  padding: 7px 14px; border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--paper-2); color: var(--muted);
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.chip:hover { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); transform: translateY(-1px); }
.chip.active { background: var(--grad); color: var(--on-accent); border-color: transparent; }
.chip.ok { color: var(--ok); background: rgba(18, 185, 129, 0.12); border-color: transparent; }
.chip.warn { color: var(--warn); background: rgba(245, 158, 11, 0.12); border-color: transparent; }
.chip.bad { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.chip.mut { color: var(--muted); background: var(--paper-2); border-color: transparent; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font: 700 9.5px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase;
  background: var(--brand-soft); color: var(--brand-ink);
  border: 1px solid var(--line);
  padding: 6px 11px; border-radius: 99px;
}
.badge-best { background: var(--grad); color: var(--on-accent); border-color: transparent; }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 11px/1 var(--font-mono); letter-spacing: .06em;
  padding: 5px 11px; border-radius: 99px;
  background: var(--paper-2); border: 1px solid var(--line); color: var(--muted);
}
.plus-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 11.5px/1 var(--font-ui);
  padding: 6px 12px; border-radius: 99px;
  background: var(--brand-soft); color: var(--brand-ink);
  border: 1px solid var(--line);
}
.tier-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 12px;
  background: var(--paper-2); border: 1px solid var(--line);
  font-size: 12.5px; transition: all .25s var(--ease);
}
.tier-chip b { font-family: var(--font-display); font-weight: 700; }
.tier-chip .d { color: var(--faint); font-size: 11.5px; }
.tier-chip:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-s); }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font: 600 12.5px/1 var(--font-ui); margin-bottom: 8px; color: var(--ink); }
.input, textarea.input {
  width: 100%;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 14.5px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.input::placeholder { color: var(--faint); }
.form-hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.form-error {
  font-size: 13px; color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid var(--danger-soft);
  border-radius: var(--radius);
  padding: 10px 14px; margin-bottom: 14px; display: none;
}
.form-error.show { display: block; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.code-row { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.code-row .input { flex: 1; min-width: 200px; font-family: var(--font-mono); letter-spacing: .06em; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--grad);
  opacity: 0; transition: opacity .4s var(--ease);
}
.nav.scrolled::after { opacity: .9; }
.nav.scrolled { box-shadow: 0 12px 30px -22px rgba(0, 0, 0, 0.7); }
.nav-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 26px;
  height: 100%; display: flex; align-items: center; gap: 22px;
}
@media (max-width: 640px) { .nav-inner { padding: 0 18px; } }
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font: 700 17px/1 var(--font-display);
  letter-spacing: -0.02em;
}
.nav-logo .mark {
  width: 34px; height: 34px; border-radius: 11px;
  background: var(--grad);
  color: var(--on-accent);
  display: grid; place-items: center;
  font-size: 17px; font-weight: 700;
  box-shadow: var(--glow);
  animation: float 6s ease-in-out infinite;
}
.nav-logo em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-links { display: flex; gap: 4px; flex: 1; align-items: center; }
.nav-links a, .nav-dd-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  font: 500 14px/1 var(--font-ui);
  color: var(--muted);
  padding: 9px 14px;
  border-radius: 99px;
  transition: color .2s, background .2s;
}
.nav-links a:hover, .nav-dd-btn:hover { color: var(--ink); background: var(--brand-soft); }
.nav-links a.active, .nav-dd-btn.active { color: var(--brand-ink); background: var(--brand-soft); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 16px; height: 2px;
  transform: translateX(-50%);
  border-radius: 2px; background: var(--grad);
}
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  color: var(--muted); font-size: 16px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  transition: all .22s var(--ease);
}
.icon-btn:hover { color: var(--brand-ink); border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-s); }
.nav-avatar {
  width: 36px; height: 36px; border-radius: 12px;
  background: var(--grad); color: var(--on-accent);
  display: grid; place-items: center;
  font: 700 13.5px/1 var(--font-ui);
  cursor: pointer; border: 1px solid transparent;
  transition: transform .25s var(--ease-spring), box-shadow .25s;
}
.nav-avatar:hover { transform: translateY(-2px) scale(1.04); box-shadow: var(--glow); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    padding: 14px 18px 20px; gap: 6px;
    box-shadow: var(--shadow-l);
  }
  .nav-links.open a, .nav-links.open .nav-dd-btn { width: 100%; border-radius: 12px; }
  .nav-burger { display: grid !important; }
}
.nav-burger { display: none; }

/* ---------- Menus / dropdowns ---------- */
.menu {
  position: absolute; top: calc(100% + 12px); right: 0;
  min-width: 240px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-l);
  padding: 8px;
  z-index: 200;
  opacity: 0; transform: translateY(-8px) scale(.97);
  pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.menu.open { opacity: 1; transform: none; pointer-events: auto; }
.menu-label {
  padding: 10px 12px 8px;
  font: 700 10.5px/1 var(--font-mono);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--faint);
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.menu-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px;
  border-radius: 10px;
  font: 500 14px/1.3 var(--font-ui);
  color: var(--ink); text-align: left;
  transition: background .18s, transform .18s;
}
.menu-item:hover { background: var(--brand-soft); transform: translateX(2px); }
.menu-item.danger { color: var(--danger); }
.menu-item .mi-icon { width: 18px; text-align: center; opacity: .85; }
.menu-sep { height: 1px; background: var(--line); margin: 6px 8px; }

/* ---------- Footer ---------- */
.footer {
  margin-top: 90px; padding: 60px 0 34px;
  background: var(--footer-bg);
  color: var(--footer-ink);
  border-top: 1px solid var(--footer-line);
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 200px;
  background: radial-gradient(ellipse at 50% 0%, rgba(139, 108, 255, 0.35), transparent 70%);
  pointer-events: none;
}
:root:not(.dark-mode) .footer::before {
  background: radial-gradient(ellipse at 50% 0%, rgba(139, 108, 255, 0.09), transparent 70%);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; position: relative; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand { grid-column: 1 / -1; padding-bottom: 28px; border-bottom: 1px solid var(--footer-line); margin-bottom: 28px; }
.footer-brand .nav-logo { color: var(--footer-ink); }
.footer-brand p { color: var(--footer-muted); font-size: 14px; max-width: 460px; margin-top: 12px; }
.footer h4 {
  font: 700 10.5px/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--footer-muted); margin-bottom: 14px;
}
.footer a { display: block; font: 500 14px/2.2 var(--font-ui); color: var(--footer-muted); transition: all .2s; }
.footer a:hover { color: var(--footer-ink); transform: translateX(3px); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--footer-line);
  color: var(--footer-muted); font-size: 12.5px;
}

/* ---------- Modals ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 400;
  display: grid; place-items: center; padding: 20px;
  background: rgba(4, 6, 14, 0.7);
  backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .25s var(--ease);
}
.modal-overlay.open { opacity: 1; }
.modal {
  width: min(560px, 100%);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(22px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-l);
  padding: 26px;
  transform: translateY(18px) scale(.97);
  opacity: 0;
  transition: transform .35s var(--ease-spring), opacity .3s var(--ease);
}
.modal.wide { width: min(760px, 100%); }
.modal-overlay.open .modal { transform: none; opacity: 1; }
.modal h3 { font-size: 22px; margin-bottom: 6px; }
.modal-sub { color: var(--muted); font-size: 14.5px; margin-bottom: 18px; }
.modal-body { display: grid; gap: 14px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px;
}
.modal { position: relative; }

/* ---------- Toasts ---------- */
.toast-wrap {
  position: fixed; bottom: 22px; right: 22px; z-index: 500;
  display: flex; flex-direction: column; gap: 10px;
  max-width: min(360px, calc(100vw - 36px));
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  font: 600 13.5px/1.45 var(--font-ui);
  color: var(--ink);
  animation: toastin .42s var(--ease-spring);
}
.toast.out { animation: toastout .26s var(--ease) forwards; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.toast.info::before { background: var(--brand-2); box-shadow: 0 0 10px var(--brand-2); }
.toast.ok::before { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.toast.err::before { background: var(--danger); box-shadow: 0 0 10px var(--danger); }
@keyframes toastin { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toastout { to { opacity: 0; transform: translateY(10px) scale(.97); } }

/* ---------- Banners / notes ---------- */
.banner, .banned-note, .current-note, .safety-band, .key-count-note, .kit-hint {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--muted);
  padding: 12px 16px;
  font-size: 13.5px;
  line-height: 1.6;
}
.banned-note { border-color: var(--danger-soft); background: var(--danger-soft); color: var(--danger); }
.current-note { margin-top: 14px; display: inline-block; }
.safety-band { border-color: var(--brand-soft); background: var(--brand-soft); color: var(--brand-ink); }

/* ---------- Section shell used by inner pages ---------- */
.sec {
  max-width: var(--container);
  margin: 0 auto;
  padding: 72px 26px;
}
@media (max-width: 760px) { .sec { padding: 48px 18px; } }
.sec + .sec { border-top: 1px solid var(--line-2); }
.sec > .container { padding-left: 0; padding-right: 0; }
.sec > h2, .sec > .section-head h2 { font-size: clamp(25px, 3.2vw, 38px); margin-bottom: 10px; }
.sec > p, .sec > .section-head p {
  color: var(--muted); font-size: 15.5px; line-height: 1.7;
  max-width: 660px; margin-bottom: 26px;
}
.sec > .section-head { text-align: left; margin: 0 0 30px; max-width: 700px; }
.sec > .section-head p { margin-inline: 0; }

/* ---------- Cards: generic content blocks ---------- */
.dl-wrap, .redeem-wrap, .auth-wrap, .admin-wrap, .stk-wrap, .kit-section, .toc, .help-block, .contact-card, .admin-head, .profile-head, .stat-row, .licenses, .tabs, .tool-list, .note-editor-inner, .tpl-cats, .photo-adjust, .search-row, .row-actions { min-width: 0; }

.dl-wrap, .redeem-wrap, .auth-wrap, .admin-wrap {
  padding: 84px 0 20px;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 26px; padding-right: 26px;
}
.redeem-wrap, .auth-wrap { max-width: 720px; }
.dl-card, .redeem-card, .auth-card, .admin-head, .contact-card, .help-block, .kit-section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(14px);
  padding: 28px;
}
.redeem-wrap, .auth-wrap, .admin-wrap { display: grid; gap: 18px; }
.dl-card, .redeem-card, .auth-card { display: grid; gap: 14px; }
.dl-card h1, .redeem-card h1, .auth-card h2 { font-size: clamp(22px, 3vw, 32px); }
.dl-meta { color: var(--faint); font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; }

.auth-tabs {
  display: flex; gap: 6px; padding: 5px;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 99px; margin-bottom: 18px;
}
.auth-tabs button {
  flex: 1; padding: 10px 14px; border-radius: 99px;
  font: 600 13.5px/1 var(--font-ui); color: var(--muted);
  transition: all .25s var(--ease);
}
.auth-tabs button.active { background: var(--grad); color: var(--on-accent); box-shadow: var(--shadow-s); }
.profile-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.avatar-big {
  width: 64px; height: 64px; border-radius: 20px;
  background: var(--grad); color: var(--on-accent);
  display: grid; place-items: center;
  font: 700 24px/1 var(--font-display);
  box-shadow: var(--glow);
}
.usr-name { font: 700 20px/1.2 var(--font-display); }
.tier-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.licenses { display: grid; gap: 10px; margin-top: 16px; }
.lic-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 16px; border-radius: 14px;
  background: var(--paper-2); border: 1px solid var(--line);
}
.rank-medal {
  width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center;
  font: 700 18px/1 var(--font-display);
  background: var(--grad); color: var(--on-accent);
  box-shadow: var(--shadow-s);
}
.medal {
  font: 700 16px/1 var(--font-mono); letter-spacing: .12em;
  color: var(--brand-2);
  margin-bottom: 10px;
}

/* ---------- Grids: cards with thumbs (library, feed, templates) ---------- */
.mine-grid, .feed, .tpl-grid, .tool-grid, .rank-grid, .feat-grid, .steps, .stk-wrap {
  display: grid; gap: 18px;
}
.mine-grid, .feed, .tpl-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tool-grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.rank-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); max-width: 1080px; margin: 26px auto 0; }
.feat-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.steps { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
@media (max-width: 560px) { .mine-grid, .feed, .tpl-grid, .tool-grid { grid-template-columns: 1fr; } }

.mine-card, .feed-card, .tpl-card, .tool-card-c, .tool-card, .rank, .feat, .step, .kit-section {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(14px);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
/* These carry badges that sit above their top edge, so they must not clip. */
.rank, .feat, .step { overflow: visible; }
.mine-card:hover, .feed-card:hover, .tpl-card:hover, .tool-card-c:hover, .tool-card:hover, .rank:hover, .feat:hover, .step:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.mine-card .thumb, .feed-card .thumb {
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  font-size: 30px; color: var(--faint);
  overflow: hidden;
}
/* Template thumbnails: JS mounts a real scaled stage and sets the height,
   so the host must never derive width from an aspect-ratio. */
.art {
  position: relative;
  width: 100%;
  min-height: 170px;
  overflow: hidden;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}
/* Gallery tiles keep a uniform frame so rows never look ragged; the scaled
   stage is top-anchored and clipped by the host. */
.tpl-card .art { aspect-ratio: 1 / 1; height: auto !important; min-height: 0; }
.tpl-thumb-host { position: relative; display: block; }
.tpl-thumb-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.tpl-card .ph, .art .ph {
  position: absolute;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}
.tpl-thumb-stage img, .feed-card .thumb img, .mine-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.mine-card .body, .feed-card .body { padding: 16px; display: grid; gap: 10px; }
.mine-card .row, .feed-card .row, .row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.feed-card .meta, .meta {
  display: flex; align-items: center; gap: 10px;
  color: var(--faint); font-size: 12.5px;
}
.likes, .like { color: var(--accent); font-weight: 600; }
.like { transition: transform .2s var(--ease-spring); }
.like:hover { transform: scale(1.15); }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.featured { position: relative; }
.featured::after {
  content: "Featured";
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font: 700 9.5px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 99px;
  background: var(--grad); color: var(--on-accent);
}

/* ---------- Empty states ---------- */
.empty-state {
  display: grid; place-items: center; gap: 12px;
  text-align: center; padding: 46px 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-l);
  color: var(--muted);
  background: var(--paper-2);
}
.empty-state h3 { color: var(--ink); }
.es-icon {
  width: 56px; height: 56px; border-radius: 18px;
  display: grid; place-items: center;
  font-size: 26px;
  background: var(--brand-soft);
  border: 1px solid var(--line);
  animation: float 5s ease-in-out infinite;
}

/* ---------- FAQ / help ---------- */
.faq { max-width: 860px; margin: 0 auto; display: grid; gap: 10px; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--paper);
  padding: 16px 20px;
  backdrop-filter: blur(14px);
  transition: border-color .25s, box-shadow .25s;
}
.faq details[open] { border-color: var(--line-strong); box-shadow: var(--soft-shadow); }
.faq summary {
  cursor: pointer; list-style: none;
  font: 600 15px/1.45 var(--font-ui);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: 0 0 auto;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-ink);
  font-weight: 700;
  transition: transform .3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--muted); font-size: 14px; margin-top: 10px; line-height: 1.7; }
.help-block { margin-bottom: 22px; }
.toc {
  display: flex; gap: 10px; flex-wrap: wrap;
  padding: 16px 0 0;
}
.toc a {
  font: 600 13px/1 var(--font-ui);
  padding: 9px 15px; border-radius: 99px;
  border: 1px solid var(--line); color: var(--muted);
  transition: all .22s;
}
.toc a:hover { color: var(--brand-ink); border-color: var(--brand); background: var(--brand-soft); transform: translateY(-2px); }

/* ---------- CTA bands ---------- */
.cta-band, .cta-simple {
  position: relative; overflow: hidden;
  text-align: center;
  padding: 62px 28px;
  border-radius: var(--radius-xl);
  background: var(--grad);
  background-size: 200% 200%;
  animation: gradshift 12s ease infinite;
  color: var(--on-accent);
  box-shadow: var(--glow);
}
.cta-simple { background: var(--paper); color: var(--ink); border: 1px solid var(--line); animation: none; box-shadow: var(--soft-shadow); }
.cta-band h2, .cta-simple h2 { font-size: clamp(26px, 3.6vw, 42px); margin-bottom: 12px; }
.cta-band p, .cta-simple p { color: rgba(255, 255, 255, 0.82); max-width: 580px; margin: 0 auto 26px; }
.cta-simple p { color: var(--muted); }
.cta-band .btn:not(.btn-outline) { background: rgba(255, 255, 255, 0.96); color: #1a1140; border-color: transparent; animation: none; }
.cta-band .btn-outline { border-color: rgba(255, 255, 255, 0.5); color: var(--on-accent); background: transparent; }
.cta-band .btn-outline:hover { background: rgba(255, 255, 255, 0.12); }
.contact-card { text-align: center; display: grid; gap: 12px; place-items: center; }

/* ---------- Tables (admin, licenses) ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--paper); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
.tbl th {
  text-align: left; padding: 13px 16px;
  font: 700 10.5px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--faint); border-bottom: 1px solid var(--line);
  background: var(--paper-2);
  position: sticky; top: 0;
}
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .18s; }
.tbl tbody tr:hover { background: var(--brand-soft); }
.admin-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.admin-wrap {
  max-width: var(--container); margin: 0 auto;
  padding: 84px 26px 20px;
  display: grid; gap: 18px;
}
.access-denied {
  display: grid; place-items: center; gap: 10px; text-align: center;
  padding: 40px 20px; border: 1px solid var(--line); border-radius: var(--radius-l);
  background: var(--paper-2); color: var(--danger);
}
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Stats ---------- */
.stat-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat {
  position: relative; overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 20px;
  backdrop-filter: blur(14px);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.stat:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.stat b, .stat .v {
  display: block;
  font: 700 30px/1.1 var(--font-display);
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat span, .stat .k {
  display: block; margin-top: 6px;
  font: 600 11px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--faint);
}

/* ---------- Tabs ---------- */
.tabs, .tpl-cats {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 5px; border-radius: 99px;
  background: var(--paper-2); border: 1px solid var(--line);
}
.tab {
  font: 600 13px/1 var(--font-ui);
  padding: 9px 16px; border-radius: 99px; color: var(--muted);
  transition: all .25s var(--ease);
}
.tab:hover { color: var(--ink); }
.tab.active { background: var(--grad); color: var(--on-accent); box-shadow: var(--shadow-s); }

/* ---------- Editor / tools support ---------- */
.tool-list { display: grid; gap: 8px; }
.tool-idx {
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  font: 700 11px/1 var(--font-mono);
  background: var(--paper-2); border: 1px solid var(--line); color: var(--faint);
}
.tool-soon-hint, .note-editor-empty, .tpl-empty, .slot-lbl, .hash {
  color: var(--faint); font-size: 12.5px;
}
.hash { font-family: var(--font-mono); letter-spacing: .04em; }
.kit-section { padding: 18px; display: grid; gap: 12px; }
.kit-val { font-family: var(--font-mono); font-size: 13px; color: var(--brand-ink); }
.photo-adjust { display: grid; gap: 12px; }
.txt-span { display: inline-block; }
.skeleton {
  border-radius: 12px;
  background: linear-gradient(100deg, var(--paper-2) 30%, var(--panel-2) 50%, var(--paper-2) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.5s linear infinite;
  min-height: 120px;
}
.stk-wrap { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.stk-wrap img, .stk-wrap .stk { border-radius: 12px; border: 1px solid var(--line); background: var(--paper-2); }
.search-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.search-row .input { flex: 1; min-width: 200px; }

/* ---------- Misc ---------- */
.ver { font-family: var(--font-mono); font-size: 11px; color: var(--faint); }
.ws-card-chart, .ws-card-donut {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l);
  padding: 18px; backdrop-filter: blur(14px);
  min-height: 160px;
}
.ws-card-donut { display: grid; place-items: center; }
.thumb { overflow: hidden; }
.form-grid .field { margin-bottom: 0; }
.progress, .ws-card-chart .bar {
  height: 8px; border-radius: 99px;
  background: var(--paper-2); overflow: hidden;
}
.progress > i, .ws-card-chart .bar > i {
  display: block; height: 100%; border-radius: 99px;
  background: var(--grad);
}
.menu-label + .menu-item { margin-top: 2px; }

/* ---------- Feature panels (pages without landing.css) ---------- */
.feat-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.feat { padding: 26px 24px; }
.feat .ic {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  margin-bottom: 18px;
  color: var(--brand-ink);
  background: var(--brand-soft);
  border: 1px solid var(--line);
  transition: transform .45s var(--ease-spring);
}
.feat .ic svg { width: 22px; height: 22px; }
.feat:hover .ic { transform: translateY(-3px) scale(1.08); }
.feat h3 { font-size: 17px; margin-bottom: 8px; }
.feat p { font-size: 14px; color: var(--muted); line-height: 1.65; }
.feat b { display: block; font-family: var(--font-display); font-size: 16.5px; font-weight: 700; margin-bottom: 7px; }
.feat span { display: block; font-size: 14px; color: var(--muted); line-height: 1.65; }

/* ---------- Steps ---------- */
.step { padding: 26px 22px 22px; }
.step b { display: block; font-family: var(--font-display); font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.step span { display: block; font-size: 14px; color: var(--muted); line-height: 1.65; }
.step > div { min-width: 0; }

/* ---------- Rank cards (pricing) ---------- */
.rank {
  text-align: center;
  padding: 30px 22px 24px;
  display: flex; flex-direction: column;
}
.rank .medal { font-size: 18px; letter-spacing: .18em; color: var(--brand-2); margin-bottom: 6px; }
.rank h3 { font-size: 16px; margin-bottom: 4px; }
.rank .days {
  font: 700 34px/1 var(--font-display);
  margin: 10px 0 6px;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.rank .days small { font: 500 13px/1 var(--font-ui); color: var(--muted); -webkit-text-fill-color: var(--muted); }
.rank ul { list-style: none; display: grid; gap: 6px; margin: 16px 0 20px; text-align: left; }
.rank li { position: relative; padding-left: 22px; font-size: 13.5px; color: var(--muted); }
.rank li::before { content: "✓"; position: absolute; left: 0; color: var(--brand-2); font-weight: 700; }
.rank .btn { margin-top: auto; width: 100%; }
.rank .badge-best {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  white-space: nowrap; box-shadow: var(--glow);
}
.rank.top {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--grad) border-box;
  box-shadow: var(--glow);
}

/* ---------- Stat cards ---------- */
.stat { padding: 22px 20px; text-align: left; }
.stat .n {
  display: block;
  font: 700 32px/1.1 var(--font-display);
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat .l {
  display: block; margin-top: 8px;
  font: 600 10.5px/1.3 var(--font-mono);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--faint);
}

/* ---------- Tabs (buttons or links) ---------- */
.tabs > button, .tabs > a, .tabs > .tab, .tpl-cats > button, .tpl-cats > a {
  font: 600 13px/1 var(--font-ui);
  padding: 9px 16px; border-radius: 99px;
  color: var(--muted); background: transparent; border: 1px solid transparent;
  transition: all .25s var(--ease);
}
.tabs > button:hover, .tabs > a:hover, .tpl-cats > button:hover, .tpl-cats > a:hover { color: var(--ink); background: var(--panel-2); }
.tabs > button.active, .tabs > a.active, .tpl-cats > button.active, .tpl-cats > a.active {
  background: var(--grad); color: var(--on-accent); box-shadow: var(--shadow-s);
}

/* ---------- Template cards ---------- */
.tpl-card {
  display: flex; flex-direction: column;
  text-align: left;
  padding: 0;
  font: inherit;
}
.tpl-card .meta {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px 0;
  font-size: 13px; color: var(--muted);
}
.tpl-card .meta + .meta { padding-top: 4px; padding-bottom: 14px; }
.tpl-card .meta b { color: var(--ink); font-family: var(--font-display); font-size: 14.5px; }
.tpl-card .meta .open { color: var(--brand-ink); font-weight: 600; }
.tpl-card:hover .meta .open { text-decoration: underline; }

/* ---------- FAQ inside cards should not re-centre ---------- */
.help-block .faq, .contact-card .faq, .dl-card .faq, .auth-card .faq { max-width: none; margin: 0; }
.help-block h2, .contact-card h2, .dl-card h2 { font-size: 22px; margin-bottom: 14px; }

/* Hide the duplicate section number when a labelled eyebrow follows it */
.section-head .num:has(+ .eyebrow) { display: none; }

/* ---------- Motion system ---------- */
@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes nodepulse { 50% { opacity: .35; transform: scale(1.25); } }
@keyframes shimmer { to { background-position: -120% 0; } }

.js .reveal {
  opacity: 0;
  transform: translateY(30px) scale(.985);
  filter: blur(8px);
  transition:
    opacity .7s var(--ease-out),
    transform .8s var(--ease-out),
    filter .7s var(--ease-out);
  transition-delay: var(--rd, 0ms);
  will-change: opacity, transform, filter;
}
.js .reveal.in { opacity: 1; transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
  body::before, body::after { animation: none; }
  .js .reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
}

/* ---------- Admin console (site/admin.html) ---------- */
.ad-tabs {
  display: flex; gap: 10px; margin: 18px 0 14px; flex-wrap: wrap;
}
.ad-tabs > button {
  font: 600 13px/1 var(--font-ui);
  padding: 10px 18px; border-radius: 99px;
  color: var(--muted); background: transparent; border: 1px solid var(--line);
  cursor: pointer; transition: all .25s var(--ease);
}
.ad-tabs > button:hover { color: var(--ink); background: var(--panel-2); }
.ad-tabs > button.active {
  background: var(--grad); color: var(--on-accent);
  border-color: transparent; box-shadow: var(--shadow-s);
}
.ad-tabs .count { opacity: .75; font-weight: 500; }

.ad-panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 22px 24px; margin-bottom: 20px;
}
.ad-panel h2 {
  font: 700 17px/1.2 var(--font-display); color: var(--ink);
  margin: 0 0 14px;
}
.ad-search { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.ad-search .icon { color: var(--faint); font-size: 15px; }
.ad-search .input { width: 100%; }

.ad-tbl-wrap { overflow-x: auto; }
.ad-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ad-tbl th {
  text-align: left; font: 600 10.5px/1.3 var(--font-mono);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint); padding: 8px 10px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.ad-tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ad-tbl tr:last-child td { border-bottom: none; }
.ad-tbl tr.banned-row td { background: rgba(220, 38, 38, .06); }

.usr { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.usr .av {
  flex: 0 0 auto;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad); color: var(--on-accent);
  font: 700 13px/1 var(--font-display);
}
.usr .txt { min-width: 0; }
.usr .name { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usr .mail {
  font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.usr.banned .name { text-decoration: line-through; color: var(--muted); }
.usr.banned .av { background: var(--danger, #dc2626); }

.tier-sel { min-width: 120px; }

.ad-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ad-actions .btn { padding: 5px 11px; font-size: 12px; white-space: nowrap; }

.key-code {
  font: 600 12px/1.4 var(--font-mono);
  letter-spacing: .04em; color: var(--ink);
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 4px 8px; white-space: nowrap;
}
button.key-code.code-btn { cursor: pointer; transition: border-color .2s var(--ease); }
button.key-code.code-btn:hover { border-color: var(--brand-ink); }

.key-used, .key-note, .exp {
  font-size: 12.5px; color: var(--muted); white-space: nowrap;
}
.key-note { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }

.rank-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font: 600 11.5px/1.4 var(--font-ui);
  padding: 4px 10px; border-radius: 99px;
  color: var(--brand-ink); background: rgba(var(--brand-rgb, 124 58 237), .1);
  white-space: nowrap;
}
.rank-pill.paused { color: #b45309; background: rgba(245, 158, 11, .12); }

.chip {
  display: inline-block; font: 600 11px/1.4 var(--font-ui);
  padding: 4px 10px; border-radius: 99px; white-space: nowrap;
}
.chip.ok { color: #15803d; background: rgba(34, 197, 94, .12); }
.chip.bad { color: #b91c1c; background: rgba(220, 38, 38, .1); }
.chip.mut { color: var(--muted); background: var(--panel-2); }

.ad-diag {
  display: none;
  font: 500 12.5px/1.5 var(--font-mono);
  color: #7a3340; background: #fff1f4;
  border: 1px solid #fecdd3; border-radius: 12px;
  padding: 10px 14px; margin-bottom: 14px;
  white-space: pre-wrap; word-break: break-word;
}
.ad-diag.show { display: block; }

.ad-create-msg { font-size: 13px; color: var(--muted); }
.ad-create-msg.warn { color: #b45309; }

.empty-state { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty-state .es-icon { font-size: 30px; margin-bottom: 8px; }
.empty-state h3 { font: 700 15px/1.3 var(--font-display); color: var(--ink); margin: 0 0 6px; }
.empty-state p { font-size: 13px; margin: 0; }

.sync-info .dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e; margin-right: 6px; vertical-align: middle;
}
.sync-info.warn .dot { background: #f59e0b; }
.sync-info.err .dot { background: #dc2626; }