/* Страницы слов для поиска. Стиль по образцу Vetric (refero.design):
   белый холст, чернильный текст и кнопки, засечки в заголовках, тонкие рамки
   без теней, четыре цвета призмы и пастельные подложки.
   Шрифты свои (OFL), см. /fonts/. */

:root {
  --ink: #090a1e; --paper: #fff; --line: #e0e0e0; --line-cool: #c3dae3; --text-2: #4a4c63; --muted: #6b6d82;
  --blue: #2969ff; --pink: #f75cc3; --yellow: #ffd363; --green: #5ab040;
  --wash-cream: #fffdea; --wash-mint: #eaffed; --wash-blush: #fff3fb; --wash-sky: #e5f5ff;
  --link: #2969ff; --r: 7px; --r-lg: 24px;
  --serif: 'Noto Serif', 'Source Serif 4', Georgia, serif;
  --sans: 'Manrope', Inter, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eef0ff; --paper: #090a1e; --line: #23264a; --line-cool: #2a3a55; --text-2: #b9bcd6; --muted: #8c8fae;
    --wash-cream: #1d1b12; --wash-mint: #10201a; --wash-blush: #22142a; --wash-sky: #0f1a33;
    --link: #7ea4ff; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #eef0ff; --paper: #090a1e; --line: #23264a; --line-cool: #2a3a55; --text-2: #b9bcd6; --muted: #8c8fae;
  --wash-cream: #1d1b12; --wash-mint: #10201a; --wash-blush: #22142a; --wash-sky: #0f1a33;
  --link: #7ea4ff; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--sans); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 800px; margin: 0 auto; padding: 0 16px; }

/* шапка */
.top { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--paper); z-index: 5; }
.top__in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; font: 500 22px/1 var(--serif); letter-spacing: -.03em; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo svg { width: 34px; height: 31px; }
.btn { display: inline-block; background: var(--ink); color: var(--paper); font: 500 16px/1 var(--sans);
  padding: 13px 28px; border-radius: var(--r); border: 1px solid var(--ink); }
.btn:hover { text-decoration: none; opacity: .88; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); padding: 10px 18px; font-size: 15px; }
.btn--ghost:hover { border-color: var(--ink); opacity: 1; }

.crumbs { font-size: 14px; color: var(--muted); padding: 18px 0 0; overflow-wrap: anywhere; }
.crumbs a { color: var(--muted); }
.crumbs i { font-style: normal; margin: 0 6px; opacity: .5; }

.eyebrow { font: 500 12px/1.5 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.03em; }
h1 { font-size: 49px; line-height: 1.08; margin: 20px 0 12px; }
h2 { font-size: 30px; line-height: 1.2; margin: 48px 0 16px; }
.lead { color: var(--text-2); font-size: 18px; margin: 0 0 20px; }

/* герой оглавления */
.hero { isolation: isolate; position: relative; text-align: center; padding: 24px 0 8px; }
.hero h1 { font-size: 63px; margin-top: 0; }
.hero .cat { width: 210px; height: 210px; margin: 0 auto; }

/* страница слова */
.word__head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 16px 0 4px; }
.word__head h1 { font-size: 63px; margin: 0; line-height: 1; padding-bottom: .08em; overflow-wrap: anywhere; }
.word__ru { font: 400 26px/1.33 var(--serif); margin: 0 0 6px; }
.word__meta { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.word__lead { color: var(--text-2); }
.gov { margin: 0 0 8px; color: var(--text-2); }

.say { flex: none; width: 44px; height: 44px; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; }
.say:hover { border-color: var(--ink); }
.say.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.say svg { margin-left: 2px; }

.exs { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ex { display: flex; gap: 14px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); }
.ex:nth-child(4n+1) { background: var(--wash-sky); border-color: var(--line-cool); }
.ex:nth-child(4n+2) { background: var(--wash-blush); }
.ex:nth-child(4n+3) { background: var(--wash-cream); }
.ex:nth-child(4n+4) { background: var(--wash-mint); }
.ex p { margin: 0; }
.ex__tr { font-weight: 600; }
.ex__ru { color: var(--text-2); }
.ex__note { font-size: 13px; color: var(--muted); margin-top: 6px !important; letter-spacing: .02em; }

.cta { isolation: isolate; position: relative; margin: 40px 0; padding: 28px; border-radius: var(--r-lg); border: 1px solid var(--line);
  display: flex; gap: 20px; align-items: center; overflow: hidden; }
.cta::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .35;
  background: linear-gradient(90deg, var(--pink), var(--blue), var(--yellow), var(--green)); }
