:root {
  --bg: #0a0a0a;
  --bg-2: #0d0e10;
  --surface: #111214;
  --surface-2: #16181b;
  --border: #1f2226;
  --border-2: #2a2e33;
  --text: #f4f4f5;
  --muted: #8b9099;
  --dim: #5b6068;
  --accent: #00e5ff;
  --accent-ink: #001417;
  --accent-soft: rgba(0, 229, 255, 0.1);
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 8px;
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: ui-monospace, Consolas, 'Cascadia Mono', monospace; }
img, svg { flex-shrink: 0; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.page-pad { padding-top: 56px; padding-bottom: 72px; }
.section { padding-top: 64px; padding-bottom: 64px; }
.row { display: flex; gap: 12px; align-items: center; }
.wrap-row { flex-wrap: wrap; }
.center-row { justify-content: center; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.end { justify-content: flex-end; }
.grow { flex: 1; }
.mt { margin-top: 16px; }
.mt-lg { margin-top: 32px; }
.mb { margin-bottom: 16px; }
.muted { color: var(--muted); }
.dim { color: var(--border-2); }
.small { font-size: 13px; }
.strong { font-weight: 600; color: var(--text); }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* type */
.h1, .h2, .h3 { font-family: var(--display); letter-spacing: -0.02em; margin: 0 0 12px; line-height: 1.08; }
.h1 { font-size: clamp(44px, 8vw, 92px); font-weight: 600; max-width: 900px; margin: 0 auto 24px; }
.h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 700; }
.h3 { font-size: 22px; font-weight: 700; }
.eyebrow { font-family: var(--display); color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.lead { color: var(--muted); font-size: 18px; max-width: 560px; margin: 0 auto 32px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px; border-radius: 6px; border: 1px solid transparent;
  font: 600 15px/1 Inter, system-ui, sans-serif; cursor: pointer; color: var(--text);
  background: transparent; text-decoration: none !important; transition: background .15s, border-color .15s, color .15s, transform .05s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: #5cf0ff; }
.btn-outline { border-color: var(--border-2); background: var(--surface); }
.btn-outline:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-ghost.danger:hover { color: var(--bad); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 14px; }
.btn-lg { height: 48px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(10, 10, 10, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav-in { display: flex; align-items: center; height: 64px; gap: 40px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-family: var(--display); font-weight: 700; font-size: 20px; text-decoration: none !important; }
.links { display: flex; gap: 28px; }
.links a { color: var(--muted); font-weight: 500; text-decoration: none; }
.links a:hover, .links a.active { color: var(--text); }
.links-mobile { display: none; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.nav-right form { margin: 0; }
.muted-link { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; font-weight: 500; text-decoration: none !important; }
.muted-link:hover { color: var(--text); }
.cart-btn { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--accent); border-radius: 6px; color: var(--accent); }
.badge { position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.menu-btn { display: none; background: none; border: 0; color: var(--text); cursor: pointer; padding: 4px; }

/* hero */
.hero { position: relative; padding: 112px 0 96px; overflow: hidden; }
/* dot grid + cyan glow behind the headline */
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    radial-gradient(ellipse 55% 45% at 50% 42%, rgba(0, 229, 255, .13), transparent 70%),
    radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: auto, 28px 28px;
  background-position: center, center top;
  -webkit-mask-image: linear-gradient(#000 60%, transparent);
  mask-image: linear-gradient(#000 60%, transparent);
}
/* big faint logo, turning slowly */
.hero::after {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  left: 50%; top: 46%; width: min(780px, 130vw); aspect-ratio: 1; translate: -50% -50%;
  background: url(/logo-hero.webp) center / contain no-repeat;
  opacity: .06;
  animation: spin 180s linear infinite;
}
@keyframes spin { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) { .hero::after { animation: none; } }
.logo { display: block; }
main { position: relative; z-index: 0; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-top: 24px; padding-bottom: 24px; }
.stat { text-align: center; padding: 8px 0 20px; border-bottom: 1px solid var(--border); }
.stat-n { font-family: var(--display); font-size: 44px; font-weight: 700; color: var(--accent); line-height: 1.1; }
.stat-l { color: var(--muted); text-transform: uppercase; font-size: 13px; letter-spacing: .04em; margin-top: 4px; }
.stats.mini { padding: 0; }
.stats.mini .stat-n { font-size: 28px; }

/* product cards */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin-top: 24px; }
.pcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); text-decoration: none !important; transition: border-color .15s, transform .15s; }
.pcard:hover { border-color: var(--border-2); transform: translateY(-2px); }
.pcard:hover .btn-outline { border-color: var(--accent); color: var(--accent); }
.pcard-title { padding: 16px; font-weight: 700; text-align: center; border-bottom: 1px solid var(--border); }
.pcard-art { height: 170px; display: grid; place-items: center; color: var(--accent); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.pcard-meta { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 0; border-top: 1px solid var(--border); }
.pcard-cta { padding: 12px 16px 16px; }
.price { color: var(--accent); font-weight: 700; }
.stock { color: var(--muted); font-size: 14px; }
.stock.out { color: var(--bad); }

/* features */
.band { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.feats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 28px; }
.feat-ico { width: 48px; height: 48px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 18px; }
.feat h3 { font-family: var(--display); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 8px; }
.feat p { color: var(--muted); font-size: 14px; margin: 0; }

.cta { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding-top: 72px; padding-bottom: 72px; flex-wrap: wrap; }
.cta p { margin: 0; }

/* panels */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.panel-head { padding: 18px 22px; border-bottom: 1px solid var(--border); }
.panel-head .h3 { margin: 0; }
.panel-body { padding: 22px; }
.panel-foot { padding: 18px 22px; border-top: 1px solid var(--border); }
.back { display: inline-block; color: var(--muted); margin-bottom: 20px; }

.pdetail { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.desc { color: #d4d4d8; }
.big-price { font-size: 28px; font-weight: 600; }
.label { display: block; font-size: 14px; font-weight: 500; margin: 14px 0 6px; }
.panel-body > .label:first-child, form > .label:first-of-type { margin-top: 0; }

.qty { display: flex; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.qty input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text); font: inherit; text-align: left; padding: 0 12px; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; }
.qty-b { width: 44px; height: 42px; border: 0; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; }
.qty-b:hover { color: var(--text); background: var(--border); }

.input {
  width: 100%; background: var(--surface-2); color: var(--text); border: 1px solid var(--border-2);
  border-radius: 6px; padding: 11px 14px; font: inherit; outline: none; transition: border-color .15s;
}
.input:focus { border-color: var(--accent); }
.input:disabled { color: var(--muted); }
.input-sm { width: 72px; padding: 6px 10px; }
textarea.input { resize: vertical; }

.alert { border-radius: 6px; padding: 12px 14px; margin: 0 0 16px; font-size: 14px; border: 1px solid; }
.alert.error { background: rgba(248, 113, 113, .08); border-color: rgba(248, 113, 113, .35); color: #fecaca; }
.alert.ok { background: rgba(52, 211, 153, .08); border-color: rgba(52, 211, 153, .35); color: #a7f3d0; }
.alert.info { background: var(--accent-soft); border-color: rgba(0, 229, 255, .3); color: #bff8ff; }

/* cart */
.cart-row { display: grid; grid-template-columns: 1fr auto 90px; gap: 16px; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.cart-row > :last-child { text-align: right; }
.cart-row.total { border-bottom: 0; }
.cart-qty { gap: 6px; margin: 0; }

/* checkout */
.checkout { display: grid; grid-template-columns: minmax(300px, 40%) 1fr; min-height: calc(100vh - 64px); }
.co-left { background: var(--bg-2); border-right: 1px solid var(--border); padding: 56px 48px; display: flex; flex-direction: column; }
.co-total { font-family: var(--display); font-size: 36px; font-weight: 700; margin: 0 0 28px; }
.co-item { display: flex; gap: 14px; align-items: center; margin-bottom: 28px; }
.co-ico { width: 40px; height: 40px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.co-line { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.co-right { padding: 48px; max-width: 820px; width: 100%; }
.steps { display: flex; align-items: center; gap: 12px; margin-bottom: 36px; font-size: 14px; color: var(--muted); }
.step { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.step b { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border-2); display: grid; place-items: center; font-size: 12px; }
.step.on { color: var(--text); font-weight: 600; }
.step.on b { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.step-line { flex: 1; height: 1px; background: var(--border-2); min-width: 16px; }
.pay-opt { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border: 1px solid var(--border-2); border-radius: var(--radius); background: var(--surface); }
.pay-opt.on { border-color: var(--accent); color: var(--text); }
.pay-opt.on > svg { color: var(--accent); }
.pay-opt.off { color: var(--muted); }
.checks { border: 1px solid var(--border-2); border-radius: var(--radius); margin: 24px 0; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; cursor: pointer; font-size: 14px; }
.checks .check + .check { border-top: 1px solid var(--border); }
.check input { accent-color: var(--accent); width: 18px; height: 18px; margin: 1px 0 0; }

/* order / keys */
.deliv { margin-top: 18px; }
.keybox { display: flex; align-items: center; gap: 12px; margin-top: 8px; background: var(--bg); border: 1px solid rgba(0, 229, 255, .35); border-radius: 6px; padding: 8px 8px 8px 14px; }
.keybox code { flex: 1; color: var(--accent); font-size: 15px; word-break: break-all; }

.stars { color: #fbbf24; display: inline-flex; gap: 2px; }
.stars .dim { display: inline-flex; gap: 2px; }
.rate { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.rate input { position: absolute; opacity: 0; pointer-events: none; }
.rate label { color: var(--border-2); cursor: pointer; }
.rate label svg { width: 26px; height: 26px; }
.rate label:hover, .rate label:hover ~ label, .rate input:checked ~ label { color: #fbbf24; }
.rate input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 4px; }
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.review p { margin: 12px 0 0; }

/* script status */
.s-working { --s: var(--ok); }
.s-updating { --s: var(--warn); }
.s-patched { --s: var(--bad); }
.sbadge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 500; text-decoration: none !important; }
.sbadge:hover { color: var(--text); border-color: var(--s); }
.sdot { width: 8px; height: 8px; border-radius: 50%; background: var(--s); box-shadow: 0 0 0 4px color-mix(in srgb, var(--s) 20%, transparent); }
.sbig { display: flex; align-items: center; gap: 14px; font-family: var(--display); font-size: 30px; font-weight: 700; color: var(--s); margin-bottom: 8px; }
.sbig .sdot { width: 14px; height: 14px; }

/* faq / prose */
.faq { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 22px; line-height: 1; }
.faq[open] summary::after { content: '\2212'; }
.faq summary::-webkit-details-marker { display: none; }
.faq div { color: var(--muted); padding-top: 10px; }
.prose h3 { font-family: var(--display); margin: 28px 0 6px; }
.prose p { color: #c4c4c8; }

.auth { max-width: 440px; }

/* admin */
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border-2); }
.pill.ok { color: var(--ok); border-color: rgba(52, 211, 153, .35); }
.pill.warn { color: var(--warn); border-color: rgba(251, 191, 36, .35); }
.pill.bad { color: var(--bad); border-color: rgba(248, 113, 113, .35); }
.grid2 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.grid2 .label { margin-top: 0; }
.keyrow { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; margin: 0; border-bottom: 1px solid var(--border); }
.keyrow code { font-size: 13px; word-break: break-all; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.table form { margin: 0; }

/* footer */
.footer { border-top: 1px solid var(--border); padding: 28px 0; }
.foot-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 24px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.foot-links a:hover { color: var(--text); text-decoration: none; }
.copy { color: var(--muted); font-size: 14px; }

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

/* responsive */
@media (max-width: 900px) {
  .feats { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .pdetail, .checkout { grid-template-columns: 1fr; }
  .co-left { border-right: 0; border-bottom: 1px solid var(--border); padding: 32px 24px; }
  .co-right { padding: 32px 24px; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .nav-in { gap: 12px; }
  .hide-sm { display: none !important; }
  .menu-btn { display: block; }
  .links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px 16px 16px; }
  .links.open { display: flex; }
  .links a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .links-mobile { display: contents; }
  .hero { padding: 72px 0 56px; }
  .lead { font-size: 16px; }
  .center-row { flex-wrap: wrap; }
  .feats { grid-template-columns: 1fr; gap: 24px; }
  .stat-n { font-size: 34px; }
  .cta { padding-top: 48px; padding-bottom: 48px; }
  .cta .row { flex-wrap: wrap; width: 100%; }
  .cta .btn { flex: 1; }
  .steps { font-size: 12px; gap: 8px; }
  .steps .step-line { min-width: 8px; }
  .cart-row { grid-template-columns: 1fr auto; }
  .cart-row > :last-child { grid-column: 2; }
  .grid2 { grid-template-columns: 1fr; }
  .foot-in { flex-direction: column; align-items: flex-start; }
}
