/* Cabe — сайт в стиле приложения: кремовый фон с шумом, толстые чёрные рамки, цветные карточки, шрифт Room. */

@font-face {
  font-family: "Room";
  src: url("/assets/fonts/room.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #faf4e8;
  --bg-deep: #f2e6d2;
  --paper: #ffffff;
  --ink: #111111;
  --ink-soft: #3a3631;
  --muted: #6b645a;
  --line: #111111;
  --yellow-1: #ffe873;
  --yellow-2: #ffc400;
  --blue-soft: rgba(206, 228, 255, 0.55);
  --beige-soft: rgba(242, 222, 198, 0.6);
  --radius: 16px;
  --radius-sm: 12px;
  --border: 4px;
  --border-bottom: 8px;
  --display: "Room", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --container: 1160px;
  --gutter: 16px;

  --c-reaction-1: #ff6f60; --c-reaction-2: #c62121; --c-reaction-b: #7f1314;
  --c-attention-1: #5bb0ff; --c-attention-2: #1565c0; --c-attention-b: #0c3c72;
  --c-memory-1: #3d3d3d; --c-memory-2: #080808; --c-memory-b: #000000;
  --c-math-1: #ffe873; --c-math-2: #ffc400; --c-math-b: #a88300;
  --c-english-1: #ffb04a; --c-english-2: #ef6c00; --c-english-b: #9c4a00;
  --c-meditation-1: #54c77e; --c-meditation-2: #1b7d43; --c-meditation-b: #0e5128;
  --c-productivity-1: #a64bc9; --c-productivity-2: #5e1378; --c-productivity-b: #3c0a55;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--body);
  overflow-x: hidden;
  position: relative;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Мелкое зерно поверх фона, как NoiseBackground в приложении */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("/assets/img/noise.png") repeat;
  opacity: 0.09;
  pointer-events: none;
  z-index: 0;
}

.bg-shapes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.blob { position: absolute; border-radius: 50%; }
.blob-a { width: 520px; height: 520px; top: -180px; right: -160px; background: var(--beige-soft); transform: rotate(15deg); }
.blob-b { width: 480px; height: 480px; top: 900px; left: -220px; background: var(--blue-soft); }

main, header, footer { position: relative; z-index: 1; }

img, svg { max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 24px; } }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* ---------- Типографика ---------- */
h1, h2, h3, h4, .display {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(32px, 6vw, 58px); }
h2 { font-size: clamp(26px, 4vw, 40px); }
h3 { font-size: clamp(20px, 2.4vw, 25px); }
h4 { font-size: 19px; }

.eyebrow { font-family: var(--display); font-size: 15px; letter-spacing: 0.04em; margin: 0 0 12px; display: inline-block; }
.lead { font-size: clamp(18px, 2vw, 21px); line-height: 1.6; color: var(--ink-soft); }
.muted { color: var(--muted); }
.center { text-align: center; }
.section-head { max-width: 760px; margin: 0 auto 36px; text-align: center; }
.section-head p { color: var(--ink-soft); font-size: 18px; }

.section { padding: 56px 0; }
@media (min-width: 900px) { .section { padding: 84px 0; } }
.section-tight { padding: 32px 0; }

/* ---------- Плашки и кнопки ---------- */
.plate {
  background: var(--paper);
  border: var(--border) solid var(--line);
  border-bottom-width: var(--border-bottom);
  border-radius: var(--radius);
}
.plate-pad { padding: 22px; }
@media (min-width: 720px) { .plate-pad { padding: 30px; } }

