/* ApexYield — Ink & Lime design system */

@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/assets/fonts/hanken-grotesk.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('/assets/fonts/instrument-serif.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('/assets/fonts/instrument-serif-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #FBFBF4;
  --surface: #FFFFFF;
  --ink: #151C36;
  --ink-2: #222B52;
  --ink-soft: #46506E;
  --lime: #C8F04B;
  --lime-soft: #E4F9A6;
  --lime-deep: #7FA31A;
  --line: rgba(21, 28, 54, .14);
  --line-navy: rgba(251, 251, 244, .16);
  --paper-on-navy: #F4F6EA;
  --muted-on-navy: #B9C0D8;
  --shadow-1: 0 2px 10px rgba(21, 28, 54, .07);
  --shadow-2: 0 14px 44px rgba(21, 28, 54, .16);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Hanken Grotesk', system-ui, sans-serif;
  --z-sticky: 60;
  --z-drawer: 90;
  --z-modal: 120;
  --z-toast: 140;
  --z-chat: 80;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: clip; scroll-behavior: smooth; }
body {
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
main { flex: 1; }
img, svg, video { display: block; max-width: 100%; }
svg { width: 1.2em; height: 1.2em; }
a { color: inherit; text-decoration: none; }
a, h1, h2, h3, h4, h5, h6, p, li, dt, dd { overflow-wrap: break-word; word-break: break-word; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5.2rem); letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); letter-spacing: -.01em; }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); }
h4, h5 { font-weight: 700; }

.container { max-width: 1240px; margin: 0 auto; padding-inline: 24px; }
@media (max-width: 520px) { .container { padding-inline: 16px; } }

a, button, summary, label, input[type="checkbox"] + span {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.btn, .burger, .nav a, summary, .brand {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
  border: 2px solid transparent;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), background-color .28s var(--ease), color .28s var(--ease), border-color .28s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn--lime { background: var(--lime); color: var(--ink); }
.btn--lime:hover { background: #fff; color: var(--ink); box-shadow: var(--shadow-2); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn--paper { background: var(--paper-on-navy); color: var(--ink); }
.btn--paper:hover { background: var(--lime); }
.btn--ghost-light { border-color: var(--paper-on-navy); color: var(--paper-on-navy); }
.btn--ghost-light:hover { background: var(--paper-on-navy); color: var(--ink); }
.btn svg { width: 1.1em; height: 1.1em; flex-shrink: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(251, 251, 244, .82);
  border-bottom: 1px solid var(--line);
  overflow: visible;
}
.site-header__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  padding-block: 12px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; flex-shrink: 0; }
.brand svg { width: 40px; height: 40px; }
.brand b { color: var(--ink); font-weight: 800; }
.brand i { font-family: var(--serif); font-style: italic; font-weight: 400; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  position: relative;
  z-index: 1;
  padding: 7px 13px;
  font-weight: 600;
  font-size: 15.5px;
  transition: color .25s var(--ease);
}
.nav a::before {
  content: '';
  position: absolute;
  inset: 3px 1px;
  z-index: -1;
  border-radius: 4px 10px 6px 12px / 10px 5px 12px 6px;
  background: var(--lime);
  transform: skewX(-6deg) scaleX(0);
  transform-origin: left center;
  transition: transform .32s var(--ease);
}
.nav a:hover::before, .nav a.is-active::before { transform: skewX(-6deg) scaleX(1); }

.header-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.tool-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--surface);
  transition: background-color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.tool-btn:hover { background: var(--lime); border-color: var(--lime); transform: translateY(-2px); }
.tool-btn svg { width: 20px; height: 20px; }
.cart-count {
  position: absolute; top: -5px; right: -5px;
  min-width: 20px; height: 20px;
  padding-inline: 5px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--lime);
  font-size: 12px; font-weight: 800; line-height: 20px;
  text-align: center;
}
.cart-count:empty { display: none; }

/* Header search popover */
.site-header__row { position: relative; }
.search-pop {
  position: absolute;
  top: calc(100% + 10px);
  right: 24px;
  width: min(380px, calc(100vw - 48px));
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  box-shadow: var(--shadow-2);
  padding: 14px;
  opacity: 0;
  transform: translateY(-8px);
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s linear .25s;
  z-index: 105;
}
.search-pop.is-open { opacity: 1; transform: translateY(0); visibility: visible; pointer-events: auto; transition-delay: 0s; }
.search-pop input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  font: inherit;
  font-size: 15px;
}
.search-pop input:focus { outline: none; border-color: var(--ink); }
.search-pop__results { margin-top: 6px; max-height: 300px; overflow-y: auto; overscroll-behavior: contain; }
.search-pop__results li { border-bottom: 1px solid var(--line); }
.search-pop__results li:last-child { border-bottom: 0; }
.search-pop__results button {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%;
  text-align: left;
  padding: 11px 8px;
  font-size: 14px;
  transition: background-color .18s;
  border-radius: 8px;
}
.search-pop__results button:hover { background: var(--lime-soft); }
.search-pop__results b { display: block; font-size: 14px; }
.search-pop__results small { color: var(--ink-soft); }
.search-pop__results .search-pop__price { font-family: var(--serif); font-size: 1.05rem; flex-shrink: 0; }
.search-pop__none { padding: 12px 8px; font-size: 14px; color: var(--ink-soft); }

/* Burger */
.burger {
  display: none;
  width: 44px; height: 44px;
  position: relative;
  z-index: 110;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--surface);
  border: 1.5px solid var(--line);
}
.burger span {
  position: absolute;
  left: 12px; right: 12px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s var(--ease), top .3s var(--ease);
}
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 27px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 1220px) {
  .burger { display: block; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    width: 100%;
    max-width: 100vw;
    max-height: calc(100dvh - var(--header-offset, 64px));
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px 24px 30px;
    background: var(--bg);
    border-top: 1px solid var(--line);
    box-shadow: 0 22px 44px rgba(21, 28, 54, .18);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform .3s var(--ease), opacity .25s var(--ease), visibility 0s linear .3s;
  }
  .nav[data-open="true"] {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform .3s var(--ease), opacity .25s var(--ease), visibility 0s linear 0s;
  }
  .nav a { width: 100%; padding: 15px 4px; font-size: 21px; border-bottom: 1px solid var(--line); }
  .nav a::before { inset: 8px -6px; }
}

