/* ============================================================
   styles.css — Гайд по профессии менеджера маркетплейсов
   Notion-like reader + polished landing
   ============================================================ */

/* --- VARIABLES --- */
:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fc;
  --bg-light: #f0f2f9;
  --border: #e8eaf0;
  --border-soft: #f0f1f5;
  --text: #1a1d2e;
  --text-mid: #4a5070;
  --text-soft: #7b84a8;
  --accent: #3b5bdb;
  --accent-hover: #2f4cca;
  --accent-light: #e8ecff;
  --accent-glow: rgba(59,91,219,.15);
  --warn: #e67e22;
  --warn-bg: #fff8f0;
  --warn-border: #fde2c0;
  --danger-bg: #fff2f2;
  --danger-border: #ffd0d0;
  --good-bg: #f0fdf4;
  --good-border: #bbf7d0;
  --card-shadow: 0 2px 12px rgba(59,91,219,.06), 0 1px 3px rgba(0,0,0,.04);
  --card-shadow-hover: 0 8px 24px rgba(59,91,219,.12), 0 2px 6px rgba(0,0,0,.06);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 280px;
  --content-max: 900px;
  --header-h: 58px;
  --font-body: 'Georgia', 'Times New Roman', serif;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: .4em; }
strong { font-weight: 700; }

/* --- PROGRESS BAR --- */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #7b9cf4);
  z-index: 9999;
  transition: width .1s linear;
  border-radius: 0 2px 2px 0;
}

/* --- HEADER --- */
#site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.header-inner {
  max-width: calc(var(--sidebar-w) + var(--content-max) + 80px);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-logo {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: .9rem;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: .3px;
}
.header-logo:hover { text-decoration: none; color: var(--accent); }
.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 420px;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  padding: 6px 14px;
  transition: border-color .15s;
}
.header-search:focus-within { border-color: var(--accent); }
#search-input {
  border: none;
  background: transparent;
  font-family: var(--font-ui);
  font-size: .85rem;
  color: var(--text);
  flex: 1;
  outline: none;
}
#search-input::placeholder { color: var(--text-soft); }
#search-count { font-family: var(--font-ui); font-size: .78rem; color: var(--text-soft); white-space: nowrap; }
#search-clear {
  background: none; border: none; cursor: pointer;
  font-size: .85rem; color: var(--text-soft); padding: 0;
  line-height: 1;
  display: none;
}
#search-clear:hover { color: var(--text); }
.toc-toggle-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  background: none; border: 1.5px solid var(--border);
  border-radius: 8px; cursor: pointer;
  padding: 8px 7px;
  margin-left: auto;
  transition: border-color .15s;
}
.toc-toggle-btn span {
  display: block;
  height: 2px;
  background: var(--text-mid);
  border-radius: 2px;
  transition: background .15s;
}
.toc-toggle-btn:hover { border-color: var(--accent); }
.toc-toggle-btn:hover span { background: var(--accent); }

/* --- HERO --- */
#hero {
  position: relative;
  overflow: hidden;
  padding: 100px 24px 80px;
  background: linear-gradient(150deg, #f8f9ff 0%, #eef1ff 40%, #f5f7fd 100%);
}
.hero-blobs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .35;
  animation: blobFloat 12s ease-in-out infinite;
}
.blob-1 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, #c5d0ff, #a5b4fc);
  top: -80px; left: -80px;
  animation-delay: 0s;
}
.blob-2 {
  width: 280px; height: 280px;
  background: radial-gradient(circle, #dde3ff, #c7d2fe);
  top: 40%; right: -60px;
  animation-delay: 4s;
}
.blob-3 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, #ede9ff, #ddd6fe);
  bottom: -40px; left: 40%;
  animation-delay: 8s;
}
@keyframes blobFloat {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(20px,-15px) scale(1.05); }
  66% { transform: translate(-10px,10px) scale(.97); }
}
.hero-inner {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid rgba(59,91,219,.2);
  border-radius: 20px;
  padding: 4px 14px;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}
