/* Design tokens + shared components. Dark only. */
:root {
  --bg: #06070b;
  --bg-2: #0b0d14;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-solid: #10121b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #eef0f7;
  --muted: #9097ad;
  --dim: #5e6479;
  --a1: #8b5cf6;
  --a2: #22d3ee;
  --grad: linear-gradient(120deg, var(--a1), var(--a2));
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;
  --info: #60a5fa;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Unbounded", "Manrope", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
::selection { background: rgba(139, 92, 246, 0.45); }

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; margin: 0; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mono { font-family: ui-monospace, "JetBrains Mono", Consolas, monospace; }

/* Buttons */
.btn {
  --h: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 22px;
  border-radius: 12px; border: 1px solid transparent;
  font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, opacity .2s;
  user-select: none;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 10px 30px -10px rgba(139, 92, 246, .8), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-primary:hover { box-shadow: 0 14px 40px -10px rgba(34, 211, 238, .7), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-ghost { background: var(--surface); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--line-strong); }
.btn-danger { background: rgba(251, 113, 133, .1); border-color: rgba(251, 113, 133, .3); color: var(--bad); }
.btn-danger:hover { background: rgba(251, 113, 133, .18); }
.btn-lg { --h: 56px; padding: 0 30px; font-size: 16px; border-radius: 14px; }
.btn-sm { --h: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }

/* Cards */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.02));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  position: relative;
}
.glow { position: relative; }
.glow::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, rgba(139,92,246,.7), rgba(34,211,238,.15) 40%, transparent 60%, rgba(34,211,238,.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}

/* Pills */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 28px; padding: 0 12px; border-radius: 99px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .01em;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); background: rgba(52,211,153,.1); border-color: rgba(52,211,153,.25); }
.pill.ok .dot { box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: pulse 1.8s infinite; }
.pill.warn { color: var(--warn); background: rgba(251,191,36,.1); border-color: rgba(251,191,36,.25); }
.pill.bad { color: var(--bad); background: rgba(251,113,133,.1); border-color: rgba(251,113,133,.25); }
.pill.info { color: var(--info); background: rgba(96,165,250,.1); border-color: rgba(96,165,250,.25); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.6); } 70% { box-shadow: 0 0 0 8px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }

/* Forms */
.field { display: grid; gap: 8px; }
.field label { font-size: 13px; font-weight: 700; color: var(--muted); }
.input {
  height: 50px; width: 100%; padding: 0 16px;
  background: rgba(0,0,0,.35); border: 1px solid var(--line-strong); border-radius: 12px;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: rgba(139,92,246,.8); box-shadow: 0 0 0 4px rgba(139,92,246,.18); }
.input::placeholder { color: var(--dim); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--a1); flex: none; }

/* Switch */
.switch { position: relative; width: 58px; height: 32px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span {
  position: absolute; inset: 0; border-radius: 99px; cursor: pointer;
  background: rgba(255,255,255,.1); border: 1px solid var(--line-strong); transition: background .25s;
}
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.4); transition: transform .25s cubic-bezier(.3,1.4,.6,1);
}
.switch input:checked + span { background: var(--grad); border-color: transparent; }
.switch input:checked + span::after { transform: translateX(26px); }
.switch input:disabled + span { opacity: .45; cursor: not-allowed; }

