/* ==========================================================================
   Vega design system
   Dark night sky, one bright blue-white star.
   Fonts are chosen in Admin > Settings > Appearance (sets --font-display and --font).
   ========================================================================== */

@font-face { font-family: "Outfit"; src: url("../fonts/outfit.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus-jakarta-sans.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Sora"; src: url("../fonts/sora.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --night: #04070e;
  --deep: #080d1a;
  --panel: #0c1324;
  --panel-2: #101a30;
  --line: #18233c;
  --line-2: #22304f;
  --star: #f1f6ff;
  --text: #d5def0;
  --mist: #8794b2;
  --dim: #5b6784;
  --ice: #a8dcff;
  --ice-2: #66bdf6;
  --ice-ink: #04101f;
  --glow: rgba(168, 220, 255, 0.16);
  --ok: #67e0ae;
  --warn: #f3c975;
  --bad: #ff8590;
  --info: #9cc3ff;

  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Outfit", var(--font);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --nav-h: 68px; /* menu bar height */
  --hh: var(--nav-h); /* full header height incl. announcement, updated by JS */
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--ice); text-decoration: none; }
a:hover { color: var(--star); }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--ice); color: var(--ice-ink); }

h1, h2, h3, h4 { color: var(--star); font-family: var(--font-display); font-weight: 600; line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); letter-spacing: -0.035em; line-height: 1.02; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.015em; }
h4 { font-size: 1rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
small, .small { font-size: 0.85rem; }
.muted { color: var(--mist); }
.dim { color: var(--dim); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 0.92em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 20px; height: 20px; flex: none; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: var(--r);
  font: 500 0.95rem/1 var(--font); letter-spacing: -0.005em;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn-primary { background: var(--ice); color: var(--ice-ink); }
.btn-primary:hover { background: var(--star); color: var(--ice-ink); box-shadow: 0 0 0 4px var(--glow); }
.btn-ghost { background: transparent; color: var(--star); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ice); color: var(--star); }
.btn-quiet { background: var(--panel-2); color: var(--text); }
.btn-quiet:hover { background: var(--line-2); color: var(--star); }
.btn-danger { background: transparent; color: var(--bad); border-color: rgba(255,133,144,.35); }
.btn-danger:hover { background: rgba(255,133,144,.1); color: var(--bad); }
.btn-discord { background: #5865f2; color: #fff; }
.btn-discord:hover { background: #6b77f5; color: #fff; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 0.875rem; border-radius: var(--r-sm); }
.btn-lg { height: 50px; padding: 0 24px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--ice); font: inherit; cursor: pointer; }
.link-btn:hover { color: var(--star); }

/* ------------------------------------------------------------------ badges + alerts */
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 500; border: 1px solid currentColor; white-space: nowrap; }
.badge-ok { color: var(--ok); background: rgba(103,224,174,.08); border-color: rgba(103,224,174,.3); }
.badge-warn { color: var(--warn); background: rgba(243,201,117,.08); border-color: rgba(243,201,117,.3); }
.badge-bad { color: var(--bad); background: rgba(255,133,144,.08); border-color: rgba(255,133,144,.3); }
.badge-info { color: var(--info); background: rgba(156,195,255,.08); border-color: rgba(156,195,255,.3); }
.badge-mute { color: var(--mist); background: transparent; border-color: var(--line-2); }
.badge-star { color: var(--ice-ink); background: var(--ice); border-color: var(--ice); }

.alert { padding: 12px 16px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--panel); margin-bottom: 16px; font-size: 0.95rem; }
.alert-success { border-color: rgba(103,224,174,.35); color: #c9f5e1; }
.alert-error { border-color: rgba(255,133,144,.4); color: #ffd3d7; }
.alert-info { border-color: rgba(168,220,255,.35); color: #dcefff; }
.alert-warn { border-color: rgba(243,201,117,.4); color: #fbe9c4; }
.alert p:last-child { margin: 0; }

/* ------------------------------------------------------------------ forms */
.field { display: block; margin-bottom: 16px; }
.field > span, .label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--star); margin-bottom: 6px; }
.field .help { display: block; font-size: 0.8rem; color: var(--mist); margin-top: 6px; }
.form-heading { margin: 30px 0 4px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 1.05rem; }
.form-heading + p { margin: 0 0 14px; }
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field input[type=url], .field input[type=date], .field input[type=tel], .field select, .field textarea {
  width: 100%; height: 44px; padding: 0 12px; border-radius: var(--r);
  background: var(--deep); color: var(--star); border: 1px solid var(--line-2);
  font: 400 0.95rem/1.4 var(--font); transition: border-color .15s, box-shadow .15s;
}
.field textarea { height: auto; min-height: 120px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.field textarea.code { font-family: var(--mono); font-size: 0.85rem; min-height: 220px; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238794b2' stroke-width='1.6'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--ice); box-shadow: 0 0 0 3px var(--glow); }
.field input[type=color] { width: 56px; height: 40px; padding: 2px; border-radius: var(--r-sm); background: var(--deep); border: 1px solid var(--line-2); }
.check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; cursor: pointer; font-size: 0.95rem; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--ice-2); flex: none; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
@media (max-width: 640px) { .form-row, .form-row-3 { grid-template-columns: 1fr; } }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.err { color: var(--bad); font-size: 0.85rem; margin-top: 6px; display: block; }

/* ------------------------------------------------------------------ announcement + header */
.announce { background: var(--ice); color: var(--ice-ink); font-size: 0.875rem; font-weight: 500; text-align: center; padding: 8px var(--gutter); }
.announce a { color: var(--ice-ink); text-decoration: underline; }

.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 40; background: rgba(4,7,14,0); border-bottom: 1px solid transparent; }
.site-header.scrolled { background: linear-gradient(to bottom, rgba(4,7,14,.88), rgba(4,7,14,.6)); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); border-bottom-color: rgba(34,48,79,.6); }
.site-header .wrap { display: flex; align-items: center; height: var(--nav-h); gap: 28px; }
/* The header floats over the first section so the stars show through it */
.site-header ~ #main .hero { padding-top: calc(clamp(56px, 9vw, 112px) + var(--hh)); }
.site-header ~ #main .page-head { padding-top: calc(clamp(48px, 7vw, 88px) + var(--hh)); }
.site-header ~ #main .auth { min-height: 100vh; padding-top: calc(48px + var(--hh)); }
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 26px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav a { color: var(--mist); font-size: 0.93rem; font-weight: 500; padding: 8px 12px; border-radius: var(--r-sm); }
.nav a:hover, .nav a.active { color: var(--star); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: 0; color: var(--star); padding: 8px; margin-left: auto; cursor: pointer; }
@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav, .header-actions { display: none; }
  .site-header.open .nav, .site-header.open .header-actions { display: flex; }
  .site-header.open .wrap { flex-wrap: wrap; height: auto; padding-top: 14px; padding-bottom: 16px; }
  .site-header.open .brand { height: 40px; }
  .site-header.open .nav { order: 3; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; margin-top: 8px; }
  .site-header.open .nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-header.open .header-actions { order: 4; flex-basis: 100%; margin-top: 14px; }
  .site-header.open .header-actions .btn { flex: 1; }
}

/* ------------------------------------------------------------------ hero */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 112px) 0 clamp(56px, 8vw, 96px); }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { max-width: 13ch; margin-bottom: 22px; }
.hero .lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--mist); max-width: 50ch; margin-bottom: 32px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }

/* The star: one bright point with long diffraction spikes, the brand's single flourish */
.vega-star { position: absolute; pointer-events: none; width: 900px; height: 900px; right: -260px; top: -330px; }
.vega-star::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(241,246,255,.95) 0, rgba(200,232,255,.55) 3px, rgba(168,220,255,.22) 18px, rgba(102,189,246,.08) 80px, transparent 300px); }
.vega-star .spike { position: absolute; left: 50%; top: 50%; background: linear-gradient(90deg, transparent, rgba(200,232,255,.5) 48%, rgba(241,246,255,.9) 50%, rgba(200,232,255,.5) 52%, transparent); height: 1px; width: 760px; transform: translate(-50%, -50%); }
.vega-star .spike.v { transform: translate(-50%, -50%) rotate(90deg); }
.vega-star .spike.d1 { width: 260px; opacity: .35; transform: translate(-50%, -50%) rotate(45deg); }
.vega-star .spike.d2 { width: 260px; opacity: .35; transform: translate(-50%, -50%) rotate(-45deg); }
.vega-star { animation: twinkle 7s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .82; } }
@media (max-width: 900px) { .vega-star { right: -480px; top: -420px; } }

/* Hero meter: live cost of an hourly server since the page loaded */
.meter { position: relative; background: linear-gradient(180deg, rgba(16,26,48,.92), rgba(8,13,26,.92)); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 24px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.04); }
.meter-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.meter-head strong { color: var(--star); font-weight: 600; }
.meter-live { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--ok); }
.meter-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(103,224,174,.15); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(103,224,174,0); } }
.meter-cost { font-size: clamp(2.6rem, 5vw, 3.4rem); font-weight: 600; color: var(--star); letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.meter-sub { color: var(--mist); font-size: 0.9rem; margin-top: 10px; }
.meter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-top: 22px; }
.meter-grid div { background: var(--deep); padding: 12px 14px; }
.meter-grid span { display: block; font-size: 0.78rem; color: var(--mist); }
.meter-grid b { color: var(--star); font-weight: 500; font-variant-numeric: tabular-nums; }
.meter-foot { margin-top: 18px; font-size: 0.85rem; color: var(--mist); }

/* ------------------------------------------------------------------ sections */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-tight { padding: clamp(40px, 6vw, 72px) 0; }
.section-line { border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head h2 { margin: 0 0 8px; }
.section-head p { color: var(--mist); max-width: 56ch; margin: 0; }

.page-head { padding: clamp(48px, 7vw, 88px) 0 clamp(28px, 4vw, 44px); position: relative; overflow: hidden; }
.page-head h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); max-width: 20ch; }
.page-head .lede { color: var(--mist); font-size: 1.1rem; max-width: 60ch; margin: 0; }
.crumbs { font-size: 0.875rem; color: var(--mist); margin-bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--mist); }
.crumbs a:hover { color: var(--star); }

