/* =========================================================
   POL GREK — «Тёплая лаборатория»
   Unique author site design system
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  /* —— Light (warm lab) —— */
  --ink: #0B1F33;
  --ink-soft: #16324A;
  --paper: #F6F1E8;
  --paper-2: #EFE8DC;
  --paper-3: #E5DCCE;
  --amber: #E8A23A;
  --amber-deep: #C9841F;
  --teal: #2A9D8F;
  --teal-deep: #1F7A6F;
  --graphite: #3D4A57;
  --muted: #6B7682;
  --line: rgba(11, 31, 51, 0.1);
  --line-strong: rgba(11, 31, 51, 0.18);
  --coral: #D16666;
  --white: #FFFcf7;
  --shadow: 0 18px 50px rgba(11, 31, 51, 0.08);
  --shadow-lg: 0 28px 70px rgba(11, 31, 51, 0.14);
  --header-bg: rgba(246, 241, 232, 0.9);
  --header-bg-scrolled: rgba(246, 241, 232, 0.96);
  --body-glow-1: rgba(42, 157, 143, 0.08);
  --body-glow-2: rgba(232, 162, 58, 0.09);
  --btn-outline-bg: rgba(255, 252, 247, 0.75);
  --btn-primary-text: #1a1205;
  --nav-hover: rgba(11, 31, 51, 0.06);
  --nav-active: rgba(42, 157, 143, 0.12);
  --chip-bg: rgba(11, 31, 51, 0.05);
  --overlay: rgba(11, 31, 51, 0.45);
  --tabbar-bg: rgba(246, 241, 232, 0.97);
  --drawer-bg: var(--paper);
  --panel-bg: var(--white);
  --footer-bg: #0B1F33;
  --footer-fg: rgba(246, 241, 232, 0.7);
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1180px;
  --nav-h: 76px;
  /* Mobile chrome: bottom tab bar + optional sticky buy (excl. safe-area) */
  --mobile-tabbar-h: 4rem; /* row of 48px targets + padding (safe-area added separately) */
  --mobile-sticky-buy-h: 3.75rem;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

/* —— Dark (deep lab) —— */
[data-theme="dark"] {
  --ink: #E8EEF4;
  --ink-soft: #C8D4E0;
  --paper: #0C121A;
  --paper-2: #121A24;
  --paper-3: #1A2432;
  --amber: #E8A23A;
  --amber-deep: #F0B85C;
  --teal: #3DB8A8;
  --teal-deep: #6AD4C4;
  --graphite: #B4C0CC;
  --muted: #8B98A8;
  --line: rgba(232, 238, 244, 0.1);
  --line-strong: rgba(232, 238, 244, 0.18);
  --coral: #E07A7A;
  --white: #151F2C;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.5);
  --header-bg: rgba(12, 18, 26, 0.92);
  --header-bg-scrolled: rgba(12, 18, 26, 0.97);
  --body-glow-1: rgba(61, 184, 168, 0.1);
  --body-glow-2: rgba(232, 162, 58, 0.07);
  --btn-outline-bg: rgba(21, 31, 44, 0.9);
  --btn-primary-text: #1a1205;
  --nav-hover: rgba(232, 238, 244, 0.08);
  --nav-active: rgba(61, 184, 168, 0.2);
  --chip-bg: rgba(232, 238, 244, 0.06);
  --overlay: rgba(0, 0, 0, 0.55);
  --tabbar-bg: rgba(12, 18, 26, 0.97);
  --drawer-bg: #0C121A;
  --panel-bg: #151F2C;
  --footer-bg: #070B10;
  --footer-fg: rgba(232, 238, 244, 0.65);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--graphite);
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--body-glow-1), transparent 55%),
    radial-gradient(900px 500px at 95% 5%, var(--body-glow-2), transparent 50%),
    var(--paper);
  min-height: 100vh;
  transition: background-color 0.25s var(--ease), color 0.2s var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { padding: 0; margin: 0; list-style: none; }

