/* ==========================================================================
   BlackCApk Design System
   Tokens → base → layout → components → pages → utilities → motion
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius-xs: 8px; --radius-sm: 12px; --radius-md: 16px; --radius-lg: 20px; --radius-xl: 28px;
  --blue: #3b82f6; --purple: #8b5cf6; --cyan: #22d3ee; --green: #22c55e; --amber: #f59e0b; --rose: #f43f5e;
  --ease: cubic-bezier(.2,.8,.2,1);
  --t-fast: 140ms var(--ease);
  --t-med: 240ms var(--ease);
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 64px;
}

:root, [data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0b10; --bg-elev: #0f1117; --surface: #13151d; --surface-2: #191c26; --surface-3: #20242f;
  --border: rgba(255,255,255,.08); --border-strong: rgba(255,255,255,.14);
  --text: #f3f4f8; --text-2: #b4b9c7; --text-3: #7f859a;
  --accent: #5b8cff; --accent-2: #8b5cf6; --accent-3: #22d3ee;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.25);
  --shadow-md: 0 6px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.5);
  --glow: 0 0 0 1px rgba(91,140,255,.35), 0 8px 32px rgba(91,140,255,.25);
  --header-bg: rgba(10,11,16,.72); --scrim: rgba(3,4,8,.7); --card-hover: rgba(255,255,255,.03);
  --success: #34d399; --warning: #fbbf24;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7fb; --bg-elev: #ffffff; --surface: #ffffff; --surface-2: #f1f3f8; --surface-3: #e7eaf2;
  --border: rgba(15,23,42,.08); --border-strong: rgba(15,23,42,.16);
  --text: #0b1020; --text-2: #3f4658; --text-3: #6b7280;
  --accent: #2f6df6; --accent-2: #7c3aed; --accent-3: #0891b2;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 2px 8px rgba(15,23,42,.05);
  --shadow-md: 0 8px 24px rgba(15,23,42,.08);
  --shadow-lg: 0 24px 60px rgba(15,23,42,.14);
  --glow: 0 0 0 1px rgba(47,109,246,.25), 0 8px 28px rgba(47,109,246,.2);
  --header-bg: rgba(255,255,255,.78); --scrim: rgba(15,23,42,.5); --card-hover: rgba(15,23,42,.02);
  --success: #059669; --warning: #d97706;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body { margin: 0; font-family: var(--font-sans); font-size: 16px; line-height: 1.55; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(91,140,255,.35); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 200; padding: 10px 14px; background: var(--accent); color: #fff; border-radius: var(--radius-xs); font-weight: 600; transition: top var(--t-fast); }
.skip-link:focus { top: 12px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(44px, 7vw, 80px); }
.section--tight { padding-block: clamp(28px, 4vw, 48px); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: clamp(20px, 3vw, 32px); }
.section-head h2 { font-size: clamp(22px, 2.6vw, 30px); }
.section-head p { color: var(--text-2); margin-top: 6px; font-size: 15px; max-width: 60ch; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-3)); }
.grid { display: grid; gap: clamp(14px, 2vw, 22px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 820px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 520px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 100; height: var(--header-h); background: var(--header-bg); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--border); }
.header__inner { height: 100%; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.03em; }
.brand__mark { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2) 60%, var(--accent-3)); color: #fff; box-shadow: 0 6px 16px rgba(91,140,255,.35); }
.brand__name { font-family: inherit; text-transform: none; }
.brand__name b { font-weight: 900; background: linear-gradient(90deg, var(--accent), var(--accent-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand__mark svg { width: 22px; height: 22px; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.nav a { padding: 8px 11px; border-radius: 10px; font-size: 14.5px; font-weight: 500; white-space: nowrap; color: var(--text-2); transition: color var(--t-fast), background var(--t-fast); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.header__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.header__search { position: relative; display: flex; align-items: center; gap: 8px; height: 40px; width: 240px; flex: 0 1 240px; min-width: 150px; padding: 0 12px; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; color: var(--text-3); font-size: 14px; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.header__search:hover, .header__search:focus-within { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.header__search > svg { width: 16px; height: 16px; flex: none; }
.header__search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); }
.header__search input::placeholder { color: var(--text-3); }
.kbd { font-family: var(--font-mono); font-size: 11px; padding: 2px 6px; border: 1px solid var(--border-strong); border-radius: 6px; color: var(--text-3); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); transition: all var(--t-fast); }
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
svg { width: 1em; height: 1em; flex: none; }
.chip svg { width: 14px; height: 14px; }
.eyebrow svg { width: 14px; height: 14px; }
.rating svg { width: 14px; height: 14px; }
.hero__stats svg, .toolbar svg, .muted svg { width: 14px; height: 14px; }
.theme-toggle .i-sun { display: none; }
[data-theme="light"] .theme-toggle .i-sun { display: block; }
[data-theme="light"] .theme-toggle .i-moon { display: none; }
.mobile-only { display: none; }
@media (max-width: 1120px) {
  .header__actions .header__cta { display: none; }
  .header__search { flex-basis: 190px; }
}
@media (max-width: 960px) {
  .nav, .header__search, .header__actions .header__cta { display: none; }
  .mobile-only { display: grid; }
}

/* Mobile drawer */
.drawer { position: fixed; inset: 0; z-index: 150; display: none; }
.drawer[data-open="true"] { display: block; }
.drawer__scrim { position: absolute; inset: 0; background: var(--scrim); animation: fade .2s var(--ease); }
.drawer__panel { position: absolute; top: 0; right: 0; height: 100%; width: min(86vw, 360px); background: var(--bg-elev); border-left: 1px solid var(--border); padding: 18px; overflow-y: auto; animation: slideIn .28s var(--ease); display: flex; flex-direction: column; gap: 18px; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; }
.drawer__nav a { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px; border-radius: 12px; font-weight: 600; font-size: 16px; color: var(--text); }
.drawer__nav a:hover, .drawer__nav a[aria-current="page"] { background: var(--surface-2); }
.drawer__nav svg { width: 16px; height: 16px; color: var(--text-3); }
.drawer__foot { margin-top: auto; display: flex; gap: 8px; }
.drawer__search { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 12px; }
.drawer__search svg { width: 16px; height: 16px; color: var(--text-3); }
.drawer__search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 600; font-size: 15px; white-space: nowrap; transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast), border-color var(--t-fast), filter var(--t-fast); border: 1px solid transparent; user-select: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn--primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 6px 18px rgba(91,140,255,.28); }
.btn--primary:hover { box-shadow: 0 10px 28px rgba(91,140,255,.38); filter: brightness(1.06); }
.btn--secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn--secondary:hover { background: var(--surface-2); }
.btn--ghost { color: var(--text-2); }
.btn--ghost:hover { color: var(--text); background: var(--surface-2); }
.btn--sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn--lg { height: 54px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.btn--block { width: 100%; }
.btn--success { background: var(--success); color: #05231a; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--accent); font-size: 14.5px; white-space: nowrap; }
.link-arrow svg { width: 16px; height: 16px; transition: transform var(--t-fast); }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; }
.badge svg { width: 12px; height: 12px; }
.badge--accent { background: rgba(91,140,255,.12); color: var(--accent); border-color: rgba(91,140,255,.25); }
.badge--success { background: rgba(52,211,153,.12); color: var(--success); border-color: rgba(52,211,153,.25); }
.badge--game { background: rgba(139,92,246,.14); color: #a78bfa; border-color: rgba(139,92,246,.25); }
[data-theme="light"] .badge--game { color: #6d28d9; }
.badge--app { background: rgba(34,211,238,.12); color: var(--accent-3); border-color: rgba(34,211,238,.25); }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 14px; font-weight: 500; color: var(--text-2); transition: all var(--t-fast); }
.chip:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-1px); }
.chip[aria-current="true"] { color: #fff; background: var(--accent); border-color: var(--accent); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chip-scroll::-webkit-scrollbar { display: none; }
.chip-scroll .chip { flex: none; }
.rating { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 13px; color: var(--text); }
.rating svg { width: 14px; height: 14px; color: var(--amber); }
.rating small { color: var(--text-3); font-weight: 500; }

/* ---------- Cards ---------- */
.card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med); overflow: hidden; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card:focus-within { border-color: var(--accent); }
.card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card .btn, .card a.chip { position: relative; z-index: 2; }