.cta::after { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--paper); opacity: .78; }
.cta .cat { width: 120px; height: 120px; flex: none; }
.cta b { font: 400 26px/1.25 var(--serif); letter-spacing: -.02em; display: block; margin-bottom: 6px; }
.cta p { margin: 0 0 16px; color: var(--text-2); }

.near { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.near a { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); height: 100%; }
.near a:hover { border-color: var(--ink); text-decoration: none; }
.near b { display: block; font-weight: 600; }
.near span { color: var(--muted); font-size: 14px; }
.more { margin: 14px 0 0; }
.pn { display: flex; justify-content: space-between; gap: 12px; margin: 36px 0 8px; font-weight: 600; }

.list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.list li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li div { display: grid; grid-template-columns: minmax(100px, 35%) 1fr; gap: 14px; }
.list a { overflow-wrap: anywhere; font-weight: 600; }
.list span { color: var(--text-2); }

.sets { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.sets a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); height: 100%; }
.sets a:hover { border-color: var(--ink); text-decoration: none; }
.sets b { font: 400 20px/1.3 var(--serif); letter-spacing: -.02em; }
.sets span { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }
.sets .is-cur a { border-color: var(--ink); background: var(--wash-sky); }

.foot { border-top: 1px solid var(--line); margin-top: 64px; padding: 24px 0 40px; color: var(--muted); font-size: 14px; }
.foot a { color: var(--muted); }
.foot p { margin: 6px 0 0; }

