/* ==========================================================================
   Sentinel Vault Alt Gen — design system
   Layers: tokens -> base -> primitives -> components -> pages -> motion
   Colour rule: surfaces and text are neutral zinc. --accent carries
   interactive signal only. Green/amber/red are reserved for status.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  color-scheme: dark;

  /* Neutral ramp */
  --zinc-950: #09090b;
  --zinc-900: #101012;
  --zinc-850: #16161a;
  --zinc-800: #1d1d21;
  --zinc-750: #26262b;
  --zinc-700: #323238;
  --zinc-600: #52525b;
  --zinc-500: #71717a;
  --zinc-400: #a1a1aa;
  --zinc-300: #d4d4d8;
  --zinc-200: #e4e4e7;
  --zinc-50: #fafafa;

  /* Surfaces */
  --bg: var(--zinc-950);
  --surface-1: rgba(255, 255, 255, 0.032);
  --surface-2: rgba(255, 255, 255, 0.055);
  --surface-3: rgba(255, 255, 255, 0.08);
  --surface-sunken: rgba(0, 0, 0, 0.28);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-bright: rgba(255, 255, 255, 0.22);

  /* Text */
  --text: var(--zinc-50);
  --text-2: var(--zinc-300);
  --text-3: var(--zinc-400);
  --text-4: var(--zinc-500);

  /* Accent — the single interactive hue. Change here to rebrand. */
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --accent-line: rgba(56, 189, 248, 0.32);
  --accent-ink: #04141f;

  /* Status — semantic only, never decorative */
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, 0.14);
  --ok-line: rgba(52, 211, 153, 0.36);
  --ok-text: #a7f3d0;
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.14);
  --warn-line: rgba(251, 191, 36, 0.36);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.14);
  --danger-line: rgba(248, 113, 113, 0.36);
  --danger-text: #fecaca;

  /* Typography */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Instrument Sans", var(--font);
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --fs-xs: 0.6875rem;
  --fs-sm: 0.75rem;
  --fs-cap: 0.8125rem;
  --fs-base: 0.875rem;
  --fs-md: 0.9375rem;
  --fs-lg: 1.0625rem;
  --fs-xl: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  --fs-2xl: clamp(1.375rem, 1.15rem + 1vw, 1.75rem);
  --fs-3xl: clamp(1.625rem, 1.2rem + 2vw, 2.375rem);
  --fs-4xl: clamp(2.125rem, 1.4rem + 3.4vw, 3.5rem);
  --fs-5xl: clamp(3rem, 1.6rem + 6vw, 5.5rem);

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --section-y: clamp(56px, 7vw, 96px);

  /* Radii */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-full: 999px;

  /* Elevation — neutral, never coloured */
  --sh-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --sh-2: 0 4px 16px rgba(0, 0, 0, 0.32);
  --sh-3: 0 16px 48px rgba(0, 0, 0, 0.42);
  --ring: 0 0 0 2px var(--accent);

  /* Motion */
  --dur-1: 120ms;
  --dur-2: 200ms;
  --dur-3: 320ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* Layout */
  --max: 1180px;
  --nav-h: 60px;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.6;
  letter-spacing: -0.01em;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* One static wash for depth. No animation, no grain, no blend modes. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 255, 255, 0.055), transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 8%, rgba(56, 189, 248, 0.05), transparent 55%);
}

body > * {
  position: relative;
  z-index: 1;
}