.fcard { display: flex; flex-direction: column; }
.fcard__cover { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.fcard__cover img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform .6s var(--ease); }
.card:hover .fcard__cover img { transform: scale(1.06); }
.fcard__cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, var(--surface) 100%); }
.fcard__badges { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; gap: 8px; z-index: 1; }
.fcard__body { display: flex; flex-direction: column; gap: 12px; padding: 0 18px 18px; margin-top: -34px; position: relative; }
.fcard__top { display: flex; align-items: flex-end; gap: 14px; }
.fcard__logo { width: 72px; height: 72px; border-radius: 18px; border: 3px solid var(--surface); box-shadow: var(--shadow-md); background: var(--surface-2); flex: none; }
.fcard__title { font-size: 18px; font-weight: 700; letter-spacing: -0.015em; }
.fcard__dev { color: var(--text-3); font-size: 13px; margin-top: 2px; }
.fcard__desc { color: var(--text-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fcard__meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.meta-pill { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); min-width: 0; }
.meta-pill span { font-size: 11px; color: var(--text-3); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.meta-pill strong { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }

.rcard { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--radius-md); }
.rcard__logo { width: 56px; height: 56px; border-radius: 14px; flex: none; background: var(--surface-2); }
.rcard__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rcard__title { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcard__sub { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; color: var(--text-3); }
.rcard__sub b { color: var(--text-2); font-weight: 600; }
.rcard__side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.rcard__side .btn { height: 34px; padding: 0 12px; font-size: 13px; }
@media (max-width: 520px) { .rcard__side .btn span { display: none; } .rcard__side .btn { width: 34px; padding: 0; } }

.tcard { display: flex; flex-direction: column; }
.tcard__cover { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
.tcard__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .tcard__cover img { transform: scale(1.05); }
.tcard__rank { position: absolute; top: 12px; left: 12px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: rgba(10,11,16,.72); color: #fff; font-weight: 800; font-size: 14px; backdrop-filter: blur(6px); }
.tcard__logo { position: absolute; left: 14px; bottom: -22px; width: 60px; height: 60px; border-radius: 16px; border: 3px solid var(--surface); box-shadow: var(--shadow-md); }
.tcard__body { padding: 30px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.tcard__title { font-weight: 700; font-size: 16px; }
.tcard__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--text-3); }
.tcard__row b { color: var(--text-2); }

.mcard { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-md); }
.mcard__logo { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.mcard__title { font-weight: 600; font-size: 14.5px; }
.mcard__sub { font-size: 12.5px; color: var(--text-3); }

.ccard { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius-md); }
.ccard__icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.ccard__icon svg { width: 22px; height: 22px; }
.ccard__name { font-weight: 700; font-size: 15px; }
.ccard__count { font-size: 12.5px; color: var(--text-3); }
.tone-blue { background: rgba(59,130,246,.14); color: #60a5fa; }
.tone-purple { background: rgba(139,92,246,.14); color: #a78bfa; }
.tone-cyan { background: rgba(34,211,238,.14); color: #22d3ee; }
.tone-green { background: rgba(34,197,94,.14); color: #4ade80; }
.tone-amber { background: rgba(245,158,11,.14); color: #fbbf24; }
.tone-rose { background: rgba(244,63,94,.14); color: #fb7185; }
[data-theme="light"] .tone-blue { color: #1d4ed8; } [data-theme="light"] .tone-purple { color: #6d28d9; }
[data-theme="light"] .tone-cyan { color: #0e7490; } [data-theme="light"] .tone-green { color: #15803d; }
[data-theme="light"] .tone-amber { color: #b45309; } [data-theme="light"] .tone-rose { color: #be123c; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(48px, 8vw, 96px) 0 clamp(36px, 5vw, 56px); overflow: clip; isolation: isolate; }
.hero__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero__bg::before { content: ""; position: absolute; left: 50%; top: -280px; width: 900px; height: 700px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(91,140,255,.28), transparent 70%), radial-gradient(closest-side at 70% 60%, rgba(139,92,246,.22), transparent 70%), radial-gradient(closest-side at 30% 60%, rgba(34,211,238,.14), transparent 70%); filter: blur(20px); }
.hero__bg::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%); mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%); opacity: .5; }
.hero__inner { max-width: 820px; margin-inline: auto; text-align: center; }
.hero h1 { font-size: clamp(34px, 6vw, 60px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; }
.hero h1 .grad { background: linear-gradient(90deg, var(--accent), var(--accent-2) 50%, var(--accent-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__sub { margin: 18px auto 0; color: var(--text-2); font-size: clamp(15px, 1.6vw, 18px); max-width: 60ch; }
.hero__stats { display: flex; justify-content: center; gap: 22px; margin-top: 28px; color: var(--text-3); font-size: 13px; flex-wrap: wrap; }
.hero__stats b { color: var(--text); font-weight: 700; }
.search-box { position: relative; display: flex; align-items: center; gap: 10px; height: 60px; margin: 30px auto 0; padding: 0 8px 0 20px; max-width: 680px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 18px; box-shadow: var(--shadow-md); transition: box-shadow var(--t-med), border-color var(--t-med); }
.search-box:focus-within { border-color: var(--accent); box-shadow: var(--glow); }
.search-box > svg { width: 20px; height: 20px; color: var(--text-3); flex: none; }
.search-box input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; font-size: 17px; color: var(--text); }
.search-box input::placeholder { color: var(--text-3); }
.search-box .btn { height: 44px; border-radius: 12px; }
@media (max-width: 520px) { .search-box { height: 54px; padding-left: 16px; } .search-box input { font-size: 16px; } .search-box .btn span { display: none; } .search-box .btn { width: 44px; padding: 0; } }
.popular-searches { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; font-size: 13.5px; color: var(--text-3); }
.popular-searches .chip { height: 32px; font-size: 13px; padding: 0 12px; }

.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 60; text-align: left; max-height: 60vh; overflow-y: auto; }
.suggest[data-open="true"] { display: block; }
.suggest__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; }
.suggest__item:hover, .suggest__item[aria-selected="true"] { background: var(--surface-2); }
.suggest__item img { width: 40px; height: 40px; border-radius: 10px; }
.suggest__title { font-weight: 600; font-size: 14.5px; }
.suggest__sub { font-size: 12.5px; color: var(--text-3); }
.suggest__empty { padding: 14px; color: var(--text-3); font-size: 14px; text-align: center; }
.suggest__all { display: block; text-align: center; padding: 10px; font-size: 13.5px; font-weight: 600; color: var(--accent); }
.header__search .suggest { top: calc(100% + 10px); width: 360px; right: 0; left: auto; }

/* ---------- Detail hero ---------- */
.dhero { position: relative; padding: 28px 0 32px; overflow: clip; isolation: isolate; }
.dhero__bg { position: absolute; inset: 0; z-index: -1; }
.dhero__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .28; filter: blur(30px) saturate(140%); transform: scale(1.2); }
.dhero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0), var(--bg) 100%); }
[data-theme="light"] .dhero__bg img { opacity: .35; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); margin-bottom: 22px; }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs svg { width: 12px; height: 12px; opacity: .6; }
.breadcrumbs [aria-current] { color: var(--text-2); font-weight: 500; }
.dhero__grid { display: grid; grid-template-columns: 1fr minmax(280px, 360px); gap: clamp(20px, 4vw, 48px); align-items: start; }
.dhero__main { display: flex; gap: 22px; align-items: flex-start; }
.dhero__logo { width: clamp(96px, 12vw, 128px); height: clamp(96px, 12vw, 128px); border-radius: 28px; box-shadow: var(--shadow-lg); border: 1px solid var(--border-strong); flex: none; }
.dhero__title { font-size: clamp(26px, 3.6vw, 40px); font-weight: 800; letter-spacing: -0.03em; }
.dhero__tagline { color: var(--text-2); margin-top: 8px; font-size: 15.5px; max-width: 62ch; }
.dhero__badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dhero__dev { margin-top: 12px; font-size: 14px; color: var(--text-3); }
.dhero__dev a { color: var(--text-2); font-weight: 600; border-bottom: 1px dashed var(--border-strong); }
.dhero__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 20px; }
.fact { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--border); backdrop-filter: blur(8px); min-width: 0; }
.fact svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.fact div { min-width: 0; }
.fact span { display: block; font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.fact strong { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dhero__aside { position: sticky; top: calc(var(--header-h) + 16px); }
.cta-card { padding: 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-md); display: flex; flex-direction: column; gap: 14px; }
.cta-card__row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--text-3); }
.cta-card__row b { color: var(--text); font-weight: 600; text-align: right; }
.cta-card .btn--primary { height: 52px; font-size: 15px; letter-spacing: .03em; text-transform: uppercase; }
.cta-card__note { font-size: 12.5px; color: var(--text-3); text-align: center; display: flex; align-items: center; justify-content: center; gap: 6px; }
.cta-card__note svg { width: 14px; height: 14px; color: var(--success); }
@media (max-width: 900px) { .dhero__grid { grid-template-columns: 1fr; } .dhero__aside { position: static; } }
@media (max-width: 560px) { .dhero__main { flex-direction: column; gap: 14px; } .dhero__logo { width: 96px; height: 96px; border-radius: 24px; } }

.detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: clamp(20px, 4vw, 48px); align-items: start; }
.detail__side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: calc(var(--header-h) + 16px); }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } .detail__side { position: static; } }
.prose { display: flex; flex-direction: column; gap: 28px; }
.prose h2 { font-size: clamp(20px, 2.2vw, 26px); margin-bottom: 12px; }
.prose h3 { font-size: 17px; margin: 18px 0 8px; color: var(--text); }
.prose p { color: var(--text-2); font-size: 15.5px; line-height: 1.7; }
.prose p + p { margin-top: 12px; }
.prose ul { display: grid; gap: 8px; margin-top: 6px; }
.prose li { position: relative; padding-left: 26px; color: var(--text-2); font-size: 15px; line-height: 1.6; }
.prose li::before { content: ""; position: absolute; left: 0; top: 8px; width: 14px; height: 14px; border-radius: 50%; background: rgba(91,140,255,.15); box-shadow: inset 0 0 0 1px rgba(91,140,255,.4); }
.prose li::after { content: ""; position: absolute; left: 4px; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(18px, 2.5vw, 26px); }
.panel h2 { font-size: 20px; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }

.info-table { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.info-table dl { margin: 0; }
.info-table .row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.info-table .row:last-child { border-bottom: 0; }
.info-table dt { color: var(--text-3); flex: none; }
.info-table dd { margin: 0; color: var(--text); font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.info-table dd code { font-family: var(--font-mono); font-size: 12.5px; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 500; }
@media (max-width: 680px) { .info-table { grid-template-columns: 1fr; gap: 0; } .info-table dl:first-child .row:last-child { border-bottom: 1px solid var(--border); } }

.gallery { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 12px; margin: 0 -4px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.gallery::-webkit-scrollbar { height: 6px; }
.gallery::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }
.gallery__item { flex: none; scroll-snap-align: start; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); height: clamp(200px, 34vw, 300px); }
.gallery__item img { height: 100%; width: auto; object-fit: cover; }
.gallery__item button { display: block; height: 100%; }
.gallery__hint { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.gallery__hint svg { width: 14px; height: 14px; }
.lightbox { position: fixed; inset: 0; z-index: 200; display: none; place-items: center; background: rgba(3,4,8,.92); padding: 24px; }
.lightbox[data-open="true"] { display: grid; animation: fade .2s var(--ease); }
.lightbox img { max-width: min(96vw, 1100px); max-height: 88vh; width: auto; height: auto; border-radius: 12px; box-shadow: var(--shadow-lg); }
.lightbox__close { position: absolute; top: 16px; right: 16px; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: 12px; } .lightbox__nav--next { right: 12px; }
.lightbox .icon-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: #fff; }

/* ---------- Unlock steps ---------- */
.unlock { position: relative; border-radius: var(--radius-xl); border: 1px solid var(--border-strong); background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, var(--accent) 8%), var(--surface) 30%); padding: clamp(20px, 3vw, 32px); overflow: clip; }
.unlock::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, rgba(91,140,255,.5), rgba(139,92,246,.25) 40%, transparent 70%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.unlock__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.unlock__head h2 { font-size: clamp(20px, 2.4vw, 26px); }
.unlock__head p { color: var(--text-2); margin-top: 8px; font-size: 14.5px; max-width: 58ch; }
.progress { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 200px; }
.progress__count { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.progress__count small { font-size: 14px; color: var(--text-3); font-weight: 600; }
.progress__bar { width: 100%; height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress__fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3)); transition: width .5s var(--ease); }
.progress__dots { display: flex; gap: 6px; }
.progress__dots i { width: 22px; height: 6px; border-radius: 3px; background: var(--surface-3); transition: background var(--t-med); }
.progress__dots i[data-done="true"] { background: var(--accent); }
.progress__dots i[data-active="true"] { background: var(--accent-3); }
@media (max-width: 640px) { .progress { align-items: flex-start; width: 100%; } }
.steps { display: grid; gap: 12px; margin-top: 24px; }
.step { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); transition: border-color var(--t-med), box-shadow var(--t-med), opacity var(--t-med); }
.step[data-state="locked"] { opacity: .55; }
.step[data-state="active"] { border-color: var(--accent); box-shadow: var(--glow); }
.step[data-state="done"] { border-color: rgba(52,211,153,.4); }
.step__num { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); font-weight: 800; font-size: 13px; color: var(--text-2); transition: all var(--t-med); position: relative; }
.step__num svg { width: 20px; height: 20px; position: absolute; display: none; }
.step[data-state="done"] .step__num { background: var(--success); color: #05231a; border-color: transparent; animation: pop .4s var(--ease); }
.step[data-state="done"] .step__num .i-check { display: block; }
.step[data-state="done"] .step__num .step__label, .step[data-state="locked"] .step__num .step__label { visibility: hidden; }
.step[data-state="locked"] .step__num .i-lock { display: block; }
.step[data-state="active"] .step__num { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; }
.step__body { min-width: 0; }
.step__code { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--text-3); text-transform: uppercase; }
.step__title { font-weight: 700; font-size: 15.5px; text-transform: uppercase; letter-spacing: .01em; margin-top: 2px; }
.step__hint { font-size: 13px; color: var(--text-3); margin-top: 3px; }
.step__action { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.step__action .btn { min-width: 160px; }
.step__timer { display: none; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px dashed var(--border-strong); min-width: 160px; justify-content: center; }
.step__timer svg { width: 16px; height: 16px; animation: spin 1.2s linear infinite; color: var(--accent); }
.step[data-phase="waiting"] .step__timer { display: inline-flex; }
.step[data-phase="waiting"] .step__go { display: none; }
.step__confirm { display: none; }
.step[data-phase="confirm"] .step__confirm { display: inline-flex; }
.step[data-phase="confirm"] .step__go { display: none; }
.step[data-state="done"] .step__action .btn, .step[data-state="done"] .step__timer { display: none; }
.step__done { display: none; align-items: center; gap: 6px; color: var(--success); font-weight: 600; font-size: 14px; }
.step[data-state="done"] .step__done { display: inline-flex; }
.step__done svg { width: 16px; height: 16px; }
.step--final[data-state="active"] { background: linear-gradient(135deg, rgba(91,140,255,.12), rgba(139,92,246,.12)); }
.step--final .btn--primary { box-shadow: 0 8px 26px rgba(91,140,255,.45); }
@media (max-width: 640px) {
  .step { grid-template-columns: auto 1fr; gap: 12px 14px; padding: 14px; }
  .step__action { grid-column: 1 / -1; }
  .step__action .btn, .step__timer { width: 100%; }
  .step__num { width: 40px; height: 40px; border-radius: 12px; font-size: 12px; }
}
.unlock__foot { margin-top: 18px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); flex-wrap: wrap; }
.unlock__foot svg { width: 14px; height: 14px; flex: none; }
.unlock__foot button { color: var(--text-3); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Download landing ---------- */
.dl-page { position: relative; min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: clamp(32px, 6vw, 72px) 0; overflow: clip; isolation: isolate; }
.dl-page__bg { position: absolute; inset: 0; z-index: -1; }
.dl-page__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .35; filter: blur(40px) saturate(150%); transform: scale(1.25); }
[data-theme="light"] .dl-page__bg img { opacity: .4; }
.dl-page__bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 30%, transparent 0%, var(--bg) 75%); }
.dl-card { position: relative; width: min(100%, 560px); margin-inline: auto; padding: clamp(24px, 4vw, 40px); border-radius: 28px; background: color-mix(in srgb, var(--surface) 82%, transparent); border: 1px solid var(--border-strong); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%); box-shadow: var(--shadow-lg); text-align: center; }
.dl-card::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, rgba(255,255,255,.35), transparent 40%, rgba(91,140,255,.4)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.dl-card__logo { position: relative; width: 120px; height: 120px; margin: 0 auto 18px; border-radius: 30px; box-shadow: 0 20px 50px rgba(0,0,0,.45), 0 0 0 1px var(--border-strong); }
.dl-card__glow { position: absolute; left: 50%; top: 40px; width: 220px; height: 220px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(91,140,255,.45), transparent); filter: blur(14px); pointer-events: none; }
.dl-card h1 { font-size: clamp(26px, 3.6vw, 36px); font-weight: 800; letter-spacing: -0.03em; position: relative; }
.dl-card__sub { margin-top: 8px; color: var(--text-2); font-size: 14.5px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.dl-card__sub .dot { opacity: .5; }
.dl-info { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 24px 0; text-align: left; }
.dl-info div { padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--surface-2) 80%, transparent); border: 1px solid var(--border); min-width: 0; }
.dl-info span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 600; }
.dl-info strong { display: block; font-size: 14px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-info .status { color: var(--success); }
.btn--download { height: 62px; width: 100%; font-size: 18px; font-weight: 800; letter-spacing: .04em; border-radius: 16px; text-transform: uppercase; box-shadow: 0 14px 40px rgba(91,140,255,.45); }
.btn--download svg { width: 22px; height: 22px; }
.btn--download:hover { transform: translateY(-1px); box-shadow: 0 18px 48px rgba(91,140,255,.55); }
.dl-card__trust { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 13px; color: var(--text-3); flex-wrap: wrap; }
.dl-card__trust svg { width: 14px; height: 14px; color: var(--success); }
.dl-card__meta { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-3); }
.dl-card__meta a { color: var(--text-2); font-weight: 600; }
.dl-locked { text-align: center; padding: 8px 0; }
.dl-locked .icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; margin: 0 auto 18px; background: var(--surface-2); color: var(--text-3); }
.dl-locked .icon svg { width: 28px; height: 28px; }
.dl-locked p { color: var(--text-2); margin: 10px 0 20px; }
[data-unlocked="false"] .dl-when-unlocked { display: none; }
[data-unlocked="true"] .dl-when-locked { display: none; }

