/* ==========================================================================
   FomoFantasy: shared design system
   Unofficial tools for fomo (https://fomo.family). Brand values mirror fomo's
   own live CSS. Single dark theme on purpose.

   Layout of this file:
   1 tokens · 2 reset · 3 base · 4 layout (+ tool-page hero) · 5 type
   6 buttons · 7 surfaces (card, feature card, glow) · 8 chips/kbd/avatar
   9 forms · 10 data (stat, table, spark) · 11 toasts
   12 bookmarklet (.bm, .bm-hint, .bm-install, .bm-note, .drop-banner)
   13 steps + mini art · 14 faq · 15 cta band · 16 nav · 17 footer
   18 background (starfield, planet glow) · 19 page transition
   20 motion (keyframes, reveals, stagger, .is-asleep) · 21 reduced motion
   ========================================================================== */

/* 1. tokens ---------------------------------------------------------------- */
@property --bm-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

:root {
  color-scheme: dark;

  /* surfaces */
  --bg: #060510;
  --surface: #12111A;
  --surface-2: #161522;
  --inset: #0B0A14;

  /* lines */
  --line: rgba(203, 208, 235, .10);
  --line-soft: rgba(203, 208, 235, .063);
  --line-strong: rgba(203, 208, 235, .24);

  /* glass (always pair with backdrop-filter: blur(var(--blur))) */
  --glass: rgba(255, 255, 255, .08);
  --glass-strong: rgba(255, 255, 255, .12);
  --blur: 12px;

  /* text */
  --text: #F7F7F7;
  --text-head: #EAEDFF;
  --muted: rgba(209, 216, 255, .60);
  --muted-2: #9899A3;
  --dim: #474B52;
  --lavender: #CBD0EB;

  /* brand */
  --primary: #516AF6;
  --primary-2: #6F85FF;
  --primary-glass: rgba(96, 106, 247, .5);
  --primary-soft: rgba(81, 106, 246, .2);
  --indigo: #221D4B;

  /* semantic */
  --green: #21C95E;
  --green-soft: #21C95E33;
  --red: #FF622E;
  --red-soft: #FF622E33;
  --gold: #FFC74F;
  --gold-soft: #FFC74F1F;
  --pink: #FD5DD3;

  /* type */
  --font-sans: "Aeonik", "Host Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-12: .75rem;
  --fs-14: .875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-22: 1.375rem;
  --fs-28: 1.75rem;
  --fs-40: 2.5rem;
  --fs-60: 3.75rem;
  --fs-hero: clamp(2.6rem, 6.4vw, 4.6rem);
  --fs-h2: clamp(1.75rem, 4vw, 2.5rem);
  --track-display: -0.05em;
  --track-h2: -0.04em;
  --track-h3: -0.025em;
  --lh-body: 1.55;
  --measure: 62ch;

  /* space (4px grid) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;
  --gutter: clamp(16px, 4vw, 40px);
  --container: 1180px;
  --section-y: clamp(64px, 10vw, 128px);
  --nav-h: 64px;

  /* radius */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 24px;
  --r-pill: 999px;

  /* shadow + glow */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);
  --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, .7);
  --shadow-lg: 0 30px 80px -24px rgba(0, 0, 0, .8);
  --glow-primary: 0 0 0 1px rgba(111, 133, 255, .35), 0 10px 36px -8px rgba(81, 106, 246, .6);
  --glow-soft: 0 0 48px -10px rgba(81, 106, 246, .5);
  --glow-green: 0 0 0 1px rgba(33, 201, 94, .35), 0 10px 36px -10px rgba(33, 201, 94, .5);
  --inner-hi: inset 0 1px 0 rgba(255, 255, 255, .06);

  /* motion */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-in: cubic-bezier(.7, 0, .84, 0);
  --dur-hover: 160ms;
  --dur-ui: 320ms;
  --dur-enter: 700ms;
  --dur-enter-long: 900ms;

  /* layers */
  --z-bg: -2;
  --z-glow: -1;
  --z-nav: 50;
  --z-banner: 80;
  --z-toast: 90;
  --z-transition: 100;
  --z-skip: 110;

  interpolate-size: allow-keywords;
}

/* 2. reset ----------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  scrollbar-color: rgba(203, 208, 235, .18) transparent;
  /* No background here on purpose: body's background propagates to the
     canvas so the fixed .starfield (z-index -2) paints above it. */
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* :where() keeps this at zero specificity, so one component class can set
   its own list padding */
:where(ul[class], ol[class]) {
  list-style: none;
  padding: 0;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

table {
  border-collapse: collapse;
}

[hidden] {
  display: none !important;
}

/* 3. base ------------------------------------------------------------------ */
body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-16);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

main {
  flex: 1 0 auto;
  display: block;
  min-width: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--text-head);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: var(--track-h3);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
}

strong,
b {
  font-weight: 600;
  color: var(--text-head);
}

code,
kbd,
samp,
pre {
  font-family: var(--font-mono);
  font-size: .92em;
}

hr,
.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin-block: var(--space-6);
}

::selection {
  background: rgba(81, 106, 246, .45);
  color: #fff;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--primary-2);
  outline-offset: 3px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(203, 208, 235, .14);
  border: 2px solid var(--bg);
  border-radius: var(--r-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(203, 208, 235, .24);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: var(--z-skip);
  padding: 10px 16px;
  border-radius: var(--r-md);
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  translate: 0 -160%;
  transition: translate var(--dur-ui) var(--ease-out);
}

.skip-link:focus,
.skip-link:focus-visible {
  translate: 0 0;
}

/* 4. layout ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: calc(820px + var(--gutter) * 2);
}

.container--wide {
  max-width: calc(1320px + var(--gutter) * 2);
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

.section--tight {
  padding-block: clamp(40px, 6vw, 72px);
}

/* a section that follows one which already ends with room (the cta band after the faq) */
.section--flush-top {
  padding-top: 0;
}

/* tool-page hero (trade-helper.html, sniper.html): copy on the left, the
   page's live preview beside it from 960px (each page sets its own grid).
   overflow-x: clip stops wide decorative glows from widening the layout
   viewport on phones, which body's own clip does not prevent. clip is not a
   scroll container, so sticky children keep working. */
.tool-hero {
  position: relative;
  overflow-x: clip;
  padding-block: clamp(28px, 5vw, 72px) clamp(56px, 8vw, 112px);
}

/* the hero already ends with generous space; the next section does not double it */
.tool-hero + .section {
  padding-top: clamp(24px, 5vw, 64px);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
  min-width: 0;
}

.hero-copy > * {
  min-width: 0;
  max-width: 100%;
}

.hero-copy .h-display {
  margin-top: var(--space-1);
}

.hero-copy .lead {
  max-width: 50ch;
}

.section-head {
  display: grid;
  gap: var(--space-3);
  max-width: 720px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head--center {
  text-align: center;
  justify-items: center;
  margin-inline: auto;
}

.section-head > * {
  min-width: 0;
}

.grid-2,
.grid-3,
.grid-auto {
  display: grid;
  gap: var(--grid-gap, var(--space-5));
  grid-template-columns: minmax(0, 1fr);
}

.grid-2 > *,
.grid-3 > *,
.grid-auto > * {
  min-width: 0;
}

@media (min-width: 720px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--grid-min, 260px)), 1fr));
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap, var(--space-4));
}