/* Segmented */
.seg { display: inline-flex; padding: 4px; gap: 4px; background: rgba(0,0,0,.35); border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.seg button {
  border: 0; background: transparent; padding: 9px 14px; border-radius: 9px; cursor: pointer;
  font-weight: 700; font-size: 13.5px; color: var(--muted); transition: background .2s, color .2s;
}
.seg button.on { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }

/* Toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 10px; z-index: 100; }
.toast {
  min-width: 260px; max-width: 380px; padding: 14px 18px; border-radius: 14px;
  background: #151826; border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  font-weight: 600; font-size: 14px; animation: toast-in .35s cubic-bezier(.2,1.2,.4,1);
}
.toast.ok { border-color: rgba(52,211,153,.4); }
.toast.bad { border-color: rgba(251,113,133,.45); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; padding: 20px; }
.modal.open { display: grid; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3,4,8,.72); backdrop-filter: blur(8px); animation: fade .2s; }
.modal-box {
  position: relative; width: min(480px, 100%); max-height: calc(100vh - 40px); overflow: auto;
  background: linear-gradient(180deg, #121521, #0d0f18); border: 1px solid var(--line-strong);
  border-radius: 24px; padding: 28px; box-shadow: var(--shadow); animation: pop .3s cubic-bezier(.2,1.2,.4,1);
}
.modal-box h3 { font-size: 21px; margin-bottom: 6px; }
.modal-close {
  position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: grid; place-items: center;
}
.modal-close svg { width: 18px; height: 18px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }

.spinner {
  width: 46px; height: 46px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.08); border-top-color: var(--a2); border-right-color: var(--a1);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.logo { display: inline-flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 800; letter-spacing: .02em; font-size: 17px; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--grad);
  box-shadow: 0 8px 24px -8px rgba(139,92,246,.9);
}
.logo-mark svg { width: 20px; height: 20px; color: #fff; }

.tag {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--muted);
}
.tag b { background: var(--grad); color: #fff; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; }

.icon { width: 20px; height: 20px; flex: none; }

/* Motion is part of the product here and stays on even when the OS asks to reduce it:
   the owner's own Windows has animation effects off and the site looked dead. */

/* Brand: second word in the gradient */
.logo-text { text-transform: uppercase; white-space: nowrap; }
.logo-text b { font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-mark { transition: transform .5s cubic-bezier(.3,1.5,.6,1); }
.logo:hover .logo-mark { transform: rotate(-12deg) scale(1.08); }

/* Smooth cross-fade between pages and smooth <details> where the browser can */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  details::details-content { block-size: 0; overflow: hidden; opacity: 0; transition: block-size .35s ease, opacity .35s ease, content-visibility .35s allow-discrete; }
  details[open]::details-content { block-size: auto; opacity: 1; }
}

/* A sheen sweeping across the main buttons */
.sheen { position: relative; overflow: hidden; }
.sheen::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.38), transparent);
  transform: skewX(-18deg); animation: sheen 4.2s ease-in-out infinite; pointer-events: none;
}
@keyframes sheen { 0%, 62% { left: -60%; } 100% { left: 130%; } }

/* Number fields without the browser's up/down arrows */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Cookie notice */
.cookie {
  position: fixed; right: 20px; bottom: 20px; z-index: 80; width: min(440px, calc(100vw - 40px));
  display: flex; gap: 14px; align-items: center; padding: 16px 16px 16px 18px; border-radius: 20px;
  background: rgba(17,20,30,.86); border: 1px solid var(--line-strong); backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px -18px rgba(0,0,0,.8); animation: cookie-in .5s cubic-bezier(.2,1.2,.4,1) both;
}
.cookie-ic { width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center; background: rgba(139,92,246,.14); border: 1px solid rgba(139,92,246,.3); color: #c4b5fd; }
.cookie-text { flex: 1; min-width: 0; font-size: 13px; line-height: 1.45; }
.cookie-text b { font-size: 14px; }
.cookie-text p { margin: 3px 0 0; color: var(--muted); }
.cookie-text .link { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.cookie .btn { flex: none; }
.cookie.bye { animation: cookie-out .35s ease both; }
@keyframes cookie-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes cookie-out { to { opacity: 0; transform: translateY(24px) scale(.97); } }
@media (max-width: 560px) {
  .cookie { left: 12px; right: 12px; bottom: 12px; width: auto; flex-wrap: wrap; }
  .cookie .btn { width: 100%; }
  .panel .cookie { bottom: 84px; }
}

@media (max-width: 480px) {
  .logo { font-size: 14px; gap: 9px; }
  .logo-mark { width: 32px; height: 32px; border-radius: 10px; }
}

/* "Free trial" badge: landing and panel */
.trial-pill { color: #fde047; background: rgba(234,179,8,.12); border: 1px solid rgba(234,179,8,.35); }
.trial-pill svg { width: 14px; height: 14px; }