/* Hero */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(94vh, 860px);
  background-image: url('/assets/img/hero/hero-bg.avif');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-color: var(--ink);
  color: var(--paper-on-navy);
  overflow: clip;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(21,28,54,0) 30%, rgba(21,28,54,.62) 76%, rgba(21,28,54,.9) 100%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding-block: 64px 58px;
}
.hero__copy { max-width: 640px; }
.hero__copy h1 { color: #fff; animation: heroRise .9s var(--ease) both; }
.hero__copy h1 em { font-style: italic; color: var(--lime); }
.hero__lede {
  margin-top: 18px;
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  color: var(--muted-on-navy);
  animation: heroRise .9s var(--ease) .12s both;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; animation: heroRise .9s var(--ease) .22s both; }
.hero__ledger {
  flex-shrink: 0;
  width: 300px;
  padding: 26px 26px 20px;
  border-radius: 18px;
  background: rgba(21, 28, 54, .78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line-navy);
  animation: heroRise .9s var(--ease) .34s both;
}
.hero__ledger h2 { font-size: 1.15rem; font-family: var(--sans); font-weight: 700; color: #fff; letter-spacing: .01em; }
.hero__ledger dl { margin-top: 14px; }
.hero__ledger div {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding-block: 9px;
  border-bottom: 1px dashed var(--line-navy);
}
.hero__ledger div:last-child { border-bottom: 0; }
.hero__ledger dt { font-size: 14px; color: var(--muted-on-navy); }
.hero__ledger dd { font-family: var(--serif); font-size: 1.5rem; color: var(--lime); line-height: 1; }
@keyframes heroRise {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sections shared rhythm */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: clamp(30px, 5vw, 54px); }
.section-head p { max-width: 560px; color: var(--ink-soft); }
.section-head--stack { flex-direction: column; align-items: flex-start; gap: 14px; }

/* Why now — stakes */
.stakes { padding-block: clamp(64px, 9vw, 120px); }
.stakes__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.stake-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  border: 1.5px solid var(--ink);
  border-radius: 20px;
  overflow: clip;
  background: var(--surface);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.stake-card:hover { transform: translateY(-5px) rotate(-.4deg); box-shadow: var(--shadow-2); }
.stake-card:nth-child(even):hover { transform: translateY(-5px) rotate(.4deg); }
.stake-card img { width: 100%; height: 100%; object-fit: cover; }
.stake-card__body { padding: 24px 26px; }
.stake-card__body h3 { font-family: var(--sans); font-weight: 800; font-size: 1.15rem; }
.stake-card__body p { margin-top: 9px; font-size: 15.5px; color: var(--ink-soft); }
.stakes__note { margin-top: 34px; font-size: clamp(1.05rem, 1.8vw, 1.3rem); font-family: var(--serif); font-style: italic; color: var(--ink-2); }

/* Shelf — top books carousel */
.shelf { padding-block: clamp(64px, 9vw, 120px); background: var(--ink); color: var(--paper-on-navy); }
.shelf .section-head p { color: var(--muted-on-navy); }
.shelf__viewport { overflow: clip; }
.shelf__track {
  display: flex;
  gap: 20px;
  transition: transform .6s var(--ease);
}
.book-card {
  flex: 0 0 232px;
  display: flex;
  flex-direction: column;
  background: rgba(251, 251, 244, .05);
  border: 1px solid var(--line-navy);
  border-radius: 16px;
  padding: 16px;
  transition: transform .35s var(--ease), background-color .35s var(--ease);
}
.book-card:hover { transform: translateY(-6px); background: rgba(251, 251, 244, .1); }
.book-card__cover {
  position: relative;
  border-radius: 10px;
  overflow: clip;
  aspect-ratio: 2 / 3;
  background: var(--ink-2);
}
.book-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.book-card h3 { font-family: var(--sans); font-weight: 700; font-size: 1.02rem; margin-top: 14px; line-height: 1.3; }
.book-card__author { font-size: 13.5px; color: var(--muted-on-navy); margin-top: 4px; }
.book-card__rating { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; color: var(--lime); font-weight: 700; }
.book-card__rating svg { width: 15px; height: 15px; fill: var(--lime); }
.book-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; }
.book-card__price { font-family: var(--serif); font-size: 1.35rem; color: var(--lime); }
.book-card__buy {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  transition: background-color .25s var(--ease), transform .25s var(--ease);
}
.book-card__buy:hover { background: #fff; transform: scale(1.05); }
.shelf__nav { display: flex; gap: 10px; }
.shelf__arrow {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--line-navy);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--paper-on-navy);
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), opacity .2s;
}
.shelf__arrow svg { width: 20px; height: 20px; }
.shelf__arrow:hover { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.shelf__arrow[disabled] { opacity: .35; pointer-events: none; }

/* Edge — why choose us */
.edge { padding-block: clamp(64px, 9vw, 120px); }
.edge__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.edge__photo { position: relative; }
.edge__photo img { width: 100%; height: auto; border-radius: 22px; border: 1.5px solid var(--ink); }
.edge__stamp {
  position: absolute;
  right: -18px; bottom: -18px;
  width: 132px; height: 132px;
  border-radius: 50%;
  background: var(--lime);
  border: 1.5px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.25;
  padding: 16px;
  rotate: -8deg;
  animation: stampFloat 5s ease-in-out infinite;
}
@keyframes stampFloat {
  0%, 100% { translate: 0 0; rotate: -8deg; }
  50% { translate: 0 -9px; rotate: -4deg; }
}
.edge__list { margin-top: 30px; display: grid; gap: 0; }
.edge__item {
  position: relative;
  padding: 20px 0 20px 58px;
  border-bottom: 1px solid var(--line);
}
.edge__item:last-child { border-bottom: 0; }
.edge__item svg { position: absolute; left: 6px; top: 22px; width: 30px; height: 30px; color: var(--lime-deep); }
.edge__item h3 { font-family: var(--sans); font-weight: 800; font-size: 1.08rem; }
.edge__item p { margin-top: 6px; font-size: 15.5px; color: var(--ink-soft); }

/* Gains — what you get */
.gains { padding-block: clamp(64px, 9vw, 120px); background: var(--lime-soft); border-block: 1.5px solid var(--ink); }
.gains__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.gain-panel {
  background: var(--bg);
  border: 1.5px solid var(--ink);
  border-radius: 20px;
  padding: 30px 28px;
  position: relative;
  overflow: clip;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.gain-panel:hover { transform: translateY(-6px); box-shadow: var(--shadow-2); }
.gain-panel::after {
  content: '';
  position: absolute;
  right: -34px; top: -34px;
  width: 90px; height: 90px;
  border-radius: 50%;
  background: var(--lime);
  opacity: 0;
  scale: .4;
  transition: opacity .35s var(--ease), scale .45s var(--ease);
}
.gain-panel:hover::after { opacity: 1; scale: 1; }
.gain-panel svg { width: 38px; height: 38px; color: var(--ink); position: relative; z-index: 1; }
.gain-panel h3 { font-family: var(--sans); font-weight: 800; font-size: 1.14rem; margin-top: 18px; position: relative; z-index: 1; }
.gain-panel p { margin-top: 10px; color: var(--ink-soft); font-size: 15.5px; position: relative; z-index: 1; }

/* Voices — home reviews */
.voices { padding-block: clamp(64px, 9vw, 120px); }
.voices__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.voice-note {
  position: relative;
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: 20px;
  padding: 28px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.voice-note:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.voice-note blockquote { font-family: var(--serif); font-size: 1.18rem; line-height: 1.42; color: var(--ink-2); }
.voice-note blockquote::before { content: '\201C'; color: var(--lime-deep); font-size: 1.6em; line-height: 0; margin-right: 4px; }
.voice-note figcaption { display: flex; align-items: center; gap: 14px; margin-top: 20px; }
.voice-note img { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--ink); object-fit: cover; }
.voice-note figcaption b { display: block; font-size: 15px; }
.voice-note figcaption span { display: block; font-size: 13.5px; color: var(--ink-soft); }
.voice-note figcaption .voice-note__stars { display: flex; gap: 3px; margin-left: auto; color: inherit; font-size: inherit; }
.voice-note__stars svg { width: 16px; height: 16px; fill: var(--lime-deep); }
.voice-note__date { display: block; margin-top: 10px; text-align: right; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }

/* Journal — blog preview */
.journal { padding-block: clamp(64px, 9vw, 120px); background: var(--ink); color: var(--paper-on-navy); }
.journal .section-head p { color: var(--muted-on-navy); }
.journal__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.journal-card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: clip;
  background: rgba(251, 251, 244, .05);
  border: 1px solid var(--line-navy);
  transition: transform .35s var(--ease), background-color .35s var(--ease);
}
.journal-card:hover { transform: translateY(-6px); background: rgba(251, 251, 244, .1); }
.journal-card img { width: 100%; height: 200px; object-fit: cover; }
.journal-card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.journal-card h3 { font-family: var(--sans); font-weight: 700; font-size: 1.12rem; line-height: 1.35; color: #fff; }
.journal-card p { margin-top: 10px; font-size: 15px; color: var(--muted-on-navy); flex: 1; }
.journal-card__more { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-weight: 700; font-size: 14.5px; color: var(--lime); }
.journal-card__more svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.journal-card:hover .journal-card__more svg { transform: translateX(5px); }

/* Magnet — lead banner */
.magnet { padding-block: clamp(64px, 9vw, 120px); }
.magnet__panel {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: clamp(24px, 4vw, 60px);
  background: var(--ink);
  color: var(--paper-on-navy);
  border-radius: 26px;
  padding: clamp(30px, 5vw, 64px);
  position: relative;
  overflow: clip;
}
.magnet__panel h2 { color: #fff; }
.magnet__panel h2 em { font-style: italic; color: var(--lime); }
.magnet__panel > div p { margin-top: 16px; color: var(--muted-on-navy); }
.magnet__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.magnet__art img { width: 100%; height: auto; border-radius: 18px; }

/* Page hero (inner pages) */
.page-hero { padding-block: clamp(48px, 7vw, 90px) clamp(34px, 5vw, 60px); border-bottom: 1.5px solid var(--ink); }
.page-hero h1 em { font-style: italic; color: var(--lime-deep); }
.page-hero p { margin-top: 16px; font-size: clamp(1rem, 1.5vw, 1.18rem); color: var(--ink-soft); max-width: 720px; }

/* Shop */
.catalog { padding-block: clamp(44px, 6vw, 80px); }
.catalog__layout { display: grid; grid-template-columns: 264px 1fr; gap: clamp(24px, 3.5vw, 48px); align-items: start; }
.filters { position: sticky; top: calc(var(--header-offset, 64px) + 20px); display: grid; gap: 26px; }
.filters__group { border: 1.5px solid var(--ink); border-radius: 16px; padding: 20px; background: var(--surface); }
.filters__group h2 { font-family: var(--sans); font-weight: 800; font-size: 1rem; }
.filters__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.filter-chip {
  padding: 8px 15px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  font-size: 13.5px;
  font-weight: 600;
  transition: background-color .22s var(--ease), border-color .22s var(--ease), color .22s var(--ease);
}
.filter-chip:hover { border-color: var(--ink); }
.filter-chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--lime); }
.catalog__toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 24px;
  position: relative;
  z-index: 50;
}
.catalog__count { font-size: 15px; color: var(--ink-soft); }
.cselect { position: relative; min-width: 210px; }
.cselect__btn {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1.5px solid var(--ink);
  background: var(--surface);
  font-weight: 600;
  font-size: 14.5px;
}
.cselect__btn svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.cselect.is-open .cselect__btn svg { transform: rotate(180deg); }
.cselect__list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  overflow: clip;
  box-shadow: var(--shadow-2);
  opacity: 0;
  transform: translateY(-6px);
  visibility: hidden;
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility 0s linear .22s;
}
.cselect.is-open .cselect__list { opacity: 1; transform: translateY(0); visibility: visible; transition-delay: 0s; }
.cselect__list button { display: block; width: 100%; text-align: left; padding: 11px 18px; font-size: 14.5px; font-weight: 600; transition: background-color .18s; }
.cselect__list button:hover { background: var(--lime-soft); }
.cselect__list button[aria-selected="true"] { background: var(--ink); color: var(--lime); }
.catalog__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; z-index: 1; position: relative; }
.tome-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: 18px;
  padding: 16px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.tome-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-2); }