.stack > *,
.row > * {
  min-width: 0;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap, var(--space-3));
}

.text-center {
  text-align: center;
}

.nowrap {
  white-space: nowrap;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.visually-hidden,
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.is-mac .not-mac,
html:not(.is-mac) .only-mac {
  display: none !important;
}

/* 5. type ------------------------------------------------------------------ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .04em;
  color: var(--primary-2);
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
  flex-shrink: 0;
}

.h-display {
  font-size: var(--fs-hero);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: var(--track-display);
  color: var(--text-head);
  text-wrap: balance;
}

/* dimmed second line of a display heading ("one click in. / one click out.") */
.title-dim {
  color: var(--muted);
  color: color-mix(in srgb, var(--lavender) 58%, transparent);
}

.h1 {
  font-size: clamp(2.25rem, 5vw, var(--fs-60));
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: var(--track-display);
  color: var(--text-head);
  text-wrap: balance;
}

.h2 {
  font-size: var(--fs-h2);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: var(--track-h2);
  color: var(--text-head);
  text-wrap: balance;
}

.h3 {
  font-size: var(--fs-22);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: var(--track-h3);
  color: var(--text-head);
  text-wrap: balance;
}

.h4 {
  font-size: var(--fs-18);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--text-head);
}

.lead {
  font-size: clamp(var(--fs-16), 1.6vw, var(--fs-18));
  line-height: 1.6;
  color: var(--muted);
  max-width: var(--measure);
  text-wrap: pretty;
}

.section-head--center .lead {
  margin-inline: auto;
}

.prose {
  max-width: var(--measure);
  color: var(--muted);
}

.prose > * + * {
  margin-top: var(--space-4);
}

.small {
  font-size: var(--fs-14);
}

.tiny {
  font-size: var(--fs-12);
}

.muted {
  color: var(--muted);
}

.muted-2 {
  color: var(--muted-2);
}

.lavender {
  color: var(--lavender);
}

.num,
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* .up / .down / .flat live at the end of section 20 so they beat component colors */

.link,
.prose a,
.lead a {
  color: var(--primary-2);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(111, 133, 255, .45);
  transition: color var(--dur-hover) var(--ease-out), text-decoration-color var(--dur-hover) var(--ease-out);
}

.link:hover,
.prose a:hover,
.lead a:hover {
  color: var(--text-head);
  text-decoration-color: currentColor;
}

.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* 6. buttons --------------------------------------------------------------- */
.btn {
  --btn-h: 44px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--btn-h);
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-16);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color var(--dur-hover) var(--ease-out),
    border-color var(--dur-hover) var(--ease-out),
    box-shadow var(--dur-hover) var(--ease-out),
    color var(--dur-hover) var(--ease-out),
    transform var(--dur-hover) var(--ease-out),
    opacity var(--dur-hover) var(--ease-out);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: var(--glass-strong);
}

.btn:active {
  transform: translateY(0) scale(.98);
  transition-duration: 80ms;
}

.btn:disabled,
.btn[aria-disabled="true"],
.btn.is-disabled {
  opacity: .42;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.btn--primary {
  background: var(--primary-glass);
  border-color: var(--line);
  color: #fff;
}

.btn--primary:hover {
  background: var(--primary);
  border-color: rgba(111, 133, 255, .6);
  box-shadow: var(--glow-primary);
}

.btn--primary:active {
  background: #4459D9;
}

.btn--glass {
  background: var(--glass);
}

.btn--ghost {
  background: transparent;
  border-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: var(--muted);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, .05);
  border-color: var(--line);
  color: var(--text);
}

.btn--danger {
  background: var(--red-soft);
  border-color: rgba(255, 98, 46, .35);
  color: var(--red);
}

.btn--danger:hover {
  background: var(--red);
  border-color: var(--red);
  color: #170804;
  box-shadow: 0 10px 32px -10px rgba(255, 98, 46, .6);
}

.btn--green {
  background: var(--green-soft);
  border-color: rgba(33, 201, 94, .35);
  color: var(--green);
}

.btn--green:hover {
  background: var(--green);
  border-color: var(--green);
  color: #03150A;
  box-shadow: var(--glow-green);
}

.btn--sm {
  --btn-h: 36px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  font-size: var(--fs-14);
  gap: 6px;
}

.btn--sm svg {
  width: 16px;
  height: 16px;
}

.btn--lg {
  --btn-h: 54px;
  padding: 0 26px;
  font-size: var(--fs-18);
  border-radius: 14px;
}

.btn--block {
  width: 100%;
}

.btn--icon {
  padding: 0;
  width: var(--btn-h);
}

.btn.is-loading {
  color: transparent;
  pointer-events: none;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
}

/* 7. surfaces -------------------------------------------------------------- */
.card {
  position: relative;
  isolation: isolate;
  min-width: 0;
  padding: clamp(20px, 3vw, 28px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--inner-hi);
  transition:
    border-color var(--dur-ui) var(--ease-out),
    transform var(--dur-ui) var(--ease-out),
    box-shadow var(--dur-ui) var(--ease-out),
    background-color var(--dur-ui) var(--ease-out);
}

.card--inset {
  background: var(--surface-2);
}

.card--flush {
  padding: 0;
}

.card--lg {
  border-radius: var(--r-2xl);
}

a.card,
.card--hover {
  display: block;
  color: inherit;
  cursor: pointer;
}

a.card:hover,
.card--hover:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--inner-hi), var(--shadow-md), var(--glow-soft);
}

.glass {
  position: relative;
  min-width: 0;
  padding: clamp(20px, 3vw, 28px);
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .025));
  -webkit-backdrop-filter: blur(var(--blur)) saturate(130%);
  backdrop-filter: blur(var(--blur)) saturate(130%);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  box-shadow: var(--inner-hi), var(--shadow-lg);
}

.well {
  padding: var(--space-4);
  background: var(--inset);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
}

/* feature card: <li class="card feature" data-glow> + icon tile, title, text.
   The hover lift uses transform, so it composes with the reveal's translate. */