.container {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, .display {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

h1, .display { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
p { margin: 0 0 1rem; max-width: 68ch; }
.lead { font-size: 1.15rem; color: var(--ink-soft); line-height: 1.7; max-width: 46rem; }
.muted { color: var(--muted); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 0.9rem;
}
.eyebrow::before {
  content: '';
  width: 18px;
  height: 2px;
  background: var(--amber);
  border-radius: 2px;
}

.pull-quote {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.35;
  color: var(--ink);
  border-left: 3px solid var(--amber);
  padding: 0.2rem 0 0.2rem 1.25rem;
  margin: 1.75rem 0;
  max-width: 36rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--amber) 0%, var(--amber-deep) 100%);
  color: var(--btn-primary-text);
  box-shadow: 0 10px 28px rgba(232, 162, 58, 0.35);
}
.btn-primary:hover { box-shadow: 0 14px 34px rgba(232, 162, 58, 0.45); }
.btn-secondary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow);
}
.btn-outline {
  border: 1.5px solid var(--line-strong);
  background: var(--btn-outline-bg);
  color: var(--ink);
  backdrop-filter: blur(8px);
}
.btn-outline:hover { border-color: var(--ink); background: var(--panel-bg); }
.btn-teal {
  background: var(--teal);
  color: white;
  box-shadow: 0 10px 24px rgba(42, 157, 143, 0.28);
}
.btn-ghost { color: var(--ink-soft); padding-inline: 0.5rem; }
.btn-ghost:hover { color: var(--teal-deep); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* ---------- Nav ---------- */
/* Skip link — IA / a11y */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0.75rem;
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(16px) saturate(1.2);
  background: var(--header-bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
  isolation: isolate;
}
.site-header.scrolled {
  border-color: var(--line);
  box-shadow: var(--shadow);
  background: var(--header-bg-scrolled);
}
.nav-inner {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  color: var(--ink);
}
.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 30% 30%, var(--amber), transparent 55%),
    radial-gradient(circle at 70% 70%, var(--teal), transparent 50%),
    #0B1F33; /* fixed brand deep — not theme ink (light in dark mode) */
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.logo-mark::after {
  content: '';
  position: absolute;
  inset: 11px;
  border: 1.5px solid rgba(246, 241, 232, 0.75);
  border-radius: 50%;
}
.logo-text { font-family: var(--serif); font-size: 1.15rem; letter-spacing: -0.02em; }
.logo-text span { display: block; font-family: var(--sans); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 1px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  flex: 1;
  justify-content: center;
}
.nav-links > a,
.nav-drop-btn {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.nav-links > a:hover,
.nav-links > a.active,
.nav-drop-btn:hover {
  background: var(--nav-hover);
  color: var(--ink);
}
.nav-links > a.active {
  background: var(--nav-active);
  color: var(--teal-deep);
}
.nav-soft { opacity: 0.85; font-size: 0.88rem !important; }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--btn-outline-bg);
}
.lang-btn {
  min-width: 2.1rem;
  min-height: 32px;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: center;
}
.lang-btn.active {
  background: var(--ink);
  color: var(--paper);
}
.lang-btn:hover:not(.active) {
  color: var(--ink);
}
.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1.5px solid var(--line-strong);
  background: var(--btn-outline-bg);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  touch-action: manipulation;
}
.theme-toggle:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}
.theme-toggle .theme-icon-dark { display: none; }
[data-theme="dark"] .theme-toggle .theme-icon-light { display: none; }
[data-theme="dark"] .theme-toggle .theme-icon-dark { display: inline; }
.mobile-lang-row {
  margin: 0 0 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}
.mobile-lang-row .lang-switch {
  flex: 1;
  justify-content: center;
}
.mobile-lang-row .lang-btn {
  flex: 1;
  min-height: 40px;
}
.mobile-lang-row .theme-toggle {
  width: 44px;
  height: 44px;
}
.nav-cta { margin-left: 0; min-height: 42px; padding-inline: 1.1rem; font-size: 0.88rem; }
.nav-cta-secondary {
  min-height: 42px;
  padding-inline: 0.95rem;
  font-size: 0.88rem;
}

/* Dropdown «С чего начать» */
.nav-dropdown { position: relative; }
.nav-drop-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.nav-chevron {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.55;
  transition: transform 0.2s;
}
.nav-dropdown.open .nav-chevron { transform: rotate(180deg); }
.nav-drop-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 280px;
  padding: 0.5rem;
  border-radius: 16px;
  background: var(--panel-bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
  z-index: 120;
}
.nav-dropdown.open .nav-drop-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-drop-panel a {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  color: var(--ink);
  font-weight: 600;
}
.nav-drop-panel a span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}
.nav-drop-panel a:hover { background: rgba(42, 157, 143, 0.1); }
.nav-drop-all {
  margin-top: 0.25rem;
  border-top: 1px solid var(--line);
  border-radius: 0 0 12px 12px !important;
  color: var(--teal-deep) !important;
  font-size: 0.9rem;
}

.nav-mobile-tools {
  display: none;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1.5px solid var(--line-strong);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  background: var(--panel-bg);
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: none;
}
.mobile-drawer.open { display: block; }
.mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(2px);
}
.mobile-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(360px, 88vw);
  height: 100%;
  background: var(--drawer-bg);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.25);
  padding: 1.1rem 1.15rem 2rem;
  overflow-y: auto;
  animation: drawerIn 0.28s var(--ease);
}
@keyframes drawerIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.mobile-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}
.mobile-drawer-head strong {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--ink);
}
.mobile-drawer-close {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-bg);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--ink);
}
.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
}
.mobile-drawer-nav a {
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  font-weight: 700;
  color: var(--ink);
  font-size: 1.02rem;
}
.mobile-drawer-nav a:hover,
.mobile-drawer-nav a.active {
  background: var(--nav-active);
  color: var(--teal-deep);
}
.mobile-drawer-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem;
}
.mobile-door-list {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}
.mobile-door-list a {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: var(--panel-bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.mobile-door-list a strong { color: var(--ink); font-size: 0.98rem; }
.mobile-door-list a span { color: var(--muted); font-size: 0.82rem; font-weight: 500; }
.mobile-drawer-cta {
  display: grid;
  gap: 0.55rem;
}
.mobile-drawer-cta .btn { width: 100%; }
body.drawer-open { overflow: hidden; }

/* Mobile bottom tab bar — always lowest chrome layer */
.mobile-tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 96;
  padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
  background: var(--tabbar-bg);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.12);
  grid-template-columns: repeat(5, 1fr);
  gap: 0.1rem;
}
.mobile-tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  min-height: 48px;
  padding: 0.35rem 0.15rem;
  border-radius: 12px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.15;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.mobile-tabbar a span { font-size: 1.15rem; line-height: 1; }
