/* ==========================================================
   Wert Dev — Tebex template for FiveM scripts
   Palette: store background rgb(17,11,9) + logo orange

   Contents
   1.  Tokens + base
   2.  Buttons + forms
   3.  Shared pieces (headings, crumbs, prose, skeleton, avatar, animations)
   4.  Announcement bar
   5.  Header (menu, basket, account menu)
   6.  Homepage: hero, showcase, live boxes
   7.  Homepage: features, featured scripts, reviews, FAQ
   8.  Floating Discord support
   9.  Category page
   10. Package page
   11. Basket
   12. Options page
   13. Sign in page
   14. CMS pages
   15. Footer
   16. Toast + thank-you screen
   17. Reduced motion
   ========================================================== */


/* ==========================================================
   1. Tokens + base
   ========================================================== */
:root {
  /* Overridden from layout.html via the template settings */
  --accent: #F97316;          /* Wert Dev orange (logo) */
  --accent-ink: #1A0B03;      /* text on accent */
  --bg: rgb(17, 11, 9);       /* store background */
  --surface: #1A120F;
  --surface-2: #231915;
  --line: #33251E;
  --text: #F6EEE9;
  --muted: #A8968C;
  --good: #4ADE80;
  --bad: #F87171;

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 1240px;

  /* Tebex legal footer (required, cannot be hidden) */
  --tebex-legal-footer-background-color: var(--bg);
  --tebex-legal-footer-text-color: var(--muted);
  --tebex-legal-footer-border-color: var(--line);
  --tebex-legal-footer-max-width: var(--wrap);
  --tebex-legal-footer-logo-color: var(--muted);
}

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

html { -webkit-text-size-adjust: 100%; }
html.no-scroll { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

@media (max-width: 600px) {
  .wrap { padding: 0 18px; }
}


/* ==========================================================
   2. Buttons + forms
   ========================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 650; font-size: 15px; letter-spacing: .01em;
  cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, white); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-block { width: 100%; }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }

/* Discord-coloured button (options page) */
.btn-discord { background: #5865F2; color: #fff; }
.btn-discord:hover { background: #4752C4; }
.btn-discord svg { flex: none; }

.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label { font-weight: 600; font-size: 15px; }
.field .hint { color: var(--muted); font-size: 14px; }
.input, .select {
  width: 100%; height: 48px; padding: 0 16px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.input:focus, .select:focus { outline: none; border-color: var(--accent); }


/* ==========================================================
   3. Shared pieces
   ========================================================== */

/* Section headings (Featured scripts, reviews, FAQ) */
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: 32px;
}
.section-title {
  margin: 0; font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.08;
  font-weight: 800; letter-spacing: -.01em; font-variation-settings: "wdth" 118;
}
.section-sub { margin: 10px 0 0; color: var(--muted); max-width: 56ch; }
.text-link { color: var(--accent); font-weight: 600; white-space: nowrap; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Breadcrumb */
.crumbs { display: flex; gap: 8px; color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.crumbs a:hover { color: var(--text); }

/* Empty state */
.empty { text-align: center; padding: 96px 24px; }
.empty[hidden] { display: none; }
.empty h2 { margin: 0 0 8px; font-size: 28px; font-variation-settings: "wdth" 115; }
.empty p { color: var(--muted); margin: 0 0 24px; }

/* Prose: package descriptions, CMS pages (Tebex editor HTML or converted Markdown) */
.prose { max-width: 72ch; color: #D8CCC5; }
.prose h1, .prose h2, .prose h3 { color: var(--text); line-height: 1.2; font-variation-settings: "wdth" 112; margin: 1.8em 0 .6em; }
.prose h2 { font-size: 26px; }
.prose h3 { font-size: 20px; }
.prose h4 { font-size: 17px; color: var(--text); margin: 1.6em 0 .5em; }
.prose strong { color: var(--text); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose img, .prose iframe { border-radius: var(--radius-md); max-width: 100%; }
.prose code { font-family: var(--mono); font-size: .9em; background: var(--surface); padding: 2px 6px; border-radius: 6px; }
.prose pre { background: color-mix(in srgb, var(--bg) 70%, black); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose blockquote {
  margin: 1.4em 0; padding: 4px 0 4px 16px;
  border-left: 3px solid var(--accent); color: var(--muted);
}
.prose blockquote p { margin: 0; }

/* GitHub-style alerts: > [!NOTE] / [!TIP] / [!IMPORTANT] / [!WARNING] / [!CAUTION] */
.prose .md-alert {
  --al: #60A5FA;
  padding: 12px 16px; border-radius: 10px; border-left-width: 3px;
  border-left-color: var(--al); color: #D8CCC5;
  background: color-mix(in srgb, var(--al) 8%, transparent);
}
.prose .md-alert.is-tip       { --al: var(--good); }
.prose .md-alert.is-important { --al: #A78BFA; }
.prose .md-alert.is-warning   { --al: #F5C451; }
.prose .md-alert.is-caution   { --al: var(--bad); }
.prose .md-alert-title {
  margin-bottom: 4px !important; color: var(--al);
  font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.prose del { color: var(--muted); }

/* Loading skeleton */
.latest-card.is-skeleton .latest-cover::before,
.sk {
  background: linear-gradient(90deg, var(--surface-2) 0%, color-mix(in srgb, var(--line) 70%, var(--surface-2)) 50%, var(--surface-2) 100%);
  background-size: 200% 100%;
  animation: sk-load 1.4s linear infinite;
}
.sk { display: block; width: 100%; height: 12px; margin-bottom: 10px; border-radius: 6px; }
.sk-sm { width: 35%; }
.sk-md { width: 60%; }
.sk-lg { width: 80%; height: 18px; }

/* Avatar (account menu, reviews) */
.avatar {
  position: relative; display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  background: color-mix(in srgb, var(--accent) 22%, var(--surface-2)); color: var(--accent);
  font-weight: 800; font-size: 15px; text-transform: uppercase;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.is-sm { width: 32px; height: 32px; font-size: 13px; }

/* "49 scripts available" pill (category header, hero showcase, basket) */
.cat-available {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 16px; padding: 6px 16px 6px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 45%, transparent);
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--muted); font-size: 13.5px; font-weight: 600;
  animation: cat-rise .7s cubic-bezier(.2, .8, .2, 1) .12s both;
}
.cat-available[hidden] { display: none; }
.cat-available b {
  display: inline-block; min-width: 2ch; text-align: right;
  color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums;
}
.cat-available::after {                                 /* one light sweep after it lands */
  content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .2), transparent);
  transform: skewX(-20deg);
  animation: cat-shine 1.3s ease .9s both;
}
.cat-available-dot { position: relative; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--good); }
.cat-available-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--good);
  animation: cat-ping 1.8s cubic-bezier(0, 0, .2, 1) infinite;
}

/* Shared animations */
@keyframes cat-rise {
  from { opacity: 0; transform: translateY(10px); filter: blur(4px); }
  to   { opacity: 1; transform: none; filter: none; }
}
@keyframes cat-shine { from { left: -40%; } to { left: 130%; } }
@keyframes cat-ping {
  0%        { transform: scale(1);   opacity: .7; }
  80%, 100% { transform: scale(2.6); opacity: 0; }
}
@keyframes sk-load { to { background-position: -200% 0; } }


/* ==========================================================
   4. Announcement bar
   ========================================================== */
/* Caution tape: orange band, moving hazard stripes on both edges,
   scrolling text in the middle (app.js adds .is-running), hover pauses everything. */
.announce {
  --tape: var(--accent);
  --tape-ink: var(--accent-ink);
  --stripe: 4px;                                       /* height of the striped edges */
  position: relative; z-index: 2; overflow: hidden;
  display: flex; align-items: center; gap: 10px;
  min-height: calc(32px + var(--stripe) * 2);
  padding: var(--stripe) 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .16), transparent 45%, rgba(0, 0, 0, .10)),
    var(--tape);
  color: var(--tape-ink); font-size: 12px;
  box-shadow: 0 12px 32px -14px color-mix(in srgb, var(--accent) 70%, transparent);
}

/* Hazard stripes on the top and bottom edges, drifting sideways */
.announce::before, .announce::after {
  content: ""; position: absolute; left: 0; right: 0; height: var(--stripe);
  background: linear-gradient(-45deg,
    var(--tape-ink) 25%, transparent 25% 50%, var(--tape-ink) 50% 75%, transparent 75%) 0 0 / 12px 12px;
  opacity: .92; pointer-events: none;
  animation: announce-stripes 1.1s linear infinite;
}
.announce::before { top: 0; }
.announce::after  { bottom: 0; animation-direction: reverse; }

/* Badge and "Shop now": slanted tape pieces (outer skews, inner .announce-slant straightens the text) */
.announce-badge, .announce-cta {
  position: relative; z-index: 1; flex: none;
  display: inline-flex; align-items: center;
  height: 22px; padding: 0 10px;
  transform: skewX(-14deg);
  background: var(--tape-ink); color: var(--tape);
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  font-variation-settings: "wdth" 115;
}
.announce-slant { display: inline-flex; align-items: center; gap: 5px; transform: skewX(14deg); }
.announce-badge { animation: announce-pulse 2.4s ease-in-out infinite; }
.announce-badge svg { width: 11px; height: 11px; fill: currentColor; }
.announce-cta svg { width: 12px; height: 12px; }

.announce-cta { transition: background-color .15s ease, color .15s ease, box-shadow .15s ease; }
.announce-cta svg { transition: transform .15s ease; }
.announce-cta:hover { background: var(--bg); color: var(--text); box-shadow: 0 0 0 2px var(--tape-ink); }
.announce-cta:hover svg { transform: translateX(3px); }

/* Scrolling middle: fades out at both ends */
.announce-marquee {
  flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
}
.announce-track { display: flex; align-items: center; }
.announce-group { display: flex; align-items: center; gap: 12px; flex: none; }

/* Before app.js runs (or with reduced motion): one centered, wrapping copy */
.announce:not(.is-running) .announce-track { justify-content: center; }
.announce:not(.is-running) .announce-group { flex: 1; flex-wrap: wrap; justify-content: center; gap: 4px 12px; padding-block: 4px; text-align: center; }
.announce:not(.is-running) .announce-sep { display: none; }

.announce.is-running .announce-track {
  width: max-content;
  animation: announce-scroll var(--announce-dur, 30s) linear infinite;
}
.announce.is-running .announce-group { white-space: nowrap; }

/* Hover / keyboard focus pauses the text and the stripes */
.announce:hover .announce-track, .announce:focus-within .announce-track,
.announce:hover::before, .announce:hover::after,
.announce:focus-within::before, .announce:focus-within::after { animation-play-state: paused; }

.announce-text {
  font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  font-variation-settings: "wdth" 112;
}

/* Separator between the repeats */
.announce-sep { display: inline-grid; place-items: center; margin-inline: 12px; }
.announce-sep svg { width: 10px; height: 10px; fill: currentColor; opacity: .75; }

/* Coupon chip: dark ticket on the tape */
.announce-code {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 7px 0 9px; border-radius: 5px; cursor: pointer;
  border: 1.5px dashed color-mix(in srgb, var(--tape) 65%, transparent);
  background: var(--tape-ink); color: var(--tape);
  font-family: var(--mono); font-size: 11.5px; font-weight: 800; letter-spacing: .08em;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.announce-code svg { width: 12px; height: 12px; opacity: .85; }
.announce-code:hover { background: var(--bg); color: var(--text); border-style: solid; border-color: var(--tape-ink); transform: translateY(-1px); }
.announce-code.is-copied { background: var(--tape-ink); color: var(--good); border-style: solid; border-color: var(--good); }

/* Countdown */
.announce-timer { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; }
.announce-timer[hidden] { display: none; }
.announce-timer svg { width: 12px; height: 12px; }
.announce-timer b {
  padding: 1px 6px; border-radius: 4px;
  background: color-mix(in srgb, var(--tape-ink) 14%, transparent);
  font-family: var(--mono); font-weight: 800; font-variant-numeric: tabular-nums;
}

@keyframes announce-scroll { to { transform: translateX(-50%); } }
@keyframes announce-stripes { to { background-position: 12px 0; } }
@keyframes announce-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tape-ink) 45%, transparent); }
  50%      { box-shadow: 0 0 0 4px color-mix(in srgb, var(--tape-ink) 0%, transparent); }
}

@media (max-width: 600px) {
  .announce { gap: 8px; padding-inline: 8px; font-size: 11.5px; min-height: calc(30px + var(--stripe) * 2); }
  .announce-badge, .announce-cta { height: 20px; padding: 0 8px; font-size: 10px; }
  .announce-cta-label { display: none; }            /* arrow only on phones */
  .announce-sep { margin-inline: 10px; }
}


/* ==========================================================
   5. Header
   ========================================================== */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-row { position: relative; display: flex; align-items: center; gap: 20px; height: 72px; }

/* Logo: eagle icon + "WERT DEV" in the site font at its widest, heaviest setting */
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark {
  height: 42px; width: auto; flex: none;
  filter: drop-shadow(0 4px 12px color-mix(in srgb, var(--accent) 35%, transparent));
  transition: transform .35s cubic-bezier(.2, 1.4, .4, 1);
}
.brand:hover .brand-mark { transform: translateY(-1px) rotate(-4deg) scale(1.04); }
.brand-name {
  font-family: var(--font);
  font-size: 21px; font-weight: 800; line-height: 1; letter-spacing: .01em;
  font-variation-settings: "wdth" 125;
  text-transform: uppercase; white-space: nowrap;
  color: var(--text);
}
.brand-name span { color: var(--accent); }

/* ---------- Main menu (pill) ---------- */
.nav {
  display: flex; align-items: center; gap: 2px; flex: 0 1 auto; overflow: visible;
  margin-inline: auto;                                 /* centered between the logo and the account / basket */
  padding: 4px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  border: 1px solid var(--line);
}
.nav-item { position: relative; }
.nav-item > a, .nav-drop-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px;
  border: 0; border-radius: 999px; background: transparent;
  color: var(--muted);
  font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: color .15s ease, background-color .15s ease;
}
.nav-item > a:hover, .nav-drop-btn:hover,
.nav-item.is-open > .nav-drop-btn { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }

/* Active page: "| Home" */
.nav-item.is-active > a, .nav-item.is-active > .nav-drop-btn { color: var(--text); }
.nav-item.is-active > a::before,
.nav-item.is-active > .nav-drop-btn::before {
  content: ""; flex: none;
  width: 3px; height: 14px; border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 75%, transparent);
  animation: nav-bar-in .35s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes nav-bar-in {
  from { transform: scaleY(0); opacity: 0; }
  to   { transform: scaleY(1); opacity: 1; }
}

/* Dropdown ("Explore" > pages): opens on hover on desktop, on click everywhere (app.js) */
.nav-drop-btn { border: 0; background: transparent; cursor: pointer; }
.nav-drop-btn svg { transition: transform .2s ease; }
.nav-item.is-open .nav-drop-btn svg { transform: rotate(180deg); }
.nav-drop {
  position: absolute; top: calc(100% + 10px); left: 50%; z-index: 50;
  display: grid; min-width: 220px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, .65);
  opacity: 0; visibility: hidden; transform: translate(-50%, -4px);
  transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
}
.nav-item.is-open .nav-drop {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
  transition: opacity .15s ease, transform .15s ease, visibility 0s;
}
@media (hover: hover) and (min-width: 1201px) {
  .nav-item[data-drop]:hover .nav-drop, .nav-item[data-drop]:focus-within .nav-drop {
    opacity: 1; visibility: visible; transform: translate(-50%, 0);
    transition: opacity .15s ease, transform .15s ease, visibility 0s;
  }
  .nav-item[data-drop]:hover .nav-drop-btn svg { transform: rotate(180deg); }
  .nav-drop::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }   /* hover bridge */
}
.nav-drop a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: color .15s ease, background-color .15s ease;
}
.nav-drop a::after {                                   /* small arrow that slides in on hover */
  content: "→"; color: var(--accent); font-weight: 700;
  opacity: 0; transform: translateX(-4px); transition: opacity .15s ease, transform .15s ease;
}
.nav-drop a:hover, .nav-drop a.is-active { color: var(--text); background: var(--surface-2); }
.nav-drop a:hover::after, .nav-drop a.is-active::after { opacity: 1; transform: none; }

/* ---------- Right side: account, basket, YouTube ---------- */
.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.header-actions > * { flex-shrink: 0; }            /* never squeeze the account name */

/* Basket button: cart icon + count badge */
.basket-btn { position: relative; height: 40px; padding: 0 16px 0 12px; gap: 10px; }
.basket-ico { position: relative; display: grid; place-items: center; }
.basket-ico svg { width: 20px; height: 20px; }
.basket-count {
  position: absolute; top: -9px; right: -11px;
  display: grid; place-items: center;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--accent-ink); color: var(--accent);
  border: 2px solid var(--accent);                 /* same orange as the button = "cut-out" look */
  font-size: 10.5px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums;
  animation: basket-pop .5s cubic-bezier(.2, 1.4, .4, 1) .35s both;
}
.basket-count.is-empty { opacity: .75; animation: none; }
.basket-btn:hover .basket-count { border-color: color-mix(in srgb, var(--accent) 86%, white); }
@keyframes basket-pop {
  0%   { transform: scale(0); }
  70%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Round icon button (YouTube) */
.header-icon-btn {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  transition: color .15s ease, border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.header-icon-btn:hover { transform: translateY(-1px); }
.header-youtube:hover {
  color: #FF3B3B;
  border-color: color-mix(in srgb, #FF0000 45%, var(--line));
  background: color-mix(in srgb, #FF0000 8%, var(--surface));
}

.menu-toggle { display: none; }

/* ---------- Mobile menu ---------- */
@media (max-width: 1200px) {
  .menu-toggle { display: inline-flex; }
  .header-actions { margin-left: auto; }            /* the menu is a panel here, so push the buttons right */
  .nav {                                           /* full-width panel under the header, not a pill */
    display: none; position: absolute; left: 0; right: 0; top: 72px;
    flex-direction: column; padding: 12px 24px 20px;
    background: var(--bg);
    border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  }
  .nav.is-open { display: flex; align-items: stretch; }
  .nav-item { width: 100%; }
  .nav-item > a, .nav-drop-btn { width: 100%; height: 44px; justify-content: flex-start; padding: 0 14px; border-radius: var(--radius-sm); }
  .nav-drop-btn svg { margin-left: auto; }        /* chevron stays on the right */
  .nav-drop {                                      /* opens inline inside the mobile menu */
    position: static; display: none; min-width: 0; padding: 4px 0 6px 14px;
    background: transparent; border: 0; box-shadow: none;
    opacity: 1; visibility: visible; transform: none;
  }
  .nav-item.is-open .nav-drop { display: grid; transform: none; }
}
@media (max-width: 600px) {
  .brand-mark { height: 34px; }
  .brand-name { font-size: 17px; }
  .basket-label { display: none; }
  .basket-btn { width: 40px; padding: 0; justify-content: center; }
}
@media (max-width: 420px) {
  .header-youtube { display: none; }
}

/* ---------- Account menu: trigger ---------- */
.account-menu { position: relative; }

.account-trigger {
  display: inline-flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 12px 0 4px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: border-color .15s ease;
}
.account-trigger:hover, .account-menu.is-open .account-trigger { border-color: var(--muted); }
.account-trigger-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-trigger-currency {
  padding: 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent); font-size: 12px; font-weight: 750;
}
.account-chev { display: inline-flex; color: var(--muted); transition: transform .15s ease; }
.account-menu.is-open .account-chev { transform: rotate(180deg); }
.avatar.is-guest { color: var(--muted); background: var(--surface-2); }

/* ---------- Account menu: popup ---------- */
.account-pop {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60;
  display: none; width: min(480px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, .6);
}
.account-pop::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.account-menu.is-open .account-pop { display: block; }
@media (hover: hover) and (min-width: 1081px) {
  .account-menu:hover .account-pop, .account-menu:focus-within .account-pop { display: block; }
  .account-menu:hover .account-chev { transform: rotate(180deg); }
}

/* Who is signed in */
.account-pop-head { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.account-pop-who { flex: 1; min-width: 0; }
.account-pop-name { font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
.account-pop-sub { color: var(--good); font-size: 13px; }
.account-pop-sub.is-guest { color: var(--muted); }

.account-pop-label { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.account-pop-label svg { color: var(--accent); }

/* Currency + language columns */
.pref-grid { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.pref-grid.is-single { grid-template-columns: 1fr; }
.pref-col { min-width: 0; padding: 14px 10px 10px; }
.pref-col + .pref-col { border-left: 1px solid var(--line); }
.pref-col .account-pop-label { padding: 0 8px; }

.pref-list {
  display: grid; gap: 2px; max-height: 236px; overflow-y: auto; padding-right: 4px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.pref-list::-webkit-scrollbar { width: 6px; }
.pref-list::-webkit-scrollbar-track { background: transparent; }
.pref-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.pref-list:hover::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--accent) 55%, var(--line)); }

.pref-item {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) 16px; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: var(--radius-sm);
  color: var(--muted); font-size: 14px; font-weight: 600;
  transition: background-color .12s ease, color .12s ease;
}
.pref-item:hover { background: var(--surface-2); color: var(--text); }
.pref-item.is-active { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--text); }

.pref-symbol {
  display: grid; place-items: center; height: 26px; border-radius: 6px;
  background: var(--surface-2); color: var(--accent);
  font-size: 12.5px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap;
}
.pref-item.is-active .pref-symbol { background: var(--accent); color: var(--accent-ink); }
.pref-flag {
  justify-self: center; width: 24px; height: 17px; border-radius: 3px; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1);
}
.pref-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pref-check { display: none; color: var(--accent); }
.pref-item.is-active .pref-check { display: inline-flex; }

/* "Current" box at the top of each column */
.pref-current {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  margin: 0 0 10px; padding: 10px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
}
.pref-current[hidden] { display: none; }
.pref-current .pref-symbol { height: 30px; background: var(--accent); color: var(--accent-ink); font-size: 14px; }
.pref-current .pref-flag { width: 28px; height: 20px; }
.pref-current-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.pref-current-text small { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.pref-current-text strong { font-size: 14.5px; font-weight: 750; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pref-current-code {
  padding: 2px 8px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--muted); font-size: 11.5px; font-weight: 700;
}

/* Sign in / sign out (also used by the basket, sign-in page and thank-you screen) */
.account-pop-foot { display: grid; padding: 12px; }
.account-action {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; border-radius: var(--radius-md); border: 1px solid transparent;
  font-size: 15px; font-weight: 750; letter-spacing: .01em;
  transition: transform .15s ease, box-shadow .2s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}
.account-action svg { width: 18px; height: 18px; flex: none; }

.account-action.is-signin {
  color: var(--accent-ink);
  background: linear-gradient(135deg,
              color-mix(in srgb, var(--accent) 80%, white) 0%,
              var(--accent) 45%,
              color-mix(in srgb, var(--accent) 82%, black) 100%);
  box-shadow: 0 10px 26px -10px color-mix(in srgb, var(--accent) 85%, transparent),
              inset 0 1px 0 rgba(255, 255, 255, .35);
}
.account-action.is-signin::after {                 /* light sweep on hover */
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-20deg);
  transition: left .55s ease;
}
.account-action.is-signin:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px -10px color-mix(in srgb, var(--accent) 95%, transparent),
              inset 0 1px 0 rgba(255, 255, 255, .35);
}
.account-action.is-signin:hover::after { left: 130%; }

.account-action.is-signout {
  color: #FCA5A5;
  background: color-mix(in srgb, var(--bad) 10%, transparent);
  border-color: color-mix(in srgb, var(--bad) 40%, transparent);
}
.account-action.is-signout:hover {
  color: #1F0606; background: var(--bad); border-color: var(--bad);
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--bad) 80%, transparent);
}

.account-action-note { margin: 8px 0 0; text-align: center; color: var(--muted); font-size: 12.5px; }

/* Phones / small tablets: open the menu full-width under the header
   (the button isn't at the right edge here, so a right-aligned popup ran off-screen) */
@media (max-width: 820px) {
  .account-menu { position: static; }              /* popup anchors to .header-row instead */
  .account-pop {
    left: 12px; right: 12px; top: calc(100% + 8px);
    width: auto;
    max-height: calc(100vh - 100px); max-height: calc(100dvh - 100px);
    overflow-y: auto; overscroll-behavior: contain;
  }
  .account-pop::before { display: none; }
}
@media (max-width: 600px) {
  .account-trigger { padding-right: 10px; gap: 6px; }
  .account-trigger-name { display: none; }
  .pref-grid { grid-template-columns: 1fr; }
  .pref-col + .pref-col { border-left: 0; border-top: 1px solid var(--line); }
  .pref-list { max-height: 180px; }
}
@media (max-width: 420px) {
  .account-pop-head { flex-wrap: wrap; }
}


