/* =========================================================
   AI Root Studio — design system (prototype)
   Tokens locked to the AI Studio prototypes. Light mode uses
   emerald-700 for accent TEXT so it passes WCAG AA on white.
   ========================================================= */
:root, html.dark {
  --bg: #0a0a0a; --surface: #141416; --surface-hover: #1a1a1d; --border: #262629;
  --inner: #0c0c0e; --inner-border: #1f1f23;
  --title: #ffffff; --text: #f1f5f9; --muted: #a1a1aa; --faint: #8b8b94;
  --accent: #10b981; --accent-hover: #34d399; --accent-text: #34d399;
  --accent-soft: rgba(16,185,129,.10); --accent-line: rgba(16,185,129,.30); --on-accent: #000;
  --grid: rgba(16,185,129,.07); --glow: rgba(16,185,129,.18); --accent-rgb: 16,185,129;
  --grad: linear-gradient(90deg, #34d399, #5eead4, #10b981);
  --header-bg: rgba(10,10,10,.80); --card-shadow: none; --overlay: rgba(0,0,0,.65);
  --amber: #fbbf24; --cyan: #22d3ee; --blue: #60a5fa; --rose: #fb7185; --sky: #38bdf8;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: dark;
}
html.light {
  --bg: #f8fafc; --surface: #ffffff; --surface-hover: #f8fafc; --border: #e2e8f0;
  --inner: #f1f5f9; --inner-border: #e2e8f0;
  --title: #0f172a; --text: #1e293b; --muted: #475569; --faint: #64748b;
  --accent: #10b981; --accent-hover: #059669; --accent-text: #047857;
  --accent-soft: rgba(16,185,129,.10); --accent-line: rgba(5,150,105,.35); --on-accent: #000;
  --grid: rgba(16,185,129,.09); --glow: rgba(16,185,129,.14); --accent-rgb: 16,185,129;
  --grad: linear-gradient(90deg, #059669, #0d9488, #047857);
  --header-bg: rgba(248,250,252,.85); --card-shadow: 0 1px 3px rgba(0,0,0,.05); --overlay: rgba(15,23,42,.45);
  --amber: #b45309; --cyan: #0e7490; --blue: #1d4ed8; --rose: #be123c; --sky: #0369a1;
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; transition: background-color .2s, color .2s; }
::selection { background: var(--accent); color: #000; }
h1, h2, h3, h4, h5 { font-family: var(--font-display); letter-spacing: -0.02em; color: var(--title); margin: 0; line-height: 1.15; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; }
ul, ol { margin: 0; padding: 0; }
.mono { font-family: var(--font-mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon, [data-i] svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.i-sm svg, .icon-sm { width: 16px; height: 16px; }
.i-lg svg { width: 28px; height: 28px; }
[data-i] { display: inline-flex; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(150,150,150,.25); border-radius: 4px; }
[hidden] { display: none !important; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.container-sm { max-width: 860px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container, .container-sm { padding: 0 24px; } }
.section { padding: 72px 0; }
.section-tight { padding: 40px 0; }
@media (min-width: 1024px) { .section { padding: 88px 0; } }
.pt-0 { padding-top: 0 !important; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }
.mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.center { text-align: center; }
.flex { display: flex; } .wrap { flex-wrap: wrap; } .items-center { align-items: center; } .between { justify-content: space-between; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.stack { display: grid; gap: 16px; }
.stack-sm { display: grid; gap: 10px; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 16px; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.muted { color: var(--muted); } .faint { color: var(--faint); } .title { color: var(--title); } .accent { color: var(--accent-text); }
.small { font-size: 13px; } .xs { font-size: 12px; }
.w-full { width: 100%; }

/* ---------- typography blocks ---------- */
.eyebrow { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.section-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; margin-top: 8px; }
.section-head p { color: var(--muted); margin-top: 12px; font-size: 15px; }
.section-head.left { margin-left: 0; text-align: left; }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: 12px; font-size: 14px; font-weight: 700; transition: all .2s; white-space: nowrap; text-align: center; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 25px rgba(var(--accent-rgb),.35); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 0 35px rgba(var(--accent-rgb),.55); transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--title); border: 1px solid var(--border); font-weight: 600; box-shadow: var(--card-shadow); }
.btn-secondary:hover { border-color: var(--accent); }
.btn-ghost { color: var(--muted); font-weight: 600; padding: 10px 14px; }
.btn-ghost:hover { color: var(--title); }
.btn-danger { background: transparent; color: var(--rose); border: 1px solid color-mix(in srgb, var(--rose) 40%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--rose) 10%, transparent); }
.btn-sm { padding: 10px 16px; font-size: 13px; border-radius: 10px; }
.btn-xs { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--card-shadow); transition: border-color .2s, transform .2s, background-color .2s; }
.card-lg { border-radius: 24px; }
.card-hover:hover { border-color: var(--accent-line); }
.card-lift:hover { transform: translateY(-3px); }
.pad { padding: 24px; } .pad-sm { padding: 16px; } .pad-lg { padding: 32px; }
.inner { background: var(--inner); border: 1px solid var(--inner-border); border-radius: 12px; }
.icon-tile { display: inline-flex; align-self: flex-start; width: fit-content; padding: 10px; border-radius: 12px; background: var(--inner); border: 1px solid var(--inner-border); color: var(--accent-text); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-family: var(--font-mono); font-size: 11px; color: var(--accent-text); letter-spacing: .04em; box-shadow: var(--card-shadow); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; flex-shrink: 0; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.divider { height: 1px; background: var(--border); border: 0; margin: 20px 0; }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; border: 1px solid var(--border); background: var(--inner); color: var(--muted); white-space: nowrap; }
.tag-emerald { color: var(--accent-text); border-color: var(--accent-line); background: var(--accent-soft); }
.tag-cyan { color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 35%, transparent); }
.tag-amber { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 35%, transparent); }
.tag-blue { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 35%, transparent); }
.tag-rose { color: var(--rose); border-color: color-mix(in srgb, var(--rose) 35%, transparent); }
.tag-sky { color: var(--sky); border-color: color-mix(in srgb, var(--sky) 35%, transparent); }

.link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--accent-text); }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.price { font-family: var(--font-mono); font-weight: 700; color: var(--title); }
.price s { color: var(--faint); font-weight: 500; margin-left: 6px; font-size: .85em; }