#hero h1 {
  font-family: var(--font-ui);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -.5px;
  margin-bottom: 16px;
}
.hero-subtitle {
  font-family: var(--font-ui);
  font-size: 1.15rem;
  color: var(--text-mid);
  margin-bottom: 32px;
  font-weight: 400;
  line-height: 1.5;
}
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: .88rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59,91,219,.3);
}
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 4px 14px rgba(59,91,219,.4); text-decoration: none; transform: translateY(-1px); }
.btn-tg {
  background: #229ed9;
  color: #fff;
  box-shadow: 0 2px 8px rgba(34,158,217,.3);
}
.btn-tg:hover { background: #1a8fc4; text-decoration: none; transform: translateY(-1px); }
.btn-outline {
  background: rgba(255,255,255,.7);
  color: var(--text-mid);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); text-decoration: none; }
.btn-outline-cta {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline-cta:hover { background: var(--accent); color: #fff; text-decoration: none; }
.btn-sm {
  font-family: var(--font-ui);
  font-size: .82rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
}
.btn-sm:hover { background: var(--accent-hover); text-decoration: none; }

.hero-about {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: rgba(255,255,255,.75);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  backdrop-filter: blur(8px);
  max-width: 560px;
}
.hero-avatar {
  width: 48px; height: 48px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: .9rem;
  flex-shrink: 0;
}
.hero-about-text strong {
  font-family: var(--font-ui);
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: .5px;
  display: block;
  margin-bottom: 4px;
}
.hero-about-text p { font-size: .9rem; color: var(--text-mid); line-height: 1.5; margin: 0; }
.read-time {
  font-family: var(--font-ui);
  font-size: .82rem;
  color: var(--text-soft);
  margin-top: 14px;
}

/* --- SECTIONS --- */
.section-padded { padding: 72px 24px; }
.section-light { background: var(--bg-soft); }
.container {
  max-width: 900px;
  margin: 0 auto;
}
.section-title {
  font-family: var(--font-ui);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 36px;
  letter-spacing: -.3px;
}

/* --- WHO CARDS --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.who-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  cursor: default;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.who-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--accent);
}
.who-icon { font-size: 1.8rem; margin-bottom: 12px; }
.who-card h3 {
  font-family: var(--font-ui);
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.who-card p { font-family: var(--font-ui); font-size: .83rem; color: var(--text-mid); line-height: 1.5; }

/* --- HOW TO READ --- */
.howto-list { display: flex; flex-direction: column; gap: 14px; }
.howto-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-family: var(--font-ui);
  font-size: .9rem;
  color: var(--text-mid);
}
.howto-num {
  font-family: var(--font-ui);
  font-size: .75rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

/* --- READER LAYOUT --- */
#reader-layout {
  display: flex;
  max-width: calc(var(--sidebar-w) + var(--content-max) + 80px);
  margin: 0 auto;
  position: relative;
}

/* --- SIDEBAR --- */
#sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 28px 0 28px 24px;
  border-right: 1px solid var(--border);
  background: var(--bg);
}
#sidebar::-webkit-scrollbar { width: 4px; }
#sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.toc-header {
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 14px;
  padding-left: 12px;
}
#toc-list, #toc-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
#toc-list > li { margin-bottom: 4px; position: relative; }
#toc-list > li > ul { padding-left: 12px; margin-top: 2px; margin-bottom: 4px; }
#toc-list > li > ul > li { margin-bottom: 1px; }
.toc-link {
  display: block;
  font-family: var(--font-ui);
  font-size: .8rem;
  color: var(--text-mid);
  padding: 4px 12px;
  border-radius: 6px;
  transition: background .12s, color .12s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toc-link:hover { background: var(--bg-light); color: var(--accent); text-decoration: none; }
.toc-link.active { color: var(--accent); background: var(--accent-light); font-weight: 600; }
.toc-block { font-weight: 700; font-size: .82rem; }
.toc-progress-dot { display: none !important; }

/* --- TOC OVERLAY (mobile) --- */
#toc-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 800;
  backdrop-filter: blur(2px);
}