main {
  display: block;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

a {
  color: var(--text);
  text-decoration: none;
}

img,
svg {
  max-width: 100%;
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

::placeholder {
  color: var(--text-4);
}

/* --------------------------------------------------------------------------
   3. Utilities
   -------------------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 28px);
}

.section {
  padding-block: var(--section-y);
}

.section--tint {
  background: rgba(255, 255, 255, 0.015);
  border-block: 1px solid var(--border);
}

.muted {
  color: var(--text-3);
}

.text-accent {
  color: var(--accent);
}

.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;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0 0 var(--sp-4);
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface-1);
  color: var(--text-3);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-head {
  margin-bottom: var(--sp-10);
}

.section-head--center {
  text-align: center;
  margin-inline: auto;
  max-width: 620px;
}

.section-title {
  font-size: var(--fs-3xl);
  margin: 0 0 var(--sp-3);
}

.section-title--center {
  text-align: center;
}

.section-lead {
  font-size: var(--fs-lg);
  margin: 0;
}

.section-lead--center {
  text-align: center;
}

.page-title {
  font-size: var(--fs-3xl);
  margin: var(--sp-10) 0 var(--sp-2);
}

.page-title--icon {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.page-title__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-1);
}

.login-fail {
  padding: 12px 0 0;
}

.live-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft);
  flex: none;
}

.live-dot--syncing {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* --------------------------------------------------------------------------
   4. Icons  (SVGs load as <img>, so colour lives in the asset files)
   -------------------------------------------------------------------------- */

.icon-img {
  display: inline-block;
  flex: none;
  width: 18px;
  height: 18px;
  vertical-align: middle;
  object-fit: contain;
  opacity: 0.9;
}

.icon-img--xs {
  width: 14px;
  height: 14px;
}

.icon-img--sm {
  width: 16px;
  height: 16px;
}

.icon-img--md {
  width: 22px;
  height: 22px;
}

.icon-img--lg {
  width: 28px;
  height: 28px;
}

/* Assets are neutral zinc; invert them on the light primary button. */
.btn-primary .icon-img {
  filter: invert(1);
  opacity: 0.85;
}

.nav-links a .icon-img {
  width: 15px;
  height: 15px;
  opacity: 0.66;
}

.nav-links a:hover .icon-img,
.nav-links a[aria-current="page"] .icon-img {
  opacity: 1;
}

.page-title__icon .icon-img {
  width: 24px;
  height: 24px;
}

/* --------------------------------------------------------------------------
   5. Primitives — buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 40px;
  padding: 0 var(--sp-4);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font: inherit;
  font-size: var(--fs-base);
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background var(--dur-2) ease,
    border-color var(--dur-2) ease,
    color var(--dur-2) ease,
    transform var(--dur-1) var(--ease-out);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-sm {
  min-height: 32px;
  padding: 0 var(--sp-3);
  font-size: var(--fs-cap);
}

.btn-primary {
  background: var(--zinc-50);
  border-color: var(--zinc-50);
  color: var(--zinc-950);
  box-shadow: var(--sh-1);
}

.btn-primary:hover:not(:disabled) {
  background: #fff;
  border-color: #fff;
}

.btn-ghost {
  background: var(--surface-1);
  border-color: var(--border-strong);
  color: var(--text-2);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--border-bright);
  color: var(--text);
}

.btn.is-copied {
  background: var(--ok-soft);
  border-color: rgba(52, 211, 153, 0.4);
  color: var(--ok);
}

:where(a, button, input, select, textarea, summary, .btn):focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--r-sm);
}

/* --------------------------------------------------------------------------
   6. Primitives — panels, forms, badges, alerts, tables
   -------------------------------------------------------------------------- */

.panel {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--surface-1), rgba(255, 255, 255, 0.012));
  box-shadow: var(--sh-2);
}

.panel-pad {
  padding: clamp(18px, 2.4vw, 26px);
}

.panel-title {
  font-size: var(--fs-xl);
  margin: 0 0 var(--sp-2);
}

.panel-title--sub {
  font-size: var(--fs-lg);
  margin: var(--sp-8) 0 var(--sp-3);
}

.panel-lead {
  font-size: var(--fs-base);
  margin: 0 0 var(--sp-4);
}

.field {
  display: block;
  margin-bottom: var(--sp-2);
  color: var(--text-3);
  font-size: var(--fs-cap);
  font-weight: 500;
}

.input {
  width: 100%;
  min-height: 40px;
  padding: 9px var(--sp-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface-sunken);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-base);
  transition:
    border-color var(--dur-2) ease,
    background var(--dur-2) ease;
}

.input:hover {
  border-color: var(--border-bright);
}

.input:focus {
  outline: none;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea.input {
  min-height: 120px;
  padding: var(--sp-3);
  font-family: var(--font-mono);
  font-size: var(--fs-cap);
  line-height: 1.55;
  resize: vertical;
}

select.input {
  appearance: none;
  padding-right: var(--sp-8);
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%),
    linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% + 1px),
    calc(100% - 13px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  vertical-align: -2px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-5);
  align-items: start;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface-1);
  color: var(--text-3);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge--account,
.badge--cookie,
.badge--booster {
  border-color: var(--border-strong);
  color: var(--text-2);
}

/* Status badges are the only place hue means something. */
.badge--health::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge--health-green {
  border-color: rgba(52, 211, 153, 0.34);
  background: var(--ok-soft);
  color: var(--ok);
}

.badge--health-yellow {
  border-color: rgba(251, 191, 36, 0.34);
  background: var(--warn-soft);
  color: var(--warn);
}

.badge--health-red {
  border-color: rgba(248, 113, 113, 0.34);
  background: var(--danger-soft);
  color: var(--danger);
}

.badge--health-gray,
.badge--health-off {
  color: var(--text-4);
}

.alert {
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface-1);
  color: var(--text-2);
  font-size: var(--fs-base);
}

.alert.error {
  border-color: rgba(248, 113, 113, 0.34);
  background: var(--danger-soft);
  color: #fecaca;
}

.alert.ok {
  border-color: rgba(52, 211, 153, 0.34);
  background: var(--ok-soft);
  color: #a7f3d0;
}

/* Table component — used heavily by the admin console */
.table-scroll {
  margin-top: var(--sp-4);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-sunken);
}

.table-scroll--mid {
  max-height: 320px;
}

.table-scroll--tall {
  max-height: 420px;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--fs-cap);
}

.table th,
.table td {
  padding: 10px var(--sp-3);
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}

.table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--zinc-850);
  color: var(--text-3);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.014);
}

.table tbody tr:hover td {
  background: var(--surface-1);
}

.table td .input {
  min-height: 32px;
  padding: 5px var(--sp-2);
  font-size: var(--fs-cap);
}

.table td:has(.btn) {
  white-space: nowrap;
}

.table code,
.table .mono {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--text-2);
}

/* --------------------------------------------------------------------------
   7. Navigation
   -------------------------------------------------------------------------- */

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 2px;
  z-index: 60;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--accent);
  pointer-events: none;
  transition: transform 80ms linear;
}