/* placeholder media */
.media { position: relative; border-radius: 12px; overflow: hidden; display: grid; place-items: center; color: rgba(255,255,255,.85);
  background: radial-gradient(circle at 30% 20%, rgba(16,185,129,.35), transparent 55%), radial-gradient(circle at 80% 80%, rgba(45,212,191,.22), transparent 50%), linear-gradient(135deg, #0f1f1a, #0a0a0a); }
.media.alt { background: radial-gradient(circle at 70% 30%, rgba(34,211,238,.30), transparent 55%), linear-gradient(135deg, #0c1a22, #0a0a0a); }
.media.warm { background: radial-gradient(circle at 30% 70%, rgba(251,191,36,.28), transparent 55%), linear-gradient(135deg, #1f190c, #0a0a0a); }
.media.violet { background: radial-gradient(circle at 60% 30%, rgba(167,139,250,.28), transparent 55%), linear-gradient(135deg, #16122a, #0a0a0a); }
.media [data-i] svg { width: 36px; height: 36px; opacity: .9; }
.media-label { position: absolute; left: 12px; top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.media-label .tag { background: rgba(0,0,0,.55); color: #e5e7eb; border-color: rgba(255,255,255,.12); }
.media-label .tag-emerald { color: #34d399; border-color: rgba(52,211,153,.4); }
.ratio-16 { aspect-ratio: 16/9; } .ratio-4 { aspect-ratio: 4/3; } .ratio-1 { aspect-ratio: 1/1; }

/* ---------- header ---------- */
.preview-note { background: #10b981; color: #000; text-align: center; font-size: 12px; font-weight: 700; padding: 6px 12px; font-family: var(--font-mono); }
.preview-note a { text-decoration: underline; }
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--title); letter-spacing: -0.02em; white-space: nowrap; }
.logo-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: #000; font-family: var(--font-mono); font-weight: 700; font-size: 13px; letter-spacing: -0.05em; box-shadow: 0 0 18px rgba(16,185,129,.4); background: #10b981; }
.logo .dim { color: var(--accent-text); }
.nav { display: none; gap: 2px; }
.nav a { padding: 8px 11px; font-size: 13px; font-weight: 500; color: var(--muted); border-radius: 8px; transition: color .15s, background .15s; }
.nav a:hover { color: var(--title); }
.nav a.active { color: var(--accent-text); background: var(--accent-soft); }
.header-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--muted); border: 1px solid transparent; transition: all .15s; }
.icon-btn:hover { color: var(--title); border-color: var(--border); background: var(--surface); }
.count-badge { position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 800; display: grid; place-items: center; font-family: var(--font-mono); }
.hide-mobile { display: none !important; }
@media (min-width: 1100px) { .nav { display: flex; } .hide-mobile { display: inline-flex !important; } .menu-btn { display: none !important; } }
.theme-light { display: none !important; }
html.light .theme-light { display: inline-flex !important; }
html.light .theme-dark { display: none !important; }
.drawer { display: none; border-top: 1px solid var(--border); background: var(--bg); max-height: calc(100vh - 68px); overflow: auto; }
.drawer.open { display: block; }
.drawer nav { display: grid; padding: 12px 16px 16px; gap: 2px; }
.drawer nav a { padding: 12px; border-radius: 10px; font-weight: 600; color: var(--muted); }
.drawer nav a:hover, .drawer nav a.active { background: var(--surface); color: var(--title); }
.drawer .drawer-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px 20px; }

/* ---------- page hero + breadcrumb ---------- */
.page-hero { position: relative; overflow: hidden; padding: 48px 0 40px; border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 800; margin-top: 10px; }
.page-hero p.lead { color: var(--muted); font-size: 17px; max-width: 720px; margin-top: 14px; }
.bg-grid { position: absolute; inset: 0; background-size: 36px 36px; pointer-events: none;
  background-image: linear-gradient(to right, var(--grid) 1px, transparent 1px), linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 40%, transparent 100%); -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 40%, transparent 100%); }
.bg-glow { position: absolute; left: 50%; top: -160px; width: 900px; height: 560px; transform: translateX(-50%); background: radial-gradient(ellipse at center, var(--glow), transparent 65%); pointer-events: none; }
.rel { position: relative; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--faint); font-family: var(--font-mono); }
.breadcrumb a:hover { color: var(--accent-text); }
.breadcrumb span.sep { opacity: .6; }

/* ---------- home hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 80px; }
.hero-content { position: relative; text-align: center; max-width: 960px; margin: 0 auto; }
.hero h1 { font-size: clamp(36px, 7vw, 76px); font-weight: 800; line-height: 1.06; margin-top: 24px; }
.hero-sub { color: var(--muted); font-size: clamp(16px, 2vw, 19px); max-width: 680px; margin: 20px auto 0; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 32px; }
.hero-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-top: 28px; font-size: 13px; color: var(--muted); }
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust [data-i] { color: var(--accent-text); }
.hero-trust [data-i] svg { width: 16px; height: 16px; }
.pillars { position: relative; display: grid; gap: 16px; margin-top: 56px; }
@media (min-width: 900px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar { display: flex; flex-direction: column; gap: 14px; padding: 24px; text-align: left; }
.pillar-top { display: flex; align-items: center; justify-content: space-between; }
.pillar-num { font-family: var(--font-mono); font-size: 12px; color: var(--faint); }
.pillar h3 { font-size: 20px; font-weight: 700; }
.pillar p { color: var(--muted); font-size: 14px; }
.pillar-link { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--accent-text); }

/* ---------- product / game cards ---------- */
.cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards.cols-3 { grid-template-columns: repeat(3, 1fr); } .cards.cols-4 { grid-template-columns: repeat(4, 1fr); } }
.pcard { display: flex; flex-direction: column; overflow: hidden; }
.pcard .media { border-radius: 0; aspect-ratio: 16/10; }
.pcard-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pcard h3 { font-size: 16px; font-weight: 700; }
.pcard h3 a:hover { color: var(--accent-text); }
.pcard p { font-size: 13px; color: var(--muted); }
.pcard-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.pcard-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pcard .price { font-size: 17px; }
.row-card { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 12px; align-items: center; }
@media (min-width: 480px) { .row-card { grid-template-columns: 120px 1fr; } }
.row-card .media { aspect-ratio: 4/3; }
.row-card h4 { font-size: 15px; font-weight: 700; }

.play-btn { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: var(--accent); color: var(--on-accent); box-shadow: 0 0 40px rgba(var(--accent-rgb),.6); transition: transform .2s; }
.play-btn:hover { transform: scale(1.08); }
.play-btn svg { fill: currentColor; stroke: currentColor; margin-left: 3px; }
.overlay-center { position: absolute; inset: 0; display: grid; place-items: center; }

/* ---------- category tiles ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 768px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .cat-grid { grid-template-columns: repeat(6, 1fr); } }
.cat { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; padding: 16px; min-height: 140px; text-align: left; }
.cat strong { display: block; font-family: var(--font-display); font-size: 14px; color: var(--title); }
.cat:hover strong { color: var(--accent-text); }
.cat span.d { font-size: 12px; color: var(--muted); }

/* ---------- steps / timeline ---------- */
.steps { display: grid; gap: 10px; list-style: none; }
.steps li { display: flex; gap: 14px; align-items: flex-start; padding: 14px; }
.step-num { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); font-family: var(--font-mono); font-weight: 700; font-size: 13px; flex-shrink: 0; border: 1px solid var(--accent-line); }
.steps strong { display: block; color: var(--title); font-size: 14px; }
.steps .muted { font-size: 13px; }
.timeline { display: grid; gap: 12px; list-style: none; }
@media (min-width: 900px) { .timeline { grid-template-columns: repeat(4, 1fr); } }
.tl { padding: 20px; }
.tl .step-num { margin-bottom: 14px; }
.tl h4 { font-size: 16px; font-weight: 700; }
.tl p { font-size: 13px; color: var(--muted); margin-top: 6px; }
.code-chip { display: inline-block; padding: 4px 10px; border-radius: 8px; font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--accent-text); background: var(--accent-soft); border: 1px dashed var(--accent-line); }
.code-chip.big { font-size: 22px; padding: 10px 18px; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text); }
.check [data-i] { color: var(--accent-text); margin-top: 2px; }
.check [data-i] svg { width: 18px; height: 18px; }
.checklist { display: grid; gap: 10px; list-style: none; }
.x-item [data-i] { color: var(--rose); }