.mobile-tabbar a.active,
.mobile-tabbar a:hover {
  color: var(--teal-deep);
  background: var(--nav-active);
}

/* Back to top */
.back-to-top {
  position: fixed;
  right: 1.1rem;
  bottom: 5.5rem;
  z-index: 85;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--ink);
  color: var(--paper);
  font-size: 1.15rem;
  font-weight: 700;
  box-shadow: var(--shadow);
  touch-action: manipulation;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.back-to-top:hover { transform: translateY(-3px); }
body.has-sticky-buy .back-to-top {
  bottom: calc(var(--mobile-tabbar-h) + var(--mobile-sticky-buy-h) + env(safe-area-inset-bottom, 0px) + 0.75rem);
}

/* breadcrumb base redefined above for comfort — override earlier simple rule */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 1rem;
  padding: 0.45rem 0.85rem;
  background: rgba(11, 31, 51, 0.04);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
}
.breadcrumb a {
  color: var(--teal-deep);
  font-weight: 600;
}
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 460px;
  border-radius: 28px;
  background:
    linear-gradient(160deg, rgba(11, 31, 51, 0.96), rgba(22, 50, 74, 0.92)),
    var(--ink);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  isolation: isolate;
  padding: 1.35rem 1rem 1.15rem;
  gap: 0.85rem;
}
.hero-visual canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}
/* Covers live in their own band so the bottom card never crops them */
.hero-visual-stack .hero-cover-stack {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  /* tall enough for 2:3 cover at ~188px + scale(1.1) + slight rotate */
  min-height: clamp(280px, 42vw, 340px);
  width: 100%;
  display: block;
  pointer-events: none;
}
.hero-cover {
  position: absolute;
  top: 50%;
  width: min(34%, 160px);
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  border: 2px solid rgba(246, 241, 232, 0.18);
  will-change: transform;
}
.hero-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-cover-0 {
  left: 6%;
  transform: translateY(-50%) rotate(-9deg);
  z-index: 2;
}
.hero-cover-1 {
  left: 50%;
  transform: translate(-50%, -50%) rotate(0deg) scale(1.08);
  z-index: 3;
  width: min(38%, 176px);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.55);
}
.hero-cover-2 {
  right: 6%;
  left: auto;
  transform: translateY(-50%) rotate(9deg);
  z-index: 2;
}
.hero-cover-0:hover {
  transform: translateY(calc(-50% - 8px)) rotate(-9deg) scale(1.04);
  z-index: 5;
}
.hero-cover-1:hover {
  transform: translate(-50%, calc(-50% - 8px)) rotate(0deg) scale(1.12);
  z-index: 5;
}
.hero-cover-2:hover {
  transform: translateY(calc(-50% - 8px)) rotate(9deg) scale(1.04);
  z-index: 5;
}

/* Ratings / social proof */
.ratings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.rating-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.35rem 1.25rem;
  border-radius: var(--radius);
  background: var(--panel-bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.rating-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.rating-stars { color: var(--amber); letter-spacing: 0.08em; font-size: 0.95rem; }
.rating-card strong {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--ink);
  line-height: 1;
}
.rating-book { font-weight: 700; color: var(--ink-soft); font-size: 0.95rem; }
.rating-meta { font-size: 0.82rem; color: var(--muted); }
.social-note { margin-top: 1rem; font-size: 0.88rem; max-width: 48rem; }

