/* =========================================================
   MindsetProdigy — design system
   Navy for trust, royal blue for clarity, cyan for discovery,
   gold for achievement, warm white for calm reading.
   ========================================================= */

:root {
  --navy-950: #041233;
  --navy-900: #071B47;
  --navy: #0A2463;          /* brand navy (logo) */
  --royal: #1E4FC2;         /* confidence, links on light */
  --royal-soft: #E7EEFC;
  --cyan: #2BB8EE;          /* discovery */
  --cyan-deep: #0A7FA8;
  --gold: #FDA803;          /* achievement */
  --gold-soft: #FFF3D6;
  --gold-deep: #B87700;
  --paper: #FAF8F3;         /* warm white */
  --white: #FFFFFF;
  --ink: #0E1A33;
  --muted: #56617A;
  --line: #E3E6EE;
  --line-strong: #CDD3E0;
  --ok: #1D7A4E;
  --bad: #B3261E;

  --font-head: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-read: "Source Serif 4", Georgia, "Times New Roman", serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(10, 36, 99, .06), 0 2px 8px rgba(10, 36, 99, .05);
  --shadow: 0 2px 4px rgba(10, 36, 99, .06), 0 12px 32px -12px rgba(10, 36, 99, .22);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font-head);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--royal); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5em; color: var(--navy-900); }
h1 { font-weight: 800; }
h2 { font-weight: 700; }
h3 { font-weight: 650; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 780px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--navy-950); padding: 8px 14px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.hp { position: absolute; left: -5000px; }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 650 1rem/1 var(--font-head);
  padding: 14px 22px; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold); color: var(--navy-950); }