.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(9, 9, 11, 0.78);
  backdrop-filter: blur(16px) saturate(140%);
}

.topnav-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: var(--nav-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  overflow: hidden;
}

.brand-mark__img {
  display: block;
  width: 24px;
  height: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  color: var(--text-3);
  font-size: var(--fs-cap);
  font-weight: 500;
  transition:
    color var(--dur-2) ease,
    background var(--dur-2) ease;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface-1);
}

.nav-links a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
}

.nav-links a.is-accent {
  color: var(--accent);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  margin-left: var(--sp-2);
}

.nav-links a.is-accent:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #bae6fd;
}

.nav-toggle {
  display: none;
  flex: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 38px;
  height: 38px;
  padding: 0 9px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--surface-1);
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  height: 1.5px;
  border-radius: 2px;
  background: var(--text-2);
  transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-1) ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    right: clamp(16px, 4vw, 28px);
    left: clamp(16px, 4vw, 28px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: var(--sp-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-md);
    background: var(--zinc-900);
    box-shadow: var(--sh-3);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 10px var(--sp-3);
    font-size: var(--fs-md);
  }

  .nav-links a.is-accent {
    margin: var(--sp-1) 0 0;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   8. Footer + back to top
   -------------------------------------------------------------------------- */

.footer {
  margin-top: var(--section-y);
  border-top: 1px solid var(--border);
  padding-block: var(--sp-8);
  background: rgba(255, 255, 255, 0.012);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3) var(--sp-6);
}

.footer-brand {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-md);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-right: auto;
}

.footer-nav a,
.footer a {
  color: var(--text-3);
  font-size: var(--fs-base);
  transition: color var(--dur-2) ease;
}

.footer-nav a:hover,
.footer a:hover {
  color: var(--text);
}

.footer-note {
  margin: 0;
  color: var(--text-4);
  font-size: var(--fs-cap);
}

.back-to-top {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 40;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: rgba(16, 16, 18, 0.88);
  backdrop-filter: blur(10px);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity var(--dur-2) ease,
    transform var(--dur-2) var(--ease-out),
    visibility var(--dur-2) ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.back-to-top:hover {
  border-color: var(--border-bright);
}

.back-to-top__arrow {
  width: 8px;
  height: 8px;
  border-top: 1.5px solid var(--text-2);
  border-left: 1.5px solid var(--text-2);
  transform: translateY(1px) rotate(45deg);
}

/* --------------------------------------------------------------------------
   9. Reveal on scroll
   -------------------------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity var(--dur-3) ease,
    transform var(--dur-3) var(--ease-out);
}

[data-reveal][data-reveal-dir="left"] {
  transform: translateX(-18px);
}

[data-reveal][data-reveal-dir="right"] {
  transform: translateX(18px);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.reveal-child {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity var(--dur-3) ease,
    transform var(--dur-3) var(--ease-out);
  transition-delay: calc(var(--child-i, 0) * 60ms);
}

[data-reveal-children].children-in .reveal-child {
  opacity: 1;
  transform: none;
}

/* Typewriter: text is always present in the DOM, the caret is the only effect. */
.typewriter-vis.is-typing::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: var(--accent);
}

/* --------------------------------------------------------------------------
   10. Home — hero
   -------------------------------------------------------------------------- */

.hero-slab {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-slab__aurora,
.gplus-hero__aurora {
  position: absolute;
  inset: -30% -10% auto;
  height: 130%;
  pointer-events: none;
  background: radial-gradient(ellipse 50% 40% at 50% 30%, rgba(56, 189, 248, 0.07), transparent 65%);
}

/* Static soft glows for depth — no animation, no parallax. */
.float-orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.float-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}

.float-orb--a {
  width: 380px;
  height: 380px;
  top: -14%;
  left: -8%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06), transparent 70%);
}

.float-orb--b {
  width: 300px;
  height: 300px;
  top: 26%;
  right: -6%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.07), transparent 70%);
}

.float-orb--c {
  width: 240px;
  height: 240px;
  bottom: -14%;
  left: 38%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.04), transparent 70%);
}

.h-hero {
  position: relative;
  padding-block: clamp(48px, 8vw, 104px) clamp(40px, 6vw, 72px);
}

/* Gentle fade as the hero scrolls away (--hero-progress comes from JS). */
.hero-slab .hero-grid {
  opacity: calc(1 - var(--hero-progress, 0) * 0.55);
  transform: translateY(calc(var(--hero-progress, 0) * -18px));
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero-title {
  font-size: var(--fs-4xl);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 var(--sp-5);
}

.hero-title__shine {
  display: block;
  background: linear-gradient(100deg, var(--zinc-50) 10%, var(--accent) 55%, var(--zinc-300) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 54ch;
  margin: 0 0 var(--sp-6);
  color: var(--text-3);
  font-size: var(--fs-lg);
  min-height: 4.8em;
  overflow-wrap: break-word;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-6);
}

.hero-scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: clamp(28px, 4vw, 48px);
  color: var(--text-4);
  font-size: var(--fs-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color var(--dur-2) ease;
}

.hero-scroll-cue:hover {
  color: var(--text-2);
}

.hero-scroll-cue__label {
  font-weight: 600;
}

.hero-scroll-cue__line {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, var(--border-bright), transparent);
}