/* ------------------------------------------------------------------ games grid */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.game { position: relative; display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; background: var(--deep); border: 1px solid var(--line); color: var(--text); transition: border-color .2s, transform .2s; }
.game:hover { border-color: var(--line-2); color: var(--text); transform: translateY(-2px); }
.game-art { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--panel); }
.game-art img { width: 100%; height: 100%; object-fit: cover; }
.game-art .gen { position: absolute; inset: 0; background:
    radial-gradient(120% 90% at 85% 0%, color-mix(in srgb, var(--accent, #66bdf6) 55%, transparent) 0, transparent 60%),
    linear-gradient(160deg, color-mix(in srgb, var(--accent, #66bdf6) 22%, #0c1324) 0, #080d1a 100%); }
.game-art .gen b { position: absolute; left: 16px; bottom: -0.18em; font-size: 5.4rem; font-weight: 800; letter-spacing: -0.06em; line-height: 1; color: rgba(241,246,255,.1); white-space: nowrap; }
.game-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.game-body h3 { margin: 0; font-size: 1.05rem; }
.game-body p { margin: 0; color: var(--mist); font-size: 0.88rem; line-height: 1.45; }
.game-price { margin-top: auto; padding-top: 12px; display: flex; justify-content: space-between; align-items: baseline; font-size: 0.88rem; color: var(--mist); }
.game-price b { color: var(--star); font-weight: 600; font-size: 1rem; }
.game .badge { position: absolute; top: 12px; left: 12px; }

/* ------------------------------------------------------------------ plans */
.cycle-switch { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--deep); border: 1px solid var(--line-2); }
.cycle-switch button { height: 36px; padding: 0 16px; border-radius: 999px; border: 0; background: transparent; color: var(--mist); font: 500 0.9rem var(--font); cursor: pointer; }
.cycle-switch button:hover { color: var(--star); }
.cycle-switch button[aria-pressed=true] { background: var(--ice); color: var(--ice-ink); }
.cycle-switch .save { font-size: 0.75rem; opacity: .75; margin-left: 4px; }

.plans { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--deep); }
.plan { display: grid; grid-template-columns: minmax(170px, 1.2fr) minmax(0, 3fr) minmax(150px, auto) auto; align-items: center; gap: 24px; padding: 20px 24px; border-top: 1px solid var(--line); }
.plan:first-child { border-top: 0; }
.plan.featured { background: linear-gradient(90deg, rgba(168,220,255,.06), transparent 60%); box-shadow: inset 2px 0 0 var(--ice); }
.plan-name h3 { margin: 0 0 4px; font-size: 1.08rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plan-name p { margin: 0; color: var(--mist); font-size: 0.85rem; }
.plan-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px 20px; margin: 0; }
.plan-specs div { min-width: 0; }
.plan-specs dt { font-size: 0.75rem; color: var(--dim); }
.plan-specs dd { margin: 0; color: var(--star); font-size: 0.92rem; font-weight: 500; }
.plan-price { text-align: right; }
.plan-price .amt { color: var(--star); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.plan-price .unit { color: var(--mist); font-size: 0.9rem; }
.plan-price .alt { display: block; font-size: 0.8rem; color: var(--dim); }
.plan-price .na { color: var(--dim); font-size: 0.9rem; }
@media (max-width: 860px) {
  .plan { grid-template-columns: 1fr auto; gap: 14px 16px; }
  .plan-specs { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-price { grid-column: 1; grid-row: 3; text-align: left; }
  .plan .plan-cta { grid-column: 2; grid-row: 3; }
}

/* ------------------------------------------------------------------ features */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 48px; }
.feature { border-top: 1px solid var(--line-2); padding-top: 22px; }
.feature .icon { width: 26px; height: 26px; color: var(--ice); margin-bottom: 18px; }
.feature h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature p { color: var(--mist); margin: 0; font-size: 0.95rem; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* Product strip (VPS / Web) */
.products { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.product { display: block; padding: 28px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--deep); color: var(--text); position: relative; overflow: hidden; }
.product:hover { border-color: var(--line-2); color: var(--text); }
.product .icon { width: 28px; height: 28px; color: var(--ice); margin-bottom: 40px; }
.product h3 { font-size: 1.4rem; margin-bottom: 8px; }
.product p { color: var(--mist); margin: 0 0 18px; max-width: 42ch; }
.product .from { color: var(--star); font-weight: 500; }
@media (max-width: 760px) { .products { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; color: var(--star); font-weight: 500; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; background: linear-gradient(var(--mist), var(--mist)) center/12px 1.5px no-repeat, linear-gradient(var(--mist), var(--mist)) center/1.5px 12px no-repeat; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 40px 22px 0; color: var(--mist); max-width: 72ch; }
.faq .answer p:last-child { margin: 0; }
.faq-split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: 48px; }
@media (max-width: 860px) { .faq-split { grid-template-columns: 1fr; gap: 16px; } }

/* ------------------------------------------------------------------ CTA band */
.band { position: relative; overflow: hidden; border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: clamp(32px, 5vw, 56px); background: radial-gradient(70% 140% at 100% 0%, rgba(168,220,255,.14), transparent 60%), var(--deep); display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.band h2 { margin-bottom: 8px; }
.band p { color: var(--mist); margin: 0; max-width: 52ch; }

/* ------------------------------------------------------------------ prose (CMS pages) */
.prose { max-width: 72ch; color: var(--text); }
.prose h2 { font-size: 1.5rem; margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose img { border-radius: var(--r); margin: 1.5em 0; }
.prose code { font-family: var(--mono); font-size: 0.88em; background: var(--panel); padding: 2px 6px; border-radius: 4px; }

/* Game detail */
.game-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.game-hero .banner { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16/10; position: relative; background: var(--panel); }
.game-hero .banner img { width: 100%; height: 100%; object-fit: cover; }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .icon { width: 18px; height: 18px; color: var(--ice); margin-top: 3px; }
@media (max-width: 860px) { .game-hero { grid-template-columns: 1fr; gap: 28px; } }

/* ------------------------------------------------------------------ footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; margin-top: 40px; color: var(--mist); font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer-grid h4 { font-size: 0.9rem; color: var(--star); margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--mist); }
.footer-grid a:hover { color: var(--star); }
.footer-brand img { height: 24px; width: auto; margin-bottom: 16px; }
.footer-brand p { max-width: 34ch; }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 40px; padding-top: 24px; font-size: 0.85rem; color: var(--dim); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ------------------------------------------------------------------ auth pages */
.auth { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 48px var(--gutter); position: relative; overflow: hidden; }
.auth-card { width: 100%; max-width: 420px; position: relative; }
.auth-card h1 { font-size: 2rem; margin-bottom: 8px; }
.auth-card .lede { color: var(--mist); margin-bottom: 28px; }
.auth-card .panel { padding: 28px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 0.82rem; margin: 20px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.auth-alt { text-align: center; color: var(--mist); font-size: 0.92rem; margin-top: 20px; }

/* ------------------------------------------------------------------ panels, tables, stats (client + admin) */
.panel { background: var(--deep); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 1.1rem; letter-spacing: -0.015em; }
.panel-flush { padding: 0; overflow: hidden; }
.panel-flush .panel-head { padding: 18px 20px 0; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th { text-align: left; font-weight: 500; color: var(--mist); font-size: 0.8rem; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(255,255,255,.015); }
.table .r { text-align: right; }
.table a.row-link { color: var(--star); font-weight: 500; }
.table a.row-link:hover { color: var(--ice); }
.table .sub { display: block; color: var(--mist); font-size: 0.82rem; }
.empty { text-align: center; padding: 48px 24px; color: var(--mist); }
.empty .icon { width: 32px; height: 32px; margin: 0 auto 14px; color: var(--dim); }
.empty h3 { margin-bottom: 6px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { background: var(--deep); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; }
.stat span { display: block; color: var(--mist); font-size: 0.85rem; }
.stat b { display: block; color: var(--star); font-size: 1.7rem; font-weight: 600; letter-spacing: -0.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat small { color: var(--dim); }
.stat a { font-size: 0.85rem; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; font-size: 0.93rem; }
.kv dt { color: var(--mist); }
.kv dd { margin: 0; color: var(--star); min-width: 0; overflow-wrap: anywhere; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 960px) { .grid-2, .grid-main { grid-template-columns: 1fr; } }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--mist); font-weight: 500; font-size: 0.92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--star); }
.tabs a.active { color: var(--star); border-bottom-color: var(--ice); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .input { max-width: 300px; height: 38px; }
.toolbar select.input { width: auto; }
.pager { display: flex; gap: 6px; justify-content: flex-end; padding: 14px 16px; }

/* Ticket thread */
.thread { display: grid; gap: 14px; }
.msg { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--deep); padding: 18px 20px; }
.msg.staff { border-color: rgba(168,220,255,.25); background: linear-gradient(180deg, rgba(168,220,255,.05), transparent 80%), var(--deep); }
.msg-head { display: flex; justify-content: space-between; gap: 12px; font-size: 0.85rem; color: var(--mist); margin-bottom: 10px; flex-wrap: wrap; }
.msg-head strong { color: var(--star); font-weight: 500; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ app shell (client + admin) */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--line); background: var(--deep); padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; }
.sidebar .brand { padding: 4px 10px 22px; }
.sidebar .brand img { height: 24px; }
.sidebar .brand small { margin-left: 10px; color: var(--mist); font-size: 0.78rem; border: 1px solid var(--line-2); padding: 2px 8px; border-radius: 999px; }
.side-group { font-size: 0.75rem; color: var(--dim); padding: 16px 10px 6px; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--r-sm); color: var(--mist); font-size: 0.93rem; font-weight: 500; }
.side-link .icon { width: 18px; height: 18px; }
.side-link:hover { color: var(--star); background: var(--panel); }
.side-link.active { color: var(--star); background: var(--panel-2); }
.side-link.active .icon { color: var(--ice); }
.side-link .count { margin-left: auto; font-size: 0.75rem; background: var(--ice); color: var(--ice-ink); padding: 1px 7px; border-radius: 999px; font-weight: 600; }
.sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.who { display: flex; align-items: center; gap: 10px; padding: 8px 10px; font-size: 0.85rem; }
.who .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--panel-2); display: grid; place-items: center; color: var(--ice); font-weight: 600; font-size: 0.85rem; flex: none; overflow: hidden; }
.who .avatar img { width: 100%; height: 100%; object-fit: cover; }
.who b { display: block; color: var(--star); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.who span { color: var(--mist); font-size: 0.78rem; }

.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 16px; height: 64px; padding: 0 clamp(16px, 3vw, 36px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; background: rgba(4,7,14,.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.topbar h1 { font-size: 1.15rem; margin: 0; letter-spacing: -0.02em; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .balance { font-size: 0.88rem; color: var(--mist); display: flex; align-items: center; gap: 8px; }
.topbar .balance b { color: var(--star); font-weight: 600; font-variant-numeric: tabular-nums; }
.content { padding: clamp(20px, 3vw, 36px); max-width: 1280px; }
.side-toggle { display: none; background: none; border: 0; color: var(--star); padding: 6px; cursor: pointer; }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 60; left: 0; top: 0; width: 270px; transform: translateX(-100%); transition: transform .2s; }
  .app.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.55); }
  .side-toggle { display: block; }
  .topbar .balance span { display: none; }
}

/* Order page */
.order-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.order-summary { position: sticky; top: 88px; }
.cycle-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 20px; }
.cycle-opt { position: relative; display: block; cursor: pointer; }
.cycle-opt input { position: absolute; opacity: 0; }
.cycle-opt span { display: block; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--deep); }
.cycle-opt b { display: block; color: var(--star); font-weight: 600; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.cycle-opt em { font-style: normal; color: var(--mist); font-size: 0.85rem; }
.cycle-opt input:checked + span { border-color: var(--ice); box-shadow: 0 0 0 3px var(--glow); }
.cycle-opt input:focus-visible + span { outline: 2px solid var(--ice); outline-offset: 2px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 0.93rem; }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; color: var(--star); font-weight: 600; font-size: 1.05rem; }
@media (max-width: 860px) { .order-grid { grid-template-columns: 1fr; } .order-summary { position: static; } }

/* Invoice */
.invoice-doc { background: var(--deep); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(20px, 4vw, 40px); }
.invoice-top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.invoice-top img { height: 26px; width: auto; margin-bottom: 12px; }
.invoice-totals { margin-left: auto; max-width: 320px; margin-top: 16px; }
@media print {
  body { background: #fff; color: #000; }
  .sidebar, .topbar, .no-print, .site-header, .site-footer { display: none !important; }
  .app { display: block; }
  .invoice-doc { border: 0; background: #fff; color: #000; }
  .invoice-doc * { color: #000 !important; }
  .invoice-top img { filter: invert(1); }
}

/* Admin specifics */
.repeater-row { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 8px; margin-bottom: 8px; }
.repeater-row input { height: 40px; }
.thumb { width: 160px; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line-2); margin-bottom: 8px; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; border: 1px solid var(--line-2); }
.secret-set { font-size: 0.8rem; color: var(--ok); margin-left: 8px; }
.pill-list { display: flex; flex-wrap: wrap; gap: 6px; }
.inline-form { display: inline; }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.code-block { font-family: var(--mono); font-size: 0.85rem; background: var(--night); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Grid children never inherit the stacked-panel gap */
.grid-main > .panel + .panel, .grid-2 > .panel + .panel { margin-top: 0; }
.cycle-opt span { height: 100%; }
.meter-grid div:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ==========================================================================
   Display font touches
   ========================================================================== */
.meter-cost, .stat b, .plan-price .amt, .cycle-opt b, .game-price b, .product h3, .band h2, .footer-grid h4, .topbar h1, .brand small { font-family: var(--font-display); }
.meter-cost { font-weight: 600; }
body { overflow-x: clip; }

/* ==========================================================================
   Motion system
   Levels: html[data-motion=full|subtle|off]. Reduced-motion users get off.
   ========================================================================== */
@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

@keyframes word-in { to { opacity: 1; transform: none; filter: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-in-right { from { opacity: 0; transform: translateX(40px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes star-ignite { 0% { opacity: 0; transform: scale(.2); } 40% { opacity: 1; transform: scale(1.12); } 100% { opacity: 1; transform: scale(1); } }
@keyframes spike-grow { from { transform: translate(-50%, -50%) scaleX(0); opacity: 0; } }
@keyframes spike-grow-v { from { transform: translate(-50%, -50%) rotate(90deg) scaleX(0); opacity: 0; } }
@keyframes slow-spin { to { transform: rotate(360deg); } }
@keyframes spin-angle { to { --angle: 360deg; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-12px) scale(.96); } }
@keyframes shimmer { from { transform: translateX(-120%) skewX(-20deg); } to { transform: translateX(220%) skewX(-20deg); } }
@keyframes spinner { to { transform: rotate(360deg); } }
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes float { 50% { transform: translateY(-6px); } }

/* Headline words (split server-side) */
.js [data-split] .w { display: inline-block; opacity: 0; transform: translateY(.42em) rotate(2deg); filter: blur(10px); animation: word-in 1s var(--ease-out) forwards; animation-delay: calc(var(--i) * 65ms + 120ms); }
.js [data-intro] { opacity: 0; animation: fade-up .9s var(--ease-out) forwards; animation-delay: var(--delay, .45s); }
.js .meter[data-intro] { animation-name: slide-in-right; animation-duration: 1.1s; }

/* The star ignites, then breathes */
.vega-star { animation: star-ignite 1.8s var(--ease-out) both, twinkle 7s ease-in-out 1.8s infinite; }
.vega-star .spike { animation: spike-grow 1.6s var(--ease-out) .3s both; }
.vega-star .spike.v { animation-name: spike-grow-v; }
.vega-star .halo { position: absolute; inset: 35%; border-radius: 50%; border: 1px solid rgba(168,220,255,.08); animation: slow-spin 90s linear infinite; }
.vega-star .halo::before { content: ""; position: absolute; top: -3px; left: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--ice); box-shadow: 0 0 12px var(--ice); }

/* Starfield canvas behind heroes */
.starfield { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity 1.5s ease; }
.starfield.is-on { opacity: 1; }
.hero, .page-head, .auth { isolation: isolate; }
.hero > .wrap, .page-head > .wrap, .auth > .auth-card { position: relative; z-index: 1; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(600px circle at var(--gx, 70%) var(--gy, 30%), rgba(102,189,246,.07), transparent 60%); transition: background .2s; }

/* Meter card: a slow comet running around its border */
.meter { isolation: isolate; }
.meter::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; z-index: -1; pointer-events: none;
  background: conic-gradient(from var(--angle), transparent 0 62%, rgba(168,220,255,.0) 64%, rgba(168,220,255,.85) 74%, transparent 80%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin-angle 6s linear infinite; }
.meter-cost { transition: text-shadow .3s; }
.meter-cost.tick { text-shadow: 0 0 24px rgba(168,220,255,.35); }

/* Scroll reveal */
.js:not(.no-reveal) [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(28px) scale(.985); }
.js:not(.no-reveal) [data-stagger]:not(.is-in) > * { opacity: 0; transform: translateY(24px) scale(.98); }
[data-reveal], [data-stagger] > * { transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); transition-delay: var(--d, 0s); }
[data-stagger] > :nth-child(1) { --d: 0ms; } [data-stagger] > :nth-child(2) { --d: 70ms; } [data-stagger] > :nth-child(3) { --d: 140ms; }
[data-stagger] > :nth-child(4) { --d: 210ms; } [data-stagger] > :nth-child(5) { --d: 280ms; } [data-stagger] > :nth-child(6) { --d: 350ms; }
[data-stagger] > :nth-child(7) { --d: 420ms; } [data-stagger] > :nth-child(8) { --d: 490ms; } [data-stagger] > :nth-child(n+9) { --d: 540ms; }

/* Icons that draw themselves in when their section appears */
.icon.draw * { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease-out); transition-delay: calc(var(--d, 0s) + .25s); }
.is-in .icon.draw *, .icon.draw.is-in * { stroke-dashoffset: 0; }

/* Hero dissolves into the page instead of ending on a hard edge */
.hero .starfield, .hero .vega-star { -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 92%); mask-image: linear-gradient(to bottom, #000 45%, transparent 92%); }
.hero::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 220px; z-index: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(4,7,14,0), var(--night)); }
.hero::after { -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent); mask-image: linear-gradient(to bottom, #000 50%, transparent); }
.section-after-hero { padding-top: clamp(8px, 2vw, 24px); }

/* Cards: cursor spotlight, glowing border and tilt (tilt set by JS on fine pointers) */
.game, .product, .stat, .plan { --mx: 50%; --my: 50%; }
.game, .product { transform-style: preserve-3d; transition: border-color .3s, transform .5s var(--ease-out), box-shadow .5s var(--ease-out); will-change: transform; }
.game:hover, .product:hover { transform: translateY(-4px); box-shadow: 0 24px 60px -24px rgba(0,0,0,.9), 0 0 0 1px rgba(168,220,255,.08); }
.game::after, .product::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(168,220,255,.13), transparent 42%); opacity: 0; transition: opacity .35s; }
.game::before, .product::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 3;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(168,220,255,.7), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .35s; }
.game:hover::after, .game:hover::before, .product:hover::after, .product:hover::before { opacity: 1; }
.product { position: relative; }
.game-art img, .game-art .gen { transition: transform 1s var(--ease-out); }
.game:hover .game-art img, .game:hover .game-art .gen { transform: scale(1.07); }
.game-art .gen b { transition: transform 1.2s var(--ease-out), color .6s; }
.game:hover .game-art .gen b { transform: translateX(-12px); color: rgba(241,246,255,.16); }
.product .icon { transition: transform .6s var(--ease-spring), color .3s; }
.product:hover .icon { transform: translateY(-4px) scale(1.1); }

/* Plan rows */
.plan { position: relative; transition: background-color .3s; }
.plan::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--ice); transform: scaleY(0); transform-origin: center; transition: transform .45s var(--ease-out); }
.plan:hover { background-color: rgba(168,220,255,.035); }
.plan:hover::before, .plan.featured::before { transform: scaleY(1); }
.plan.featured { box-shadow: none; }
.plan-price .amt, .plan-price .unit, .plan-price .alt { display: inline-block; }
.plan-price .alt { display: block; }

/* Billing cycle switch with a sliding pill */
.cycle-switch { position: relative; isolation: isolate; }
.cycle-switch .pill { position: absolute; top: 4px; left: 4px; height: 36px; width: 0; border-radius: 999px; background: var(--ice); z-index: -1; box-shadow: 0 6px 20px -6px rgba(168,220,255,.55); transition: left .5s var(--ease-spring), width .5s var(--ease-spring); }
.cycle-switch.has-pill button[aria-pressed=true] { background: transparent; }
.cycle-switch button { transition: color .3s; }

/* Buttons: a sweep of light on hover, a press on click, a spinner while sending */
.btn { position: relative; overflow: hidden; transition: background-color .2s, border-color .2s, color .2s, box-shadow .3s, transform .15s var(--ease-out); }
.btn:active { transform: scale(.97); }
.btn-primary::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); transform: translateX(-120%) skewX(-20deg); pointer-events: none; }
.btn-primary:hover::after { animation: shimmer .9s var(--ease-out); }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading > * { visibility: hidden; }
.btn.is-loading::before { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--ice-ink) transparent var(--ice-ink) transparent; animation: spinner .7s linear infinite; }
.btn-ghost.is-loading::before, .btn-quiet.is-loading::before, .btn-danger.is-loading::before { border-color: var(--star) transparent var(--star) transparent; }
.btn-lg.cta-float { animation: float 4s ease-in-out 2s infinite; }