.btn-gold:hover { background: #FFB929; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--royal); }
.btn-outline { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-quiet { background: var(--white); color: var(--navy); border-color: var(--line-strong); }
.btn-quiet:hover { border-color: var(--navy); }
.btn-small { padding: 9px 16px; font-size: .92rem; }
.btn-buy {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold); color: var(--navy-950); font: 700 1.02rem/1 var(--font-head);
  padding: 15px 24px; border-radius: 999px; text-decoration: none;
  box-shadow: 0 6px 18px -8px rgba(184, 119, 0, .7);
}
.btn-buy::after { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 3h7v7M10 14 21 3M19 14v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h6' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 3h7v7M10 14 21 3M19 14v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h6' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.btn-buy:hover { background: #FFB929; }
.btn-buy-alt { background: var(--white); border: 2px solid var(--gold); box-shadow: none; }
.buy-group { display: inline-flex; flex-wrap: wrap; gap: 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* ---------- Badges & chips ---------- */
.badge { display: inline-block; font: 650 .78rem/1 var(--font-head); padding: 6px 10px; border-radius: 999px; background: var(--royal-soft); color: var(--navy); }
.badge-gold, .badge-essential { background: var(--gold); color: var(--navy-950); }
.badge-highly { background: var(--royal-soft); color: var(--royal); }
.badge-recommended { background: #EDF1F7; color: var(--muted); }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; background: var(--white); border: 1px solid var(--line);
  color: var(--navy); text-decoration: none; font-weight: 550; font-size: .95rem;
}
.chips a:hover { border-color: var(--royal); color: var(--royal); }
.chip-n { color: var(--muted); font-weight: 500; font-size: .85rem; }

.alert { padding: 14px 18px; border-radius: var(--radius-sm); background: var(--white); border-left: 4px solid var(--royal); margin: 16px 0; }
.alert-ok { border-color: var(--ok); }
.alert-bad, .alert-error { border-color: var(--bad); color: var(--bad); }
.alert-info { border-color: var(--cyan); }
.flash-wrap { padding-top: 12px; }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 243, .92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.logo-img { height: 52px; width: auto; }
.wordmark { font: 800 1.45rem/1 var(--font-head); letter-spacing: -.03em; }
.wm-mindset { color: var(--navy); }
.wm-prodigy { color: var(--gold); }
.nav { display: flex; align-items: center; gap: 6px; }
.nav-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu[open] summary { background: var(--royal-soft); }
.nav-desktop { display: flex; align-items: center; }
.nav-desktop a, .nav-icon {
  color: var(--navy); text-decoration: none; font-weight: 550; font-size: .97rem;
  padding: 10px 12px; border-radius: 8px;
}
.nav-desktop a:hover, .nav-icon:hover { background: var(--royal-soft); }
.nav-desktop a[aria-current] { color: var(--royal); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }
.nav-icon { display: inline-flex; padding: 10px; }
.btn-nav { padding: 11px 18px; font-size: .95rem; margin-left: 6px; }
.nav-menu-label { font-weight: 600; color: var(--navy); }
.burger, .burger::before, .burger::after { display: block; width: 20px; height: 2px; background: var(--navy); border-radius: 2px; position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -6px; } .burger::after { top: 6px; }
.nav-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  display: flex; flex-direction: column;
  background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px;
  box-shadow: 0 20px 30px -20px rgba(10,36,99,.3);
}
.nav-panel a { color: var(--navy); text-decoration: none; font-weight: 550; padding: 14px 8px; border-bottom: 1px solid var(--line); }
.nav-panel a[aria-current] { color: var(--royal); }
@media (min-width: 1121px) { .nav-menu { display: none; } }
@media (max-width: 1120px) { .nav-desktop { display: none; } }
@media (max-width: 560px) {
  .btn-nav { display: none; }
  .nav-menu-label { display: none; }
  .logo-img { height: 42px; }
  .wordmark { font-size: 1.25rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(43, 184, 238, .28), transparent 60%),
    radial-gradient(600px 400px at 70% 90%, rgba(253, 168, 3, .14), transparent 60%),
    linear-gradient(160deg, var(--navy-950) 0%, var(--navy-900) 45%, #0E2E7A 100%);
  color: #fff;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding-top: clamp(48px, 8vw, 104px); padding-bottom: clamp(56px, 8vw, 112px); }
.hero-tag { font: 700 .9rem/1 var(--font-head); letter-spacing: .32em; color: var(--gold); margin-bottom: 22px; }
.hero h1 {
  color: #fff; font-size: clamp(2.4rem, 5vw, 4.1rem); line-height: 1.02; letter-spacing: -.035em; margin-bottom: .4em;
}
.hero h1 .h-line { display: block; }
.hero h1 .h-line:nth-child(2) { color: #BFE9FB; }
.hero h1 .h-line:nth-child(3) { color: var(--gold); }
.hero-sub { font-family: var(--font-read); font-size: clamp(1.1rem, 1.8vw, 1.3rem); line-height: 1.55; color: #C9D4EC; max-width: 34em; margin-bottom: 30px; }
.hero .actions { margin-top: 0; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 36px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.14); list-style: none; padding-left: 0; }
.hero-stats li { color: #AFC0E0; font-size: .95rem; }
.hero-stats strong { display: block; font-size: 1.9rem; font-weight: 800; color: #fff; letter-spacing: -.02em; line-height: 1.1; }

/* fanned covers: the one orchestrated moment on the page */
.fan { position: relative; height: clamp(300px, 34vw, 440px); }
.fan .cover { position: absolute; width: clamp(120px, 13vw, 176px); left: 50%; top: 50%;
  transform-origin: 50% 120%; box-shadow: 0 30px 50px -20px rgba(0,0,0,.6);
  animation: fan-in .9s cubic-bezier(.2,.8,.2,1) both; }
.fan .cover:nth-child(1) { --r: -24deg; --x: -150%; --y: -42%; animation-delay: .05s; }
.fan .cover:nth-child(2) { --r: -12deg; --x: -100%; --y: -52%; animation-delay: .12s; }
.fan .cover:nth-child(3) { --r: 0deg;  --x: -50%;  --y: -56%; animation-delay: .19s; z-index: 3; }
.fan .cover:nth-child(4) { --r: 12deg; --x: 0%;    --y: -52%; animation-delay: .26s; }
.fan .cover:nth-child(5) { --r: 24deg; --x: 50%;   --y: -42%; animation-delay: .33s; }
.fan .cover { transform: translate(var(--x), var(--y)) rotate(var(--r)); }
@keyframes fan-in { from { transform: translate(-50%, -40%) rotate(0deg); opacity: 0; } to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 1; } }
.fan::after { content: ""; position: absolute; left: 50%; bottom: 4%; width: 70%; height: 30px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(43,184,238,.35), transparent); filter: blur(6px); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .fan { height: 260px; order: -1; margin-bottom: -8px; }
  .fan .cover { width: 112px; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-white { background: var(--white); }
.section-blue { background: linear-gradient(180deg, #EEF4FD, #F6F9FE); }
.section-navy { background: var(--navy-900); color: #DCE5F7; }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: 0; }
.section-head p { color: var(--muted); max-width: 52ch; margin: 8px 0 0; font-family: var(--font-read); font-size: 1.08rem; }
.section-navy .section-head p { color: #AFC0E0; }
.see-all { font-weight: 650; white-space: nowrap; text-decoration: none; }
.see-all:hover { text-decoration: underline; }

/* ---------- Goal prompts ("What are you working on?") ---------- */
.prompts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.prompts a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 20px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line);
  color: var(--navy-900); text-decoration: none;
  font: italic 400 1.18rem/1.3 var(--font-read);
  transition: border-color .15s, box-shadow .15s;
}
.prompts a:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); }
.prompts .pn { font: 600 .82rem/1 var(--font-head); font-style: normal; color: var(--muted); white-space: nowrap; }

/* ---------- Covers ---------- */
.cover {
  position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden;
  border-radius: 4px 8px 8px 4px; background: var(--navy);
  box-shadow: 0 1px 2px rgba(10,36,99,.15), 0 12px 24px -14px rgba(10,36,99,.55);
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 6%; background: linear-gradient(90deg, rgba(0,0,0,.18), transparent); pointer-events: none; }
.cover-fallback {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between;
  padding: 14% 12%; color: #fff;
}
.cf-0 { background: linear-gradient(160deg, #0A2463, #1E4FC2); }
.cf-1 { background: linear-gradient(160deg, #071B47, #0A7FA8); }
.cf-2 { background: linear-gradient(160deg, #0E2E7A, #3A2E7A); }
.cf-3 { background: linear-gradient(160deg, #102A5C, #1D5C8A); }
.cover-fallback::before { content: ""; width: 28%; height: 3px; background: var(--gold); border-radius: 2px; order: 1; }
.cf-title { font: 750 clamp(.85rem, 1.5vw, 1.15rem)/1.12 var(--font-head); letter-spacing: -.01em; order: 0; }
.cf-author { font: italic 400 .8rem/1.3 var(--font-read); color: #CFE1FA; order: 2; }
.cover-sm .cf-title { font-size: .78rem; } .cover-sm .cf-author { font-size: .68rem; }
.cover-lg .cf-title { font-size: clamp(1.3rem, 2.6vw, 1.9rem); } .cover-lg .cf-author { font-size: 1rem; }

/* ---------- Book cards & grids ---------- */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 32px 24px; }
.book-card { position: relative; }
.bc-cover { display: block; position: relative; margin-bottom: 12px; transition: transform .2s ease; }
.book-card:hover .bc-cover { transform: translateY(-4px); }
.bc-cover .badge { position: absolute; top: 8px; left: 10px; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.bc-title { font-size: 1.02rem; line-height: 1.25; margin: 0 0 2px; font-weight: 650; }
.bc-title a { color: var(--navy-900); text-decoration: none; }
.bc-title a:hover { color: var(--royal); }
.bc-author { color: var(--muted); font-size: .9rem; margin: 0; }
.bc-desc { font-family: var(--font-read); font-size: .95rem; color: #3A4560; margin: 8px 0 0; line-height: 1.5; }
.shelf { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 960px) {
  .shelf { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 36%; overflow-x: auto; scroll-snap-type: x mandatory;
    padding-bottom: 12px; margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); }
  .shelf > * { scroll-snap-align: start; }
}
@media (max-width: 520px) { .shelf { grid-auto-columns: 44%; } .book-grid:not(.shelf) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; } }

.book-rows { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px 32px; }
.book-rows li { display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: start; }
.book-rows h3 { font-size: 1.05rem; margin: 0 0 2px; }
.book-rows h3 a { color: var(--navy-900); text-decoration: none; }
.book-rows h3 a:hover { color: var(--royal); }
.book-rows p { margin: 0; }
.br-rel { font-family: var(--font-read); font-size: .95rem; color: #3A4560; margin-top: 6px !important; }

/* ---------- Cards (categories, paths, authors) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card {
  display: block; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s;
}
a.card:hover { border-color: var(--royal); box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { font-size: 1.15rem; margin: 10px 0 6px; }
.card p { color: var(--muted); font-size: .95rem; margin: 0; }
.card .ic { color: var(--royal); }
.card-meta { display: block; margin-top: 12px; font-weight: 600; font-size: .88rem; color: var(--cyan-deep); }
.cat-card .ic { background: var(--royal-soft); border-radius: 10px; padding: 8px; width: 44px; height: 44px; }

.path-card { position: relative; overflow: hidden; background: linear-gradient(165deg, var(--navy-900), #0E2E7A); color: #DCE5F7; border: 0; }
.path-card h3 { color: #fff; }
.path-card p { color: #AFC0E0; }
.path-card .ic { color: var(--gold); }
.path-card .card-meta { color: var(--gold); }
a.path-card:hover { box-shadow: 0 20px 40px -20px rgba(4,18,51,.8); }
.path-covers { display: flex; margin-top: 18px; }
.path-covers .cover { width: 48px; margin-right: -12px; border: 2px solid var(--navy-900); }

.author-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.author-card { display: flex; gap: 14px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--ink); }
.author-card:hover { border-color: var(--royal); box-shadow: var(--shadow-sm); }
.author-card strong { display: block; color: var(--navy-900); font-weight: 650; line-height: 1.25; }
.author-card span.muted { font-size: .88rem; }

.portrait { position: relative; display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 50%; overflow: hidden;
  background: linear-gradient(145deg, var(--navy), var(--cyan-deep)); color: #fff; font-weight: 700; }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portrait-sm { width: 48px; height: 48px; font-size: 1rem; }
.portrait-md { width: 64px; height: 64px; font-size: 1.2rem; }
.portrait-lg { width: 132px; height: 132px; font-size: 2.4rem; box-shadow: 0 0 0 6px var(--white), 0 0 0 7px var(--line); }

/* ---------- Page heads ---------- */
.page-head { padding: clamp(36px, 6vw, 72px) 0 clamp(20px, 3vw, 32px); }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.035em; }
.lede { font-family: var(--font-read); font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 62ch; line-height: 1.55; }
.page-head-navy { background: linear-gradient(160deg, var(--navy-950), var(--navy-900) 60%, #0E2E7A); color: #DCE5F7; padding-bottom: clamp(36px, 5vw, 56px); }
.page-head-navy h1 { color: #fff; }
.page-head-navy .lede { color: #C3CFE8; }
.page-head-navy .crumbs a, .page-head-navy .crumbs { color: #AFC0E0; }
.page-head-navy .crumbs span[aria-current] { color: #fff; }

.crumbs ol { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px; font-size: .9rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--royal); text-decoration: underline; }

.stat-strip { display: flex; flex-wrap: wrap; gap: 10px 26px; list-style: none; padding: 0; margin: 18px 0 0; color: var(--muted); }
.stat-strip strong { color: var(--navy-900); font-size: 1.15rem; }
.page-head-navy .stat-strip { color: #AFC0E0; }
.page-head-navy .stat-strip strong { color: #fff; }

/* ---------- Library ---------- */
.library { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: start; }
.filters { position: sticky; top: 92px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.filters h2 { font-size: 1.05rem; margin-bottom: 14px; }
.filters label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 14px; color: var(--navy-900); }
.filters select, .filters input[type=search] {
  display: block; width: 100%; margin-top: 6px; font: 400 .95rem var(--font-head); padding: 10px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--paper); color: var(--ink);
}
.filters .btn { width: 100%; }
.filters .reset { display: block; text-align: center; margin-top: 10px; font-size: .9rem; }
.lib-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.lib-count { color: var(--muted); margin: 0; }
.lib-count strong { color: var(--navy-900); }
.sort-form select { font: 500 .95rem var(--font-head); padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--white); }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.active-filters a { background: var(--royal-soft); color: var(--navy); border-radius: 999px; padding: 6px 12px; font-size: .88rem; text-decoration: none; font-weight: 550; }
.active-filters a::after { content: " ×"; }
@media (max-width: 900px) {
  .library { grid-template-columns: 1fr; }
  .filters { position: static; }
  .filters-toggle summary { cursor: pointer; font-weight: 650; }
}

.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 40px 0 0; }
.pager a, .pager span { min-width: 42px; text-align: center; padding: 10px 14px; border-radius: 10px; text-decoration: none; font-weight: 600; }
.pager a { background: var(--white); border: 1px solid var(--line); color: var(--navy); }
.pager a:hover { border-color: var(--royal); }
.pager span[aria-current] { background: var(--navy); color: #fff; }
.pager .gap { color: var(--muted); }

.empty { padding: 40px; text-align: center; background: var(--white); border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); }

/* ---------- Book analysis page ---------- */
.book-hero { background: linear-gradient(180deg, #EEF4FD 0%, var(--paper) 100%); padding: clamp(28px, 5vw, 56px) 0 clamp(28px, 4vw, 40px); }
.bh-grid { display: grid; grid-template-columns: minmax(0, 290px) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.bh-cover { position: sticky; top: 96px; }
.bh-title { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.035em; margin-bottom: .15em; }
.bh-subtitle { font-family: var(--font-read); font-style: italic; color: var(--muted); font-size: 1.2rem; margin-bottom: 10px; }
.bh-author { font-size: 1.1rem; font-weight: 600; margin-bottom: 18px; }
.bh-author a { color: var(--navy); }
.bh-short { font-family: var(--font-read); font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.5; max-width: 40ch; color: #26324D; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 18px 0 0; }
.facts li { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .88rem; color: #3A4560; }
.facts li strong { color: var(--navy-900); font-weight: 650; }
.buy-box { margin: 26px 0 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.disclose { font-size: .82rem; color: var(--muted); margin: 6px 0 0; }
@media (max-width: 760px) {
  .bh-grid { grid-template-columns: 1fr; }
  .bh-cover { position: static; max-width: 190px; }
}

.analysis { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; padding-top: clamp(24px, 4vw, 48px); padding-bottom: clamp(48px, 6vw, 72px); }
.toc { position: sticky; top: 96px; font-size: .92rem; }
.toc h2 { font-size: .95rem; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--navy); }
.toc a.is-active { color: var(--navy-900); border-left-color: var(--gold); font-weight: 600; }
@media (max-width: 960px) { .analysis { grid-template-columns: 1fr; } .toc { display: none; } }

.a-section { margin-bottom: 52px; scroll-margin-top: 96px; max-width: 72ch; }
.a-section > h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); display: flex; align-items: baseline; gap: 12px; }
.a-kicker { font: 700 .8rem/1 var(--font-head); color: var(--cyan-deep); background: #E3F5FC; border-radius: 6px; padding: 5px 8px; letter-spacing: .02em; }
.read, .a-section p, .a-section li { font-family: var(--font-read); font-size: 1.12rem; line-height: 1.72; color: #1E2945; }
.central { font-family: var(--font-read); font-size: clamp(1.25rem, 2.4vw, 1.55rem); line-height: 1.5; color: var(--navy-900); border-left: 4px solid var(--gold); padding: 6px 0 6px 22px; margin: 0; }
.ideas { list-style: none; padding: 0; margin: 0; counter-reset: idea; display: grid; gap: 14px; }
.ideas li { counter-increment: idea; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 18px 64px; position: relative; }
.ideas li::before { content: counter(idea); position: absolute; left: 18px; top: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: var(--gold); font: 700 1rem/32px var(--font-head); text-align: center; }
.ideas h3 { font-size: 1.12rem; margin: 2px 0 6px; }
.ideas p { margin: 0; font-size: 1.05rem; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 34px; margin-bottom: 12px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .32em; width: 20px; height: 20px; border-radius: 50%; background: var(--gold-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23B87700' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/13px no-repeat; }
.critique { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.critique > div { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.critique h3 { font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.critique ul { padding-left: 1.1em; margin: 0; }
.critique li { font-size: 1.02rem; margin-bottom: 8px; }
.crit-plus h3::before { content: "+"; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #DFF3E8; color: var(--ok); font-weight: 800; }
.crit-minus h3::before { content: "–"; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #FBE7E4; color: var(--bad); font-weight: 800; }
@media (max-width: 680px) { .critique { grid-template-columns: 1fr; } }
.outcomes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.outcomes li { background: linear-gradient(160deg, var(--navy-900), #0E2E7A); color: #E6EEFB; border-radius: var(--radius); padding: 18px 20px; font-size: 1.02rem !important; line-height: 1.5 !important; }
.outcomes li::before { content: ""; display: block; width: 26px; height: 3px; background: var(--gold); border-radius: 2px; margin-bottom: 12px; }
.plan { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.plan li { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: start; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.plan-day { font: 700 .85rem/1.6 var(--font-head) !important; color: var(--royal) !important; }
.questions { counter-reset: q; list-style: none; padding: 0; }
.questions li { counter-increment: q; position: relative; padding-left: 40px; margin-bottom: 14px; font-style: italic; }
.questions li::before { content: "Q" counter(q); position: absolute; left: 0; top: 2px; font: 700 .8rem/1 var(--font-head); font-style: normal; color: var(--cyan-deep); background: #E3F5FC; border-radius: 6px; padding: 5px 6px; }
.editorial-note { font-size: .9rem !important; color: var(--muted) !important; background: var(--white); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); padding: 12px 16px; font-family: var(--font-head) !important; }
.author-box { display: flex; gap: 20px; align-items: flex-start; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.author-box h3 { margin: 0 0 6px; }
.author-box p { font-size: 1.02rem !important; margin-bottom: 8px; }
.explore { background: linear-gradient(160deg, var(--navy-900), #0E2E7A); color: #DCE5F7; border-radius: calc(var(--radius) + 4px); padding: clamp(22px, 4vw, 34px); display: grid; grid-template-columns: 100px 1fr; gap: 24px; align-items: center; }
.explore h2 { color: #fff; font-size: 1.5rem; margin-bottom: 6px; }
.explore p { color: #C3CFE8; font-family: var(--font-head); font-size: 1rem; }
.explore .disclose { color: #9DB0D3; }
@media (max-width: 560px) { .explore { grid-template-columns: 1fr; } .explore .cover { width: 100px; } }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share-label { font-weight: 650; color: var(--navy-900); margin-right: 4px; }
.share a, .share-copy { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--white); border: 1px solid var(--line); color: var(--navy); }
.share a:hover, .share-copy:hover { border-color: var(--royal); color: var(--royal); }
.share-copy { width: auto; padding: 0 16px; border-radius: 999px; font: 600 .9rem var(--font-head); cursor: pointer; }

.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; margin: 8px 0 16px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Author page ---------- */
.author-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: center; }
@media (max-width: 640px) { .author-hero { grid-template-columns: 1fr; } }
.prose { max-width: 70ch; }
.prose p, .prose li { font-family: var(--font-read); font-size: 1.12rem; line-height: 1.72; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.4em; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(28px, 5vw, 64px); align-items: start; }
.side-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px; }
.side-card h2 { font-size: 1.1rem; }
.order-list { padding-left: 1.3em; margin: 0; }
.order-list li { margin-bottom: 8px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Finder ---------- */
.finder { max-width: 820px; margin: 0 auto; }
.finder-progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 28px; }
.finder-progress span { display: block; height: 100%; width: 20%; background: linear-gradient(90deg, var(--cyan), var(--gold)); transition: width .3s ease; }
.f-step { border: 0; padding: 0; margin: 0 0 36px; }
.f-step legend { font: 750 clamp(1.4rem, 3vw, 1.9rem)/1.2 var(--font-head); color: var(--navy-900); margin-bottom: 6px; letter-spacing: -.02em; }
.f-step .hint { color: var(--muted); margin-bottom: 18px; }
.f-step-num { display: block; font: 650 .9rem/1 var(--font-head); color: var(--cyan-deep); margin-bottom: 10px; }
.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.option { position: relative; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option span {
  display: block; height: 100%; padding: 16px 18px; border-radius: var(--radius); border: 2px solid var(--line);
  background: var(--white); cursor: pointer; font-weight: 550; color: var(--navy-900); transition: border-color .12s, background .12s;
}
.option span small { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; font-size: .88rem; }
.option input:checked + span { border-color: var(--royal); background: var(--royal-soft); box-shadow: inset 0 0 0 1px var(--royal); }
.option input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: 2px; }
.f-nav { display: flex; gap: 12px; justify-content: space-between; }
.js .f-step:not(.is-current) { display: none; }
.result { display: grid; grid-template-columns: 110px 1fr; gap: 22px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; }
.result h3 { font-size: 1.3rem; margin: 0 0 2px; }
.result h3 a { color: var(--navy-900); text-decoration: none; }
.why { list-style: none; padding: 0; margin: 12px 0 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.why li { background: #E3F5FC; color: #075C7A; border-radius: 999px; padding: 5px 11px; font-size: .86rem; font-weight: 550; }
.result-rank { font: 700 .82rem/1 var(--font-head); color: var(--gold-deep); margin-bottom: 8px; display: block; }
@media (max-width: 560px) { .result { grid-template-columns: 80px 1fr; gap: 14px; padding: 16px; } }

/* ---------- Reading path ---------- */
.steps { list-style: none; padding: 0; margin: 0; position: relative; }
.steps::before { content: ""; position: absolute; left: 23px; top: 12px; bottom: 12px; width: 2px; background: linear-gradient(var(--cyan), var(--gold)); }
.step { position: relative; display: grid; grid-template-columns: 48px 88px minmax(0, 1fr); gap: 20px; padding: 0 0 36px; }
.step-num { position: relative; z-index: 1; width: 48px; height: 48px; border-radius: 50%; background: var(--navy); color: var(--gold); display: grid; place-items: center; font: 800 1.15rem var(--font-head); box-shadow: 0 0 0 6px var(--paper); }
.step h3 { font-size: 1.3rem; margin: 4px 0 2px; }
.step h3 a { color: var(--navy-900); text-decoration: none; }
.step .read { font-size: 1.05rem; }
.step-ex { background: var(--gold-soft); border-radius: var(--radius-sm); padding: 12px 16px; font-size: .98rem; margin-top: 10px; }
.step-done { margin-top: 10px; }
@media (max-width: 600px) { .step { grid-template-columns: 40px minmax(0, 1fr); } .step .br-cover { display: none; } .steps::before { left: 19px; } .step-num { width: 40px; height: 40px; } }
.milestones { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; list-style: none; padding: 0; counter-reset: ms; }
.milestones li { counter-increment: ms; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; font-family: var(--font-read); }
.milestones li::before { content: "Milestone " counter(ms); display: block; font: 700 .8rem/1 var(--font-head); color: var(--royal); margin-bottom: 8px; }

/* ---------- Comparison ---------- */
.vs-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; text-align: center; }
.vs-book .cover { width: 140px; margin: 0 auto 12px; }
.vs-book h2 { font-size: 1.3rem; margin-bottom: 2px; }
.vs-mark { font: 800 1.6rem var(--font-head); color: var(--gold); }
.compare-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.compare-table th, .compare-table td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); font-size: 1rem; }
.compare-table thead th { background: var(--navy-900); color: #fff; }
.compare-table tbody th { width: 22%; color: var(--navy-900); background: #F6F8FC; }
.compare-table td { font-family: var(--font-read); }
.compare-table tr:last-child > * { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
.verdict { background: var(--gold-soft); border-radius: var(--radius); padding: 22px 24px; }
.verdict h2 { font-size: 1.3rem; }

/* ---------- Home extras ---------- */
.botm { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(28px, 5vw, 56px); align-items: center; }
.botm-label { display: inline-block; font: 700 .85rem/1 var(--font-head); color: var(--navy-950); background: var(--gold); padding: 7px 12px; border-radius: 999px; margin-bottom: 14px; }
.botm h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.botm .read { color: #C3CFE8; }
@media (max-width: 700px) { .botm { grid-template-columns: 1fr; } .botm .cover { max-width: 180px; } }
.spotlight { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); padding: clamp(22px, 4vw, 40px); }
@media (max-width: 640px) { .spotlight { grid-template-columns: 1fr; } }
.spotlight .shelf-mini { display: flex; gap: 12px; margin-top: 16px; }
.spotlight .shelf-mini .cover { width: 64px; }
.how { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: how; list-style: none; padding: 0; margin: 0; }
.how li { counter-increment: how; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 22px; }
.how li::before { content: counter(how); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--gold); color: var(--navy-950); font: 800 1.05rem var(--font-head); margin-bottom: 14px; }
.how h3 { font-size: 1.15rem; margin-bottom: 6px; }
.how p { color: #AFC0E0; margin: 0; font-size: .97rem; }
@media (max-width: 900px) { .how { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .how { grid-template-columns: 1fr; } }
.compare-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.compare-card { display: grid; grid-template-columns: 64px auto 64px 1fr; gap: 12px; align-items: center; }
.compare-card .vs-mini { font: 800 .9rem var(--font-head); color: var(--gold-deep); }
.compare-card h3 { margin: 0; font-size: 1rem; }
.lesson-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.lesson-card .kind { font: 650 .8rem/1 var(--font-head); color: var(--cyan-deep); }
.cta-band { background: linear-gradient(120deg, var(--navy-900), #0E2E7A 60%, #13509A); color: #DCE5F7; border-radius: calc(var(--radius) + 8px); padding: clamp(28px, 5vw, 52px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.cta-band h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta-band p { color: #C3CFE8; font-family: var(--font-read); font-size: 1.1rem; }
@media (max-width: 800px) { .cta-band { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */
.search-form { display: flex; gap: 10px; max-width: 640px; margin: 18px 0 8px; }
.search-form input {
  flex: 1; min-width: 0; font: 400 1.05rem/1.2 var(--font-head); padding: 15px 18px;
  border: 2px solid var(--line-strong); border-radius: 999px; background: var(--white); color: var(--ink);
}
.search-form input:focus { border-color: var(--royal); outline: none; }
.search-form button { font: 700 1rem/1 var(--font-head); padding: 0 24px; border: 0; border-radius: 999px; background: var(--navy); color: #fff; cursor: pointer; }
.search-form button:hover { background: var(--royal); }
.newsletter-form { max-width: 560px; }
.nf-row { display: flex; gap: 10px; }
.nf-row input { flex: 1; min-width: 0; font: 400 1rem var(--font-head); padding: 14px 18px; border-radius: 999px; border: 2px solid transparent; background: var(--white); color: var(--ink); }
.nf-row input:focus { outline: none; border-color: var(--cyan); }
.nf-consent { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; margin-top: 10px; color: inherit; }
.nf-consent input { margin-top: 3px; }
@media (max-width: 480px) { .nf-row { flex-direction: column; } }

.form { max-width: 520px; }
.form label { display: block; font-weight: 600; margin-bottom: 16px; color: var(--navy-900); }
.form .hint { display: block; font-weight: 400; color: var(--muted); font-size: .88rem; }
.form input[type=text], .form input[type=email], .form input[type=password], .form input[type=number], .form textarea, .form select {
  display: block; width: 100%; margin-top: 6px; font: 400 1rem var(--font-head); padding: 12px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--white); color: var(--ink);
}
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--royal); box-shadow: 0 0 0 3px var(--royal-soft); }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 32px); }

/* ---------- Account ---------- */
.shelf-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.shelf-tabs a { padding: 8px 16px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); text-decoration: none; color: var(--navy); font-weight: 600; }
.shelf-tabs a[aria-current] { background: var(--navy); color: #fff; border-color: var(--navy); }
.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--gold)); }
.save-box { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.save-box select { font: 500 .95rem var(--font-head); padding: 10px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--white); }
.save-status { font-size: .88rem; color: var(--ok); }

/* ---------- Discussion ---------- */
.comments { list-style: none; padding: 0; margin: 0 0 20px; }
.comment { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px; }
.comment-meta { font-size: .85rem; color: var(--muted); margin-bottom: 6px; display: flex; justify-content: space-between; gap: 10px; }
.comment p { font-family: var(--font-read); margin: 0; }
.comment .report { background: none; border: 0; color: var(--muted); font: inherit; font-size: .82rem; cursor: pointer; text-decoration: underline; }

/* ---------- Coach ---------- */
.coach-log { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-height: 240px; margin-bottom: 14px; }
.coach-msg { margin-bottom: 16px; }
.coach-msg.you { text-align: right; }
.coach-msg .bubble { display: inline-block; max-width: 85%; text-align: left; padding: 12px 16px; border-radius: 16px; font-family: var(--font-read); line-height: 1.55; }
.coach-msg.you .bubble { background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.coach-msg.bot .bubble { background: #EEF4FD; color: var(--ink); border-bottom-left-radius: 4px; }
.coach-form { display: flex; gap: 10px; }
.coach-form textarea { flex: 1; font: 400 1rem var(--font-head); padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); resize: vertical; min-height: 52px; }

/* ---------- Products ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.product-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.product-card:hover { border-color: var(--royal); box-shadow: var(--shadow); }
.product-img { aspect-ratio: 4 / 3; background: linear-gradient(160deg, #EEF4FD, #DDE8FA); display: grid; place-items: center; color: var(--navy); }
.product-img img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.product-body { padding: 18px 20px; }
.product-body h3 { margin: 4px 0 6px; font-size: 1.15rem; }
.product-body p { color: var(--muted); font-size: .95rem; margin: 0; }
.kind-label { font: 650 .8rem/1 var(--font-head); color: var(--cyan-deep); }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .pros-cons { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-foot { background: var(--navy-950); color: #9DB0D3; padding: 64px 0 28px; margin-top: 0; }
.foot-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 40px; margin-bottom: 36px; }
.foot-logo { display: inline-block; background: var(--paper); border-radius: 12px; padding: 10px 14px; text-decoration: none; }
.foot-logo .logo-img { height: 40px; }
.foot-logo.foot-logo-dark { background: none; padding: 0; }
.foot-logo.foot-logo-dark .logo-img { height: 52px; }
.foot-tag { font: 700 .88rem/1.4 var(--font-head); letter-spacing: .28em; color: var(--gold); margin: 20px 0 8px; }
.foot-note { font-family: var(--font-read); color: #C3CFE8; max-width: 34ch; }
.foot-count { display: flex; gap: 22px; list-style: none; padding: 0; margin: 18px 0 0; }
.foot-count strong { display: block; color: #fff; font-size: 1.4rem; }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.foot-cols h2 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.foot-cols a { display: block; color: #C3CFE8; text-decoration: none; padding: 5px 0; }
.foot-cols a:hover { color: #fff; text-decoration: underline; }
.foot-social { display: flex; flex-wrap: wrap; gap: 10px; padding: 22px var(--gutter); border-top: 1px solid rgba(255,255,255,.1); }
.foot-social a { display: inline-flex; align-items: center; gap: 8px; color: #DCE5F7; text-decoration: none; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); font-size: .92rem; }
.foot-social a:hover { border-color: var(--gold); color: #fff; }
.foot-legal { border-top: 1px solid rgba(255,255,255,.1); padding-top: 22px; font-size: .86rem; }
.foot-legal strong { color: #fff; font-weight: 600; }
@media (max-width: 800px) { .foot-top { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .foot-cols { grid-template-columns: 1fr 1fr; } }

.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 80; max-width: 560px; margin: 0 auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.consent p { margin: 0 0 12px; }
.consent-actions { display: flex; gap: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-head, .site-foot, .toc, .share, .buy-box, .explore { display: none !important; }
}

/* Keep the call-to-action band off the screen edges on small screens */
@media (max-width: 1240px) { .wrap.cta-band { margin-left: var(--gutter); margin-right: var(--gutter); } }