/* --- MAIN CONTENT --- */
#content {
  flex: 1;
  min-width: 0;
}
.content-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 48px 40px 80px;
}

/* --- GUIDE BLOCK --- */
.guide-block {
  margin-bottom: 56px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-soft);
}
.guide-block:last-of-type { border-bottom: none; }
.block-label {
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 8px;
}
.guide-block > h2 {
  font-family: var(--font-ui);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.4px;
  line-height: 1.2;
  margin-bottom: 6px;
}
.block-lead {
  font-family: var(--font-ui);
  color: var(--text-soft);
  font-size: .95rem;
  margin-bottom: 36px;
}
.guide-block h3 {
  font-family: var(--font-ui);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 32px 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.guide-block h3::after {
  content: '▾';
  font-size: .8rem;
  color: var(--text-soft);
  transition: transform .18s;
  margin-left: auto;
  flex-shrink: 0;
}
.guide-block h3.collapsed::after { transform: rotate(-90deg); }
.accordion-body { transition: opacity .2s; }
.accordion-body.hidden { display: none; }
.guide-block h4 {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 10px;
}
.guide-block p { margin-bottom: 16px; }
.guide-block ul, .guide-block ol { margin-bottom: 16px; }

/* --- CALLOUTS --- */
.callout {
  display: flex;
  gap: 14px;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 20px 0;
  border-left: 4px solid;
}
.callout-icon { font-size: 1.1rem; flex-shrink: 0; line-height: 1.6; }
.callout div { font-family: var(--font-ui); font-size: .88rem; line-height: 1.6; }
.callout div ul { margin: 8px 0 0; }
.callout-info { background: #eef2ff; border-color: var(--accent); }
.callout-warn { background: var(--warn-bg); border-color: var(--warn); }
.callout-note { background: var(--bg-soft); border-color: var(--border); }

/* --- TABLES --- */
.table-wrapper {
  overflow-x: auto;
  margin: 20px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: .85rem;
}
th {
  background: var(--bg-soft);
  text-align: left;
  padding: 11px 14px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-mid);
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-soft); }
.row-good td { background: var(--good-bg); }
.row-warn td { background: var(--warn-bg); }
.row-danger td { background: var(--danger-bg); }