.feature {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  margin-bottom: var(--space-2);
  border-radius: var(--r-md);
  background: var(--primary-soft);
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--primary) 26%, transparent),
    color-mix(in srgb, var(--primary) 6%, transparent));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--primary-2) 32%, transparent),
    0 10px 26px -12px color-mix(in srgb, var(--primary) 80%, transparent);
  color: var(--lavender);
  transition: color var(--dur-ui) var(--ease-out), box-shadow var(--dur-ui) var(--ease-out);
}

.feature__icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
}

.feature__title {
  margin-top: 2px;
}

.feature__text {
  color: var(--muted);
}

@media (hover: hover) {
  .feature:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: var(--inner-hi), var(--shadow-md);
  }

  .feature:hover .feature__icon {
    color: var(--text-head);
    box-shadow:
      inset 0 0 0 1px color-mix(in srgb, var(--primary-2) 55%, transparent),
      0 12px 30px -10px color-mix(in srgb, var(--primary) 90%, transparent);
  }
}

/* pointer-follow highlight: add data-glow to any card or panel.
   Set --glow-tint on the element to recolor the fill (default: primary blue). */
[data-glow] {
  position: relative;
  isolation: isolate;
}

[data-glow]::before,
[data-glow]::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--dur-ui) var(--ease-out);
}

[data-glow]::before {
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--glow-tint, rgba(111, 133, 255, .11)), transparent 62%);
}

[data-glow]::after {
  inset: -1px;
  padding: 1px;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(203, 208, 235, .5), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

@media (hover: hover) {
  [data-glow]:hover::before,
  [data-glow]:hover::after {
    opacity: 1;
  }
}

/* earth-limb arc, echoing fomo's hero. Place inside a positioned,
   overflow:hidden block (for example a hero or .cta-band). */
.horizon {
  position: absolute;
  left: 50%;
  top: var(--horizon-top, 72%);
  width: max(1400px, 190%);
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(closest-side, #0A0918 97%, transparent 100%);
  box-shadow:
    0 -1px 0 rgba(203, 208, 235, .35),
    0 -18px 60px -8px rgba(111, 133, 255, .45),
    0 -60px 160px -20px rgba(81, 106, 246, .35);
}

/* 8. chips, kbd, avatar ---------------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .05);
  color: var(--muted);
  font-size: var(--fs-12);
  font-weight: 500;
  line-height: 1;
  letter-spacing: .01em;
  white-space: nowrap;
}

.chip svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.chip--green {
  background: var(--green-soft);
  border-color: rgba(33, 201, 94, .3);
  color: var(--green);
}

.chip--red {
  background: var(--red-soft);
  border-color: rgba(255, 98, 46, .3);
  color: var(--red);
}

.chip--gold {
  background: var(--gold-soft);
  border-color: rgba(255, 199, 79, .3);
  color: var(--gold);
}

.chip--primary {
  background: var(--primary-soft);
  border-color: rgba(111, 133, 255, .35);
  color: #AEBBFF;
}

.chip--live {
  background: var(--green-soft);
  border-color: rgba(33, 201, 94, .3);
  color: var(--green);
}

.chip--live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: pulse-dot 1.6s var(--ease-in-out) infinite, live-ring 1.6s var(--ease-out) infinite;
}

.chip--sm {
  height: 22px;
  padding: 0 8px;
  font-size: 11px;
}

.kbd {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 1px 7px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: var(--r-xs);
  background: var(--surface-2);
  color: var(--text-head);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  vertical-align: baseline;
}

/* inline key inside small text (card lists, help lines) */
.kbd--sm {
  min-height: 20px;
  padding: 0 6px;
  font-size: 11px;
}

.avatar {
  --h: 230;
  --size: 36px;
  position: relative;
  display: inline-grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  flex-shrink: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, hsl(var(--h) 95% 78% / .95), transparent 45%),
    linear-gradient(145deg, hsl(var(--h) 85% 58%), hsl(calc(var(--h) + 45) 75% 38%) 60%, hsl(calc(var(--h) + 80) 70% 20%));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 4px 14px -6px hsl(var(--h) 80% 50% / .6);
  color: rgba(255, 255, 255, .95);
  font-family: var(--font-sans);
  font-size: calc(var(--size) * .36);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  user-select: none;
}

.avatar--xs {
  --size: 20px;
}

.avatar--sm {
  --size: 28px;
}

.avatar--lg {
  --size: 48px;
}

.avatar--xl {
  --size: 64px;
}

/* 9. forms ----------------------------------------------------------------- */
.field {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}

.label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  color: var(--lavender);
  font-size: var(--fs-14);
  font-weight: 500;
  line-height: 1.3;
}

.label__hint,
.field__help {
  color: var(--muted-2);
  font-size: var(--fs-12);
  font-weight: 400;
}

.field__help.is-error {
  color: var(--red);
}

.input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: var(--fs-16);
  line-height: 1.2;
  transition:
    border-color var(--dur-hover) var(--ease-out),
    box-shadow var(--dur-hover) var(--ease-out),
    background-color var(--dur-hover) var(--ease-out);
  -webkit-appearance: none;
  appearance: none;
}

.input::placeholder {
  color: var(--muted-2);
  opacity: .8;
}

.input:hover {
  border-color: var(--line-strong);
}

.input:focus,
.input:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.input:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.input[aria-invalid="true"] {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft);
}

textarea.input {
  height: auto;
  min-height: 96px;
  padding: 12px 14px;
  line-height: 1.5;
  resize: vertical;
}

select.input {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23CBD0EB' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
}

.input.num,
.input--mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* native number spinners clash with the dark inset fields; arrow keys still step */
.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;
}

.input-group {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 44px;
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color var(--dur-hover) var(--ease-out), box-shadow var(--dur-hover) var(--ease-out);
}

.input-group:hover {
  border-color: var(--line-strong);
}

.input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.input-group:has(.input[aria-invalid="true"]) {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft);
}

