/* =========================================================
   ShortMy design system — dark teal product UI
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  /* Surfaces */
  --bg: #07080a;
  --bg-elevated: #0f1115;
  --bg-subtle: #171a20;
  --bg-hover: #1e232b;
  --fg: #f3f4f6;
  --fg-muted: #9ca3af;
  --fg-subtle: #6b7280;
  --border: #232830;
  --border-strong: #343b46;
  /* Brand */
  --primary: #2dd4bf;
  --primary-fg: #042f2e;
  --primary-hover: #5eead4;
  --primary-soft: color-mix(in oklab, var(--primary) 14%, transparent);
  --primary-ring: color-mix(in oklab, var(--primary) 45%, transparent);
  /* Status */
  --danger: #fb7185;
  --danger-soft: color-mix(in oklab, var(--danger) 14%, transparent);
  --success: #4ade80;
  --success-soft: color-mix(in oklab, var(--success) 14%, transparent);
  --warning: #fbbf24;
  --warning-soft: color-mix(in oklab, var(--warning) 14%, transparent);
  /* Shape */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 999px;
  /* Type */
  --font: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* Elevation */
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.35);
  --shadow-md: 0 8px 24px rgb(0 0 0 / 0.35);
  --shadow-lg: 0 24px 64px rgb(0 0 0 / 0.45);
  --shadow-glow: 0 0 0 1px color-mix(in oklab, var(--primary) 25%, transparent),
    0 18px 50px rgb(0 0 0 / 0.5),
    0 0 80px color-mix(in oklab, var(--primary) 10%, transparent);
  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 180ms;
  --dur-fast: 120ms;
  --header-h: 68px;
}

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

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  color-scheme: dark;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(1200px 600px at 50% -10%, color-mix(in oklab, var(--primary) 9%, transparent), transparent 60%),
    var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection {
  background: color-mix(in oklab, var(--primary) 40%, transparent);
  color: var(--fg);
}
a { color: inherit; text-decoration: none; }
button, [role="button"] { cursor: pointer; font: inherit; }
button:disabled { cursor: not-allowed; }
input, select, textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
img, svg { display: block; max-width: 100%; }
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---------- Utilities ---------- */
.container { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }
.muted { color: var(--fg-muted); }
.small { font-size: 0.8125rem; line-height: 1.45; }
.tabular { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); letter-spacing: -0.02em; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.stack { display: flex; flex-direction: column; gap: 1rem; }
.grid-2 { display: grid; gap: 1rem; }
.grid-3 {
  display: grid;
  gap: 1rem;
  margin-top: 1.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1.35fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: auto;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 80%, transparent);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  transition: opacity var(--dur) var(--ease);
}
.brand:hover { opacity: 0.92; }
.brand span { color: var(--primary); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--primary-hover), var(--primary));
  color: var(--primary-fg);
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--primary) 40%, transparent),
    0 8px 20px color-mix(in oklab, var(--primary) 22%, transparent);
}
.brand-mark svg { width: 16px; height: 16px; }
.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border-radius: var(--radius-full);
  background: color-mix(in oklab, var(--bg-subtle) 55%, transparent);
  border: 1px solid var(--border);
}
.nav a {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  color: var(--fg-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav a:hover {
  color: var(--fg);
  background: var(--bg-hover);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.user-chip {
  font-size: 0.8125rem;
  color: var(--fg-muted);
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--fg);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.menu-toggle:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}
.mobile-nav {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 0.75rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  animation: slide-down 0.2s var(--ease);
}
.mobile-nav a {
  padding: 0.85rem 0.9rem;
  border-radius: var(--radius-md);
  color: var(--fg-muted);
  font-weight: 500;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.mobile-nav a:hover {
  background: var(--bg-subtle);
  color: var(--fg);
}
.mobile-nav[hidden] { display: none !important; }
body.nav-open { overflow: hidden; }
body.nav-open .mobile-nav:not([hidden]) {
  display: flex;
  flex-direction: column;
  max-height: min(78vh, 560px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  height: 44px;
  padding: 0 1.05rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition:
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    transform var(--dur-fast) var(--ease),
    opacity var(--dur) var(--ease);
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; }
.btn-primary {
  background: linear-gradient(180deg, var(--primary-hover), var(--primary));
  color: var(--primary-fg);
  box-shadow:
    0 1px 0 color-mix(in oklab, #fff 25%, transparent) inset,
    0 8px 20px color-mix(in oklab, var(--primary) 22%, transparent);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #99f6e4, var(--primary-hover));
  box-shadow:
    0 1px 0 color-mix(in oklab, #fff 30%, transparent) inset,
    0 10px 28px color-mix(in oklab, var(--primary) 30%, transparent);
}
.btn-secondary {
  background: var(--bg-subtle);
  color: var(--fg);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}
.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--fg);
}
.btn-outline:hover:not(:disabled) {
  background: var(--bg-subtle);
  border-color: var(--fg-subtle);
}
.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
  min-height: 40px;
  height: 40px;
}
.btn-ghost:hover:not(:disabled) {
  color: var(--fg);
  background: var(--bg-subtle);
}
.btn-danger {
  background: var(--danger);
  color: #1a0508;
  font-weight: 700;
}
.btn-sm {
  min-height: 34px;
  height: 34px;
  padding: 0 0.8rem;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}
.btn-lg {
  min-height: 50px;
  height: 50px;
  padding: 0 1.35rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}
.btn-block { width: 100%; }

/* ---------- Forms ---------- */
.input,
.select,
.textarea {
  width: 100%;
  min-height: 46px;
  height: 46px;
  padding: 0 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--fg);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.02);
  transition:
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    background var(--dur) var(--ease);
}
.input::placeholder,
.textarea::placeholder {
  color: var(--fg-subtle);
}
.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--border-strong);
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: color-mix(in oklab, var(--primary) 55%, var(--border));
  box-shadow: 0 0 0 3px var(--primary-ring);
  background: var(--bg);
}
.textarea {
  height: auto;
  min-height: 104px;
  padding: 0.85rem 0.9rem;
  resize: vertical;
}
.label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--fg-muted);
  margin-bottom: 0.4rem;
}
.field { margin-bottom: 0.95rem; }
.form-row { display: grid; gap: 0.75rem; }
@media (min-width: 640px) {
  .form-row-2 { grid-template-columns: 1fr 1fr; }
}