.tome-card__cover { border-radius: 10px; overflow: clip; aspect-ratio: 2 / 3; background: var(--lime-soft); cursor: pointer; position: relative; }
.tome-card__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.tome-card:hover .tome-card__cover img { transform: scale(1.045); }
.tome-card__level {
  position: absolute; left: 10px; top: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  border: 1px solid var(--ink);
  font-size: 12px; font-weight: 800;
}
.tome-card h3 { font-family: var(--sans); font-weight: 700; font-size: 1.04rem; line-height: 1.3; margin-top: 14px; }
.tome-card__author { font-size: 13.5px; color: var(--ink-soft); margin-top: 4px; }
.tome-card__descr { font-size: 14px; color: var(--ink-soft); margin-top: 9px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tome-card__rating { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--lime-deep); }
.tome-card__rating svg { width: 15px; height: 15px; fill: var(--lime-deep); }
.tome-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; }
.tome-card__price { font-family: var(--serif); font-size: 1.4rem; }
.tome-card__add {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--lime);
  font-weight: 700; font-size: 14px;
  transition: background-color .25s var(--ease), transform .25s var(--ease);
}
.tome-card__add svg { width: 16px; height: 16px; }
.tome-card__add:hover { background: var(--lime-deep); color: #fff; transform: scale(1.04); }
.catalog__empty { padding: 60px 20px; text-align: center; color: var(--ink-soft); font-size: 1.05rem; display: none; }
.catalog__empty.is-visible { display: block; }
.catalog__skeleton { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.catalog__skeleton div { border-radius: 18px; aspect-ratio: 3/5; background: linear-gradient(100deg, rgba(21,28,54,.06) 40%, rgba(21,28,54,.13) 50%, rgba(21,28,54,.06) 60%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Buying steps (shop) */
.buying { padding-block: clamp(56px, 8vw, 100px); background: var(--ink); color: var(--paper-on-navy); }
.buying h2 { color: #fff; }
.buying h2 em { font-style: italic; color: var(--lime); }
.buying .section-head p { color: var(--muted-on-navy); }
.buying__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.buying-step { border: 1px solid var(--line-navy); border-radius: 20px; padding: 30px 28px; background: rgba(251,251,244,.04); transition: background-color .3s var(--ease), transform .3s var(--ease); }
.buying-step:hover { background: rgba(251,251,244,.09); transform: translateY(-5px); }
.buying-step svg { width: 36px; height: 36px; color: var(--lime); }
.buying-step h3 { font-family: var(--sans); font-weight: 800; font-size: 1.12rem; margin-top: 16px; color: #fff; }
.buying-step p { margin-top: 10px; font-size: 15px; color: var(--muted-on-navy); }

/* Book modal */
.book-modal, .checkout-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(21, 28, 54, .62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.book-modal__panel {
  position: relative;
  width: min(880px, 100%);
  max-height: min(86dvh, 760px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  border: 1.5px solid var(--ink);
  border-radius: 22px;
  padding: clamp(22px, 3.5vw, 40px);
  animation: modalIn .38s var(--ease) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(26px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color .22s, rotate .3s var(--ease);
  z-index: 2;
}
.modal-close svg { width: 18px; height: 18px; }
.modal-close:hover { background: var(--lime); rotate: 90deg; }
.book-modal__grid { display: grid; grid-template-columns: 250px 1fr; gap: clamp(20px, 3vw, 36px); }
.book-modal__cover { border-radius: 14px; overflow: clip; aspect-ratio: 2/3; border: 1.5px solid var(--ink); background: var(--lime-soft); align-self: start; }
.book-modal__cover img { width: 100%; height: 100%; object-fit: cover; }
.book-modal__info h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); padding-right: 40px; }
.book-modal__author { margin-top: 6px; color: var(--ink-soft); font-size: 15px; }
.book-modal__rating { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-weight: 700; font-size: 14px; color: var(--lime-deep); }
.book-modal__rating svg { width: 16px; height: 16px; fill: var(--lime-deep); }
.book-modal__descr { margin-top: 16px; color: var(--ink-2); }
.book-modal__review {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--lime-soft);
  border: 1px solid var(--ink);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.5;
}
.book-modal__review b { font-family: var(--sans); font-style: normal; font-weight: 800; font-size: 13px; display: block; margin-bottom: 6px; letter-spacing: .04em; }
.book-modal__buy { display: flex; align-items: center; gap: 18px; margin-top: 22px; flex-wrap: wrap; }
.book-modal__price { font-family: var(--serif); font-size: 2rem; }
.book-modal__ship { margin-top: 22px; display: grid; gap: 10px; }
.book-modal__ship div { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: var(--ink-soft); }
.book-modal__ship svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--lime-deep); margin-top: 2px; }
.book-modal__also { margin-top: 30px; }
.book-modal__also h3 { font-family: var(--sans); font-weight: 800; font-size: 1.05rem; }
.book-modal__also-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.mini-tome { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--surface); text-align: left; transition: transform .3s var(--ease), border-color .3s; }
.mini-tome:hover { transform: translateY(-4px); border-color: var(--ink); }
.mini-tome img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 8px; }
.mini-tome b { display: block; font-size: 12.5px; line-height: 1.3; margin-top: 8px; }
.mini-tome span { display: block; font-size: 12px; color: var(--lime-deep); font-weight: 700; margin-top: 3px; }

/* Cart drawer */
.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  pointer-events: none;
}
.cart-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(21, 28, 54, .5);
  opacity: 0;
  transition: opacity .32s var(--ease);
}
.cart-drawer__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100%);
  background: var(--bg);
  border-left: 1.5px solid var(--ink);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .42s var(--ease);
}
.cart-drawer.is-open { pointer-events: auto; }
.cart-drawer.is-open .cart-drawer__backdrop { opacity: 1; }
.cart-drawer.is-open .cart-drawer__panel { transform: translateX(0); }
.cart-drawer__head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 20px 24px;
  border-bottom: 1.5px solid var(--ink);
}
.cart-drawer__head h2 { font-family: var(--sans); font-weight: 800; font-size: 1.2rem; }
.cart-drawer__items { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 24px; display: grid; gap: 16px; align-content: start; }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--surface); }
.cart-item img { width: 64px; height: 92px; object-fit: cover; border-radius: 8px; }
.cart-item b { font-size: 14px; line-height: 1.3; display: block; }
.cart-item__price { font-family: var(--serif); font-size: 1.1rem; margin-top: 6px; display: block; }
.cart-item__qty { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.cart-item__qty button {
  width: 26px; height: 26px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  font-weight: 800;
  line-height: 1;
  transition: background-color .2s, border-color .2s;
}
.cart-item__qty button:hover { background: var(--lime); border-color: var(--ink); }
.cart-item__qty span { font-weight: 700; font-size: 14px; min-width: 18px; text-align: center; }
.cart-item__remove { align-self: start; width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-soft); transition: background-color .2s, color .2s; }
.cart-item__remove svg { width: 16px; height: 16px; }
.cart-item__remove:hover { background: #F6DEDE; color: #A33; }
.cart-drawer__empty { text-align: center; color: var(--ink-soft); padding: 46px 20px; }
.cart-drawer__empty svg { width: 56px; height: 56px; margin: 0 auto 14px; color: var(--line); }
.cart-drawer__foot { border-top: 1.5px solid var(--ink); padding: 20px 24px; }
.cart-drawer__total { display: flex; align-items: baseline; justify-content: space-between; font-weight: 800; margin-bottom: 16px; }
.cart-drawer__total span:last-child { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; }
.cart-drawer__foot .btn { width: 100%; }

/* Checkout modal + toast */
.checkout-modal__panel {
  position: relative;
  width: min(460px, 100%);
  background: var(--bg);
  border: 1.5px solid var(--ink);
  border-radius: 22px;
  padding: 32px;
  animation: modalIn .38s var(--ease) both;
}
.checkout-modal__panel h2 { font-family: var(--sans); font-weight: 800; font-size: 1.3rem; padding-right: 40px; }
.checkout-modal__panel p { margin-top: 8px; font-size: 14.5px; color: var(--ink-soft); }
.field { margin-top: 16px; }
.field label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color .22s;
}
.field textarea { resize: none; min-height: 96px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field input.is-error, .field textarea.is-error { border-color: #C0392B; }
.checkout-modal__panel .btn { width: 100%; margin-top: 22px; }
.toast {
  position: fixed;
  inset: 0;
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.toast__panel {
  position: relative;
  background: var(--ink);
  color: var(--paper-on-navy);
  border-radius: 18px;
  border: 1.5px solid var(--lime);
  padding: 28px 34px;
  text-align: center;
  max-width: 420px;
  animation: modalIn .34s var(--ease) both;
}
.toast__panel svg { width: 44px; height: 44px; margin: 0 auto 12px; color: var(--lime); }
.toast__panel b { font-size: 1.1rem; display: block; }
.toast__panel span { display: block; margin-top: 6px; font-size: 14.5px; color: var(--muted-on-navy); }

/* Blog list */
.posts { padding-block: clamp(44px, 6vw, 80px); }
.posts__tools { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 30px; }
.posts__search { position: relative; flex: 1; min-width: 240px; }
.posts__search input {
  width: 100%;
  padding: 14px 18px 14px 48px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--surface);
  font: inherit;
  font-size: 15px;
}
.posts__search input:focus { outline: none; box-shadow: 0 0 0 3px var(--lime-soft); }
.posts__search svg { position: absolute; left: 18px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--ink-soft); }
.posts__tags { display: flex; gap: 8px; flex-wrap: wrap; }
.posts__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.post-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  border: 1.5px solid var(--ink);
  border-radius: 20px;
  overflow: clip;
  background: var(--surface);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); }