/* stats */
.stat { padding: 16px; }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-family: var(--font-mono); font-weight: 800; font-size: 22px; color: var(--title); margin-top: 2px; }
.stat .v.accent { color: var(--accent-text); }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, 1fr); } }

/* packages */
.pkg { padding: 24px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.pkg.rec { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 40px rgba(var(--accent-rgb),.12); }
.rec-badge { position: absolute; top: -11px; left: 24px; background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 800; font-family: var(--font-mono); padding: 3px 9px; border-radius: 99px; letter-spacing: .05em; }
.pkg .amount { font-family: var(--font-mono); font-size: 34px; font-weight: 800; color: var(--title); }
.pkg .amount small { font-size: 13px; color: var(--muted); font-weight: 500; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab-btn { padding: 12px 14px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tab-btn:hover { color: var(--title); }
.tab-btn.active { color: var(--accent-text); border-bottom-color: var(--accent); }
.tab-panel { padding-top: 24px; }

/* ---------- sidebar layouts ---------- */
.with-sidebar { display: grid; gap: 24px; }
@media (min-width: 1024px) { .with-sidebar { grid-template-columns: 260px 1fr; align-items: start; } .with-sidebar.right { grid-template-columns: 1fr 380px; } }
@media (min-width: 1024px) { .sticky { position: sticky; top: 88px; } }
/* mobile: sidebars become horizontal scroll strips */
@media (max-width: 1023px) {
  .filter-aside .side-nav, .dash .side-nav { display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .filter-aside .side-nav::-webkit-scrollbar, .dash .side-nav::-webkit-scrollbar { display: none; }
  .filter-aside .side-nav > *, .dash .side-nav > * { width: auto; white-space: nowrap; flex-shrink: 0; }
  .dash .side-nav hr { display: none; }
  .filter-aside .filter-group + .filter-group { display: none; }
  .filter-aside { padding: 8px !important; }
  .filter-aside .filter-group { padding: 0; }
  .filter-aside h4 { display: none; }
}
.filter-group { padding: 16px 0; border-bottom: 1px solid var(--border); }
.filter-group:last-child { border-bottom: 0; }
.filter-group h4 { font-size: 12px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 12px; font-weight: 600; color: var(--muted); transition: all .15s; }
.chip:hover { color: var(--title); border-color: var(--accent-line); }
.chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.side-nav { display: grid; gap: 2px; }
.side-nav a, .side-nav button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted); text-align: left; width: 100%; }
.side-nav a:hover, .side-nav button:hover { color: var(--title); background: var(--inner); }
.side-nav .active { color: var(--accent-text); background: var(--accent-soft); }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; }
.form-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--text); }
.field .hint { font-size: 12px; color: var(--faint); }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=range]), .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; background: var(--inner); border: 1px solid var(--inner-border); color: var(--title); font: inherit; font-size: 14px; transition: border-color .15s; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { min-height: 110px; resize: vertical; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); cursor: pointer; }
.checkbox input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }
.checkbox a { color: var(--accent-text); text-decoration: underline; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.radio-cards { display: grid; gap: 10px; }
@media (min-width: 640px) { .radio-cards.cols-2 { grid-template-columns: 1fr 1fr; } .radio-cards.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.radio-card { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: all .15s; }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card:hover { border-color: var(--accent-line); }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio-card strong { display: block; color: var(--title); font-size: 14px; }
.radio-card span.d { font-size: 12px; color: var(--muted); }
.upload { display: grid; place-items: center; gap: 6px; padding: 28px 16px; border: 1px dashed var(--border); border-radius: 14px; background: var(--inner); text-align: center; cursor: pointer; color: var(--muted); font-size: 13px; }
.upload:hover { border-color: var(--accent); color: var(--title); }
.upload input { display: none; }
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; font-size: 13px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--text); }
.notice [data-i] { color: var(--accent-text); }
.notice.warn { border-color: color-mix(in srgb, var(--amber) 40%, transparent); background: color-mix(in srgb, var(--amber) 8%, transparent); }
.notice.warn [data-i] { color: var(--amber); }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.table th { text-align: left; padding: 12px 16px; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 600; border-bottom: 1px solid var(--border); background: var(--inner); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.num { font-family: var(--font-mono); font-weight: 700; color: var(--title); }

/* ---------- dashboards ---------- */
.dash { display: grid; gap: 24px; padding: 32px 0 72px; }
@media (min-width: 1024px) { .dash { grid-template-columns: 250px 1fr; align-items: start; } }
.dash-user { display: flex; gap: 12px; align-items: center; padding: 16px; }
.avatar { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-weight: 800; font-family: var(--font-display); border: 1px solid var(--accent-line); flex-shrink: 0; }
.progress { height: 8px; border-radius: 99px; background: var(--inner); border: 1px solid var(--inner-border); overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-hover)); border-radius: 99px; }
.empty { display: grid; place-items: center; gap: 10px; text-align: center; padding: 48px 16px; color: var(--muted); font-size: 14px; }
.empty [data-i] svg { width: 32px; height: 32px; color: var(--faint); }