.input-group > .input {
  flex: 1 1 auto;
  height: 100%;
  padding-inline: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.input-group > .input:first-child {
  padding-left: 14px;
}

.input-group > .input:last-child {
  padding-right: 14px;
}

.input-group__addon {
  flex-shrink: 0;
  padding-inline: 14px 6px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: var(--fs-14);
  line-height: 1;
  user-select: none;
}

.input-group > .input + .input-group__addon,
.input-group__addon:last-child {
  padding-inline: 6px 14px;
}

.input-group--sm {
  height: 36px;
  border-radius: var(--r-sm);
}

/* segmented control: <div class="seg" role="radiogroup"> + radio/label pairs */
.seg {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  padding: 3px;
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  isolation: isolate;
}

.seg--block {
  display: flex;
  width: 100%;
}

.seg__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.seg__option {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: var(--fs-14);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color var(--dur-hover) var(--ease-out), background-color var(--dur-hover) var(--ease-out);
}

.seg__option:hover {
  color: var(--text);
}

.seg__input:checked + .seg__option {
  color: var(--text-head);
}

.seg__input:focus-visible + .seg__option {
  outline: 2px solid var(--primary-2);
  outline-offset: 1px;
}

.seg__input:disabled + .seg__option {
  opacity: .4;
  cursor: not-allowed;
}

.seg__thumb {
  position: absolute;
  z-index: 0;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: var(--seg-w, 0px);
  transform: translateX(var(--seg-x, 0px));
  border-radius: var(--r-sm);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 4px 14px -6px rgba(0, 0, 0, .8);
  transition:
    transform var(--dur-ui) var(--ease-out),
    width var(--dur-ui) var(--ease-out),
    background-color var(--dur-ui) var(--ease-out),
    box-shadow var(--dur-ui) var(--ease-out);
  pointer-events: none;
}

html:not(.js) .seg__thumb,
.seg:not(.is-ready) .seg__thumb {
  opacity: 0;
  transition: none;
}

html:not(.js) .seg__input:checked + .seg__option,
.seg:not(.is-ready) .seg__input:checked + .seg__option {
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.seg[data-tone="primary"] .seg__thumb {
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px rgba(111, 133, 255, .45);
}

.seg[data-tone="green"] .seg__thumb {
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1px rgba(33, 201, 94, .4);
}

.seg[data-tone="green"] .seg__input:checked + .seg__option {
  color: var(--green);
}

.seg[data-tone="red"] .seg__thumb {
  background: var(--red-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 98, 46, .4);
}

.seg[data-tone="red"] .seg__input:checked + .seg__option {
  color: var(--red);
}

.seg[data-tone="gold"] .seg__thumb {
  background: var(--gold-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 199, 79, .4);
}

.seg[data-tone="gold"] .seg__input:checked + .seg__option {
  color: var(--gold);
}

.seg--sm .seg__option {
  height: 30px;
  padding: 0 10px;
  font-size: var(--fs-12);
}

/* switch: <label class="switch"> + checkbox role="switch" */
.switch {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  cursor: pointer;
  user-select: none;
  color: var(--text);
  font-size: var(--fs-14);
  font-weight: 500;
}

.switch__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.switch__track {
  position: relative;
  flex-shrink: 0;
  width: 42px;
  height: 24px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .1);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color var(--dur-ui) var(--ease-out), box-shadow var(--dur-ui) var(--ease-out);
}

.switch__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--lavender);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
  transition: transform var(--dur-ui) var(--ease-out), background-color var(--dur-ui) var(--ease-out), width var(--dur-hover) var(--ease-out);
}

.switch:hover .switch__track {
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.switch:active .switch__knob {
  width: 22px;
}

.switch__input:checked + .switch__track {
  background: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(111, 133, 255, .6), 0 0 18px -4px rgba(81, 106, 246, .7);
}

.switch__input:checked + .switch__track .switch__knob {
  transform: translateX(18px);
  background: #fff;
}

.switch:active .switch__input:checked + .switch__track .switch__knob {
  transform: translateX(14px);
}

.switch__input:focus-visible + .switch__track {
  outline: 2px solid var(--primary-2);
  outline-offset: 3px;
}

.switch__input:disabled + .switch__track {
  opacity: .4;
}

.switch:has(.switch__input:disabled) {
  cursor: not-allowed;
}

.switch--green .switch__input:checked + .switch__track {
  background: var(--green);
  box-shadow: inset 0 0 0 1px rgba(33, 201, 94, .7), 0 0 18px -4px rgba(33, 201, 94, .7);
}

/* range: <input type="range" class="range">; fomo.js keeps --fill in sync */
.range {
  --fill: 50%;
  --range-color: var(--primary);
  width: 100%;
  height: 24px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.range--green {
  --range-color: var(--green);
}

.range--red {
  --range-color: var(--red);
}

.range--gold {
  --range-color: var(--gold);
}

.range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: var(--r-pill);
  background: linear-gradient(to right, var(--range-color) 0 var(--fill), rgba(255, 255, 255, .1) var(--fill) 100%);
}

.range::-moz-range-track {
  height: 6px;
  border-radius: var(--r-pill);
  background: linear-gradient(to right, var(--range-color) 0 var(--fill), rgba(255, 255, 255, .1) var(--fill) 100%);
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px var(--range-color), 0 0 16px 2px rgba(81, 106, 246, .45);
  transition: transform var(--dur-hover) var(--ease-out), box-shadow var(--dur-hover) var(--ease-out);
}

.range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px var(--range-color), 0 0 16px 2px rgba(81, 106, 246, .45);
  transition: transform var(--dur-hover) var(--ease-out);
}

.range:hover::-webkit-slider-thumb {
  transform: scale(1.1);
}

.range:hover::-moz-range-thumb {
  transform: scale(1.1);
}

.range:active::-webkit-slider-thumb {
  transform: scale(1.18);
}

.range:focus-visible {
  outline: none;
}

.range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px var(--range-color), 0 0 0 7px rgba(111, 133, 255, .45);
}

.range:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 4px var(--range-color), 0 0 0 7px rgba(111, 133, 255, .45);
}

.range:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* presets: row of toggle buttons with aria-pressed */
.presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: var(--space-2);
  min-width: 0;
}

.preset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .035);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--fs-14);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--dur-hover) var(--ease-out),
    border-color var(--dur-hover) var(--ease-out),
    color var(--dur-hover) var(--ease-out),
    transform var(--dur-hover) var(--ease-out),
    box-shadow var(--dur-hover) var(--ease-out);
}

.preset:hover {
  border-color: var(--line-strong);
  color: var(--text);
  background: rgba(255, 255, 255, .06);
}

.preset:active {
  transform: scale(.96);
}

.preset[aria-pressed="true"] {
  background: var(--primary-soft);
  border-color: rgba(111, 133, 255, .55);
  color: #fff;
  box-shadow: 0 0 18px -6px rgba(81, 106, 246, .7);
}

.preset:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none;
}

/* 10. data ----------------------------------------------------------------- */
.stat {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.stat__label {
  color: var(--muted);
  font-size: var(--fs-12);
  font-weight: 500;
  line-height: 1.3;
}

.stat__value {
  color: var(--text-head);
  font-family: var(--font-mono);
  font-size: var(--fs-22);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat__value--lg {
  font-size: var(--fs-28);
}

.stat__delta {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-variant-numeric: tabular-nums;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  min-width: 560px;
  font-size: var(--fs-14);
}

.table th {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .02);
  color: var(--muted);
  font-size: var(--fs-12);
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}

.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr {
  transition: background-color var(--dur-hover) var(--ease-out);
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, .025);
}