/* ==========================================================
   6. Homepage: hero, showcase, live boxes
   ========================================================== */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::after {                                         /* warm glow top-right */
  content: ""; position: absolute; right: -10%; top: -30%; width: 60%; height: 120%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent);
}
.hero::before {                                        /* faint street-map grid, like the pause-menu map */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: .45;
  mask-image: radial-gradient(ellipse 70% 80% at 75% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 75% 40%, #000 20%, transparent 75%);
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; align-items: center;
  padding-block: 96px 56px;
}
.hero-title {
  margin: 0 0 24px;
  padding-bottom: .08em;                 /* keeps descenders (y, g) from being clipped by the gradient */
  font-size: clamp(2.6rem, 5.6vw, 5rem);
  line-height: .98; font-weight: 800; letter-spacing: -.02em;
  font-variation-settings: "wdth" 125;
  max-width: 13ch;
  text-wrap: balance;
  background: linear-gradient(180deg, var(--text) 30%, color-mix(in srgb, var(--accent) 70%, var(--text)) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: cat-rise .7s cubic-bezier(.2, .8, .2, 1) both;
}
.hero-lede { margin: 0 0 36px; color: var(--muted); font-size: 18px; max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Left side slides (hero.js) ----------
   All slides sit in the same grid cell, so the block is as tall as the tallest one
   and nothing below jumps when they change. */
.hero-copy { min-width: 0; }
.hero-slides { display: grid; grid-template-columns: minmax(0, 1fr); }   /* never wider than the column */
.hero-slide {
  grid-area: 1 / 1; min-width: 0;
  display: flex; flex-direction: column; justify-content: center;   /* shorter slides sit in the middle */
  opacity: 0; visibility: hidden; transform: translateY(14px); filter: blur(6px);
  transition: opacity .55s ease, transform .7s cubic-bezier(.2, .8, .2, 1), filter .55s ease, visibility 0s linear .7s;
}
.hero-slide.is-active {
  opacity: 1; visibility: visible; transform: none; filter: none;
  transition: opacity .6s ease .12s, transform .8s cubic-bezier(.2, .8, .2, 1) .12s, filter .6s ease .12s, visibility 0s;
}
.hero-slide .hero-lede { margin-bottom: 0; }
.hero-s2 .hero-title, .hero-s3 .hero-title, .hero-s4 .hero-title { font-size: clamp(2.2rem, 4vw, 3.4rem); margin-bottom: 14px; }

/* Picture on top of the text (slides 2 and 3) */
.hero-figure { position: relative; height: 250px; margin-bottom: 22px; }

/* ---------- Floating trust pills (same look as the "49 scripts available" pill) ----------
   Each <li> is placed and bobs up and down; the pill inside rises in when its slide shows. */
.hero-floats { margin: 0; padding: 0; list-style: none; }
.hero-float {
  position: absolute; z-index: 2;
  transform: rotate(var(--r, 0deg));
  animation: hero-bob 5s ease-in-out infinite;
  animation-delay: var(--bob, 0s);
}
@keyframes hero-bob {
  0%, 100% { transform: rotate(var(--r, 0deg)) translateY(0); }
  50%      { transform: rotate(var(--r, 0deg)) translateY(-7px); }
}
.hero-pill {
  margin: 0; white-space: nowrap;
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .9);
}
.hero-pill b { min-width: 0; text-align: left; }
.hero-slide.is-active .hero-pill { animation: cat-rise .6s cubic-bezier(.2, .8, .2, 1) both; }
.hero-slide.is-active .f1 .hero-pill { animation-delay: .2s; }
.hero-slide.is-active .f2 .hero-pill { animation-delay: .35s; }
.hero-slide.is-active .f3 .hero-pill { animation-delay: .5s; }
.hero-slide.is-active .f4 .hero-pill { animation-delay: .65s; }

/* Slide 1: two pills above the headline, two under the text, set crosswise */
.hero-s1 { position: relative; padding-block: 64px 70px; }
.hero-s1 .f1 { top: 0;      left: 0;     --r: -3deg; --bob: 0s; }
.hero-s1 .f2 { top: 18px;   right: 4%;   --r: 3deg;  --bob: -1.3s; }
.hero-s1 .f3 { bottom: 14px; left: 8%;   --r: 2deg;  --bob: -2.6s; }
.hero-s1 .f4 { bottom: 0;   right: 0;    --r: -3deg; --bob: -3.8s; }

/* ---------- Slide 2: logo assembling from particles ---------- */
.forge-figure::before {                                /* warm glow behind the logo */
  content: ""; position: absolute; left: 0; top: 0; width: 250px; height: 250px; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent);
}
.forge-canvas { position: relative; width: 250px; height: 250px; }
.hero-s2 .f1 { top: 22px;  left: 262px; --r: -3deg; --bob: -.6s; }
.hero-s2 .f2 { top: 104px; left: 300px; --r: 2deg;  --bob: -2s; }
.hero-s2 .f3 { top: 186px; left: 250px; --r: -2deg; --bob: -3.3s; }

/* ---------- Slide 3: theme colour demo (hero.js changes --demo) ---------- */
/* The garage window is the main picture; the colour picker card overlaps it on the right */
.theme-demo { --demo: #F97316; --h: 25; --s: 91%; --v: 98%; }
.td-window, .td-picker {
  border-radius: 14px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .95);
}
.td-window {
  position: absolute; left: 0; top: 4px; width: 61%; height: 236px;
  display: flex; flex-direction: column; overflow: hidden;
}
.td-window::after {                                    /* the window glows in the chosen colour */
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--demo) 35%, transparent), 0 20px 60px -30px var(--demo);
  transition: box-shadow .5s ease;
}
.td-window, .td-window * { transition: background-color .5s ease, color .5s ease, border-color .5s ease, box-shadow .5s ease; }
.td-bar {
  display: flex; align-items: center; gap: 5px; padding: 8px 10px;
  border-bottom: 1px solid var(--line); background: var(--surface-2);
  font-size: 11px; font-weight: 700; color: var(--muted);
}
.td-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.td-bar i:first-child { background: var(--demo); }
.td-bar span { margin-left: 6px; }
.td-body { display: flex; flex: 1; min-height: 0; }
.td-side { display: flex; flex-direction: column; gap: 9px; width: 64px; padding: 14px 10px; border-right: 1px solid var(--line); }
.td-side b, .td-side span { display: block; height: 8px; border-radius: 4px; background: var(--line); }
.td-side b { background: var(--demo); box-shadow: 0 0 10px color-mix(in srgb, var(--demo) 60%, transparent); }
.td-main { display: flex; flex-direction: column; gap: 14px; flex: 1; min-width: 0; padding: 16px 16px 14px; }
.td-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--muted); }
.td-meter { flex: 1; max-width: 140px; height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.td-meter b { display: block; height: 100%; border-radius: inherit; background: var(--demo); }
.td-toggle { position: relative; width: 32px; height: 18px; border-radius: 999px; background: var(--demo); }
.td-toggle b { position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.td-btn {
  margin-top: auto; padding: 9px 12px; border-radius: 9px; text-align: center;
  background: var(--demo); color: #fff; font-size: 12.5px; font-weight: 800;
  box-shadow: 0 10px 22px -10px var(--demo);
}

/* Colour picker card */
.td-picker {
  position: absolute; right: 0; top: 30px; z-index: 2; width: 40%; min-width: 190px;
  display: flex; flex-direction: column; gap: 10px; padding: 12px;
  transform: rotate(2deg);
  animation: hero-bob-card 6s ease-in-out infinite;
}
@keyframes hero-bob-card { 50% { transform: rotate(2deg) translateY(-6px); } }
.td-label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }

/* Saturation / brightness square: hue colour, white from the left, black from the bottom */
.tp-sv {
  position: relative; height: 74px; border-radius: 8px;
  background:
    linear-gradient(to top, #000, transparent),
    linear-gradient(to right, #fff, hsl(calc(var(--h) * 1deg) 100% 50%));
  transition: background .6s ease;
}
.tp-sv-dot {
  position: absolute; left: var(--s); top: calc(100% - var(--v));
  width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  border: 2px solid #fff; background: var(--demo);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), 0 3px 8px rgba(0, 0, 0, .5);
  transition: left .7s cubic-bezier(.4, 0, .2, 1), top .7s cubic-bezier(.4, 0, .2, 1), background-color .5s ease;
}
/* Hue bar */
.tp-hue {
  position: relative; height: 10px; border-radius: 999px;
  background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
}
.tp-hue-knob {
  position: absolute; top: 50%; left: calc(var(--h) / 360 * 100%);
  width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  border: 2px solid #fff; background: hsl(calc(var(--h) * 1deg) 100% 50%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .5);
  transition: left .7s cubic-bezier(.4, 0, .2, 1), background-color .7s ease;
}

.td-swatches { position: relative; display: flex; gap: 8px; }
.td-swatches span {
  width: 22px; height: 22px; border-radius: 50%; background: var(--c);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px transparent;
  transition: box-shadow .3s ease, transform .3s ease;
}
.td-swatches span.is-on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); transform: scale(1.08); }
.td-cursor {                                           /* pointer that moves to the next swatch */
  position: absolute; top: 12px; left: 0; width: 18px; height: 18px;
  fill: #fff; stroke: #111; stroke-width: 1.4;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6));
  transform: translateX(var(--cx, 10px));
  transition: transform .7s cubic-bezier(.4, 0, .2, 1);
}
.td-cursor.is-click { animation: td-click .25s ease; }
@keyframes td-click { 50% { transform: translateX(var(--cx, 10px)) scale(.8); } }
.td-code {
  padding: 7px 9px; border-radius: 7px;
  background: color-mix(in srgb, var(--bg) 80%, black); border: 1px solid var(--line);
  color: var(--muted); font-family: var(--mono); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.td-code em { font-style: normal; color: var(--demo); transition: color .5s ease; }

/* ---------- Slide 4: resource monitor ---------- */
.resmon { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; height: 168px; margin-top: 26px; }
.rm-gauge, .rm-table {
  border-radius: 14px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  box-shadow: 0 20px 40px -26px rgba(0, 0, 0, .9);
}
.rm-gauge { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 14px; overflow: hidden; }
.rm-gauge-label { color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.rm-gauge-value { color: var(--good); font-family: var(--mono); font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rm-spark { width: 100%; height: 34px; margin-top: 6px; overflow: visible; }
.rm-spark path { fill: none; stroke: var(--good); stroke-width: 1.6; stroke-linejoin: round; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--good) 60%, transparent)); }

.rm-table { display: flex; flex-direction: column; padding: 6px 14px 8px; font-family: var(--mono); font-size: 12px; }
.rm-head, .rm-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px 70px; align-items: center; gap: 10px; }
.rm-head { padding: 6px 0 8px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }
.rm-live { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; color: var(--good); }
.rm-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--good); animation: rm-blink 1.4s ease-in-out infinite; }
@keyframes rm-blink { 50% { opacity: .25; } }
.rm-row { flex: 1; border-bottom: 1px dashed color-mix(in srgb, var(--line) 70%, transparent); }
.rm-row:last-child { border-bottom: 0; }
.rm-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.rm-ms { color: var(--good); font-variant-numeric: tabular-nums; text-align: right; }
.rm-bar { height: 5px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.rm-bar b { display: block; width: 2%; height: 100%; border-radius: inherit; background: var(--good); transition: width .6s ease; }

/* ---------- Progress bars above the buttons ---------- */
.hero-dots { display: flex; gap: 8px; margin: 30px 0 22px; max-width: 320px; }
.hero-dot { flex: 1; min-width: 0; padding: 8px 0; border: 0; background: none; cursor: pointer; }
.hero-dot:hover .hero-dot-bar { background: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.hero-dot-bar { display: block; height: 3px; border-radius: 999px; background: var(--line); overflow: hidden; }
/* hero.js sets the fill (transform: scaleX) every frame */
.hero-dot-bar b { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.hero-dot.is-done .hero-dot-bar b { opacity: .45; }
.hero-copy.is-paused .hero-dot.is-active .hero-dot-bar b { box-shadow: 0 0 8px var(--accent); }   /* paused: a soft glow */
html:not(.js) .hero-dots { display: none; }

/* Phones: the floating pills line up under the text instead */
@media (max-width: 560px) {
  .hero-s1 { padding-block: 0; }
  .hero-s1 .hero-floats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
  .hero-float { position: static; transform: none; animation: none; }
  .hero-figure { height: 210px; }
  .forge-figure { display: flex; align-items: center; gap: 12px; }
  .forge-figure::before, .forge-canvas { width: 150px; height: 150px; flex: none; }
  .hero-s2 .hero-floats { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
  .td-window { width: 100%; height: 200px; }
  .td-picker { display: none; }                         /* keep the main picture on small phones */
  .resmon { grid-template-columns: 1fr; height: auto; }
  .rm-gauge { display: none; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); padding-block: 64px 40px; gap: 40px; }
}

/* ---------- Showcase (rotating covers) ---------- */
.showcase { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.showcase[hidden] { display: none; }

.showcase-stage {
  --sc-w: 460px;                                   /* center card width */
  position: relative; width: 100%;
  height: calc(var(--sc-w) * .5625 + 74px);        /* 16:9 cover + title */
  perspective: 1200px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  touch-action: pan-y;
}

.showcase-card {
  position: absolute; top: 4px; left: 50%;
  width: var(--sc-w);
  display: flex; flex-direction: column; gap: 12px;
  transform: translateX(-50%) translateZ(-420px) scale(.5);
  opacity: 0;
  transition: transform .75s cubic-bezier(.22, .8, .2, 1), opacity .75s ease, filter .75s ease;
  will-change: transform, opacity;
  user-select: none; -webkit-user-select: none;
}
.showcase-card[data-pos="0"]  { transform: translateX(-50%) translateZ(0) rotateY(0) scale(1); opacity: 1; z-index: 3; }
.showcase-card[data-pos="1"]  { transform: translateX(8%)    translateZ(-150px) rotateY(-30deg) scale(.84); opacity: .42; z-index: 2; filter: saturate(.55) brightness(.8); }
.showcase-card[data-pos="-1"] { transform: translateX(-108%) translateZ(-150px) rotateY(30deg)  scale(.84); opacity: .42; z-index: 2; filter: saturate(.55) brightness(.8); }
.showcase-card[data-pos="2"]  { transform: translateX(45%)   translateZ(-320px) rotateY(-42deg) scale(.68); opacity: 0; z-index: 1; }
.showcase-card[data-pos="-2"] { transform: translateX(-145%) translateZ(-320px) rotateY(42deg)  scale(.68); opacity: 0; z-index: 1; }
.showcase-card[data-pos="3"],
.showcase-card[data-pos="-3"] { pointer-events: none; }
.showcase-card:not([data-pos="0"]) { cursor: pointer; }

.showcase-media {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 16px; background: var(--surface-2);
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .8);
  transition: box-shadow .5s ease, border-color .5s ease;
}
.showcase-card[data-pos="0"] .showcase-media {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .85),
              0 0 40px -12px color-mix(in srgb, var(--accent) 55%, transparent);
}
.showcase-media img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.showcase-media.sk { height: auto; margin: 0; }
.showcase-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 44px; font-weight: 800; font-variation-settings: "wdth" 125;
  color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.showcase-badge {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 12px; font-weight: 800;
}

.showcase-title { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; padding: 0 8px; }
.showcase-title strong {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 17px; font-weight: 750; color: var(--text);
}
.showcase-title small {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--muted); font-size: 13px;
}
.showcase-card:not([data-pos="0"]) .showcase-title { opacity: 0; transition: opacity .3s ease; }

.showcase-bar { display: flex; align-items: center; gap: 12px; }
.showcase .cat-available { margin-top: 0; }

@media (max-width: 900px) {
  .showcase-stage { --sc-w: 420px; }
}
@media (max-width: 480px) {
  .showcase-stage { --sc-w: 300px; }
  .showcase-card[data-pos="1"]  { transform: translateX(14%)   translateZ(-150px) rotateY(-30deg) scale(.8); }
  .showcase-card[data-pos="-1"] { transform: translateX(-114%) translateZ(-150px) rotateY(30deg)  scale(.8); }
}

/* ---------- Live boxes: subscription / recent payments / top customer ---------- */
.hero-live { position: relative; z-index: 2; padding-bottom: 40px; }
.live-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.live-box {
  position: relative;
  display: flex; align-items: center; gap: 12px; min-width: 0;
  padding: 10px 16px 10px 10px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--text) 9%, transparent);
  background: color-mix(in srgb, var(--surface) 40%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: border-color .15s ease, background-color .15s ease;
}
.live-box:hover { z-index: 3; }
.live-box.is-link:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.live-icon {
  display: grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
.live-icon svg { display: block; }
.live-body { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.live-label { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.live-label-icon { display: inline-flex; color: var(--accent); }
.live-label-icon svg { width: 12px; height: 12px; fill: currentColor; }
.live-value { font-size: 14.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-meta { flex: none; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.live-arrow { display: grid; place-items: center; transition: transform .15s ease, color .15s ease; }
.live-box.is-link:hover .live-arrow { color: var(--accent); transform: translateX(2px); }

/* Subscription thumbnail + price */
.live-thumb {
  display: grid; place-items: center; flex: none; overflow: hidden;
  width: 44px; height: 44px; border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
.live-thumb.has-image { background: var(--surface-2); }
.live-thumb img { width: 100%; height: 100%; object-fit: cover; }
.live-price { display: flex; flex-direction: column; align-items: flex-end; flex: none; line-height: 1.2; }
.live-price b { font-size: 15px; font-weight: 800; color: var(--text); white-space: nowrap; }
.live-price s { font-size: 12px; color: var(--muted); }
.live-price small { font-size: 12px; color: var(--muted); }

/* Featured subscription box: gradient border, glow, ribbon, stars */
.live-box.is-featured {
  --feat-bg: linear-gradient(135deg,
               color-mix(in srgb, var(--accent) 20%, var(--bg)),
               color-mix(in srgb, var(--accent) 6%, var(--bg)) 65%);
  --feat-border: linear-gradient(135deg,
               var(--accent),
               color-mix(in srgb, var(--accent) 15%, transparent) 50%,
               var(--accent));
  overflow: hidden;
  padding-right: 48px;                 /* room for the ribbon */
  border: 1px solid transparent;
  background: var(--feat-bg) padding-box, var(--feat-border) border-box;
  box-shadow: 0 12px 40px -14px color-mix(in srgb, var(--accent) 60%, transparent);
  transition: box-shadow .2s ease, transform .2s ease;
}
.live-box.is-featured:hover {
  background: var(--feat-bg) padding-box, var(--feat-border) border-box;
  box-shadow: 0 16px 50px -10px color-mix(in srgb, var(--accent) 75%, transparent);
  transform: translateY(-2px);
}
.live-box.is-featured::after {                         /* light sweep */
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .16), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
  animation: live-shine 6s ease-in-out infinite;
}
.live-box.is-featured .live-thumb {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 65%, transparent),
              0 0 18px color-mix(in srgb, var(--accent) 45%, transparent);
}
.live-box.is-featured .live-price b { color: var(--accent); }
.live-box.is-featured .live-label { color: color-mix(in srgb, var(--accent) 70%, var(--text)); }

.live-ribbon {                                         /* corner ribbon */
  position: absolute; top: 13px; right: -33px; z-index: 2;
  width: 120px; padding: 3px 0;
  transform: rotate(45deg);
  background: var(--accent); color: var(--accent-ink);
  text-align: center; font-size: 10px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; line-height: 1.4;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
  pointer-events: none;
}

.live-spark {                                          /* twinkling stars */
  position: absolute; z-index: 1; pointer-events: none;
  color: #FFE0C2;
  animation: live-twinkle 2.6s ease-in-out infinite;
}
.live-spark svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.live-spark.s1 { width: 10px; height: 10px; top: 5px;    left: 50px; }
.live-spark.s2 { width: 7px;  height: 7px;  bottom: 7px; left: 40px;  animation-delay: .9s; }
.live-spark.s3 { width: 9px;  height: 9px;  top: 9px;    right: 70px; animation-delay: 1.7s; color: var(--accent); }

@keyframes live-shine {
  0%, 72% { left: -60%; }
  100%    { left: 130%; }
}
@keyframes live-twinkle {
  0%, 100% { opacity: 0; transform: scale(.4) rotate(0deg); }
  50%      { opacity: 1; transform: scale(1) rotate(45deg); }
}

/* Recent payments: avatar stack + hover card */
.live-avatars { display: flex; align-items: center; margin-top: 4px; padding-left: 8px; min-height: 30px; }
.live-avatars .live-value { margin-left: -8px; }
.live-avatar {
  position: relative; flex: none;
  width: 30px; height: 30px; margin-left: -8px; padding: 0;
  border-radius: 50%; border: 2px solid var(--bg);
  background: color-mix(in srgb, var(--accent) 24%, var(--surface-2));
  color: var(--accent); font-size: 12px; font-weight: 800; cursor: pointer;
  transition: transform .15s ease;
}
.live-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.live-avatar-initial { display: grid; place-items: center; width: 100%; height: 100%; }
.live-avatar:hover, .live-avatar:focus { z-index: 2; transform: translateY(-2px); outline: none; }
.live-avatar:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.live-more {
  margin-left: 8px; padding: 3px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 700;
}

.live-tip {
  position: absolute; left: 50%; bottom: calc(100% + 10px); z-index: 10;
  display: none; flex-direction: column; gap: 2px; min-width: 170px; max-width: 240px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line);
  box-shadow: 0 16px 32px -12px rgba(0, 0, 0, .6);
  transform: translateX(-50%);
  text-align: left; white-space: normal; cursor: default;
}
.live-tip::after {
  content: ""; position: absolute; left: 50%; top: 100%;
  border: 6px solid transparent; border-top-color: var(--line);
  transform: translateX(-50%);
}
.live-avatar:hover .live-tip, .live-avatar:focus .live-tip { display: flex; }
.live-tip strong { color: var(--text); font-size: 14px; font-weight: 700; }
.live-tip span { color: var(--text); font-size: 13px; font-weight: 500; opacity: .85; }
.live-tip em { color: var(--muted); font-size: 12px; font-style: normal; }

@media (max-width: 900px) {
  .live-strip { grid-template-columns: 1fr; gap: 8px; }
}


/* ==========================================================
   7. Homepage: features, featured scripts, reviews, FAQ
   ========================================================== */

/* ---------- Features ---------- */
/* Timeline: round icon nodes joined by a line (with a light running along it),
   a numbered card under each node. Below 1080px it turns into a vertical timeline. */
.features { border-bottom: 1px solid var(--line); padding-block: 60px 0; }
.features-grid {
  --gap: 22px;
  --node: 84px;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap);
}
.feature { position: relative; display: flex; flex-direction: column; align-items: center; }

/* Line from this node's center to the next node's center (one column + the gap) */
.feature::before {
  content: ""; position: absolute; z-index: 0;
  top: calc(var(--node) / 2); left: 50%; width: calc(100% + var(--gap)); height: 1px;
  background:
    linear-gradient(90deg, transparent, var(--accent), transparent) no-repeat,
    color-mix(in srgb, var(--accent) 22%, var(--line));
  background-size: 35% 100%, 100% 100%;
  background-position: -50% 0, 0 0;
  animation: feature-flow 3.2s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * .35s);
}
.feature:last-child::before { display: none; }

/* ---------- Node ---------- */
.feature-node {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: var(--node); height: var(--node); margin-bottom: 30px;
}
.feature-node::after {                                 /* dashed stem down to the number */
  content: ""; position: absolute; left: 50%; top: 100%;
  width: 0; height: 30px;
  border-left: 1px dashed color-mix(in srgb, var(--accent) 35%, var(--line));
}

.feature-icon {
  position: relative; display: grid; place-items: center;
  width: 100%; height: 100%; border-radius: 50%;
  border: 1px solid transparent;
  background:
    radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--accent) 18%, var(--surface-2)), var(--surface) 70%) padding-box,
    linear-gradient(160deg, color-mix(in srgb, var(--accent) 75%, transparent), var(--line) 55%, color-mix(in srgb, var(--accent) 25%, transparent)) border-box;
  color: var(--accent);
  box-shadow:
    0 0 0 6px var(--bg),                                   /* cuts the line around the circle */
    0 0 0 7px color-mix(in srgb, var(--accent) 14%, transparent),
    0 18px 36px -14px color-mix(in srgb, var(--accent) 55%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .07);
  transition: transform .45s cubic-bezier(.2, 1.4, .4, 1), color .25s ease, box-shadow .3s ease;
}
.feature-icon::before {                                /* orange fill on hover */
  content: ""; position: absolute; inset: -1px; border-radius: 50%;
  background: radial-gradient(90% 90% at 30% 20%, color-mix(in srgb, var(--accent) 70%, white), var(--accent) 55%, color-mix(in srgb, var(--accent) 78%, black));
  opacity: 0; transition: opacity .3s ease;
}
.feature-icon svg { position: relative; display: block; width: 28px; height: 28px; }
.feature:hover .feature-icon {
  color: var(--accent-ink); transform: translateY(-3px) scale(1.04);
  box-shadow:
    0 0 0 6px var(--bg),
    0 0 0 7px color-mix(in srgb, var(--accent) 45%, transparent),
    0 22px 44px -12px color-mix(in srgb, var(--accent) 75%, transparent);
}
.feature:hover .feature-icon::before { opacity: 1; }