/* Hero card + metric bento */
.vault-card {
  position: relative;
  padding: clamp(18px, 2.2vw, 24px);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, var(--surface-2), rgba(255, 255, 255, 0.015));
  box-shadow: var(--sh-3);
  transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform var(--dur-3) var(--ease-out);
}

.vault-card__glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    340px circle at var(--tilt-glow-x, 50%) var(--tilt-glow-y, 50%),
    rgba(255, 255, 255, 0.06),
    transparent 65%
  );
}

.vault-card__top {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.vault-card__label {
  color: var(--text-3);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.metrics-bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}

.metric-tile {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-1);
}

.metric-tile--wide {
  grid-column: 1 / -1;
}

.metric-tile__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  flex: none;
}

.metric-tile__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.metric-tile__value {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.metric-tile__label {
  color: var(--text-3);
  font-size: var(--fs-cap);
}

@media (max-width: 940px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-lead {
    min-height: 0;
  }

  .vault-card {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   11. Home — marquees
   -------------------------------------------------------------------------- */

.marquee-section {
  padding-block: var(--sp-6);
  border-block: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.012);
}

.marquee,
.features-marquee {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track,
.features-marquee__track {
  display: flex;
  width: max-content;
}

.marquee__group,
.features-marquee__group {
  display: flex;
  align-items: center;
  flex: none;
}

.marquee__group {
  gap: var(--sp-4);
  padding-right: var(--sp-4);
}

.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-3);
  font-size: var(--fs-cap);
  font-weight: 500;
  white-space: nowrap;
}

.marquee__dot {
  color: var(--zinc-700);
}

.motion-ticker {
  display: flex;
  width: max-content;
  animation: marquee-slide 18s linear infinite;
  will-change: transform;
}

.features-marquee__track.motion-ticker {
  animation-duration: 28s;
}

.vault-dash-card--busy {
  border-color: var(--accent-line, var(--border-strong));
}

.vault-dash-card--busy::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(56, 189, 248, 0.12) 50%, transparent 70%);
  background-size: 220% 100%;
  animation: gen-sweep 0.9s linear infinite;
}

@keyframes gen-sweep {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

@keyframes marquee-slide {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

.features-carousel .section-head {
  margin-bottom: var(--sp-8);
}

.features-track {
  display: flex;
  gap: var(--sp-4);
  overflow-x: auto;
  padding-inline: clamp(16px, 4vw, 28px);
  scrollbar-width: none;
}

.features-track::-webkit-scrollbar {
  display: none;
}

.features-marquee__group {
  gap: var(--sp-4);
  padding-right: var(--sp-4);
}

.feature-card {
  flex: none;
  width: 264px;
  padding: var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface-1);
  transition:
    border-color var(--dur-2) ease,
    background var(--dur-2) ease;
}

.feature-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.feature-card__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.feature-card__img {
  width: 20px;
  height: 20px;
}

.feature-card__title {
  font-size: var(--fs-lg);
  margin: 0 0 var(--sp-2);
}

.feature-card__desc {
  margin: 0;
  color: var(--text-3);
  font-size: var(--fs-base);
}

/* --------------------------------------------------------------------------
   12. Home — compare, trust, faq, cta
   -------------------------------------------------------------------------- */

.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-5);
  align-items: stretch;
}

.compare-card {
  position: relative;
  display: flex;
  flex-direction: column;
  transition:
    border-color var(--dur-2) ease,
    transform var(--dur-2) var(--ease-out);
}

.compare-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.compare-card--featured {
  border-color: var(--accent-line);
  background: linear-gradient(180deg, var(--accent-soft), rgba(255, 255, 255, 0.015));
}

.compare-card__ribbon {
  position: absolute;
  top: var(--sp-5);
  right: var(--sp-5);
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.compare-card__head {
  margin-bottom: var(--sp-3);
}

.compare-card__tag {
  display: inline-block;
  margin-bottom: var(--sp-3);
  padding: 3px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-full);
  color: var(--text-3);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.compare-card__tag--hot {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.compare-card__title {
  font-size: var(--fs-xl);
}

.compare-card__lead {
  margin: 0 0 var(--sp-5);
  font-size: var(--fs-base);
}

.compare-list {
  list-style: none;
  margin: 0 0 var(--sp-6);
  padding: 0;
  display: grid;
  gap: var(--sp-3);
}

.compare-list li {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  color: var(--text-2);
  font-size: var(--fs-base);
}

.compare-list__icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 10px;
  flex: none;
}

.compare-list__icon--hot {
  background: var(--accent-soft);
  color: var(--accent);
}

.compare-card__cta {
  margin-top: auto;
  width: 100%;
}

.trust-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.trust-grid__copy .section-title {
  margin-bottom: var(--sp-4);
}

.trust-grid__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

.trust-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--sp-3);
}

.trust-item {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
  transition: border-color var(--dur-2) ease;
}

.trust-item:hover {
  border-color: var(--border-strong);
}

.trust-item__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  flex: none;
}

.trust-item__title {
  font-size: var(--fs-lg);
  margin: 0 0 var(--sp-1);
}

.trust-item p {
  margin: 0;
  font-size: var(--fs-base);
}

@media (max-width: 900px) {
  .trust-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--sp-3);
}

.faq {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-1);
  transition: border-color var(--dur-2) ease;
}