/* stepper */
.stepper { display: flex; gap: 6px; margin-bottom: 24px; }
.stepper span { flex: 1; height: 4px; border-radius: 99px; background: var(--inner-border); }
.stepper span.done { background: var(--accent); }
.wizard-step { display: none; }
.wizard-step.active { display: grid; gap: 16px; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 16px; background: var(--overlay); backdrop-filter: blur(4px); }
.modal.open { display: grid; }
.modal-box { width: 100%; max-width: 520px; padding: 28px; max-height: calc(100vh - 32px); overflow: auto; }
.modal-box.wide { max-width: 720px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.modal-head h3 { font-size: 20px; font-weight: 800; margin-top: 4px; }

/* search modal */
.search-results { display: grid; gap: 4px; margin-top: 12px; max-height: 50vh; overflow: auto; }
.search-results a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; font-size: 14px; color: var(--text); }
.search-results a:hover { background: var(--inner); color: var(--accent-text); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); z-index: 200; opacity: 0; pointer-events: none; transition: all .25s; display: flex; gap: 10px; align-items: center; padding: 12px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--accent); color: var(--title); font-size: 13px; font-weight: 600; box-shadow: 0 10px 40px rgba(0,0,0,.35); max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast [data-i] { color: var(--accent-text); }

/* cookie banner */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; max-width: 520px; padding: 18px 20px; display: grid; gap: 12px; font-size: 13px; }
@media (min-width: 640px) { .cookie { left: 24px; right: auto; } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--card-shadow); transition: border-color .2s; }
.faq details[open] { border-color: var(--accent-line); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-weight: 600; color: var(--title); font-size: 15px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary [data-i] { transition: transform .2s; color: var(--muted); }
.faq details[open] summary [data-i] { transform: rotate(45deg); color: var(--accent-text); }
.faq .answer { padding: 0 20px 18px; color: var(--muted); font-size: 14px; }

/* ---------- prose (articles, legal) ---------- */
.prose { color: var(--text); font-size: 16px; line-height: 1.8; }
.prose h2 { font-size: 26px; font-weight: 800; margin: 40px 0 12px; }
.prose h3 { font-size: 19px; font-weight: 700; margin: 28px 0 10px; }
.prose p { margin: 0 0 16px; color: var(--muted); }
.prose ul, .prose ol { margin: 0 0 16px 20px; color: var(--muted); }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--accent-text); text-decoration: underline; }
.prose code { font-family: var(--font-mono); font-size: 13px; padding: 2px 6px; border-radius: 6px; background: var(--inner); border: 1px solid var(--inner-border); }
.prose .draft { padding: 12px 14px; border-radius: 10px; border: 1px dashed color-mix(in srgb, var(--amber) 50%, transparent); color: var(--amber); font-size: 13px; margin-bottom: 20px; }
.toc { display: grid; gap: 6px; font-size: 13px; }
.toc a { color: var(--muted); padding: 4px 0; }
.toc a:hover { color: var(--accent-text); }