/* ---------- Card ---------- */
.feature-card {
  --mx: 50%; --my: 0%;
  position: relative; isolation: isolate;
  display: flex; flex-direction: column; align-items: center; flex: 1;
  width: 100%; padding: 34px 18px 22px; text-align: center;
  border: 1px solid transparent; border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, var(--surface-2), var(--surface) 70%) padding-box,
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 35%, var(--line)), var(--line) 45%) border-box;
  box-shadow: 0 24px 44px -32px rgba(0, 0, 0, .9);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease;
}
.feature-card::after {                                 /* mouse spotlight (app.js sets --mx / --my) */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(220px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 15%, transparent), transparent 70%);
  opacity: 0; transition: opacity .35s ease;
}
.feature:hover .feature-card {
  transform: translateY(-3px);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent),
    0 28px 48px -28px color-mix(in srgb, var(--accent) 45%, transparent);
}
.feature:hover .feature-card::after { opacity: 1; }

/* Number badge sitting on the card's top edge */
.feature-num {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 75%, white), var(--accent) 60%);
  color: var(--accent-ink);
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .02em;
  box-shadow: 0 0 0 4px var(--bg), 0 8px 20px -6px color-mix(in srgb, var(--accent) 80%, transparent);
  transition: transform .4s cubic-bezier(.2, 1.4, .4, 1);
}
.feature:hover .feature-num { transform: translate(-50%, -50%) scale(1.1); }

.feature-title {
  margin: 0;
  font-size: 13px; font-weight: 800; line-height: 1.35;
  letter-spacing: .14em; text-transform: uppercase;
  font-variation-settings: "wdth" 112;
  text-wrap: balance;
}
.feature-rule {
  display: block; width: 26px; height: 2px; margin: 14px 0; border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 70%, transparent);
  transition: width .35s cubic-bezier(.2, .8, .2, 1);
}
.feature:hover .feature-rule { width: 46px; }
.feature-text { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.6; text-wrap: pretty; }

/* Small chip at the bottom */
.feature-tag {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: auto; height: 24px; padding: 0 10px;
  border-radius: 999px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--text) 3%, transparent);
  color: color-mix(in srgb, var(--text) 85%, transparent);
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .03em; white-space: nowrap;
  transition: border-color .25s ease;
}
.feature-tag::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; flex: none;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
}
.feature:hover .feature-tag { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }

/* Items rise in one by one when the section scrolls into view (app.js sets data-reveal, then .is-in) */
.features-grid[data-reveal]:not(.is-in) .feature { opacity: 0; }
.features-grid.is-in .feature { animation: feature-in .7s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 110ms); }
@keyframes feature-in {
  from { opacity: 0; transform: translateY(22px); }
}
@keyframes feature-flow {
  0%   { background-position: -50% 0, 0 0; }
  70%, 100% { background-position: 150% 0, 0 0; }
}

/* ---------- Vertical timeline (tablets + phones) ---------- */
@media (max-width: 1080px) {
  .features-grid { --node: 64px; --gap: 18px; grid-template-columns: 1fr; max-width: 640px; margin-inline: auto; }
  .feature { flex-direction: row; align-items: stretch; gap: 22px; }
  .feature-node { flex: none; margin: 0; }
  .feature::before {                                   /* vertical line down to the next node */
    top: calc(var(--node) / 2); left: calc(var(--node) / 2); width: 1px; height: calc(100% + var(--gap));
    background:
      linear-gradient(180deg, transparent, var(--accent), transparent) no-repeat,
      color-mix(in srgb, var(--accent) 22%, var(--line));
    background-size: 100% 35%, 100% 100%;
    animation-name: feature-flow-y;
  }
  .feature-node::after { display: none; }
  .feature-icon svg { width: 24px; height: 24px; }
  .feature-card { align-items: flex-start; text-align: left; padding: 22px 20px 20px 30px; }
  .feature-num { top: 50%; left: 0; transform: translate(-50%, -50%); width: 32px; height: 32px; font-size: 11px; }
  .feature:hover .feature-num { transform: translate(-50%, -50%) scale(1.1); }
  .feature-rule { margin: 10px 0 12px; }
}
@keyframes feature-flow-y {
  0%   { background-position: 0 -50%, 0 0; }
  70%, 100% { background-position: 0 150%, 0 0; }
}

/* Framework row */
.frameworks {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px;
  margin-top: 40px; padding-bottom: 22px;
}
.frameworks-text { margin: 0; color: var(--muted); font-size: 15px; }
.frameworks-text strong { color: var(--text); font-weight: 650; }
.frameworks-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.framework {
  display: inline-flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-weight: 700; font-size: 14px;
}
.framework img { height: 24px; width: auto; max-width: 90px; object-fit: contain; }

@media (max-width: 760px) {
  .frameworks { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 420px) {
  .features-grid { --node: 52px; --gap: 14px; }
  .feature { gap: 18px; }
  .feature-icon svg { width: 20px; height: 20px; }
  .feature-card { padding: 18px 16px 16px 26px; }
  .feature-num { width: 28px; height: 28px; font-size: 10.5px; }
}

/* ---------- Featured scripts (newest releases) ---------- */
/* Card size shared by the two drifting rows (Featured scripts + reviews) so they line up */
:root { --row-card-w: 320px; --row-card-gap: 16px; }
@media (max-width: 700px) { :root { --row-card-w: 270px; --row-card-gap: 12px; } }

.latest { padding-block: 72px 16px; }

/* One row; app.js repeats the cards and adds .is-running so it drifts slowly to the left.
   Each card carries its own right margin, so both halves of the loop are exactly the same width. */
.latest-viewport {
  --card-w: var(--row-card-w);
  --card-gap: var(--row-card-gap);
  overflow: hidden;
  padding-block: 6px 10px;                             /* room for the hover lift */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent);
}
.latest-track { display: flex; width: max-content; }
.latest-viewport.is-running .latest-track { animation: latest-scroll var(--latest-dur, 60s) linear infinite; }
.latest-viewport.is-running:hover .latest-track,
.latest-viewport.is-running:focus-within .latest-track { animation-play-state: paused; }
@keyframes latest-scroll { to { transform: translateX(-50%); } }

/* Reduced motion: a normal row you can scroll by hand */
.latest-viewport.is-static { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; -webkit-mask-image: none; mask-image: none; }
.latest-viewport.is-static .latest-card { scroll-snap-align: start; }

/* ---------- Card ---------- */
.latest-card {
  position: relative; flex: none;
  display: flex; flex-direction: column;
  width: var(--card-w); margin-right: var(--card-gap);
  overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .2s ease, transform .25s ease;
}
.latest-card:not(.is-skeleton):hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  transform: translateY(-3px);
}

/* Cover: the whole image is shown (contain), a soft blurred copy fills the sides */
.latest-cover {
  position: relative; overflow: hidden; flex: none;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.latest-cover::before {
  content: ""; position: absolute; inset: -20px;
  background: var(--cover, none) center / cover no-repeat;
  filter: blur(18px) saturate(1.1); opacity: .45;
}
.latest-cover img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain;
  transition: transform .5s ease;
}
.latest-card:hover .latest-cover img { transform: scale(1.03); }
.latest-cover-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 34px; font-weight: 800; font-variation-settings: "wdth" 125;
  color: color-mix(in srgb, var(--accent) 30%, transparent);
}
.latest-badge {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  padding: 3px 8px; border-radius: 6px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  color: var(--text); font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
}
.latest-badge.is-sale { background: var(--accent); color: var(--accent-ink); }