/* Trust split with portrait */
.trust-split {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.trust-photo img {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center top;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}
.photo-caption {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.65rem 0 0;
  max-width: 32ch;
}
.about-photo {
  margin: 0 0 1.5rem;
}
.about-photo img {
  width: min(220px, 40vw);
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center top;
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.person.pol .avatar.has-photo {
  background: none;
  padding: 0;
  overflow: hidden;
  width: 72px;
  height: 72px;
}
.person.pol .avatar.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.trust-list { margin: 1.25rem 0 1.5rem; }
.hero-proof {
  font-size: 0.95rem;
  color: var(--ink-soft);
  background: rgba(42, 157, 143, 0.1);
  border: 1px solid rgba(42, 157, 143, 0.22);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  max-width: 40rem;
  margin: 0 0 1rem;
}
.method-example { margin-top: 1.5rem; padding: 1.5rem; }
.method-example h3 { margin-top: 0.25rem; }
.magnet-book-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}
.magnet-book-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem;
  border-radius: 12px;
  border: 1.5px solid rgba(255,255,255,0.14);
  background: rgba(255,252,247,0.06);
  cursor: pointer;
  width: 100px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(246,241,232,0.9);
  transition: border-color 0.2s, background 0.2s;
}
.magnet-book-option img {
  width: 64px;
  height: 96px;
  object-fit: cover;
  border-radius: 4px;
}
.magnet-book-option input { position: absolute; opacity: 0; pointer-events: none; }
.magnet-book-option:has(input:checked),
.magnet-book-option:hover {
  border-color: var(--amber);
  background: rgba(232,162,58,0.12);
}
.faq-list { display: grid; gap: 0.65rem; max-width: 800px; }
.faq-item {
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 1.1rem;
  box-shadow: var(--shadow);
}
.faq-item summary {
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
.faq-item p {
  margin: 0.65rem 0 0;
  color: var(--muted);
  max-width: none;
  font-size: 0.95rem;
}
.noscript-banner {
  margin: 0.75rem auto;
  padding: 0.65rem 1rem;
  background: rgba(232,162,58,0.15);
  border: 1px solid rgba(232,162,58,0.35);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}
.pro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.pro-card, .burnout-story {
  padding: 1.35rem 1.4rem;
}
.pro-card h3, .burnout-story h3 { margin-top: 0; font-size: 1.15rem; }
.pro-card p, .burnout-story p { margin: 0; max-width: none; font-size: 0.95rem; color: var(--muted); }
.bio-prose {
  max-width: 720px;
  font-size: 1.05rem;
  line-height: 1.75;
}
.bio-prose p { max-width: none; margin-bottom: 1.15rem; color: var(--graphite); }
.bio-prose h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.85rem;
  font-size: 1.55rem;
}
/* Principles: 2×2 inside narrow bio column — 4-up was ~160px and shattered RU text */
.bio-principles {
  margin: 1.25rem 0 0.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 1rem;
  width: 100%;
}
@media (max-width: 560px) {
  .bio-principles {
    grid-template-columns: 1fr !important;
  }
}
.footer-legal {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: rgba(246,241,232,0.45);
  max-width: var(--max);
}
.footer-legal p { max-width: 70ch; margin: 0 0 0.5rem; }
@media (max-width: 980px) {
  .pro-grid { grid-template-columns: 1fr; }
}
.hero-card {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  margin: 0;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
  opacity: 0.97;
}
.hero-card strong {
  display: block;
  font-family: var(--serif);
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.3;
  margin-bottom: 0.2rem;
}
.hero-card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--muted);
  max-width: none;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 1.75rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
}
.chip-dot.amber { background: var(--amber); }

/* ---------- Sections ---------- */
section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.section-head p { margin: 0.4rem 0 0; color: var(--muted); max-width: 38rem; }

.panel {
  background: var(--btn-outline-bg);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
}

/* ---------- Problem doors ---------- */
.doors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.door {
  position: relative;
  padding: 1.6rem 1.4rem 1.4rem;
  border-radius: var(--radius);
  background: var(--panel-bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.2s;
  overflow: hidden;
  min-height: 220px;
  display: flex;
  flex-direction: column;
}
.door::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--teal), var(--amber));
  opacity: 0.85;
}
.door:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(42, 157, 143, 0.35);
}
.door .num {
  font-family: var(--serif);
  font-size: 2rem;
  color: rgba(11, 31, 51, 0.12);
  line-height: 1;
  margin-bottom: 0.75rem;
}
.door h3 { margin-bottom: 0.5rem; }
.door p { flex: 1; font-size: 0.95rem; color: var(--muted); max-width: none; }
.door .link {
  margin-top: 1rem;
  font-weight: 700;
  color: var(--teal-deep);
  font-size: 0.92rem;
}