/* ---------- Cards ---------- */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, color-mix(in oklab, #fff 2.5%, transparent), transparent 40%),
    var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  transition:
    border-color var(--dur) var(--ease),
    transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}
.card-body { padding: 1.25rem; }
.card-head { padding: 1.2rem 1.25rem 0.4rem; }
.card-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 3.75rem 0 4.25rem;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% 0 auto;
  height: 70%;
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, color-mix(in oklab, var(--primary) 16%, transparent), transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 30%, color-mix(in oklab, #38bdf8 8%, transparent), transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 20%, color-mix(in oklab, var(--primary) 8%, transparent), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(color-mix(in oklab, var(--border) 50%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in oklab, var(--border) 50%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 20%, #000 20%, transparent 75%);
  opacity: 0.35;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid color-mix(in oklab, var(--primary) 25%, var(--border));
  background: color-mix(in oklab, var(--bg-elevated) 80%, var(--primary-soft));
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--fg-muted);
  margin-bottom: 1.25rem;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.2) inset;
}
.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}
.hero h1 {
  margin: 0 auto;
  max-width: 16ch;
  font-size: clamp(2.15rem, 5.5vw, 3.65rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  text-wrap: balance;
  background: linear-gradient(180deg, #fff 30%, color-mix(in oklab, var(--fg) 75%, var(--primary)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lead {
  margin: 1.1rem auto 0;
  max-width: 38rem;
  color: var(--fg-muted);
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.6;
  text-wrap: pretty;
}
.shorten-wrap {
  margin: 2.4rem auto 0;
  max-width: 44rem;
  text-align: left;
}
.shorten-card {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, color-mix(in oklab, #fff 3%, transparent), transparent 50%),
    var(--bg-elevated);
  box-shadow: var(--shadow-glow);
  padding: 1.15rem;
}
.shorten-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .shorten-row { flex-direction: row; align-items: stretch; }
  .shorten-row .input {
    flex: 1;
    height: 50px;
    min-height: 50px;
    font-size: 1rem;
  }
}
.advanced-toggle {
  margin-top: 0.85rem;
  background: none;
  border: 0;
  color: var(--fg-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.25rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color var(--dur) var(--ease);
}
.advanced-toggle:hover { color: var(--fg); }
.advanced-toggle::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -2px;
}
.advanced-box {
  margin-top: 0.85rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg) 80%, var(--bg-subtle));
  display: grid;
  gap: 0.85rem;
  animation: slide-down 0.18s var(--ease);
}
@media (min-width: 640px) {
  .advanced-box { grid-template-columns: 1fr 1fr; }
}
.result-box {
  margin-top: 1rem;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in oklab, var(--primary) 35%, var(--border));
  background:
    linear-gradient(135deg, var(--primary-soft), transparent 60%),
    var(--bg);
  animation: slide-down 0.2s var(--ease);
}
.result-box .label-xs {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--fg-subtle);
  margin-bottom: 0.4rem;
}
.result-url {
  font-family: var(--mono);
  color: var(--primary);
  font-size: 1.05rem;
  font-weight: 500;
  word-break: break-all;
  line-height: 1.4;
}
.result-url:hover { text-decoration: underline; text-underline-offset: 3px; }
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.stats-line {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.5rem;
  color: var(--fg-muted);
  font-size: 0.875rem;
}
.stats-line > div {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  background: color-mix(in oklab, var(--bg-elevated) 70%, transparent);
  border: 1px solid var(--border);
}
.stats-line strong {
  color: var(--fg);
  font-weight: 700;
}

/* ---------- Sections / features ---------- */
.section {
  padding: 3.75rem 0;
  border-top: 1px solid var(--border);
  position: relative;
}
.section h2,
.page-title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.page-sub {
  margin: 0 0 1.5rem;
  color: var(--fg-muted);
  font-size: 0.95rem;
  max-width: 40rem;
}
.feature-card {
  height: 100%;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.feature-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in oklab, var(--primary) 28%, var(--border));
  box-shadow: var(--shadow-md);
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, var(--primary-soft), transparent),
    var(--bg-subtle);
  color: var(--primary);
  margin-bottom: 0.9rem;
  border: 1px solid color-mix(in oklab, var(--primary) 18%, var(--border));
  font-size: 0.85rem;
  font-weight: 700;
}
.feature-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.feature-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.55;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  background: color-mix(in oklab, var(--bg-elevated) 40%, transparent);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.footer-brand {
  color: var(--fg-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

/* ---------- Auth ---------- */
.auth-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(700px 400px at 50% 0%, color-mix(in oklab, var(--primary) 12%, transparent), transparent 70%),
    var(--bg);
}
.auth-card {
  width: min(420px, 100%);
  box-shadow: var(--shadow-lg);
}
.auth-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
}
.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}
.alert {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}
.alert-error {
  background: var(--danger-soft);
  color: #fecdd3;
  border-color: color-mix(in oklab, var(--danger) 30%, transparent);
}
.alert-success {
  background: var(--success-soft);
  color: #bbf7d0;
  border-color: color-mix(in oklab, var(--success) 30%, transparent);
}
.alert-error {
  background: var(--danger-soft);
  color: #fecdd3;
  border-color: color-mix(in oklab, var(--danger) 30%, transparent);
}