/* --- FLOW TABLE (block 1) --- */
.flow-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 16px 0 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.flow-step {
  font-family: var(--font-ui);
  font-size: .88rem;
  padding: 12px 16px;
  background: var(--bg-soft);
  color: var(--text);
}
.flow-arrow {
  text-align: center;
  color: var(--accent);
  font-size: 1rem;
  padding: 2px 0;
  background: var(--bg);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

/* --- DEFINITION BLOCK --- */
.definition-block {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 16px 0 20px;
  line-height: 1.5;
  background: var(--accent-light);
}

/* --- DIRECTION CARDS (block 2) --- */
.directions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.direction-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--bg);
  position: relative;
  transition: box-shadow .15s;
}
.direction-card:hover { box-shadow: var(--card-shadow-hover); }
.direction-featured {
  border-color: var(--accent);
  background: linear-gradient(135deg, #f5f7ff, #eef1ff);
}
.direction-badge {
  position: absolute;
  top: -10px;
  left: 16px;
  font-family: var(--font-ui);
  font-size: .7rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 20px;
  padding: 2px 10px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.direction-card h5 {
  font-family: var(--font-ui);
  font-size: .92rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}
.pros-cons { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.pro-item, .con-item { font-family: var(--font-ui); font-size: .8rem; line-height: 1.4; }
.pro-item { color: #2d6a4f; }
.con-item { color: #9b2226; }
.direction-income {
  font-family: var(--font-ui);
  font-size: .85rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-top: 10px;
  text-align: center;
  line-height: 1.4;
}

/* --- LEVELS GRID (block 3) --- */
.levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.level-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
}
.level-num {
  font-family: var(--font-ui);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--accent);
  opacity: .3;
  line-height: 1;
  margin-bottom: 6px;
}
.level-card h4 { font-family: var(--font-ui); font-size: .9rem; font-weight: 700; margin-bottom: 6px; }
.level-card p { font-family: var(--font-ui); font-size: .82rem; color: var(--text-mid); line-height: 1.5; }

/* --- ERROR BLOCKS (block 3) --- */
.error-block {
  border-left: 3px solid var(--warn);
  padding: 14px 18px;
  margin: 12px 0;
  background: var(--warn-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.error-num {
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 700;
  color: var(--warn);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
}
.error-block h4 { font-family: var(--font-ui); font-size: .92rem; font-weight: 700; margin-bottom: 6px; }
.error-block p { font-family: var(--font-ui); font-size: .85rem; color: var(--text-mid); line-height: 1.5; margin: 0; }

/* --- SERVICE NOTE --- */
.service-note {
  background: linear-gradient(135deg, #f5f7ff, #eef1ff);
  border: 1.5px solid rgba(59,91,219,.2);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.service-note p {
  font-family: var(--font-ui);
  font-size: .85rem;
  color: var(--text-mid);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

/* --- SCALE GRID (block 4) --- */
.scale-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.scale-item {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: border-color .15s;
}
.scale-item:hover { border-color: var(--accent); }
.scale-label {
  font-family: var(--font-ui);
  font-size: .85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}
.scale-desc { font-family: var(--font-ui); font-size: .8rem; color: var(--text-mid); line-height: 1.5; }

/* --- TOOL CARDS (block 5) --- */
.tool-card {
  display: flex;
  gap: 18px;
  margin: 20px 0;
  padding: 20px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.tool-num {
  width: 40px; height: 40px;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}
.tool-content { flex: 1; min-width: 0; }
.tool-content h4 { font-family: var(--font-ui); font-size: .95rem; font-weight: 700; margin-bottom: 8px; }
.tool-content p { font-family: var(--font-ui); font-size: .85rem; color: var(--text-mid); line-height: 1.6; margin-bottom: 10px; }
.tool-content ul { font-family: var(--font-ui); font-size: .85rem; color: var(--text-mid); }

/* --- PERSONA CARDS (block 8) --- */
.persona-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0;
  background: var(--bg);
}
.persona-type {
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 6px;
}
.persona-card h4 { font-family: var(--font-ui); font-size: .95rem; font-weight: 700; margin-bottom: 10px; }
.persona-card p { font-family: var(--font-ui); font-size: .85rem; color: var(--text-mid); line-height: 1.6; }

/* --- FIT GRID (block 8) --- */
.fit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
}
.fit-card {
  border-radius: var(--radius-sm);
  padding: 18px;
}
.fit-card h4 { font-family: var(--font-ui); font-size: .88rem; font-weight: 700; margin-bottom: 10px; }
.fit-card ul { font-family: var(--font-ui); font-size: .82rem; line-height: 1.6; }
.fit-yes { background: var(--good-bg); border: 1px solid var(--good-border); }
.fit-no { background: var(--danger-bg); border: 1px solid var(--danger-border); }

/* --- PROS LIST (block 8) --- */
.pros-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
}
.pro-full {
  font-family: var(--font-ui);
  font-size: .9rem;
  color: #2d6a4f;
  background: var(--good-bg);
  border: 1px solid var(--good-border);
  border-radius: 8px;
  padding: 10px 14px;
}

/* --- FIGURES --- */
.content-figure {
  margin: 28px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.content-figure img {
  width: 100%;
  display: block;
  transition: opacity .3s;
}
.content-figure figcaption {
  font-family: var(--font-ui);
  font-size: .78rem;
  color: var(--text-soft);
  text-align: center;
  padding: 8px 16px 10px;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
}
.fade-in-img { opacity: 0; transform: translateY(16px); transition: opacity .5s, transform .5s; }
.fade-in-img.in-view { opacity: 1; transform: none; }

/* --- MICRO CTA --- */
.block-micro-cta {
  margin-top: 24px;
  font-family: var(--font-ui);
  font-size: .8rem;
  color: var(--text-soft);
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}
.block-micro-cta a { color: var(--accent); font-weight: 600; }

/* --- CTA BLOCKS --- */
.cta-block {
  margin: 48px -40px;
  padding: 0;
  position: relative;
}
.cta-inner {
  background: linear-gradient(135deg, #3b5bdb 0%, #4c6ef5 100%);
  padding: 48px 48px;
  text-align: center;
}
.cta-text {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  color: rgba(255,255,255,.9);
  margin-bottom: 24px;
  line-height: 1.5;
}
.cta-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 16px;
}
.cta-buttons .btn-primary {
  background: #fff;
  color: var(--accent);
}
.cta-buttons .btn-primary:hover { background: #f0f4ff; }
.cta-buttons .btn-outline-cta {
  border-color: rgba(255,255,255,.5);
  color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.1);
}
.cta-buttons .btn-outline-cta:hover { background: rgba(255,255,255,.2); color: #fff; }
.cta-sub {
  font-family: var(--font-ui);
  font-size: .82rem;
  color: rgba(255,255,255,.6);
  margin: 0;
}
.cta-final .cta-inner { border-radius: var(--radius); margin: 0 -8px; }
.cta-final h3 {
  font-family: var(--font-ui);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

/* --- CONTACTS --- */
.contacts-section {
  padding: 48px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 24px;
}
.contacts-section h2 {
  font-family: var(--font-ui);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 24px;
}
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.contact-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color .15s, box-shadow .15s;
  text-decoration: none;
}
.contact-card:hover { border-color: var(--accent); box-shadow: var(--card-shadow-hover); text-decoration: none; }
.contact-icon { font-size: 1.6rem; margin-bottom: 8px; }
.contact-label {
  font-family: var(--font-ui);
  font-size: .72rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 600;
  margin-bottom: 4px;
}
.contact-handle {
  font-family: var(--font-ui);
  font-size: .88rem;
  font-weight: 700;
  color: var(--accent);
}

/* --- CONCLUSION --- */
.conclusion-sign {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  color: var(--text);
  margin-top: 24px;
}

/* --- BACK TO TOP --- */
#back-to-top {
  position: fixed;
  bottom: 80px;
  right: 24px;
  width: 44px; height: 44px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(59,91,219,.4);
  transition: background .15s, transform .15s;
  z-index: 700;
}
#back-to-top:hover { background: var(--accent-hover); transform: translateY(-2px); }

/* --- TOAST --- */
#continue-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--text);
  color: #fff;
  border-radius: 12px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-ui);
  font-size: .85rem;
  z-index: 950;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  transition: transform .3s cubic-bezier(.175,.885,.32,1.275);
  white-space: nowrap;
}
#continue-toast.show { transform: translateX(-50%) translateY(0); }
#continue-toast button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: .82rem;
  color: rgba(255,255,255,.7);
  padding: 0;
}
#continue-yes {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 5px 12px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
}
#continue-yes:hover { background: var(--accent-hover) !important; }

/* --- MOBILE STICKY CTA --- */
#mobile-cta {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  z-index: 800;
  align-items: center;
  gap: 10px;
  box-shadow: 0 -4px 16px rgba(0,0,0,.08);
}
.mobile-cta-btn {
  flex: 1;
  display: block;
  text-align: center;
  background: #229ed9;
  color: #fff;
  padding: 12px;
  border-radius: 10px;
  font-family: var(--font-ui);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
}
.mobile-cta-btn:hover { text-decoration: none; }
#mobile-cta-close {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: .9rem;
  color: var(--text-soft);
  flex-shrink: 0;
}

/* --- ANIMATE-IN (entrance animations) --- */
.animate-in {
  opacity: 0;
  transform: translateY(22px);
  animation: fadeSlideIn .65s cubic-bezier(.2,.8,.4,1) both;
  animation-delay: var(--delay, 0s);
}
@keyframes fadeSlideIn {
  to { opacity: 1; transform: none; }
}

/* --- HERO STATS STRIP --- */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 36px 0 28px;
}
.stat-card {
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(59,91,219,.15);
  border-radius: var(--radius);
  padding: 18px 16px;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: transform .2s, box-shadow .2s;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(59,91,219,.14);
}
.stat-num {
  font-family: var(--font-ui);
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  display: inline;
}
.stat-suffix {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  display: inline;
}
.stat-icon {
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-text {
  font-family: var(--font-ui);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1.1;
}
.stat-label {
  font-family: var(--font-ui);
  font-size: .72rem;
  color: var(--text-mid);
  line-height: 1.4;
  margin-top: 6px;
}

/* --- AUTHOR QUOTE BLOCK --- */
.hero-author {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(255,255,255,.8);
  border: 1px solid rgba(59,91,219,.18);
  border-radius: var(--radius);
  padding: 20px 24px;
  backdrop-filter: blur(10px);
  max-width: 640px;
}
.author-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  flex-shrink: 0;
  border: 2px solid var(--accent);
}
.author-quote {
  flex: 1;
  border: none;
  padding: 0;
  margin: 0;
}
.author-quote p {
  font-family: var(--font-ui);
  font-size: .9rem;
  color: var(--text);
  line-height: 1.55;
  font-style: italic;
  margin-bottom: 6px;
}
.author-quote cite {
  font-family: var(--font-ui);
  font-size: .75rem;
  color: var(--text-soft);
  font-style: normal;
  font-weight: 600;
}