/* Header: hides on the way down, returns on the way up */
.site-header { transition: border-color .3s, transform .45s var(--ease-out), background-color .3s, backdrop-filter .3s, -webkit-backdrop-filter .3s; }
.site-header.is-hidden { transform: translateY(-100%); }
.nav a { position: relative; transition: color .2s; }
.nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 1.5px; border-radius: 2px; background: var(--ice); transform: scaleX(0); transition: transform .35s var(--ease-out); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }

/* Scroll progress line (pure CSS where scroll timelines are supported) */
.scroll-progress { position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 80; background: linear-gradient(90deg, var(--ice-2), var(--ice), #fff); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }
@supports (animation-timeline: scroll()) {
  .scroll-progress { animation: progress linear both; animation-timeline: scroll(root); }
}

/* FAQ answers glide open (JS animates height) */
.faq .answer { overflow: hidden; }
.faq summary { transition: color .2s; }
.faq summary:hover { color: var(--ice); }
.faq summary::after { transition: transform .4s var(--ease-spring); }

/* Toast notifications */
.toasts { position: fixed; top: 84px; right: 20px; z-index: 90; display: grid; gap: 10px; width: min(400px, calc(100vw - 32px)); pointer-events: none; }
.app .toasts { top: 76px; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: rgba(16,26,48,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line-2); box-shadow: 0 20px 50px -20px rgba(0,0,0,.9); font-size: .93rem; animation: toast-in .5s var(--ease-spring); transition: opacity .3s, transform .3s; }
.toast.is-leaving { opacity: 0; transform: translateX(24px); }
.toast .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--ice); box-shadow: 0 0 0 4px rgba(168,220,255,.15); }
.toast-success .dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(103,224,174,.15); }
.toast-error { border-color: rgba(255,133,144,.45); }
.toast-error .dot { background: var(--bad); box-shadow: 0 0 0 4px rgba(255,133,144,.15); }
.toast-warn .dot { background: var(--warn); }
.toast span { flex: 1; color: var(--star); }
.toast button { background: none; border: 0; color: var(--mist); cursor: pointer; padding: 2px; margin: -2px -4px 0 0; }
.toast button:hover { color: var(--star); }
.toast .icon { width: 16px; height: 16px; }

