/* ==========================================================
   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; }
.prose del { color: var(--muted); }

/* Loading skeleton */
.latest-card.is-skeleton .latest-cover,
.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
   ========================================================== */
.announce {
  position: relative; overflow: hidden;
  background:
    radial-gradient(55% 160% at 50% 0%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%),
    linear-gradient(90deg,
      color-mix(in srgb, var(--accent) 8%, var(--bg)),
      color-mix(in srgb, var(--accent) 15%, var(--bg)) 50%,
      color-mix(in srgb, var(--accent) 8%, var(--bg)));
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  color: var(--text); font-size: 13.5px;
}
.announce::after {                                     /* glowing line drifting along the bottom edge */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent) no-repeat;
  background-size: 40% 100%;
  animation: announce-line 5s ease-in-out infinite alternate;
}
.announce-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px;
  min-height: 42px; padding-block: 6px; text-align: center;
}

/* "Limited offer" pill */
.announce-badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 9px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  animation: announce-pulse 2.4s ease-in-out infinite;
}
.announce-badge svg { width: 12px; height: 12px; fill: currentColor; }

.announce-text { font-weight: 650; }

/* Coupon chip */
.announce-code {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 8px 0 10px; border-radius: 7px; cursor: pointer;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 70%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-family: var(--mono); font-size: 12.5px; font-weight: 800; letter-spacing: .08em;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.announce-code svg { opacity: .8; }
.announce-code:hover { background: var(--accent); color: var(--accent-ink); border-style: solid; border-color: var(--accent); }
.announce-code.is-copied {
  color: var(--good); border-style: solid;
  border-color: color-mix(in srgb, var(--good) 60%, transparent);
  background: color-mix(in srgb, var(--good) 12%, transparent);
}

/* Countdown */
.announce-timer { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.announce-timer[hidden] { display: none; }
.announce-timer svg { color: var(--accent); }
.announce-timer b { color: var(--text); font-family: var(--mono); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Shop now */
.announce-cta { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-weight: 700; }
.announce-cta svg { transition: transform .15s ease; }
.announce-cta:hover { text-decoration: underline; text-underline-offset: 3px; }
.announce-cta:hover svg { transform: translateX(3px); }

@keyframes announce-line {
  from { background-position: 0% 0; }
  to   { background-position: 100% 0; }
}
@keyframes announce-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  50%      { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 0%, transparent); }
}

@media (max-width: 600px) {
  .announce { font-size: 12.5px; }
  .announce-inner { gap: 6px 10px; padding-block: 8px; }
}


/* ==========================================================
   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; }

.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; font-variation-settings: "wdth" 115; }
.brand img { height: 34px; width: auto; }

/* ---------- Main menu (pill) ---------- */
.nav {
  display: flex; align-items: center; gap: 2px; flex: 0 1 auto; overflow: visible;
  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 (Scripts > subcategories) */
.nav-drop-btn svg { transition: transform .15s ease; }
.nav-item.is-open .nav-drop-btn svg { transform: rotate(180deg); }
.nav-drop {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 50;
  display: none; min-width: 240px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, .6);
}
.nav-item.is-open .nav-drop { display: grid; }
@media (hover: hover) and (min-width: 1201px) {
  .nav-item:hover .nav-drop, .nav-item:focus-within .nav-drop { display: grid; }
  .nav-item:hover .nav-drop-btn svg { transform: rotate(180deg); }
  .nav-drop::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
}
.nav-drop a { padding: 10px 12px; border-radius: var(--radius-sm); color: var(--muted); font-size: 15px; }
.nav-drop a:hover, .nav-drop a.is-active { color: var(--text); background: var(--surface-2); }
.nav-drop .nav-drop-all { color: var(--accent); font-weight: 600; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius-sm) var(--radius-sm); margin-top: 4px; }

/* ---------- Right side: account, basket, YouTube ---------- */
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; 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; }
  .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 { position: static; box-shadow: none; border: 0; background: transparent; padding: 6px 0 6px 14px; min-width: 0; }
}
@media (max-width: 600px) {
  .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: .9fr 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; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 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 ---------- */
.features { border-bottom: 1px solid var(--line); padding-block: 48px 0; }
.features-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }

.feature {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 28px 22px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color .15s ease, background-color .15s ease;
}
.feature:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--surface-2);
}
.feature-icon {
  display: grid; place-items: center; flex: none;
  width: 52px; height: 52px; margin: 0 auto 18px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  color: var(--accent);
}
.feature-icon svg { display: block; width: 24px; height: 24px; }
.feature-title {
  margin: 0 0 10px;
  font-size: 14px; font-weight: 800; line-height: 1.3;
  letter-spacing: .05em; text-transform: uppercase;
  font-variation-settings: "wdth" 110;
  text-wrap: balance;
}
.feature-text { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; text-wrap: pretty; }

/* 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: 1080px) {
  .features-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .feature { padding: 22px 16px; }
  .frameworks { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 420px) {
  .features-grid { grid-template-columns: 1fr; }
}

/* ---------- Featured scripts (newest releases) ---------- */
.latest { padding-block: 72px 16px; }
.latest-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.latest-card {
  position: relative;
  display: grid; grid-template-columns: 42% minmax(0, 1fr);
  min-height: 200px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: border-color .15s ease, transform .2s ease, box-shadow .2s ease;
}
.latest-card:not(.is-skeleton):hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .7);
}