/* Info */
.latest-info { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 14px 16px 14px; }
.latest-name {
  margin: 0 0 6px; padding-bottom: 1px; font-size: 15.5px; font-weight: 700; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.latest-name a::after { content: ""; position: absolute; inset: 0; z-index: 1; }   /* whole card is clickable */
.latest-desc {
  margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: calc(13px * 1.5 * 2);                    /* same height with a one-line description */
}
.latest-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: auto; padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  margin-inline: -16px; padding-inline: 16px;
}
.latest-price { display: flex; align-items: baseline; gap: 8px; line-height: 1.2; }
.latest-price s { color: var(--muted); font-size: 12.5px; }
.latest-price b { font-size: 16px; font-weight: 750; white-space: nowrap; }
.latest-add {
  position: relative; z-index: 2;                      /* sits above the card link */
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 32px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  font-size: 13px; font-weight: 650;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.latest-add svg { width: 15px; height: 15px; }
.latest-add:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Skeleton */
.latest-card.is-skeleton { pointer-events: none; }
.latest-card.is-skeleton .latest-cover::before { inset: 0; filter: none; opacity: 1; }
.latest-card.is-skeleton .latest-info { gap: 2px; }

.latest-more { display: flex; justify-content: center; margin-top: 24px; }

@media (max-width: 700px) {
  .latest { padding-block: 56px 8px; }
}

/* ---------- Customer reviews ---------- */
.reviews { padding-block: 72px 16px; }

.reviews-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.reviews-score { font-size: 28px; font-weight: 800; line-height: 1; font-variation-settings: "wdth" 115; }
.reviews-count { color: var(--muted); font-size: 14.5px; }
.reviews-count .text-link { margin-left: 6px; }

.review-stars { display: inline-flex; gap: 3px; color: var(--accent); }
.review-stars svg { fill: currentColor; }
.review-stars svg.is-empty { fill: var(--line); }

/* One row; app.js repeats the reviews and adds .is-running so it drifts slowly to the left
   (same idea as Featured scripts). Each card carries its own right margin for a seamless loop. */
.reviews-viewport {
  --review-w: var(--row-card-w);
  --review-gap: var(--row-card-gap);
  overflow: hidden;
  padding-block: 4px 8px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent);
}
.reviews-track { display: flex; align-items: flex-start; width: max-content; }
.reviews-viewport.is-running .reviews-track { animation: latest-scroll var(--reviews-dur, 80s) linear infinite; }
.reviews-viewport.is-running:hover .reviews-track,
.reviews-viewport.is-running:focus-within .reviews-track { animation-play-state: paused; }

/* Reduced motion: a normal row you can scroll by hand */
.reviews-viewport.is-static { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; -webkit-mask-image: none; mask-image: none; }
.reviews-viewport.is-static .review { scroll-snap-align: start; }

/* ---------- Card: stars, message, then who wrote it ---------- */
.review {
  position: relative; flex: none;
  display: flex; flex-direction: column;
  width: var(--review-w); margin-right: var(--review-gap);
  padding: 20px 22px 18px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .2s ease;
}
.review:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.review::before {                                      /* faint quote mark */
  content: "\201C"; position: absolute; top: 8px; right: 18px;
  font-size: 64px; line-height: 1; font-weight: 800; font-family: Georgia, serif;
  color: color-mix(in srgb, var(--accent) 14%, transparent);
  pointer-events: none;
}
.review > .review-stars { margin-bottom: 12px; }

/* Message: always exactly 4 lines tall, longer ones end with "…" (keeps every card the same size) */
.review-text {
  --lh: 1.6em;
  height: calc(var(--lh) * 4); margin-bottom: 16px;
  color: #E3D8D1; font-size: 14.5px; line-height: var(--lh);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

/* Avatar + name at the bottom */
.review-head {
  display: flex; align-items: center; gap: 12px;
  margin-top: auto; padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.review-head .avatar { width: 38px; height: 38px; font-size: 14px; }
.review-who { min-width: 0; }
.review-name { font-weight: 700; font-size: 14.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-meta { margin-top: 2px; color: var(--muted); font-size: 12.5px; }


@media (max-width: 700px) {
  .reviews { padding-block: 56px 8px; }
}

/* ---------- F.A.Q. ---------- */
.faq { padding-block: 72px 16px; }
.faq-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.6fr); gap: 48px; align-items: start; }
.faq-intro { position: sticky; top: 104px; }

.faq-help {
  margin-top: 28px; padding: 20px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: var(--radius-lg);
}
.faq-help-title { font-weight: 750; font-size: 16px; }
.faq-help p { margin: 4px 0 16px; color: var(--muted); font-size: 14.5px; }

.faq-list { display: grid; gap: 10px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-md);
  transition: border-color .2s ease, background-color .2s ease;
}
.faq-item:hover { border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.faq-item.is-open {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  background: var(--surface-2);
}

.faq-q { margin: 0; }
.faq-q button {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; padding: 18px 20px;
  background: none; border: 0; cursor: pointer; text-align: left;
  color: var(--text); font-size: 16px; font-weight: 700; line-height: 1.35;
}
.faq-icon {
  display: grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  transition: transform .3s ease, background-color .2s ease, color .2s ease;
}
.faq-item.is-open .faq-icon { transform: rotate(45deg); background: var(--accent); color: var(--accent-ink); }

/* Smooth open / close */
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s ease; }
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-a-inner { overflow: hidden; }
.faq-a-inner p {
  margin: 0; padding: 0 20px 20px; max-width: 68ch;
  color: var(--muted); font-size: 15px; line-height: 1.65;
  opacity: 0; transform: translateY(-4px);
  transition: opacity .25s ease, transform .25s ease;
}
.faq-item.is-open .faq-a-inner p { opacity: 1; transform: none; transition-delay: .06s; }
.faq-a-inner a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.faq-tag {
  display: inline-block; padding: 1px 7px; border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent); font-family: var(--mono); font-size: 12.5px; font-weight: 600;
}

/* Without JS every answer stays readable */
html:not(.js) .faq-a { grid-template-rows: 1fr; }
html:not(.js) .faq-a-inner p { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .faq-layout { grid-template-columns: 1fr; gap: 24px; }
  .faq-intro { position: static; }
}
@media (max-width: 600px) {
  .faq { padding-block: 56px 8px; }
  .faq-q button { padding: 16px; font-size: 15px; }
  .faq-a-inner p { padding: 0 16px 16px; }
}


/* ==========================================================
   8. Floating Discord support (bottom-right, homepage)
   ========================================================== */
.dc-float {
  position: fixed; right: 24px; bottom: 24px; z-index: 70;
  display: flex; flex-direction: column; align-items: flex-end; gap: 9px;
  pointer-events: none;                            /* only the bubble and button catch clicks */
}
.dc-float > * { pointer-events: auto; }

/* Round button */
.dc-fab {
  position: relative; display: grid; place-items: center;
  width: 46px; height: 46px; border: 0; border-radius: 50%; cursor: pointer;
  background: #5865F2; color: #fff;
  box-shadow: 0 14px 30px -10px rgba(88, 101, 242, .75), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .2s ease, background-color .15s ease, box-shadow .2s ease;
  animation: dc-in .5s cubic-bezier(.2, 1.3, .3, 1) 1s both;
}
.dc-fab svg { width: 22px; height: 22px; transition: transform .25s ease; }
.dc-fab:hover {
  background: #4752C4; transform: translateY(-2px) scale(1.04);
  box-shadow: 0 18px 36px -10px rgba(88, 101, 242, .9), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.dc-float.is-open .dc-fab svg { transform: rotate(-8deg) scale(.92); }
.dc-fab-dot {
  position: absolute; top: 2px; right: 2px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--good); border: 2px solid var(--bg);
}
.dc-fab-dot::after {
  content: ""; position: absolute; inset: -2.5px; border-radius: 50%; background: var(--good);
  animation: cat-ping 1.8s cubic-bezier(0, 0, .2, 1) infinite;
}

/* Speech bubble */
.dc-bubble {
  position: relative; width: min(230px, calc(100vw - 32px));
  padding: 13px 13px 12px;
  border-radius: 14px 14px 5px 14px;               /* points at the button */
  background: color-mix(in srgb, #5865F2 10%, var(--surface));
  border: 1px solid color-mix(in srgb, #5865F2 40%, var(--line));
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .8);
  opacity: 0; visibility: hidden;
  transform: translateY(10px) scale(.96); transform-origin: bottom right;
  transition: opacity .25s ease, transform .3s cubic-bezier(.2, 1.2, .3, 1), visibility 0s linear .3s;
}
.dc-float.is-open .dc-bubble {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .25s ease, transform .3s cubic-bezier(.2, 1.2, .3, 1), visibility 0s;
}
.dc-bubble-x {
  position: absolute; top: 7px; right: 7px;
  display: grid; place-items: center; width: 22px; height: 22px;
  border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer;
  transition: color .15s ease, background-color .15s ease;
}
.dc-bubble-x svg { width: 11px; height: 11px; }
.dc-bubble-x:hover { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }

.dc-bubble-head { display: flex; align-items: center; gap: 9px; padding-right: 20px; }
.dc-bubble-ico {
  display: grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 9px;
  background: #5865F2; color: #fff;
}
.dc-bubble-ico svg { width: 16px; height: 16px; }
.dc-bubble-head strong { display: block; font-size: 13px; line-height: 1.3; }
.dc-online { display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; color: var(--good); font-size: 11px; font-weight: 650; }
.dc-online[hidden] { display: none; }
.dc-online i { width: 6px; height: 6px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); }
.dc-online b { font-weight: 800; font-variant-numeric: tabular-nums; }