/* App shell: content settles in, rows cascade */
.js .content > * { animation: fade-up .6s var(--ease-out) both; }
.js .content > :nth-child(2) { animation-delay: 60ms; } .js .content > :nth-child(3) { animation-delay: 120ms; } .js .content > :nth-child(4) { animation-delay: 180ms; } .js .content > :nth-child(n+5) { animation-delay: 240ms; }
.js .content .table tbody tr { animation: fade-in .5s ease both; }
.js .content .table tbody tr:nth-child(2) { animation-delay: 40ms; } .js .content .table tbody tr:nth-child(3) { animation-delay: 80ms; } .js .content .table tbody tr:nth-child(4) { animation-delay: 120ms; } .js .content .table tbody tr:nth-child(5) { animation-delay: 160ms; } .js .content .table tbody tr:nth-child(n+6) { animation-delay: 200ms; }
.stat { transition: border-color .3s, transform .4s var(--ease-out); }
.stat:hover { border-color: var(--line-2); transform: translateY(-2px); }
.side-link { position: relative; transition: color .2s, background-color .2s; }
.side-link .icon { transition: transform .35s var(--ease-spring); }
.side-link:hover .icon { transform: translateX(2px); }
.side-link.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ice); animation: fade-in .4s ease; }
.panel { transition: border-color .3s; }
.cycle-opt span { transition: border-color .25s, box-shadow .3s, transform .3s var(--ease-out), background-color .25s; }
.cycle-opt:hover span { transform: translateY(-2px); border-color: var(--line-2); }
.cycle-opt input:checked + span { background: linear-gradient(180deg, rgba(168,220,255,.07), transparent), var(--deep); }
.field input, .field select, .field textarea { transition: border-color .2s, box-shadow .25s, background-color .2s; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #2d3e63; }
.badge { transition: transform .3s var(--ease-spring); }

/* Cross-page transitions (Chrome, Edge, Safari 18+) */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
.sidebar { view-transition-name: sidebar; }
::view-transition-old(root) { animation: .22s ease both vt-out; }
::view-transition-new(root) { animation: .45s var(--ease-out) both vt-in; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* Subtle level: fades only */
html[data-motion=subtle] [data-split] .w { transform: none; filter: none; }
html[data-motion=subtle] [data-reveal]:not(.is-in), html[data-motion=subtle] [data-stagger]:not(.is-in) > * { transform: none !important; }
html[data-motion=subtle] .game:hover, html[data-motion=subtle] .product:hover { transform: none; }
html[data-motion=subtle] .meter::before, html[data-motion=subtle] .vega-star .halo, html[data-motion=subtle] .btn-lg.cta-float { animation: none; }

/* Off (and reduced motion): everything visible, nothing moves */
html[data-motion=off] *, html[data-motion=off] *::before, html[data-motion=off] *::after { animation: none !important; transition: none !important; }
html[data-motion=off] [data-reveal], html[data-motion=off] [data-stagger] > *, html[data-motion=off] [data-split] .w, html[data-motion=off] [data-intro] { opacity: 1 !important; transform: none !important; filter: none !important; }
html[data-motion=off] .icon.draw * { stroke-dashoffset: 0; }
html[data-motion=off] ::view-transition-group(*), html[data-motion=off] ::view-transition-old(*), html[data-motion=off] ::view-transition-new(*) { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  [data-reveal], [data-stagger] > *, [data-split] .w, [data-intro] { opacity: 1 !important; transform: none !important; filter: none !important; }
  .icon.draw * { stroke-dashoffset: 0; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Header + mobile menu sheet */
.nav-sheet { display: contents; }
.nav-toggle { width: 44px; height: 44px; position: relative; }
.nav-toggle i { position: absolute; left: 12px; right: 12px; height: 1.5px; border-radius: 2px; background: currentColor; transition: transform .45s var(--ease-spring), top .3s var(--ease-out), opacity .2s; }
.nav-toggle i:nth-child(1) { top: 17px; } .nav-toggle i:nth-child(2) { top: 26px; }
.site-header.open .nav-toggle i:nth-child(1) { top: 21.5px; transform: rotate(45deg); }
.site-header.open .nav-toggle i:nth-child(2) { top: 21.5px; transform: rotate(-45deg); }
@media (max-width: 880px) {
  :root { --nav-h: 64px; }
  .site-header .wrap { gap: 12px; }
  .site-header.open .wrap { flex-wrap: nowrap; height: var(--nav-h); padding-top: 0; padding-bottom: 0; }
  .nav-sheet { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; top: var(--hh); height: calc(100dvh - var(--hh)); padding: 24px var(--gutter) calc(24px + env(safe-area-inset-bottom)); background: var(--night); border-top: 1px solid var(--line); overflow-y: auto; visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .3s, transform .45s var(--ease-out), visibility 0s .45s; }
  .site-header.open .nav-sheet { visibility: visible; opacity: 1; transform: none; transition: opacity .3s, transform .45s var(--ease-out); }
  .site-header .nav, .site-header .header-actions, .site-header.open .nav, .site-header.open .header-actions { display: flex; }
  .nav-sheet .nav { flex-direction: column; align-items: stretch; gap: 0; flex: none; order: 0; margin: 0; }
  .nav-sheet .nav a { font-family: var(--font-display); font-size: 1.6rem; font-weight: 500; color: var(--star); padding: 14px 0; border-bottom: 1px solid var(--line); border-radius: 0; letter-spacing: -0.02em; opacity: 0; transform: translateY(12px); transition: opacity .4s, transform .5s var(--ease-out), color .2s; }
  .nav-sheet .nav a::after { display: none; }
  .nav-sheet .nav a.active { color: var(--ice); }
  .site-header.open .nav-sheet .nav a { opacity: 1; transform: none; }
  .site-header.open .nav-sheet .nav a:nth-child(2) { transition-delay: 40ms; } .site-header.open .nav-sheet .nav a:nth-child(3) { transition-delay: 80ms; }
  .site-header.open .nav-sheet .nav a:nth-child(4) { transition-delay: 120ms; } .site-header.open .nav-sheet .nav a:nth-child(5) { transition-delay: 160ms; } .site-header.open .nav-sheet .nav a:nth-child(n+6) { transition-delay: 200ms; }
  .nav-sheet .header-actions { margin-top: auto; padding-top: 24px; gap: 10px; flex-basis: auto; order: 1; }
  .nav-sheet .header-actions .btn { flex: 1; height: 50px; font-size: 1rem; }
  html.nav-locked { overflow: hidden; }
  .site-header.open .nav-sheet .nav { flex: none; flex-basis: auto; order: 0; margin-top: 0; }
  .site-header.open .nav-sheet .header-actions { flex-basis: auto; order: 1; margin-top: auto; }
  .site-header.open { background: var(--night); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* Hero + page heads */
@media (max-width: 900px) {
  .hero { padding: 40px 0 56px; }
  .site-header ~ #main .hero { padding-top: calc(40px + var(--hh)); }
  .hero h1 { max-width: 14ch; }
  .vega-star { width: 640px; height: 640px; right: -300px; top: -280px; }
}
@media (max-width: 560px) {
  .hero .cta .btn { flex: 1 1 100%; }
  .meter { padding: 20px; }
  .meter-grid div { padding: 10px 12px; }
  .section-head { margin-bottom: 24px; }
  .section-head .btn { width: 100%; }
  .band { padding: 28px 22px; }
  .band .btn { width: 100%; }
  .page-head { padding: 36px 0 24px; }
  .site-header ~ #main .page-head { padding-top: calc(36px + var(--hh)); }
}

/* Game grid: two compact columns on phones */
@media (max-width: 560px) {
  .games { grid-template-columns: 1fr 1fr; gap: 10px; }
  .game { border-radius: var(--r); }
  .game-body { padding: 12px 12px 14px; }
  .game-body h3 { font-size: .95rem; }
  .game-body p { display: none; }
  .game-price { flex-direction: column; align-items: flex-start; gap: 0; padding-top: 6px; font-size: .8rem; }
  .game-art .gen b { font-size: 3.4rem; left: 10px; }
}

/* Plans on phones: name, specs, then price and order */
@media (max-width: 860px) {
  .plans { border-radius: var(--r); }
  .plan { padding: 18px; }
  .plan-specs dd { font-size: .88rem; }
  .plan .plan-cta, .plan > .btn { justify-self: end; align-self: center; }
}
@media (max-width: 560px) {
  .cycle-switch { width: 100%; }
  .cycle-switch button { flex: 1; padding: 0 8px; }
  .section-head > .cycle-switch, .section-head:has(> .cycle-switch) { width: 100%; }
}

/* Features */
@media (max-width: 560px) {
  .features { gap: 28px; }
}

/* Tables become stacked cards on narrow screens (labels added by JS) */
@media (max-width: 720px) {
  .table.stack thead { display: none; }
  .table.stack, .table.stack tbody, .table.stack tr, .table.stack td { display: block; width: 100%; }
  .table.stack tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .table.stack tr:last-child { border-bottom: 0; }
  .table.stack td { padding: 5px 16px; border: 0; text-align: right; overflow: hidden; }
  .table.stack td:first-child { text-align: left; padding-bottom: 8px; }
  .table.stack td:first-child::before { display: none; }
  .table.stack td::before { content: attr(data-label); float: left; margin-right: 16px; color: var(--mist); font-size: .8rem; line-height: 1.9; text-align: left; }
  .table.stack td:empty { display: none; }
  .table.stack td .sub { text-align: inherit; }
  .table.stack td .actions-row, .table.stack td form { justify-content: flex-end; }
  .table.stack tbody tr:hover td { background: none; }
  .table td { padding: 12px; }
}

/* App shell on tablets and phones */
@media (max-width: 960px) {
  .topbar { height: 58px; gap: 10px; padding: 0 12px; }
  .topbar h1 { font-size: 1.05rem; }
  .content { padding: 18px 14px 28px; }
  .app.has-tabbar .content { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .sidebar { box-shadow: none; transition: transform .45s var(--ease-out), box-shadow .45s; }
  .app.nav-open .sidebar { box-shadow: 0 0 0 100vmax rgba(0,0,0,.6); }
  .panel { padding: 18px; border-radius: var(--r); }
  .panel-flush { padding: 0; }
  .panel-flush .panel-head { padding: 16px 16px 0; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
  .stat { padding: 14px 16px; border-radius: var(--r); }
  .stat b { font-size: 1.35rem; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dt { margin-top: 10px; font-size: .82rem; }
  .kv dt:first-child { margin-top: 0; }
  .invoice-top > div:last-child { text-align: left !important; }
  .toasts { top: 70px; right: 12px; left: 12px; width: auto; }
}

@media (max-width: 640px) {
  .toolbar .input { max-width: none; flex: 1 1 100%; }
  .toolbar .btn[style*="margin-left:auto"] { margin-left: 0 !important; }
}

/* Client bottom tab bar on phones */
.tabbar { display: none; }
@media (max-width: 960px) {
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 50; padding: 6px; border-radius: 18px; background: rgba(12,19,36,.88); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border: 1px solid var(--line-2); box-shadow: 0 20px 50px -20px rgba(0,0,0,.9); }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 6px; border-radius: 12px; color: var(--mist); font-size: .7rem; font-weight: 500; transition: color .2s, background-color .3s; }
  .tabbar a .icon { width: 20px; height: 20px; transition: transform .4s var(--ease-spring); }
  .tabbar a.active { color: var(--star); background: var(--panel-2); }
  .tabbar a.active .icon { color: var(--ice); transform: translateY(-1px) scale(1.08); }
  .tabbar .count { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--ice); color: var(--ice-ink); font-size: .65rem; font-weight: 700; display: grid; place-items: center; }
}

/* Order page on phones: summary follows the form */
@media (max-width: 860px) {
  .cycle-options { grid-template-columns: 1fr; }
  .cycle-opt span { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
  .cycle-opt em:last-child { flex-basis: 100%; }
}

/* Footer */
@media (max-width: 560px) {
  .site-footer { padding: 40px 0 28px; }
  .footer-grid { gap: 28px 20px; }
  .footer-base { flex-direction: column; gap: 6px; }
}

/* Bigger touch targets on touch screens */
@media (pointer: coarse) {
  .btn-sm { height: 40px; }
  .side-link { padding: 12px 10px; }
  .faq summary { padding-top: 18px; padding-bottom: 18px; }
  .check input { width: 20px; height: 20px; }
}

/* ==========================================================================
   Resource builder (sliders + live price)
   ========================================================================== */
.builder { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.builder-main { display: grid; gap: 14px; }
.builder > .builder-main { background: var(--deep); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(18px, 3vw, 28px); }
.res { padding: 4px 0 14px; border-bottom: 1px solid var(--line); }
.res:last-of-type { border-bottom: 0; }
.res-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.res-head label { font-weight: 600; color: var(--star); font-size: 1rem; }
.res-head output { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; color: var(--star); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.res-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; font-size: .8rem; color: var(--dim); }
.res-help { text-align: center; color: var(--mist); }
.rec-btn { background: none; border: 1px solid var(--line-2); color: var(--mist); border-radius: 999px; padding: 3px 10px; font: 500 .78rem var(--font); cursor: pointer; transition: color .2s, border-color .2s, background-color .2s; }
.rec-btn:hover { color: var(--star); border-color: var(--ice); }
.rec-btn.is-on { color: var(--ice-ink); background: var(--ice); border-color: var(--ice); }

/* Range slider */
.range-wrap { position: relative; height: 28px; display: flex; align-items: center; }
.range-wrap input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer; position: relative; z-index: 1; }
.range-wrap input[type=range]:focus { outline: none; }
.range-wrap input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--ice-2), var(--ice) var(--fill, 50%), var(--line-2) var(--fill, 50%)); }
.range-wrap input[type=range]::-moz-range-track { height: 6px; border-radius: 999px; background: var(--line-2); }
.range-wrap input[type=range]::-moz-range-progress { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--ice-2), var(--ice)); }
.range-wrap input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: var(--star); border: 4px solid var(--ice-2); box-shadow: 0 0 0 4px rgba(168,220,255,.12), 0 4px 14px rgba(0,0,0,.5); transition: transform .2s var(--ease-spring), box-shadow .2s; }
.range-wrap input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--star); border: 4px solid var(--ice-2); box-shadow: 0 0 0 4px rgba(168,220,255,.12); }
.range-wrap input[type=range]:hover::-webkit-slider-thumb, .range-wrap input[type=range]:active::-webkit-slider-thumb { transform: scale(1.15); box-shadow: 0 0 0 7px rgba(168,220,255,.18), 0 4px 14px rgba(0,0,0,.5); }
.range-wrap input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--night), 0 0 0 5px var(--ice); }
.rec-mark { position: absolute; top: 50%; width: 2px; height: 14px; margin: -7px 0 0 -1px; border-radius: 2px; background: var(--ice); opacity: .55; pointer-events: none; }

