/* ==========================================================================
   Ravika — "The Digital Atelier" design system
   Mobile-first. Layers: tokens → base → layout → components → category
   themes → pages → utilities → motion/print.
   ========================================================================== */

@font-face { font-family: "Inter"; src: url("../fonts/inter.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
/* Metric-matched fallbacks keep layout shift near zero while the web fonts load */
@font-face { font-family: "Inter Fallback"; src: local("Segoe UI"), local("Roboto"), local("Helvetica Neue"), local("Arial"); size-adjust: 107%; ascent-override: 90%; descent-override: 22%; }
@font-face { font-family: "Fraunces Fallback"; src: local("Georgia"), local("Times New Roman"); size-adjust: 104%; ascent-override: 92%; descent-override: 24%; }

/* ---------- 1. Tokens ---------- */
:root {
  /* Surfaces */
  --paper: #faf8f5;
  --surface: #ffffff;
  --sunk: #f3f0eb;
  --sunk-2: #ece8e1;
  --line: #e8e3dc;
  --line-2: #d9d2c8;
  /* Ink */
  --ink: #17142a;
  --ink-2: #474259;
  --muted: #6b6680;
  --faint: #a29db2;
  /* Brand */
  --brand: #5b3fd9;
  --brand-600: #4a2fc2;
  --brand-700: #3c2599;
  --brand-50: #f3f0ff;
  --brand-100: #e6e0ff;
  --brand-200: #cfc4ff;
  /* Supporting tones (tints for surfaces, inks for text on them) */
  --lavender: #ece8ff; --lavender-ink: #4a2fc2;
  --sky: #e3f0fc;      --sky-ink: #1b5c9c;
  --peach: #ffeadf;    --peach-ink: #a5431c;
  --mint: #ddf4ea;     --mint-ink: #0f6a4c;
  --beige: #f2ebdf;    --beige-ink: #6b4f2c;
  --rose: #fde6ee;     --rose-ink: #a3214f;
  --lemon: #fff3cc;    --lemon-ink: #7a5900;
  --coral: #e8593a;    --coral-ink: #b33c1c;
  --success: #0f7a55;
  --danger: #c0303f;
  --warning: #9a6a00;
  /* Type */
  --font-ui: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --font-display: "Fraunces", "Fraunces Fallback", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --fs-xs: .75rem; --fs-sm: .875rem; --fs-md: 1rem; --fs-lg: 1.125rem;
  --fs-h3: 1.125rem;
  --fs-h2: clamp(1.5rem, 1.1rem + 1.9vw, 2.25rem);
  --fs-h1: clamp(1.95rem, 1.3rem + 3vw, 3.1rem);
  --fs-hero: clamp(2.45rem, 1.2rem + 5.6vw, 4.75rem);
  /* Shape */
  --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 22px; --r-xl: 30px; --r-pill: 999px;
  /* Depth */
  --sh-1: 0 1px 2px rgba(23, 20, 42, .05);
  --sh-2: 0 1px 2px rgba(23, 20, 42, .04), 0 8px 22px -10px rgba(23, 20, 42, .14);
  --sh-3: 0 2px 6px rgba(23, 20, 42, .05), 0 26px 50px -20px rgba(23, 20, 42, .28);
  --sh-brand: 0 12px 26px -12px rgba(91, 63, 217, .65);
  --ring: 0 0 0 3px var(--surface), 0 0 0 5px var(--brand);
  /* Motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  --t-fast: .16s; --t-med: .28s; --t-slow: .5s;
  /* Layout */
  --gutter: 16px;
  --max: 1240px;
  --header-h: 60px;
  --bnav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: light;
}
@media (min-width: 768px) { :root { --gutter: 28px; --header-h: 68px; } }
@media (min-width: 1280px) { :root { --gutter: 40px; } }

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font-family: var(--font-ui); font-size: var(--fs-md); line-height: 1.6; color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  padding-bottom: calc(var(--bnav-h) + var(--safe-b));
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}
@media (min-width: 1024px) { body { padding-bottom: 0; } }
img, svg, video, canvas, audio { max-width: 100%; }
img { display: block; height: auto; }
a { color: var(--brand); text-decoration: none; text-underline-offset: 3px; }
a:hover { color: var(--brand-600); }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5 { margin: 0 0 .5em; line-height: 1.15; color: var(--ink); text-wrap: balance; }
h1, h2, .display { font-family: var(--font-display); font-weight: 560; letter-spacing: -.022em; font-optical-sizing: auto; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -.01em; }
h4 { font-size: 1rem; font-weight: 700; }
small, .small { font-size: var(--fs-sm); }
.tiny { font-size: var(--fs-xs); }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
code, kbd, pre { font-family: var(--font-mono); font-size: .9em; }
code { background: var(--sunk); padding: .1em .4em; border-radius: 6px; }
::selection { background: var(--brand-100); color: var(--ink); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
svg.i { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
svg.i-sm { width: 16px; height: 16px; }
svg.i-lg { width: 26px; height: 26px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- 3. Layout ---------- */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: max(var(--gutter), var(--safe-l)) max(var(--gutter), var(--safe-r)); }
.narrow { max-width: 780px; }
.section { padding-block: 40px; }
.section-sm { padding-block: 24px; }
@media (min-width: 1024px) { .section { padding-block: 64px; } }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.section-head .lede { margin: 6px 0 0; color: var(--muted); max-width: 52ch; }
.section-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-size: var(--fs-sm); white-space: nowrap; color: var(--ink); padding: 8px 2px; }
.section-link:hover { color: var(--brand); }
.section-link svg { transition: transform var(--t-fast) var(--ease); }
.section-link:hover svg { transform: translateX(3px); }
.kicker { display: inline-flex; line-height: 1.5; align-items: center; gap: 8px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; }
.kicker::before { content: ""; width: 18px; height: 1.5px; background: currentColor; border-radius: 2px; }
.stack > * + * { margin-top: var(--stack, 16px); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.ink { color: var(--ink); }
.nowrap { white-space: nowrap; }
.sr-only, .skip-link:not(:focus) { 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:focus { position: fixed; top: 10px; left: 10px; z-index: 200; background: var(--surface); padding: 10px 14px; border-radius: var(--r-sm); box-shadow: var(--sh-3); }
@media (max-width: 1023.98px) { .desk-only { display: none !important; } }
@media (min-width: 1024px) { .mob-only { display: none !important; } }
@media (max-width: 767.98px) { .hide-sm { display: none !important; } }
@media (min-width: 768px) { .show-sm { display: none !important; } }

/* ---------- 4. Buttons ---------- */
.btn {
  --btn-h: 48px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--btn-h); padding: 0 22px; border-radius: var(--r-pill); border: 1px solid transparent;
  font: inherit; font-size: .95rem; font-weight: 650; letter-spacing: -.005em; line-height: 1; white-space: nowrap;
  cursor: pointer; text-decoration: none !important; user-select: none; -webkit-user-select: none;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-med) var(--ease), background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.btn:active { transform: scale(.97); }
.btn svg.i { width: 18px; height: 18px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--sh-brand); }
.btn-primary:hover { background: var(--brand-600); color: #fff; box-shadow: 0 16px 30px -12px rgba(91, 63, 217, .7); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #2a2545; color: #fff; }
.btn-soft { background: var(--brand-50); color: var(--brand-600); }
.btn-soft:hover { background: var(--brand-100); color: var(--brand-700); }
.btn-outline { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--sunk); color: var(--ink); }
.btn-danger { background: var(--rose); color: var(--rose-ink); }
.btn-danger:hover { background: #fbd3e0; color: var(--rose-ink); }
.btn-white { background: #fff; color: var(--ink); }
.btn-white:hover { color: var(--brand); }
.btn-sm { --btn-h: 38px; padding: 0 16px; font-size: .875rem; }
.btn-lg { --btn-h: 56px; padding: 0 30px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 0; width: var(--btn-h); }
.btn[disabled], .btn.loading { pointer-events: none; opacity: .7; }
.btn.loading { color: transparent !important; }
.btn.loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-color: rgba(255, 255, 255, .9) rgba(255, 255, 255, .9) transparent transparent; animation: spin .7s linear infinite; }
.btn-soft.loading::after, .btn-outline.loading::after, .btn-ghost.loading::after, .btn-white.loading::after { border-color: var(--brand) var(--brand) transparent transparent; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-pill);
  border: 0; background: transparent; color: var(--ink); cursor: pointer; transition: background-color var(--t-fast), transform var(--t-fast);
}
.icon-btn:hover { background: var(--sunk); color: var(--ink); }
.icon-btn:active { transform: scale(.92); }
.count {
  position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
}
.count.bump { animation: bump .45s var(--ease-spring); }

/* ---------- 5. Header & navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60; background: rgba(250, 248, 245, .86);
  -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid transparent; transition: border-color var(--t-med), box-shadow var(--t-med);
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 20px -16px rgba(23, 20, 42, .3); }
.header-row { display: flex; align-items: center; gap: 6px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--font-display); font-weight: 600; font-size: 1.28rem; letter-spacing: -.03em; white-space: nowrap; margin-right: auto; }
.brand:hover { color: var(--ink); }
.brand img { width: 32px; height: 32px; border-radius: 10px; }
.brand-dot { color: var(--brand); }
.main-nav { display: none; }
.header-search {
  display: none; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .92rem; cursor: pointer; min-width: 0;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.header-search:hover { border-color: var(--line-2); box-shadow: var(--sh-2); color: var(--ink-2); }
.header-search span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.header-search kbd { margin-left: auto; font-size: .72rem; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); color: var(--faint); background: var(--paper); }
.header-actions { display: flex; align-items: center; gap: 2px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem; color: #fff; background: linear-gradient(135deg, var(--brand), #8a6cff); }
.avatar:hover { color: #fff; }
@media (min-width: 1024px) {
  .brand { margin-right: 18px; }
  .main-nav { display: flex; align-items: center; gap: 2px; margin-right: auto; }
  .nav-link { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: var(--r-pill); border: 0; background: none; color: var(--ink-2); font-weight: 600; font-size: .94rem; cursor: pointer; }
  .nav-link:hover, .nav-link[aria-expanded="true"] { background: var(--sunk); color: var(--ink); }
  .nav-link.active { color: var(--ink); }
  .nav-link.active::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }
  .nav-link .chev { width: 14px; height: 14px; transition: transform var(--t-fast); }
  .nav-link[aria-expanded="true"] .chev { transform: rotate(180deg); }
  .header-search { display: flex; width: clamp(220px, 24vw, 340px); margin-right: 8px; }
  .search-trigger-m { display: none !important; }
}

/* Mega menu */
.mega {
  position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  box-shadow: 0 30px 60px -30px rgba(23, 20, 42, .35); opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease), visibility 0s linear var(--t-med);
}
.mega.open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.mega-inner { display: grid; grid-template-columns: 1fr 280px; gap: 32px; padding-block: 28px 32px; }
.mega-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.mega-cat { display: flex; gap: 14px; align-items: flex-start; padding: 12px; border-radius: var(--r-md); color: var(--ink); transition: background-color var(--t-fast); }
.mega-cat:hover { background: var(--paper); color: var(--ink); }
.mega-cat b { display: block; font-size: .95rem; }
.mega-cat span { display: block; font-size: .82rem; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.mega-side { border-left: 1px solid var(--line); padding-left: 28px; display: grid; align-content: start; gap: 4px; }
.mega-side h4 { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 6px 0 8px; }
.mega-side a { display: flex; align-items: center; gap: 10px; padding: 9px 0; color: var(--ink-2); font-weight: 600; font-size: .92rem; }
.mega-side a:hover { color: var(--brand); }

/* Category glyph – a themed icon tile */
.glyph { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--t-soft, var(--lavender)); color: var(--t-accent, var(--brand)); flex-shrink: 0; }
.glyph svg.i { width: 22px; height: 22px; }
.glyph-sm { width: 34px; height: 34px; border-radius: 11px; }
.glyph-sm svg.i { width: 18px; height: 18px; }

/* Bottom navigation (mobile app bar) */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--bnav-h) + var(--safe-b)); padding: 0 max(4px, var(--safe-l)) var(--safe-b) max(4px, var(--safe-r));
  background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  border-top: 1px solid var(--line);
}
.bottom-nav a, .bottom-nav button {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 0; background: none; color: var(--muted); font-size: .68rem; font-weight: 650; letter-spacing: .01em; cursor: pointer; padding: 0;
}
.bottom-nav a:hover { color: var(--ink); }
.bottom-nav .active { color: var(--ink); }
.bottom-nav .active::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
.bottom-nav svg.i { width: 23px; height: 23px; }
.bottom-nav .active svg.i { stroke-width: 2.1; }
.bottom-nav .count { top: 6px; right: calc(50% - 22px); }
.bottom-nav a:active svg, .bottom-nav button:active svg { transform: scale(.88); }
@media (min-width: 1024px) { .bottom-nav { display: none; } }
body.has-buybar .bottom-nav { display: none; }
body.has-buybar { padding-bottom: calc(84px + var(--safe-b)); }
@media (min-width: 1024px) { body.has-buybar { padding-bottom: 0; } }