.dc-bubble p { margin: 8px 0 10px; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.dc-bubble-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; border-radius: 9px;
  background: #5865F2; color: #fff; font-size: 13px; font-weight: 700;
  transition: background-color .15s ease, transform .15s ease;
}
.dc-bubble-btn svg { width: 15px; height: 15px; }
.dc-bubble-btn:hover { background: #4752C4; transform: translateY(-1px); }

@keyframes dc-in {
  from { opacity: 0; transform: translateY(20px) scale(.4); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 600px) {
  .dc-float { right: 16px; bottom: 16px; }
  .dc-fab { width: 42px; height: 42px; }
  .dc-fab svg { width: 20px; height: 20px; }
}


/* ==========================================================
   9. Category page
   ========================================================== */

/* ---------- Header: title, count, framework tabs ---------- */
.cat-head { padding-block: 36px 4px; }
.cat-head .crumbs { margin-bottom: 14px; }

.cat-head-center { display: flex; flex-direction: column; align-items: center; text-align: center; }
.cat-head-center .crumbs { justify-content: center; }

.cat-head-title {
  margin: 0;
  font-size: clamp(2.8rem, 6.5vw, 5rem); line-height: .95; font-weight: 800;
  letter-spacing: -.025em; font-variation-settings: "wdth" 125;
  background: linear-gradient(180deg, var(--text) 35%, color-mix(in srgb, var(--accent) 65%, var(--text)) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: cat-rise .7s cubic-bezier(.2, .8, .2, 1) both;
}

/* ---------- Toolbar: search, quick filters, sort ---------- */
.cat-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-top: 24px; padding: 10px; border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
[data-cat-toolbar][hidden] { display: none; }

/* Search */
.cat-search { position: relative; display: flex; align-items: center; flex: 1 1 280px; }
.cat-search-ico { position: absolute; left: 14px; display: flex; color: var(--muted); pointer-events: none; }
.cat-search input {
  width: 100%; height: 44px; padding: 0 48px 0 42px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--bg);
  outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.cat-search input::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
.cat-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.cat-search input:focus + kbd { opacity: 0; }
.cat-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.cat-search kbd {
  position: absolute; right: 12px; padding: 1px 8px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font-family: var(--mono); font-size: 12px;
  pointer-events: none; transition: opacity .15s ease;
}
.cat-search.has-value kbd { display: none; }
.cat-search-clear {
  position: absolute; right: 8px; display: grid; place-items: center;
  width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: var(--surface-2); color: var(--muted); cursor: pointer;
}
.cat-search-clear:hover { color: var(--text); }
.cat-search-clear[hidden] { display: none; }
.cat-search-clear svg { width: 14px; height: 14px; }

/* Quick filters */
.cat-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-chip {
  height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent;
  color: var(--muted); font-size: 13.5px; font-weight: 650;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.cat-chip:hover { color: var(--text); border-color: var(--muted); }
.cat-chip[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  color: var(--accent);
}

/* Sort */
.cat-sort { position: relative; display: flex; align-items: center; margin-left: auto; }
.cat-sort select {
  height: 44px; padding: 0 40px 0 40px; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  border-radius: 12px; border: 1px solid var(--line); background: var(--bg);
  color: var(--text); font-size: 14px; font-weight: 600;
  outline: none; transition: border-color .15s ease;
}
.cat-sort select:hover, .cat-sort select:focus { border-color: var(--accent); }
.cat-sort select option { background: var(--surface); color: var(--text); }
.cat-sort-ico { position: absolute; left: 14px; display: flex; color: var(--accent); pointer-events: none; }
.cat-sort-chev { position: absolute; right: 14px; display: flex; color: var(--muted); pointer-events: none; }

@media (max-width: 760px) {
  .cat-toolbar { flex-direction: column; align-items: stretch; }
  .cat-search { flex-basis: auto; }
  .cat-sort { margin-left: 0; }
  .cat-sort select { width: 100%; }
  .cat-search kbd { display: none; }
}

/* ---------- Product cards ---------- */
.category-body { padding-block: 24px 96px; }
.pcard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pcard-grid[hidden] { display: none; }

.pcard {
  position: relative; display: flex; flex-direction: column;
  padding: 10px; border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.pcard[hidden] { display: none; }
.pcard:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  transform: translateY(-3px);
  box-shadow: 0 22px 44px -24px rgba(0, 0, 0, .8);
}

/* Cover */
.pcard-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: var(--surface-2); }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.pcard:hover .pcard-media img { transform: scale(1.04); }
.pcard-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 40px; font-weight: 800; font-variation-settings: "wdth" 125;
  color: color-mix(in srgb, var(--accent) 30%, transparent);
}
.pcard-sale {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 13px; font-weight: 800;
}

/* Body */
.pcard-body { display: flex; flex-direction: column; flex: 1; padding: 14px 8px 6px; }
/* Title always takes 2 lines (longer ones end with "…"), so the description, tags and price
   start at the same height on every card in a row */
.pcard-title {
  margin: 0 0 6px; font-size: 18px; font-weight: 750; line-height: 1.3;
  height: calc(1.3em * 2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pcard-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }   /* whole card clickable */
.pcard-desc {
  margin: 0; min-height: calc(1.55em * 2);
  color: var(--muted); font-size: 14.5px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Tags (also used on the package page and in the basket) */
.pcard-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.pcard-tag {
  padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: #D6CBC4; font-size: 12.5px; font-weight: 650;
}
.pcard-tag.is-open {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent);
}
.pcard-tags[hidden] { display: none; }

/* Card tags from the description lines (app.js) */
.pcard-tag { display: inline-flex; align-items: center; gap: 6px; }
.pcard-tag.is-gold {                                   /* Free, Open Source, Subscription */
  position: relative; overflow: hidden;
  border-color: color-mix(in srgb, #F5C451 60%, transparent);
  background: linear-gradient(135deg, #FFE7A3, #F5C451 45%, #D9962B);
  color: #3A2504; font-weight: 800;
  box-shadow: 0 4px 14px -6px rgba(245, 196, 81, .7), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.pcard-tag.is-gold::after {                            /* soft shine passing over now and then */
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg);
  animation: gold-shine 4.5s ease-in-out infinite;
}
@keyframes gold-shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }
.pcard-tag.is-fw img {                                 /* framework logo next to the name */
  width: 17px; height: 17px; margin-left: -3px; flex: none; object-fit: contain; border-radius: 4px;
}
.pcard-tag.is-own { background: transparent; color: var(--muted); }

/* Price + button */
.pcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 18px; }
.pcard-price { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; line-height: 1.2; }
.pcard-price s { flex-basis: 100%; color: var(--muted); font-size: 12.5px; }
.pcard-cur { color: var(--muted); font-size: 13px; font-weight: 700; }
.pcard-price strong { font-size: 20px; font-weight: 800; }
.pcard-btn {
  position: relative; z-index: 2;            /* above the card link */
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  height: 40px; padding: 0 18px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text); font-size: 14px; font-weight: 700;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.pcard-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pcard-btn.is-added { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }
.pcard-btn.is-added:hover { background: var(--good); border-color: var(--good); color: #062012; }
.pcard-btn.is-disabled { opacity: .5; cursor: not-allowed; }
.pcard-btn.is-disabled:hover { background: var(--surface-2); border-color: var(--line); color: var(--text); }

/* "All scripts" page: skeleton cards while loading */
.pcard.is-skeleton { pointer-events: none; }
.pcard.is-skeleton:hover { transform: none; box-shadow: none; border-color: color-mix(in srgb, var(--text) 8%, transparent); }
.pcard-media.sk { height: auto; margin: 0; border-radius: 12px; }
.pcard.is-skeleton .pcard-body { gap: 4px; }

/* Search / filters found nothing */
.cat-noresults {
  padding: 72px 24px; text-align: center;
  border: 1px dashed var(--line); border-radius: 18px;
}
.cat-noresults[hidden] { display: none; }
.cat-noresults h2 { margin: 0 0 6px; font-size: 24px; font-variation-settings: "wdth" 115; }
.cat-noresults p { margin: 0 0 20px; color: var(--muted); }

@media (max-width: 1080px) { .pcard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .pcard-grid { grid-template-columns: 1fr; gap: 14px; } }


/* ==========================================================
   10. Package page
   ========================================================== */
.pkg-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 56px; padding: 40px 0 96px; align-items: start; }

/* ---------- Gallery slider ---------- */
.pkg-gallery { min-width: 0; }
.gallery-main {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line);
  outline: none; touch-action: pan-y;
}
.gallery-main:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.gallery-track { display: flex; height: 100%; transition: transform .5s cubic-bezier(.22, .8, .2, 1); }
.gallery-slide { position: relative; flex: 0 0 100%; height: 100%; }
.gallery-slide > img { width: 100%; height: 100%; object-fit: cover; }
.gallery-slide iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Video poster + play button */
.gallery-play { position: absolute; inset: 0; display: grid; place-items: center; padding: 0; border: 0; background: #000; cursor: pointer; }
.gallery-play img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.7); transition: filter .25s ease, transform .5s ease; }
.gallery-play:hover img { filter: brightness(.55); transform: scale(1.02); }
.gallery-play-btn {
  position: relative; display: grid; place-items: center;
  width: 78px; height: 78px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 22%, transparent),
              0 18px 40px -10px color-mix(in srgb, var(--accent) 70%, transparent);
  transition: transform .2s ease;
}
.gallery-play-btn svg { width: 30px; height: 30px; margin-left: 4px; }
.gallery-play:hover .gallery-play-btn { transform: scale(1.08); }
.gallery-play-btn::after {                             /* soft pulse ring */
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
  animation: play-pulse 2s ease-out infinite;
}
@keyframes play-pulse {
  from { transform: scale(.9); opacity: .9; }
  to   { transform: scale(1.35); opacity: 0; }
}
.gallery-play-label {
  position: absolute; left: 16px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid color-mix(in srgb, var(--text) 15%, transparent);
  color: var(--text); font-size: 13px; font-weight: 700;
}
.gallery-play-label svg { width: 12px; height: 12px; color: var(--accent); }
.gallery-slide.is-playing .gallery-play { display: none; }

/* Arrows + counter */
.gallery-nav {
  position: absolute; top: 50%; z-index: 2;
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid color-mix(in srgb, var(--text) 15%, transparent);
  color: var(--text); cursor: pointer;
  opacity: 0; transform: translateY(-50%) scale(.9);
  transition: opacity .2s ease, transform .2s ease, background-color .15s ease, color .15s ease;
}
.gallery-nav.is-prev { left: 14px; }
.gallery-nav.is-next { right: 14px; }
.gallery-nav[hidden] { display: none; }
.gallery-main:hover .gallery-nav, .gallery-main:focus-within .gallery-nav { opacity: 1; transform: translateY(-50%) scale(1); }
.gallery-nav:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
@media (hover: none) { .gallery-nav { opacity: 1; transform: translateY(-50%) scale(1); } }
.gallery-counter {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  padding: 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--text); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.gallery-counter[hidden] { display: none; }

/* Thumbnail strip */
.gallery-thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.gallery-thumbs[hidden] { display: none; }
.gallery-thumbs button {
  position: relative; aspect-ratio: 16 / 10; padding: 0; overflow: hidden; cursor: pointer;
  border-radius: var(--radius-sm); border: 2px solid transparent; background: var(--surface);
  opacity: .6; transition: opacity .15s ease, border-color .15s ease;
}
.gallery-thumbs button:hover { opacity: 1; }
.gallery-thumbs button.is-active { opacity: 1; border-color: var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumb-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
}
.thumb-play svg { width: 12px; height: 12px; margin-left: 2px; }

/* ---------- Description ---------- */
.pkg-desc { margin-top: 48px; }
.pkg-desc > :first-child { margin-top: 0; }

/* ---------- Buy box ---------- */
/* Card with a warm glow at the top and a thin orange edge that fades down */
.buybox {
  position: sticky; top: 96px;
  padding: 26px;
  border: 1px solid transparent; border-radius: 22px;
  background:
    radial-gradient(120% 60% at 100% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%) padding-box,
    linear-gradient(180deg, var(--surface-2), var(--surface) 40%) padding-box,
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 45%, var(--line)), var(--line) 35%) border-box;
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, .9);
}

/* Badges row: gold tags + sale */
.bb-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
.bb-badges[hidden] { display: none; }
.bb-gold { margin: 0; }
.bb-sale {
  padding: 3px 10px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 12.5px; font-weight: 800;
}

.buybox-title { margin: 0 0 10px; font-size: 30px; line-height: 1.08; font-weight: 800; font-variation-settings: "wdth" 115; text-wrap: balance; }
.bb-summary {
  margin: 0 0 14px; color: var(--muted); font-size: 15px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.bb-summary[hidden] { display: none; }
.buybox-tags { margin: 0; }
.bb-sep { height: 1px; margin: 20px 0 18px; background: linear-gradient(90deg, var(--line), transparent); }

/* Price */
.buybox-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.buybox-price .now {
  font-size: 38px; font-weight: 800; line-height: 1.05; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums; font-variation-settings: "wdth" 110;
  color: var(--text);
}
.buybox-price .now small { margin-right: 2px; font-size: 15px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.buybox-price .was { color: var(--muted); font-size: 15px; text-decoration: line-through; }
.buybox-price .save {
  padding: 2px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--good) 14%, transparent);
  color: var(--good); font-size: 12.5px; font-weight: 750;
}
.bb-note { margin: 6px 0 18px; color: var(--muted); font-size: 13.5px; }

/* Buttons */
.bb-buy { display: grid; gap: 10px; }
.bb-main {
  position: relative; overflow: hidden;
  height: 54px; border-radius: 14px; font-size: 16px; font-weight: 750;
  color: var(--accent-ink);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 78%, white), var(--accent) 45%, color-mix(in srgb, var(--accent) 82%, black));
  box-shadow: 0 14px 30px -12px color-mix(in srgb, var(--accent) 85%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .15s ease, box-shadow .2s ease;
}
.bb-main::after {                                      /* light sweep */
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-20deg); animation: live-shine 5s ease-in-out infinite;
}
.bb-main:hover { transform: translateY(-1px); box-shadow: 0 18px 36px -12px color-mix(in srgb, var(--accent) 95%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35); }
.bb-main svg { flex: none; }
.bb-main.is-added { background: color-mix(in srgb, var(--good) 85%, black); color: #052012; box-shadow: none; }
.bb-main.is-added::after { display: none; }
.bb-buy .btn-ghost { height: 46px; border-radius: 14px; }

.bb-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.bb-actions[hidden] { display: none; }
.bb-actions.is-single { grid-template-columns: 1fr; }
.bb-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 12px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 50%, transparent);
  color: var(--text); font-size: 14px; font-weight: 650;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.bb-action[hidden] { display: none; }
.bb-action svg { width: 16px; height: 16px; color: var(--accent); }
.bb-action:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, transparent); }

/* Included in the subscription */
.bb-sub {
  display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, #F5C451 12%, transparent), transparent 70%);
  border: 1px solid color-mix(in srgb, #F5C451 40%, var(--line));
  transition: border-color .15s ease, transform .15s ease;
}
.bb-sub[hidden] { display: none; }
.bb-sub:hover { border-color: #F5C451; transform: translateY(-1px); }
.bb-sub-ico {
  display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #FFE7A3, #F5C451 50%, #D9962B); color: #3A2504;
}
.bb-sub-ico svg { width: 20px; height: 20px; }
.bb-sub-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.bb-sub-text strong { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bb-sub-text small { color: var(--muted); font-size: 12.5px; }
.bb-sub-arrow { display: grid; color: #F5C451; transition: transform .15s ease; }
.bb-sub:hover .bb-sub-arrow { transform: translateX(2px); }

/* Perks: 2 x 2 */
.bb-perks { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; margin: 20px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); list-style: none; }
.bb-perks li { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.bb-perks svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--accent); }
.bb-perks span { display: flex; flex-direction: column; min-width: 0; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.bb-perks strong { color: var(--text); font-size: 13.5px; font-weight: 700; }
.bb-perks a { color: var(--accent); font-weight: 600; }
.bb-perks a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* How delivery works */
.bb-details {
  margin-top: 16px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line));
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}
.bb-details summary {
  display: flex; align-items: center; gap: 8px; padding: 11px 14px; cursor: pointer; list-style: none;
  font-size: 13.5px; font-weight: 700;
}
.bb-details summary::-webkit-details-marker { display: none; }
.bb-details summary svg:first-child { width: 16px; height: 16px; color: var(--accent); }
.bb-details-chev { margin-left: auto; color: var(--muted); transition: transform .2s ease; }
.bb-details[open] .bb-details-chev { transform: rotate(180deg); }
.bb-details ol { margin: 0; padding: 0 14px 14px 34px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.bb-details li + li { margin-top: 6px; }
.bb-details strong { color: var(--text); }
.bb-details a { color: var(--accent); font-weight: 600; }

@media (max-width: 420px) {
  .buybox { padding: 20px; }
  .bb-perks { grid-template-columns: 1fr; }
}
.buybox-reason {                                       /* why it can't be bought right now */
  margin: 10px 0 0; padding: 10px 12px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--bad) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent);
  color: #FCA5A5; font-size: 14px; line-height: 1.5;
}


@media (max-width: 900px) {
  .pkg-layout { grid-template-columns: 1fr; }
  .buybox { position: static; }
}


/* ==========================================================
   11. Basket
   ========================================================== */
.bk { padding-block: 32px 96px; }
.bk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }

/* ---------- Items ---------- */
.bk-items { display: grid; gap: 12px; }
.bk-item {
  display: grid; grid-template-columns: 168px minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 10px; border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
  transition: border-color .2s ease, background-color .2s ease;
  animation: cat-rise .5s cubic-bezier(.2, .8, .2, 1) both;
}
.bk-item:nth-child(2) { animation-delay: .06s; }
.bk-item:nth-child(3) { animation-delay: .12s; }
.bk-item:nth-child(n + 4) { animation-delay: .18s; }
.bk-item:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--surface) 75%, transparent);
}
.bk-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: var(--surface-2); }
.bk-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.bk-item:hover .bk-thumb img { transform: scale(1.04); }
.bk-thumb-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 26px; font-weight: 800; font-variation-settings: "wdth" 125;
  color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.bk-info { min-width: 0; padding: 4px 0; }
.bk-name {
  font-size: 17px; font-weight: 750; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color .15s ease;
}
.bk-name:hover { color: var(--accent); }
.bk-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.bk-tags:empty { display: none; }
.bk-options { list-style: none; margin: 8px 0 0; padding: 0; color: var(--muted); font-size: 13.5px; }
.bk-options strong { color: var(--text); font-weight: 600; }