/* Add-ons */
.addons { display: grid; gap: 10px; margin-top: 6px; }
.addon { position: relative; display: block; cursor: pointer; }
.addon input { position: absolute; opacity: 0; }
.addon-box { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px 14px 48px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--night); position: relative; transition: border-color .25s, background-color .25s, box-shadow .3s; }
.addon-box::before { content: ""; position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 6px; border: 1.5px solid var(--line-2); background: var(--deep); transition: background-color .2s, border-color .2s; }
.addon-box::after { content: ""; position: absolute; left: 23px; top: 50%; width: 6px; height: 11px; margin-top: -7px; border: solid var(--ice-ink); border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform .3s var(--ease-spring); }
.addon input:checked + .addon-box { border-color: rgba(168,220,255,.5); background: linear-gradient(90deg, rgba(168,220,255,.06), transparent), var(--night); }
.addon input:checked + .addon-box::before { background: var(--ice); border-color: var(--ice); }
.addon input:checked + .addon-box::after { transform: rotate(45deg) scale(1); }
.addon input:focus-visible + .addon-box { outline: 2px solid var(--ice); outline-offset: 2px; }
.addon-text b { display: block; color: var(--star); font-weight: 600; }
.addon-text small { color: var(--mist); }
.addon-price { color: var(--star); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Summary */
.builder-sum { position: sticky; top: calc(var(--hh, 68px) + 16px); background: var(--deep); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 24px; box-shadow: 0 30px 80px -40px rgba(0,0,0,.9); }
.app .builder-sum { top: 80px; }
.builder-sum .cycle-switch { display: flex; width: 100%; margin-bottom: 20px; }
.builder-sum .cycle-switch button { flex: 1; padding: 0 8px; }
.sum-price { display: flex; align-items: baseline; gap: 4px; }
.sum-price .amt { font-family: var(--font-display); font-size: clamp(2.4rem, 4vw, 3rem); font-weight: 600; color: var(--star); letter-spacing: -0.035em; line-height: 1; font-variant-numeric: tabular-nums; display: inline-block; }
.sum-price .unit { color: var(--mist); font-size: 1rem; display: inline-block; }
.sum-alt { color: var(--mist); font-size: .88rem; margin: 10px 0 16px; min-height: 1.4em; }
.sum-lines { margin: 0 0 18px; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 7px; font-size: .88rem; }
.sum-lines div { display: flex; justify-content: space-between; gap: 12px; }
.sum-lines dt { color: var(--mist); }
.sum-lines dt span { color: var(--text); }
.sum-lines dd { margin: 0; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sum-lines .sum-note { padding-top: 8px; margin-top: 2px; border-top: 1px dashed var(--line); }
.sum-lines .sum-note dt, .sum-lines .sum-note dd { color: var(--star); font-weight: 600; }
@media (max-width: 900px) {
  .builder { grid-template-columns: 1fr; }
  .builder-sum { position: static; }
}
@media (max-width: 560px) {
  .res-head output { font-size: 1.15rem; }
  .res-foot .rec-btn { font-size: .72rem; }
  .addon-box { flex-wrap: wrap; }
  .builder-sum { padding: 18px; }
}

/* ==========================================================================
   Homepage quick builder (alternative to the cost meter, chosen in Admin > Homepage)
   ========================================================================== */
.quick::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(168,220,255,.10), transparent 65%),
    radial-gradient(70% 50% at 0% 100%, rgba(102,189,246,.06), transparent 70%); }
