/* Nova glass design system — shared by site, docs and panel */
:root {
  --bg: #050810;
  --ink: #eef4ff;
  --ink-2: rgba(234, 242, 255, .68);
  --ink-3: rgba(234, 242, 255, .42);
  --glass: rgba(255, 255, 255, .055);
  --glass-2: rgba(255, 255, 255, .09);
  --glass-hi: rgba(255, 255, 255, .14);
  --stroke: rgba(255, 255, 255, .11);
  --stroke-2: rgba(255, 255, 255, .2);
  --accent: #3b82f6;
  --accent-2: #60a5fa;
  --violet: #3b82f6;
  --magenta: #3b82f6;
  --cyan: #22d3ee;
  --amber: #fbbf24;
  --red: #fb7185;
  --green: #4ade80;
  --grad: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #22d3ee 100%);
  --grad-cool: linear-gradient(135deg, #3b82f6, #22d3ee);
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 28px;
  --blur: blur(26px) saturate(170%);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font); background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; line-height: 1.55; min-height: 100vh; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(59, 130, 246, .35); }
:focus-visible { outline: 2px solid var(--magenta); outline-offset: 3px; border-radius: 8px; }

/* ---------- aurora backdrop ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora::after { /* fine grain so the gradients don't band */
  content: ""; position: absolute; inset: 0; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.aurora i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; animation: drift 26s var(--ease) infinite alternate; }
/* three softer, evenly weighted glows so no side of the screen turns solid blue */
.aurora i:nth-child(1) { width: 42vw; height: 42vw; left: -16vw; top: -18vw; background: #1e40af; opacity: .26; }
.aurora i:nth-child(2) { width: 42vw; height: 42vw; right: -16vw; top: -12vw; background: #1d4ed8; animation-delay: -8s; opacity: .22; }
.aurora i:nth-child(3) { width: 52vw; height: 52vw; left: 24vw; bottom: -36vw; background: #0e7490; animation-delay: -15s; opacity: .18; }
@keyframes drift { to { transform: translate3d(6vw, 5vh, 0) scale(1.15) rotate(25deg); } }

/* ---------- glass surfaces ---------- */
.glass {
  background: linear-gradient(160deg, rgba(255,255,255,.085), rgba(255,255,255,.03));
  border: 1px solid var(--stroke);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 20px 50px -20px rgba(0,0,0,.6);
  border-radius: var(--r);
}
.glass-strong { background: rgba(10, 18, 36, .76); }

/* ---------- buttons ---------- */
.btn {
  --h: 42px; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 18px; border-radius: 999px; border: 1px solid var(--stroke-2);
  background: var(--glass-2); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  font-weight: 600; font-size: 14px; letter-spacing: -.01em; cursor: pointer; white-space: nowrap; overflow: hidden; isolation: isolate;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 6px 18px -8px rgba(0,0,0,.6);
  transition: transform .35s var(--spring), background .25s, box-shadow .25s, border-color .25s;
}
.btn::before { /* glossy top sheen */
  content: ""; position: absolute; inset: 0 0 50% 0; z-index: -1; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0));
  opacity: .7; transition: opacity .25s;
}
.btn:hover { transform: translateY(-2px); background: var(--glass-hi); border-color: rgba(255,255,255,.3); }
.btn:active { transform: translateY(0) scale(.96); transition-duration: .1s; }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--grad); border-color: rgba(255,255,255,.35); color: #04122b; box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 10px 30px -10px rgba(59,130,246,.7); }
.btn-primary:hover { background: var(--grad); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 14px 40px -10px rgba(59,130,246,.9); }
.btn-danger { background: rgba(251,113,133,.16); border-color: rgba(251,113,133,.4); color: #ffd1d9; }
.btn-danger:hover { background: rgba(251,113,133,.28); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; backdrop-filter: none; }
.btn-ghost::before { display: none; }
.btn-ghost:hover { background: var(--glass-2); }
.btn-lg { --h: 52px; padding: 0 26px; font-size: 15.5px; }
.btn-sm { --h: 32px; padding: 0 12px; font-size: 13px; }
.btn-icon { width: var(--h); padding: 0; }
.btn svg { width: 17px; height: 17px; flex: none; }

/* ---------- small atoms ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--stroke); background: var(--glass); color: var(--ink-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(74,222,128,.18); }
.dot.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(74,222,128,0); } }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.mono { font-family: var(--mono); font-size: .92em; }
kbd { font-family: var(--mono); font-size: 11px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--stroke-2); background: var(--glass); color: var(--ink-2); }

.input, .select, textarea.input {
  width: 100%; height: 42px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--stroke);
  background: rgba(0,0,0,.25); outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
textarea.input { height: auto; min-height: 90px; padding: 12px 14px; resize: vertical; }
.input:focus, .select:focus { border-color: rgba(59,130,246,.6); box-shadow: 0 0 0 4px rgba(59,130,246,.15); background: rgba(0,0,0,.35); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23bbb' stroke-width='2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.select option { background: #0b1324; }
label.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }

/* Apple-style toggle */
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,.14); transition: background .3s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); transition: transform .35s var(--spring); }
.switch input:checked + span { background: linear-gradient(135deg, #60a5fa, #3b82f6); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--magenta); outline-offset: 2px; }

/* segmented control */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: rgba(0,0,0,.3); border: 1px solid var(--stroke); }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: background .25s, color .25s; }
.seg button.on { background: var(--glass-hi); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }

/* ---------- entrance animations ---------- */
.reveal { opacity: 0; transform: translateY(24px) scale(.985); filter: blur(6px); transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.reveal.in { opacity: 1; transform: none; filter: none; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); filter: blur(4px); } }
.rise { animation: rise .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }

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

/* ---------- logo ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--grad); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 6px 20px -6px rgba(59,130,246,.8); }
.brand-mark svg { width: 18px; height: 18px; }

/* cookie notice (public/js/consent.js) */
.cookie-note { position: fixed; z-index: 200; left: 16px; bottom: 16px; max-width: 420px; display: flex; gap: 12px; align-items: center; padding: 12px 12px 12px 16px; border-radius: 16px; font-size: 13.5px; color: var(--ink-2); animation: rise .45s var(--ease); transition: opacity .3s, transform .3s; }
.cookie-note p { margin: 0; line-height: 1.5; }
.cookie-note a { color: #93c5fd; text-decoration: underline; text-underline-offset: 3px; }
.cookie-note.out { opacity: 0; transform: translateY(10px); }
@media (max-width: 520px) { .cookie-note { left: 12px; right: 12px; max-width: none; } }
@media (prefers-reduced-motion: reduce) { .cookie-note { animation: none; transition: none; } }