.table .is-num {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.spark {
  pointer-events: none;
}

.spark__line {
  fill: none;
}

.spark__halo {
  opacity: .28;
  animation: pulse-dot 2s var(--ease-in-out) infinite;
}

svg.sparkline {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* 11. toasts --------------------------------------------------------------- */
.toasts {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  width: min(440px, calc(100vw - 32px));
  translate: -50% 0;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(22, 21, 34, .88);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--inner-hi), var(--shadow-lg);
  color: var(--text);
  font-size: var(--fs-14);
  font-weight: 500;
  line-height: 1.4;
  pointer-events: auto;
  cursor: default;
  animation: toast-in var(--dur-ui) var(--ease-out) both;
}

.toast__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--primary-2);
}

.toast__msg {
  min-width: 0;
}

.toast--success {
  border-color: rgba(33, 201, 94, .32);
}

.toast--success .toast__icon {
  color: var(--green);
}

.toast--error {
  border-color: rgba(255, 98, 46, .38);
}

.toast--error .toast__icon {
  color: var(--red);
}

.toast--info {
  border-color: rgba(111, 133, 255, .32);
}

.toast.is-bump {
  animation: toast-bump 360ms var(--ease-out);
}

.toast.is-leaving {
  animation: toast-out 220ms var(--ease-in-out) forwards;
}

/* 12. bookmarklet link ----------------------------------------------------- */
.bm {
  --bm-h: 52px;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: var(--bm-h);
  padding: 0 24px 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--primary-glass);
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .16),
    0 0 0 1px rgba(111, 133, 255, .16),
    0 12px 40px -12px rgba(81, 106, 246, .75),
    0 0 64px -14px rgba(81, 106, 246, .6);
  color: #fff;
  font-family: var(--font-sans);
  font-size: var(--fs-16);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  animation: float 3.2s var(--ease-in-out) infinite;
  transition:
    background-color var(--dur-hover) var(--ease-out),
    box-shadow var(--dur-ui) var(--ease-out),
    transform var(--dur-ui) var(--ease-out);
}

/* shimmering gradient ring */
.bm::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(from var(--bm-angle), transparent 0deg, var(--lavender) 50deg, var(--primary) 110deg, transparent 170deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: shimmer 4.5s linear infinite;
  pointer-events: none;
}

/* soft top sheen */
.bm::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 60%);
  pointer-events: none;
}

.bm__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--lavender);
}

.bm__label {
  pointer-events: none;
}

.bm:hover {
  background: rgba(96, 106, 247, .72);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .2),
    0 0 0 1px rgba(111, 133, 255, .4),
    0 16px 48px -12px rgba(81, 106, 246, .9),
    0 0 80px -10px rgba(81, 106, 246, .75);
}

.bm:active {
  cursor: grabbing;
  transform: translateY(0) scale(.98);
}

.bm:focus-visible {
  outline: 2px solid var(--primary-2);
  outline-offset: 4px;
}

.bm--lg {
  --bm-h: 64px;
  gap: 12px;
  padding: 0 32px 0 24px;
  font-size: var(--fs-18);
}

.bm--lg .bm__icon {
  width: 22px;
  height: 22px;
}

.bm.is-shaking {
  animation: float 3.2s var(--ease-in-out) infinite, shake 460ms var(--ease-out);
}

.is-dragging-bm .bm {
  animation-play-state: paused;
}

/* hint next to the bookmarklet */
.bm-hint {
  display: inline-flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 100%;
  color: var(--muted);
  font-size: var(--fs-14);
  line-height: 1.4;
}

.bm-hint__arrow {
  width: 38px;
  height: 46px;
  flex-shrink: 0;
  color: var(--lavender);
  overflow: visible;
}

.bm-hint__path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: .5 5;
  opacity: .8;
  animation: dash-flow 1.4s linear infinite;
}

.bm-hint__head {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bm-hint__text {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding-bottom: 2px;
}

.bm-hint__title {
  color: var(--text-head);
  font-weight: 600;
}

.bm-hint__sub {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: var(--fs-12);
}

/* hero install row: <div class="row bm-install"> + the .bm link + its .bm-hint */
.bm-install {
  --gap: var(--space-6);
  align-items: flex-end;
  margin-top: var(--space-3);
}

/* owner note right after .bm-install. Shown only while that link has no code
   yet (fomo.js adds .is-empty when its key in bookmarklets.js is empty). */
.bm-note {
  display: none;
  align-items: flex-start;
  gap: 10px;
  max-width: 52ch;
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.5;
}

.bm-install:has(.bm.is-empty) + .bm-note {
  display: flex;
}

.bm-note::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

.bm-note code {
  padding: 1px 6px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xs);
  background: var(--inset);
  color: var(--lavender);
  font-size: var(--fs-12);
  white-space: nowrap;
}

/* banner shown while a bookmarklet is being dragged */
.drop-banner {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: var(--z-banner);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 24px);
  padding: 10px 18px 10px 12px;
  border: 1px solid rgba(111, 133, 255, .45);
  border-radius: var(--r-pill);
  background: rgba(18, 17, 26, .9);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: var(--glow-primary), var(--shadow-lg);
  color: var(--text-head);
  font-size: var(--fs-14);
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  translate: -50% -130%;
  opacity: 0;
  transition: translate var(--dur-ui) var(--ease-out), opacity var(--dur-ui) var(--ease-out);
}

.drop-banner__arrow {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 18px rgba(81, 106, 246, .8);
}

.drop-banner__arrow svg {
  width: 16px;
  height: 16px;
  animation: nudge-up 1s var(--ease-in-out) infinite;
}

.drop-banner__hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--fs-12);
  font-weight: 500;
}

body.is-dragging-bm .drop-banner {
  translate: -50% 14px;
  opacity: 1;
}

body.is-dragging-bm::after {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 140px;
  z-index: calc(var(--z-banner) - 1);
  background: radial-gradient(60% 100% at 50% 0%, rgba(81, 106, 246, .32), transparent 75%);
  pointer-events: none;
  animation: fade-in var(--dur-ui) var(--ease-out) both;
}

@media (max-width: 560px) {
  .drop-banner__hint {
    display: none;
  }
}