/* --- FLOW TABLE (arrows DOWN) --- */
.flow-arrow {
  text-align: center;
  color: var(--accent);
  font-size: 1.3rem;
  padding: 4px 0;
  background: var(--bg);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  line-height: 1;
}

/* --- DIRECTION CARDS MOBILE FIX --- */
@media (max-width: 600px) {
  .directions-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .direction-card {
    display: flex;
    flex-direction: column;
    padding: 16px;
  }
  .direction-card h5 {
    font-size: 1rem;
    margin-bottom: 10px;
  }
  .pros-cons {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 12px;
  }
  .pro-item, .con-item {
    font-size: .82rem;
    line-height: 1.4;
  }
  .direction-income {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-top: auto;
    font-size: .88rem;
    padding: 10px 12px;
    border-radius: 8px;
  }
}

/* Hero stats responsive */
@media (max-width: 760px) {
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .stat-num { font-size: 1.5rem; }
  .stat-text { font-size: 1.4rem; }
  .hero-author {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    padding: 16px;
  }
  .author-photo { width: 72px; height: 72px; }
}

/* --- SEARCH HIGHLIGHT --- */
mark {
  background: #fef08a;
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  #sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    z-index: 850;
    transform: translateX(-110%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    box-shadow: 4px 0 24px rgba(0,0,0,.15);
    padding-top: calc(var(--header-h) + 16px);
    border-right: 1px solid var(--border);
    background: #fff;
  }
  #sidebar.open {
    transform: translateX(0);
  }
  #toc-overlay {
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s;
  }
  #toc-overlay.show {
    opacity: 1;
    pointer-events: auto;
  }
  .toc-toggle-btn { display: flex; }
  #reader-layout { display: block; }
  .content-inner { padding: 32px 20px 80px; }
  .cta-block { margin: 0 -20px; }
  .cta-inner { padding: 36px 24px; }
  #mobile-cta { display: flex; }
  #back-to-top { bottom: 130px; }
  .fit-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  #hero { padding: 72px 16px 60px; }
  #hero h1 { font-size: 1.8rem; }
  .hero-buttons { gap: 8px; }
  .btn { padding: 9px 16px; font-size: .83rem; }
  .section-padded { padding: 48px 16px; }
  .guide-block > h2 { font-size: 1.6rem; }
  .directions-grid { grid-template-columns: 1fr; }
  .tool-card { flex-direction: column; }
  .header-search { display: none; }
  #continue-toast { left: 16px; right: 16px; transform: translateX(0) translateY(120%); white-space: normal; }
  #continue-toast.show { transform: translateX(0) translateY(0); }
}