/* ---------- Dashboard ---------- */
.dash {
  display: flex;
  min-height: 100dvh;
  background: var(--bg);
}
.dash-aside {
  display: none;
  width: 248px;
  border-right: 1px solid var(--border);
  padding: 1.15rem 0.9rem;
  flex-shrink: 0;
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--primary) 4%, transparent), transparent 30%),
    var(--bg-elevated);
}
@media (min-width: 900px) {
  .dash-aside { display: flex; flex-direction: column; }
}
.aside-brand {
  margin: 0.15rem 0.4rem 1.35rem;
  padding: 0.35rem 0.45rem;
  display: inline-flex;
}
.dash-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.dash-nav a {
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--fg-muted);
  font-size: 0.9rem;
  font-weight: 500;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.dash-nav a:hover {
  background: var(--bg-subtle);
  color: var(--fg);
}
.dash-nav a.active {
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--primary) 22%, transparent);
}
.dash-switch {
  display: block;
  margin-top: auto;
  padding: 1rem 0.85rem 0.35rem;
  border-top: 1px solid var(--border);
  color: var(--fg-subtle);
  font-size: 0.85rem;
  font-weight: 500;
}
.dash-switch:hover { color: var(--primary); }
.dash-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.dash-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg-elevated) 70%, transparent);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.dash-mobile-nav {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  max-width: 72%;
  scrollbar-width: none;
}
.dash-mobile-nav::-webkit-scrollbar { display: none; }
@media (min-width: 900px) {
  .dash-mobile-nav { display: none; }
}
.dash-mobile-nav a {
  flex-shrink: 0;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--fg-muted);
  border: 1px solid var(--border);
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.dash-mobile-nav a.active {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: transparent;
}
.dash-user {
  margin-left: auto;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.875rem;
  color: var(--fg-muted);
}
.dash-user a:hover { color: var(--fg); }
.dash-content {
  padding: 1.25rem;
  flex: 1;
}
@media (min-width: 640px) {
  .dash-content { padding: 1.6rem 1.75rem; }
}

.stat-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr 1fr;
}
@media (min-width: 900px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-card {
  padding: 1.15rem 1.2rem;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at top right, var(--primary-soft), transparent 70%);
  pointer-events: none;
}
.stat-card .k {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--fg-muted);
  letter-spacing: 0.01em;
}
.stat-card .v {
  font-size: 1.55rem;
  font-weight: 700;
  margin-top: 0.35rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

/* ---------- Tables / lists ---------- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 560px;
}
table.data th {
  text-align: left;
  font-weight: 600;
  color: var(--fg-subtle);
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
table.data td {
  padding: 0.85rem 0.5rem;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 65%, transparent);
  vertical-align: middle;
}
table.data tr:hover td {
  background: color-mix(in oklab, var(--bg-subtle) 40%, transparent);
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid color-mix(in oklab, var(--primary) 20%, transparent);
}
.badge-muted {
  background: var(--bg-subtle);
  color: var(--fg-muted);
  border-color: var(--border);
}
.badge-warn {
  background: var(--warning-soft);
  color: #fde68a;
  border-color: color-mix(in oklab, var(--warning) 25%, transparent);
}
.badge-danger {
  background: var(--danger-soft);
  color: #fecdd3;
  border-color: color-mix(in oklab, var(--danger) 25%, transparent);
}
.badge-ok {
  background: var(--success-soft);
  color: #bbf7d0;
  border-color: color-mix(in oklab, var(--success) 25%, transparent);
}

.link-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 0.75rem;
  background: color-mix(in oklab, var(--bg) 40%, var(--bg-elevated));
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.link-row:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}
@media (min-width: 720px) {
  .link-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.link-row .code {
  font-family: var(--mono);
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 500;
}
.link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

/* ---------- Charts ---------- */
.bars {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  height: 168px;
  padding-top: 0.5rem;
}
.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  height: 100%;
  justify-content: flex-end;
}
.bar {
  width: 100%;
  max-width: 38px;
  background: linear-gradient(180deg, var(--primary-hover), var(--primary));
  border-radius: 8px 8px 4px 4px;
  min-height: 4px;
  box-shadow: 0 0 16px color-mix(in oklab, var(--primary) 25%, transparent);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.bar-col:hover .bar {
  transform: scaleY(1.03);
  transform-origin: bottom;
  opacity: 1;
}
.bar-label {
  font-size: 0.65rem;
  color: var(--fg-subtle);
  font-weight: 500;
}

/* ---------- Redirect / center ---------- */
.center-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(600px 300px at 50% 20%, color-mix(in oklab, var(--primary) 10%, transparent), transparent 70%),
    var(--bg);
}
.center-card {
  width: min(420px, 100%);
  text-align: center;
  box-shadow: var(--shadow-lg);
}