/* 13. install steps -------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 860px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-5);
  }
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
  padding: 14px 14px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--inner-hi);
  transition: border-color var(--dur-ui) var(--ease-out), transform var(--dur-ui) var(--ease-out), box-shadow var(--dur-ui) var(--ease-out);
}

.step:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--inner-hi), var(--shadow-md);
}

.step__art {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  margin-bottom: var(--space-3);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background:
    radial-gradient(80% 70% at 50% 110%, rgba(81, 106, 246, .16), transparent 70%),
    var(--inset);
}

.step__num {
  padding-inline: 8px;
  color: rgba(203, 208, 235, .3);
  font-family: var(--font-mono);
  font-size: var(--fs-40);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
  transition: color var(--dur-ui) var(--ease-out);
}

.step:hover .step__num {
  color: var(--lavender);
}

.step__title {
  padding-inline: 8px;
  font-size: var(--fs-22);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: var(--track-h3);
  color: var(--text-head);
}

.step__text {
  padding-inline: 8px;
  color: var(--muted);
  font-size: var(--fs-16);
  line-height: 1.55;
}

.step__text .kbd,
.feature__text .kbd {
  margin-inline: 2px;
}

/* mini browser illustration used inside .step__art */
.mini-browser {
  position: absolute;
  inset: 14px 14px -1px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #0E0D17;
  box-shadow: 0 -10px 40px -12px rgba(0, 0, 0, .7);
  font-size: 10px;
  line-height: 1;
}

.mini-browser__chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  background: #15141F;
  border-bottom: 1px solid var(--line-soft);
}

.mini-browser__dots {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.mini-browser__dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(203, 208, 235, .18);
}

.mini-browser__url {
  flex: 1;
  min-width: 0;
  padding: 4px 8px;
  overflow: hidden;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .05);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-browser__bookmarks {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 5px 9px;
  background: #121119;
  border-bottom: 1px solid var(--line-soft);
}

.mini-browser__body {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  padding: 10px;
}

.mini-bm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 16px;
  padding: 0 7px;
  border-radius: var(--r-pill);
  color: var(--text-head);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.mini-bm svg {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
}

.mini-bm--ghost {
  width: 34px;
  background: rgba(203, 208, 235, .08);
}

.mini-bm--slot {
  width: 78px;
  border: 1px dashed rgba(111, 133, 255, .55);
  background: rgba(81, 106, 246, .08);
}

.mini-bm--live {
  background: var(--primary-glass);
  box-shadow: 0 0 0 1px rgba(111, 133, 255, .5), 0 0 14px rgba(81, 106, 246, .6);
}

.mini-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 11px 0 9px;
  border-radius: var(--r-pill);
  background: var(--primary-glass);
  box-shadow: 0 0 0 1px rgba(203, 208, 235, .25), 0 8px 24px -6px rgba(81, 106, 246, .8);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  transition: translate var(--dur-enter) var(--ease-out);
}

.mini-pill svg {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

.step:hover .mini-pill--rise {
  translate: 0 -8px;
}

.mini-cursor {
  position: absolute;
  z-index: 2;
  width: 14px;
  height: 14px;
  color: #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .7));
  pointer-events: none;
  transition: translate var(--dur-enter) var(--ease-out);
}

.mini-cursor--center {
  left: calc(50% + 26px);
  top: calc(50% + 2px);
}

.step:hover .mini-cursor--center {
  translate: 0 -8px;
}

.mini-cursor--bm {
  left: 122px;
  top: 13px;
}

.mini-browser__bookmarks {
  position: relative;
}

.mini-skel {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 42%;
  display: grid;
  gap: 7px;
}

.mini-coin {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: min(100%, 210px);
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.mini-coin__name {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: var(--text-head);
  font-size: 10px;
  font-weight: 600;
}

.mini-coin__name small {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 400;
}

.mini-coin svg {
  width: 54px;
  height: 22px;
}

.mini-panel {
  position: absolute;
  top: 8px;
  right: 8px;
  bottom: 8px;
  width: 46%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 9px;
  border: 1px solid rgba(111, 133, 255, .35);
  border-radius: 9px;
  background: rgba(18, 17, 26, .92);
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .8), 0 0 24px -8px rgba(81, 106, 246, .6);
  transition: translate var(--dur-enter) var(--ease-out);
}

.step:hover .mini-panel {
  translate: -4px 0;
}

.mini-panel__row {
  height: 6px;
  border-radius: 3px;
  background: rgba(203, 208, 235, .12);
}

.mini-panel__row--short {
  width: 55%;
}

.mini-panel__btn {
  margin-top: auto;
  height: 14px;
  border-radius: 4px;
  background: var(--primary);
  box-shadow: 0 0 12px rgba(81, 106, 246, .6);
}

/* 14. faq ------------------------------------------------------------------ */
.faq {
  border-top: 1px solid var(--line);
}

.faq__item {
  border-bottom: 1px solid var(--line);
}

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 20px 4px;
  color: var(--text-head);
  font-size: var(--fs-18);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.015em;
  list-style: none;
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: color var(--dur-hover) var(--ease-out);
}

.faq__q::-webkit-details-marker {
  display: none;
}

.faq__q::marker {
  content: "";
}

.faq__q:hover {
  color: #fff;
}

.faq__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition:
    transform var(--dur-ui) var(--ease-out),
    background-color var(--dur-hover) var(--ease-out),
    color var(--dur-hover) var(--ease-out),
    border-color var(--dur-hover) var(--ease-out);
}

.faq__icon svg {
  width: 16px;
  height: 16px;
}

.faq__q:hover .faq__icon {
  border-color: var(--line-strong);
  color: var(--text);
}

.faq__item[open] .faq__icon {
  transform: rotate(180deg);
  background: var(--primary-soft);
  border-color: rgba(111, 133, 255, .45);
  color: #fff;
}

.faq__a {
  padding: 0 4px 22px;
  color: var(--muted);
  max-width: var(--measure);
}

.faq__a p + p {
  margin-top: var(--space-3);
}

.faq__item[open] .faq__a {
  animation: faq-in var(--dur-ui) var(--ease-out) both;
}

@supports selector(::details-content) {
  .faq__item::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size var(--dur-ui) var(--ease-out), content-visibility var(--dur-ui) allow-discrete;
  }

  .faq__item[open]::details-content {
    block-size: auto;
  }
}

/* 15. cta band ------------------------------------------------------------- */
.cta-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  justify-items: center;
  gap: var(--space-4);
  padding: clamp(40px, 7vw, 88px) clamp(20px, 5vw, 64px) clamp(56px, 9vw, 112px);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  background:
    radial-gradient(70% 90% at 50% 115%, rgba(81, 106, 246, .34), rgba(34, 29, 75, .3) 45%, transparent 75%),
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01));
  box-shadow: var(--inner-hi);
  text-align: center;
}

.cta-band > * {
  min-width: 0;
  max-width: 100%;
}

.cta-band .lead {
  margin-inline: auto;
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

/* the quiet cross-link under the actions ("catching launches instead? try sniper") */
.cta-band__alt {
  margin-top: var(--space-2);
  font-size: var(--fs-14);
}

.cta-band .horizon {
  --horizon-top: 86%;
}

/* 16. nav ------------------------------------------------------------------ */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
}