.faq:hover,
.faq[open] {
  border-color: var(--border-strong);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  cursor: pointer;
  color: var(--text);
  font-size: var(--fs-md);
  font-weight: 600;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq__chev {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--text-3);
  border-bottom: 1.5px solid var(--text-3);
  transform: rotate(45deg);
  transition: transform var(--dur-2) var(--ease-out);
  flex: none;
}

.faq[open] .faq__chev {
  transform: rotate(-135deg);
}

.faq p {
  margin: 0;
  padding: 0 var(--sp-5) var(--sp-5);
  color: var(--text-3);
  font-size: var(--fs-base);
}

.cta-section {
  position: relative;
  overflow: hidden;
}

.cta-card {
  padding: clamp(32px, 5vw, 64px) clamp(24px, 4vw, 56px);
  text-align: center;
  border-color: var(--border-strong);
}

.cta-card .kicker {
  margin-inline: auto;
}

.cta-card__title {
  font-size: var(--fs-3xl);
  margin: 0 0 var(--sp-4);
}

.cta-card__lead {
  max-width: 52ch;
  margin: 0 auto var(--sp-8);
  font-size: var(--fs-lg);
}

.cta-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: center;
}

/* --------------------------------------------------------------------------
   13. Updates timeline (home + pulse)
   -------------------------------------------------------------------------- */

.changelog-section__inner {
  max-width: 760px;
}

.updates-timeline {
  position: relative;
  display: grid;
  gap: var(--sp-4);
  padding-left: var(--sp-6);
}

.updates-timeline::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 5px;
  width: 1px;
  background: linear-gradient(180deg, var(--border-strong), transparent);
}

.update-card {
  position: relative;
}

.update-card__node {
  position: absolute;
  top: 22px;
  left: calc(var(--sp-6) * -1 + 1px);
  width: 9px;
  height: 9px;
  border: 1px solid var(--border-bright);
  border-radius: 50%;
  background: var(--zinc-900);
}

.update-card:first-child .update-card__node {
  border-color: var(--accent-line);
  background: var(--accent);
}

.update-card__inner {
  transition: border-color var(--dur-2) ease;
}

.update-card:hover .update-card__inner {
  border-color: var(--border-strong);
}

.update-card__when {
  margin: 0 0 var(--sp-1);
  color: var(--text-4);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}

.update-card__title {
  font-size: var(--fs-lg);
  margin: 0 0 var(--sp-2);
}

.update-card__body {
  margin: 0;
  color: var(--text-3);
  font-size: var(--fs-base);
  white-space: pre-line;
}

.pulse-empty {
  padding: var(--sp-8);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  text-align: center;
}

.pulse-empty p {
  margin: 0;
}

/* --------------------------------------------------------------------------
   14. Pulse page
   -------------------------------------------------------------------------- */

.pulse-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(40px, 6vw, 72px) clamp(28px, 4vw, 48px);
  border-bottom: 1px solid var(--border);
}

.pulse-hero__inner {
  position: relative;
}

.pulse-hero__copy {
  max-width: 640px;
}

.pulse-hero__title {
  font-size: var(--fs-4xl);
  line-height: 1.04;
  margin: 0 0 var(--sp-4);
}

.pulse-hero__lead {
  font-size: var(--fs-lg);
  margin: 0 0 var(--sp-6);
}

.pulse-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.pulse-chip {
  display: flex;
  flex-direction: column;
  min-width: 96px;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-1);
}

.pulse-chip strong {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.pulse-chip span {
  color: var(--text-3);
  font-size: var(--fs-sm);
}

.pulse-chip--time strong {
  font-size: var(--fs-lg);
}

.pulse-tabs {
  position: relative;
  display: inline-flex;
  gap: 2px;
  margin-bottom: var(--sp-8);
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-1);
}

.pulse-tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px var(--sp-4);
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--text-3);
  font: inherit;
  font-size: var(--fs-cap);
  font-weight: 600;
  cursor: pointer;
  transition: color var(--dur-2) ease;
}

.pulse-tab.is-active {
  color: var(--text);
}

.pulse-tabs__indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  bottom: 4px;
  z-index: 0;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  transition:
    transform var(--dur-2) var(--ease-out),
    width var(--dur-2) var(--ease-out);
}

.pulse-pane {
  display: grid;
}

.pulse-section__head {
  margin-bottom: var(--sp-6);
}

.pulse-section__head .section-title {
  margin-bottom: var(--sp-1);
}

.pulse-section__head p {
  margin: 0;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-4);
}

.status-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transition: border-color var(--dur-2) ease;
}

.status-card:hover {
  border-color: var(--border-strong);
}

.status-card__head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.status-card__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  flex: none;
}

.status-card__title-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
}

.service-title {
  font-size: var(--fs-lg);
  margin: 0;
}

.service-desc {
  margin: 0;
  font-size: var(--fs-base);
}

.status-card__row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.status-card__foot {
  margin: auto 0 0;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
  font-size: var(--fs-cap);
}

.status-card__foot strong {
  color: var(--text);
}

/* --------------------------------------------------------------------------
   15. Dashboard
   -------------------------------------------------------------------------- */

.vault-dash-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 50% at 20% 0%, rgba(56, 189, 248, 0.05), transparent 60%);
}