/* ---------- Toasts ---------- */
.toast-host {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(360px, calc(100% - 2rem));
  pointer-events: none;
}
.toast {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md);
  font-size: 0.875rem;
  font-weight: 500;
  animation: toast-in 0.22s var(--ease);
  pointer-events: auto;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* ---------- Pricing polish ---------- */
.section .card h2 {
  letter-spacing: -0.02em;
}

/* ---------- Responsive nav ---------- */
@media (max-width: 899px) {
  .desktop-nav { display: none !important; }
  .menu-toggle { display: grid; }
}

/* ---------- Scrollbar (webkit) ---------- */
@media (hover: hover) {
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 99px;
    border: 2px solid var(--bg);
  }
  ::-webkit-scrollbar-thumb:hover { background: var(--fg-subtle); }
}

/* =========================================================
   Premium animations — preloader, orbs, scroll reveals
   ========================================================= */

body.page-loading { overflow: hidden; }
body.page-loaded .preloader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
body.page-loaded { overflow: auto; }

/* Animated background */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: orb-float 18s ease-in-out infinite;
}
.orb-1 {
  width: 520px;
  height: 520px;
  top: -12%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, color-mix(in oklab, var(--primary) 55%, transparent), transparent 70%);
  animation-delay: 0s;
}
.orb-2 {
  width: 380px;
  height: 380px;
  bottom: 10%;
  left: -8%;
  background: radial-gradient(circle, color-mix(in oklab, #818cf8 40%, transparent), transparent 70%);
  animation-delay: -6s;
  animation-duration: 22s;
}
.orb-3 {
  width: 320px;
  height: 320px;
  top: 35%;
  right: -6%;
  background: radial-gradient(circle, color-mix(in oklab, var(--primary) 35%, transparent), transparent 70%);
  animation-delay: -12s;
  animation-duration: 20s;
}
@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}
.starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.35;
}

/* Preloader */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}
.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.preloader-logo .brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  animation: pulse-glow 1.8s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 1px color-mix(in oklab, var(--primary) 40%, transparent), 0 8px 30px color-mix(in oklab, var(--primary) 25%, transparent); transform: scale(1); }
  50% { box-shadow: 0 0 0 1px color-mix(in oklab, var(--primary) 60%, transparent), 0 12px 50px color-mix(in oklab, var(--primary) 40%, transparent); transform: scale(1.04); }
}
.preloader-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.preloader-text span { color: var(--primary); }
.preloader-bar {
  width: 120px;
  height: 3px;
  border-radius: 99px;
  background: var(--border);
  overflow: hidden;
}
.preloader-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--primary-hover));
  border-radius: 99px;
  animation: preload-bar 1.2s var(--ease) forwards;
}
@keyframes preload-bar {
  to { width: 100%; }
}

/* Scroll reveal */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-animate="fade-down"] { transform: translateY(-16px); }
[data-animate="fade-left"] { transform: translateX(24px); }
[data-animate="fade-right"] { transform: translateX(-24px); }
[data-animate="scale-in"] { transform: scale(0.96); }
[data-animate].is-visible {
  opacity: 1;
  transform: none;
}
[data-delay="1"] { transition-delay: 0.1s; }
[data-delay="2"] { transition-delay: 0.2s; }
[data-delay="3"] { transition-delay: 0.3s; }
[data-delay="4"] { transition-delay: 0.4s; }
[data-delay="5"] { transition-delay: 0.5s; }

/* Hero stagger */
.hero-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  animation: hero-in 0.8s var(--ease) forwards;
}
.hero-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.hero-stagger > *:nth-child(2) { animation-delay: 0.15s; }
.hero-stagger > *:nth-child(3) { animation-delay: 0.25s; }
.hero-stagger > *:nth-child(4) { animation-delay: 0.35s; }
.hero-stagger > *:nth-child(5) { animation-delay: 0.45s; }
@keyframes hero-in {
  to { opacity: 1; transform: none; }
}

/* Gradient text accent */
.text-gradient {
  background: linear-gradient(135deg, var(--primary-hover), #818cf8 50%, var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* How it works */
.steps-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
}
.step-card {
  position: relative;
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg-elevated) 90%, transparent);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.step-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in oklab, var(--primary) 30%, var(--border));
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.85rem;
}

/* Testimonials */
.testimonial-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .testimonial-grid { grid-template-columns: repeat(3, 1fr); }
}
.testimonial {
  padding: 1.35rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.testimonial:hover {
  border-color: color-mix(in oklab, var(--primary) 25%, var(--border));
  transform: translateY(-2px);
}
.testimonial p {
  margin: 0 0 1rem;
  font-size: 0.925rem;
  color: var(--fg-muted);
  line-height: 1.6;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.testimonial-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-soft), color-mix(in oklab, #818cf8 20%, transparent));
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--primary);
}
.testimonial-name {
  font-weight: 600;
  font-size: 0.875rem;
}
.testimonial-role {
  font-size: 0.75rem;
  color: var(--fg-subtle);
}

/* FAQ accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.5rem;
  max-width: 720px;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease);
}
.faq-item.is-open {
  border-color: color-mix(in oklab, var(--primary) 30%, var(--border));
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  background: none;
  border: 0;
  color: var(--fg);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: left;
}
.faq-q::after {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--fg-muted);
  border-bottom: 2px solid var(--fg-muted);
  transform: rotate(45deg);
  transition: transform var(--dur) var(--ease);
}
.faq-item.is-open .faq-q::after {
  transform: rotate(-135deg);
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease);
}
.faq-a-inner {
  padding: 0 1.15rem 1rem;
  color: var(--fg-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Footer grid */