.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(6, 5, 16, .6);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transition: opacity var(--dur-ui) var(--ease-out);
  pointer-events: none;
}

.nav.is-scrolled::before,
.nav.is-open::before {
  opacity: 1;
}

.nav__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-4);
  height: var(--nav-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  justify-self: start;
  border-radius: var(--r-sm);
  color: var(--lavender);
  text-decoration: none;
}

.brand__word {
  color: #fff;
  font-family: var(--font-sans);
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.05em;
  transition: color var(--dur-hover) var(--ease-out);
}

.brand:hover .brand__word {
  color: #fff;
}

.brand__fantasy {
  color: var(--green);
}

/* two "eyes" above each o in Fomo */
.brand__o {
  position: relative;
}

.brand__o::before,
.brand__o::after {
  content: "";
  position: absolute;
  top: 0.25em;
  width: 0.135em;
  height: 0.135em;
  border-radius: 50%;
  background: currentColor;
}

.brand__o::before {
  left: 12%;
}

.brand__o::after {
  right: 12%;
}

.brand__pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .02em;
}

.nav__menu {
  grid-column: 2;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--dur-hover) var(--ease-out), background-color var(--dur-hover) var(--ease-out);
}

.nav__link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .05);
}

.nav__link[aria-current="page"] {
  color: var(--text-head);
  background: rgba(255, 255, 255, .07);
  box-shadow: inset 0 0 0 1px var(--line);
}

.nav__actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav__cta svg {
  width: 16px;
  height: 16px;
  transition: transform var(--dur-hover) var(--ease-out);
}

.nav__cta:hover svg {
  transform: translate(1px, -1px);
}

.nav__toggle {
  display: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
  color: var(--text);
  transition: background-color var(--dur-hover) var(--ease-out), border-color var(--dur-hover) var(--ease-out);
}

.nav__toggle:hover {
  background: var(--glass-strong);
  border-color: var(--line-strong);
}

.nav__toggle-icon {
  position: relative;
  width: 16px;
  height: 10px;
}

.nav__toggle-icon span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--dur-ui) var(--ease-out), top var(--dur-ui) var(--ease-out);
}

.nav__toggle-icon span:first-child {
  top: 0;
}

.nav__toggle-icon span:last-child {
  top: calc(100% - 1.5px);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-icon span:first-child {
  top: calc(50% - .75px);
  transform: rotate(45deg);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-icon span:last-child {
  top: calc(50% - .75px);
  transform: rotate(-45deg);
}

@media (max-width: 719.98px) {
  .nav__inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .nav__actions {
    grid-column: 2;
  }

  .brand__word {
    font-size: 24px;
  }

  /* without JS the links simply sit on a second row */
  html:not(.js) .nav__inner {
    height: auto;
    min-height: var(--nav-h);
    padding-block: 10px;
    row-gap: 6px;
  }

  html:not(.js) .nav__menu {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  html.js .nav__toggle {
    display: inline-grid;
  }

  html.js .nav__menu {
    position: absolute;
    top: calc(100% + 6px);
    left: var(--gutter);
    right: var(--gutter);
    display: none;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: rgba(14, 13, 23, .96);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-lg);
  }

  html.js .nav.is-open .nav__menu {
    display: block;
    animation: slide-down var(--dur-ui) var(--ease-out) both;
  }

  html.js .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  html.js .nav__link {
    height: 48px;
    padding: 0 14px;
    font-size: var(--fs-18);
    border-radius: 10px;
  }
}

@media (max-width: 359.98px) {
  .brand__pill {
    display: none;
  }
}

/* 17. footer --------------------------------------------------------------- */
.footer {
  position: relative;
  margin-top: var(--space-16);
  padding-block: var(--space-12) var(--space-10);
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(6, 5, 16, 0), rgba(6, 5, 16, .75) 40%);
  color: var(--muted);
}

.footer__inner {
  display: grid;
  gap: var(--space-6);
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  border-radius: var(--r-xs);
  color: var(--muted);
  font-size: var(--fs-14);
  font-weight: 500;
  transition: color var(--dur-hover) var(--ease-out);
}

.footer__links a:hover {
  color: var(--text-head);
}

.footer__links svg {
  width: 14px;
  height: 14px;
}

.footer__legal {
  max-width: var(--measure);
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.6;
}

.footer__meta {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
}

/* 18. background ----------------------------------------------------------- */
.starfield {
  position: fixed;
  inset: 0;
  z-index: var(--z-bg);
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.planet-glow {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-glow);
  height: min(110vh, 980px);
  pointer-events: none;
  background:
    radial-gradient(55% 50% at 50% -6%, rgba(111, 133, 255, .26), rgba(81, 106, 246, .08) 55%, transparent 75%),
    radial-gradient(90% 70% at 50% -18%, rgba(34, 29, 75, .7), transparent 70%),
    radial-gradient(40% 30% at 82% -4%, rgba(81, 106, 246, .10), transparent 70%);
  opacity: calc(1 - var(--scroll-fade, 0));
  transition: opacity 500ms var(--ease-out);
}

body.is-leaving .planet-glow {
  opacity: 0;
}

/* 19. page transition (Fomo.navigate / arrival) ---------------------------- */
.page-transition {
  --pt-accent: rgba(81, 106, 246, .42);
  --pt-accent-line: var(--primary-2);
  --pt-dur: 650ms;
  position: fixed;
  inset: 0;
  z-index: var(--z-transition);
  display: grid;
  place-items: center;
  padding: var(--gutter);
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s linear 560ms;
}

.page-transition[data-accent="green"] {
  --pt-accent: rgba(33, 201, 94, .3);
  --pt-accent-line: var(--green);
}

.page-transition::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, var(--pt-accent), transparent min(60vmin, 520px)),
    var(--bg);
  opacity: 0;
  transition: opacity var(--pt-dur) var(--ease-in);
}

.page-transition__inner {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
  opacity: 0;
  translate: 0 10px;
  transition: opacity 420ms var(--ease-out) 120ms, translate 420ms var(--ease-out) 120ms;
}

.page-transition__label {
  color: var(--text-head);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: var(--track-display);
  text-align: center;
  text-transform: lowercase;
  text-wrap: balance;
}

.page-transition__line {
  display: block;
  width: min(180px, 50vw);
  height: 2px;
  border-radius: 2px;
  background:
    linear-gradient(90deg, transparent, var(--pt-accent-line), transparent) no-repeat,
    rgba(203, 208, 235, .1);
  background-size: 45% 100%, 100% 100%;
  background-position: -150% 0, 0 0;
  transform: scaleX(0);
  transition: transform 520ms var(--ease-out) 160ms;
}