/* ---------- 6. Dialogs: search, sheets, quick view ---------- */
dialog { border: 0; padding: 0; color: var(--ink); background: transparent; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(23, 20, 42, .42); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
dialog[open] { animation: dlg-in var(--t-med) var(--ease); }
dialog[open]::backdrop { animation: fade-in var(--t-med) var(--ease); }
body.dlg-open { overflow: hidden; }

.search-dlg { width: 100%; height: 100%; margin: 0; inset: 0; background: var(--paper); }
.search-dlg[open] { display: flex; flex-direction: column; animation: search-in var(--t-med) var(--ease); }
.search-bar { display: flex; align-items: center; gap: 8px; padding: 10px max(var(--gutter), var(--safe-l)) 10px; border-bottom: 1px solid var(--line); background: var(--surface); }
.search-field { flex: 1; display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 16px; border-radius: var(--r-pill); background: var(--sunk); }
.search-field:focus-within { background: var(--surface); box-shadow: 0 0 0 2px var(--brand); }
.search-field input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font: inherit; font-size: 1.05rem; color: var(--ink); padding: 0; outline: none; }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-body { flex: 1; overflow-y: auto; padding: 18px max(var(--gutter), var(--safe-l)) calc(32px + var(--safe-b)); overscroll-behavior: contain; }
.search-group + .search-group { margin-top: 22px; }
.search-group h4 { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.sugg { display: flex; align-items: center; gap: 12px; padding: 9px 10px; margin-inline: -10px; border-radius: var(--r-sm); color: var(--ink); }
.sugg:hover, .sugg.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.sugg-cover { width: 46px; height: 46px; border-radius: 12px; overflow: hidden; flex-shrink: 0; }
.sugg-cover .cover { height: 100%; aspect-ratio: auto; border-radius: 12px; }
.sugg b { display: block; font-weight: 600; font-size: .95rem; line-height: 1.3; }
.sugg small { color: var(--muted); }
.sugg mark { background: var(--lemon); color: inherit; border-radius: 3px; padding: 0 1px; }
.sugg-price { margin-left: auto; font-weight: 700; font-size: .9rem; white-space: nowrap; }
.chip-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 1024px) {
  .search-dlg { width: min(720px, calc(100% - 48px)); height: auto; max-height: min(78vh, 720px); margin: 72px auto auto; border-radius: var(--r-lg); box-shadow: var(--sh-3); overflow: hidden; }
  .search-bar { padding: 12px 14px; }
  .search-body { padding: 18px 24px 24px; }
}

.sheet {
  width: 100%; max-height: 88vh; max-height: 88dvh; margin: auto 0 0; inset: auto 0 0 0; border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: var(--surface); box-shadow: var(--sh-3); padding-bottom: var(--safe-b);
}
.sheet[open] { display: flex; flex-direction: column; animation: sheet-in var(--t-slow) var(--ease); }
.sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 10px auto 2px; flex-shrink: 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 20px 12px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.sheet-head h2 { font-size: 1.35rem; margin: 0; }
.sheet-body { overflow-y: auto; padding: 16px 20px 24px; overscroll-behavior: contain; }
.sheet-foot { display: flex; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line); flex-shrink: 0; }
.sheet-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sheet-cat { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r-md); background: var(--t-soft, var(--paper)); color: var(--ink); min-height: 112px; }
.sheet-cat:hover { color: var(--ink); }
.sheet-cat b { font-size: .92rem; line-height: 1.25; }
.sheet-cat small { color: var(--ink-2); opacity: .8; margin-top: auto; }
.sheet-cat .glyph { background: rgba(255, 255, 255, .7); }
@media (min-width: 768px) {
  .sheet { width: min(560px, 100%); margin: auto; border-radius: var(--r-xl); max-height: 82vh; }
  .sheet[open] { animation: dlg-in var(--t-med) var(--ease); }
}

.qv { width: min(860px, calc(100% - 24px)); margin: auto; border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--sh-3); overflow: hidden; }
.qv-body { display: grid; max-height: 86vh; overflow-y: auto; }
.qv-media { padding: 22px; background: var(--t-tint, var(--sunk)); }
.qv-media .cover { max-width: 360px; margin: 0 auto; }
.qv-info { padding: 22px 22px 26px; display: grid; gap: 12px; align-content: start; }
.qv-info h2 { margin: 0; font-size: 1.6rem; }
.qv-close { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(255, 255, 255, .92); box-shadow: var(--sh-2); }
@media (min-width: 768px) { .qv-body { grid-template-columns: 1fr 1fr; } .qv-media { display: grid; place-items: center; padding: 32px; } .qv-info { padding: 34px 30px; } }
.qv-loading { padding: 80px; display: grid; place-items: center; }