/* Cover */
.latest-cover { position: relative; overflow: hidden; background: var(--surface-2); border-right: 1px solid var(--line); }
.latest-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.latest-card:hover .latest-cover img { transform: scale(1.06); }
.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 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  color: var(--accent); font-size: 12px; font-weight: 750;
}
.latest-badge.is-sale { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* Info */
.latest-info { display: flex; flex-direction: column; min-width: 0; padding: 18px 18px 16px; }
.latest-name { margin: 0 0 6px; font-size: 17px; font-weight: 750; line-height: 1.25; }
.latest-name a::after { content: ""; position: absolute; inset: 0; z-index: 1; }   /* whole card is clickable */
.latest-desc {
  margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.latest-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; }
.latest-price { display: flex; flex-direction: column; line-height: 1.2; }
.latest-price s { color: var(--muted); font-size: 12.5px; }
.latest-price b { font-size: 18px; font-weight: 800; white-space: nowrap; }
.latest-add {
  position: relative; z-index: 2;            /* sits above the card link */
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  transition: transform .15s ease, background-color .15s ease;
}
.latest-add:hover { transform: scale(1.08); background: color-mix(in srgb, var(--accent) 86%, white); }

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

@media (max-width: 1180px) {
  .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .latest { padding-block: 56px 8px; }
  .latest-grid { grid-template-columns: 1fr; }
  .latest-card { grid-template-columns: 40% minmax(0, 1fr); min-height: 170px; }
  .latest-info { padding: 14px; }
}

/* ---------- 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); }

.reviews-nav { display: flex; gap: 8px; }
.reviews-btn {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  cursor: pointer; transition: border-color .15s ease, background-color .15s ease, opacity .15s ease;
}
.reviews-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.reviews-btn:disabled { opacity: .35; cursor: default; }
.reviews.no-scroll .reviews-nav { display: none; }

.reviews-track {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - 32px) / 3);
  gap: 16px; align-items: stretch;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; padding-bottom: 4px;
}
.reviews-track::-webkit-scrollbar { display: none; }
.review {
  position: relative; scroll-snap-align: start;
  display: flex; flex-direction: column;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.review::before {                               /* faint quote mark */
  content: "\201C"; position: absolute; top: 4px; right: 16px;
  font-size: 56px; line-height: 1; font-weight: 800;
  color: color-mix(in srgb, var(--accent) 16%, transparent);
  pointer-events: none;
}

/* Avatar + name + stars */
.review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding-right: 36px; }
.review-head .avatar { width: 42px; height: 42px; }
.review-who { min-width: 0; }
.review-name { font-weight: 700; font-size: 15.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; }
.review-product {
  padding: 1px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}

/* Message */
.review-text {
  color: #E3D8D1; font-size: 14.5px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.review.is-expanded .review-text { display: block; -webkit-line-clamp: unset; overflow: visible; }
.review-more {
  align-self: flex-start; margin-top: 6px; padding: 0;
  background: none; border: 0; cursor: pointer;
  color: var(--accent); font-size: 13.5px; font-weight: 650;
}
.review-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.review-more[hidden] { display: none; }

@media (max-width: 1080px) {
  .reviews-track { grid-auto-columns: calc((100% - 16px) / 2); }
}
@media (max-width: 700px) {
  .reviews { padding-block: 56px 8px; }
  .reviews-track { grid-auto-columns: 86%; }
  .reviews-nav { display: none; }
}

/* ---------- 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;
}

.cat-tabs {
  display: flex; gap: 4px; max-width: 100%; padding: 4px;
  border-radius: 999px; overflow-x: auto; scrollbar-width: none;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  border: 1px solid var(--line);
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-head-center .cat-tabs { margin-top: 22px; animation: cat-rise .7s cubic-bezier(.2, .8, .2, 1) .24s both; }
.cat-tab {
  padding: 8px 16px; border-radius: 999px; white-space: nowrap;
  color: var(--muted); font-size: 14px; font-weight: 650;
  transition: color .15s ease, background-color .15s ease;
}
.cat-tab:hover { color: var(--text); }
.cat-tab.is-active { background: var(--accent); color: var(--accent-ink); }

/* ---------- 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; }
.pcard-title { margin: 0 0 6px; font-size: 18px; font-weight: 750; line-height: 1.3; }
.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);
}

/* 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 ---------- */
.buybox {
  position: sticky; top: 96px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px;
}
.buybox-title { margin: 0 0 18px; font-size: 32px; line-height: 1.05; font-weight: 800; font-variation-settings: "wdth" 118; }
.buybox-tags { margin: -6px 0 20px; }

.buybox-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 24px; }
.buybox-price .now {
  font-size: 34px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--good) 75%, var(--text));
}
.buybox-price .now small { font-size: 15px; font-weight: 700; color: var(--muted); }
.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;
}

.buybox .btn + .btn { margin-top: 10px; }
.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;
}

.perks { list-style: none; margin: 26px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.perks li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; font-size: 15px; color: var(--muted); }
.perks li strong { display: block; color: var(--text); font-weight: 650; }
.perks svg { margin-top: 3px; color: var(--accent); }

@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-top: 8px; }
.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; }

@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 */
}