.btn {
  --btn-1: var(--yellow-1);
  --btn-2: var(--yellow-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 10px 22px;
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.1;
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(180deg, var(--btn-1), var(--btn-2));
  border: var(--border) solid var(--line);
  border-bottom-width: var(--border-bottom);
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.08s ease, border-bottom-width 0.08s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.03); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn:active { transform: translateY(3px); border-bottom-width: 5px; }
.btn:focus-visible, .plate a:focus-visible, .cat-card:focus-visible { outline: 3px solid #1565c0; outline-offset: 3px; }
.btn-white { --btn-1: #ffffff; --btn-2: #d1e6ff; }
.btn-dark { --btn-1: #2b2b2b; --btn-2: #000000; color: #fff; }
.btn-sm { min-height: 44px; padding: 6px 16px; font-size: 15px; border-bottom-width: 6px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Кнопки магазинов */
.store-row { display: flex; flex-wrap: wrap; gap: 12px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 8px 20px 8px 16px;
  background: linear-gradient(180deg, #2b2b2b, #000);
  color: #fff; text-decoration: none;
  border: var(--border) solid var(--line); border-bottom-width: var(--border-bottom); border-radius: 14px;
  transition: transform 0.08s ease, border-bottom-width 0.08s ease;
}
.store-btn:active { transform: translateY(3px); border-bottom-width: 5px; }
.store-btn svg { width: 28px; height: 28px; flex: 0 0 auto; fill: #fff; }
.store-btn small { display: block; font-size: 12px; opacity: 0.8; line-height: 1.2; }
.store-btn strong { display: block; font-family: var(--display); font-weight: 400; font-size: 19px; line-height: 1.15; }

/* Чёрный «пузырь» с хвостиком, как цитата дня в приложении */
.bubble {
  position: relative;
  display: block;
  background: #000;
  color: #fff;
  border-radius: 20px;
  padding: 18px 24px;
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.35;
  margin-bottom: 26px;
}
.bubble::after {
  content: "";
  position: absolute;
  left: 46px;
  bottom: -16px;
  border-width: 18px 16px 0 16px;
  border-style: solid;
  border-color: #000 transparent transparent transparent;
}

/* ---------- Шапка ---------- */
.site-header { padding: 14px 0; position: sticky; top: 0; z-index: 50; background: rgba(250, 244, 232, 0.92); backdrop-filter: saturate(1.2) blur(8px); -webkit-backdrop-filter: saturate(1.2) blur(8px); border-bottom: 3px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--ink); }
.header-row { display: flex; align-items: center; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: 0 0 auto; }
.logo-img { width: 44px; height: 44px; border-radius: 11px; border: 3px solid var(--ink); display: block; }
.logo-word { font-family: var(--display); font-size: 30px; line-height: 1; letter-spacing: 0.02em; }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.main-nav a {
  display: block; padding: 8px 12px; border-radius: 10px; text-decoration: none;
  font-family: var(--display); font-size: 15px; color: var(--ink);
}
.main-nav a:hover, .main-nav a[aria-current="page"] { background: #fff; box-shadow: inset 0 0 0 3px var(--ink); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-link {
  font-family: var(--display); font-size: 14px; text-decoration: none;
  border: 3px solid var(--ink); border-radius: 10px; padding: 6px 10px; background: #fff; line-height: 1;
}
.menu-toggle { display: none; }

@media (max-width: 1020px) {
  .main-nav { position: fixed; inset: 74px 12px auto 12px; display: none; z-index: 60; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; background: #fff; border: 4px solid var(--ink); border-bottom-width: 8px; border-radius: 16px; padding: 10px; }
  .main-nav a { font-size: 18px; padding: 12px 14px; }
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; margin-left: auto;
    background: #fff; border: 3px solid var(--ink); border-bottom-width: 6px; border-radius: 12px; cursor: pointer; padding: 0;
  }
  .menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { display: block; width: 20px; height: 3px; background: var(--ink); border-radius: 2px; position: relative; }
  .menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
  .menu-toggle span::before { top: -7px; }
  .menu-toggle span::after { top: 7px; }
  .header-actions .btn-download { display: none; }
}
@media (max-width: 420px) { .logo-word { font-size: 26px; } .logo-img { width: 40px; height: 40px; } }

/* ---------- Хлебные крошки ---------- */
.crumbs { font-family: var(--display); font-size: 14px; margin: 18px 0 0; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--muted); }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current] { color: var(--muted); }

/* ---------- Главный экран ---------- */
.hero { padding: 28px 0 40px; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .hero { padding: 48px 0 70px; } .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 48px; } }
.wordmark { font-family: var(--display); font-size: clamp(64px, 12vw, 128px); line-height: 0.9; margin: 0 0 10px; letter-spacing: 0.01em; }
.hero h1 { font-size: clamp(24px, 3.4vw, 36px); margin-bottom: 18px; }
.hero .lead { margin-bottom: 26px; }
.hero-phone { position: relative; display: flex; justify-content: center; }
.hero-phone img { width: min(340px, 78vw); height: auto; transform: rotate(2.5deg); filter: drop-shadow(10px 14px 0 rgba(17, 17, 17, 0.18)); }
.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 28px; }
@media (min-width: 560px) { .hero-stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: #fff; border: 3px solid var(--ink); border-bottom-width: 6px; border-radius: 14px; padding: 10px 12px; }
.stat b { display: block; font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.05; }
.stat span { font-size: 13px; color: var(--ink-soft); line-height: 1.3; display: block; }

/* Заголовок внутренних страниц */
.page-hero { padding: 18px 0 36px; }
.page-hero h1 { max-width: 900px; }
.page-hero .lead { max-width: 820px; }
.page-hero-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .page-hero-grid { grid-template-columns: 1.4fr 0.6fr; } }

/* ---------- Карточки категорий (как на главной приложения) ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.cat-grid .cat-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .cat-grid .cat-card:last-child:nth-child(odd) { grid-column: span 2; }
}
.cat-card {
  --c1: #fff; --c2: #eee; --cb: #111; --ct: #fff; --cs: #fff; --pat: rgba(255, 255, 255, 0.1);
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 150px;
  padding: 18px 18px 16px;
  color: var(--ct);
  text-decoration: none;
  background: linear-gradient(160deg, var(--c1), var(--c2));
  border: var(--border) solid var(--cb);
  border-bottom-width: var(--border-bottom);
  border-radius: 18px;
  overflow: hidden;
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.12s ease;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18);
  isolation: isolate;
}
.cat-card::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--pat) 1px, transparent 1px), linear-gradient(90deg, var(--pat) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: 9px 9px;
}
.cat-card:hover { transform: rotate(0deg) translateY(-2px); }
.cat-card:active { transform: translateY(2px); }
.cat-card .cat-icon { position: absolute; top: 12px; right: 12px; width: 50px; height: 50px; opacity: 0.38; }
.cat-card .cat-icon svg { width: 100%; height: 100%; }
.cat-card .cat-name { font-family: var(--display); font-size: clamp(19px, 2.2vw, 25px); line-height: 1.08; margin: 4px 52px 18px 0; overflow-wrap: normal; word-break: normal; hyphens: manual; }
.cat-card .cat-sub { font-family: var(--display); font-size: 14px; line-height: 1.3; color: var(--cs); }
.cat-card .cat-count { position: absolute; right: 14px; bottom: 12px; font-family: var(--display); font-size: 13px; opacity: 0.85; }
.cat-card.has-count .cat-sub { padding-right: 64px; }
@media (max-width: 600px) {
  .cat-card { min-height: 132px; padding: 14px; }
  .cat-card .cat-icon { width: 38px; height: 38px; top: 10px; right: 10px; }
  .cat-card .cat-name { font-size: 18px; margin-right: 0; }
  .cat-card .cat-sub { font-size: 12.5px; }
  .cat-card.has-count .cat-sub { padding-right: 0; }
  .cat-card .cat-count { position: static; display: block; margin-top: 6px; font-size: 12px; }
  .hero-phone img { width: min(300px, 64vw); }
}

.cat-reaction { --c1: var(--c-reaction-1); --c2: var(--c-reaction-2); --cb: var(--c-reaction-b); --ct: #fff; --cs: #ffe3e0; --tilt: -1deg; }
.cat-attention { --c1: var(--c-attention-1); --c2: var(--c-attention-2); --cb: var(--c-attention-b); --ct: #fff; --cs: #e2f0ff; --tilt: 1deg; }
.cat-memory { --c1: var(--c-memory-1); --c2: var(--c-memory-2); --cb: var(--c-memory-b); --ct: #ffd60a; --cs: #f5d54a; --tilt: 0.6deg; }
.cat-math { --c1: var(--c-math-1); --c2: var(--c-math-2); --cb: var(--c-math-b); --ct: #111; --cs: #2e2400; --pat: rgba(0, 0, 0, 0.1); --tilt: -0.6deg; }
.cat-english { --c1: var(--c-english-1); --c2: var(--c-english-2); --cb: var(--c-english-b); --ct: #111; --cs: #2a1a00; --tilt: -0.8deg; }
.cat-meditation { --c1: var(--c-meditation-1); --c2: var(--c-meditation-2); --cb: var(--c-meditation-b); --ct: #fff; --cs: #e2ffe9; --tilt: 0.8deg; }
.cat-productivity { --c1: var(--c-productivity-1); --c2: var(--c-productivity-2); --cb: var(--c-productivity-b); --ct: #fff; --cs: #f1e2ff; --tilt: 0deg; }
.cat-productivity::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M10 0 20 20H0Z' fill='none' stroke='rgba(255,255,255,0.13)' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 20px 20px;
}

/* Цветная плашка-заголовок страницы категории */
.cat-banner { min-height: 0; padding: 26px; transform: none; }
.cat-banner:hover { transform: none; }
.cat-banner h1 { color: var(--ct); margin: 0 70px 10px 0; }
.cat-banner p { color: var(--cs); font-family: var(--display); font-size: 17px; margin: 0; }
.cat-banner .cat-icon { width: 72px; height: 72px; top: 18px; right: 18px; }
@media (min-width: 720px) { .cat-banner { padding: 36px 40px; } }

/* ---------- Карточки игр ---------- */
.game-grid { display: grid; gap: 16px; }
@media (min-width: 680px) { .game-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .game-grid.three { grid-template-columns: repeat(3, 1fr); } }
.game-card { position: relative; display: flex; flex-direction: column; padding: 20px 20px 18px; scroll-margin-top: 96px; }
.game-card h3 { font-size: 22px; margin: 0 0 8px; padding-right: 8px; }
.game-card h3 a { text-decoration: none; }
.game-card h3 a:hover { text-decoration: underline; }
.game-card .chip-row { margin-bottom: 10px; }
.game-card p { font-size: 16px; line-height: 1.6; color: var(--ink-soft); }
.game-card .game-trains { color: var(--ink); }
.game-card .more { margin-top: auto; font-family: var(--display); font-size: 15px; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.game-card .more:hover { text-decoration: underline; }
.game-card .dot { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--ink); vertical-align: -1px; margin-right: 8px; }
.game-card:target { box-shadow: 0 0 0 4px var(--yellow-2); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; font-family: var(--display); font-size: 12.5px; line-height: 1; padding: 6px 9px; border: 2px solid var(--ink); border-radius: 999px; background: var(--bg); white-space: nowrap; }
.chip-free { background: #d8f5e0; }
.chip-online { background: var(--yellow-1); }

.dot-reaction { background: var(--c-reaction-2); }
.dot-attention { background: var(--c-attention-2); }
.dot-memory { background: var(--c-memory-2); }
.dot-math { background: var(--c-math-2); }
.dot-english { background: var(--c-english-2); }
.dot-meditation { background: var(--c-meditation-2); }
.dot-productivity { background: var(--c-productivity-2); }

/* Компактный список игр (каталог) */
.game-list { list-style: none; margin: 0; padding: 0; columns: 1; column-gap: 28px; }
@media (min-width: 640px) { .game-list { columns: 2; } }
@media (min-width: 1000px) { .game-list { columns: 3; } }
.game-list li { break-inside: avoid; padding: 7px 0; border-bottom: 2px dashed rgba(17, 17, 17, 0.15); }
.game-list a { text-decoration: none; font-weight: 600; }
.game-list a:hover { text-decoration: underline; }
.game-list small { display: block; color: var(--muted); font-size: 14px; line-height: 1.45; }

/* ---------- Сетки и прочие блоки ---------- */
.grid-2, .grid-3, .grid-4 { display: grid; gap: 16px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); gap: 20px; } .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 20px; } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.feature { padding: 22px; }
.feature h3 { font-size: 21px; margin-bottom: 8px; }
.feature p { font-size: 16px; color: var(--ink-soft); margin: 0; }
.feature .f-icon { width: 54px; height: 54px; border-radius: 14px; border: 3px solid var(--ink); display: grid; place-items: center; margin-bottom: 14px; }
.feature .f-icon svg { width: 30px; height: 30px; }

.steps { counter-reset: step; display: grid; gap: 16px; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { padding: 22px; position: relative; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 14px;
  font-family: var(--display); font-size: 22px; color: var(--ink);
  background: linear-gradient(180deg, var(--yellow-1), var(--yellow-2)); border: 3px solid var(--ink); border-radius: 12px;
}
.step h3 { font-size: 20px; }
.step p { font-size: 16px; color: var(--ink-soft); margin: 0; }

.tool-card { display: flex; flex-direction: column; text-decoration: none; padding: 22px; transition: transform .1s; }
.tool-card:hover { transform: translateY(-3px); }
.tool-card h3 { font-size: 21px; margin-bottom: 6px; }
.tool-card p { font-size: 15.5px; color: var(--ink-soft); margin: 0 0 14px; }
.tool-card .go { margin-top: auto; font-family: var(--display); font-size: 15px; }
.tool-card .tool-emoji { font-size: 34px; line-height: 1; margin-bottom: 12px; }

.article-card { display: flex; flex-direction: column; text-decoration: none; overflow: hidden; transition: transform .1s; }
.article-card:hover { transform: translateY(-3px); }
.article-card .ac-top { height: 10px; border-bottom: 4px solid var(--ink); }
.article-card .ac-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.article-card h3 { font-size: 21px; margin-bottom: 8px; }
.article-card p { font-size: 15.5px; color: var(--ink-soft); margin: 0 0 12px; }
.article-card .meta { margin-top: auto; font-size: 13.5px; color: var(--muted); }

.callout { padding: 20px 22px; border-radius: var(--radius); border: 4px solid var(--ink); border-bottom-width: 8px; background: #fff7d1; margin: 28px 0; }
.callout.blue { background: #e6f2ff; }
.callout.green { background: #e2f7e8; }
.callout.red { background: #ffe9e6; }
.callout > :last-child { margin-bottom: 0; }
.callout strong:first-child { font-family: var(--display); font-weight: 400; font-size: 18px; display: block; margin-bottom: 6px; }

.cta-band {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(170deg, var(--yellow-1), #ffb300);
  border: var(--border) solid var(--line); border-bottom-width: var(--border-bottom); border-radius: 22px;
  padding: 30px 22px;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(0,0,0,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,.07) 1px, transparent 1px);
  background-size: 20px 20px;
}
.cta-band h2 { margin-bottom: 10px; }
.cta-band p { font-size: 18px; max-width: 640px; }
.cta-grid { display: grid; gap: 22px; align-items: center; }
@media (min-width: 900px) { .cta-band { padding: 44px 48px; } .cta-grid { grid-template-columns: 1.4fr auto; } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; max-width: 880px; margin: 0 auto; }
.faq details { background: #fff; border: 4px solid var(--ink); border-bottom-width: 8px; border-radius: 16px; }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 54px 18px 20px; position: relative;
  font-family: var(--display); font-size: 18px; line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border: 3px solid var(--ink); border-radius: 8px; display: grid; place-items: center;
  font-family: var(--body); font-weight: 800; font-size: 18px; line-height: 1; background: var(--yellow-1);
}
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 20px 18px; color: var(--ink-soft); }
.faq .answer > :last-child { margin-bottom: 0; }

/* ---------- Статьи ---------- */
.article-layout { display: grid; gap: 32px; }
@media (min-width: 1020px) { .article-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; } }
.prose { max-width: 780px; font-size: 18px; line-height: 1.72; }
.prose h2 { font-size: clamp(25px, 3vw, 33px); margin: 1.6em 0 0.6em; scroll-margin-top: 96px; }
.prose h3 { font-size: clamp(20px, 2.2vw, 24px); margin: 1.4em 0 0.5em; scroll-margin-top: 96px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { font-weight: 700; }
.prose a { text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 6px solid var(--ink); font-size: 19px; color: var(--ink-soft); }
.prose hr { border: 0; border-top: 3px dashed rgba(17,17,17,.25); margin: 2em 0; }
.prose figure { margin: 1.5em 0; }
.prose .table-wrap { overflow-x: auto; margin: 1.4em 0; border: 4px solid var(--ink); border-bottom-width: 8px; border-radius: 14px; background: #fff; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.45; }
.prose th, .prose td { padding: 10px 14px; text-align: left; border-bottom: 2px solid rgba(17,17,17,.12); vertical-align: top; }
.prose th { font-family: var(--display); font-weight: 400; background: var(--bg); border-bottom: 3px solid var(--ink); }
.prose tr:last-child td { border-bottom: 0; }
.prose .sources { font-size: 15px; color: var(--muted); }
.prose .sources li { margin-bottom: 0.3em; }

.toc { padding: 20px 22px; position: sticky; top: 96px; }
.toc h2 { font-size: 18px; margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 1.2em; font-size: 15px; line-height: 1.45; }
.toc li { margin-bottom: 8px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.aside-stack { display: grid; gap: 16px; align-content: start; }
@media (max-width: 1019px) { .toc { position: static; } }

.byline { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14.5px; color: var(--muted); margin: -6px 0 24px; }

/* ---------- Онлайн-тренажёры ---------- */
.tool { padding: 18px; scroll-margin-top: 90px; }
@media (min-width: 720px) { .tool { padding: 26px; } }
.tool-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.tool-head h2 { font-size: 24px; margin: 0; }
.tool-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.seg { display: inline-flex; border: 3px solid var(--ink); border-radius: 12px; overflow: hidden; background: #fff; }
.seg button { font: inherit; font-family: var(--display); font-size: 14px; padding: 8px 12px; background: none; border: 0; cursor: pointer; color: var(--ink); }
.seg button + button { border-left: 3px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--yellow-1); }
.tool-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.tool-stats .stat b { font-size: 24px; }
.tool-note { font-size: 14.5px; color: var(--muted); margin: 12px 0 0; }

.rt-area {
  display: grid; place-items: center; text-align: center;
  min-height: 300px; padding: 24px; border-radius: 14px; border: 4px solid var(--ink);
  cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation;
  background: linear-gradient(160deg, #5bb0ff, #1565c0); color: #fff;
  transition: background-color .05s;
}
.rt-area.wait { background: linear-gradient(160deg, #ff6f60, #c62121); }
.rt-area.go { background: linear-gradient(160deg, #54c77e, #1b7d43); }
.rt-area.early { background: linear-gradient(160deg, #ffe873, #ffc400); color: #111; }
.rt-area .big { font-family: var(--display); font-size: clamp(30px, 6vw, 52px); line-height: 1.05; }
.rt-area .small { font-size: 16px; opacity: .92; margin-top: 10px; }

.schulte-grid { display: grid; gap: 6px; aspect-ratio: 1; max-width: 440px; margin: 0 auto; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.schulte-grid button {
  font-family: var(--display); font-size: clamp(18px, 4.2vw, 30px); color: var(--ink);
  background: #fff; border: 3px solid var(--ink); border-radius: 10px; cursor: pointer; padding: 0; min-width: 0;
}
.schulte-grid button.done { background: #d8f5e0; color: #6b8f74; }
.schulte-grid button.miss { background: #ffd9d4; }
.schulte-grid.idle button { color: transparent; }
.schulte-status { text-align: center; font-family: var(--display); font-size: 18px; margin: 12px 0 0; min-height: 1.4em; }

.stroop-stage { text-align: center; padding: 26px 12px; border: 4px solid var(--ink); border-radius: 14px; background: #fff; }
.stroop-word { font-family: var(--display); font-size: clamp(44px, 10vw, 84px); line-height: 1; min-height: 1.1em; margin: 6px 0 22px; }
.stroop-buttons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; max-width: 520px; margin: 0 auto; }
@media (min-width: 560px) { .stroop-buttons { grid-template-columns: repeat(4, 1fr); } }
.stroop-buttons button { font-family: var(--display); font-size: 17px; min-height: 52px; border: 3px solid var(--ink); border-bottom-width: 6px; border-radius: 12px; cursor: pointer; color: #fff; }
.stroop-buttons button:active { transform: translateY(2px); border-bottom-width: 3px; }
.stroop-msg { font-family: var(--display); font-size: 17px; margin-top: 16px; min-height: 1.4em; }

.chimp-board { position: relative; display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; padding: 10px; border: 4px solid var(--ink); border-radius: 14px; background: linear-gradient(160deg, #3d3d3d, #080808); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.chimp-board .cell { aspect-ratio: 1; border-radius: 9px; border: 0; padding: 0; background: transparent; cursor: default; font-family: var(--display); font-size: clamp(16px, 3.6vw, 26px); color: #111; }
.chimp-board .cell.num { background: #fff; border: 3px solid #ffd60a; cursor: pointer; }
.chimp-board .cell.hidden { background: #ffd60a; color: transparent; }
.chimp-overlay { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; color: #fff; background: rgba(8, 8, 8, 0.84); border-radius: 10px; }
.chimp-overlay[hidden] { display: none; }
.chimp-overlay .big { font-family: var(--display); font-size: clamp(26px, 5vw, 40px); color: #ffd60a; line-height: 1.1; margin-bottom: 8px; }
.chimp-overlay p { margin: 0 0 16px; }
@media (max-width: 520px) { .chimp-board { grid-template-columns: repeat(5, 1fr); } }

.breath-stage { display: grid; place-items: center; padding: 26px 10px; border: 4px solid var(--ink); border-radius: 14px; background: linear-gradient(160deg, #e2f7e8, #c7ecd2); min-height: 340px; }
.breath-ring { position: relative; width: 240px; height: 240px; display: grid; place-items: center; }
.breath-circle { position: absolute; inset: 0; margin: auto; width: 100px; height: 100px; border-radius: 50%; background: linear-gradient(160deg, #54c77e, #1b7d43); border: 4px solid #0e5128; transition-property: width, height; transition-timing-function: ease-in-out; }
.breath-label { position: relative; text-align: center; color: #0e2a17; }
.breath-label .phase { font-family: var(--display); font-size: 26px; line-height: 1.1; }
.breath-label .count { font-family: var(--display); font-size: 40px; line-height: 1.1; }
.breath-meta { font-family: var(--display); font-size: 15px; text-align: center; margin-top: 10px; }

/* ---------- Подвал ---------- */
.site-footer { background: #111; color: #efe7d8; padding: 56px 0 28px; margin-top: 40px; border-top: 6px solid #000; }
.site-footer a { color: #efe7d8; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; gap: 30px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; } }
.footer-brand .logo { color: #fff; }
.footer-brand .logo-img { border-color: #efe7d8; }
.footer-brand p { color: #bdb3a2; font-size: 15px; margin-top: 14px; }
.footer-col h2 { font-size: 16px; color: #ffd60a; margin-bottom: 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 2px solid #2c2c2c; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: 14px; color: #a39a8b; }

/* ---------- Мелочи ---------- */
.kicker-list { list-style: none; padding: 0; margin: 0 0 1.2em; display: grid; gap: 10px; }
.kicker-list li { padding-left: 34px; position: relative; }
.kicker-list li::before { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border: 3px solid var(--ink); border-radius: 6px; background: var(--yellow-1); }
.split { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 48px; } }
.legal h2 { font-size: 24px; margin-top: 1.6em; }
.legal h3 { font-size: 19px; }
.note-small { font-size: 14px; color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-24 { margin-top: 24px; } .mt-40 { margin-top: 40px; }