/* ---------- CTA + footer ---------- */
.cta-band { position: relative; overflow: hidden; padding: 56px 24px; text-align: center; border-color: var(--accent-line); }
.cta-band::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 80% at 50% 0%, var(--glow), transparent 70%); pointer-events: none; }
.cta-band > * { position: relative; }
.cta-band h2 { font-size: clamp(28px, 5vw, 46px); font-weight: 800; }
.cta-band p { color: var(--muted); margin-top: 12px; }
.footer { border-top: 1px solid var(--border); padding: 56px 0 28px; margin-top: 72px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.5fr repeat(4, 1fr); } }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 900px) { .footer-brand { grid-column: auto; } }
.footer-brand p { color: var(--muted); font-size: 13px; margin-top: 14px; max-width: 300px; }
.footer h5 { margin: 0 0 14px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer ul a { font-size: 13px; color: var(--muted); }
.footer ul a:hover { color: var(--accent-text); }
.socials { display: flex; gap: 6px; margin-top: 18px; }
.newsletter { display: flex; gap: 8px; margin-top: 16px; max-width: 320px; }
.newsletter .input { padding: 10px 12px; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; font-size: 12px; color: var(--faint); }

/* ---------- sitemap (prototype only) ---------- */
.map-group { padding: 20px; }
.map-group h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; display: flex; gap: 8px; align-items: center; }
.map-group ul { list-style: none; display: grid; gap: 8px; }
.map-group li a { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 8px 10px; border-radius: 8px; background: var(--inner); border: 1px solid var(--inner-border); }
.map-group li a:hover { border-color: var(--accent); color: var(--accent-text); }
.map-group li a span.kw { font-family: var(--font-mono); font-size: 11px; color: var(--faint); text-align: right; }