.bk-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; padding-right: 8px; }
.bk-price { font-size: 20px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bk-price small { font-size: 13px; font-weight: 700; color: var(--muted); }
.bk-remove {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
  font-size: 13px; font-weight: 650;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.bk-remove svg { width: 15px; height: 15px; }
.bk-remove:hover {
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 50%, transparent);
  background: color-mix(in srgb, var(--bad) 8%, transparent);
}
.bk-continue {
  justify-self: start; display: inline-flex; align-items: center; gap: 6px; margin-top: 6px;
  color: var(--muted); font-size: 14px; font-weight: 600; transition: color .15s ease;
}
.bk-continue svg { width: 16px; height: 16px; }
.bk-continue:hover { color: var(--text); }

/* ---------- Summary ---------- */
.bk-summary {
  position: sticky; top: 96px;
  padding: 22px; border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: cat-rise .6s cubic-bezier(.2, .8, .2, 1) .1s both;
}
.bk-summary h2 { margin: 0 0 12px; font-size: 18px; font-weight: 750; }
.bk-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; color: var(--muted); font-size: 14.5px; }
.bk-row > span:last-child { color: var(--text); font-weight: 650; }

/* Coupons */
.bk-coupon-box { margin-top: 8px; }
.bk-coupon-form {
  position: relative; display: flex; align-items: center;
  height: 46px; padding: 4px 4px 4px 40px;
  border-radius: 12px; border: 1px dashed var(--line); background: var(--bg);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.bk-coupon-form:focus-within {
  border-style: solid; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.bk-coupon-ico { position: absolute; left: 13px; display: flex; color: var(--accent); pointer-events: none; }
.bk-coupon-form input {
  flex: 1; min-width: 0; height: 100%; padding: 0 8px;
  border: 0; background: transparent; outline: none;
  font-family: var(--mono); font-size: 14px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
}
.bk-coupon-form input::placeholder {
  font-family: var(--font); letter-spacing: 0; text-transform: none; font-weight: 500;
  color: color-mix(in srgb, var(--muted) 80%, transparent);
}
.bk-coupon-form button {
  height: 100%; padding: 0 16px; border: 0; border-radius: 9px; cursor: pointer;
  background: var(--surface-2); color: var(--text);
  font-size: 14px; font-weight: 700;
  transition: background-color .15s ease, color .15s ease;
}
.bk-coupon-form button:hover { background: var(--accent); color: var(--accent-ink); }
.bk-coupon-form.is-loading button { opacity: .7; }

.bk-coupon-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.bk-coupon-tag {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 4px 0 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--good) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--good) 35%, transparent);
  color: var(--good);
  animation: cat-rise .4s cubic-bezier(.2, .8, .2, 1) both;
}
.bk-coupon-tag > svg { width: 15px; height: 15px; flex: none; }
.bk-coupon-tag strong { color: var(--text); font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: .03em; }
.bk-coupon-tag span { font-size: 12.5px; font-weight: 750; }
.bk-coupon-tag a {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  color: var(--muted); transition: color .15s ease, background-color .15s ease;
}
.bk-coupon-tag a:hover { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }

/* Total + pay */
.bk-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 10px 0 18px; padding-top: 16px; border-top: 1px dashed var(--line);
}
.bk-total > span { font-weight: 700; }
.bk-total strong {
  font-size: 30px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--good) 75%, var(--text));
}
.bk-total small { font-size: 14px; font-weight: 700; color: var(--muted); }

.bk-pay { width: 100%; height: 54px; font-size: 16px; cursor: pointer; }
.bk-pay[disabled] { opacity: .75; pointer-events: none; }
.bk-note { margin: 10px 0 0; text-align: center; color: var(--muted); font-size: 12.5px; }

.bk-trust { display: grid; gap: 10px; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); list-style: none; }
.bk-trust li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; }
.bk-trust svg { flex: none; width: 17px; height: 17px; color: var(--accent); }

/* Discord community card */
.discord-card {
  margin-top: 16px; padding: 16px;
  border: 1px dashed color-mix(in srgb, #5865F2 55%, var(--line));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, #5865F2 7%, transparent);
}
.discord-card-head { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.discord-card-head svg { color: #8B95FF; flex: none; }
.discord-card p { margin: 8px 0 14px; color: var(--muted); font-size: 14px; line-height: 1.55; }

/* ---------- Empty basket ---------- */
.bk-empty {
  max-width: 540px; margin: 16px auto 0; padding: 56px 28px; text-align: center;
  border: 1px dashed var(--line); border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 35%, transparent);
}
.bk-empty-ico {
  display: inline-grid; place-items: center;
  width: 76px; height: 76px; margin-bottom: 18px; border-radius: 22px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--accent);
  animation: cat-rise .7s cubic-bezier(.2, .8, .2, 1) both;
}
.bk-empty h2 { margin: 0 0 8px; font-size: 26px; font-variation-settings: "wdth" 115; }
.bk-empty p { max-width: 40ch; margin: 0 auto 24px; color: var(--muted); }
.bk-empty-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

@media (max-width: 960px) {
  .bk-layout { grid-template-columns: 1fr; }
  .bk-summary { position: static; }
}
@media (max-width: 600px) {
  .bk-item { grid-template-columns: 110px minmax(0, 1fr); gap: 14px; }
  .bk-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; padding: 0 4px 2px; }
}


/* ==========================================================
   12. Options page
   ========================================================== */
.auth-card { max-width: 480px; margin: 72px auto 120px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 36px; }
.auth-card h1 { margin: 0 0 8px; font-size: 30px; font-variation-settings: "wdth" 118; }
.auth-card p { margin: 0 0 26px; color: var(--muted); }
.options-card { max-width: 520px; }

/* Auto-skip screen */
.skip-card { text-align: center; padding-block: 44px; }
.skip-card h1 { font-size: 24px; margin-top: 18px; }
.skip-card p { margin-bottom: 0; }
.skip-spinner {
  display: inline-block; width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--accent);
  animation: skip-spin .8s linear infinite;
}
@keyframes skip-spin { to { transform: rotate(360deg); } }

/* Discord account box */
.discord-status {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--radius-md);
  background: color-mix(in srgb, #5865F2 8%, transparent);
  border: 1px solid color-mix(in srgb, #5865F2 35%, var(--line));
}
.discord-status.is-linked {
  background: color-mix(in srgb, var(--good) 8%, transparent);
  border-color: color-mix(in srgb, var(--good) 35%, var(--line));
}
.discord-status-icon {
  display: grid; place-items: center; flex: none;
  width: 38px; height: 38px; border-radius: 10px;
  background: #5865F2; color: #fff;
}
.discord-status svg { color: #fff; }
.discord-status strong { display: block; font-size: 15px; }
.discord-status div > span { display: flex; justify-content: center; margin-top: 2px; color: var(--muted); font-size: 14px; line-height: 1.5; }

.options-actions { display: grid; gap: 10px; margin-top: 8px; }
.options-change {
  justify-self: center; padding: 4px;
  color: var(--muted); font-size: 14px;
  text-decoration: underline; text-underline-offset: 3px;
}
.options-change:hover { color: var(--text); }


/* ==========================================================
   13. Sign in page
   ========================================================== */
.signin {
  display: flex; flex-direction: column; align-items: center;
  padding-block: 64px 96px;
}
.signin-card {
  position: relative; overflow: hidden;
  width: 100%; max-width: 460px; padding: 40px 32px 28px;
  text-align: center;
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  border: 1px solid color-mix(in srgb, var(--text) 9%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8);
  animation: cat-rise .6s cubic-bezier(.2, .8, .2, 1) both;
}
.signin-card::before {                                 /* warm glow behind the logo */
  content: ""; position: absolute; left: 50%; top: -120px;
  width: 340px; height: 240px; transform: translateX(-50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 28%, transparent), transparent);
  pointer-events: none;
}

.signin-logo {
  position: relative; display: inline-grid; place-items: center;
  width: 76px; height: 76px; margin-bottom: 20px; border-radius: 22px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--accent);
  box-shadow: 0 0 40px -8px color-mix(in srgb, var(--accent) 60%, transparent);
}
.signin-logo img { width: 52px; height: 52px; object-fit: contain; }
.signin-logo svg { width: 34px; height: 34px; }

.signin-title {
  position: relative; margin: 0 0 10px;
  font-size: clamp(1.8rem, 4vw, 2.3rem); line-height: 1.05; font-weight: 800;
  letter-spacing: -.015em; font-variation-settings: "wdth" 118;
  background: linear-gradient(180deg, var(--text) 35%, color-mix(in srgb, var(--accent) 65%, var(--text)) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.signin-text { position: relative; max-width: 34ch; margin: 0 auto 26px; color: var(--muted); font-size: 15px; }

.signin-btn { width: 100%; height: 54px; font-size: 16px; cursor: pointer; }
.signin-form { display: grid; gap: 10px; }
.signin-form .input { height: 50px; text-align: center; font-weight: 600; }

/* 3-step strip */
.signin-steps {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr);
  margin: 30px 0 0; padding: 22px 0 0; list-style: none;
  border-top: 1px solid var(--line);
}
.signin-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 650; }
.signin-steps li + li::before {                       /* connector line */
  content: ""; position: absolute; top: 19px; right: calc(50% + 26px); width: calc(100% - 52px); height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--line));
  background-size: 200% 100%; background-position: 100% 0;
  animation: signin-line 1.2s ease .5s forwards;
}
.signin-steps li:nth-child(3)::before { animation-delay: .9s; }
@keyframes signin-line { to { background-position: 0 0; } }

.signin-step-ico {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
}
.signin-step-ico svg { width: 18px; height: 18px; }
.signin-steps li.is-current { color: var(--text); }
.signin-steps li.is-current .signin-step-ico {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  color: var(--accent);
}

.signin-note {
  display: flex; align-items: flex-start; justify-content: center; gap: 8px;
  margin: 24px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; text-align: left;
}
.signin-note svg { flex: none; margin-top: 1px; color: var(--good); }

.signin-back {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 20px;
  color: var(--muted); font-size: 14px; font-weight: 600; transition: color .15s ease;
}
.signin-back:hover { color: var(--text); }

@media (max-width: 480px) {
  .signin { padding-block: 40px 72px; }
  .signin-card { padding: 32px 20px 24px; }
}


/* ==========================================================
   14. CMS pages (About, Terms, Privacy...)
   ========================================================== */
.cms-title { font-size: clamp(2.4rem, 5.5vw, 4.2rem); }
.cms-meta svg { color: var(--accent); flex: none; }

.cms { padding-block: 32px 96px; }
.cms-layout { display: grid; grid-template-columns: minmax(0, 1fr); }
.cms-layout.has-toc { grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }

.cms-body {
  width: 100%; max-width: 820px; margin: 0 auto; padding: 40px 48px;
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
  animation: cat-rise .6s cubic-bezier(.2, .8, .2, 1) .1s both;
}
.cms-layout.has-toc .cms-body { margin: 0; }

.cms-content { max-width: none; font-size: 16px; line-height: 1.75; }
.cms-content > :first-child { margin-top: 0; }
.cms-content p { margin: 0 0 1.1em; }
.cms-content h2 { font-size: 24px; }
.cms-content h2:not(:first-child) { margin-top: 2.2em; padding-top: 1.4em; border-top: 1px solid var(--line); }
.cms-content h2, .cms-content h3 { scroll-margin-top: 100px; }

/* Table of contents */
.cms-toc { position: sticky; top: 96px; animation: cat-rise .6s cubic-bezier(.2, .8, .2, 1) .2s both; }
.cms-toc[hidden] { display: none; }
.cms-toc-box {
  padding: 16px; border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
}
.cms-toc-box summary {
  display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
  color: var(--text); font-size: 14px; font-weight: 750;
}
.cms-toc-box summary::-webkit-details-marker { display: none; }
.cms-toc-box summary svg { color: var(--accent); }
.cms-toc-list {
  display: grid; gap: 2px; margin: 14px 0 0; padding: 0; list-style: none;
  border-left: 2px solid var(--line);
  max-height: calc(100vh - 220px); overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.cms-toc-list a {
  display: block; margin-left: -2px; padding: 6px 12px;
  border-left: 2px solid transparent;
  color: var(--muted); font-size: 13.5px; line-height: 1.4;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.cms-toc-list li.is-sub a { padding-left: 24px; font-size: 13px; }
.cms-toc-list a:hover { color: var(--text); }
.cms-toc-list a.is-active {
  color: var(--accent); border-left-color: var(--accent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent);
}

/* Help card */
.cms-help {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 820px; margin: 24px auto 0; padding: 20px 24px; border-radius: 18px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
}
.cms-layout.has-toc + .cms-help { max-width: none; margin-left: calc(260px + 32px); }
.cms-help strong { display: block; font-size: 16px; }
.cms-help p { margin: 2px 0 0; color: var(--muted); font-size: 14.5px; }

/* ---------- Updates page: GitHub releases as a timeline (app.js) ---------- */
.upd { max-width: 860px; padding-block: 28px 96px; }
.upd-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 30px; }
.upd-filters[hidden] { display: none; }

/* A line down the left, a dot per update, month labels on the line */
.upd-timeline { position: relative; padding-left: 34px; }
.upd-timeline[hidden] { display: none; }
.upd-timeline::before {
  content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 25%, var(--line)) 30%, var(--line));
}
.upd-month {
  position: relative; margin: 6px 0 14px -34px; padding-left: 34px;
  color: var(--muted); font-size: 12.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase;
}
.upd-month:not(:first-child) { margin-top: 34px; }
.upd-month::before {                                   /* small square on the line */
  content: ""; position: absolute; left: 5px; top: 50%; width: 10px; height: 10px; margin-top: -5px;
  border-radius: 3px; background: var(--bg); border: 2px solid var(--line); transform: rotate(45deg);
}

.upd-item { position: relative; margin-bottom: 16px; animation: cat-rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.upd-dot {
  position: absolute; left: -31px; top: 22px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--bg), 0 0 12px color-mix(in srgb, var(--accent) 60%, transparent);
}
.upd-timeline > .upd-month:first-child + .upd-item .upd-dot { background: var(--accent); }   /* the newest one */

.upd-card {
  padding: 18px 20px; border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border: 1px solid var(--line);
  transition: border-color .2s ease;
}
.upd-item:hover .upd-card { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.upd-item.is-skeleton .upd-card { display: grid; gap: 4px; }
.upd-item.is-skeleton .upd-dot { border-color: var(--line); box-shadow: 0 0 0 4px var(--bg); }

.upd-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.upd-script { margin: 0; font-size: 17px; font-weight: 750; line-height: 1.3; }
.upd-version {
  padding: 2px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--accent); font-family: var(--mono); font-size: 12px; font-weight: 700;
}
.upd-pre { padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 11.5px; font-weight: 700; }
.upd-date { margin-left: auto; color: var(--muted); font-size: 12.5px; white-space: nowrap; }