/* ---------- Method ---------- */
.method {
  background:
    linear-gradient(180deg, rgba(11, 31, 51, 0.03), transparent 40%),
    transparent;
}
.method-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.method-card {
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius);
  background: var(--panel-bg);
  border: 1px solid var(--line);
  min-height: 0;
  min-width: 0; /* allow grid shrink without crushing content layout */
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.method-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 0.65rem;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--ink);
  background: linear-gradient(145deg, rgba(232, 162, 58, 0.25), rgba(42, 157, 143, 0.18));
}
.method-card h3 {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  margin: 0 0 0.4rem;
  line-height: 1.3;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: manual;
}
.method-card p {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
  max-width: none;
  line-height: 1.55;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* ---------- Book cards ---------- */
.books-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}
.book-card {
  display: flex;
  flex-direction: column;
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  height: 100%;
}
.book-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}
.book-cover {
  aspect-ratio: 3/4;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 1.2rem;
  color: var(--paper);
  overflow: hidden;
  background: var(--ink);
}
.book-cover.has-image {
  padding: 0;
}
.book-cover.has-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
/* P0: clean covers — no text overlay, no dark gradient */
.book-cover.clean::after { display: none; }
.book-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,0.72) 100%);
  z-index: 1;
  pointer-events: none;
}
.book-cover-inner { position: relative; z-index: 2; padding: 1.2rem; }
.book-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  margin: 0;
  line-height: 1.25;
}
.book-title a { color: var(--ink); }
.book-title a:hover { color: var(--teal-deep); }
.book-card.is-flagship {
  border-color: rgba(232, 162, 58, 0.35);
  box-shadow: 0 18px 50px rgba(232, 162, 58, 0.12);
}
.tag.flag {
  background: rgba(232, 162, 58, 0.2);
  color: var(--amber-deep);
}
.books-grid-flagship {
  grid-template-columns: repeat(3, 1fr);
}
.catalog-hint {
  text-align: center;
  margin: 1.75rem 0 0;
  font-weight: 700;
}
.catalog-hint a { color: var(--teal-deep); }
.catalog-hint a:hover { color: var(--ink); }
.btn-sm { min-height: 40px; font-size: 0.85rem; padding-inline: 0.85rem; }
.btn-ghost-link {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--muted);
  padding: 0.5rem 0.25rem;
  min-height: 44px;
}
.btn-ghost-link:hover { color: var(--ink); transform: none; }
.lead-short { max-width: 36rem; font-size: 1.12rem; }
.book-cover .series {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 0.35rem;
  font-weight: 700;
}
.book-cover h3 {
  color: white;
  font-size: 1.25rem;
  margin: 0;
  text-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.book-body {
  padding: 1.15rem 1.2rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.85rem;
}
.book-body p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  max-width: none;
  flex: 1;
}
.book-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.25rem;
  font-size: 0.85rem;
  line-height: 1.4;
}
.tag {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-soft);
  display: inline;
}
.tag-sep {
  color: var(--muted);
  font-size: 0.75rem;
  user-select: none;
  padding: 0 0.1rem;
}
.tag.co { background: rgba(42, 157, 143, 0.14); color: var(--teal-deep); }
.tag.flag { display: none; } /* legacy; не используем «Ключевая» */
.grade-legend {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 42rem;
  margin: 0 0 1rem;
  line-height: 1.55;
}
.about-lead-note {
  font-size: 1rem;
  line-height: 1.6;
}
.book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.book-actions .btn {
  flex: 1 1 calc(50% - 0.25rem);
  min-height: 44px;
  font-size: 0.85rem;
  padding-inline: 0.7rem;
  touch-action: manipulation;
}
/* LitRes primary — full width when 3 actions (Литрес + Amazon + отрывок) */
.book-actions .btn-primary {
  flex: 1 1 100%;
}
.book-more {
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  padding-top: 0.15rem;
}
.book-more:hover { color: var(--teal-deep); }