/* ---------- Why / FAQ ---------- */
.why { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.why__item { padding: 22px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.why__item .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; }
.why__item .ico svg { width: 22px; height: 22px; }
.why__item h3 { font-size: 16px; margin-bottom: 6px; }
.why__item p { color: var(--text-2); font-size: 14px; }
@media (max-width: 1024px) { .why { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .why { grid-template-columns: 1fr; } }
.faq { display: grid; gap: 10px; max-width: 820px; margin-inline: auto; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; transition: border-color var(--t-fast); }
.faq details[open] { border-color: var(--border-strong); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; font-weight: 600; font-size: 15px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 18px; height: 18px; color: var(--text-3); flex: none; transition: transform var(--t-med); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq .faq__a { padding: 0 18px 16px; color: var(--text-2); font-size: 14.5px; line-height: 1.65; }

/* ---------- Footer ---------- */
.footer { margin-top: clamp(40px, 6vw, 80px); border-top: 1px solid var(--border); background: var(--bg-elev); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding: clamp(36px, 5vw, 60px) 0 32px; }
.footer__brand p { color: var(--text-2); font-size: 14px; margin-top: 12px; max-width: 40ch; }
.footer h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); margin-bottom: 14px; }
.footer__links { display: grid; gap: 10px; }
.footer__links a { color: var(--text-2); font-size: 14.5px; transition: color var(--t-fast); }
.footer__links a:hover { color: var(--text); }
.footer__social { display: flex; gap: 8px; margin-top: 18px; }
.footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0 28px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-3); }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr 1fr; gap: 24px; } }