/* ── кошка: дышит, моргает, водит хвостом и ухом, следит глазами ── */
.cat { display: block; overflow: visible; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cat * { transform-box: view-box; }
.cat-glow { transform-origin: 120px 140px; animation: cat-glow 14s linear infinite; }
.cat-tail { transform-origin: 160px 198px; animation: cat-tail 2.8s ease-in-out infinite; }
.cat-body { transform-origin: 120px 216px; animation: cat-breathe 3.2s ease-in-out infinite; }
.cat-head { transform-origin: 120px 145px; animation: cat-tilt 9s ease-in-out infinite; }
.cat-eyes { transform-origin: 120px 100px; animation: cat-blink 4.6s infinite; }
.cat-ear--r { transform-origin: 150px 70px; animation: cat-ear 6.5s ease-in-out infinite; }
.cat-pupils { transition: transform .15s ease-out; }
.cat-all { transform-origin: 120px 220px; }
.cat.is-jump .cat-all { animation: cat-jump .6s cubic-bezier(.3,.7,.4,1); }
@keyframes cat-tail { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(9deg); } }
@keyframes cat-breathe { 0%,100% { transform: scale(1,1); } 50% { transform: scale(1.015,1.03); } }
@keyframes cat-tilt { 0%,60%,100% { transform: rotate(0); } 68%,80% { transform: rotate(-7deg); } }
@keyframes cat-blink { 0%,93%,100% { transform: scaleY(1); } 95% { transform: scaleY(.08); } }
@keyframes cat-ear { 0%,70%,78%,100% { transform: rotate(0); } 73% { transform: rotate(12deg); } 75% { transform: rotate(-4deg); } }
@keyframes cat-glow { to { transform: rotate(360deg); } }
@keyframes cat-jump { 0% { transform: translateY(0) scale(1,1); } 20% { transform: translateY(0) scale(1.06,.92); }
  50% { transform: translateY(-26px) scale(.96,1.05); } 80% { transform: translateY(0) scale(1.04,.95); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .cat * { animation: none !important; } }

@media (max-width: 600px) {
  body { font-size: 16px; }
  h1 { font-size: 35px; }
  h2 { font-size: 26px; margin-top: 40px; }
  .hero h1 { font-size: 40px; }
  .hero .cat { width: 170px; height: 170px; margin: 0 auto; }
  .word__head h1 { font-size: 46px; }
  .word__ru { font-size: 22px; }
  .cta { flex-direction: column; align-items: flex-start; padding: 22px; }
  .cta .cat { width: 96px; height: 96px; }
  .list li div { display: block; }
  .list li span { display: block; font-size: 15px; }
  .btn--ghost { padding: 9px 14px; }
}

/* ── фон: пастельное пятно призмы, размытое к краям, поверх — белые точки ──
   Точки в шахматном порядке, цвета под ними медленно перетекают.
   У каждой страницы своё пятно: bg--v0…v3 (слова — по слову) и bg--hero. */
.bg { position: absolute; left: 0; right: 0; top: 0; height: 760px; overflow: hidden;
  z-index: -1; pointer-events: none; }
.bg__fade { position: absolute; width: 780px; height: 620px; top: -140px; right: -200px;
  -webkit-mask-image: radial-gradient(closest-side, #000 45%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 45%, transparent 100%); }
.bg__dots { position: absolute; inset: 0;
  background:
    radial-gradient(45% 55% at 28% 38%, #ffc2e4, transparent 75%),
    radial-gradient(45% 55% at 72% 30%, #bcdcff, transparent 75%),
    radial-gradient(50% 55% at 62% 74%, #fff0a3, transparent 75%),
    radial-gradient(40% 45% at 24% 76%, #c8f1c0, transparent 75%),
    #fbe7f3;
  background-size: 125% 125%; background-position: 0% 0%;
  animation: bg-drift 24s ease-in-out infinite alternate; }
.bg__dots::after { content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle, #fff 1.9px, transparent 2.4px) 0 0 / 13px 13px,
    radial-gradient(circle, #fff 1.9px, transparent 2.4px) 6.5px 6.5px / 13px 13px; }
@keyframes bg-drift { to { background-position: 100% 100%; } }
.bg--v1 .bg__fade { right: auto; left: -280px; top: -100px; }
.bg--v1 .bg__dots { filter: hue-rotate(35deg); }
.bg--v2 .bg__fade { top: -240px; right: -80px; width: 920px; height: 560px; }
.bg--v2 .bg__dots { filter: hue-rotate(-40deg); }
.bg--v3 .bg__fade { top: -60px; right: -260px; height: 660px; }
.bg--v3 .bg__dots { background-position: 100% 0%; animation-direction: alternate-reverse; }
.bg--hero .bg__fade { left: 50%; right: auto; margin-left: -560px; width: 1120px; height: 760px; top: -200px; }
@media (max-width: 600px) {
  .bg { height: 560px; }
  .bg .bg__fade { width: 520px; height: 440px; right: -260px; left: auto; top: -140px; margin: 0; }
  .bg--v1 .bg__fade { right: auto; left: -300px; }
  .bg--hero .bg__fade { width: 640px; height: 520px; left: 50%; right: auto; margin-left: -320px; top: -170px; }
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bg { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .bg__dots { animation: none; } }

/* фото слова */
.pic { position: relative; margin: 8px 0 20px; max-width: 480px; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; }
.pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pic figcaption { position: absolute; right: 8px; bottom: 8px; max-width: calc(100% - 16px); font-size: 12px; line-height: 1.3;
  padding: 3px 8px; border-radius: 5px; background: rgba(255,255,255,.85); color: #4a4c63;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pic figcaption a { color: inherit; }

/* шапка: каталог + тренажёр */
.top__nav { display: flex; align-items: center; gap: 16px; }
.top__nav > a:not(.btn) { color: var(--ink); font-weight: 500; font-size: 15px; }
.hero__btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 600px) { .top__nav { gap: 10px; } .top__nav > a:not(.btn) { font-size: 14px; } }