.quick .meter-head { margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.chip { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(4,7,14,.5); color: var(--mist); font: 500 .82rem var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: color .2s, border-color .25s, background-color .25s, transform .3s var(--ease-spring); }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--ice)); opacity: .5; transition: opacity .2s, box-shadow .3s; }
.chip:hover { color: var(--star); border-color: #2d3e63; }
.chip:active { transform: scale(.95); }
.chip[aria-checked=true] { color: var(--star); border-color: rgba(168,220,255,.55); background: rgba(168,220,255,.1); }
.chip[aria-checked=true]::before { opacity: 1; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--ice)) 25%, transparent); }
.quick-res .res-head { margin-bottom: 6px; }
.quick-res .res-head output { font-size: 1.25rem; }
.quick-spec { margin: 8px 0 0; font-size: .82rem; color: var(--mist); min-height: 1.3em; }
.quick-price { display: flex; align-items: baseline; gap: 4px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.quick-price .meter-cost { display: inline-block; }
.quick-price .unit { color: var(--mist); }
.quick .meter-sub { margin-top: 6px; min-height: 1.4em; }
.quick-cta { margin-top: 18px; display: grid; gap: 10px; justify-items: center; }
.quick-more { font-size: .85rem; color: var(--mist); }
.quick-more:hover { color: var(--star); }
@media (max-width: 560px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -20px; padding-inline: 20px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 24px), transparent); }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
}