.vault-dash {
  padding-block: var(--sp-6) var(--sp-12);
}

.vault-dash__status {
  margin: 0 0 var(--sp-5);
  font-size: var(--fs-cap);
}

.vault-dash-guest {
  display: grid;
  place-items: center;
  min-height: 50vh;
}

.vault-dash-guest__panel {
  max-width: 440px;
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, var(--surface-2), rgba(255, 255, 255, 0.012));
  box-shadow: var(--sh-3);
  text-align: center;
}

.vault-dash-guest__eyebrow {
  margin: 0 0 var(--sp-2);
  color: var(--text-4);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.vault-dash-guest__title {
  font-size: var(--fs-2xl);
  margin: 0 0 var(--sp-3);
}

.vault-dash-guest__panel .muted {
  margin-bottom: var(--sp-6);
}

.vault-dash__layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: var(--sp-5);
  align-items: start;
}

.vault-dash__sidebar {
  position: sticky;
  top: calc(var(--nav-h) + var(--sp-4));
  display: grid;
  gap: var(--sp-4);
}

.vault-dash-profile,
.vault-dash-redeem {
  padding: var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--surface-1), rgba(255, 255, 255, 0.012));
}

.vault-dash-profile__user {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border);
}

.vault-dash-avatar {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface-2);
  object-fit: cover;
  flex: none;
}

.vault-dash-identity {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.vault-dash-identity__name {
  font-size: var(--fs-md);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vault-dash-identity__id {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}

.vault-dash-profile__kicker {
  margin: 0 0 var(--sp-1);
  color: var(--text-4);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.vault-dash-profile__tier {
  font-size: var(--fs-2xl);
  margin: 0 0 var(--sp-2);
}

.vault-dash-profile__blurb {
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-base);
}

.vault-dash-profile__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--sp-4);
}

.vault-dash-chip {
  padding: 3px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-full);
  background: var(--surface-1);
  color: var(--text-2);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.vault-dash-chip--accent {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.vault-dash-profile__dates {
  display: grid;
  gap: var(--sp-2);
}

.vault-dash-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-sunken);
}

.vault-dash-date__k {
  color: var(--text-3);
  font-size: var(--fs-cap);
}

.vault-dash-date__v {
  font-size: var(--fs-cap);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.vault-dash-date--accent .vault-dash-date__v {
  color: var(--accent);
}

.vault-dash-redeem__form {
  display: grid;
  gap: var(--sp-2);
}

.vault-dash-redeem__row {
  display: flex;
  gap: var(--sp-2);
}

.vault-dash-redeem__input {
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vault-dash-redeem__link {
  justify-self: start;
}

.vault-dash-redeem__alert {
  margin-top: var(--sp-3);
}

.vault-dash__workspace {
  display: grid;
  gap: var(--sp-4);
  min-width: 0;
}

.vault-dash-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-lg);
  background: var(--accent-soft);
}

.vault-dash-notice__copy {
  display: flex;
  flex-direction: column;
}

.vault-dash-notice__copy strong {
  color: var(--accent);
}

.vault-dash-panel {
  padding: var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--surface-1), rgba(255, 255, 255, 0.012));
  min-width: 0;
}

.vault-dash-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}

.vault-dash-panel__title {
  font-size: var(--fs-xl);
  margin: 0 0 var(--sp-1);
}

.vault-dash-panel__hint {
  margin: 0;
  font-size: var(--fs-cap);
}

.dash-inline-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.vault-dash-panel__search {
  width: min(260px, 100%);
  min-height: 36px;
}

.vault-dash-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: var(--sp-5);
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-sunken);
}

.vault-dash-tabs__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px var(--sp-4);
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--text-3);
  font: inherit;
  font-size: var(--fs-cap);
  font-weight: 600;
  cursor: pointer;
  transition:
    background var(--dur-2) ease,
    color var(--dur-2) ease;
}

.vault-dash-tabs__btn:hover {
  color: var(--text-2);
}

.vault-dash-tabs__btn.is-active {
  background: var(--surface-3);
  color: var(--text);
}

.vault-dash-tabs__count {
  padding: 1px 6px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--text-3);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
}

.vault-dash-tabs__btn.is-active .vault-dash-tabs__count {
  background: var(--accent-soft);
  color: var(--accent);
}

.vault-dash-panels {
  min-width: 0;
}

.vault-dash-panels__section {
  display: grid;
  gap: var(--sp-4);
}

.vault-dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: var(--sp-4);
}

.vault-dash-empty {
  padding: var(--sp-10) var(--sp-4);
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
}

@media (max-width: 1040px) {
  .vault-dash__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .vault-dash__sidebar {
    position: static;
  }
}

/* Service cards */
.vault-dash-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-5);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--surface-1), rgba(255, 255, 255, 0.012));
  transition: border-color var(--dur-2) ease;
}

.vault-dash-card:hover {
  border-color: var(--border-strong);
}

/* Cooldown progress rail (--cooldown-progress is set by JS) */
.vault-dash-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  width: var(--cooldown-progress, 0%);
  background: var(--accent);
  transition: width 160ms linear;
}

.vault-dash-card--ready {
  border-color: rgba(52, 211, 153, 0.4);
}

.vault-dash-card__head {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
}

.vault-dash-card__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  flex: none;
}