/* ---------- 7. Cards, chips, badges ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.card-pad { padding: 20px; }
@media (min-width: 768px) { .card-pad { padding: 26px; } }
.card-flat { background: var(--surface); border-radius: var(--r-lg); }
.panel { background: var(--sunk); border-radius: var(--r-lg); padding: 20px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: .86rem; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: border-color var(--t-fast), background-color var(--t-fast), color var(--t-fast);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip-active, .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-active:hover { color: #fff; }
.chip svg.i { width: 16px; height: 16px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 2px; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chips > * { scroll-snap-align: start; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--r-pill); font-size: .74rem; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.badge-mint { background: var(--mint); color: var(--mint-ink); }
.badge-peach { background: var(--peach); color: var(--peach-ink); }
.badge-sky { background: var(--sky); color: var(--sky-ink); }
.badge-rose { background: var(--rose); color: var(--rose-ink); }
.badge-gray { background: var(--sunk); color: var(--ink-2); }
.badge-lavender { background: var(--lavender); color: var(--lavender-ink); }
.badge-lemon { background: var(--lemon); color: var(--lemon-ink); }
.badge-ink { background: var(--ink); color: #fff; }
.eyebrow { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--t-accent-text, var(--brand)); }
.stars { color: #e3a008; letter-spacing: 1px; font-size: .9rem; white-space: nowrap; }
.stars i { color: var(--line-2); font-style: normal; }
.price { font-weight: 750; font-size: 1.08rem; letter-spacing: -.01em; color: var(--ink); font-variant-numeric: tabular-nums; }
.price-was { color: var(--muted); font-size: .85rem; text-decoration: line-through; margin-left: 6px; font-weight: 500; }
.off { display: inline-block; margin-left: 6px; color: var(--coral-ink); font-weight: 700; font-size: .78rem; }
.approx { display: block; font-size: .74rem; color: var(--muted); font-weight: 500; }
.price-free { color: var(--mint-ink); }

/* ---------- 8. Product covers (generated per category theme) ---------- */
.cover {
  position: relative; display: grid; place-items: center; overflow: hidden; aspect-ratio: 4 / 5; isolation: isolate;
  background: var(--t-tint, var(--sunk)); color: var(--t-ink, var(--ink)); border-radius: inherit;
}
.cover > img, .cover > picture, .cover > picture img { width: 100%; height: 100%; object-fit: cover; }
.cover-photo { background: var(--sunk); }
.cover-wide { aspect-ratio: 16 / 10; }
.cover-square { aspect-ratio: 1; }
/* Editorial: a physical book on a warm stage */
.cv-book { width: 62%; aspect-ratio: 2 / 3; position: relative; border-radius: 3px 8px 8px 3px; background: var(--bk, #1f3d33); color: #fff;
  box-shadow: inset 7px 0 0 rgba(0, 0, 0, .22), inset 9px 0 0 rgba(255, 255, 255, .1), 0 1px 1px rgba(0, 0, 0, .1), 14px 20px 26px -12px rgba(40, 25, 10, .45), 4px 6px 10px -4px rgba(40, 25, 10, .3);
  transform: perspective(900px) rotateY(-9deg); transform-origin: left center; transition: transform var(--t-slow) var(--ease);
  display: flex; flex-direction: column; padding: 14% 12% 12% 17%; overflow: hidden; }
.cv-book::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(255, 255, 255, .0) 30%, rgba(255, 255, 255, .14) 48%, rgba(255, 255, 255, 0) 62%); pointer-events: none; }
.cv-book > img, .cv-book > picture { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cv-book .bk-kicker { font-size: clamp(.5rem, 1.6vw, .62rem); letter-spacing: .18em; text-transform: uppercase; opacity: .75; font-weight: 600; }
.cv-book .bk-title { font-family: var(--font-display); font-weight: 560; font-size: clamp(.82rem, 3.4vw, 1.35rem); line-height: 1.08; margin-top: 12%; letter-spacing: -.02em; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.cv-book .bk-rule { width: 28%; height: 2px; background: var(--bk-accent, #e9c46a); margin: 10% 0; border-radius: 2px; }
.cv-book .bk-author { margin-top: auto; font-size: clamp(.5rem, 1.6vw, .66rem); letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.pcard:hover .cv-book, .cover:hover .cv-book { transform: perspective(900px) rotateY(-3deg) translateY(-3px); }
/* Academic: a stack of ruled pages */
.cv-doc { width: 64%; aspect-ratio: 1 / 1.35; position: relative; background: #fff; border-radius: 6px; padding: 12% 11%; color: #1d2a3a;
  box-shadow: 6px 6px 0 -1px #f7fbff, 6px 6px 0 0 #cfe0f3, 12px 12px 0 -1px #f7fbff, 12px 12px 0 0 #cfe0f3, 18px 24px 30px -18px rgba(20, 50, 90, .5); transition: transform var(--t-slow) var(--ease); }
.cv-doc .doc-tab { position: absolute; top: -1px; right: 12%; padding: 6px 8px 8px; background: var(--t-accent); color: #fff; font-size: clamp(.45rem, 1.4vw, .58rem); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; border-radius: 0 0 5px 5px; }
.cv-doc .doc-title { font-weight: 750; font-size: clamp(.72rem, 2.6vw, 1.05rem); line-height: 1.18; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; margin-top: 8%; }
.cv-doc .doc-lines { display: grid; gap: 7%; margin-top: 12%; }
.cv-doc .doc-lines i { display: block; height: 3px; border-radius: 2px; background: #dfe8f3; }
.cv-doc .doc-lines i:nth-child(3n) { width: 70%; }
.cv-doc .doc-lines i:nth-child(1) { background: var(--t-accent); opacity: .35; width: 40%; }
.cv-doc .doc-foot { position: absolute; bottom: 9%; left: 11%; right: 11%; display: flex; justify-content: space-between; font-size: clamp(.45rem, 1.4vw, .6rem); color: #56657a; font-weight: 600; }
.pcard:hover .cv-doc { transform: translateY(-4px) rotate(-1deg); }
/* Studio: a template window with coloured cells */
.cv-sheet { width: 82%; aspect-ratio: 1 / 1.08; background: #fff; border-radius: 12px; box-shadow: 0 22px 40px -22px rgba(120, 50, 20, .5), 0 0 0 1px rgba(120, 50, 20, .08); overflow: hidden; display: flex; flex-direction: column; transition: transform var(--t-slow) var(--ease); }
.cv-sheet .sh-bar { display: flex; gap: 5px; padding: 8px 10px; background: #fbf4ef; border-bottom: 1px solid #f1e3d9; }
.cv-sheet .sh-bar i { width: 7px; height: 7px; border-radius: 50%; background: #f0cdb9; }
.cv-sheet .sh-body { padding: 10% 9%; display: flex; flex-direction: column; gap: 9%; flex: 1; }
.cv-sheet .sh-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(.78rem, 2.8vw, 1.15rem); line-height: 1.1; color: #3a1d0f; letter-spacing: -.02em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cv-sheet .sh-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: auto; }
.cv-sheet .sh-grid i { aspect-ratio: 1.6; border-radius: 3px; background: #f6ece5; }
.cv-sheet .sh-grid i:nth-child(3), .cv-sheet .sh-grid i:nth-child(8) { background: #ffd2bd; }
.cv-sheet .sh-grid i:nth-child(5) { background: #cdeee0; }
.cv-sheet .sh-grid i:nth-child(10), .cv-sheet .sh-grid i:nth-child(11) { background: #ddd6ff; }
.pcard:hover .cv-sheet { transform: translateY(-4px) scale(1.015); }
/* Gallery: an abstract colour study */
.cv-art { position: absolute; inset: 0; }
.cv-art i { position: absolute; border-radius: 50%; mix-blend-mode: multiply; transition: transform 1.2s var(--ease); }
.cv-art i:nth-child(1) { width: 70%; aspect-ratio: 1; left: -8%; top: 6%; background: var(--a1, #ff9fbf); }
.cv-art i:nth-child(2) { width: 58%; aspect-ratio: 1; right: -6%; top: 26%; background: var(--a2, #ffd166); }
.cv-art i:nth-child(3) { width: 46%; aspect-ratio: 1; left: 22%; bottom: 8%; background: var(--a3, #8ecae6); border-radius: 28%; }
.cv-art-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14% 9% 8%; background: linear-gradient(transparent, rgba(255, 255, 255, .92) 45%); }
.cv-art-cap b { font-family: var(--font-display); font-weight: 600; font-size: clamp(.8rem, 2.8vw, 1.15rem); line-height: 1.12; color: #3d0f24; letter-spacing: -.02em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cv-swatches { display: flex; gap: 4px; margin-top: 8px; }
.cv-swatches i { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 1.5px #fff; }
.pcard:hover .cv-art i:nth-child(1) { transform: translate(6%, 4%); }
.pcard:hover .cv-art i:nth-child(2) { transform: translate(-6%, -3%); }
/* Tech: a terminal window */
.cv-term { width: 88%; aspect-ratio: 1 / 1; border-radius: 12px; background: #0b0d14; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 30px 50px -24px rgba(0, 0, 0, .8); overflow: hidden; display: flex; flex-direction: column; font-family: var(--font-mono); transition: transform var(--t-slow) var(--ease); }
.cv-term .tm-bar { display: flex; align-items: center; gap: 5px; padding: 8px 10px; background: #151926; color: #7c86a6; font-size: clamp(.48rem, 1.4vw, .6rem); }
.cv-term .tm-bar i { width: 7px; height: 7px; border-radius: 50%; background: #ff5f57; }
.cv-term .tm-bar i:nth-child(2) { background: #febc2e; } .cv-term .tm-bar i:nth-child(3) { background: #28c840; margin-right: 6px; }
.cv-term .tm-body { padding: 10% 9%; display: grid; gap: 6%; font-size: clamp(.5rem, 1.7vw, .72rem); color: #c8d0e8; line-height: 1.5; align-content: start; flex: 1; }
.cv-term .tm-title { color: #fff; font-family: var(--font-ui); font-weight: 700; font-size: clamp(.78rem, 2.7vw, 1.08rem); line-height: 1.15; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 2% 0 6%; }
.cv-term .k { color: #c792ea; } .cv-term .s { color: #3ddc97; } .cv-term .c { color: #5c6789; } .cv-term .f { color: #82aaff; }
.cv-term .tm-line { display: block; height: 4px; border-radius: 2px; background: #232a3d; }
.cv-term .tm-cursor { display: inline-block; width: .55em; height: 1em; background: #3ddc97; vertical-align: -2px; animation: blink 1.1s steps(1) infinite; }
.pcard:hover .cv-term { transform: translateY(-4px); }
/* Academy: a course poster */
.cv-course { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 11% 10%; color: #fff;
  background: radial-gradient(120% 90% at 90% 0%, var(--c2, #8f7bff) 0%, transparent 60%), radial-gradient(90% 80% at 0% 100%, var(--c3, #4cc9f0) 0%, transparent 60%), var(--c1, #3a24b5); }
.cv-course .cs-chip { align-self: flex-start; font-size: clamp(.5rem, 1.5vw, .62rem); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.cv-course .cs-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(.95rem, 3.6vw, 1.5rem); line-height: 1.06; letter-spacing: -.025em; margin-top: auto; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.cv-course .cs-play { position: absolute; top: 34%; left: 50%; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(255, 255, 255, .95); display: grid; place-items: center; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .45); transition: transform var(--t-med) var(--ease-spring); }
.cv-course .cs-play::after { content: ""; margin-left: 10%; border-style: solid; border-width: .5em 0 .5em .82em; border-color: transparent transparent transparent var(--c1, #3a24b5); font-size: clamp(.6rem, 2.4vw, 1rem); }
.cv-course .cs-meta { margin-top: 6%; font-size: clamp(.55rem, 1.6vw, .7rem); opacity: .85; font-weight: 600; }
.pcard:hover .cs-play { transform: translate(-50%, -50%) scale(1.1); }
/* Media: a waveform on a dark stage */
.cv-media { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 11% 10%; color: #fff;
  background: radial-gradient(100% 70% at 100% 0%, rgba(255, 140, 90, .35), transparent 60%), radial-gradient(80% 60% at 0% 100%, rgba(150, 90, 255, .35), transparent 60%), #1a1330; }
.cv-media .md-wave { display: flex; align-items: center; gap: 3%; height: 34%; margin: auto 0 9%; }
.cv-media .md-wave i { flex: 1; border-radius: 3px; background: linear-gradient(180deg, #ffb86b, #ff7a9a); opacity: .9; transform-origin: center; }
.cv-media .md-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(.9rem, 3.2vw, 1.35rem); line-height: 1.08; letter-spacing: -.02em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cv-media .md-row { display: flex; align-items: center; gap: 8px; margin-top: 8%; font-size: clamp(.5rem, 1.5vw, .66rem); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.cv-media .md-play { width: 26px; height: 26px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex-shrink: 0; }
.cv-media .md-play::after { content: ""; margin-left: 2px; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent #1a1330; }
@media (prefers-reduced-motion: no-preference) { .pcard:hover .md-wave i { animation: wave 1s var(--ease) infinite alternate; } .pcard:hover .md-wave i:nth-child(2n) { animation-delay: -.4s; } .pcard:hover .md-wave i:nth-child(3n) { animation-delay: -.7s; } }
/* AI: an aurora with a prompt bubble */
.cv-ai { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 10%;
  background: radial-gradient(80% 60% at 15% 10%, rgba(124, 92, 255, .75), transparent 60%), radial-gradient(70% 60% at 100% 40%, rgba(34, 211, 238, .45), transparent 60%), radial-gradient(70% 60% at 30% 100%, rgba(236, 72, 153, .38), transparent 60%), #0f0d2e; }
.cv-ai .ai-bubble { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-radius: 14px; padding: 10% 9%; color: #fff; }
.cv-ai .ai-label { display: flex; align-items: center; gap: 6px; font-size: clamp(.5rem, 1.5vw, .62rem); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #a5f3fc; }
.cv-ai .ai-label svg { width: 12px; height: 12px; }
.cv-ai .ai-title { font-weight: 700; font-size: clamp(.8rem, 2.8vw, 1.1rem); line-height: 1.18; margin-top: 8%; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.cv-ai .ai-title::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 3px; background: #a5f3fc; vertical-align: -2px; animation: blink 1.1s steps(1) infinite; }
.cv-ai .ai-dots { display: flex; gap: 4px; margin-top: 10%; }
.cv-ai .ai-dots i { width: 22%; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .22); }
/* Business: a corporate report */
.cv-report { width: 66%; aspect-ratio: 1 / 1.35; background: #fff; border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 1px 0 #d6dde6, 0 26px 40px -22px rgba(15, 42, 68, .55); transition: transform var(--t-slow) var(--ease); }
.cv-report .rp-head { background: #0f2a44; color: #fff; padding: 14% 11% 10%; position: relative; }
.cv-report .rp-head::after { content: ""; position: absolute; left: 11%; bottom: 0; width: 30%; height: 3px; background: #c9a45c; }
.cv-report .rp-kicker { font-size: clamp(.45rem, 1.3vw, .56rem); letter-spacing: .16em; text-transform: uppercase; color: #c9a45c; font-weight: 700; }
.cv-report .rp-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(.72rem, 2.5vw, 1rem); line-height: 1.12; margin-top: 8%; letter-spacing: -.015em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cv-report .rp-body { padding: 10% 11%; display: flex; align-items: flex-end; gap: 6%; flex: 1; }
.cv-report .rp-body i { flex: 1; background: #dbe4ee; border-radius: 2px 2px 0 0; }
.cv-report .rp-body i:nth-child(4) { background: #c9a45c; }
.pcard:hover .cv-report { transform: translateY(-4px); }
/* Mini covers for thumbnails */
.cover-mini { aspect-ratio: 1; }
.cover-mini .mini-glyph { width: 46%; aspect-ratio: 1; border-radius: 30%; display: grid; place-items: center; background: rgba(255, 255, 255, .7); color: var(--t-accent); }
.cover-mini .mini-glyph svg.i { width: 52%; height: 52%; }
.cover-mini.is-dark .mini-glyph { background: rgba(255, 255, 255, .1); color: #fff; }
.t-tech.cover-mini.is-dark .mini-glyph { color: #3ddc97; }
.t-media.cover-mini.is-dark .mini-glyph { color: #ffb86b; }
.t-ai.cover-mini.is-dark { background: radial-gradient(80% 70% at 20% 10%, rgba(124, 92, 255, .8), transparent 70%), radial-gradient(70% 70% at 100% 100%, rgba(34, 211, 238, .5), transparent 70%), #0f0d2e; }
.t-ai.cover-mini.is-dark .mini-glyph { color: #a5f3fc; }
.cover-mini .mini-book { width: 40%; aspect-ratio: 2 / 3; border-radius: 2px 5px 5px 2px; background: var(--bk); box-shadow: inset 4px 0 0 rgba(0, 0, 0, .22), 4px 6px 10px -4px rgba(40, 25, 10, .45); }
/* Default */
.cv-default { position: absolute; inset: 0; padding: 12%; display: flex; flex-direction: column; justify-content: flex-end; background: linear-gradient(150deg, var(--lavender), #d9d0ff); }
.cv-default b { font-family: var(--font-display); font-size: clamp(.9rem, 3vw, 1.3rem); line-height: 1.1; color: var(--ink); }

/* ---------- 9. Category themes (mini-brands) ---------- */
.t-editorial { --t-tint: #f1e9dc; --t-soft: #f4ede2; --t-accent: #8a2d3b; --t-accent-text: #8a2d3b; --t-ink: #3b2a20; }
.t-academic  { --t-tint: #e6eff9; --t-soft: #e8f1fb; --t-accent: #1e5fa8; --t-accent-text: #1b5c9c; --t-ink: #13304f; }
.t-studio    { --t-tint: #ffe8dc; --t-soft: #ffede4; --t-accent: #c4532a; --t-accent-text: #a5431c; --t-ink: #3a1d0f; }
.t-gallery   { --t-tint: #fde8ef; --t-soft: #fdebf1; --t-accent: #b8326f; --t-accent-text: #a3214f; --t-ink: #3d0f24; }
.t-tech      { --t-tint: #141824; --t-soft: #e2f7ee; --t-accent: #0f8a5f; --t-accent-text: #0f7a55; --t-ink: #e6e8f0; }
.t-academy   { --t-tint: #ebe7ff; --t-soft: #ece8ff; --t-accent: #5b3fd9; --t-accent-text: #4a2fc2; --t-ink: #1d1452; }
.t-media     { --t-tint: #1a1330; --t-soft: #fff0e2; --t-accent: #d8681c; --t-accent-text: #a5431c; --t-ink: #fff; }
.t-ai        { --t-tint: #0f0d2e; --t-soft: #e6f8fc; --t-accent: #6d4dff; --t-accent-text: #4a2fc2; --t-ink: #fff; }
.t-business  { --t-tint: #e7edf3; --t-soft: #e9eef4; --t-accent: #0f2a44; --t-accent-text: #0f2a44; --t-ink: #0f2a44; }
.t-default   { --t-tint: var(--lavender); --t-soft: var(--lavender); --t-accent: var(--brand); --t-accent-text: var(--brand-600); }

/* ---------- 10. Product cards ---------- */
.grid { display: grid; gap: 22px 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 20px; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pcard { position: relative; display: flex; flex-direction: column; min-width: 0; }
.pcard-media { position: relative; display: block; border-radius: var(--r-lg); overflow: hidden; background: var(--t-tint, var(--sunk)); transition: box-shadow var(--t-med) var(--ease), transform var(--t-med) var(--ease); }
.pcard-media .cover { border-radius: var(--r-lg); }
.pcard:hover .pcard-media { box-shadow: var(--sh-3); transform: translateY(-3px); }
.pcard-flag { position: absolute; top: 10px; left: 10px; z-index: 2; pointer-events: none; }
.pcard-flag .badge { box-shadow: var(--sh-1); }
.flag-sale { background: #fff; color: var(--coral-ink); }
.flag-free { background: #fff; color: var(--mint-ink); }
.flag-new { background: #fff; color: var(--ink); }
.pcard-tools { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; flex-direction: column; gap: 6px; }
.tool-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: rgba(255, 255, 255, .94); color: #17142a; box-shadow: var(--sh-2); transition: transform var(--t-fast) var(--ease), color var(--t-fast), opacity var(--t-med); }
.tool-btn svg.i { width: 18px; height: 18px; }
.tool-btn:hover { transform: scale(1.08); color: var(--brand); }
.tool-btn:active { transform: scale(.9); }
.wish-btn.on { color: #e0245e; }
.wish-btn.on svg { fill: currentColor; }
.wish-btn.pop svg { animation: heart .5s var(--ease-spring); }
.qv-btn { display: none; }
@media (hover: hover) and (min-width: 768px) {
  .qv-btn { display: grid; opacity: 0; transform: translateY(-4px); }
  .pcard:hover .qv-btn, .qv-btn:focus-visible { opacity: 1; transform: none; }
}
.pcard-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 2px 0; flex: 1; }
.pcard-cat { display: flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--t-accent-text, var(--brand)); }
.pcard-cat::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--t-accent, var(--brand)); }
.pcard h3 { font-size: .98rem; font-weight: 650; line-height: 1.3; margin: 0; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard h3 a { color: var(--ink); }
.pcard h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.pcard-by { font-size: .82rem; color: var(--muted); }
.pcard-desc { display: none; font-size: .88rem; color: var(--muted); line-height: 1.45; margin: 2px 0 0; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 768px) { .pcard-desc { display: -webkit-box; } }
.pcard-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); }
.fmt { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; background: var(--sunk); color: var(--ink-2); font-size: .72rem; font-weight: 650; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }
.pcard-foot .price { font-size: 1rem; }
.add-btn { position: relative; z-index: 2; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; min-width: 38px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 650; font-size: .84rem; cursor: pointer; transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast); }
.add-btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.add-btn:active { transform: scale(.94); }
.add-btn svg.i { width: 17px; height: 17px; }
.add-btn .lbl { display: none; }
@media (min-width: 480px) { .add-btn .lbl { display: inline; } }
.add-btn.added { background: var(--mint); border-color: var(--mint); color: var(--mint-ink); }
.add-btn.loading { color: transparent; }
.add-btn.loading::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); border-right-color: transparent; animation: spin .7s linear infinite; }
.pcard.owned .add-btn { display: none; }
.owned-tag { font-size: .78rem; font-weight: 700; color: var(--mint-ink); }

/* Dark category pages make cards dark too (software, media, AI) */
.surface-dark { --surface: #161a26; --line: #252b3c; --line-2: #333a50; --ink: #eef0f7; --ink-2: #c3c8d8; --muted: #9098b0; --sunk: #1d2232; --paper: #10131c; color: var(--ink); background: var(--paper); }
.surface-dark .add-btn { background: transparent; }
.surface-dark .add-btn:hover { background: #fff; color: #10131c; border-color: #fff; }
.surface-dark .chip { background: transparent; }
.surface-dark .chip-active { background: #fff; color: #10131c; border-color: #fff; }
.surface-dark .fmt { background: #232a3d; color: #c3c8d8; }
.surface-dark .pcard-cat { color: #7ee2b8; }
.t-media.surface-dark .pcard-cat { color: #ffc28a; }
.t-ai.surface-dark .pcard-cat { color: #a5f3fc; }

/* List view */
.grid.is-list { grid-template-columns: 1fr; gap: 14px; }
.grid.is-list .pcard { flex-direction: row; gap: 16px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.grid.is-list .pcard-media { width: 112px; flex-shrink: 0; align-self: flex-start; border-radius: var(--r-md); }
.grid.is-list .pcard-media .cover { border-radius: var(--r-md); }
.grid.is-list .pcard-body { padding: 2px 0 0; }
.grid.is-list .pcard-desc { display: -webkit-box; }
.grid.is-list .pcard-tools { top: 16px; left: 16px; right: auto; }
.grid.is-list .pcard-tools .tool-btn { width: 30px; height: 30px; }
.grid.is-list .qv-btn, .grid.is-list .pcard-flag { display: none; }
.grid.is-list .pcard:hover .pcard-media { transform: none; box-shadow: none; }
@media (min-width: 768px) { .grid.is-list .pcard-media { width: 168px; } .grid.is-list .pcard { padding: 16px; gap: 24px; } }
.grid.is-list .cv-book .bk-title, .grid.is-list .cover .cs-title { -webkit-line-clamp: 3; }

/* Rails (horizontal, swipeable collections) */
.rail { position: relative; }
.rail-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 6px;
  margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
}
.rail-track::-webkit-scrollbar { display: none; }
.rail-track > * { scroll-snap-align: start; }
@media (min-width: 480px) { .rail-track { grid-auto-columns: 38%; } }
@media (min-width: 768px) { .rail-track { grid-auto-columns: calc((100% - 3 * 20px - 2 * var(--gutter)) / 3.2); gap: 20px; } }
@media (min-width: 1100px) { .rail-track { grid-auto-columns: calc((100% - 3 * 20px) / 4); margin-inline: 0; padding-inline: 0; scroll-padding-inline: 0; } }
.rail-nav { display: none; gap: 8px; }
@media (min-width: 1100px) { .rail-nav { display: flex; } }
.rail-nav button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: border-color var(--t-fast), opacity var(--t-fast); }
.rail-nav button:hover { border-color: var(--ink); }
.rail-nav button[disabled] { opacity: .35; cursor: default; }

/* ---------- 11. Forms ---------- */
.form { display: grid; gap: 16px; }
.form-2 { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-2 { grid-template-columns: 1fr 1fr; } }
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 7px; color: var(--ink-2); }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=search], input[type=date], input[type=datetime-local], input[type=url], select, textarea {
  width: 100%; min-height: 50px; padding: 12px 16px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface);
  font: inherit; font-size: 1rem; color: var(--ink); transition: border-color var(--t-fast), box-shadow var(--t-fast); appearance: none; -webkit-appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236b6680' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
textarea { min-height: 130px; resize: vertical; line-height: 1.55; }
input:hover, select:hover, textarea:hover { border-color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[aria-invalid="true"], .is-invalid { border-color: var(--danger) !important; box-shadow: 0 0 0 4px #fde8ea !important; }
.field-error { color: var(--danger); font-size: .82rem; font-weight: 600; margin-top: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--brand); flex-shrink: 0; }
.hint { font-size: .8rem; color: var(--muted); margin-top: 6px; }
fieldset { border: 0; padding: 0; margin: 0; }
.input-group { display: flex; gap: 8px; }
.input-group input { min-width: 0; }

/* ---------- 12. Alerts & toasts ---------- */
.flashes { margin-top: 16px; display: grid; gap: 10px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); font-weight: 500; font-size: .94rem; border: 1px solid transparent; line-height: 1.5; }
.alert-success { background: var(--mint); color: #0b5139; border-color: #bfe8d6; }
.alert-error { background: var(--rose); color: #84172f; border-color: #f8c9d8; }
.alert-info { background: var(--sky); color: #154a7d; border-color: #c6dff6; }
.alert-warning { background: var(--lemon); color: #664a00; border-color: #f6e19c; }
.toast-wrap { position: fixed; left: 50%; bottom: calc(var(--bnav-h) + var(--safe-b) + 12px); transform: translateX(-50%); z-index: 120; display: grid; gap: 8px; width: min(calc(100vw - 24px), 420px); pointer-events: none; }
body.has-buybar .toast-wrap { bottom: calc(96px + var(--safe-b)); }
@media (min-width: 1024px) { .toast-wrap, body.has-buybar .toast-wrap { left: auto; right: 24px; bottom: 24px; transform: none; } }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; border-radius: var(--r-md); background: var(--ink); color: #fff; box-shadow: var(--sh-3); font-weight: 550; font-size: .92rem; animation: toast-in var(--t-med) var(--ease-spring); }
.toast.out { animation: toast-out .22s var(--ease) forwards; }
.toast .t-ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); flex-shrink: 0; }
.toast .t-ico svg { width: 16px; height: 16px; }
.toast span { flex: 1; min-width: 0; }
.toast a { color: #cbbfff; font-weight: 700; white-space: nowrap; }
.toast.error { background: #7a1626; }

/* ---------- 13. Empty states & skeletons ---------- */
.empty { text-align: center; padding: 56px 20px; max-width: 460px; margin: 0 auto; }
.empty-art { width: 132px; height: 132px; margin: 0 auto 22px; position: relative; display: grid; place-items: center; }
.empty-art::before { content: ""; position: absolute; inset: 0; border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%; background: var(--t-soft, var(--lavender)); }
.empty-art svg.i { position: relative; width: 52px; height: 52px; stroke-width: 1.4; color: var(--t-accent, var(--brand)); }
.empty-art .dot { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--peach); top: 8px; right: 12px; }
.empty-art .dot + .dot { width: 9px; height: 9px; background: var(--mint); top: auto; bottom: 14px; left: 8px; right: auto; }
.empty h3, .empty h2 { font-family: var(--font-display); font-weight: 560; font-size: 1.55rem; letter-spacing: -.02em; margin-bottom: 8px; }
.empty p { color: var(--muted); margin-bottom: 22px; }
.empty .row { justify-content: center; }
.skel { position: relative; overflow: hidden; background: var(--sunk); border-radius: var(--r-sm); }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent); animation: shimmer 1.3s infinite; }
.skel-line { height: 12px; margin-top: 10px; border-radius: 6px; }

/* ---------- 14. Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; background: var(--paper); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color var(--t-fast); }
tbody tr:hover { background: #fcfbf9; }

/* ---------- 15. Footer ---------- */
.site-footer { margin-top: 64px; background: var(--ink); color: #c9c6d6; padding: 0 0 calc(24px + var(--safe-b)); position: relative; overflow: hidden; }
.site-footer a { color: #c9c6d6; }
.site-footer a:hover { color: #fff; }
.footer-letter { display: grid; gap: 20px; padding-block: 44px 36px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.footer-letter h2 { color: #fff; margin: 0; font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.6rem); }
.footer-letter h2 em { font-style: normal; color: #b7a7ff; }
.footer-letter p { margin: 8px 0 0; color: #a9a5ba; max-width: 46ch; }
.newsletter { display: flex; gap: 8px; padding: 6px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); max-width: 480px; width: 100%; }
.newsletter input[type=email] { flex: 1; min-width: 0; border: 0; background: transparent; color: #fff; min-height: 46px; padding: 0 14px; }
.newsletter input[type=email]::placeholder { color: #8f8aa3; }
.newsletter input:focus { box-shadow: none; }
.newsletter:focus-within { border-color: #8b7bff; }
.newsletter .btn { --btn-h: 46px; }
@media (min-width: 900px) { .footer-letter { grid-template-columns: 1.1fr 1fr; align-items: center; padding-block: 64px 52px; } .footer-letter .newsletter { justify-self: end; } }
.footer-grid { display: grid; gap: 30px 20px; grid-template-columns: 1fr 1fr; padding-block: 40px 28px; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand .brand { color: #fff; }
.footer-brand p { margin: 14px 0 0; max-width: 34ch; color: #a9a5ba; font-size: .93rem; }
.footer-grid h4 { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: #8f8aa3; margin-bottom: 14px; }
.footer-grid nav a { display: block; padding: 5px 0; font-size: .93rem; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.6fr repeat(3, 1fr); } .footer-brand { grid-column: auto; } }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 20px; font-size: .84rem; color: #8f8aa3; }
.footer-bottom select { width: auto; min-height: 36px; padding: 4px 34px 4px 12px; font-size: .84rem; background-color: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); color: #fff; border-radius: var(--r-pill); }
.footer-bottom select option { color: var(--ink); }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.trust-row svg.i { width: 16px; height: 16px; color: #b7a7ff; }
.footer-mark { position: absolute; right: -40px; bottom: -70px; font-family: var(--font-display); font-size: 260px; line-height: 1; color: rgba(255, 255, 255, .025); pointer-events: none; user-select: none; letter-spacing: -.06em; }

/* ---------- 16. Home ---------- */
.hero { position: relative; padding: 28px 0 40px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto; height: 120%; z-index: -1;
  background: radial-gradient(40% 45% at 85% 20%, rgba(207, 196, 255, .55), transparent 70%), radial-gradient(35% 40% at 10% 0%, rgba(255, 220, 200, .55), transparent 70%), radial-gradient(30% 35% at 60% 90%, rgba(200, 240, 225, .5), transparent 70%); }
.hero-grid { display: grid; gap: 34px; align-items: center; }
.hero-grid > * { min-width: 0; }
.hero h1 { font-size: var(--fs-hero); line-height: .98; letter-spacing: -.035em; margin: 0 0 18px; font-weight: 520; }
.hero h1 em, .hero h1 span { font-style: normal; color: var(--brand); background: linear-gradient(90deg, #ffc9b3, #d9d0ff) no-repeat 0 88% / 100% .16em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero .lead { font-size: 1.08rem; color: var(--ink-2); max-width: 46ch; margin-bottom: 26px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-cta .btn { flex: 1 1 auto; }
@media (min-width: 480px) { .hero-cta .btn { flex: 0 0 auto; } }
.hero-proof { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 26px; font-size: .86rem; color: var(--ink-2); font-weight: 550; }
.hero-proof span { display: inline-flex; align-items: center; gap: 7px; }
.hero-proof svg.i { width: 17px; height: 17px; color: var(--brand); }
.hero-stage { position: relative; height: 340px; }
.hero-stage .hs-item { position: absolute; width: 46%; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-3); transition: transform .8s var(--ease); }
.hero-stage .hs-item .cover { border-radius: var(--r-lg); }
.hero-stage .hs-item:nth-child(1) { left: 2%; top: 12%; transform: rotate(-6deg); z-index: 2; }
.hero-stage .hs-item:nth-child(2) { left: 30%; top: 0; transform: rotate(2deg); z-index: 3; width: 44%; }
.hero-stage .hs-item:nth-child(3) { right: 0; top: 16%; transform: rotate(7deg); z-index: 1; width: 42%; }
.hero-stage .hs-item:nth-child(4) { display: none; }
.hero-stage:hover .hs-item:nth-child(1) { transform: rotate(-8deg) translate(-6px, 4px); }
.hero-stage:hover .hs-item:nth-child(3) { transform: rotate(9deg) translate(6px, 4px); }
.hs-note { position: absolute; z-index: 4; left: 4%; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--sh-3); font-size: .84rem; font-weight: 600; }
.hs-note .glyph { width: 32px; height: 32px; border-radius: 50%; background: var(--mint); color: var(--mint-ink); }
.hs-note .glyph svg.i { width: 16px; height: 16px; }
@media (min-width: 480px) { .hero-stage { height: 420px; } }
@media (min-width: 900px) {
  .hero { padding: 56px 0 80px; }
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 48px; }
  .hero-stage { height: 520px; }
  .hero-stage .hs-item:nth-child(4) { display: block; right: 16%; bottom: 0; top: auto; width: 34%; transform: rotate(-3deg); z-index: 4; }
}

/* Category discovery */
.cat-rail { display: grid; grid-auto-flow: column; grid-auto-columns: 70%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 8px; scroll-padding-inline: var(--gutter); }
.cat-rail::-webkit-scrollbar { display: none; }
.cat-rail > * { scroll-snap-align: start; }
@media (min-width: 480px) { .cat-rail { grid-auto-columns: 44%; } }
@media (min-width: 900px) {
  .cat-rail { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); grid-auto-columns: auto; overflow: visible; margin: 0; padding: 0; gap: 14px; }
  .cat-rail > :nth-child(1) { grid-column: span 3; grid-row: span 2; }
  .cat-rail > :nth-child(2), .cat-rail > :nth-child(3) { grid-column: span 3; }
  .cat-rail > :nth-child(n+4) { grid-column: span 2; }
}
.cat-tile { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 172px; padding: 20px; border-radius: var(--r-xl); background: var(--t-soft); color: var(--ink); overflow: hidden; isolation: isolate; transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease); }
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--sh-3); color: var(--ink); }
.cat-tile .glyph { background: rgba(255, 255, 255, .75); margin-bottom: auto; }
.cat-tile b { font-family: var(--font-display); font-weight: 560; font-size: 1.3rem; letter-spacing: -.02em; line-height: 1.1; margin-top: 18px; }
.cat-tile small { color: var(--ink-2); font-size: .86rem; line-height: 1.4; }
.cat-tile .cnt { position: absolute; top: 20px; right: 20px; font-size: .78rem; font-weight: 700; color: var(--t-accent-text); }
.cat-tile .deco { position: absolute; right: -24px; bottom: -24px; width: 120px; height: 120px; border-radius: 50%; background: var(--t-accent); opacity: .08; z-index: -1; transition: transform var(--t-slow) var(--ease); }
.cat-tile:hover .deco { transform: scale(1.3); }
.cat-tile.is-dark { background: var(--t-tint); color: #fff; }
.cat-tile.is-dark small { color: rgba(255, 255, 255, .72); }
.cat-tile.is-dark .cnt { color: rgba(255, 255, 255, .8); }
.cat-tile.is-dark .glyph { background: rgba(255, 255, 255, .1); color: #fff; }
.cat-tile.is-dark .deco { opacity: .35; }
@media (min-width: 900px) {
  .cat-rail > :nth-child(1) { min-height: 360px; padding: 32px; }
  .cat-rail > :nth-child(1) b { font-size: 2.2rem; }
  .cat-rail > :nth-child(1) .deco { width: 260px; height: 260px; right: -60px; bottom: -60px; }
}

/* Editorial spotlight (editor's picks) */
.spotlight { display: grid; gap: 18px; }
@media (min-width: 900px) { .spotlight { grid-template-columns: 1.15fr 1fr; gap: 28px; align-items: stretch; } }
.spot-main { position: relative; display: grid; border-radius: var(--r-xl); overflow: hidden; background: var(--t-tint); color: var(--ink); min-height: 320px; }
.spot-main .cover { aspect-ratio: auto; height: 100%; min-height: 320px; }
.spot-copy { position: absolute; left: 14px; right: 14px; bottom: 14px; padding: 18px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: var(--sh-2); }
.spot-copy h3 { font-family: var(--font-display); font-weight: 560; font-size: 1.4rem; letter-spacing: -.02em; margin: 4px 0 6px; }
.spot-copy h3 a { color: var(--ink); }
.spot-copy h3 a::after { content: ""; position: absolute; inset: 0; }
.spot-copy p { margin: 0 0 10px; color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.spot-list { display: grid; gap: 12px; align-content: start; }
.spot-item { position: relative; display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: center; padding: 10px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); transition: border-color var(--t-fast), transform var(--t-med) var(--ease); }
.spot-item:hover { border-color: var(--line-2); transform: translateX(4px); }
.spot-item .cover { border-radius: var(--r-md); }
.spot-item h3 { font-size: .98rem; margin: 2px 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.spot-item h3 a { color: var(--ink); }
.spot-item h3 a::after { content: ""; position: absolute; inset: 0; }
.spot-num { font-family: var(--font-display); font-size: .9rem; color: var(--muted); }

/* Free resources band */
.free-band { border-radius: var(--r-xl); background: var(--mint); padding: 28px 20px; position: relative; overflow: hidden; }
.free-band::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 36px solid rgba(15, 106, 76, .07); }
.free-band .kicker { color: var(--mint-ink); }
@media (min-width: 768px) { .free-band { padding: 44px; } }

/* Offer band */
.offer { position: relative; display: grid; gap: 18px; align-items: center; padding: 30px 22px; border-radius: var(--r-xl); background: var(--ink); color: #fff; overflow: hidden; isolation: isolate; }
.offer::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 120% at 100% 0%, rgba(139, 123, 255, .55), transparent 60%), radial-gradient(50% 100% at 0% 100%, rgba(255, 140, 100, .35), transparent 60%); }
.offer h2 { color: #fff; margin: 0; }
.offer p { margin: 8px 0 0; color: #cdc9dc; }
.code-pill { display: inline-flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border-radius: var(--r-pill); border: 1.5px dashed rgba(255, 255, 255, .45); font-family: var(--font-mono); font-weight: 700; letter-spacing: .1em; color: #fff; }
.code-pill button { border: 0; border-radius: var(--r-pill); background: #fff; color: var(--ink); font: inherit; font-family: var(--font-ui); letter-spacing: 0; font-size: .82rem; font-weight: 700; padding: 8px 14px; cursor: pointer; }
@media (min-width: 800px) { .offer { grid-template-columns: 1fr auto; padding: 44px 48px; } }

/* Values strip */
.values { display: grid; gap: 1px; grid-template-columns: repeat(2, 1fr); background: var(--line); border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line); }
.value { background: var(--surface); padding: 22px 18px; }
.value svg.i { width: 26px; height: 26px; color: var(--brand); stroke-width: 1.5; }
.value h3 { margin: 14px 0 4px; font-size: 1rem; }
.value p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
@media (min-width: 900px) { .values { grid-template-columns: repeat(4, 1fr); } .value { padding: 30px 26px; } }

/* Collections (tags) */
.collections { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .collections { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.coll { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 150px; padding: 18px; border-radius: var(--r-lg); color: var(--ink); background: var(--t-soft); overflow: hidden; transition: transform var(--t-med) var(--ease); }
.coll:hover { transform: translateY(-3px); color: var(--ink); }
.coll b { font-family: var(--font-display); font-weight: 560; font-size: 1.2rem; letter-spacing: -.02em; line-height: 1.1; }
.coll small { color: var(--ink-2); margin-top: 4px; }
.coll .hash { position: absolute; top: 10px; right: 16px; font-family: var(--font-display); font-size: 3.6rem; line-height: 1; color: var(--t-accent); opacity: .16; }

/* Testimonials */
.quotes { display: grid; gap: 14px; }
@media (min-width: 900px) { .quotes { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.quote { padding: 26px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; }
.quote blockquote { margin: 0; font-family: var(--font-display); font-size: 1.15rem; line-height: 1.45; letter-spacing: -.01em; color: var(--ink); }
.quote figcaption { display: flex; align-items: center; gap: 12px; margin-top: auto; font-size: .88rem; }
.quote figcaption b { display: block; }
.quote figcaption span { color: var(--muted); }

/* Journal (blog) */
.post-card { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.post-card .pc-media { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 10; background: var(--sky); }
.post-card .pc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.post-card:hover .pc-media img { transform: scale(1.04); }
.post-card .pc-gen { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: 22px; background: radial-gradient(90% 90% at 100% 0%, #cfe6fb, transparent 60%), radial-gradient(80% 80% at 0% 100%, #ffe1d2, transparent 60%), #eef4fb; }
.post-card .pc-gen b { font-family: var(--font-display); font-weight: 560; font-size: 1.3rem; letter-spacing: -.02em; line-height: 1.12; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card h3 { font-family: var(--font-display); font-weight: 560; font-size: 1.25rem; letter-spacing: -.02em; margin: 0; line-height: 1.2; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a::after { content: ""; position: absolute; inset: 0; }
.post-card p { margin: 0; color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { font-size: .8rem; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- 17. Shop / category ---------- */
.cat-hero { position: relative; padding: 18px 0 30px; background: var(--t-soft, var(--paper)); overflow: hidden; isolation: isolate; }
.cat-hero.is-dark { background: var(--t-tint); color: #fff; }
.cat-hero.is-dark h1, .cat-hero.is-dark .breadcrumbs a, .cat-hero.is-dark .breadcrumbs { color: #fff; }
.cat-hero.is-dark .lede { color: rgba(255, 255, 255, .75); }
.cat-hero.is-dark .kicker { color: #a5f3fc; }
.t-tech .cat-hero.is-dark .kicker, .cat-hero.t-tech .kicker { color: #7ee2b8; }
.cat-hero.t-media .kicker { color: #ffc28a; }
.cat-hero-grid { display: grid; gap: 24px; align-items: end; margin-top: 18px; }
.cat-hero h1 { margin: 0 0 10px; }
.cat-hero .lede { color: var(--ink-2); max-width: 56ch; margin: 0; font-size: 1.02rem; }
.cat-hero-art { display: none; }
@media (min-width: 900px) {
  .cat-hero { padding: 22px 0 48px; }
  .cat-hero-grid { grid-template-columns: 1.2fr .8fr; }
  .cat-hero-art { display: flex; justify-content: flex-end; gap: 14px; align-items: flex-end; height: 220px; }
  .cat-hero-art .cover { width: 150px; border-radius: var(--r-md); box-shadow: var(--sh-3); }
  .cat-hero-art .cover:nth-child(2) { width: 170px; transform: translateY(-14px); }
}
.cat-hero .deco-type { position: absolute; right: -2%; bottom: -18%; font-family: var(--font-display); font-size: clamp(120px, 22vw, 320px); line-height: 1; letter-spacing: -.06em; color: var(--t-accent); opacity: .06; z-index: -1; pointer-events: none; white-space: nowrap; }
.cat-hero.is-dark .deco-type { color: #fff; opacity: .04; }
.cat-hero .deco-code { font-family: var(--font-mono); }
.subnav { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-top: 22px; padding-bottom: 2px; }
.subnav::-webkit-scrollbar { display: none; }
.cat-hero.is-dark .chip { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #fff; }
.cat-hero.is-dark .chip:hover { border-color: #fff; }
.cat-hero.is-dark .chip-active { background: #fff; color: var(--ink); }

.shop-layout { display: grid; gap: 24px; padding-top: 22px; }
@media (min-width: 1024px) { .shop-layout { grid-template-columns: 252px minmax(0, 1fr); gap: 40px; padding-top: 32px; } }
.filters { align-self: start; }
@media (min-width: 1024px) { .filters { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; scrollbar-width: thin; padding-right: 6px; } }
.filter-group { padding: 0 0 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.filter-group:last-child { border-bottom: 0; }
.filter-group h4 { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.filter-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-inline: -10px; border-radius: var(--r-sm); color: var(--ink-2); font-size: .93rem; font-weight: 550; }
.filter-link:hover { background: var(--sunk); color: var(--ink); }
.filter-link.active { background: var(--ink); color: #fff; }
.filter-link.active .glyph-sm { background: rgba(255, 255, 255, .14); color: #fff; }
.filter-link .n { margin-left: auto; font-size: .78rem; color: var(--muted); font-weight: 600; }
.filter-link.active .n { color: rgba(255, 255, 255, .7); }
.price-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.price-inputs input { min-height: 44px; padding: 8px 12px; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.toolbar .result-count { font-size: .9rem; color: var(--muted); margin-right: auto; }
.toolbar select { width: auto; min-height: 44px; padding-block: 8px; font-size: .9rem; border-radius: var(--r-pill); }
.view-toggle { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--sunk); }
.view-toggle button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.view-toggle button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.filter-btn { display: inline-flex; }
@media (min-width: 1024px) { .filter-btn { display: none; } }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 18px; }
.active-filters .chip { min-height: 32px; font-size: .82rem; }
.mobile-filters .filter-group { border-color: var(--line); }

/* ---------- 18. Product page ---------- */
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding-top: 14px; font-size: .84rem; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--ink); }
.breadcrumbs .sep { opacity: .5; }
.breadcrumbs [aria-current] { color: var(--ink-2); max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd { display: grid; gap: 22px; padding-top: 14px; }
@media (min-width: 1024px) { .pd { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 52px; padding-top: 22px; align-items: start; } }
.pd-stage { position: relative; border-radius: var(--r-xl); background: var(--t-tint, var(--sunk)); overflow: hidden; margin-inline: calc(-1 * var(--gutter)); border-radius: 0; }
@media (min-width: 640px) { .pd-stage { margin-inline: 0; border-radius: var(--r-xl); } }
.pd-slides { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.pd-slides::-webkit-scrollbar { display: none; }
.pd-slide { scroll-snap-align: center; display: grid; place-items: center; padding: 28px 13%; min-height: 360px; }
.pd-slide .cover { width: 100%; max-width: 420px; background: transparent; }
.pd-slide.is-photo { padding: 0; }
.pd-slide.is-photo img { width: 100%; height: 100%; max-height: 640px; object-fit: contain; }
.pd-slide.is-photo button { border: 0; padding: 0; background: none; cursor: zoom-in; width: 100%; height: 100%; }
@media (min-width: 1024px) { .pd-slide { min-height: 560px; padding: 48px 14%; } }
.pd-dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 6px; }
.pd-dots button { width: 7px; height: 7px; padding: 0; border-radius: 4px; border: 0; background: rgba(23, 20, 42, .25); transition: width var(--t-med) var(--ease), background-color var(--t-med); cursor: pointer; }
.pd-dots button[aria-current="true"] { width: 22px; background: var(--ink); }
.is-dark-stage .pd-dots button { background: rgba(255, 255, 255, .3); }
.is-dark-stage .pd-dots button[aria-current="true"] { background: #fff; }
.pd-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.pd-thumbs button { width: 72px; height: 72px; flex-shrink: 0; border-radius: var(--r-sm); overflow: hidden; border: 2px solid transparent; padding: 0; background: var(--sunk); cursor: pointer; transition: border-color var(--t-fast); }
.pd-thumbs button[aria-current="true"] { border-color: var(--ink); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs .cover { height: 100%; aspect-ratio: auto; }
.pd-stage-tools { position: absolute; top: 14px; right: 14px; display: flex; gap: 8px; z-index: 2; }
.pd-info { display: grid; gap: 16px; align-content: start; }
@media (min-width: 1024px) { .pd-info { position: sticky; top: calc(var(--header-h) + 22px); } }
.pd-info h1 { font-size: clamp(1.8rem, 1.3rem + 2.2vw, 2.6rem); line-height: 1.05; margin: 0; }
.pd-by { color: var(--ink-2); font-size: .95rem; }
.pd-by b { color: var(--ink); }
.pd-summary { color: var(--ink-2); font-size: 1.02rem; margin: 0; }
.pd-rating { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.pd-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.pd-price .price { font-size: 2rem; font-weight: 750; letter-spacing: -.02em; }
.pd-price .price-was { font-size: 1.05rem; margin: 0; }
.pd-price .off { font-size: .85rem; padding: 3px 9px; border-radius: var(--r-pill); background: var(--peach); margin: 0; }
.pd-price .approx { flex-basis: 100%; }
.pd-actions { display: grid; gap: 10px; }
.pd-actions .row { flex-wrap: nowrap; }
.pd-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--line); }
.pd-facts div { background: var(--surface); padding: 12px 14px; min-width: 0; }
.pd-facts dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.pd-facts dd { margin: 3px 0 0; font-weight: 650; font-size: .92rem; overflow-wrap: anywhere; }
.pd-trust { display: grid; gap: 10px; padding: 16px; border-radius: var(--r-lg); background: var(--sunk); font-size: .88rem; color: var(--ink-2); }
.pd-trust div { display: flex; gap: 10px; align-items: flex-start; }
.pd-trust svg.i { width: 18px; height: 18px; color: var(--success); margin-top: 1px; }
.pd-owned { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-radius: var(--r-md); background: var(--mint); color: #0b5139; font-weight: 600; }
.sample-box { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--r-md); border: 1px dashed var(--line-2); background: var(--surface); font-size: .9rem; }
.sample-box .glyph { background: var(--mint); color: var(--mint-ink); }
.sample-box a { font-weight: 650; }
.sample-player { width: 100%; margin-top: 8px; }
.pd-tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* In-page section nav (mobile-friendly alternative to tabs) */
.pd-nav { position: sticky; top: var(--header-h); z-index: 30; margin: 40px calc((100% - 100vw) / 2) 0; padding: 0 calc((100vw - 100%) / 2); background: rgba(250, 248, 245, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.pd-nav .chips { padding-block: 10px; }
.pd-nav a.chip { min-height: 34px; }
.pd-nav a.chip.is-current { background: var(--ink); color: #fff; border-color: var(--ink); }
.pd-sections { display: grid; gap: 0; }
.pd-section { padding: 34px 0; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 64px); }
.pd-section:last-child { border-bottom: 0; }
.pd-section > h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); margin-bottom: 16px; }
@media (min-width: 1024px) { .pd-section { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; padding: 48px 0; } .pd-section > h2 { margin: 0; position: sticky; top: calc(var(--header-h) + 80px); align-self: start; } }
.prose { color: var(--ink-2); line-height: 1.75; font-size: 1.02rem; max-width: 70ch; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.4rem; margin: 1.6em 0 .5em; color: var(--ink); }
.prose h3 { font-size: 1.12rem; margin: 1.4em 0 .4em; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--t-accent, var(--brand)); }
.prose a { text-decoration: underline; text-decoration-thickness: 1px; }
.prose blockquote, .article-body blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--t-accent, var(--brand)); font-family: var(--font-display); font-size: 1.15em; color: var(--ink); }
.prose img { border-radius: var(--r-md); }
.checklist { list-style: none; padding: 0 !important; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.checklist li::before { content: ""; flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%230f6a4c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2.5 6.5 2.5 2.5 4.5-5.5'/%3E%3C/svg%3E") center no-repeat; }
.spec-table { display: grid; grid-template-columns: minmax(110px, auto) 1fr; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.spec-table dt, .spec-table dd { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: .93rem; }
.spec-table dt { color: var(--muted); font-weight: 600; background: var(--paper); }
.spec-table dd { font-weight: 600; overflow-wrap: anywhere; }
.spec-table dt:nth-last-of-type(1), .spec-table dd:last-of-type { border-bottom: 0; }
.file-list { display: grid; gap: 8px; margin-top: 16px; }
.file-chip { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); font-size: .9rem; min-width: 0; }
.file-chip .ext { flex-shrink: 0; min-width: 44px; height: 30px; padding: 0 6px; border-radius: 8px; display: grid; place-items: center; background: var(--t-soft, var(--lavender)); color: var(--t-accent-text, var(--brand)); font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.file-chip .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-chip .sz { margin-left: auto; color: var(--muted); font-size: .82rem; white-space: nowrap; }

/* Theme-specific preview blocks */
.toc-book { list-style: none; padding: 0; margin: 0; counter-reset: ch; border-top: 1px solid var(--line); }
.toc-book li { counter-increment: ch; display: flex; gap: 18px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-size: 1.08rem; color: var(--ink); }
.toc-book li::before { content: counter(ch, decimal-leading-zero); font-family: var(--font-ui); font-size: .78rem; font-weight: 700; color: var(--t-accent-text); letter-spacing: .06em; min-width: 26px; }
.toc-book li span { margin-left: auto; font-family: var(--font-ui); font-size: .84rem; color: var(--muted); }
.curriculum { display: grid; gap: 10px; }
.module { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.module summary { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; list-style: none; font-weight: 650; }
.module summary::-webkit-details-marker { display: none; }
.module summary .m-no { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--t-soft); color: var(--t-accent-text); font-size: .8rem; font-weight: 800; flex-shrink: 0; }
.module summary .m-ct { margin-left: auto; font-size: .8rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.module summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: -4px 4px 0 6px; transition: transform var(--t-med) var(--ease); flex-shrink: 0; }
.module[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.module ol { list-style: none; margin: 0; padding: 0 18px 12px; }
.module li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: .93rem; color: var(--ink-2); }
.module li svg.i { width: 16px; height: 16px; color: var(--t-accent); }
.module li span { margin-left: auto; color: var(--muted); font-size: .82rem; }
.codeblock { position: relative; border-radius: var(--r-lg); background: #0e111a; color: #d6deeb; overflow: hidden; box-shadow: var(--sh-2); }
.codeblock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #161b28; color: #7c86a6; font-family: var(--font-mono); font-size: .78rem; }
.codeblock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.codeblock-bar i:nth-child(2) { background: #febc2e; } .codeblock-bar i:nth-child(3) { background: #28c840; margin-right: 8px; }
.codeblock pre { margin: 0; padding: 18px; overflow-x: auto; font-size: .86rem; line-height: 1.65; tab-size: 4; }
.copy-btn { position: absolute; top: 6px; right: 8px; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); color: #d6deeb; font-size: .78rem; font-weight: 650; cursor: pointer; }
.copy-btn:hover { background: rgba(255, 255, 255, .14); }
.copy-btn svg.i { width: 14px; height: 14px; }
.copy-btn.done { color: #3ddc97; border-color: rgba(61, 220, 151, .4); }
.prompts { display: grid; gap: 14px; }
.prompt-card { position: relative; padding: 20px; border-radius: var(--r-lg); color: #eceaff; overflow: hidden; isolation: isolate; background: #13113a; }
.prompt-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 90% at 0% 0%, rgba(124, 92, 255, .45), transparent 60%), radial-gradient(60% 80% at 100% 100%, rgba(34, 211, 238, .25), transparent 60%); }
.prompt-card .pr-label { display: flex; align-items: center; gap: 8px; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: #a5f3fc; margin-bottom: 10px; }
.prompt-card p { margin: 0; font-family: var(--font-mono); font-size: .9rem; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.prompt-card .copy-btn { top: 14px; right: 14px; }
.model-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.model-chips span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); background: #efeaff; color: #3a24b5; font-size: .82rem; font-weight: 650; }
.tracklist { list-style: none; margin: 0; padding: 0; counter-reset: tr; border-radius: var(--r-lg); overflow: hidden; background: #1a1330; color: #f1ecff; }
.tracklist li { counter-increment: tr; display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid rgba(255, 255, 255, .07); font-size: .94rem; }
.tracklist li:last-child { border-bottom: 0; }
.tracklist li::before { content: counter(tr, decimal-leading-zero); font-family: var(--font-mono); font-size: .78rem; color: #ffb86b; min-width: 22px; }
.tracklist li span { margin-left: auto; font-family: var(--font-mono); font-size: .82rem; color: #b8afd4; }
.doc-outline { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; counter-reset: dc; }
.doc-outline li { counter-increment: dc; display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--t-accent); font-weight: 600; font-size: .95rem; }
.doc-outline li::before { content: counter(dc); font-size: .78rem; font-weight: 800; color: var(--t-accent-text); min-width: 18px; }
.doc-outline li span { margin-left: auto; font-weight: 500; color: var(--muted); font-size: .84rem; }
.page-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .page-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.page-grid li { list-style: none; position: relative; aspect-ratio: 3 / 4; padding: 16px 14px; border-radius: var(--r-md); background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-1); font-weight: 650; font-size: .88rem; color: var(--ink); display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.page-grid li::before { content: ""; position: absolute; left: 14px; right: 14px; top: 16px; height: 46%; border-radius: 8px; background: repeating-linear-gradient(180deg, var(--t-soft) 0 14px, transparent 14px 20px); }
.page-grid { padding: 0; margin: 0; }
.author-card { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: var(--r-lg); background: var(--t-soft, var(--sunk)); }
.author-card .avatar { width: 56px; height: 56px; font-size: 1.2rem; background: var(--t-accent, var(--brand)); flex-shrink: 0; }
.author-card small { display: block; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.author-card b { font-family: var(--font-display); font-weight: 560; font-size: 1.2rem; }
.licence-box { padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.licence-box h3 { display: flex; align-items: center; gap: 10px; }

/* Reviews */
.review-summary { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.review-summary .big { font-family: var(--font-display); font-size: 3rem; line-height: 1; font-weight: 560; }
.review { padding: 18px 0; border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: 0; }
.review-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.review p { margin: 8px 0; color: var(--ink-2); }
.verified { display: inline-flex; align-items: center; gap: 4px; color: var(--success); font-weight: 650; }
.verified svg.i { width: 14px; height: 14px; }
.rating-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rating-input input { position: absolute; opacity: 0; pointer-events: none; }
.rating-input label { margin: 0; font-size: 1.9rem; line-height: 1; color: var(--line-2); cursor: pointer; transition: color var(--t-fast), transform var(--t-fast); }
.rating-input label:hover, .rating-input label:hover ~ label, .rating-input input:checked ~ label { color: #e3a008; }
.rating-input input:focus-visible + label { outline: 2px solid var(--brand); border-radius: 4px; }

/* FAQ / accordion */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 2px; font-weight: 650; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--sunk) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2317142a' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M6 1v10M1 6h10'/%3E%3C/svg%3E") center no-repeat; transition: transform var(--t-med) var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div, .faq details > p { padding: 0 2px 18px; margin: 0; color: var(--ink-2); }
@media (prefers-reduced-motion: no-preference) { .faq details[open] > div, .faq details[open] > p { animation: fade-up var(--t-med) var(--ease); } }

/* Sticky purchase bar (mobile) */
.buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: flex; align-items: center; gap: 12px; padding: 10px max(var(--gutter), var(--safe-l)) calc(10px + var(--safe-b)); background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-top: 1px solid var(--line); box-shadow: 0 -12px 30px -20px rgba(23, 20, 42, .35); transform: translateY(0); transition: transform var(--t-med) var(--ease); }
.buybar .bb-price { min-width: 0; line-height: 1.2; }
.buybar .bb-price small { display: block; color: var(--muted); font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 38vw; }
.buybar .bb-price .price { font-size: 1.15rem; }
.buybar .btn { flex: 1; --btn-h: 52px; }
.buybar .tool-btn { box-shadow: none; border: 1px solid var(--line-2); width: 52px; height: 52px; flex-shrink: 0; }
@media (min-width: 1024px) { .buybar { display: none; } }

/* ---------- 19. Cart & checkout ---------- */
.page-title { padding: 26px 0 8px; }
.page-title h1 { margin: 0; }
.page-title p { margin: 6px 0 0; color: var(--muted); }
.steps { display: flex; align-items: center; gap: 8px; margin: 4px 0 18px; font-size: .82rem; font-weight: 650; color: var(--muted); overflow-x: auto; scrollbar-width: none; }
.steps span { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.steps b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--sunk); font-size: .75rem; }
.steps .done b { background: var(--mint); color: var(--mint-ink); }
.steps .on { color: var(--ink); }
.steps .on b { background: var(--ink); color: #fff; }
.steps i { width: 22px; height: 1px; background: var(--line-2); flex-shrink: 0; }
.cart-layout { display: grid; gap: 20px; padding-bottom: 24px; }
@media (min-width: 960px) { .cart-layout { grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; } }
.line-items { display: grid; gap: 12px; }
.line-item { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 12px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); align-items: center; }
.line-item .cover { border-radius: var(--r-md); }
.line-item .li-title { font-weight: 650; color: var(--ink); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-item .li-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.line-item .remove { display: inline-flex; align-items: center; gap: 4px; font-size: .84rem; color: var(--muted); }
.line-item .remove:hover { color: var(--danger); }
@media (min-width: 640px) { .line-item { grid-template-columns: 104px minmax(0, 1fr); padding: 14px; gap: 18px; } }
.summary { padding: 22px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-2); }
@media (min-width: 960px) { .summary { position: sticky; top: calc(var(--header-h) + 20px); } }
.summary h2, .summary h3 { font-size: 1.3rem; margin-bottom: 14px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; color: var(--ink-2); font-size: .95rem; }
.summary-row span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.summary-row.total { border-top: 1px dashed var(--line-2); margin-top: 10px; padding-top: 16px; font-size: 1.25rem; font-weight: 750; color: var(--ink); }
.summary-row.disc { color: var(--success); }
.coupon-form { display: flex; gap: 8px; margin: 4px 0 14px; }
.coupon-form input { text-transform: uppercase; min-height: 46px; letter-spacing: .06em; font-family: var(--font-mono); font-size: .92rem; }
.coupon-applied { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: var(--r-md); background: var(--mint); color: #0b5139; font-weight: 650; font-size: .9rem; margin-bottom: 14px; }
.pay-option { display: flex; gap: 14px; align-items: center; padding: 16px; border: 1.5px solid var(--line); border-radius: var(--r-lg); cursor: pointer; margin-bottom: 10px; background: var(--surface); transition: border-color var(--t-fast), background-color var(--t-fast); }
.pay-option:hover { border-color: var(--line-2); }
.pay-option:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.pay-option input { accent-color: var(--brand); width: 20px; height: 20px; flex-shrink: 0; }
.pay-option b { display: block; }
.pay-option small { color: var(--muted); }
.pay-logos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.pay-logos span { padding: 2px 8px; border-radius: 6px; background: var(--sunk); font-size: .72rem; font-weight: 700; color: var(--ink-2); }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; font-size: .8rem; color: var(--muted); text-align: center; }
.secure-note svg.i { width: 15px; height: 15px; color: var(--success); }
.mini-items { display: grid; gap: 10px; margin-bottom: 8px; }
.mini-item { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; font-size: .9rem; }
.mini-item .cover { border-radius: 10px; }
.mini-item span:first-of-type { line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Payment / order status screens */
.status-hero { text-align: center; padding: 34px 20px 28px; }
.status-icon { width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.status-icon svg.i { width: 40px; height: 40px; stroke-width: 2; }
.status-icon.ok { background: var(--mint); color: var(--success); }
.status-icon.ok::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid var(--mint); animation: ring 1.6s var(--ease) infinite; }
.status-icon.wait { background: var(--sky); color: var(--sky-ink); }
.status-icon.wait svg { animation: spin 1.6s linear infinite; }
.status-icon.fail { background: var(--rose); color: var(--danger); }
.status-icon.gray { background: var(--sunk); color: var(--ink-2); }
.status-hero h1 { font-size: clamp(1.7rem, 1.3rem + 2vw, 2.4rem); margin-bottom: 8px; }
.status-hero p { color: var(--ink-2); max-width: 48ch; margin: 0 auto 18px; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.timeline li { position: relative; padding: 0 0 18px 28px; font-size: .9rem; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
.timeline li::after { content: ""; position: absolute; left: 9.5px; top: 20px; bottom: 2px; width: 1px; background: var(--line-2); }
.timeline li:last-child::after { display: none; }
.timeline small { display: block; color: var(--muted); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 150; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: confetti 2.6s var(--ease) forwards; }

/* ---------- 20. Account ---------- */
.account-layout { display: grid; gap: 20px; padding-block: 18px 28px; }
@media (min-width: 1024px) { .account-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 40px; padding-top: 32px; } }
.account-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding: 2px var(--gutter); }
.account-nav::-webkit-scrollbar { display: none; }
.account-nav a, .account-nav .link-btn { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r-pill); color: var(--ink-2); font-weight: 600; font-size: .9rem; white-space: nowrap; background: var(--surface); border: 1px solid var(--line); }
.account-nav a:hover { color: var(--ink); border-color: var(--line-2); }
.account-nav a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.account-nav svg.i { width: 18px; height: 18px; }
.account-nav form { display: contents; }
@media (min-width: 1024px) {
  .account-nav { flex-direction: column; margin: 0; padding: 0; overflow: visible; position: sticky; top: calc(var(--header-h) + 24px); align-self: start; gap: 2px; }
  .account-nav a, .account-nav .link-btn { border: 0; background: none; border-radius: var(--r-sm); padding: 11px 14px; width: 100%; }
  .account-nav a.active { background: var(--surface); color: var(--ink); box-shadow: var(--sh-2); }
  .account-nav a.active svg { color: var(--brand); }
  .account-nav .nav-sep { height: 1px; background: var(--line); margin: 10px 14px; }
}
.welcome { position: relative; padding: 24px; border-radius: var(--r-xl); background: var(--ink); color: #fff; overflow: hidden; isolation: isolate; }
.welcome::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 120% at 100% 0%, rgba(139, 123, 255, .55), transparent 60%), radial-gradient(50% 90% at 0% 100%, rgba(255, 160, 120, .3), transparent 60%); }
.welcome h1 { color: #fff; font-size: clamp(1.7rem, 1.3rem + 2vw, 2.4rem); margin: 0 0 6px; }
.welcome p { margin: 0; color: #cdc9dc; }
.welcome .row { margin-top: 18px; }
@media (min-width: 768px) { .welcome { padding: 34px; } }
.stat-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
.stat { padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat b { display: block; font-family: var(--font-display); font-weight: 560; font-size: 1.75rem; letter-spacing: -.02em; line-height: 1.1; overflow-wrap: anywhere; }
.stat span { color: var(--muted); font-size: .84rem; font-weight: 600; }
.stat svg.i { color: var(--brand); width: 20px; height: 20px; margin-bottom: 6px; }
.stat.grad-lavender, .stat.grad-sky, .stat.grad-peach, .stat.grad-mint, .stat.grad-rose { border: 0; }
.lib-grid { display: grid; gap: 12px; }
.lib-item { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.lib-item .cover { border-radius: var(--r-sm); }
.lib-item h3 { font-size: 1rem; margin: 0 0 4px; line-height: 1.3; }
.lib-item h3 a { color: var(--ink); }
.lib-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .8rem; color: var(--muted); }
.lib-files { grid-column: 1 / -1; display: grid; gap: 8px; }
.dl-row { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-radius: var(--r-md); background: var(--paper); min-width: 0; }
.dl-row .ext { flex-shrink: 0; min-width: 42px; height: 28px; padding: 0 6px; border-radius: 7px; display: grid; place-items: center; background: var(--lavender); color: var(--lavender-ink); font-size: .66rem; font-weight: 800; text-transform: uppercase; }
.dl-row .nm { min-width: 0; flex: 1; font-size: .88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-row .nm small { display: block; font-weight: 500; color: var(--muted); }
.dl-row form { flex-shrink: 0; }
.usage { height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; width: 120px; display: inline-block; vertical-align: middle; }
.usage i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
@media (min-width: 768px) { .lib-item { grid-template-columns: 96px minmax(0, 1fr); padding: 18px; gap: 20px; } .lib-files { grid-column: 2; } }
.order-cards { display: grid; gap: 10px; }
.order-card { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); color: var(--ink); transition: border-color var(--t-fast), transform var(--t-fast); }
.order-card:hover { border-color: var(--line-2); color: var(--ink); transform: translateY(-1px); }
.order-card .oc-no { font-weight: 700; font-family: var(--font-mono); font-size: .9rem; }
.order-card .oc-sub { grid-column: 1; font-size: .84rem; color: var(--muted); }
.order-card .oc-total { font-weight: 750; text-align: right; }
.order-card .badge { justify-self: end; }
.ref-card { display: grid; gap: 12px; padding: 22px; border-radius: var(--r-xl); background: var(--peach); }
.ref-card h3 { margin: 0; font-family: var(--font-display); font-weight: 560; font-size: 1.3rem; }
.ref-card .share-btn { background: rgba(255, 255, 255, .7); }
.ticket-thread { display: grid; gap: 12px; }
.msg { max-width: 88%; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.msg.me { margin-left: auto; background: var(--brand-50); border-color: var(--brand-100); border-bottom-right-radius: 6px; }
.msg.staff { border-bottom-left-radius: 6px; }
.msg small { display: block; color: var(--muted); margin-top: 6px; font-size: .76rem; }

/* ---------- 21. Auth ---------- */
.auth-wrap { min-height: calc(100vh - var(--header-h) - var(--bnav-h)); display: grid; place-items: center; padding-block: 28px 40px; }
.auth-shell { width: 100%; display: grid; gap: 0; max-width: 980px; border-radius: var(--r-xl); overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-3); }
.auth-art { display: none; position: relative; padding: 40px; color: #fff; background: var(--ink); overflow: hidden; isolation: isolate; }
.auth-art::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 70% at 100% 0%, rgba(139, 123, 255, .6), transparent 60%), radial-gradient(60% 60% at 0% 100%, rgba(255, 160, 120, .35), transparent 60%); }
.auth-art h2 { color: #fff; font-size: 2.1rem; margin-top: auto; }
.auth-art p { color: #cdc9dc; }
.auth-art ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; font-size: .92rem; }
.auth-art li { display: flex; gap: 10px; align-items: center; }
.auth-art li svg.i { color: #b7a7ff; }
.auth-card { padding: 28px 22px; width: 100%; }
.auth-card h1 { font-size: 1.9rem; margin-bottom: 6px; }
.auth-card > p.muted { margin-bottom: 20px; }
.auth-alt { margin-top: 22px; text-align: center; font-size: .92rem; color: var(--muted); }
.pw-field { position: relative; }
.pw-field input { padding-right: 52px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
@media (min-width: 860px) { .auth-shell { grid-template-columns: .9fr 1.1fr; } .auth-art { display: flex; flex-direction: column; } .auth-card { padding: 48px 52px; } }
@media (max-width: 859px) { .auth-shell { box-shadow: none; border: 0; background: transparent; } .auth-card { padding: 8px 0; } }

/* ---------- 22. Content pages, blog, article ---------- */
.content-hero { padding: 28px 0 10px; }
.content-hero h1 { max-width: 20ch; }
.content-hero .lede { color: var(--ink-2); font-size: 1.08rem; max-width: 60ch; }
.article-layout { display: grid; gap: 32px; padding-top: 12px; }
@media (min-width: 1024px) { .article-layout { grid-template-columns: minmax(0, 1fr) 290px; gap: 56px; } }
.article-head { max-width: 760px; padding-top: 18px; }
.article-head h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.2rem); line-height: 1.05; }
.article-hero { border-radius: var(--r-xl); overflow: hidden; margin: 22px 0 6px; aspect-ratio: 16 / 9; background: var(--sunk); }
.article-hero img { width: 100%; height: 100%; object-fit: cover; }
.article-body { font-size: 1.08rem; line-height: 1.8; color: var(--ink-2); max-width: 70ch; }
.article-body > p:first-of-type::first-letter { font-family: var(--font-display); float: left; font-size: 3.4em; line-height: .9; padding: 6px 10px 0 0; color: var(--brand); }
.article-body h2 { font-size: 1.6rem; margin: 1.8em 0 .5em; color: var(--ink); }
.article-body h3 { font-size: 1.2rem; margin: 1.5em 0 .4em; color: var(--ink); }
.article-body img { border-radius: var(--r-md); margin: 20px 0; }
.article-body a { text-decoration: underline; text-decoration-thickness: 1px; }
.article-body ul, .article-body ol { padding-left: 1.3em; }
.article-body li::marker { color: var(--brand); }
@media (min-width: 1024px) { .article-aside { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; display: grid; gap: 16px; } }
.toc { padding: 18px 20px; font-size: .9rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.toc h4, .toc b { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.toc ol { margin: 10px 0 0; padding: 0; list-style: none; }
.toc li.lvl-3 { padding-left: 14px; }
.toc a { display: block; padding: 5px 0 5px 12px; color: var(--ink-2); border-left: 2px solid var(--line); }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--brand); border-color: var(--brand); font-weight: 650; }
.author-box { display: flex; gap: 16px; align-items: flex-start; padding: 22px; border-radius: var(--r-lg); background: var(--sunk); }
.author-avatar { width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; overflow: hidden; display: grid; place-items: center; font-weight: 700; font-size: 1.4rem; color: #fff; background: linear-gradient(135deg, var(--brand), #8a6cff); }
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cat-intro { margin-bottom: 22px; }

/* Share */
.share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.share > span { font-size: .84rem; color: var(--muted); margin-right: 2px; }
.share-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: inherit; font-size: .8rem; font-weight: 650; cursor: pointer; text-decoration: none !important; }
.share-btn:hover { border-color: var(--ink); color: var(--ink); }

/* Pagination */
.pagination { display: flex; gap: 6px; justify-content: center; align-items: center; margin: 40px 0 8px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 44px; height: 44px; padding: 0 14px; display: grid; place-items: center; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 650; font-size: .92rem; }
.pagination a:hover { border-color: var(--ink); color: var(--ink); }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Consent, install, misc */
.consent { position: fixed; left: 12px; right: 12px; bottom: calc(var(--bnav-h) + var(--safe-b) + 12px); z-index: 95; max-width: 460px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-3); padding: 18px; font-size: .9rem; animation: toast-in var(--t-med) var(--ease); }
.consent p { margin: 0 0 12px; color: var(--ink-2); }
@media (min-width: 1024px) { .consent { left: 24px; right: auto; bottom: 24px; margin: 0; } }
.install-banner { display: none !important; }
.install-banner.show { display: flex !important; }
.test-banner { background: repeating-linear-gradient(45deg, #fff6d4, #fff6d4 10px, #ffefb3 10px, #ffefb3 20px); border: 2px dashed #d9a800; border-radius: var(--r-md); padding: 14px; font-weight: 600; color: #6b5000; }
.maintenance { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 40px 20px; }

/* Scroll reveal (only when JS is running; content stays visible without it) */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .js [data-reveal].in { opacity: 1; transform: none; }
}

/* Cross-document page transitions (progressive enhancement, Chromium) */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: vt-out .18s var(--ease) both; }
  ::view-transition-new(root) { animation: vt-in .3s var(--ease) both; }
}
.site-header { view-transition-name: site-header; }
.bottom-nav { view-transition-name: bottom-nav; }

/* ---------- 23. Keyframes ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } }
@keyframes dlg-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes search-in { from { opacity: 0; transform: translateY(-10px); } }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }
@keyframes heart { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes wave { from { transform: scaleY(.55); } to { transform: scaleY(1.15); } }
@keyframes ring { 0% { transform: scale(.9); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes confetti { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(105vh) rotate(720deg); opacity: .9; } }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes fly { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(var(--fx), var(--fy)) scale(.2); } }
.fly-dot { position: fixed; z-index: 130; width: 14px; height: 14px; border-radius: 50%; background: var(--brand); pointer-events: none; animation: fly .6s var(--ease) forwards; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- 24. Utility gradients (kept for admin/legacy markup) ---------- */
.grad-lavender { background: var(--lavender); }
.grad-sky { background: var(--sky); }
.grad-peach { background: var(--peach); }
.grad-mint { background: var(--mint); }
.grad-rose { background: var(--rose); }
.grad-lemon { background: var(--lemon); }

@media print {
  .site-header, .site-footer, .bottom-nav, .buybar, .no-print, .admin-side, .admin-topbar, .toast-wrap { display: none !important; }
  body { background: #fff; padding: 0; }
  .card { box-shadow: none; }
}

/* Article grids: one column on phones, more as space allows */
.post-grid { display: grid; gap: 30px 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; } }
.chip:has(input:checked) { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.surface-dark .chip:has(input:checked) { background: #fff; color: #10131c; border-color: #fff; }
.cat-intro { padding: 20px 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); max-width: none; }
.cat-intro p:last-child { margin-bottom: 0; }
.surface-dark .filter-link.active { background: #fff; color: #10131c; }
.surface-dark .filter-link.active .glyph-sm { background: var(--t-soft); color: var(--t-accent); }
.surface-dark .filter-link .glyph-sm { background: rgba(255, 255, 255, .08); color: #fff; }
.surface-dark .btn-outline { background: transparent; color: var(--ink); }
.surface-dark .btn-outline:hover { border-color: #fff; }
.surface-dark .empty-art::before { background: rgba(255, 255, 255, .06); }
.surface-dark .empty-art svg.i { color: #fff; }
.cat-hero.is-dark .breadcrumbs [aria-current] { color: rgba(255, 255, 255, .62); }
.cat-hero.is-dark .breadcrumbs a { color: rgba(255, 255, 255, .85); }
.pd-section > h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2rem); }
.pd-section .prose h2 { font-size: 1.22rem; font-family: var(--font-ui); font-weight: 700; letter-spacing: -.01em; }
.pd-section .prose h3 { font-size: 1.05rem; }
.codeblock code, pre code { background: none; padding: 0; border-radius: 0; color: inherit; font-size: inherit; }
pre, code, kbd, .cv-term, .prompt-card p { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }

/* ---------- Error pages (404 / 410) ---------- */
.err-page { padding-block: 28px 8px; }
.err-hero { text-align: center; max-width: 720px; margin: 0 auto; display: grid; justify-items: center; gap: 0; }
.err-code { display: flex; align-items: center; justify-content: center; gap: .08em; font-family: var(--font-display); font-weight: 600; font-size: clamp(4.5rem, 3rem + 9vw, 8.5rem); line-height: 1; letter-spacing: -.04em; color: var(--ink); margin-bottom: 14px; }
.err-glyph { width: .82em; height: .82em; border-radius: 50%; display: grid; place-items: center; background: var(--lavender); color: var(--brand); position: relative; }
.err-glyph::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px dashed var(--brand-200); animation: err-spin 18s linear infinite; }
.err-glyph svg.i { width: 46%; height: 46%; stroke-width: 1.6; }
@keyframes err-spin { to { transform: rotate(360deg); } }
.err-hero h1 { margin: 0 0 10px; font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.6rem); }
.err-text { color: var(--muted); max-width: 52ch; margin: 0 0 22px; font-size: 1.02rem; overflow-wrap: anywhere; }
.err-search { display: flex; gap: 8px; width: 100%; max-width: 560px; margin-bottom: 16px; }
.err-search .search-field { flex: 1; min-width: 0; margin: 0; background: var(--surface); border: 1px solid var(--line-2); }
.err-search .search-field svg.i { color: var(--muted); flex-shrink: 0; }
.err-search .search-field input { font-size: 1rem; }
.err-search .btn { flex-shrink: 0; height: 50px; }
.err-actions { justify-content: center; gap: 8px; margin-bottom: 22px; }
.err-hero .chip-cloud { justify-content: center; }
.err-products { margin-top: 48px; }
@media (max-width: 479px) {
  .err-search .btn { padding: 0 16px; }
  .err-actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .err-glyph::after { animation: none; } }

/* The mega menu is desktop-only (phones use the Browse sheet); keep it out of the layout on small screens */
@media (max-width: 1023px) { .mega { display: none; } }
/* Sale/Free flag sits top-left on cards – keep the course cover's own chip clear of it */
.pcard:has(.pcard-flag) .cv-course .cs-chip { margin-top: 22px; }
/* Tablet: media and buy box side by side so the price is visible without scrolling past a huge cover */
@media (min-width: 720px) and (max-width: 1023px) {
  .pd { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .pd-slide { min-height: 0; padding: 32px 10%; }
  .pd-media { position: sticky; top: calc(var(--header-h) + 16px); }
}
/* Checkout steps on small phones: only the current step keeps its label (others stay as circles, names remain for screen readers) */
@media (max-width: 479px) {
  .steps span:not(.on) { font-size: 0; gap: 0; }
  .steps span:not(.on) b { font-size: .75rem; }
  .steps i { flex: 1; min-width: 12px; }
}
/* The pill wrapper draws the border/focus ring – the bare input inside must not add its own */
.search-field input[type=search], .search-field input[type=search]:hover, .search-field input[type=search]:focus { border: 0; box-shadow: none; background: none; min-height: 0; height: 100%; padding: 0; border-radius: 0; }
/* Section labels that are real headings (h2) but look like small caps labels */
.footer-grid h2, .filter-group h2, .search-group h2 { font-family: var(--font-ui); font-weight: 700; line-height: 1.4; }
.footer-grid h2 { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: #a9a4bc; margin: 0 0 14px; }
.filter-group h2 { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.search-group h2 { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
/* Contrast fixes (WCAG AA 4.5:1 for small text) */
.header-search kbd { color: var(--muted); }
.cv-term .c { color: #8a94b8; }
.site-footer .brand-dot { color: #a996ff; }
.mega-side h2 { font-family: var(--font-ui); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 6px 0 8px; line-height: 1.4; }
.value h2.value-title { margin: 14px 0 4px; font-family: var(--font-ui); font-weight: 700; font-size: 1rem; letter-spacing: 0; }
.newsletter:focus-within { border-color: #a996ff; box-shadow: 0 0 0 3px rgba(169, 150, 255, .35); }
/* ---------- Sell with us (sell.php) ---------- */
.sell-hero { display: grid; gap: 28px; padding: 32px 0 12px; align-items: center; }
.sell-hero h1 { max-width: 16ch; }
.sell-hero h1 .hl { color: var(--brand); background: linear-gradient(90deg, #ffc9b3, #d9d0ff) no-repeat 0 88% / 100% .16em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.sell-hero .lede { color: var(--ink-2); font-size: 1.08rem; max-width: 56ch; }
.sell-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sell-points li { padding: 18px; border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sell-points svg.i { width: 24px; height: 24px; color: var(--ink); margin-bottom: 6px; }
.sell-points b { font-size: .98rem; }
.sell-points span { font-size: .86rem; line-height: 1.45; color: var(--ink-2); }
.sell-h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); margin-bottom: 16px; }
.sell-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: none; }
.sell-steps li { position: relative; padding: 22px 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.sell-steps li > b { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: .9rem; margin-bottom: 12px; }
.sell-steps h3 { font-family: var(--font-ui); font-weight: 700; font-size: 1.02rem; margin: 0 0 4px; }
.sell-steps p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.sell-form-wrap { display: grid; gap: 20px; padding: 32px 0; scroll-margin-top: calc(var(--header-h) + 12px); }
.sell-form-intro h2 { margin-bottom: 8px; }
.sell-card { border-radius: var(--r-xl); }
.sell-done { text-align: center; padding: 24px 6px; }
.sell-done-ico { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: var(--mint-ink); }
.sell-done-ico svg.i { width: 28px; height: 28px; }
.sell-done h3 { font-size: 1.3rem; }
.sell-done p { max-width: 44ch; margin: 0 auto 18px; }
@media (min-width: 760px) { .sell-steps { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) {
  .sell-hero { grid-template-columns: 1.15fr 1fr; gap: 48px; padding-top: 48px; }
  .sell-form-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 48px; align-items: start; padding-block: 56px; }
  .sell-form-intro { position: sticky; top: calc(var(--header-h) + 24px); }
}
/* ---------- Ravika brand (logo: navy + gold, spaced serif wordmark) ---------- */
.brand { gap: 10px; }
.brand img { width: 40px; height: 40px; border-radius: 0; object-fit: contain; }
.brand-name { font-family: var(--font-display); font-weight: 500; font-size: 1.12rem; letter-spacing: .22em; text-transform: uppercase; color: #1d2b45; line-height: 1; }
.site-footer .brand-name { color: #fff; }
.footer-brand .brand img { width: 44px; height: 44px; }
@media (max-width: 379px) { .brand img { width: 34px; height: 34px; } .brand-name { font-size: 1rem; letter-spacing: .16em; } }
/* Ghost button on a dark panel (account welcome) – no light box on hover, text stays white */
.btn-on-dark, .btn-on-dark:hover, .btn-on-dark:focus-visible { color: #fff; background: transparent; }
.btn-on-dark:hover svg { transform: translateX(3px); }
.btn-on-dark svg { transition: transform var(--t-fast) var(--ease); }
/* ---------- Affiliate program (affiliate.php) ---------- */
.aff-hero { display: grid; gap: 28px; padding: 32px 0 20px; align-items: center; }
.aff-hero h1 { max-width: 18ch; }
.aff-hero h1 .hl { color: var(--brand); background: linear-gradient(90deg, #ffc9b3, #d9d0ff) no-repeat 0 88% / 100% .16em; }
.aff-hero .lede { color: var(--ink-2); font-size: 1.08rem; max-width: 56ch; }
.aff-calc { border-radius: var(--r-xl); }
.aff-calc-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.aff-calc-row:last-of-type { border-bottom: 0; }
.aff-calc-row b { font-family: var(--font-display); font-weight: 560; font-size: 1.25rem; color: var(--brand); }
.aff-points { margin: 8px 0 12px; }
@media (min-width: 900px) { .aff-points { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .aff-hero { grid-template-columns: 1.3fr 1fr; gap: 56px; padding-top: 48px; } }
.aff-link { display: flex; gap: 8px; margin: 10px 0 14px; }
.aff-link input { min-width: 0; flex: 1; font-family: var(--font-mono, ui-monospace, monospace); font-size: .92rem; background: var(--sunk); }
.aff-link .btn { flex-shrink: 0; }
.aff-more { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.aff-more summary { cursor: pointer; font-weight: 650; font-size: .92rem; color: var(--ink-2); }
.aff-payout legend { font-weight: 650; font-size: .92rem; margin-bottom: 10px; color: var(--ink-2); }
.aff-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .aff-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.aff-stats .stat b { font-size: 1.4rem; }
.aff-bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; align-items: end; height: 130px; margin-top: 8px; }
.aff-bar { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.aff-bar i { width: 100%; max-width: 28px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--brand), #8f7cf0); }
.aff-bar small { font-size: .7rem; color: var(--muted); }
@media (max-width: 479px) { .aff-link { flex-wrap: wrap; } .aff-link .btn { width: 100%; justify-content: center; } }

/* ---------- Reading options (product sidebar), "How to read" guide, library tip ---------- */
.read-card { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: 16px; display: grid; gap: 12px; }
.read-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.read-card-head h2 { font-family: var(--font-ui); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; margin: 0; }
.read-fmt { font-size: .72rem; font-weight: 800; letter-spacing: .06em; padding: 3px 9px; border-radius: var(--r-pill); background: var(--lavender); color: var(--lavender-ink); }
.read-opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.read-opts li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); min-width: 0; }
.read-opts li:last-child { border-bottom: 0; }
.read-opts li > svg.i { width: 20px; height: 20px; color: var(--ink-2); flex-shrink: 0; }
.read-opts li > span { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.read-opts b { font-size: .9rem; font-weight: 650; }
.read-opts small { font-size: .78rem; color: var(--muted); }
.read-mark { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; font-style: normal; }
.read-mark svg.i { width: 13px; height: 13px; stroke-width: 2.6; }
.read-opts .is-yes .read-mark { background: var(--mint); color: var(--mint-ink); }
.read-opts .is-no .read-mark { background: var(--rose); color: var(--rose-ink); }
.read-opts .is-maybe .read-mark { background: var(--lemon); color: var(--lemon-ink); }
.read-opts .is-no b { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.read-devices { display: flex; gap: 10px; align-items: center; margin: 0; padding: 10px 12px; border-radius: var(--r-md); background: var(--sunk); font-size: .85rem; color: var(--ink-2); }
.read-devices svg.i { width: 18px; height: 18px; flex-shrink: 0; }
.read-guide-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-size: .9rem; }
.read-steps { margin: 0 0 22px; padding: 0; list-style: none; counter-reset: rs; display: grid; gap: 12px; }
.read-steps li { counter-increment: rs; position: relative; padding: 2px 0 2px 46px; line-height: 1.55; color: var(--ink-2); }
.read-steps li::before { content: counter(rs); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-700); font-weight: 800; font-size: .9rem; }
.read-steps b { color: var(--ink); }
.read-ways { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.read-way { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.read-way h3 { font-family: var(--font-ui); font-size: .95rem; margin: 0 0 4px; }
.read-way p { margin: 0; font-size: .87rem; color: var(--ink-2); line-height: 1.5; }
.read-help { margin: 16px 0 0; }
.help-reading { margin-top: 40px; scroll-margin-top: calc(var(--header-h) + 20px); }
.help-reading > h2 { margin-bottom: 6px; }
.read-tip { margin-bottom: 16px; }
.read-tip svg.i { flex-shrink: 0; margin-top: 2px; }
.dl-row form + form { margin-left: -4px; }
/* The reading card makes the buy column taller than a laptop screen – let it scroll normally instead of sticking */
@media (min-width: 1024px) { .pd-info:has(.read-card) { position: static; } }
/* Browse menu – second level (subcategories) under each category */
.mega-item { display: grid; align-content: start; min-width: 0; }
.mega-subs { display: flex; flex-wrap: wrap; gap: 2px 4px; padding: 0 12px 8px 70px; margin-top: -6px; }
.mega-subs a { font-size: .8rem; font-weight: 600; color: var(--ink-2); padding: 3px 8px; border-radius: var(--r-pill); background: var(--sunk); }
.mega-subs a:hover { background: var(--brand-50); color: var(--brand-700); }

/* ---------- Login: Google button, "or" divider, 2-step code ---------- */
.btn-google { gap: 12px; background: var(--surface); border-color: var(--line-2); color: var(--ink); font-weight: 650; }
.btn-google:hover { background: var(--paper); border-color: var(--ink-2); color: var(--ink); }
.btn-google .g-mark { flex-shrink: 0; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: .82rem; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-note { margin: 12px 0 0; text-align: center; }
.mfa-who { display: flex; gap: 12px; align-items: center; padding: 12px 14px; margin-bottom: 18px; border-radius: var(--r-md); background: var(--sunk); }
.mfa-who > div { display: grid; min-width: 0; }
.mfa-who small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.mfa-code { font-family: var(--font-mono); font-size: 1.35rem; letter-spacing: .25em; text-align: center; max-width: 240px; }
.form .mfa-code { max-width: none; }