.page-transition__label:empty,
.page-transition__label:empty + .page-transition__line {
  display: none;
}

.page-transition.is-active {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.page-transition.is-active::before {
  opacity: 1;
}

.page-transition.is-active .page-transition__inner {
  opacity: 1;
  translate: 0 0;
}

.page-transition.is-active .page-transition__line {
  transform: scaleX(1);
  animation: pt-line 1.1s var(--ease-in-out) 200ms infinite;
}

/* arrival: overlay fades out over ~500ms */
.page-transition.is-arriving::before {
  transition: opacity 500ms var(--ease-out);
}

.page-transition.is-arriving .page-transition__inner {
  display: none;
}

.page-transition.is-instant,
.page-transition.is-instant::before {
  transition: none !important;
}

body.is-leaving main,
body.is-leaving .nav,
body.is-leaving .footer {
  opacity: 0;
  scale: .985;
  filter: blur(4px);
  transition:
    opacity 420ms var(--ease-in-out),
    scale 600ms var(--ease-in-out),
    filter 420ms var(--ease-in-out);
}

body.is-arriving main {
  animation: arrive-settle 520ms var(--ease-out) backwards;
}

/* set by the inline head snippet before first paint; fomo.js clears it.
   The delayed animation is a failsafe so content never stays hidden. */
html.is-arriving main,
html.is-arriving .nav,
html.is-arriving .footer {
  opacity: 0;
  animation: pt-failsafe 1ms linear 1500ms forwards;
}

/* 20. motion --------------------------------------------------------------- */
@keyframes fade-up {
  from {
    opacity: 0;
    translate: 0 16px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes reveal-up {
  from {
    opacity: 0;
    translate: 0 18px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes reveal-scale {
  from {
    opacity: 0;
    scale: .96;
  }

  to {
    opacity: 1;
    scale: 1;
  }
}

@keyframes float {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -4px;
  }
}

@keyframes shimmer {
  to {
    --bm-angle: 360deg;
  }
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .45;
  }
}

@keyframes live-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(33, 201, 94, .55);
  }

  100% {
    box-shadow: 0 0 0 6px rgba(33, 201, 94, 0);
  }
}

@keyframes ping {
  0% {
    transform: scale(1);
    opacity: .6;
  }

  80%,
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  15% {
    transform: translateX(-7px) rotate(-1deg);
  }

  30% {
    transform: translateX(6px) rotate(1deg);
  }

  45% {
    transform: translateX(-4px);
  }

  60% {
    transform: translateX(3px);
  }

  75% {
    transform: translateX(-1px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes slide-down {
  from {
    opacity: 0;
    translate: 0 -8px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes nudge-up {
  0%,
  100% {
    translate: 0 1px;
  }

  50% {
    translate: 0 -2px;
  }
}

@keyframes dash-flow {
  to {
    stroke-dashoffset: -22;
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    translate: 0 14px;
    scale: .96;
  }

  to {
    opacity: 1;
    translate: 0 0;
    scale: 1;
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    translate: 0 8px;
    scale: .97;
  }
}

@keyframes toast-bump {
  0%,
  100% {
    scale: 1;
  }

  40% {
    scale: 1.035;
  }
}

@keyframes faq-in {
  from {
    opacity: 0;
    translate: 0 -4px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes pt-line {
  from {
    background-position: -150% 0, 0 0;
  }

  to {
    background-position: 250% 0, 0 0;
  }
}

@keyframes arrive-settle {
  from {
    opacity: .4;
    scale: .985;
    filter: blur(4px);
  }

  to {
    opacity: 1;
    scale: 1;
    filter: blur(0);
  }
}

@keyframes pt-failsafe {
  to {
    opacity: 1;
  }
}

/* page-load stagger: children fade up one after another and always end visible */
.hero-stagger > * {
  animation: fade-up var(--dur-enter-long) var(--ease-out) both;
  animation-delay: calc(80ms + var(--i, 0) * 90ms);
}

.hero-stagger > :nth-child(1) { --i: 0; }
.hero-stagger > :nth-child(2) { --i: 1; }
.hero-stagger > :nth-child(3) { --i: 2; }
.hero-stagger > :nth-child(4) { --i: 3; }
.hero-stagger > :nth-child(5) { --i: 4; }
.hero-stagger > :nth-child(6) { --i: 5; }
.hero-stagger > :nth-child(7) { --i: 6; }
.hero-stagger > :nth-child(8) { --i: 7; }

/* scroll reveals: hidden only once fomo.js has added html.js */
html.js [data-reveal]:not(.is-revealed) {
  opacity: 0;
}

html.js [data-reveal].is-revealed {
  animation: reveal-up var(--dur-enter) var(--ease-out) both;
  animation-delay: var(--reveal-delay, calc(var(--i, 0) * 90ms));
}

html.js [data-reveal="fade"].is-revealed {
  animation-name: fade-in;
}

html.js [data-reveal="scale"].is-revealed {
  animation-name: reveal-scale;
}

/* Fomo.whenVisible(): a live visual that is off screen, in a hidden tab or
   under reduced motion gets .is-asleep, which freezes the CSS animations inside it */
.is-asleep *,
.is-asleep *::before,
.is-asleep *::after {
  animation-play-state: paused !important;
}

/* semantic value colors: last in the cascade so they win over component text colors
   (for example <span class="stat__value up">) */
.up,
.up.stat__value {
  color: var(--green);
}

.down,
.down.stat__value {
  color: var(--red);
}

.flat,
.flat.stat__value {
  color: var(--muted-2);
}

/* 21. reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }

  .faq__item::details-content {
    transition: none !important;
  }

  html.js [data-reveal],
  html.js [data-reveal]:not(.is-revealed) {
    opacity: 1 !important;
    translate: none !important;
    animation: none !important;
  }

  .bm,
  .bm.is-shaking,
  .bm::before,
  .bm-hint__path,
  .drop-banner__arrow svg,
  .chip--live::before,
  .spark__halo,
  .hero-stagger > *,
  .page-transition.is-active .page-transition__line,
  body.is-arriving main {
    animation: none !important;
  }

  .bm:hover,
  .btn:hover,
  a.card:hover,
  .card--hover:hover,
  .feature:hover,
  .step:hover {
    transform: none;
  }

  .step:hover .mini-pill--rise,
  .step:hover .mini-panel,
  .step:hover .mini-cursor--center {
    translate: none;
  }

  html.is-arriving main,
  html.is-arriving .nav,
  html.is-arriving .footer {
    opacity: 1;
    animation: none !important;
  }

  body.is-leaving main,
  body.is-leaving .nav,
  body.is-leaving .footer {
    scale: none;
    filter: none;
  }
}
