/* Injili Milele — modern theme: app colours (#7C93CC), Sora headings, Fira Sans text. */

:root {
  /* Palette inherited from the Imani za Msingi app (lib/src/app.dart) */
  --ink: #1d2747;
  --ink-2: #26325a;
  --brand: #5a73aa;
  --brand-soft: #7c93cc;
  --accent: #5a73aa;          /* text accents, numbers, kickers */
  --accent-bright: #a3b7ea;   /* accents on dark backgrounds */
  --accent-soft: #d5def5;
  --rose: #c0504d;
  --paper: #eef1f8;           /* app scaffold */
  --paper-2: #e4e8f4;         /* app gradient end / tinted surfaces */
  --tint: rgba(124, 147, 204, .12);
  --card: #ffffff;
  --text: #172018;
  --muted: #5b6270;
  --line: #dfe4f1;
  --shadow: 0 1px 2px rgba(29, 39, 71, .04), 0 10px 28px -14px rgba(29, 39, 71, .18);
  --shadow-lg: 0 2px 6px rgba(29, 39, 71, .06), 0 26px 50px -22px rgba(29, 39, 71, .32);
  --radius: 24px;
  --radius-sm: 18px;
  --display: "Sora", "Fira Sans", system-ui, sans-serif;
  --serif: "Fira Sans", system-ui, -apple-system, "Segoe UI", sans-serif;  /* body text = the app font */
  --sans: "Fira Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 40rem;
  --gutter: clamp(16px, 4vw, 40px);
  --reader-size: 1.125rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12151d;
    --paper-2: #1b1f2a;
    --tint: rgba(124, 147, 204, .18);
    --card: #1b1f2a;
    --text: #e8ebf3;
    --muted: #a3aabb;
    --line: #2a3040;
    --accent: #a3b7ea;
    --brand-soft: #a3b7ea;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #12151d;
  --paper-2: #1b1f2a;
  --tint: rgba(124, 147, 204, .18);
  --card: #1b1f2a;
  --text: #e8ebf3;
  --muted: #a3aabb;
  --line: #2a3040;
  --accent: #a3b7ea;
  --brand-soft: #a3b7ea;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%) fixed;
  background-color: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
main, header, footer { position: relative; z-index: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
h1 em, h2 em, h3 em { font-style: normal; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; flex: 1 1 auto; }
@media (max-width: 420px) { .nav a.nav-articles { display: none; } .brand img { width: 32px; height: 32px; } }
.brand img { width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 2px 8px rgba(124, 147, 204, .4); }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: -.01em; white-space: nowrap; }
.brand-name em { color: var(--accent); font-style: normal; font-weight: 700; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a, .icon-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 999px;
  text-decoration: none; font-weight: 500; font-size: .94rem;
  color: var(--muted); background: none; border: 0; cursor: pointer;
  transition: color .2s, background .2s;
}
.nav a:hover, .icon-btn:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--paper-2); }
.icon-btn { padding: 8px; position: relative; }
.icon-btn svg, .nav svg { width: 20px; height: 20px; }
.cart-count {
  position: absolute; top: 0; right: -2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--rose); color: #fff;
  font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center;
  transform: scale(0); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1);
}
.cart-count.on { transform: scale(1); }
.lang-switch { font-weight: 700 !important; letter-spacing: .06em; font-size: .78rem !important; border: 1px solid var(--line) !important; }
@media (max-width: 640px) {
  .nav .nav-text { display: none; }
  .nav { gap: 0; }
  .brand-name { overflow: hidden; text-overflow: ellipsis; }
  .brand-name { font-size: 1.1rem; }
  .nav a { padding: 8px; }
  .nav .lang-switch { padding: 6px 9px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  color: #f2f4fa;
  background: var(--ink);
  overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
/* Mountains under the Milky Way (Benjamin Voros, Unsplash License): already navy/violet, so it sits under the aurora tint at reduced opacity. */
.hero .hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: url('../img/hero-milele.jpg') center 30% / cover no-repeat;
  opacity: .38;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
}
.hero, .lang-gate { background: #0e1530 !important; }
.aurora { position: absolute; inset: -15%; filter: blur(80px) saturate(1.15); opacity: .95; }
.aurora span { position: absolute; border-radius: 50%; animation: float 22s ease-in-out infinite alternate; }
.aurora span:nth-child(1) { width: 60vmax; height: 60vmax; left: 38%; top: -18%; background: radial-gradient(circle, #5a73aa 0%, transparent 65%); }
.aurora span:nth-child(2) { width: 50vmax; height: 50vmax; left: -10%; top: 30%; background: radial-gradient(circle, #34457e 0%, transparent 65%); animation-duration: 28s; }
.aurora span:nth-child(3) { width: 42vmax; height: 42vmax; left: 62%; top: 38%; background: radial-gradient(circle, #7c93cc 0%, transparent 62%); animation-duration: 18s; animation-direction: alternate-reverse; }
.aurora span:nth-child(4) { width: 30vmax; height: 30vmax; left: 25%; top: 55%; background: radial-gradient(circle, rgba(110, 168, 240, .7) 0%, transparent 62%); animation-duration: 25s; }
@keyframes float { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(4%, 3%) scale(1.08); } 100% { transform: translate(-5%, -2%) scale(.96); } }
.grid-lines { position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px); background-size: 64px 64px; -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, #000 20%, transparent 75%); }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); } }
.hero-stack { display: none; position: relative; }
@media (min-width: 980px) { .hero-stack { display: grid; gap: 14px; } }
.glass {
  display: grid; grid-template-columns: 76px 1fr; gap: 18px; align-items: center;
  min-height: 124px; padding: 16px 20px 16px 16px; border-radius: 20px; text-decoration: none; color: #f2f4fa;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .6);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), background .35s, border-color .35s;
}
.glass:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .12); border-color: rgba(163, 183, 234, .45); }
.glass img { width: 76px; height: 76px; border-radius: 14px; object-fit: cover; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .5); }
.glass small { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #a3b7ea; margin-bottom: 4px; }
.glass b { display: block; font-family: var(--display); font-weight: 700; font-size: 1rem; line-height: 1.3; letter-spacing: -.01em; }
.glass span { font-size: .8rem; color: #c4cbdd; }
.hero-stack .stack-label { font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #c4cbdd; margin: 0 0 2px; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(14, 21, 48, .25) 0%, rgba(14, 21, 48, 0) 30%, rgba(14, 21, 48, 0) 75%, rgba(14, 21, 48, .6) 100%); }
.hero .wrap { padding: 120px 0 110px; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: #e4e8f4; text-decoration: none; font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; opacity: .85;
}
.scroll-cue svg { width: 22px; height: 22px; animation: nudge 2.2s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(5px); } }

/* header floats over the full-screen hero on the home page */
body.home .site-header { position: fixed; left: 0; right: 0; top: 0; transition: background .3s, border-color .3s, backdrop-filter .3s; }
body.home .site-header:not(.scrolled) { background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.home .site-header:not(.scrolled) .brand-name,
body.home .site-header:not(.scrolled) .nav a,
body.home .site-header:not(.scrolled) .icon-btn { color: #f2f4fa; }
body.home .site-header:not(.scrolled) .brand-name em { color: var(--accent-bright); }
body.home .site-header:not(.scrolled) .nav a:hover,
body.home .site-header:not(.scrolled) .icon-btn:hover,
body.home .site-header:not(.scrolled) .nav a[aria-current="page"] { background: rgba(255, 255, 255, .12); }
body.home .site-header:not(.scrolled) .lang-switch { border-color: rgba(255, 255, 255, .35) !important; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .78rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent-soft);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.hero h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.4rem, 6.6vw, 5rem); line-height: 1.05; letter-spacing: -.045em;
  margin: 18px 0 20px;
}
.hero h1 em { font-style: normal; background: linear-gradient(100deg, #c9d5f5 0%, #8fb4ff 45%, #a3b7ea 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lede { font-family: var(--serif); font-size: clamp(1.05rem, 2.2vw, 1.3rem); max-width: 34rem; color: #d9deec; margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-verse { font-style: normal !important; margin-top: clamp(32px, 6vw, 64px); display: flex; gap: 14px; align-items: baseline; max-width: 36rem; color: #c9d0e2; font-family: var(--serif); font-style: italic; font-size: .98rem; }
.hero-verse b { font-style: normal; font-family: var(--sans); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-soft); white-space: nowrap; }

/* staggered load */
.rise { opacity: 0; transform: translateY(18px); animation: rise .9s cubic-bezier(.2, .7, .2, 1) forwards; }
.rise.d1 { animation-delay: .08s; } .rise.d2 { animation-delay: .18s; } .rise.d3 { animation-delay: .3s; } .rise.d4 { animation-delay: .45s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .98rem; text-decoration: none; cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: linear-gradient(135deg, #7c93cc, #5a73aa); color: #fff; box-shadow: 0 8px 22px -10px rgba(90, 115, 170, .75); }
.btn-primary:hover { box-shadow: 0 12px 28px -8px rgba(90, 115, 170, .9); }
.btn-ghost { border-color: rgba(247, 241, 228, .35); color: #f2f4fa; background: rgba(255, 255, 255, .06); }
.btn-ghost:hover { background: rgba(255, 255, 255, .14); }
.btn-ink { background: var(--ink); color: #f2f4fa; }
:root[data-theme="dark"] .btn-ink { background: var(--accent-soft); color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-ink { background: var(--accent-soft); color: var(--ink); } }
.btn-line { border-color: var(--line); background: var(--card); color: var(--text); }
.btn-line:hover { border-color: var(--accent); }
.btn-wa { background: #2e8b57; color: #fff; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: clamp(24px, 4vw, 40px); flex-wrap: wrap; }
.section-head h2 { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1; letter-spacing: -.03em; margin: 8px 0 0; }
.section-head h2 em { color: var(--accent); }
.kicker { font-size: .74rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.ornament { display: flex; align-items: center; gap: 14px; color: var(--accent); justify-content: center; margin: 8px 0; }
.ornament::before, .ornament::after { content: ""; height: 1px; flex: 1; max-width: 120px; background: linear-gradient(90deg, transparent, currentColor); }
.ornament::after { transform: scaleX(-1); }

/* ---------- Toolbar: search & filters ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 28px; }
.search {
  flex: 1 1 260px; display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 16px;
  box-shadow: var(--shadow);
}
.search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search input { flex: 1; border: 0; background: none; font: inherit; color: var(--text); padding: 10px 0; outline: none; min-width: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 999px; padding: 8px 14px; font-size: .88rem; font-weight: 500; cursor: pointer;
  transition: all .2s;
}
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--ink); color: #f2f4fa; border-color: var(--ink); }
:root[data-theme="dark"] .chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--ink); border-color: var(--accent-soft); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--ink); border-color: var(--accent-soft); } }
.empty { text-align: center; color: var(--muted); padding: 40px 0; display: none; font-family: var(--serif); font-style: italic; }

/* ---------- Article cards ---------- */
.grid { display: grid; gap: clamp(18px, 2.5vw, 28px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); counter-reset: card; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; box-shadow: var(--shadow);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.card:hover .card-media img { transform: scale(1.05); }
.card-num {
  position: absolute; left: 14px; top: 0; transform: translateY(-62%); z-index: 2;
  padding: 2px 12px 0; border-radius: 12px 12px 0 0; background: var(--card);
  font-family: var(--display); font-weight: 700; font-size: 1.6rem; line-height: 1; letter-spacing: -.04em;
  color: var(--accent);
}
.card-body { position: relative; padding: 26px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-meta { display: flex; gap: 10px; align-items: center; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.card-meta .cat { color: var(--accent); }
.card h3 { font-family: var(--display); font-weight: 700; font-size: 1.32rem; line-height: 1.22; letter-spacing: -.01em; margin: 0; }
.card p { margin: 0; color: var(--muted); font-family: var(--serif); font-size: .96rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; font-size: .88rem; color: var(--muted); }
.card-foot .go { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); }
.card-foot .go svg { width: 16px; height: 16px; transition: transform .25s; }
.card:hover .go svg { transform: translateX(4px); }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; background: var(--paper-2); color: var(--muted); }
.badge.video { box-shadow: none; background: transparent; border: 1px solid color-mix(in srgb, var(--rose) 40%, transparent); color: var(--rose); }

/* feature card spans two columns on wide screens */
@media (min-width: 900px) {
  .card.feature { grid-column: span 2; flex-direction: row; }
  .card.feature .card-media { aspect-ratio: auto; flex: 1.25; min-height: 360px; }
  .card.feature .card-body { flex: 1; padding: 40px 34px; justify-content: center; }
  .card.feature .card-num { left: auto; right: 28px; top: 30px; transform: none; padding: 0; background: none; font-size: 4.5rem; opacity: .9; }
  .card.feature .card-meta { padding-right: 90px; }
  .card.feature h3 { font-size: 2rem; padding-right: 64px; }
  .card.feature p { -webkit-line-clamp: 5; font-size: 1.05rem; }
}

/* ---------- Store teaser band ---------- */
.band {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: calc(var(--radius) + 8px);
  background: radial-gradient(90% 120% at 100% 0%, #34457e 0%, var(--ink) 60%);
  color: #eef1f8; padding: clamp(28px, 5vw, 56px);
  display: grid; gap: 28px; grid-template-columns: 1.1fr 1fr; align-items: center;
}
.band h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.02; margin: 10px 0 14px; letter-spacing: -.02em; }
.band h2 em { color: var(--accent-bright); }
.band p { color: #cdd3e4; font-family: var(--serif); margin: 0 0 22px; }
.band .kicker { color: var(--accent-soft); }
.band-books { display: flex; justify-content: center; gap: 0; perspective: 900px; }
.band-books .cover { width: 42%; max-width: 190px; box-shadow: var(--shadow-lg); }
.band-books .cover:nth-child(1) { transform: rotate(-8deg) translateX(18px); }
.band-books .cover:nth-child(2) { transform: translateY(-14px); z-index: 2; }
.band-books .cover:nth-child(3) { transform: rotate(8deg) translateX(-18px); }
@media (max-width: 760px) { .band { grid-template-columns: 1fr; } }

/* ---------- Book covers (pure CSS) ---------- */
.cover {
  position: relative; aspect-ratio: 3 / 4.2; border-radius: 6px 12px 12px 6px; overflow: hidden;
  background: #0e1530; color: #f2f4fa; isolation: isolate;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 0 9% 9% 13%;
  box-shadow: inset 6px 0 10px -6px rgba(0, 0, 0, .6), var(--shadow);
}
.cover img { position: absolute; left: 0; top: 0; width: 100%; height: 64%; object-fit: cover; z-index: -2; opacity: 1; }
.cover::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(14, 21, 48, .45) 0%, rgba(14, 21, 48, 0) 15%, rgba(14, 21, 48, 0) 50%, #0e1530 64%); }
.cover::after { content: ""; position: absolute; left: 6%; top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, .28); }
.cover-top { position: absolute; top: 7%; left: 13%; font-size: .5em; letter-spacing: .22em; text-transform: uppercase; color: #fff; font-weight: 700; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.cover-title { font-family: var(--display); font-size: .74em; line-height: 1.15; font-weight: 700; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cover-author { font-size: .4em; letter-spacing: .14em; text-transform: uppercase; opacity: .75; margin-top: 7%; padding-top: 6%; border-top: 1px solid rgba(213, 222, 245, .22); }
.cover.free .cover-top { color: #9fe0b5; }

/* ---------- Article page ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--brand-soft), var(--accent-bright)); }
.article-hero { position: relative; color: #f2f4fa; background: var(--ink); isolation: isolate; overflow: hidden; }
.article-hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .6; }
.article-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(29, 39, 71, .3), rgba(29, 39, 71, .75) 55%, var(--ink)); }
.article-hero .wrap { padding: clamp(64px, 12vw, 150px) 0 clamp(36px, 6vw, 64px); max-width: 52rem; }
.crumbs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .82rem; color: #cdd3e4; margin-bottom: 18px; }
.crumbs a { text-decoration: none; color: var(--accent-soft); }
.crumbs a:hover { text-decoration: underline; }
.article-hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2.1rem, 6vw, 3.9rem); line-height: 1.04; letter-spacing: -.03em; margin: 0 0 22px; text-wrap: balance; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-size: .92rem; color: #d3d9ea; }
.byline .author { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; }
.byline .avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent-bright), var(--rose)); color: #fff; font-family: var(--display); font-size: 1rem; }
.byline .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; }

.reader-tools {
  position: sticky; top: 64px; z-index: 40;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.reader-tools .wrap { max-width: var(--measure); display: flex; align-items: center; gap: 6px; height: 48px; }
.reader-tools .spacer { flex: 1; }
.tool { border: 1px solid var(--line); background: var(--card); border-radius: 999px; height: 34px; min-width: 34px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.tool:hover { color: var(--text); border-color: var(--accent); }
.tool svg { width: 16px; height: 16px; }

.prose { max-width: var(--measure); margin: 0 auto; padding: clamp(36px, 6vw, 64px) 0 24px; font-family: var(--serif); font-size: var(--reader-size); line-height: 1.75; }
.prose p { margin: 0 0 1.15em; }
.prose h2 { font-family: var(--display); font-weight: 700; padding-top: .9em; border-top: 1px solid var(--line); font-size: 1.55em; line-height: 1.2; letter-spacing: -.015em; margin: 2em 0 .7em; text-wrap: balance; }
.prose strong { font-weight: 650; color: color-mix(in srgb, var(--text) 100%, var(--brand) 0%); background: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent-soft) 55%, transparent) 62%); }
:root[data-theme="dark"] .prose strong { background: linear-gradient(transparent 62%, rgba(124, 147, 204, .28) 62%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .prose strong { background: linear-gradient(transparent 62%, rgba(124, 147, 204, .28) 62%); } }
.prose a { color: var(--brand); text-underline-offset: 3px; }
:root[data-theme="dark"] .prose a { color: var(--brand-soft); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .prose a { color: var(--brand-soft); } }
.prose blockquote {
  position: relative; margin: 1.6em 0; padding: 1.1em 1.3em 1.1em 1.6em;
  background: var(--paper-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border-left: 3px solid var(--accent);
  font-style: normal; color: color-mix(in srgb, var(--text) 90%, var(--muted));
}
.prose blockquote p { margin: 0; }
.prose blockquote + blockquote { margin-top: -.6em; }
.prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose ol li { margin-bottom: .4em; padding-left: .3em; }
.prose ol li::marker { color: var(--accent); font-family: var(--display); font-weight: 700; }
.prose figure { margin: 2em calc(-1 * min(6vw, 60px)); }
.prose figure img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.prose .dl { text-align: center; margin: 1.8em 0; }
@media (max-width: 720px) { .prose figure { margin-inline: 0; } }

.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000 center / cover no-repeat; margin: 1.6em 0; cursor: pointer; box-shadow: var(--shadow-lg); }
.video::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .55)); }
.video .play { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(255, 255, 255, .92); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); transition: transform .25s; }
.video:hover .play { transform: scale(1.08); }
.video .play svg { width: 30px; height: 30px; color: var(--rose); margin-left: 4px; }
.video .vt { position: absolute; left: 18px; right: 18px; bottom: 14px; color: #fff; font-family: var(--sans); font-style: normal; font-size: .9rem; font-weight: 600; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.article-end { max-width: var(--measure); margin: 0 auto; padding-bottom: 40px; }
.share { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share span { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-right: auto; }
.author-box { display: flex; gap: 18px; align-items: flex-start; margin: 32px 0; padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.author-box .avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent-bright), var(--rose)); color: #fff; font-family: var(--display); font-size: 1.5rem; }
.author-box h4 { margin: 0 0 4px; font-family: var(--display); font-size: 1.15rem; font-weight: 700; }
.author-box p { margin: 0; color: var(--muted); font-family: var(--serif); font-size: .95rem; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 28px 0; }
.pager a { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; background: var(--card); transition: border-color .2s; }
.pager a:hover { border-color: var(--accent); }
.pager small { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.pager b { font-family: var(--display); font-weight: 700; font-size: 1.02rem; line-height: 1.3; display: block; }
.pager .next { text-align: right; grid-column: 2; }

/* ---------- Store ---------- */
.store-hero { background: var(--ink); color: #eef1f8; position: relative; overflow: hidden; isolation: isolate; }
.store-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 90% at 90% 10%, rgba(163, 183, 234, .3), transparent 60%), radial-gradient(60% 80% at 0% 100%, rgba(124, 147, 204, .45), transparent 60%); }
.store-hero .wrap { padding: clamp(48px, 9vw, 100px) 0 clamp(40px, 7vw, 72px); }
.store-hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2.6rem, 8vw, 5rem); line-height: .98; letter-spacing: -.03em; margin: 14px 0 16px; }
.store-hero h1 em { color: var(--accent-bright); }
.store-hero p { max-width: 36rem; color: #cdd3e4; font-family: var(--serif); font-size: 1.1rem; margin: 0; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 26px; font-size: .9rem; color: #dfe4f1; }
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { width: 18px; height: 18px; color: var(--accent-bright); }

.products { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.product { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); transition: transform .3s, box-shadow .3s; }
.product:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.product .cover-link { display: block; padding: 18px 18px 6px; background: var(--paper-2); border-radius: var(--radius-sm); margin-bottom: 16px; text-decoration: none; }
.product .cover { font-size: clamp(15px, 4vw, 17px); max-width: 190px; margin: 0 auto; transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.product:hover .cover { transform: rotate(-2deg) translateY(-4px); }
.product h3 { font-family: var(--display); font-weight: 700; font-size: 1.18rem; line-height: 1.25; margin: 6px 0 6px; }
.product h3 a { text-decoration: none; }
.product .sub { color: var(--muted); font-size: .9rem; margin: 0 0 14px; }
.product .row { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: -.01em; }
.price small { font-family: var(--sans); font-size: .7rem; font-weight: 600; color: var(--muted); letter-spacing: .06em; margin-right: 2px; }
.price.free { color: #2e8b57; }
.add { padding: 10px 16px; font-size: .9rem; }
.add.added { background: #2e8b57; color: #fff; box-shadow: none; }

.product-page { display: grid; gap: clamp(28px, 5vw, 64px); grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; padding: clamp(32px, 6vw, 72px) 0; }
.product-page .stage { position: sticky; top: 88px; background: radial-gradient(80% 80% at 50% 30%, var(--card), var(--paper-2)); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); padding: clamp(28px, 6vw, 64px); }
.product-page .stage .cover { font-size: clamp(22px, 3.4vw, 34px); max-width: 320px; margin: 0 auto; box-shadow: var(--shadow-lg); transform: rotate(-3deg); }
.product-page h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.04; letter-spacing: -.03em; margin: 10px 0 12px; }
.product-page .lead { font-family: var(--serif); font-size: 1.12rem; color: var(--muted); margin: 0 0 22px; }
.product-page .price { font-size: 2rem; }
.buybox { display: grid; gap: 12px; margin: 22px 0 28px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.includes { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.includes li { display: flex; gap: 10px; align-items: center; }
.includes svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.contents { border-top: 1px solid var(--line); padding-top: 18px; }
.contents h4 { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.contents ol { margin: 0; padding-left: 1.3em; font-family: var(--serif); }
.contents li { margin: 4px 0; }
.contents li::marker { color: var(--accent); }
@media (max-width: 820px) { .product-page { grid-template-columns: 1fr; } .product-page .stage { position: static; } }

/* live prices, discounts */
.price-slot { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-slot s { color: var(--muted); font-size: .85em; font-family: var(--display); }
.sale-tag { font-size: .66rem; font-weight: 700; letter-spacing: .04em; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); padding: 2px 7px; border-radius: 999px; align-self: center; }
.unavailable { color: var(--muted); font-style: italic; }
.subtotals { display: grid; gap: 6px; padding-top: 14px; font-size: .95rem; color: var(--muted); }
.subtotals > div { display: flex; justify-content: space-between; }
.subtotals .disc { color: #2e8b57; font-weight: 600; }
.coupon { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
.coupon label { font-size: .82rem; font-weight: 600; color: var(--muted); display: block; margin-bottom: 8px; }
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1; min-width: 0; font: inherit; text-transform: uppercase; letter-spacing: .06em; font-size: .92rem; color: var(--text); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; }
.coupon-row input::placeholder { text-transform: none; letter-spacing: 0; color: var(--muted); }
.coupon-row input:focus { outline: none; border-color: var(--accent); }
.coupon-row .btn { padding: 9px 18px; font-size: .9rem; }
.coupon-msg { margin: 8px 0 0; font-size: .88rem; min-height: 1.2em; }
.coupon-msg.ok { color: #2e8b57; } .coupon-msg.bad { color: var(--rose); }

/* payment options */
.alt-pay { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.alt-pay summary { cursor: pointer; font-weight: 600; font-size: .92rem; color: var(--accent); list-style: none; }
.alt-pay summary::-webkit-details-marker { display: none; }
.alt-pay summary::after { content: " +"; }
.alt-pay[open] summary::after { content: " −"; }
.alt-pay[open] summary { margin-bottom: 14px; }

/* cart / checkout */
.checkout { display: grid; gap: clamp(24px, 4vw, 48px); grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); padding: clamp(32px, 6vw, 64px) 0; align-items: start; }
@media (max-width: 860px) { .checkout { grid-template-columns: 1fr; } }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow); }
.panel h2 { font-family: var(--display); font-weight: 700; font-size: 1.5rem; margin: 0 0 16px; }
.line-item { display: grid; grid-template-columns: 60px 1fr; gap: 16px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line-item:first-child { padding-top: 2px; }
.line-item .cover { width: 60px; aspect-ratio: 3 / 4; padding: 0; border-radius: 8px; box-shadow: var(--shadow); }
.line-item .cover::before, .line-item .cover::after, .line-item .cover > div { display: none; }
.line-item .cover img { height: 100%; }
.li-body { min-width: 0; display: grid; gap: 2px; }
.li-title { font-weight: 600; font-size: .95rem; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.li-meta { color: var(--muted); font-size: .8rem; }
.li-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; margin-top: 8px; }
.li-foot .price-slot { gap: 6px; align-items: center; }
.li-foot .price { font-size: 1.02rem; }
.li-foot .price small { font-size: .6rem; }
.li-foot .price-slot s { font-family: var(--sans); font-size: .78rem; }
.line-item .rm { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 4px 0; font: inherit; font-size: .8rem; color: var(--muted); cursor: pointer; transition: color .2s; }
.line-item .rm svg { width: 15px; height: 15px; }
.line-item .rm:hover { color: var(--rose); }
.totals { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0 2px; font-size: .95rem; font-weight: 600; }
.totals .price { font-size: 1.3rem; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .85rem; font-weight: 600; }
.field input, .field textarea, .field select { font: inherit; color: var(--text); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; width: 100%; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; font-size: .96rem; }
.steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--accent-soft); font-weight: 700; font-size: .85rem; }
.paybox { background: var(--paper-2); border-radius: var(--radius-sm); padding: 16px; margin: 12px 0 18px; display: grid; gap: 6px; }
.paybox .num { font-family: var(--display); font-size: 1.6rem; font-weight: 700; letter-spacing: .02em; }
.paybox .ref { font-family: ui-monospace, Menlo, monospace; font-weight: 700; color: var(--rose); }
.methods { display: flex; flex-wrap: wrap; gap: 6px; }
.methods span { font-size: .75rem; font-weight: 600; padding: 4px 8px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); }
.note { font-size: .85rem; color: var(--muted); }
.stack { display: grid; gap: 10px; }
.empty-cart { text-align: center; padding: 30px 10px; }
.empty-cart p { font-family: var(--serif); color: var(--muted); }


/* ---------- Formats, access states ---------- */
.badge.pdf { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.badge.audio { background: transparent; border: 1px solid color-mix(in srgb, #2e8b57 45%, transparent); color: #2e8b57; }
.badge.link { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.card-meta { flex-wrap: wrap; }
.card-foot .info { display: inline-flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card-foot .price-slot .price { font-size: 1rem; }
.card-foot .price-slot s, .card-foot .sale-tag { display: none; }
.chips.formats { padding-right: 12px; margin-right: 4px; border-right: 1px solid var(--line); }
@media (max-width: 640px) { .chips.formats { border-right: 0; padding-right: 0; width: 100%; } }
[data-access="free"] [data-when]:not([data-when~="free"]),
[data-access="preview"] [data-when]:not([data-when~="preview"]),
[data-access="locked"] [data-when]:not([data-when~="locked"]) { display: none !important; }
.hero-badges { display: flex; gap: 8px; margin-bottom: 14px; }
.hero-badges .badge { background: rgba(255, 255, 255, .12); color: #eef1f8; border-color: rgba(255, 255, 255, .25); }
.btn-ghost-dark { border-color: var(--line); color: var(--muted); background: transparent; font-size: .9rem; padding: 10px 16px; }
.btn-ghost-dark:hover { color: var(--text); border-color: var(--accent); }
.note.ok { display: inline-flex; gap: 6px; align-items: center; color: #2e8b57; font-weight: 600; }
.note.ok svg { width: 16px; height: 16px; }

/* ---------- Article page: media, document box ---------- */
.media-wrap { max-width: 56rem; padding-top: clamp(24px, 4vw, 40px); }
.media-wrap .video { margin: 0; }
.prose.short { padding-top: 28px; }
.doc { padding: clamp(28px, 5vw, 56px) 0 8px; }
.doc-grid { display: grid; gap: clamp(24px, 4vw, 48px); grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: start; }
@media (max-width: 860px) { .doc-grid { grid-template-columns: 1fr; } .doc-buy { order: -1; } }
.doc-info .lead { font-family: var(--serif); font-size: clamp(1.1rem, 2.2vw, 1.3rem); line-height: 1.65; margin: 0 0 26px; }
.doc-info .kicker { display: block; margin: 0 0 12px; }
.outline { list-style: none; counter-reset: o; padding: 0; margin: 0 0 24px; display: grid; gap: 2px; }
.outline li { counter-increment: o; display: grid; grid-template-columns: 34px 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.outline li::before { content: counter(o, decimal-leading-zero); font-family: var(--display); font-weight: 700; color: var(--accent); }
.facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.facts li { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; font-weight: 600; color: var(--muted); padding: 7px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.facts svg { width: 16px; height: 16px; color: var(--accent); }
.doc-buy { position: sticky; top: 84px; margin: 0; box-shadow: var(--shadow-lg); }
.doc-cover { background: var(--paper-2); border-radius: var(--radius-sm); padding: 22px 22px 14px; }
.doc-cover .cover { max-width: 170px; margin: 0 auto; font-size: 15px; transform: rotate(-2deg); box-shadow: var(--shadow-lg); }
.doc-price .price { font-size: 1.9rem; }
.doc-buy .acts { display: grid; gap: 10px; }
.audio-buy { position: static; max-width: 26rem; }

/* ---------- PDF reader ---------- */
.reader { margin-top: clamp(28px, 4vw, 48px); background: color-mix(in srgb, var(--ink) 6%, var(--paper-2)); border-block: 1px solid var(--line); scroll-margin-top: 64px; }
.reader-bar { position: sticky; top: 64px; z-index: 30; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.reader-bar .wrap { max-width: 860px; display: flex; align-items: center; gap: 8px; min-height: 52px; font-size: .9rem; }
.reader-bar .spacer { flex: 1; }
.reader-state { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); flex-wrap: wrap; }
.pageinfo { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tag { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.tag.ok { background: color-mix(in srgb, #2e8b57 18%, transparent); color: #2e8b57; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pages { max-width: 860px; margin: 0 auto; padding: clamp(14px, 3vw, 32px) clamp(8px, 2vw, 20px); display: grid; gap: clamp(10px, 2vw, 22px); }
.pg { width: 100%; background: #fff; border-radius: 6px; box-shadow: 0 1px 3px rgba(29, 39, 71, .12), 0 18px 40px -24px rgba(29, 39, 71, .45); overflow: hidden; position: relative; }
.pg:not(.ready)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(124, 147, 204, .12) 50%, transparent 70%) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.pg canvas { width: 100%; height: auto; display: block; }
.reader-end, .reader-locked { max-width: 640px; margin: 0 auto clamp(24px, 4vw, 40px); text-align: center; }
.reader-locked { margin-top: clamp(24px, 4vw, 40px); }
.reader-end h3, .reader-locked h3 { font-family: var(--display); font-weight: 700; font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.15; margin: 8px 0 8px; }
.reader-end p, .reader-locked p { color: var(--muted); margin: 0 0 18px; }
.row-btns { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: center; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 22px; }
.thumbs img { width: 100%; border-radius: 6px; border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; }
.product-page .thumbs { margin-bottom: 26px; }
.reader:fullscreen { overflow: auto; background: #2a2f3d; }
.reader:fullscreen .reader-bar { top: 0; }
.reader:fullscreen .pages { max-width: 1100px; }

/* ---------- Audio & links ---------- */
.audio-card { display: grid; grid-template-columns: 140px 1fr; gap: 22px; align-items: center; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.audio-card .audio-art img { width: 140px; height: 140px; object-fit: cover; border-radius: var(--radius-sm); }
.audio-card h2 { font-family: var(--display); font-weight: 700; font-size: 1.35rem; line-height: 1.2; margin: 6px 0 14px; }
.audio-card audio { width: 100%; }
@media (max-width: 560px) { .audio-card { grid-template-columns: 1fr; } .audio-card .audio-art img { width: 100%; height: 180px; } }
.link-card { display: grid; gap: 8px; padding: clamp(22px, 4vw, 34px); background: var(--ink); color: #eef1f8; border-radius: var(--radius); text-decoration: none; box-shadow: var(--shadow-lg); }
.link-card .kicker { color: var(--accent-soft); }
.link-card b { font-family: var(--display); font-size: clamp(1.3rem, 3vw, 1.8rem); line-height: 1.2; }
.link-card .go { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent-bright); }
.link-card .go svg { width: 18px; height: 18px; }

/* ---------- Store groups ---------- */
.store-top { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.store-group + .store-group { margin-top: clamp(44px, 6vw, 64px); }
.group-head { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; margin-bottom: clamp(20px, 3vw, 28px); border-bottom: 1px solid var(--line); }
.gh-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.gh-icon svg { width: 20px; height: 20px; }
.gh-text { flex: 1; min-width: 0; }
.gh-text h2 { font-family: var(--display); font-weight: 700; font-size: 1.2rem; line-height: 1.2; letter-spacing: -.01em; margin: 0; color: var(--text); }
.gh-text p { margin: 2px 0 0; font-size: .85rem; color: var(--muted); }
.gh-count { flex: none; min-width: 30px; padding: 3px 10px; border-radius: 999px; text-align: center; font-size: .8rem; font-weight: 700; color: var(--muted); background: var(--card); border: 1px solid var(--line); }
.store-filters { display: grid; gap: 14px; margin-bottom: clamp(32px, 5vw, 56px); }
.store-filters .search { background: var(--paper); box-shadow: none; }
.filter-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.select { display: grid; gap: 6px; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.select select {
  appearance: none; -webkit-appearance: none; width: 100%; font: inherit; font-size: .95rem; font-weight: 500; letter-spacing: 0; text-transform: none;
  color: var(--text); background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a93a8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
  border: 1px solid var(--line); border-radius: 14px; padding: 11px 38px 11px 14px; cursor: pointer;
}
.select select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.filter-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .9rem; }
.link-btn { background: none; border: 0; padding: 4px 0; font: inherit; font-weight: 700; color: var(--accent); cursor: pointer; margin-left: auto; }
.link-btn:hover { text-decoration: underline; }
html:not(.no-js) [data-pool], .no-js [data-loading] { display: none; }
.store-loading { display: flex; justify-content: center; padding: 48px 0; }
.store-empty { text-align: center; color: var(--muted); padding: 40px 0; font-family: var(--serif); font-style: italic; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: clamp(24px, 4vw, 36px); }
.pager .nums { display: flex; gap: 6px; align-items: center; }
.pager button {
  min-width: 42px; height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  color: var(--text); font: inherit; font-weight: 600; cursor: pointer; transition: border-color .2s, background .2s;
}
.pager button:hover:not(:disabled) { border-color: var(--accent); }
.pager button:disabled { opacity: .4; cursor: default; }
.pager button[aria-current="page"] { background: var(--ink); color: #f2f4fa; border-color: var(--ink); }
:root[data-theme="dark"] .pager button[aria-current="page"] { background: var(--accent-soft); color: var(--ink); border-color: var(--accent-soft); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pager button[aria-current="page"] { background: var(--accent-soft); color: var(--ink); border-color: var(--accent-soft); } }
.pager .gap { color: var(--muted); padding: 0 2px; }
.pager .of { flex-basis: 100%; text-align: center; color: var(--muted); font-size: .9rem; font-weight: 600; }
@media (max-width: 520px) { .pager .nums { display: none; } .pager .step { flex: 1; } }
.product .row .btn { white-space: nowrap; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 120px); background: var(--ink); color: #f2f4fa; padding: 12px 18px; border-radius: 999px; box-shadow: var(--shadow-lg); z-index: 90; display: flex; gap: 12px; align-items: center; font-size: .92rem; transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); max-width: calc(100% - 32px); }
.toast.on { transform: translate(-50%, 0); }
.toast a { color: var(--accent-bright); font-weight: 700; white-space: nowrap; }

/* ---------- About & misc ---------- */
.about { max-width: 46rem; margin: 0 auto; padding: clamp(40px, 7vw, 80px) 0; font-family: var(--serif); font-size: 1.1rem; line-height: 1.75; }
.about h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1.02; letter-spacing: -.03em; margin: 10px 0 24px; }
.contact-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 28px; font-family: var(--sans); font-size: 1rem; }
.contact-cards a { display: flex; gap: 12px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); text-decoration: none; }
.contact-cards a:hover { border-color: var(--accent); }
.contact-cards svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
.contact-cards small { display: block; color: var(--muted); font-size: .78rem; }

.lang-gate { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 40px var(--gutter); color: #f2f4fa; background: var(--ink); position: relative; isolation: isolate; overflow: hidden; }
.lang-gate .bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.lang-gate::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 50% at 50% 45%, rgba(14, 21, 48, .35), transparent 70%); }
.lang-gate h1 { font-family: var(--display); font-weight: 700; font-size: clamp(3rem, 12vw, 6.5rem); line-height: .95; letter-spacing: -.035em; margin: 18px 0 14px; }
.lang-gate h1 em { font-style: normal; background: linear-gradient(100deg, #c9d5f5, #8fb4ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lang-gate p { font-family: var(--serif); color: #d3d9ea; margin: 0 auto 30px; max-width: 30rem; }
.lang-gate .choices { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.lang-gate .logo { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto; box-shadow: 0 0 0 6px rgba(255, 255, 255, .06), 0 10px 40px rgba(124, 147, 204, .6); }

/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(40px, 8vw, 96px); background: var(--ink); color: #c4cbdd; }
.site-footer .wrap { padding: clamp(40px, 6vw, 64px) 0 28px; display: grid; gap: 32px; grid-template-columns: 1.4fr 1fr 1fr; }
.site-footer h4 { color: #f2f4fa; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; margin: 0 0 14px; }
.site-footer a { color: #e4e8f4; text-decoration: none; }
.site-footer a:hover { color: var(--accent-bright); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .94rem; }
.site-footer .about-col p { font-family: var(--serif); font-size: .98rem; max-width: 26rem; }
.site-footer .brand-name { color: #f2f4fa; }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: .84rem; color: #99a0b4; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .about-col { grid-column: 1 / -1; } }

.back-top { position: fixed; right: 16px; bottom: 16px; z-index: 45; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer; opacity: 0; transform: translateY(12px); transition: all .3s; pointer-events: none; }
.back-top.on { opacity: 1; transform: none; pointer-events: auto; }
.back-top svg { width: 18px; height: 18px; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

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

@media print {
  .site-header, .reader-tools, .site-footer, .share, .pager, .back-top, .progress, .toast { display: none !important; }
  body::before { display: none; }
  .article-hero { color: #000; background: none; }
  .article-hero img.bg, .article-hero::after { display: none; }
}