/* --- DIRECTION INCOME SPANS --- */
.direction-income {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.inc-range {
  display: block;
  font-size: .95rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.3px;
  line-height: 1.2;
  white-space: nowrap;
}
.inc-unit {
  display: block;
  font-size: .72rem;
  font-weight: 500;
  color: rgba(255,255,255,.85);
  line-height: 1.2;
}

@media (max-width: 600px) {
  .inc-range {
    font-size: .88rem;
    white-space: normal;
    text-align: center;
  }
  .inc-unit {
    font-size: .7rem;
  }
}

/* --- FLOATING EMOJIS (hero — 2 side icons only) --- */
.hero-floats {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.float-emoji {
  position: absolute;
  top: 30%;
  font-size: 2rem;
  line-height: 1;
  animation: emojiFloat var(--dur, 3.2s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  opacity: .55;
  user-select: none;
  filter: drop-shadow(0 3px 8px rgba(59,91,219,.2));
}
.float-left  { left: 2%; }
.float-right { right: 2%; }
@keyframes emojiFloat {
  0%, 100% { transform: translateY(0) rotate(-4deg) scale(1); }
  50%       { transform: translateY(-22px) rotate(4deg) scale(1.08); }
}

@media (max-width: 760px) {
  .float-emoji { font-size: 1.4rem; opacity: .35; top: 20%; }
}
@media (max-width: 480px) {
  .float-emoji { display: none; }
}

/* --- TG INLINE CTA --- */
.tg-inline-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #e8f4fb, #d6ecf9);
  border: 1.5px solid #a8d8f0;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 20px 0;
}
.tg-inline-cta span {
  font-family: var(--font-ui);
  font-size: .88rem;
  color: var(--text-mid);
  line-height: 1.5;
  flex: 1;
  min-width: 180px;
}
.btn-tg-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #229ed9;
  color: #fff;
  font-family: var(--font-ui);
  font-size: .83rem;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, transform .15s;
  flex-shrink: 0;
}
.btn-tg-inline:hover {
  background: #1a8fc4;
  transform: translateY(-1px);
  text-decoration: none;
}

@media (max-width: 480px) {
  .tg-inline-cta { flex-direction: column; align-items: flex-start; }
  .btn-tg-inline { width: 100%; justify-content: center; }
}

/* --- CONSULTATION BLOCK --- */
.consult-block {
  background: linear-gradient(135deg, #f8f9ff 0%, #eef1ff 100%);
  border: 2px solid rgba(59,91,219,.15);
  border-radius: var(--radius);
  padding: 36px 40px;
  margin: 0 -8px 56px;
}
.consult-benefits {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0 24px;
}
.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-family: var(--font-ui);
  font-size: .9rem;
  color: var(--text-mid);
  line-height: 1.5;
}
.benefit-icon { font-size: 1.3rem; flex-shrink: 0; line-height: 1.4; }
.consult-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  background: var(--accent);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin-top: 8px;
}
.consult-cta p {
  font-family: var(--font-ui);
  font-size: .95rem;
  color: rgba(255,255,255,.9);
  margin: 0;
  flex: 1;
}
.btn-consult {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: .9rem;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, transform .15s;
  flex-shrink: 0;
}
.btn-consult:hover {
  background: #f0f4ff;
  transform: translateY(-1px);
  text-decoration: none;
}

@media (max-width: 600px) {
  .consult-block { padding: 24px 16px; margin: 0 0 48px; }
  .consult-cards { grid-template-columns: 1fr; }
  .consult-cta { flex-direction: column; text-align: center; }
  .btn-consult { width: 100%; justify-content: center; }
}