/* ---------- Listing pages ---------- */
.page-head { padding: clamp(32px, 5vw, 56px) 0 8px; }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.03em; }
.page-head p { color: var(--text-2); margin-top: 10px; font-size: 15.5px; max-width: 64ch; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 22px 0 10px; }
.toolbar__count { font-size: 14px; color: var(--text-3); }
.empty { text-align: center; padding: 60px 20px; color: var(--text-2); }
.empty .icon { width: 56px; height: 56px; border-radius: 18px; background: var(--surface-2); display: grid; place-items: center; margin: 0 auto 16px; color: var(--text-3); }
.empty .icon svg { width: 26px; height: 26px; }
.legal { max-width: 820px; margin-inline: auto; }
.legal .updated { color: var(--text-3); font-size: 13.5px; margin: 8px 0 28px; }

/* ---------- Notice / trust ---------- */
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13.5px; color: var(--text-2); }
.notice svg { width: 18px; height: 18px; flex: none; color: var(--accent); margin-top: 2px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--text-3); }
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.trust-row svg { width: 14px; height: 14px; color: var(--success); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 300; padding: 12px 18px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: all .3s var(--ease); max-width: calc(100vw - 32px); text-align: center; }
.toast[data-show="true"] { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Motion ---------- */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { 0% { transform: scale(.85); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.reveal { transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js-reveal .reveal:not(.is-in) { opacity: 0; transform: translateY(14px); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Utilities ---------- */
.muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .wrap { flex-wrap: wrap; }


/* ---------- Compact offer download page (scoped; other pages unchanged) ---------- */
[hidden] { display: none !important; }
.download-workspace { display: block; min-height: 0; padding: 12px 0 28px; background: var(--bg-elev); }
.download-workspace[data-offers-expanded="true"] { padding-bottom: 90px; }
.download-workspace > .container { max-width: none; padding-inline: 0; }
.download-workspace .dl-page__bg { display: none; }
.download-workspace .dl-card { width: 100%; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; text-align: left; backdrop-filter: none; -webkit-backdrop-filter: none; }
.download-workspace .dl-card::before { display: none; }
.download-back { display: flex; align-items: center; gap: 6px; width: fit-content; margin: 0 max(12px,calc((100% - 1080px) / 2)) 10px; color: var(--text-2); font-size: 12px; }
.download-back svg { transform: rotate(180deg); }
.download-summary { display: flex; align-items: center; gap: 12px; padding: 10px 12px 16px; max-width: 1104px; margin-inline: auto; }
.download-workspace .dl-card__logo { width: 54px; height: 54px; border-radius: 13px; margin: 0; box-shadow: none; flex: none; }
.download-summary__title { min-width: 0; }
.download-summary__title h1 { font-size: clamp(20px,2.3vw,28px); overflow-wrap: anywhere; }
.download-summary .eyebrow { font-size: 10px; margin: 0 0 4px; }
.download-summary .dl-card__sub { justify-content: flex-start; gap: 5px 10px; margin-top: 5px; font-size: 11px; }
.download-summary .dl-card__sub span + span { border-left: 1px solid var(--border-strong); padding-left: 10px; }
.download-status { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 30px; font-size: 11px; color: var(--text-2); white-space: nowrap; }
.download-start { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 16px; max-width: 1080px; margin: 4px auto 18px; padding: 24px; border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(120deg,color-mix(in srgb,var(--accent) 7%,var(--surface)),var(--surface)); }
.download-start .eyebrow { font-size: 10px; margin-bottom: 8px; }
.download-start h2 { font-size: clamp(21px,2.5vw,27px); margin-bottom: 8px; }
.download-start p:not(.eyebrow) { font-size: 13px; color: var(--text-2); line-height: 1.6; }
.download-start .btn { min-height: 48px; height: auto; padding: 12px 18px; gap: 10px; }
.download-workspace .btn--primary { background: var(--accent); box-shadow: none; }
.download-workspace .btn--primary:hover { box-shadow: none; }
.download-columns { display: grid; grid-template-columns: minmax(0,1fr); gap: 16px; max-width: 1104px; padding-inline: 12px; margin: 0 auto; }
.download-workspace .offer-wall { min-width: 0; }
.download-workspace .offer-wall__head { margin: 0 0 12px; }
.offer-wall__title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.download-workspace .offer-wall__head h2 { font-size: 19px; line-height: 1.3; scroll-margin-top: calc(var(--header-h) + 16px); }
.download-workspace .offer-wall__head p { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.offer-count { padding: 3px 8px; font-size: 10px; font-weight: 600; border-radius: 20px; background: var(--surface-2); color: var(--text-2); }
.download-workspace .offer-wall__list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; align-items: start; }
.download-workspace .offer-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 6px 10px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); transition: border-color var(--t-fast),background var(--t-fast); }
.download-workspace .offer-card:hover, .download-workspace .offer-card:focus-within { border-color: var(--accent); background: color-mix(in srgb,var(--accent) 3%,var(--surface)); }
.offer-card__body { min-width: 0; }
.offer-card__heading { display: flex; align-items: center; gap: 8px; }
.offer-card__number { display: grid; place-items: center; width: 25px; height: 25px; flex: none; border-radius: 7px; background: var(--surface-2); color: var(--text-2); font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.download-workspace .offer-card h3 { font-size: 14px; line-height: 1.35; letter-spacing: -.015em; overflow-wrap: anywhere; }
.offer-card__action .btn { padding: 0 11px; min-height: 44px; height: auto; font-size: 12px; border-radius: 9px; white-space: normal; text-align: center; }
.offer-card__instruction { grid-column: 1 / -1; margin: 0; padding: 5px 9px; border-radius: 6px; background: var(--surface-2); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.offer-card__instruction span { color: var(--text-2); font-weight: 600; }
.offer-card__instruction strong { color: var(--text); font-weight: 500; }
.offer-card__description { grid-column: 1 / -1; color: var(--text-2); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.offer-wall__note { display: flex; align-items: flex-start; gap: 7px; color: var(--text-2); margin: 10px 0 0; font-size: 11px; line-height: 1.5; }
.offer-wall__note svg { width: 14px; height: 14px; margin-top: 2px; }
.offer-wall__loading, .offer-wall__empty { grid-column: 1 / -1; padding: 20px 16px; text-align: center; color: var(--text-2); font-size: 13px; background: var(--surface-2); border-radius: 12px; }
.offer-wall__empty strong { display: block; margin-bottom: 5px; color: var(--text); }
.offer-wall__empty p { font-size: 12px; line-height: 1.6; }
.offer-wall__empty a { color: var(--accent); text-decoration: underline; }
.offer-retry { margin-top: 10px; font-size: 12px; }
.offer-spinner { display: block; width: 22px; height: 22px; margin: 0 auto 12px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: offer-spin 1s linear infinite; }
@keyframes offer-spin { to { transform: rotate(360deg); } }
.download-instructions { margin-top: 16px; padding: 14px 0 0; border-top: 1px solid var(--border); }
.download-instructions h2 { margin-bottom: 12px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.download-journey { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.download-journey li { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; font-weight: 600; }
.download-journey b { flex: none; display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid var(--border-strong); border-radius: 50%; font-size: 11px; color: var(--accent); background: var(--surface); }
.download-journey small { display: block; margin-top: 3px; font-size: 11px; line-height: 1.5; font-weight: 400; color: var(--text-2); }
.download-sidebar { min-width: 0; }
.download-access { padding: 16px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface-2); scroll-margin-top: calc(var(--header-h) + 16px); }
.download-access .dl-when-locked, .download-access .dl-when-unlocked { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; gap: 4px 12px; align-items: center; text-align: left; padding: 0; }
.download-access .access-icon { grid-row: 1 / 3; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--accent); background: color-mix(in srgb,var(--accent) 10%,var(--surface)); }
.download-access h2 { font-size: 16px; grid-column: 2; }
.download-access p { font-size: 12px; color: var(--text-2); line-height: 1.5; margin: 0; grid-column: 2; }
.download-access .eyebrow { display: none; }
.download-access .btn { grid-column: 3; grid-row: 1 / 3; font-size: 13px; min-width: 180px; }
.download-access .verification-status { grid-column: 2 / -1; font-size: 11px; margin-top: 4px; }
.download-access .download-file-note { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 11px; overflow-wrap: anywhere; }
.download-help { margin-top: 18px; }
.download-help h2 { font-size: 14px; margin-bottom: 4px; }
.download-help details { border-bottom: 1px solid var(--border); padding: 0; font-size: 12px; }
.download-help summary { cursor: pointer; font-weight: 500; line-height: 1.5; padding: 13px 0; }
.download-help details p { color: var(--text-2); padding: 0 0 12px; line-height: 1.7; }
.download-help .link-arrow { margin-top: 12px; font-size: 12px; }
.download-workspace .dl-card__meta { max-width: 1080px; margin: 18px auto 0; padding: 12px; font-size: 10px; line-height: 1.6; gap: 4px; overflow-wrap: anywhere; color: var(--text-2); }
.download-workspace[data-unlocked="true"] .download-status, .download-workspace[data-unlocked="true"] .access-icon { color: var(--success); }
.download-workspace[data-unlocked="true"] .download-access { border-color: var(--success); }
.offer-navigation { position: fixed; z-index: 90; bottom: max(10px,env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(520px,calc(100% - 24px)); display: flex; align-items: stretch; justify-content: space-between; padding: 5px; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--bg-elev); box-shadow: var(--shadow-md); }
.offer-navigation a { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 10px; font-size: 12px; font-weight: 600; border-radius: 9px; }
.offer-navigation a:first-child { color: var(--text-2); }
.offer-navigation a:last-child { background: color-mix(in srgb,var(--accent) 12%,var(--surface)); color: var(--accent); }
@media (max-width: 1104px) { .download-start { margin-inline: 12px; } }
@media (max-width: 760px) {
  .download-status { display: none; }
  .download-workspace .offer-wall__list { grid-template-columns: minmax(0,1fr); }
  .download-start { grid-template-columns: minmax(0,1fr); padding: 20px; gap: 16px; }
  .download-start .btn { width: 100%; }
  .download-journey { grid-template-columns: minmax(0,1fr); gap: 11px; }
  .download-journey small { margin-top: 1px; }
  .download-journey li { align-items: center; }
  .download-access .dl-when-locked, .download-access .dl-when-unlocked { grid-template-columns: 32px minmax(0,1fr); gap: 4px 10px; }
  .download-access .access-icon { width: 32px; height: 32px; }
  .download-access .btn { grid-column: 1 / -1; grid-row: auto; width: 100%; margin-top: 9px; }
  .download-access .verification-status { grid-column: 1 / -1; text-align: center; }
}
@media (max-width: 360px) {
  .download-columns { padding-inline: 10px; }
  .download-workspace .offer-card { padding: 9px; gap: 6px; }
  .offer-card__heading { gap: 6px; }
  .offer-card__number { width: 22px; height: 22px; }
  .offer-card__action .btn { max-width: 90px; padding-inline: 8px; }
  .offer-navigation a { font-size: 11px; padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .download-workspace *, .download-workspace *::before, .download-workspace *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Custom HTML / Ad blocks ---------- */
.custom-html-stack { width:100%; margin:18px 0; }
.custom-html-block { width:100%; min-width:0; overflow-x:auto; text-align:center; }
.custom-html-block > * { max-width:100%; }
.custom-html-block iframe { max-width:100%; }
.custom-html-block img { max-width:100%; height:auto; }
.custom-html-editor .f__textarea { font-family:var(--font-mono); font-size:12px; line-height:1.55; }