.footer-grid {
  display: grid;
  gap: 2rem;
  padding-bottom: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}
.footer-col h4 {
  margin: 0 0 0.85rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-subtle);
  font-weight: 600;
}
.footer-col a {
  display: block;
  padding: 0.35rem 0;
  color: var(--fg-muted);
  font-size: 0.875rem;
  transition: color var(--dur) var(--ease);
}
.footer-col a:hover { color: var(--primary); }
.footer-brand-link {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--border);
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  width: min(520px, calc(100% - 2rem));
  animation: slide-up 0.4s var(--ease);
}
.cookie-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: color-mix(in oklab, var(--bg-elevated) 92%, transparent);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
}
.cookie-inner p {
  margin: 0;
  flex: 1;
  font-size: 0.85rem;
  color: var(--fg-muted);
  min-width: 200px;
}
.cookie-inner a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
@keyframes slide-up {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Legal / prose pages */
.legal-page {
  padding: 3rem 0 4rem;
}
.legal-header {
  margin-bottom: 1.5rem;
}
.legal-content { max-width: 780px; }
.prose h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li {
  color: var(--fg-muted);
  font-size: 0.925rem;
  line-height: 1.7;
}
.prose ul, .prose ol {
  padding-left: 1.25rem;
  margin: 0.75rem 0;
}
.prose a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Contact form */
.contact-grid {
  display: grid;
  gap: 1.5rem;
  max-width: 720px;
}
@media (min-width: 640px) {
  .contact-grid { grid-template-columns: 1fr 1.2fr; }
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-info-item {
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
.contact-info-item strong {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-subtle);
  margin-bottom: 0.35rem;
}

/* API key display */
.api-key-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in oklab, var(--primary) 30%, var(--border));
  background: var(--primary-soft);
  font-family: var(--mono);
  font-size: 0.85rem;
  word-break: break-all;
  margin: 0.75rem 0;
}

/* Shimmer button loading */
.btn.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border: 2px solid color-mix(in oklab, currentColor 30%, transparent);
  border-top-color: var(--primary-fg);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Counter animation */
.stat-counter {
  display: inline-block;
  min-width: 2ch;
}

/* CTA glow section */
.cta-section {
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 100%, color-mix(in oklab, var(--primary) 12%, transparent), transparent 70%);
  pointer-events: none;
}

/* Feature icon SVG style */
.feature-icon svg {
  width: 20px;
  height: 20px;
}

/* Brand icon / logo */
.brand-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}
.brand-mark .brand-icon-img {
  filter: drop-shadow(0 4px 12px color-mix(in oklab, var(--primary) 30%, transparent));
}
.preloader-mark {
  width: 56px !important;
  height: 56px !important;
  border-radius: 16px;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}
.preloader-mark .brand-icon-img {
  border-radius: 16px;
}
.footer-mark, .aside-mark {
  width: 32px !important;
  height: 32px !important;
  background: transparent;
  box-shadow: none;
}

/* Admin panel enhancements */
.admin-badge {
  margin: 0 0.4rem 1rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  border: 1px solid color-mix(in oklab, var(--primary) 22%, transparent);
}
.dash-nav-icon {
  opacity: 0.65;
  font-size: 0.85rem;
  width: 1.1rem;
  text-align: center;
}
.dash-nav a.active .dash-nav-icon { opacity: 1; }
.admin-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.admin-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.admin-stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
}
.stat-delta {
  font-size: 0.72rem;
  color: var(--primary);
  margin-top: 0.25rem;
  font-weight: 500;
}
.admin-bar-row {
  display: grid;
  grid-template-columns: 80px 1fr 40px;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.65rem;
}
.admin-bar-label {
  font-size: 0.82rem;
  color: var(--fg-muted);
}
.admin-bar-track {
  height: 8px;
  border-radius: 99px;
  background: var(--bg-subtle);
  overflow: hidden;
}
.admin-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--primary-hover));
}
.admin-bar-val {
  font-size: 0.78rem;
  text-align: right;
  color: var(--fg-muted);
}
.bars-wide {
  overflow-x: auto;
  padding-bottom: 0.5rem;
}
.bars-wide .bar-col {
  min-width: 12px;
}
.admin-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.admin-filter-tabs a {
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--fg-muted);
  border: 1px solid var(--border);
}
.admin-filter-tabs a.active,
.admin-filter-tabs a:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: color-mix(in oklab, var(--primary) 30%, var(--border));
}
.report-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.report-row:last-child { border-bottom: 0; }
.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.sys-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 65%, transparent);
  font-size: 0.875rem;
}
.sys-row:last-child { border-bottom: 0; }
.dash-aside {
  width: 260px;
}
.dash-nav a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

/* Preloader variants */
.preloader-dots {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.5rem;
}
.preloader-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: dot-bounce 1.2s ease-in-out infinite;
}
.preloader-dots span:nth-child(2) { animation-delay: 0.15s; }
.preloader-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}
.preloader-pulse {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid var(--primary-soft);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
  margin-top: 0.5rem;
}
.preloader-moon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-hover), var(--primary));
  box-shadow: 0 0 30px color-mix(in oklab, var(--primary) 50%, transparent);
  animation: moon-pulse 2s ease-in-out infinite;
  margin-top: 0.5rem;
}
@keyframes moon-pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.08); opacity: 1; }
}
.preloader-minimal .preloader-bar { display: none; }