.post-card img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: 22px 24px; display: flex; flex-direction: column; }
.post-card__meta { font-size: 13px; font-weight: 700; color: var(--lime-deep); }
.post-card h2 { font-family: var(--sans); font-weight: 700; font-size: 1.15rem; line-height: 1.35; margin-top: 8px; }
.post-card p { font-size: 14.5px; color: var(--ink-soft); margin-top: 9px; flex: 1; }
.post-card__more { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-weight: 700; font-size: 14px; }
.post-card__more svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.post-card:hover .post-card__more svg { transform: translateX(5px); }
.posts__empty { display: none; padding: 50px 20px; text-align: center; color: var(--ink-soft); }
.posts__empty.is-visible { display: block; }

/* Article */
.article-hero { padding-block: clamp(44px, 6vw, 80px) 0; }
.article-hero__meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; font-weight: 700; color: var(--lime-deep); margin-bottom: 16px; }
.article-hero h1 { max-width: 900px; }
.article-hero img { width: 100%; height: auto; border-radius: 22px; border: 1.5px solid var(--ink); margin-top: 34px; }
.article-body { padding-block: clamp(36px, 5vw, 64px) clamp(64px, 9vw, 110px); }
.article-body h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 40px; }
.article-body h2:first-child { margin-top: 0; }
.article-body p { margin-top: 16px; color: var(--ink-2); }
.article-body ul { margin-top: 16px; display: grid; gap: 10px; }
.article-body ul li { position: relative; padding-left: 30px; color: var(--ink-2); }
.article-body ul li::before {
  content: '';
  position: absolute;
  left: 4px; top: 9px;
  width: 12px; height: 12px;
  border-radius: 3px 6px 4px 7px;
  background: var(--lime);
  border: 1px solid var(--ink);
}
.article-body .article-callout {
  margin-top: 28px;
  padding: 24px 28px;
  border-radius: 16px;
  background: var(--lime-soft);
  border: 1.5px solid var(--ink);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
}
.article-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* About */
.story { padding-block: clamp(56px, 8vw, 100px); }
.story__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.story__grid img { width: 100%; height: auto; border-radius: 22px; border: 1.5px solid var(--ink); }
.story__grid > div p { margin-top: 16px; color: var(--ink-2); }
.story__figures { display: flex; gap: 34px; margin-top: 30px; flex-wrap: wrap; }
.story__figures b { font-family: var(--serif); font-weight: 400; font-size: 2.2rem; display: block; color: var(--lime-deep); }
.story__figures span { font-size: 14px; color: var(--ink-soft); }
.mission { padding-block: clamp(56px, 8vw, 100px); background: var(--ink); color: var(--paper-on-navy); }
.mission h2 { color: #fff; }
.mission__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: clamp(30px, 5vw, 50px); }
.mission-tile { border: 1px solid var(--line-navy); border-radius: 18px; padding: 28px; background: rgba(251,251,244,.04); transition: background-color .3s var(--ease), transform .3s var(--ease); }
.mission-tile:hover { background: rgba(251,251,244,.09); transform: translateY(-5px); }
.mission-tile svg { width: 34px; height: 34px; color: var(--lime); }
.mission-tile h3 { font-family: var(--sans); font-weight: 800; font-size: 1.1rem; margin-top: 16px; color: #fff; }
.mission-tile p { margin-top: 9px; font-size: 15px; color: var(--muted-on-navy); }
.crew { padding-block: clamp(56px, 8vw, 100px); }
.crew__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.crew-card { border: 1.5px solid var(--ink); border-radius: 20px; overflow: clip; background: var(--surface); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.crew-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-2); }
.crew-card img { width: 100%; aspect-ratio: 6/7; object-fit: cover; }
.crew-card__body { padding: 20px 24px 24px; }
.crew-card h3 { font-family: var(--sans); font-weight: 800; font-size: 1.1rem; }
.crew-card__role { font-size: 13.5px; font-weight: 700; color: var(--lime-deep); margin-top: 3px; }
.crew-card p { font-size: 14.5px; color: var(--ink-soft); margin-top: 10px; }