/* Release notes */
.upd-notes { max-width: none; margin-top: 12px; font-size: 14.5px; line-height: 1.6; }
.upd-notes > :first-child { margin-top: 0; }
.upd-notes p { margin: 0 0 .7em; }
.upd-notes ul, .upd-notes ol { margin: 0 0 .8em; }
.upd-notes .upd-kind {                                 /* "Added", "Fixed"... as coloured labels */
  display: inline-flex; margin: 14px 0 6px; padding: 2px 9px; border-radius: 6px;
  background: var(--surface-2); color: var(--text);
  font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.upd-notes .upd-kind.is-added    { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }
.upd-notes .upd-kind.is-fixed    { background: color-mix(in srgb, #60A5FA 15%, transparent); color: #93C5FD; }
.upd-notes .upd-kind.is-changed  { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.upd-notes .upd-kind.is-removed  { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.upd-notes .upd-kind.is-security { background: color-mix(in srgb, #F5C451 18%, transparent); color: #F5C451; }
/* Images and image tables from the release notes (GitHub-style HTML) */
.upd-notes img {
  display: inline-block; max-width: 100%; height: auto; max-height: 380px; width: auto;
  border-radius: 10px; border: 1px solid var(--line); vertical-align: middle;
  transition: transform .2s ease, border-color .2s ease;
}
.upd-notes a:hover img { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.upd-notes a:has(img) { text-decoration: none; }
.upd-notes table { display: table; width: auto; max-width: 100%; margin: 12px auto; border-collapse: separate; border-spacing: 10px; }
.upd-notes th, .upd-notes td { border: 0; padding: 0; vertical-align: top; }
.upd-notes td[align="center"], .upd-notes th[align="center"], .upd-notes [align="center"] { text-align: center; }
.upd-notes sub { display: inline-block; margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.upd-notes p[align="center"], .upd-notes div[align="center"] { text-align: center; }
@media (max-width: 600px) {
  .upd-notes table, .upd-notes tbody, .upd-notes tr, .upd-notes td { display: block; width: 100%; }   /* stack the images */
  .upd-notes table { border-spacing: 0; }
  .upd-notes td + td, .upd-notes tr + tr { margin-top: 12px; }
}
.upd-link { display: inline-block; margin-top: 6px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.upd-link:hover { color: var(--accent); }

.upd-more { display: flex; margin: 10px auto 0; }
.upd-more[hidden] { display: none; }
.upd-empty { padding: 56px 24px; text-align: center; border: 1px dashed var(--line); border-radius: 18px; }
.upd-empty[hidden] { display: none; }
.upd-empty h2 { margin: 0 0 6px; font-size: 22px; font-variation-settings: "wdth" 115; }
.upd-empty p { margin: 0 0 18px; color: var(--muted); }

@media (max-width: 600px) {
  .upd-timeline { padding-left: 26px; }
  .upd-month { margin-left: -26px; padding-left: 26px; }
  .upd-dot { left: -23px; }
  .upd-timeline::before { left: 5px; }
  .upd-month::before { left: 1px; }
  .upd-card { padding: 16px; }
  .upd-date { margin-left: 0; width: 100%; }
}

/* ---------- Documentation page (links out to GitBook) ---------- */
.docs-lede { margin: 14px 0 0; color: var(--muted); font-size: 17px; animation: cat-rise .7s cubic-bezier(.2, .8, .2, 1) .1s both; }
.docs { max-width: 980px; padding-block: 32px 96px; }

/* Main card */
.docs-hero {
  position: relative; overflow: hidden;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 32px;
  padding: 32px; border-radius: 22px;
  background:
    radial-gradient(90% 140% at 0% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 60%),
    color-mix(in srgb, var(--surface) 75%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  animation: cat-rise .6s cubic-bezier(.2, .8, .2, 1) .1s both;
}
.docs-hero::before {                                   /* same map grid as the hero and footer */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px; opacity: .45;
  -webkit-mask-image: radial-gradient(ellipse 50% 120% at 0% 0%, #000 10%, transparent 70%);
          mask-image: radial-gradient(ellipse 50% 120% at 0% 0%, #000 10%, transparent 70%);
}
.docs-hero-main { position: relative; display: flex; align-items: flex-start; gap: 18px; flex: 1 1 360px; }
.docs-hero-ico {
  display: grid; place-items: center; flex: none;
  width: 54px; height: 54px; border-radius: 16px;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 12px 28px -10px color-mix(in srgb, var(--accent) 80%, transparent);
}
.docs-hero-ico svg { width: 26px; height: 26px; }
.docs-hero-title { margin: 0 0 6px; font-size: 24px; line-height: 1.15; font-weight: 800; font-variation-settings: "wdth" 115; }
.docs-hero-text { margin: 0 0 12px; max-width: 48ch; color: var(--muted); font-size: 15px; }
.docs-hero-url {
  display: inline-block; padding: 3px 10px; border-radius: 6px;
  background: color-mix(in srgb, var(--bg) 60%, transparent); border: 1px solid var(--line);
  color: var(--muted); font-family: var(--mono); font-size: 12.5px;
}
.docs-hero-actions { position: relative; display: flex; flex-wrap: wrap; gap: 10px; }

/* Sections */
.docs-block { margin-top: 48px; }
.docs-block-title { margin: 0 0 18px; font-size: 22px; font-weight: 800; font-variation-settings: "wdth" 115; }

/* 3 steps */
.docs-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: docs-step; }
.docs-step {
  position: relative; counter-increment: docs-step;
  padding: 22px 20px 20px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .2s ease, transform .25s ease;
}
.docs-step:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); transform: translateY(-2px); }
.docs-step::after {                                    /* big step number in the corner */
  content: "0" counter(docs-step); position: absolute; top: 16px; right: 18px;
  color: color-mix(in srgb, var(--muted) 45%, transparent);
  font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .06em;
}
.docs-step-ico {
  display: grid; place-items: center;
  width: 42px; height: 42px; margin-bottom: 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--accent);
}
.docs-step-ico svg { width: 20px; height: 20px; }
.docs-step h3 { margin: 0 0 6px; font-size: 16px; font-weight: 750; }
.docs-step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.docs-step a { color: var(--accent); font-weight: 600; }
.docs-step a:hover { text-decoration: underline; text-underline-offset: 3px; }
.docs-step code, .docs-fixes code {
  padding: 1px 6px; border-radius: 5px; background: var(--surface-2);
  color: var(--text); font-family: var(--mono); font-size: .88em;
}
.docs-step .docs-code {
  display: block; margin-top: 12px; padding: 9px 12px; border-radius: 8px;
  background: color-mix(in srgb, var(--bg) 80%, black); border: 1px solid var(--line);
  color: var(--accent); font-size: 13px;
}
.docs-step .docs-code::before { content: "$ "; color: var(--muted); }

.docs-help { max-width: none; margin-top: 40px; }

@media (max-width: 760px) {
  .docs-steps { grid-template-columns: 1fr; }
  .docs-hero { padding: 24px 20px; }
  .docs-hero-actions, .docs-hero-actions .btn { width: 100%; }
}

@media (max-width: 900px) {
  .cms-layout.has-toc { grid-template-columns: 1fr; gap: 16px; }
  .cms-toc { position: static; }
  .cms-body { padding: 26px 20px; }
  .cms-layout.has-toc + .cms-help { margin-left: 0; }
}


/* ==========================================================
   15. Footer
   ========================================================== */
.site-footer { position: relative; overflow: hidden; margin-top: 56px; border-top: 1px solid var(--line); }

/* ---------- Call to action ---------- */
.footer-cta {
  position: relative; overflow: hidden;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px;
  margin: 48px 0 56px; padding: 36px 40px; border-radius: 22px;
  background:
    radial-gradient(120% 160% at 100% 0%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 55%),
    color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
}
.footer-cta::before {                                  /* same map grid as the hero */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px; opacity: .5;
  -webkit-mask-image: radial-gradient(ellipse 60% 120% at 100% 0%, #000 10%, transparent 70%);
          mask-image: radial-gradient(ellipse 60% 120% at 100% 0%, #000 10%, transparent 70%);
}
.footer-cta-copy, .footer-cta-actions { position: relative; }
.footer-cta-title {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.08; font-weight: 800;
  letter-spacing: -.015em; font-variation-settings: "wdth" 120;
  background: linear-gradient(180deg, var(--text) 35%, color-mix(in srgb, var(--accent) 65%, var(--text)) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.footer-cta p { max-width: 52ch; margin: 0; color: var(--muted); }
.footer-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-discord svg { color: #8B95FF; }

/* ---------- Link columns ---------- */
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { max-width: 36ch; margin: 0 0 20px; color: var(--muted); font-size: 14.5px; }
.footer-grid h4 { margin: 4px 0 16px; font-size: 14px; font-weight: 750; color: var(--text); }
.footer-grid ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.footer-grid ul a {
  display: inline-block; color: var(--muted); font-size: 14.5px;
  transition: color .15s ease, transform .15s ease;
}
.footer-grid ul a:hover { color: var(--text); transform: translateX(3px); }

.footer-social { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-social a {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  transition: color .15s ease, border-color .15s ease, transform .15s ease;
}
.footer-social a:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  transform: translateY(-2px);
}

/* ---------- Bottom bar ---------- */
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  margin-top: 48px; padding: 20px 0;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13px;
}
.footer-bottom p { margin: 0; }
.footer-top {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font-size: 13px; font-weight: 650;
  transition: color .15s ease, border-color .15s ease;
}
.footer-top svg { width: 15px; height: 15px; }
.footer-top:hover { color: var(--text); border-color: var(--accent); }

/* ---------- Giant faded wordmark ---------- */
.footer-mark {
  margin-bottom: -.14em; text-align: center; white-space: nowrap;
  font-size: clamp(4rem, 15vw, 13rem); line-height: .85; font-weight: 800;
  letter-spacing: -.04em; font-variation-settings: "wdth" 125;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 22%, transparent), transparent 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  pointer-events: none; user-select: none;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .footer-cta { padding: 26px 22px; margin-bottom: 40px; }
  .footer-cta-actions, .footer-cta-actions .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}


/* ==========================================================
   16. Toast + thank-you screen
   ========================================================== */

/* ---------- Toast (messages from Tebex) ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; max-width: calc(100% - 32px);
  padding: 14px 18px; border-radius: var(--radius-md);
  background: var(--surface-2); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .5);
}
.toast.is-error, .toast.is-danger { border-left-color: var(--bad); }
.toast.is-success { border-left-color: var(--good); }
.toast button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1; }

/* ---------- Thank-you screen (after payment) ---------- */
.thanks { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.thanks-backdrop {
  position: absolute; inset: 0;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: thanks-fade .3s ease both;
}
.thanks-card {
  position: relative; width: 100%; max-width: 480px;
  max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto;
  padding: 36px 30px 26px; text-align: center; border-radius: 24px;
  background:
    radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .85);
  animation: thanks-in .55s cubic-bezier(.2, 1.2, .3, 1) both;
}
.thanks.is-closing .thanks-backdrop,
.thanks.is-closing .thanks-card { animation: thanks-out .25s ease forwards; }

.thanks-x {
  position: absolute; top: 14px; right: 14px;
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.thanks-x:hover { color: var(--text); border-color: var(--muted); }

/* Drawn check mark */
.thanks-check { width: 84px; height: 84px; margin: 0 auto 18px; }
.thanks-check svg { width: 100%; height: 100%; }
.thanks-check-circle {
  fill: color-mix(in srgb, var(--good) 12%, transparent);
  stroke: var(--good); stroke-width: 2.5;
  stroke-dasharray: 151; stroke-dashoffset: 151;
  animation: thanks-draw .6s ease .15s forwards;
}
.thanks-check-mark {
  fill: none; stroke: var(--good); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 36; stroke-dashoffset: 36;
  animation: thanks-draw .4s ease .65s forwards;
}

.thanks-title {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 4vw, 2.1rem); line-height: 1.1; font-weight: 800;
  letter-spacing: -.015em; font-variation-settings: "wdth" 118;
  background: linear-gradient(180deg, var(--text) 35%, color-mix(in srgb, var(--accent) 65%, var(--text)) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.thanks-text { max-width: 36ch; margin: 0 auto; color: var(--muted); font-size: 15px; }

/* Next steps */
.thanks-steps { display: grid; gap: 10px; margin: 22px 0; padding: 0; list-style: none; text-align: left; counter-reset: thanks-step; }
.thanks-steps li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  border: 1px solid var(--line);
  counter-increment: thanks-step;
}
.thanks-steps li::before {
  content: counter(thanks-step); flex: none;
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent); font-size: 13px; font-weight: 800;
}
.thanks-steps strong { display: block; font-size: 14.5px; line-height: 1.3; }
.thanks-steps span { display: block; margin-top: 2px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.thanks-steps a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.thanks-actions { display: grid; gap: 10px; }
.thanks-primary { width: 100%; height: 52px; font-size: 16px; }

/* Confetti burst */
.thanks-confetti { position: absolute; left: 50%; top: calc(50% - 170px); width: 0; height: 0; z-index: 1; pointer-events: none; }
.thanks-confetti i {
  position: absolute; width: 8px; height: 12px; border-radius: 2px; opacity: 0;
  animation: thanks-confetti 1.7s cubic-bezier(.15, .6, .3, 1) var(--d) forwards;
}

@keyframes thanks-in    { from { opacity: 0; transform: translateY(18px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes thanks-fade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes thanks-out   { to { opacity: 0; transform: scale(.98); } }
@keyframes thanks-draw  { to { stroke-dashoffset: 0; } }
@keyframes thanks-confetti {
  0%   { opacity: 1; transform: translate(0, 0) rotate(0deg); }
  45%  { opacity: 1; transform: translate(var(--x), var(--y)) rotate(calc(var(--r) * .5)); }
  100% { opacity: 0; transform: translate(calc(var(--x) * 1.25), 280px) rotate(var(--r)); }
}

@media (max-width: 480px) {
  .thanks-card { padding: 30px 20px 22px; }
}


/* ==========================================================
   17. Reduced motion
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .thanks-check-circle, .thanks-check-mark { stroke-dashoffset: 0; }   /* show the check without drawing it */
}