.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.35rem;
  margin: 0.5rem 0 1rem;
}
.perm-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--fg-muted);
  cursor: pointer;
}
.section-edit {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.theme-preview {
  text-align: center;
  padding: 2rem 1rem;
}
.cms-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

/* =========================================================
   Multi-UI layouts, light mode, mobile / admin responsive
   ========================================================= */

.bg-mesh {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 20% 20%, color-mix(in oklab, var(--primary) 18%, transparent), transparent 42%),
    radial-gradient(circle at 80% 10%, color-mix(in oklab, var(--primary) 12%, transparent), transparent 40%),
    radial-gradient(circle at 50% 80%, color-mix(in oklab, var(--primary) 10%, transparent), transparent 45%);
  filter: blur(8px);
  opacity: 0.9;
}
body.bg-none .bg-canvas,
body.bg-gradient .starfield,
body.bg-mesh .starfield { display: none; }
body.bg-none .orb { display: none; }
body.bg-gradient .orb { display: none; }
body.bg-gradient .bg-mesh { opacity: 0.7; }

/* Header variants */
body.header-floating .site-header {
  margin: 0.75rem auto 0;
  width: min(1120px, calc(100% - 1.5rem));
  border-radius: var(--radius-xl);
  border: 1px solid color-mix(in oklab, var(--border) 80%, transparent);
  background: color-mix(in oklab, var(--bg-elevated) 72%, transparent);
  box-shadow: var(--shadow-md);
}
body.header-solid .site-header {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  backdrop-filter: none;
}

/* ---------- UI: Classic (default baseline) ---------- */
body.ui-classic .hero h1 { letter-spacing: -0.04em; }

/* ---------- UI: Modern ---------- */
body.ui-modern {
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
}
body.ui-modern .card,
body.ui-modern .shorten-card,
body.ui-modern .stat-card {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in oklab, var(--border) 70%, transparent);
}
body.ui-modern .btn { border-radius: var(--radius-full); }
body.ui-modern .hero { padding-block: clamp(3.5rem, 10vw, 6.5rem); }
body.ui-modern .section { padding-block: clamp(3rem, 8vw, 5rem); }