.vault-dash-card__info {
  flex: 1;
  min-width: 0;
}

.vault-dash-card__name {
  font-size: var(--fs-lg);
  margin: 0 0 2px;
}

.vault-dash-card__stock {
  margin: 0;
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}

.vault-dash-card__access {
  flex: none;
}

.vault-dash-card__desc {
  margin: 0;
  font-size: var(--fs-base);
}

.vault-dash-card__desc:empty {
  display: none;
}

.vault-dash-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
}

.vault-dash-card__status {
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}

.vault-dash-card__btn {
  margin-left: auto;
}

.vault-dash-card__result {
  display: grid;
  gap: var(--sp-3);
}

.vault-dash-card__actions,
.vault-dash-card__feedback {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.gen-result,
.vault-dash-card__out {
  display: grid;
}

/* Credential output */
.cred-card {
  padding: var(--sp-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface-sunken);
}

.cred-card--success {
  border-color: rgba(52, 211, 153, 0.3);
}

.cred-card--error {
  display: flex;
  gap: var(--sp-3);
  border-color: rgba(248, 113, 113, 0.3);
  background: var(--danger-soft);
}

.cred-card--loading {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.cred-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.cred-card__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ok);
  font-size: var(--fs-cap);
  font-weight: 600;
}

.cred-card__type {
  flex: none;
}

.cred-card__body,
.cred-card__grid {
  display: grid;
  gap: var(--sp-3);
}

.cred-card__error-copy {
  min-width: 0;
}

.cred-card__summary {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-cap);
  color: var(--text-2);
  overflow-wrap: anywhere;
}

.cred-card__hint {
  margin: var(--sp-2) 0 0;
  font-size: var(--fs-sm);
}

.cred-card__error-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: rgba(248, 113, 113, 0.16);
  flex: none;
}

.cred-card__error-title {
  display: block;
  margin-bottom: 2px;
  color: #fecaca;
  font-size: var(--fs-md);
}

.cred-card__error-msg {
  margin: 0;
  font-size: var(--fs-base);
}

.cred-card__loader {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-bright);
  border-top-color: var(--accent);
  border-radius: 50%;
  flex: none;
  animation: spin 650ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.cred-card__loading-copy {
  display: flex;
  flex-direction: column;
  font-size: var(--fs-base);
}

.cred-field {
  display: grid;
  gap: 4px;
}

.cred-field__label {
  color: var(--text-4);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cred-field__row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 7px var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-1);
}

.cred-field__value {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-cap);
  color: var(--text);
  overflow-wrap: anywhere;
}

.cred-field__value--secret {
  letter-spacing: 0.1em;
}

.cred-field__copy {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xs);
  background: var(--surface-2);
  cursor: pointer;
  flex: none;
  transition: border-color var(--dur-2) ease;
}

.cred-field__copy:hover {
  border-color: var(--border-bright);
}

.cred-field__copy.is-copied {
  border-color: rgba(52, 211, 153, 0.45);
  background: var(--ok-soft);
}

.cookie-hint {
  border-top: 1px solid var(--border);
  padding-top: var(--sp-3);
}

.cookie-hint summary {
  cursor: pointer;
  font-size: var(--fs-cap);
}

.cookie-hint__list {
  margin: var(--sp-3) 0 0;
  padding-left: var(--sp-5);
  display: grid;
  gap: 6px;
  font-size: var(--fs-cap);
}

.cookie-hint__list strong {
  color: var(--text-2);
}

/* History */
.vault-dash-history {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-3);
}

.hist-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-1);
}

.hist-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
}

.hist-card__svc {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
}

.hist-card__name {
  font-weight: 600;
  font-size: var(--fs-base);
}

.hist-card__time {
  color: var(--text-4);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
}

.hist-card__grid {
  display: grid;
  gap: var(--sp-2);
}

.hist-card__field {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
}

.hist-card__k {
  width: 62px;
  flex: none;
  color: var(--text-4);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hist-card__v {
  font-family: var(--font-mono);
  font-size: var(--fs-cap);
  color: var(--text-2);
  overflow-wrap: anywhere;
}

.hist-card__v--secret {
  letter-spacing: 0.1em;
}

.hist-card__summary {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--text-3);
  overflow-wrap: anywhere;
}

.hist-card__empty {
  margin: 0;
  font-size: var(--fs-cap);
}

.hist-card__copy {
  align-self: flex-start;
  margin-top: auto;
}

/* --------------------------------------------------------------------------
   16. Gen+ page
   -------------------------------------------------------------------------- */

.gplus-hero {
  text-align: center;
}

.gplus-hero__inner {
  padding-block: clamp(44px, 7vw, 88px) clamp(32px, 5vw, 64px);
}

.gplus-hero__copy {
  max-width: 640px;
  margin-inline: auto;
}

.gplus-kicker {
  margin-inline: auto;
}

.gplus-title {
  display: flex;
  align-items: baseline;
  justify-content: center;
  font-size: var(--fs-5xl);
  line-height: 1;
  letter-spacing: -0.045em;
  margin: 0 0 var(--sp-5);
}

.gplus-title__gen {
  color: var(--text);
}

.gplus-title__plus {
  color: var(--accent);
}