/* ------------------------------------------------------------------ email editors */
.email-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 20px; align-items: start; margin-bottom: 20px; }
.email-fields { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.email-fields textarea.code { font-family: var(--mono); font-size: 0.86rem; line-height: 1.6; min-height: 340px; }
.email-preview { position: sticky; top: 84px; }
.email-preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: 0.88rem; }
.email-preview-subject { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.email-preview-size { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; flex: none; }
.email-preview-size button { background: none; border: 0; color: var(--mist); font: inherit; font-size: 0.8rem; padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.email-preview-size button.active { background: var(--panel-2); color: var(--star); }
.email-preview-frame { background: #ffffff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; justify-content: center; }
.email-preview-frame iframe { display: block; width: 100%; height: 760px; border: 0; background: #ffffff; transition: width .35s var(--ease-out); }
.email-help { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 14px; }
.email-help summary { cursor: pointer; color: var(--star); font-weight: 500; font-size: 0.92rem; }
.email-help .table td { padding: 8px 10px; vertical-align: top; }
.email-help code, .email-var code { font-family: var(--mono); font-size: 0.82rem; color: var(--ice); }
.email-vars { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.email-vars .small { margin: 4px 0 10px; }
.email-var-list { display: flex; flex-wrap: wrap; gap: 6px; }
.email-var { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: var(--deep); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 6px 10px; color: var(--mist); font: inherit; font-size: 0.74rem; cursor: pointer; max-width: 100%; transition: border-color .2s, transform .2s var(--ease-out); }
.email-var:hover { border-color: var(--ice-2); transform: translateY(-1px); }
.email-var span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.email-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.email-actions .check { margin: 0; }
[hidden] { display: none !important; }
@media (max-width: 1100px) {
  .email-editor { grid-template-columns: 1fr; }
  .email-preview { position: static; }
}

/* ------------------------------------------------------------------ change billing cycle */
.cycle-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 8px; }
.cycle-option { display: block; cursor: pointer; }
.cycle-option input { position: absolute; opacity: 0; pointer-events: none; }
.cycle-option-box { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px 18px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--deep); transition: border-color .2s, box-shadow .2s, transform .2s var(--ease-out); }
.cycle-option-box b { color: var(--star); font-family: var(--font-display); font-size: 1.05rem; }
.cycle-option-box .num { color: var(--ice); font-weight: 600; }
.cycle-option-box small { color: var(--mist); font-size: 0.82rem; line-height: 1.5; }
.cycle-option:hover .cycle-option-box { border-color: var(--ice-2); transform: translateY(-1px); }
.cycle-option input:checked + .cycle-option-box { border-color: var(--ice); box-shadow: 0 0 0 3px var(--glow); }
.cycle-option input:focus-visible + .cycle-option-box { outline: 2px solid var(--ice); outline-offset: 2px; }

/* ------------------------------------------------------------------ client API */
.lede-sm { font-size: 1.05rem; color: var(--text); margin-bottom: 10px; }
.api-newkey { border-color: rgba(243,201,117,.45); }
.copy-row { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.copy-row .code-block { flex: 1 1 320px; margin: 0; font-size: 0.9rem; color: var(--ice); user-select: all; }
.scope-list { display: grid; gap: 4px; margin-bottom: 6px; }
.scope-list code { color: var(--ice); font-family: var(--mono); }
.api-doc { max-width: 860px; line-height: 1.7; }
.api-doc h2 { font-size: 1.35rem; margin: 34px 0 10px; padding-top: 22px; border-top: 1px solid var(--line); }
.api-doc h2:first-of-type { margin-top: 10px; }
.api-doc h3 { font-size: 1.02rem; margin: 26px 0 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--mono); font-weight: 500; color: var(--star); }
.api-doc p, .api-doc li { color: var(--text); }
.api-doc code { font-family: var(--mono); font-size: 0.88em; color: var(--ice); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 6px; }
.api-doc pre { background: var(--night); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; overflow-x: auto; margin: 0 0 18px; }
.api-doc pre code { background: none; border: 0; padding: 0; font-size: 0.86rem; line-height: 1.65; color: var(--text); white-space: pre; }
.api-doc table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 0.92rem; }
.api-doc th, .api-doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.api-doc th { color: var(--mist); font-weight: 500; font-size: 0.82rem; text-transform: uppercase; letter-spacing: .06em; }
.api-method { display: inline-block; font-family: var(--mono); font-size: 0.72rem; font-weight: 700; letter-spacing: .06em; padding: 3px 8px; border-radius: 5px; border: 1px solid; }
.api-method.get { color: var(--ok); border-color: rgba(103,224,174,.35); background: rgba(103,224,174,.08); }
.api-method.post { color: var(--ice); border-color: rgba(168,220,255,.35); background: rgba(168,220,255,.08); }
.api-method.patch, .api-method.put { color: var(--warn); border-color: rgba(243,201,117,.35); background: rgba(243,201,117,.08); }
.api-method.delete { color: var(--bad); border-color: rgba(255,133,144,.35); background: rgba(255,133,144,.08); }
.api-note { padding: 12px 16px; border: 1px solid rgba(168,220,255,.35); border-radius: var(--r); background: rgba(168,220,255,.06); color: #dcefff; margin-bottom: 8px; }

.api-warning { border-color: rgba(255,133,144,.4); background: linear-gradient(180deg, rgba(255,133,144,.06), transparent 60%), var(--panel); }
.api-warning ul { padding-left: 1.2em; margin: 0 0 12px; }
.api-warning li { margin-bottom: 6px; }
.scope { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); margin: 0; }
.scope-danger { border-color: rgba(243,201,117,.25); }
.api-understand { margin: 14px 0; padding: 12px 14px; border: 1px solid rgba(243,201,117,.35); border-radius: var(--r-sm); background: rgba(243,201,117,.05); }
.api-toc { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.api-toc a { font-size: 0.82rem; padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--mist); }
.api-toc a:hover { color: var(--star); border-color: var(--ice-2); }
.api-doc .table-wrap table { margin-bottom: 18px; }

/* ------------------------------------------------------------------ Discord */
.btn-discord .icon, .btn-discord-ghost .icon { width: 18px; height: 18px; }
.btn-discord-ghost { color: var(--text); border: 1px solid rgba(88,101,242,.45); background: rgba(88,101,242,.10); }
.btn-discord-ghost:hover { color: #fff; background: #5865f2; border-color: #5865f2; }
.btn-discord-ghost span { margin-left: 2px; }
@media (min-width: 881px) and (max-width: 1180px) { .btn-discord-ghost span { display: none; } }
.band-discord { background: radial-gradient(70% 140% at 100% 0%, rgba(88,101,242,.22), transparent 60%), radial-gradient(60% 120% at 0% 100%, rgba(168,220,255,.08), transparent 60%), var(--deep); border-color: rgba(88,101,242,.35); justify-content: flex-start; }
.band-discord-text { flex: 1 1 320px; }
.band-discord-icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: #5865f2; color: #fff; flex: none; box-shadow: 0 12px 32px rgba(88,101,242,.35); }
.band-discord-icon .icon { width: 34px; height: 34px; }
.discord-card { padding: 14px 16px; border: 1px solid rgba(88,101,242,.35); border-radius: var(--r); background: rgba(88,101,242,.08); }
.discord-card .small { color: var(--text); }
.side-discord { color: #aab3ff; }
.side-discord:hover { color: #fff; background: rgba(88,101,242,.18); }
.mb-1 { margin-bottom: 8px; }

/* Games page search */
.game-search { max-width: 420px; margin: 0 0 20px; }
.game-search .input { width: 100%; }
.game-request { margin-top: 20px; }
.game-request[hidden] { display: none; }

/* Cards page */
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.card-row:first-of-type { border-top: 0; }
.card-element { padding: 12px 14px; background: var(--deep); border: 1px solid var(--line-2); border-radius: var(--r-sm); }
.card-element.is-focus { border-color: var(--ice); box-shadow: 0 0 0 3px var(--glow); }