/* ---------- UI: Glass ---------- */
body.ui-glass .card,
body.ui-glass .shorten-card,
body.ui-glass .stat-card,
body.ui-glass .feature-card,
body.ui-glass .legal-content {
  background: color-mix(in oklab, var(--bg-elevated) 55%, transparent);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-color: color-mix(in oklab, var(--fg) 10%, transparent);
  box-shadow: var(--shadow-md);
}
body.ui-glass .site-header {
  background: color-mix(in oklab, var(--bg) 55%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
body.ui-glass .dash-aside,
body.ui-glass .dash-top {
  background: color-mix(in oklab, var(--bg-elevated) 70%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ---------- UI: Compact ---------- */
body.ui-compact {
  --header-h: 56px;
  font-size: 15px;
}
body.ui-compact .hero { padding-block: clamp(2rem, 6vw, 3.5rem); }
body.ui-compact .section { padding-block: clamp(2rem, 5vw, 3.25rem); }
body.ui-compact .card-body,
body.ui-compact .dash-content { padding: 0.9rem; }
body.ui-compact .stat-card { padding: 0.85rem 0.95rem; }
body.ui-compact .btn { min-height: 40px; }
body.ui-compact .dash-nav a { min-height: 40px; padding: 0.5rem 0.7rem; font-size: 0.84rem; }

/* ---------- UI: Bold ---------- */
body.ui-bold {
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 10px;
}
body.ui-bold .brand,
body.ui-bold .hero h1,
body.ui-bold .page-title {
  letter-spacing: -0.05em;
  font-weight: 800;
}
body.ui-bold .btn-primary {
  box-shadow: 4px 4px 0 color-mix(in oklab, var(--primary) 35%, #000);
}
body.ui-bold .card,
body.ui-bold .shorten-card {
  border-width: 2px;
  border-color: var(--border-strong);
  box-shadow: 6px 6px 0 color-mix(in oklab, var(--fg) 8%, transparent);
}
body.ui-bold .pill { border-radius: 4px; }

/* ---------- UI: Minimal ---------- */
body.ui-minimal .bg-canvas { opacity: 0.35; }
body.ui-minimal .orb { display: none; }
body.ui-minimal .card,
body.ui-minimal .shorten-card,
body.ui-minimal .stat-card {
  box-shadow: none;
  background: transparent;
  border-color: var(--border);
}
body.ui-minimal .site-header {
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: none;
}
body.ui-minimal .btn-primary { box-shadow: none; }
body.ui-minimal .hero::before,
body.ui-minimal .hero::after { display: none; }

/* ---------- Light mode polish ---------- */
body.mode-light .alert-success { color: #166534; }
body.mode-light .alert-danger { color: #9f1239; }
body.mode-light .text-gradient {
  background: linear-gradient(120deg, var(--primary), color-mix(in oklab, var(--primary) 40%, #0f172a));
  -webkit-background-clip: text;
  background-clip: text;
}
body.mode-light .starfield { opacity: 0.25; }
body.mode-light .user-chip { background: var(--bg-subtle); }

@media (prefers-color-scheme: light) {
  body.mode-auto .alert-success { color: #166534; }
  body.mode-auto .alert-danger { color: #9f1239; }
  body.mode-auto .starfield { opacity: 0.25; }
}

/* ---------- Admin theme picker ---------- */
.ui-layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
@media (min-width: 560px) {
  .ui-layout-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 980px) {
  .ui-layout-grid { grid-template-columns: repeat(3, 1fr); }
}
.ui-layout-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
  min-height: 44px;
}
.ui-layout-card:hover { border-color: var(--border-strong); }
.ui-layout-card.is-selected {
  border-color: color-mix(in oklab, var(--primary) 55%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--primary) 35%, transparent), var(--shadow-sm);
  background: var(--primary-soft);
}
.ui-layout-card input { position: absolute; opacity: 0; pointer-events: none; }
.ui-layout-preview {
  display: grid;
  gap: 0.35rem;
  padding: 0.65rem;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--border);
  min-height: 88px;
}
.ulp-bar {
  height: 8px;
  width: 42%;
  border-radius: 99px;
  background: var(--primary);
  opacity: 0.85;
}
.ulp-hero {
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(90deg, color-mix(in oklab, var(--primary) 25%, transparent), transparent);
}
.ulp-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.3rem; }
.ulp-row span {
  height: 16px;
  border-radius: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.ui-preview-modern .ui-layout-preview,
.ui-preview-modern.ui-layout-preview { border-radius: 16px; }
.ui-preview-glass .ui-layout-preview,
.ui-preview-glass.ui-layout-preview {
  background: color-mix(in oklab, var(--bg-elevated) 50%, transparent);
  backdrop-filter: blur(8px);
}
.ui-preview-bold .ulp-bar { border-radius: 2px; height: 10px; }
.ui-preview-bold .ulp-hero { border-radius: 2px; }
.ui-preview-compact .ui-layout-preview { min-height: 72px; gap: 0.2rem; }
.ui-preview-minimal .ulp-hero { background: var(--border); }
.ui-layout-meta { display: flex; flex-direction: column; gap: 0.2rem; }
.ui-layout-meta strong { font-size: 0.92rem; }
.preset-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.preset-swatch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fg-muted);
  cursor: pointer;
  min-height: 36px;
}
.preset-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.preset-swatch span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.2);
}
.preset-swatch.is-selected {
  border-color: color-mix(in oklab, var(--primary) 50%, var(--border));
  color: var(--primary);
  background: var(--primary-soft);
}
.theme-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 1rem;
}
.theme-save-bar {
  position: sticky;
  bottom: 0;
  z-index: 15;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
  padding: 0.85rem 0 calc(0.85rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, transparent, var(--bg) 30%);
}
.stack-gap { display: flex; flex-direction: column; gap: 1.25rem; }

/* ---------- Dashboard mobile drawer ---------- */
.aside-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.dash-drawer-close {
  display: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  color: var(--fg);
}
.dash-menu-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  color: var(--fg);
  min-width: 42px;
}
.dash-overlay {
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 0.45);
  z-index: 40;
  backdrop-filter: blur(2px);
}
.dash-overlay[hidden] { display: none !important; }
.dash-top-title {
  display: none;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42vw;
}
.dash-user-name {
  max-width: 28vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-mobile-nav { display: none !important; }

@media (max-width: 899px) {
  .dash-aside {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, 86vw);
    z-index: 50;
    transform: translateX(-105%);
    transition: transform 220ms var(--ease);
    box-shadow: var(--shadow-lg);
    padding-top: max(1rem, env(safe-area-inset-top, 0px));
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .dash.is-drawer-open .dash-aside { transform: translateX(0); }
  .dash-drawer-close { display: grid; }
  .dash-top-title { display: block; }
  .dash-top {
    padding-top: max(0.75rem, env(safe-area-inset-top, 0px));
    padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
  }
  body.dash-drawer-lock { overflow: hidden; touch-action: none; }
}
@media (min-width: 900px) {
  .dash-menu-btn,
  .dash-drawer-close,
  .dash-overlay { display: none !important; }
  .dash-top-title { display: none; }
}

/* ---------- Global responsive / touch polish ---------- */
@supports (padding: max(0px)) {
  .site-header .header-inner {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
  .cookie-banner {
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }
  .mobile-nav {
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }
}

.btn,
.menu-toggle,
.dash-menu-btn,
.input,
.select,
textarea.input {
  touch-action: manipulation;
}
.btn,
.menu-toggle {
  min-height: 44px;
}
.btn-sm { min-height: 38px; }
.input,
.select,
textarea.input {
  min-height: 44px;
  font-size: 16px; /* prevents iOS zoom on focus */
}

@media (max-width: 639px) {
  .container { width: min(1120px, calc(100% - 1.25rem)); }
  .hero h1 { font-size: clamp(1.85rem, 9vw, 2.6rem); line-height: 1.12; }
  .hero .lead { font-size: 0.98rem; }
  .shorten-row {
    flex-direction: column;
    align-items: stretch;
  }
  .shorten-row .btn { width: 100%; }
  .shorten-row .input { width: 100%; }
  .header-actions .user-chip { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .footer-brand-col { grid-column: 1 / -1; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 0.65rem; }
  .admin-stat-grid { grid-template-columns: 1fr 1fr !important; }
  .page-title { font-size: clamp(1.35rem, 6vw, 1.75rem); }
  .grid-2,
  .grid-3 { grid-template-columns: 1fr !important; }
  .admin-bar-row { grid-template-columns: 64px 1fr 36px; gap: 0.45rem; }
  .admin-quick-actions { width: 100%; }
  .admin-quick-actions .btn { flex: 1 1 auto; justify-content: center; }
  .table-wrap,
  .bars-wide,
  .card-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 520px; }
  .dash-content { padding: 1rem 0.85rem 1.5rem; }
  .dash-user span { display: none; }
  .report-row { flex-direction: column; align-items: flex-start; }
  .theme-save-bar .btn { flex: 1 1 auto; justify-content: center; }
}

@media (max-width: 399px) {
  .brand { font-size: 1rem; }
  .stat-grid,
  .admin-stat-grid { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: 1fr; }
  .pill { font-size: 0.72rem; }
}

@media (min-width: 640px) and (max-width: 899px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-stat-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .dash-content { padding: 1.35rem 1.25rem; }
}

/* Landscape phones */
@media (max-height: 480px) and (orientation: landscape) {
  .hero { padding-block: 1.5rem; }
  .preloader { align-items: flex-start; padding-top: 1.5rem; }
  .dash-aside { padding-top: 0.5rem; }
}

/* Windows high-DPI / touch hybrid */
@media (pointer: coarse) {
  .dash-nav a,
  .mobile-nav a,
  .nav a {
    min-height: 44px;
  }
  .link-row,
  .sys-row,
  .report-row { gap: 0.85rem; }
}

/* Print / reduced noise */
@media print {
  .bg-canvas, .preloader, .cookie-banner, .site-header, .dash-aside, .dash-top { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- Payments / checkout ---------- */
.pay-method-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}
@media (min-width: 560px) {
  .pay-method-grid { grid-template-columns: 1fr 1fr; }
}
.pay-method-card {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  cursor: pointer;
  min-height: 44px;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.pay-method-card:has(input:checked),
.pay-method-card:hover {
  border-color: color-mix(in oklab, var(--primary) 45%, var(--border));
  background: var(--primary-soft);
}
.pay-method-card input { margin-top: 0.2rem; accent-color: var(--primary); }
.pay-method-body { display: flex; flex-direction: column; gap: 0.15rem; }
.pay-accept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.55rem;
}
.pay-accept-item {
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.85rem;
}
.checkout-page .pay-instructions pre { max-height: 180px; overflow: auto; }

/* ---------- 404 page ---------- */
.page-404 .site-footer { margin-top: 0; }
.error-404 {
  position: relative;
  padding: clamp(2.5rem, 8vw, 5rem) 0 clamp(3rem, 10vw, 6rem);
  overflow: hidden;
  min-height: calc(100dvh - var(--header-h) - 4rem);
}
.error-404-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  max-width: 820px;
}
.error-404-visual {
  position: relative;
  width: min(280px, 70vw);
  height: min(280px, 70vw);
  display: grid;
  place-items: center;
  margin-bottom: 0.5rem;
}
.error-orbit {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px solid color-mix(in oklab, var(--primary) 28%, transparent);
  animation: error-spin 18s linear infinite;
}
.error-orbit-2 {
  inset: 0;
  border-style: dashed;
  border-color: color-mix(in oklab, var(--primary) 18%, transparent);
  animation-duration: 28s;
  animation-direction: reverse;
}
.error-pulse {
  position: absolute;
  width: 42%;
  height: 42%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklab, var(--primary) 35%, transparent), transparent 70%);
  animation: error-breathe 3.2s ease-in-out infinite;
}
.error-glitch {
  position: relative;
  z-index: 1;
  font-size: clamp(4.5rem, 18vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 1;
  background: linear-gradient(135deg, var(--fg), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px color-mix(in oklab, var(--primary) 25%, transparent);
}
.error-glitch.is-glitching {
  animation: error-glitch 0.45s steps(2, end);
}
.error-404-copy { max-width: 36rem; }
.error-404-copy .lead { margin: 0.75rem auto 0; color: var(--fg-muted); }
.error-path {
  margin-top: 0.85rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.error-404-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
}
.error-guide,
.error-tips {
  width: 100%;
  text-align: left;
  margin-top: 1rem;
}
.error-guide-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.error-guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin-top: 1rem;
}
@media (min-width: 640px) {
  .error-guide-grid { grid-template-columns: 1fr 1fr; }
}
.error-guide-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg-elevated) 80%, transparent);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  min-height: 44px;
}
.error-guide-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--primary) 40%, var(--border));
  box-shadow: var(--shadow-md);
}
.error-guide-label {
  font-weight: 700;
  font-size: 0.95rem;
}
.error-guide-cta {
  margin-top: auto;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
}
.error-tips-list {
  margin: 0.75rem 0 0;
  padding-left: 1.15rem;
  color: var(--fg-muted);
  font-size: 0.9rem;
}
.error-tips-list li { margin-bottom: 0.45rem; }
.error-tips-list a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }

@keyframes error-spin { to { transform: rotate(360deg); } }
@keyframes error-breathe {
  0%, 100% { transform: scale(0.92); opacity: 0.55; }
  50% { transform: scale(1.08); opacity: 1; }
}
@keyframes error-glitch {
  0% { transform: none; filter: none; }
  20% { transform: translate(-3px, 1px); filter: hue-rotate(20deg); }
  40% { transform: translate(3px, -1px); }
  60% { transform: translate(-2px, 0); filter: hue-rotate(-15deg); }
  100% { transform: none; filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .error-orbit, .error-pulse, .error-glitch.is-glitching { animation: none !important; }
}
@media (max-width: 639px) {
  .error-404-actions .btn { flex: 1 1 auto; justify-content: center; }
}