/* Cover palettes */
.cover-1 { background: linear-gradient(155deg, #0B1F33, #1a4d5c 55%, #2A9D8F); }
.cover-2 { background: linear-gradient(155deg, #1d2b3a, #3d5a80 50%, #E8A23A); }
.cover-3 { background: linear-gradient(155deg, #14213d, #4361ee 60%, #4cc9f0); }
.cover-4 { background: linear-gradient(155deg, #1b4332, #2d6a4f 45%, #95d5b2); }
.cover-5 { background: linear-gradient(155deg, #3d0c11, #9b2226 50%, #ee9b00); }
.cover-6 { background: linear-gradient(155deg, #10002b, #5a189a 55%, #c77dff); }
.cover-7 { background: linear-gradient(155deg, #22223b, #4a4e69 50%, #9a8c98); }
.cover-8 { background: linear-gradient(155deg, #001219, #005f73 50%, #0a9396); }
.cover-9 { background: linear-gradient(155deg, #1a1423, #3d348b 50%, #7678ed); }
.cover-10 { background: linear-gradient(155deg, #4a1942, #9b2335 45%, #e07a5f); }
.cover-11 { background: linear-gradient(155deg, #0d1b2a, #1b263b 45%, #778da9); }
.cover-12 { background: linear-gradient(155deg, #2b2d42, #8d99ae 50%, #ef233c); }

/* ---------- Filters ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.filter-btn {
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--btn-outline-bg);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink-soft);
  transition: all 0.2s;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.filter-btn:hover { border-color: var(--ink); color: var(--ink); }
.filter-btn.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* ---------- Evidence / Myth ---------- */
.evidence-row { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.badge-a, .badge-b, .badge-c, .badge-d {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
}
.badge-a { background: rgba(42,157,143,0.18); color: var(--teal-deep); }
.badge-b { background: rgba(232,162,58,0.2); color: var(--amber-deep); }
.badge-c { background: rgba(61,74,87,0.12); color: var(--graphite); }
.badge-d { background: rgba(209,102,102,0.15); color: var(--coral); }

.myth-fact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
#voiceExamples {
  grid-template-columns: 1fr 1fr;
}
#voiceExamples .myth,
#voiceExamples .fact {
  min-height: auto;
}
.myth-fact article {
  padding: 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel-bg);
}
.myth-fact .label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.myth-fact .myth .label { color: var(--coral); }
.myth-fact .fact .label { color: var(--teal-deep); }

/* ---------- Dual authors ---------- */
.dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.person {
  padding: 1.75rem;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--line);
  background: var(--panel-bg);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.person::before {
  content: '';
  position: absolute;
  width: 180px; height: 180px;
  border-radius: 50%;
  top: -60px; right: -40px;
  opacity: 0.15;
}
.person.pol::before { background: var(--teal); }
.person.laura::before { background: var(--amber); }
.avatar {
  width: 64px; height: 64px;
  border-radius: 20px;
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
}
.person.pol .avatar { background: linear-gradient(145deg, var(--ink), var(--teal)); }
.person.laura .avatar { background: linear-gradient(145deg, #7a3e2b, var(--amber)); }
.person h3 { margin-bottom: 0.25rem; }
.person .role { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.9rem; }
.person p { font-size: 0.95rem; max-width: none; }

/* ---------- Lab / Articles ---------- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.article-card {
  padding: 1.4rem;
  border-radius: var(--radius);
  background: var(--panel-bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  min-height: 260px;
}
.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.article-card .cat {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 0.7rem;
}
.article-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.65rem;
}
.article-card p {
  font-size: 0.92rem;
  color: var(--muted);
  flex: 1;
  max-width: none;
}
.article-card .meta {
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
}

/* ---------- Lead magnet ---------- */
/* Always deep “ink panel” — must not flip with theme tokens */
.magnet {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 28px;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(232,162,58,0.22), transparent 50%),
    linear-gradient(135deg, #0B1F33 0%, #16324A 100%);
  color: #F6F1E8;
  box-shadow: var(--shadow-lg);
}
.magnet h2 { color: #F6F1E8; }
.magnet p { color: rgba(246,241,232,0.78); max-width: 38rem; }
.magnet-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: rgba(255,252,247,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 1.25rem;
}
.magnet-form label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(246,241,232,0.85);
}
.magnet-form select,
.magnet-form input {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,252,247,0.95);
  color: #0B1F33;
  padding: 0.7rem 0.9rem;
  font: inherit;
}
.magnet-note { font-size: 0.8rem; color: rgba(246,241,232,0.55); margin: 0; }

/* ---------- Page hero ---------- */
.page-hero {
  padding: clamp(2.5rem, 5vw, 4rem) 0 2rem;
}
.page-hero h1 { max-width: 16ch; }

/* ---------- Book detail ---------- */
/* Book page — orientation & wayfinding */
.page-book .book-page { padding-bottom: 2rem; }
.book-you-are-here {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  background: rgba(42, 157, 143, 0.08);
  border: 1px solid rgba(42, 157, 143, 0.18);
  font-size: 0.92rem;
  color: var(--muted);
}
.book-you-are-here strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.05rem;
}
.book-you-are-meta { font-size: 0.85rem; }
.bc-sep { opacity: 0.45; margin: 0 0.15rem; }

.book-toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 14px;
  background: var(--panel-bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: sticky;
  top: calc(var(--nav-h) + 0.5rem);
  z-index: 40;
}
.book-toc-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.25rem;
}
.book-toc a {
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background 0.15s, color 0.15s;
}
.book-toc a:hover,
.book-toc a.active {
  background: rgba(42, 157, 143, 0.12);
  color: var(--teal-deep);
}
.book-toc-buy {
  margin-left: auto;
  background: linear-gradient(135deg, var(--amber), var(--amber-deep));
  color: #1a1205 !important;
}
.book-toc-buy:hover { filter: brightness(1.05); }

.book-detail {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  padding-bottom: 3rem;
}
.book-detail-aside {
  position: sticky;
  top: calc(var(--nav-h) + 4.5rem);
}
.book-aside-actions {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.9rem;
}
.book-aside-actions .btn { width: 100%; }
.book-aside-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.65rem 0 0;
  max-width: none;
}
.book-h1 { font-size: clamp(1.85rem, 3.5vw, 2.6rem) !important; }
.book-authors {
  font-size: 0.95rem;
  color: var(--muted);
  margin: -0.35rem 0 1rem;
}
.book-main-actions { margin-bottom: 1rem; }
.book-grade { margin-bottom: 1.5rem; }
.book-section {
  scroll-margin-top: calc(var(--nav-h) + 4.5rem);
  margin-top: 1.75rem;
}
.book-section h2 { margin-bottom: 0.75rem; }
.excerpt-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.excerpt-head strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.2rem;
}
.excerpt-lead { margin: 0 0 0.75rem; font-size: 0.9rem; }

.book-prev-next {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  margin: 2rem 0;
  align-items: stretch;
}
.book-pn {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-bg);
  box-shadow: var(--shadow);
  min-height: 72px;
  justify-content: center;
}
.book-pn:hover { border-color: rgba(42, 157, 143, 0.4); }
.book-pn-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.book-pn strong {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
}
.book-pn.next { text-align: right; }
.book-pn.catalog {
  align-items: center;
  text-align: center;
  font-weight: 700;
  color: var(--teal-deep);
  font-size: 0.9rem;
}
.book-pn.empty {
  visibility: hidden;
  pointer-events: none;
  box-shadow: none;
  border: none;
  background: transparent;
}
.book-detail-cover {
  position: relative;
  top: 0;
  border-radius: 22px;
  aspect-ratio: 3/4;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: white;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  background: var(--ink);
}
.book-detail-cover.has-image::after { display: none; }
.book-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.book-detail-cover > *:not(img) { position: relative; z-index: 1; }
.book-detail-cover h1 {
  color: white;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin: 0.3rem 0 0;
}
.book-detail-body .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.25rem 0 1.75rem;
}
.checklist {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
  list-style: none;
  padding: 0;
}
/* Absolute bullet + normal block text — no flex/grid children, so
   mixed <a>/<strong>/text never split into broken columns. */
.checklist li {
  position: relative;
  display: block;
  padding-left: 1.9rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--graphite);
}
.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--teal) 0 35%, transparent 36%),
    rgba(42, 157, 143, 0.15);
  box-shadow: inset 0 0 0 1.5px var(--teal);
  pointer-events: none;
}
.checklist a {
  color: var(--teal-deep);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  white-space: normal;
}
.checklist a:hover {
  color: var(--ink);
}
.checklist strong {
  color: var(--ink);
  font-weight: 700;
}
.excerpt-box {
  margin: 1.5rem 0;
  padding: 1.4rem;
  border-radius: var(--radius);
  background: var(--paper-2);
  border: 1px dashed var(--line-strong);
}
.excerpt-box pre {
  white-space: pre-wrap;
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--ink);
  margin: 0.75rem 0 0;
}
.disclaimer {
  margin-top: 2rem;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  background: rgba(209, 102, 102, 0.08);
  border: 1px solid rgba(209, 102, 102, 0.18);
  font-size: 0.88rem;
  color: var(--graphite);
}
.related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

/* Sticky mobile buy bar — sits ABOVE tabbar (not under it) */
.sticky-buy {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--mobile-tabbar-h) + env(safe-area-inset-bottom, 0px));
  z-index: 95;
  padding: 0.55rem 0.75rem;
  background: var(--tabbar-bg);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  gap: 0.45rem;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
  align-items: stretch;
}
.sticky-buy .btn {
  flex: 1;
  min-height: 46px;
  font-size: 0.82rem;
  padding-inline: 0.55rem;
  touch-action: manipulation;
}
.sticky-buy .btn-ghost-link {
  flex: 0 0 auto;
  min-width: 4.5rem;
  font-size: 0.8rem;
}

/* ---------- Article detail ---------- */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) 280px;
  gap: 2.5rem;
  align-items: start;
  padding-bottom: 4rem;
}
.article-content {
  font-size: 1.05rem;
  line-height: 1.75;
}
.article-content h2 {
  margin-top: 2.2rem;
  margin-bottom: 0.8rem;
  font-size: 1.55rem;
}
.article-content p { max-width: none; }
.article-content .experiment {
  margin: 1.5rem 0;
  padding: 1.2rem 1.3rem;
  border-radius: 16px;
  background: rgba(42, 157, 143, 0.08);
  border: 1px solid rgba(42, 157, 143, 0.2);
}
.article-content .experiment strong {
  display: block;
  color: var(--teal-deep);
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.article-side {
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}
.side-card {
  padding: 1.2rem;
  border-radius: var(--radius);
  background: var(--panel-bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.side-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.side-card p { font-size: 0.9rem; color: var(--muted); max-width: none; }
.side-card .btn { width: 100%; margin-top: 0.75rem; }

/* ---------- About ---------- */
.timeline {
  display: grid;
  gap: 0;
  margin: 2rem 0;
  border-left: 2px solid var(--line-strong);
  padding-left: 1.5rem;
}
.timeline-item {
  position: relative;
  padding: 0 0 1.75rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0.35rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--amber);
  transform: translateX(-55%);
  box-shadow: 0 0 0 4px var(--paper);
}
.timeline-item strong {
  display: block;
  font-family: var(--serif);
  color: var(--ink);
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

/* ---------- Quotes ---------- */
.quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.quote-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--panel-bg);
  border: 1px solid var(--line);
  min-height: 180px;
}
.quote-card p {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink);
  line-height: 1.4;
  max-width: none;
  margin: 0 0 1rem;
}
.quote-card span { font-size: 0.85rem; color: var(--muted); font-weight: 600; }

/* ---------- Final CTA ---------- */
.final-cta {
  text-align: center;
  padding: clamp(2.5rem, 5vw, 3.5rem) 1.5rem;
  border-radius: 28px;
  background:
    radial-gradient(500px 220px at 50% 0%, rgba(232,162,58,0.18), transparent 60%),
    var(--panel-bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.final-cta h2 { max-width: 16ch; margin-inline: auto; }
.final-cta p { margin-inline: auto; color: var(--muted); }
.final-cta .btn-row { justify-content: center; margin-top: 1.5rem; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 2rem;
  padding: 3rem 0 2rem;
  background: var(--footer-bg);
  color: var(--footer-fg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.site-footer h4 {
  color: #F6F1E8;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}
.site-footer a {
  display: block;
  padding: 0.25rem 0;
  color: rgba(246,241,232,0.7);
  font-size: 0.92rem;
}
.site-footer a:hover { color: var(--amber); }
.footer-brand .logo-text { color: var(--paper); }
.footer-brand p { font-size: 0.9rem; color: rgba(246,241,232,0.55); max-width: 28ch; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(246,241,232,0.45);
}

/* ---------- Utilities ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}
.hidden { display: none !important; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.ink-section {
  background: linear-gradient(180deg, rgba(11,31,51,0.03), transparent);
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav-soft { display: none; }
  .nav-cta-secondary { display: none; }
}

@media (max-width: 980px) {
  :root {
    --nav-h: 64px;
  }
  .container,
  .nav-inner {
    width: min(var(--max), calc(100% - 1.35rem));
  }
  .logo-text span {
    display: none; /* compact header on phone */
  }
  .logo-text {
    font-size: 1.05rem;
  }
  .hero-grid,
  .book-detail,
  .article-layout,
  .magnet,
  .dual,
  .myth-fact,
  .trust-split { grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .books-grid,
  .books-grid-flagship,
  .articles-grid,
  .quotes,
  .doors,
  .ratings-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .book-detail-cover { position: relative; top: 0; max-width: min(280px, 70vw); margin-inline: auto; }
  .book-detail-aside { position: relative; top: 0; max-width: none; }
  .book-aside-actions {
    display: grid;
    gap: 0.5rem;
  }
  .book-aside-actions .btn,
  .book-main-actions .btn {
    width: 100%;
    min-height: 48px;
  }
  .book-main-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
  .book-toc {
    position: relative;
    top: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    gap: 0.35rem;
    padding-bottom: 0.35rem;
    margin-inline: -0.25rem;
    padding-inline: 0.25rem;
  }
  .book-toc a {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .book-toc-buy { margin-left: 0; flex-shrink: 0; }
  .book-prev-next { grid-template-columns: 1fr; }
  .book-pn.next { text-align: left; }
  .book-pn.empty { display: none; }
  .article-side { position: relative; top: 0; }
  .sticky-buy { display: flex; }
  .trust-photo img { max-width: 280px; margin-inline: auto; }
  .nav-links { display: none; }
  .nav-actions { display: none; }
  .nav-mobile-tools { display: inline-flex; }
  .nav-toggle { display: inline-flex; }
  .mobile-tabbar { display: grid; }
  /* Room for tabbar only */
  body {
    padding-bottom: calc(var(--mobile-tabbar-h) + env(safe-area-inset-bottom, 0px) + 0.75rem);
  }
  /* Tabbar + sticky buy bar */
  body.has-sticky-buy {
    padding-bottom: calc(
      var(--mobile-tabbar-h) + var(--mobile-sticky-buy-h) + env(safe-area-inset-bottom, 0px) + 0.85rem
    );
  }
  .back-to-top {
    bottom: calc(var(--mobile-tabbar-h) + env(safe-area-inset-bottom, 0px) + 0.85rem);
    right: 0.85rem;
  }
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-inline: -0.15rem;
    padding-inline: 0.15rem 0.5rem;
    padding-bottom: 0.35rem;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter-btn { flex: 0 0 auto; }
  .btn-row .btn {
    min-height: 48px;
  }
  .doors .door {
    min-height: 0;
  }
  .hero h1 {
    font-size: clamp(1.85rem, 8.5vw, 2.6rem);
  }
  .hero-visual {
    max-width: 420px;
    margin-inline: auto;
    width: 100%;
    min-height: 0;
  }
  .hero-visual-stack .hero-cover-stack {
    min-height: 280px;
  }
  .mobile-drawer-panel {
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    max-height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-drawer-nav a,
  .mobile-door-list a {
    min-height: 48px;
  }
  .site-footer {
    padding-bottom: 1.5rem;
  }
  /* Thumb-friendly breadcrumb */
  .breadcrumb {
    font-size: 0.88rem;
    row-gap: 0.25rem;
  }
}

@media (max-width: 720px) {
  .books-grid,
  .books-grid-flagship,
  .articles-grid,
  .quotes,
  .doors,
  .method-grid,
  .ratings-grid,
  .footer-grid { grid-template-columns: 1fr; }
  .hero-visual {
    padding: 1.15rem 0.85rem 1rem;
  }
  .hero-visual-stack .hero-cover-stack {
    min-height: 250px;
  }
  .hero-cover {
    width: min(34%, 132px);
  }
  .hero-cover-1 {
    width: min(38%, 148px);
  }
  .section-head { align-items: start; flex-direction: column; gap: 0.75rem; }
  .section-head .btn { width: 100%; }
  .page-hero h1 { max-width: none; }
  .final-cta .btn-row {
    flex-direction: column;
    align-items: stretch;
  }
  .final-cta .btn { width: 100%; }
}

@media (min-width: 981px) {
  .mobile-drawer,
  .mobile-tabbar { display: none !important; }
  .sticky-buy { display: none !important; }
  .back-to-top { bottom: 1.5rem; }
  body.has-sticky-buy .back-to-top { bottom: 1.5rem; }
  body,
  body.has-sticky-buy {
    padding-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