/* html5 game canvas */
.game-frame { position: relative; aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; background: #050807; border: 1px solid var(--border); }
.game-frame canvas { width: 100%; height: 100%; display: block; }


/* =========================================================
   MODULE COLOUR SYSTEM
   Neutrals + status colours never change. Only the accent
   changes per module (body[data-module] or .mod-* on a section).
   Hub = Emerald (brand) · Games & Code = Blue · Test Your Game = Crimson
   Play & Earn = Gold · Studio Services = Violet
   ========================================================= */
.mod-hub, body[data-module="hub"] {
  --accent: #10b981; --accent-hover: #34d399; --accent-text: #34d399; --accent-rgb: 16,185,129; --on-accent: #000;
  --accent-soft: rgba(16,185,129,.10); --accent-line: rgba(16,185,129,.30); --grid: rgba(16,185,129,.07); --glow: rgba(16,185,129,.18);
  --grad: linear-gradient(90deg, #34d399, #5eead4, #10b981);
}
.mod-market, body[data-module="market"] {
  --accent: #2563eb; --accent-hover: #3b82f6; --accent-text: #60a5fa; --accent-rgb: 59,130,246; --on-accent: #fff;
  --accent-soft: rgba(59,130,246,.12); --accent-line: rgba(59,130,246,.38); --grid: rgba(59,130,246,.07); --glow: rgba(59,130,246,.20);
  --grad: linear-gradient(90deg, #60a5fa, #38bdf8, #3b82f6);
}
.mod-test, body[data-module="test"] {
  --accent: #e11d48; --accent-hover: #f43f5e; --accent-text: #fb7185; --accent-rgb: 244,63,94; --on-accent: #fff;
  --accent-soft: rgba(244,63,94,.12); --accent-line: rgba(244,63,94,.38); --grid: rgba(244,63,94,.07); --glow: rgba(244,63,94,.18);
  --grad: linear-gradient(90deg, #fb7185, #fb923c, #f43f5e);
}
.mod-earn, body[data-module="earn"] {
  --accent: #f59e0b; --accent-hover: #fbbf24; --accent-text: #fbbf24; --accent-rgb: 245,158,11; --on-accent: #000;
  --accent-soft: rgba(245,158,11,.12); --accent-line: rgba(245,158,11,.38); --grid: rgba(245,158,11,.07); --glow: rgba(245,158,11,.18);
  --grad: linear-gradient(90deg, #fde047, #fbbf24, #f59e0b);
}
.mod-services, body[data-module="services"] {
  --accent: #7c3aed; --accent-hover: #8b5cf6; --accent-text: #a78bfa; --accent-rgb: 139,92,246; --on-accent: #fff;
  --accent-soft: rgba(139,92,246,.12); --accent-line: rgba(139,92,246,.40); --grid: rgba(139,92,246,.07); --glow: rgba(139,92,246,.20);
  --grad: linear-gradient(90deg, #c4b5fd, #a78bfa, #8b5cf6);
}
/* light mode: darker accent TEXT so it passes WCAG AA on white */
html.light .mod-hub, html.light body[data-module="hub"] { --accent-text: #047857; --accent-hover: #059669; --accent-line: rgba(5,150,105,.35); --grad: linear-gradient(90deg, #059669, #0d9488, #047857); }
html.light .mod-market, html.light body[data-module="market"] { --accent-text: #1d4ed8; --accent-hover: #1d4ed8; --grad: linear-gradient(90deg, #1d4ed8, #0369a1, #2563eb); }
html.light .mod-test, html.light body[data-module="test"] { --accent-text: #be123c; --accent-hover: #be123c; --grad: linear-gradient(90deg, #be123c, #c2410c, #e11d48); }
html.light .mod-earn, html.light body[data-module="earn"] { --accent-text: #b45309; --accent-hover: #d97706; --grad: linear-gradient(90deg, #b45309, #a16207, #c2410c); }
html.light .mod-services, html.light body[data-module="services"] { --accent-text: #6d28d9; --accent-hover: #6d28d9; --grad: linear-gradient(90deg, #6d28d9, #7c3aed, #5b21b6); }

/* module cue: coloured line under the header */
.site-header { box-shadow: inset 0 -2px 0 rgba(var(--accent-rgb), .9); }
.module-chip { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); }
.module-chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(var(--accent-rgb), .8); }
.mod-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.mod-dot.hub { background: #10b981; } .mod-dot.market { background: #3b82f6; } .mod-dot.test { background: #f43f5e; } .mod-dot.earn { background: #f59e0b; } .mod-dot.services { background: #8b5cf6; }
.tint { background: linear-gradient(180deg, rgba(var(--accent-rgb), .06), transparent 55%); border-top: 1px solid rgba(var(--accent-rgb), .18); padding-top: 72px !important; }
.card.accent-edge { border-color: var(--accent-line); }
.card.accent-top { border-top: 3px solid var(--accent); }

/* ---------- mega menu ---------- */
.nav { align-items: center; }
.nav-item { position: relative; }
.nav-item > a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; font-size: 13px; font-weight: 600; color: var(--muted); border-radius: 8px; white-space: nowrap; }
.nav-item > a:hover, .nav-item:hover > a, .nav-item:focus-within > a { color: var(--title); }
.nav-item.active > a { color: var(--title); background: var(--surface); }
.nav-item .chev svg { width: 12px; height: 12px; opacity: .6; }
.mega { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(6px); padding: 20px; display: grid; gap: 22px; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s, visibility .18s; z-index: 60; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.nav-item:hover .mega, .nav-item:focus-within .mega { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.mega::before { content: ''; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.mega h6 { margin: 0 0 8px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.mega a { display: block; padding: 7px 10px; border-radius: 8px; font-size: 13px; color: var(--text); }
.mega a small { display: block; font-size: 11px; color: var(--faint); margin-top: 1px; }
.mega a:hover { background: var(--inner); color: var(--accent-text); }
.mega .mega-cta { margin-top: 6px; color: var(--accent-text); font-weight: 700; }
@media (min-width: 1100px) and (max-width: 1320px) { .nav-item > a { padding: 8px 7px; font-size: 12.5px; } }
.drawer details { border-radius: 10px; }
.drawer summary { list-style: none; cursor: pointer; padding: 12px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 10px; border-radius: 10px; }
.drawer summary::-webkit-details-marker { display: none; }
.drawer details[open] summary { color: var(--title); background: var(--surface); }
.drawer details a { display: block; padding: 8px 12px 8px 30px; font-size: 14px; font-weight: 500; color: var(--muted); }
.drawer details a:hover { color: var(--title); }

/* ---------- live board ---------- */
.board { overflow: hidden; }
.board-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.live { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #ef4444; }
.live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; animation: pulse 1.4s infinite; }
.seg { display: inline-flex; flex-wrap: wrap; padding: 4px; gap: 4px; border-radius: 12px; background: var(--inner); border: 1px solid var(--inner-border); }
.seg button { padding: 8px 12px; border-radius: 9px; font-size: 12px; font-weight: 700; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.seg button.active { background: var(--surface); color: var(--title); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.seg button .mod-dot { width: 7px; height: 7px; }
.board-stats { display: grid; grid-template-columns: repeat(2, 1fr); border-bottom: 1px solid var(--border); }
@media (min-width: 900px) { .board-stats { grid-template-columns: repeat(4, 1fr); } }
.board-stats > div { padding: 16px 20px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: -1px; }
.board-stats .v { font-family: var(--font-mono); font-size: 22px; font-weight: 800; color: var(--title); }
.board-stats .k { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.board-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.board-tools select { padding: 8px 34px 8px 12px; font-size: 13px; }
.board-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--border); font-size: 14px; }
.board-row.job { grid-template-columns: 1fr auto; }
.board-row:last-child { border-bottom: 0; }
.board-row:hover { background: var(--inner); }
.rank { font-family: var(--font-mono); font-weight: 800; color: var(--faint); text-align: center; }
.rank.top { color: #f59e0b; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who .avatar { width: 36px; height: 36px; border-radius: 10px; font-size: 12px; }
.who strong { color: var(--title); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.who span.meta { font-size: 12px; color: var(--muted); }
.badge-verified, .badge-pending { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; font-family: var(--font-sans); }
.badge-verified { color: #10b981; }
html.light .badge-verified { color: #047857; }
.badge-pending { color: var(--faint); }
.badge-verified svg, .badge-pending svg { width: 13px; height: 13px; }
.board-foot { padding: 14px 20px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; background: var(--inner); border-top: 1px solid var(--border); }
.xp { font-family: var(--font-mono); font-weight: 700; color: var(--title); font-size: 13px; text-align: right; white-space: nowrap; }
.xp small { display: block; color: var(--faint); font-weight: 500; font-size: 11px; }
.reward-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 99px; font-family: var(--font-mono); font-weight: 800; font-size: 13px; color: #000; background: #f59e0b; }

/* ---------- platform buttons (services module) ---------- */
.platforms { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 768px) { .platforms { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .platforms { grid-template-columns: repeat(6, 1fr); } }
.platform { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px; min-height: 156px; }
.pf-mark { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 18px; color: #fff; flex-shrink: 0; }
.platform strong { font-family: var(--font-display); color: var(--title); font-size: 15px; display: block; }
.platform span.d { font-size: 12px; color: var(--muted); }
.platform:hover strong { color: var(--accent-text); }

/* ---------- product quick facts ---------- */
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 900px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.fact { display: flex; gap: 10px; align-items: flex-start; padding: 12px; }
.fact [data-i] { color: var(--accent-text); margin-top: 2px; }
.fact strong { display: block; font-size: 13px; color: var(--title); }
.fact span.d { font-size: 11px; color: var(--muted); }
pre.code { margin: 0; padding: 16px; border-radius: 12px; background: #050607; border: 1px solid var(--inner-border); color: #d4d4d8; font-family: var(--font-mono); font-size: 12px; line-height: 1.7; overflow-x: auto; }
pre.code .c { color: #71717a; } pre.code .k { color: #60a5fa; } pre.code .s { color: #fbbf24; }

/* ---------- colour guide ---------- */
.swatch { overflow: hidden; }
.swatch .sw { height: 110px; display: flex; align-items: flex-end; justify-content: space-between; padding: 12px 14px; font-family: var(--font-mono); font-size: 12px; font-weight: 700; }
.board-tools .field { min-width: 190px; }

/* logo always keeps the brand emerald */
.logo .dim { color: #34d399; }
html.light .logo .dim { color: #047857; }

/* ---------- sale: banner, countdown, tag ---------- */
.sale-bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 10px; padding: 8px 16px; font-size: 13px; color: #fff; background: linear-gradient(90deg, #be123c, #e11d48 40%, #f59e0b); text-align: center; }
.sale-bar strong { color: #fff; }
.sale-bar .sale-cta { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.sale-bar .sale-tag { background: #fff; color: #be123c; }
@media (max-width: 640px) { .sale-bar .hide-xs { display: none; } }
.sale-tag { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 6px; font-family: var(--font-mono); font-size: 11px; font-weight: 800; letter-spacing: .04em; background: #e11d48; color: #fff; }
.cd { display: flex; gap: 10px; flex-wrap: wrap; }
.cd-box { min-width: 70px; padding: 12px 10px; border-radius: 14px; background: var(--inner); border: 1px solid var(--inner-border); text-align: center; }
.cd-box span { display: block; font-family: var(--font-mono); font-size: 30px; font-weight: 800; color: var(--title); line-height: 1.1; }
.cd-box small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.cd.sm .cd-box { min-width: 54px; padding: 8px 6px; border-radius: 10px; }
.cd.sm .cd-box span { font-size: 20px; }
.sale-box { padding: 16px; border-radius: 16px; border: 1px solid rgba(225,29,72,.4); background: linear-gradient(135deg, rgba(225,29,72,.10), rgba(245,158,11,.08)); display: grid; gap: 10px; }
.field select[multiple] { background-image: none; padding-right: 14px; min-height: 180px; }

/* ---------- countdown on product cards ---------- */
.card-timer { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 8px; background: rgba(0,0,0,.7); border: 1px solid rgba(225,29,72,.5); color: #fff; font-family: var(--font-mono); font-size: 11px; font-weight: 700; backdrop-filter: blur(4px); }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: #f43f5e; animation: pulse 1.2s infinite; }
/* ---------- demo auto-fill (prototype only) ---------- */
.demo-fab { position: fixed; left: 16px; bottom: 16px; z-index: 95; display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 999px; background: #fbbf24; color: #000; font-weight: 800; font-size: 13px; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.demo-panel { position: fixed; left: 16px; bottom: 64px; z-index: 96; width: min(380px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; padding: 16px; display: grid; gap: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.demo-panel[hidden] { display: none; }
.demo-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--inner); border: 1px solid var(--inner-border); }
.cookie { bottom: 72px; }
/* autotest page */
.at-layout { display: grid; gap: 20px; }
@media (min-width: 1100px) { .at-layout { grid-template-columns: 1fr 1fr; align-items: start; } }
.at-frame { width: 100%; height: 640px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg); }
.at-log { font-family: var(--font-mono); font-size: 11px; color: var(--muted); white-space: pre-wrap; max-height: 120px; overflow: auto; }

/* ---------- home hero slider (5 slides, one per module) ---------- */
.hero-slider { position: relative; overflow: hidden; }
.slides { display: grid; }
.slide { grid-area: 1 / 1; position: relative; overflow: hidden; padding: 72px 0 104px; opacity: 0; visibility: hidden; transform: translateX(24px); transition: opacity .6s ease, transform .6s ease, visibility .6s; }
.slide.active { opacity: 1; visibility: visible; transform: none; }
.slide.leaving { transform: translateX(-24px); }
.slide .hero-content { position: relative; text-align: center; max-width: 960px; margin: 0 auto; }
.slide .module-chip { justify-content: center; }
.hero-title { font-size: clamp(34px, 6.5vw, 72px); font-weight: 800; line-height: 1.06; margin-top: 22px; }
.s-arrow { position: absolute; top: 44%; z-index: 3; display: none; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); color: var(--title); box-shadow: var(--card-shadow); transition: all .2s; }
.s-arrow:hover { border-color: var(--accent); color: var(--accent-text); }
.s-arrow.prev { left: 24px; } .s-arrow.next { right: 24px; }
@media (min-width: 1024px) { .s-arrow { display: grid; } }
.slider-ui { position: absolute; left: 0; right: 0; bottom: 36px; z-index: 3; display: flex; justify-content: center; align-items: center; gap: 14px; }
.sdots { display: flex; gap: 8px; }
.sdots button { position: relative; width: 28px; height: 6px; border-radius: 99px; background: var(--inner-border); overflow: hidden; transition: width .3s; padding: 0; }
.sdots button::before { content: ''; position: absolute; inset: -10px 0; } /* bigger tap area */
.sdots button.active { width: 56px; }
.sdots button span { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--c); border-radius: 99px; }
.sdots button.done span { width: 100%; }
.sdots button.active span { width: 100%; }
.hero-slider.playing .sdots button.active span { width: 0; animation: sfill var(--dur, 6s) linear forwards; }
@keyframes sfill { to { width: 100%; } }
.s-pause { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--muted); border: 1px solid var(--border); background: var(--surface); }
.s-pause:hover { color: var(--title); }
.s-pause svg { width: 14px; height: 14px; }
@media (prefers-reduced-motion: reduce) { .slide { transition: opacity .2s; transform: none !important; } }

/* ---------- hero slider: themed icon row ---------- */
.hero-icons { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hi { width: var(--s); height: var(--s); display: grid; place-items: center; border-radius: calc(var(--s) * .3); color: var(--accent-text); background: var(--accent-soft); border: 1px solid var(--accent-line); box-shadow: 0 0 28px rgba(var(--accent-rgb), .18), inset 0 1px 0 rgba(255,255,255,.04); animation: hfloat 4.2s ease-in-out infinite; animation-delay: var(--d); transition: transform .2s, box-shadow .2s; }
.hi svg { width: calc(var(--s) * .44); height: calc(var(--s) * .44); }
.hi:hover { box-shadow: 0 0 40px rgba(var(--accent-rgb), .45); }
@keyframes hfloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@media (max-width: 560px) { .hero-icons { gap: 10px; } .hi { --s: 40px !important; } .hi:nth-child(1), .hi:nth-child(7) { display: none; } }
@media (prefers-reduced-motion: reduce) { .hi { animation: none; } }

/* ---------- module 05: School ERP + Call Desk (teal) ---------- */
.mod-erp, body[data-module="erp"] {
  --accent: #0e7490; --accent-hover: #0891b2; --accent-text: #22d3ee; --accent-rgb: 6,182,212; --on-accent: #fff;
  --accent-soft: rgba(6,182,212,.12); --accent-line: rgba(6,182,212,.38); --grid: rgba(6,182,212,.07); --glow: rgba(6,182,212,.18);
  --grad: linear-gradient(90deg, #67e8f9, #22d3ee, #06b6d4);
}
html.light .mod-erp, html.light body[data-module="erp"] { --accent-text: #0e7490; --accent-hover: #155e75; --grad: linear-gradient(90deg, #0e7490, #0369a1, #155e75); }
.mod-dot.erp { background: #06b6d4; }
.grid-5 { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .grid-5 { grid-template-columns: repeat(5, 1fr); } }
.flow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.flow span.step { padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--title); font-size: 13px; font-weight: 600; }
.flow span.arr { color: var(--accent-text); font-weight: 800; }
.shot { display: flex; flex-direction: column; overflow: hidden; }
.shot .media { border-radius: 0; aspect-ratio: 16/10; }
.shot .pcard-body { padding: 14px; }

/* real product images (WooCommerce) */
.media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* WordPress admin bar */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