.gplus-lead {
  min-height: 3.2em;
  margin: 0 auto var(--sp-8);
  max-width: 56ch;
  color: var(--text-3);
  font-size: var(--fs-lg);
}

.gplus-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: center;
}

.gplus-perk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-4);
}

.gplus-perk {
  transition:
    border-color var(--dur-2) ease,
    transform var(--dur-2) var(--ease-out);
}

.gplus-perk:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.gplus-perk__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.gplus-perk__icon .icon-img {
  width: 22px;
  height: 22px;
}

.gplus-perk__title {
  font-size: var(--fs-lg);
  margin: 0 0 var(--sp-2);
}

.gplus-perk .muted {
  margin: 0;
}

.gplus-price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: var(--sp-4);
  align-items: stretch;
}

.gplus-price {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 2.6vw, 28px);
  transition:
    border-color var(--dur-2) ease,
    transform var(--dur-2) var(--ease-out);
}

.gplus-price:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.gplus-price--featured {
  border-color: var(--accent-line);
  background: linear-gradient(180deg, var(--accent-soft), rgba(255, 255, 255, 0.015));
}

.gplus-price__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.gplus-price__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.gplus-price__save {
  padding: 3px 9px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-full);
  color: var(--text-2);
  font-size: var(--fs-xs);
  font-weight: 700;
}

.gplus-price__ribbon {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 12px;
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.gplus-price__dur {
  margin: 0;
  color: var(--text-3);
  font-size: var(--fs-cap);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gplus-price__amt {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.gplus-price__currency {
  color: var(--text-3);
  font-size: 0.5em;
  align-self: flex-start;
  margin-top: 0.35em;
}

.gplus-price__per {
  color: var(--text-4);
  font-size: 0.3em;
  font-weight: 600;
  letter-spacing: 0;
}

.gplus-price__per-day {
  margin: 0 0 var(--sp-4);
  color: var(--text-3);
  font-size: var(--fs-cap);
  font-variant-numeric: tabular-nums;
}

.gplus-price__divider {
  display: block;
  height: 1px;
  margin-bottom: var(--sp-4);
  background: var(--border);
}

.gplus-price__list {
  list-style: none;
  margin: 0 0 var(--sp-6);
  padding: 0;
  display: grid;
  gap: var(--sp-2);
}

.gplus-price__list li {
  position: relative;
  padding-left: var(--sp-5);
  color: var(--text-2);
  font-size: var(--fs-base);
}

.gplus-price__list li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-4);
}

.gplus-price--featured .gplus-price__list li::before {
  background: var(--accent);
}

.gplus-buy {
  margin-top: auto;
  width: 100%;
}

.gplus-footnote {
  margin: var(--sp-8) 0 0;
  text-align: center;
  font-size: var(--fs-cap);
}

/* --------------------------------------------------------------------------
   17. Admin console
   -------------------------------------------------------------------------- */

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: var(--sp-5);
  align-items: start;
  margin-top: var(--sp-5);
  margin-bottom: var(--sp-12);
}

.admin-panel--full {
  grid-column: 1 / -1;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-4);
  align-items: end;
  margin-top: var(--sp-4);
}

.form-grid__full {
  grid-column: 1 / -1;
}

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  padding: 9px var(--sp-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface-sunken);
}

.check-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-3);
  font-size: var(--fs-cap);
  cursor: pointer;
}

.file-btn {
  cursor: pointer;
}

.stack-sm > * + * {
  margin-top: var(--sp-3);
}

.admin-note {
  margin: var(--sp-3) 0 0;
  font-size: var(--fs-cap);
}

.stock-form {
  display: grid;
  gap: var(--sp-3);
}

.input--xs {
  max-width: 90px;
}

.input--sm {
  max-width: 120px;
}

.input--md {
  max-width: 220px;
}

.keys-export {
  margin-top: var(--sp-3);
  min-height: 82px;
}

.table-clip {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
}

.cell-wrap {
  white-space: pre-wrap;
  color: var(--text-3);
}

.check-row--compact {
  padding: 0;
  border: 0;
  background: none;
  gap: 6px;
}

.check-row--compact label {
  font-size: var(--fs-xs);
}

/* --------------------------------------------------------------------------
   18. Motion preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *:not(.motion-ticker):not(.cred-card__loader),
  *:not(.motion-ticker)::before,
  *:not(.vault-dash-card--busy)::before,
  *:not(.motion-ticker)::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .motion-ticker {
    animation: marquee-slide 18s linear infinite !important;
  }

  .features-marquee__track.motion-ticker {
    animation-duration: 28s !important;
  }

  .cred-card__loader {
    animation: spin 650ms linear infinite !important;
  }

  .vault-dash-card--busy::before {
    animation: gen-sweep 0.9s linear infinite !important;
  }

  [data-reveal],
  .reveal-child {
    opacity: 1 !important;
    transform: none !important;
  }

  .vault-card,
  .hero-slab .hero-grid {
    transform: none !important;
    opacity: 1 !important;
  }

  .compare-card:hover,
  .gplus-perk:hover,
  .gplus-price:hover {
    transform: none;
  }

  .typewriter-vis.is-typing::after {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   19. The hidden attribute must beat every component display rule.
   Last in the file so it wins specificity ties against single-class rules.
   -------------------------------------------------------------------------- */

[hidden] {
  display: none !important;
}