/* Reviews page */
.wall { padding-block: clamp(44px, 6vw, 80px); }
.wall__filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.wall__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.wall__empty { display: none; padding: 50px 20px; text-align: center; color: var(--ink-soft); }
.wall__empty.is-visible { display: block; }
.tales { padding-block: clamp(56px, 8vw, 100px); background: var(--lime-soft); border-top: 1.5px solid var(--ink); }
.tales__grid { display: grid; gap: 26px; margin-top: clamp(28px, 4vw, 44px); }
.tale {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(20px, 3vw, 40px);
  background: var(--bg);
  border: 1.5px solid var(--ink);
  border-radius: 22px;
  overflow: clip;
}
.tale:nth-child(even) { grid-template-columns: 1.3fr 1fr; }
.tale:nth-child(even) .tale__art { order: 2; }
.tale__art img { width: 100%; height: 100%; object-fit: cover; }
.tale__body { padding: clamp(22px, 3.5vw, 40px); }
.tale__body h3 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
.tale__who { font-size: 14px; font-weight: 700; color: var(--lime-deep); margin-top: 6px; }
.tale__body p { margin-top: 14px; font-size: 15.5px; color: var(--ink-2); }

/* Quiz */
.quiz-why { padding-block: clamp(56px, 8vw, 100px); }
.quiz-why__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.quiz-why__grid img { width: 100%; height: auto; border-radius: 22px; border: 1.5px solid var(--ink); }
.quiz-why__grid > div p { margin-top: 16px; color: var(--ink-2); }
.quiz-why__points { margin-top: 24px; display: grid; gap: 14px; }
.quiz-why__points li { position: relative; padding-left: 36px; color: var(--ink-2); }
.quiz-why__points svg { position: absolute; left: 0; top: 3px; width: 22px; height: 22px; color: var(--lime-deep); }
.quiz-game { padding-block: clamp(56px, 8vw, 100px); background: var(--ink); color: var(--paper-on-navy); }
.quiz-game h2 { color: #fff; }
.quiz-game__frame {
  position: relative;
  width: 100%;
  margin: clamp(28px, 4vw, 44px) 0 0;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(200,240,75,.1), transparent 60%),
    rgba(251,251,244,.05);
  border: 1px solid var(--line-navy);
  border-radius: 24px;
  padding: clamp(24px, 4vw, 48px);
  overflow: clip;
}
.quiz-game__frame::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--lime), transparent 70%);
}
.quiz-progress { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.quiz-progress__bar { flex: 1; height: 10px; border-radius: 999px; background: rgba(251,251,244,.14); overflow: clip; }
.quiz-progress__fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--lime-deep), var(--lime)); transition: width .5s var(--ease); }
.quiz-progress__num { font-weight: 800; font-size: 14px; color: var(--lime); white-space: nowrap; }
.quiz-q { font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.25; color: #fff; max-width: 32ch; }
.quiz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 28px; counter-reset: opt; }
.quiz-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  counter-increment: opt;
  text-align: left;
  padding: 16px 20px;
  border-radius: 14px;
  border: 1.5px solid var(--line-navy);
  background: rgba(251,251,244,.03);
  color: var(--paper-on-navy);
  font-weight: 600;
  font-size: 15.5px;
  transition: border-color .22s var(--ease), background-color .22s var(--ease), transform .22s var(--ease);
}
.quiz-opt::before {
  content: counter(opt, upper-alpha);
  flex-shrink: 0;
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px;
  background: rgba(251,251,244,.08);
  border: 1px solid var(--line-navy);
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--lime);
  transition: background-color .22s var(--ease), color .22s var(--ease);
}
.quiz-opt:hover { border-color: var(--lime); transform: translateY(-3px); background: rgba(200,240,75,.06); }
.quiz-opt:hover::before { background: var(--lime); color: var(--ink); }
.quiz-opt.is-right { background: rgba(200, 240, 75, .18); border-color: var(--lime); }
.quiz-opt.is-right::before { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.quiz-opt.is-wrong { background: rgba(220, 90, 90, .16); border-color: #D66; }
.quiz-opt.is-wrong::before { background: #D66; color: #fff; border-color: #D66; }
.quiz-opt[disabled] { pointer-events: none; }
.quiz-note {
  margin-top: 22px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(251,251,244,.05);
  border-left: 3px solid var(--lime);
  font-size: 14.5px;
  color: var(--paper-on-navy);
}
.quiz-note:empty { display: none; }
.quiz-result { text-align: center; }
.quiz-result__score { font-family: var(--serif); font-size: clamp(3rem, 7vw, 4.6rem); color: var(--lime); line-height: 1; }
.quiz-result h3 { font-family: var(--sans); font-weight: 800; color: #fff; margin-top: 14px; }
.quiz-result p { margin-top: 12px; color: var(--muted-on-navy); }
.quiz-result .btn { margin-top: 24px; }
.quiz-save { padding-block: clamp(56px, 8vw, 100px); }
.quiz-save__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: clamp(28px, 4vw, 44px); }
.save-tile { border: 1.5px solid var(--ink); border-radius: 20px; padding: 28px; background: var(--surface); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.save-tile:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); }
.save-tile b { font-family: var(--serif); font-weight: 400; font-size: 1.9rem; color: var(--lime-deep); display: block; }
.save-tile h3 { font-family: var(--sans); font-weight: 800; font-size: 1.08rem; margin-top: 10px; }
.save-tile p { margin-top: 9px; font-size: 15px; color: var(--ink-soft); }

/* Legal */
.legal-content { padding-block: clamp(44px, 6vw, 80px) clamp(64px, 9vw, 110px); }
.legal-content h2 { font-family: var(--sans); font-weight: 800; font-size: 1.3rem; margin-top: 34px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p, .legal-content li { margin-top: 12px; color: var(--ink-2); }
.legal-content ul { padding-left: 4px; }
.legal-content ul li { position: relative; padding-left: 26px; }
.legal-content ul li::before { content: ''; position: absolute; left: 2px; top: 10px; width: 10px; height: 10px; border-radius: 3px; background: var(--lime); border: 1px solid var(--ink); }

/* Footer — Ledger */
.ledger-footer { background: var(--ink); color: var(--paper-on-navy); border-top: 3px double var(--lime); }
.ledger-footer__head {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding-block: 30px 22px;
  border-bottom: 3px double var(--line-navy);
}
.ledger-footer__head .brand { color: #fff; }
.ledger-footer__head .brand b { color: inherit; }
.ledger-footer__tag { font-family: var(--serif); font-style: italic; color: var(--muted-on-navy); }
.ledger-footer__table { padding-block: 8px; border-bottom: 3px double var(--line-navy); }
.ledger-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 18px;
  padding-block: 13px;
  border-bottom: 1px solid rgba(251,251,244,.09);
  font-size: 15px;
  transition: background-color .22s var(--ease);
}
.ledger-row:last-child { border-bottom: 0; }
.ledger-row:hover { background: rgba(200, 240, 75, .07); }
.ledger-row__no { font-family: var(--serif); color: var(--lime); font-size: 1.05rem; }
.ledger-row__name { font-weight: 600; }
.ledger-row svg { width: 17px; height: 17px; color: var(--muted-on-navy); transition: transform .3s var(--ease), color .3s; }
.ledger-row:hover svg { transform: translateX(6px); color: var(--lime); }
.ledger-footer__meta { padding-block: 24px; display: grid; grid-template-columns: 1fr minmax(240px, 340px); gap: clamp(24px, 4vw, 48px); align-items: start; font-size: 14px; color: var(--muted-on-navy); }
.ledger-footer__info { display: grid; gap: 8px; align-content: start; }
.ledger-footer__meta a:not(.ledger-footer__socials a) { text-decoration: underline; text-underline-offset: 3px; transition: color .22s; }
.ledger-footer__map { border: 1px solid var(--line-navy); border-radius: 16px; overflow: clip; background: rgba(251, 251, 244, .04); align-self: start; }
.ledger-footer__map iframe { display: block; width: 100%; height: 150px; border: 0; filter: invert(.92) hue-rotate(180deg) saturate(.8) contrast(.9) brightness(.95); }
.ledger-footer__pay-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ledger-footer__pay-list li { display: inline-flex; align-items: center; padding: 6px 13px; border: 1px solid var(--line-navy); border-radius: 8px; background: rgba(251, 251, 244, .05); font-family: var(--sans); font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--paper-on-navy); letter-spacing: .02em; }
.ledger-footer__meta a:hover { color: var(--lime); }
.ledger-footer__legal { display: flex; gap: 18px; flex-wrap: wrap; }
.ledger-footer__socials { display: flex; gap: 10px; margin-top: 6px; }
.ledger-footer__socials a {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-navy);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--paper-on-navy);
  transition: background-color .25s, color .25s, border-color .25s;
}
.ledger-footer__socials a:hover { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.ledger-footer__socials svg { width: 18px; height: 18px; }
.ledger-footer__closing {
  padding-block: 16px 26px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14.5px;
  color: var(--muted-on-navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* Cookie banner */
.cookie-bar {
  position: fixed;
  left: 20px; right: 20px; bottom: 20px;
  z-index: var(--z-toast);
  margin: 0 auto;
  max-width: 620px;
  background: var(--ink);
  color: var(--paper-on-navy);
  border: 1.5px solid var(--lime);
  border-radius: 18px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-2);
  animation: cookieUp .5s var(--ease) both;
}
@keyframes cookieUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.cookie-bar p { font-size: 13.5px; line-height: 1.5; flex: 1; }
.cookie-bar a { color: var(--lime); text-decoration: underline; text-underline-offset: 2px; }
.cookie-bar__actions { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-bar__actions .btn { padding: 10px 18px; font-size: 13.5px; }

/* Chat */
.chat-toggle {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: var(--z-chat);
  width: 62px; height: 62px;
  border-radius: 50%;
  background: var(--lime);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-2);
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s var(--ease);
}
.chat-toggle:hover { transform: scale(1.08); background: #fff; }
.chat-toggle svg { width: 28px; height: 28px; color: var(--ink); }
.chat-panel {
  position: fixed;
  right: 20px; bottom: 94px;
  z-index: var(--z-chat);
  width: min(360px, calc(100vw - 40px));
  height: min(460px, calc(100dvh - 130px));
  background: var(--bg);
  border: 1.5px solid var(--ink);
  border-radius: 20px;
  box-shadow: var(--shadow-2);
  display: flex;
  flex-direction: column;
  overflow: clip;
  opacity: 0;
  transform: translateY(16px) scale(.97);
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s linear .3s;
}
.chat-panel.is-open { opacity: 1; transform: translateY(0) scale(1); visibility: visible; pointer-events: auto; transition-delay: 0s; }
.chat-panel__head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--ink);
  color: var(--paper-on-navy);
}
.chat-panel__head img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--lime); }
.chat-panel__head b { display: block; font-size: 15px; color: #fff; }
.chat-panel__head span { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--lime); }
.chat-panel__head span::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.chat-panel__close { margin-left: auto; width: 34px; height: 34px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--paper-on-navy); transition: background-color .2s; }
.chat-panel__close:hover { background: rgba(251,251,244,.12); }
.chat-panel__close svg { width: 16px; height: 16px; }
.chat-panel__log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px; display: grid; gap: 10px; align-content: start; }
.chat-msg { max-width: 84%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.45; animation: msgIn .3s var(--ease) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.chat-msg--bot { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; justify-self: start; }
.chat-msg--user { background: var(--ink); color: var(--paper-on-navy); border-bottom-right-radius: 4px; justify-self: end; }
.chat-msg--typing { display: flex; gap: 4px; padding-block: 14px; }
.chat-msg--typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-soft); animation: typing 1.1s infinite; }
.chat-msg--typing i:nth-child(2) { animation-delay: .18s; }
.chat-msg--typing i:nth-child(3) { animation-delay: .36s; }
@keyframes typing { 30% { translate: 0 -5px; opacity: .5; } }
.chat-panel__form { display: flex; gap: 8px; padding: 12px; border-top: 1.5px solid var(--ink); }
.chat-panel__form input {
  flex: 1;
  min-width: 0;
  padding: 11px 15px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font: inherit;
  font-size: 14px;
}
.chat-panel__form input:focus { outline: none; border-color: var(--ink); }
.chat-panel__form button {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--lime);
  border: 1.5px solid var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .25s var(--ease);
}
.chat-panel__form button:hover { transform: scale(1.08); background: #fff; }
.chat-panel__form svg { width: 18px; height: 18px; }

/* Reveal — driven by keyframes (not transition) so each card's own
   `transition` stays free to animate hover transforms smoothly */
.reveal { opacity: 0; }
.reveal.is-in { animation: revealUp .8s var(--ease) both; }
@keyframes revealUp {
  from { opacity: 0; translate: 0 30px; }
  to { opacity: 1; translate: 0 0; }
}
.reveal--d1 { transition-delay: .1s; }
.reveal--d2 { transition-delay: .2s; }
.reveal--d3 { transition-delay: .3s; }

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

/* ===== Responsive ===== */
@media (max-width: 1220px) {
  .hero__inner { flex-direction: column; align-items: flex-start; gap: 34px; }
  .hero__ledger { width: min(420px, 100%); }
  .catalog__layout { grid-template-columns: 1fr; }
  .filters { position: static; grid-template-columns: repeat(2, 1fr); }
  .catalog__grid, .catalog__skeleton { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1100px) {
  .stakes__grid { grid-template-columns: 1fr; }
  .journal__grid { grid-template-columns: 1fr 1fr; }
  .journal-card:last-child { grid-column: 1 / -1; }
  .catalog__grid, .catalog__skeleton { grid-template-columns: repeat(2, 1fr); }
  .gains__grid, .mission__grid, .crew__grid, .quiz-save__grid, .buying__grid { grid-template-columns: 1fr 1fr; }
  .gain-panel:last-child, .mission-tile:last-child, .crew-card:last-child, .save-tile:last-child, .buying-step:last-child { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  body { font-size: 16px; }
  .hero { min-height: 82vh; background-position: 62% top; }
  .hero::after { background: linear-gradient(180deg, rgba(21,28,54,.14) 0%, rgba(21,28,54,.68) 60%, rgba(21,28,54,.94) 100%); }
  .section-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .edge__grid, .story__grid, .quiz-why__grid { grid-template-columns: 1fr; }
  .edge__stamp { right: 8px; bottom: -18px; }
  .voices__grid, .wall__grid, .posts__grid { grid-template-columns: 1fr; }
  .journal__grid { grid-template-columns: 1fr; }
  .journal-card:last-child { grid-column: auto; }
  .magnet__panel { grid-template-columns: 1fr; }
  .magnet__art { order: -1; max-width: 380px; }
  .tale, .tale:nth-child(even) { grid-template-columns: 1fr; }
  .tale:nth-child(even) .tale__art { order: 0; }
  .tale__art img { max-height: 300px; }
  .book-modal__grid { grid-template-columns: 1fr; }
  .book-modal__cover { max-width: 220px; }
  .book-modal__also-row { grid-template-columns: repeat(2, 1fr); }
  .post-card { grid-template-columns: 1fr; }
  .post-card img { height: 190px; }
  .filters { grid-template-columns: 1fr; }
  .ledger-footer__closing { flex-direction: column; gap: 6px; }
  .ledger-footer__meta { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .stake-card { grid-template-columns: 1fr; }
  .stake-card img { height: 170px; }
  .catalog__grid, .catalog__skeleton { grid-template-columns: 1fr; }
  .gains__grid, .mission__grid, .crew__grid, .quiz-save__grid, .buying__grid { grid-template-columns: 1fr; }
  .gain-panel:last-child, .mission-tile:last-child, .crew-card:last-child, .save-tile:last-child, .buying-step:last-child { grid-column: auto; }
  .catalog__toolbar { flex-direction: column; align-items: stretch; }
  .cselect { min-width: 0; }
  .quiz-opts { grid-template-columns: 1fr; }
  .cookie-bar { flex-direction: column; align-items: stretch; text-align: center; left: 12px; right: 12px; bottom: 12px; }
  .cookie-bar__actions { justify-content: center; }
}

@media (max-width: 430px) {
  .hero__actions .btn, .magnet__actions .btn, .article-cta .btn { width: 100%; }
  .hero__ledger { padding: 20px 18px 14px; }
  .shelf__nav { width: 100%; justify-content: flex-end; }
  .book-modal__also-row { grid-template-columns: 1fr 1fr; }
  .story__figures { gap: 20px; }
  .edge__stamp { width: 112px; height: 112px; font-size: 13.5px; }
}

@media (max-width: 360px) {
  .brand span { font-size: 17px; }
  .book-card { flex-basis: 200px; }
  .cart-item { grid-template-columns: 52px 1fr auto; }
  .cart-item img { width: 52px; height: 76px; }
}
