/* POLIQ — публичный сайт и блог */

:root {
  --red: #c8102e;
  --red-dark: #9b0c24;
  --red-soft: #fde8ec;
  --bg: #ffffff;
  --bg-alt: #f6f6f7;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --text: #16161a;
  --muted: #62646d;
  --border: #e7e7ea;
  --border-strong: #d6d7db;
  --ok: #15803d;
  --ok-soft: #e8f6ed;
  --shadow: 0 1px 2px rgba(16, 16, 20, 0.04), 0 8px 24px rgba(16, 16, 20, 0.06);
  --shadow-lg: 0 24px 60px rgba(16, 16, 20, 0.14);
  --radius: 18px;
  --radius-sm: 10px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 68px;
  --font: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --red: #ef3e5a;
    --red-dark: #ff6b82;
    --red-soft: #3a1820;
    --bg: #0f0f12;
    --bg-alt: #16161b;
    --surface: #1b1b21;
    --surface-2: #24242c;
    --text: #f2f2f4;
    --muted: #a3a4ad;
    --border: #2b2b33;
    --border-strong: #3a3a44;
    --ok: #4ade80;
    --ok-soft: #13301f;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body.site {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.025em; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; }

.hidden { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.site-container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
/* словарь — во всю ширину главной (1360), вместе с шапкой и подвалом */
.page-dictionary .site-container,
.page-word .site-container { max-width: 1360px; }

/* ── кнопки ── */

.site-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.site-btn:active { transform: translateY(1px); }
.site-btn-sm { padding: 8px 16px; font-size: 14px; }
.site-btn-lg { padding: 14px 26px; font-size: 16px; }
.site-btn-block { width: 100%; margin-top: 14px; }
.site-btn-primary { background: var(--red); color: #fff; box-shadow: 0 6px 18px rgba(200, 16, 46, 0.22); }
.site-btn-primary:hover { background: var(--red-dark); }
.site-btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.site-btn-ghost:hover { border-color: var(--text); }
.site-btn-light { background: #fff; color: #9b0c24; }
.site-btn-light:hover { background: #fff3f5; }
.site-btn:disabled { opacity: 0.6; cursor: default; }

.site-link-btn {
  background: none;
  border: none;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.site-link-btn:hover { color: var(--text); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flag {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  background: linear-gradient(#fff 50%, var(--red) 50%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

/* ── шапка ── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header-h);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--text);
}

.site-brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: linear-gradient(var(--surface) 50%, var(--red) 50%);
  box-shadow: inset 0 0 0 1.5px var(--text);
}

.site-nav {
  display: flex;
  gap: 4px;
  margin-right: auto;
}
.site-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

.site-header-actions { display: flex; align-items: center; gap: 8px; }

.site-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
}

/* ── hero ── */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 110px);
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--red) 13%, transparent), transparent);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.hero-lead {
  margin-top: 22px;
  max-width: 34em;
  font-size: clamp(17px, 1.6vw, 19px);
  color: var(--muted);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 14px;
  color: var(--muted);
}

/* мини-упражнение */

.demo-card {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}
.demo-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.demo-tag {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}
.demo-step { font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.demo-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.demo-ru { margin-top: 6px; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.demo-pl {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--surface-2);
  font-size: 22px;
  font-weight: 600;
}
.demo-slot {
  display: inline-block;
  min-width: 96px;
  padding: 0 10px;
  border-bottom: 2px dashed var(--red);
  color: var(--muted);
  text-align: center;
}
.demo-slot.is-ok { border-bottom: 2px solid var(--ok); color: var(--ok); }
.demo-options { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.demo-option {
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.demo-option:hover:not(:disabled) { border-color: var(--red); transform: translateY(-1px); }
.demo-option.is-ok { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.demo-option.is-wrong { border-color: var(--red); background: var(--red-soft); color: var(--red); text-decoration: line-through; }
.demo-option:disabled { cursor: default; }
.demo-feedback { min-height: 46px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.demo-feedback.is-ok { color: var(--text); }
.demo-feedback.is-wrong { color: var(--red); }
.demo-next {
  margin-left: 4px;
  padding: 0;
  border: none;
  background: none;
  color: var(--red);
  font-weight: 700;
  cursor: pointer;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 16px 0 0;
}
.hero-stats div {
  padding: 14px 12px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
}
.hero-stats dt { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.hero-stats dd { margin: 2px 0 0; font-size: 12px; color: var(--muted); }

/* ── секции ── */

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-tight { padding-top: 8px; }
.section-alt { background: var(--bg-alt); }

.section-head { max-width: 720px; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head h2 { font-size: clamp(30px, 4vw, 48px); font-weight: 800; letter-spacing: -0.04em; }
.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  max-width: none;
}
.section-lead { max-width: 30em; font-size: 17px; color: var(--muted); }
.section-head-row .section-lead { margin-bottom: 6px; }

/* шаги */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.steps li {
  position: relative;
  padding: 30px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 22px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-weight: 800;
}
.steps h3 { font-size: 22px; margin-bottom: 10px; }
.steps p { color: var(--muted); }

/* возможности */

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.bento-card {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.2s, box-shadow 0.2s;
}
.bento-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.bento-wide { grid-column: span 2; grid-row: span 1; }
.bento-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 23px;
}
.bento-card h3 { font-size: 21px; margin-bottom: 8px; }
.bento-card p { color: var(--muted); }
.bento-sample { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip {
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--surface-2);
  font-weight: 600;
}
.chip-ok { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 40%, transparent); }
.chip-muted { background: transparent; padding-inline: 2px; }

/* сценарии */

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.scenario-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.scenario-emoji {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--surface-2);
  font-size: 26px;
}
.scenario-card h3 { font-size: 18px; }
.scenario-pl { margin-top: 2px; font-size: 14px; color: var(--muted); }
.scenario-count {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* Франк */

.frank-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.frank-grid h2 { font-size: clamp(30px, 4vw, 48px); font-weight: 800; letter-spacing: -0.04em; margin-bottom: 18px; }
.check-list { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.check-list li { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.check-list i {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 14px;
}
.frank-sample {
  margin: 0;
  padding: 30px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.frank-sample figcaption { margin-bottom: 18px; font-size: 20px; font-weight: 700; }
.frank-sample figcaption span { color: var(--muted); font-weight: 500; }
.frank-adapted { font-size: 18px; line-height: 1.75; }
.frank-adapted b { font-weight: 600; }
.frank-ru { color: var(--red); font-style: italic; font-size: 0.92em; }
.frank-original {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--border-strong);
  font-size: 18px;
  line-height: 1.7;
}

/* ── лента блога: записи разных типов вперемешку ── */

/* сетка, а не «кирпичики»: карточки в ряду одной высоты, анонс обрезан, «мин чтения» прижат к низу */
.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.feed > .card { display: flex; flex-direction: column; }
.feed > .card > .card-body { display: flex; flex: 1; flex-direction: column; }
.feed .card-foot { align-self: flex-start; margin-top: auto; padding-top: 16px; }
.feed .card-title, .feed .card-text { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.feed .card-title { -webkit-line-clamp: 3; }
.feed .card-text { -webkit-line-clamp: 4; }
.feed > .card-photo img { flex: 1; height: 100%; object-fit: cover; }

.card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.card-body { padding: 22px 22px 24px; }
.card-cover { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--muted);
}
.card-kind {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.card-kind-news { color: var(--red); }
.card-title { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.card-article .card-title { font-size: 23px; }
.card-text { margin-top: 10px; color: var(--muted); font-size: 15px; }
.card-foot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--red);
}

.card-news { border-top: 4px solid var(--red); }

.card-quote {
  position: relative;
  padding: 30px 26px 26px;
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.card-quote:hover { border-color: var(--red); }
.card-quote-mark { font-size: 42px; opacity: 0.5; }
.card-quote blockquote {
  margin: 8px 0 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
}
.card-quote-author { margin-top: 16px; font-weight: 600; opacity: 0.9; }
.card-quote .card-text { color: rgba(255, 255, 255, 0.82); }

.card-photo { position: relative; }
.card-photo img { width: 100%; height: auto; }
.card-photo-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 44px 20px 18px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  color: #fff;
}
.card-photo-caption .card-kind { color: rgba(255, 255, 255, 0.85); }
.card-photo-caption p { margin-top: 4px; font-weight: 600; line-height: 1.4; }

.card-note { padding: 22px; background: var(--surface-2); border-style: dashed; }
.card-note .card-title { font-size: 18px; }

/* ── страница блога ── */

.page-hero { padding: clamp(40px, 6vw, 80px) 0 32px; }
.page-hero h1 { font-size: clamp(36px, 5.5vw, 64px); font-weight: 800; letter-spacing: -0.045em; max-width: 14em; }
.page-lead { margin-top: 16px; max-width: 36em; font-size: 18px; color: var(--muted); }

.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.filter-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
}
.filter-tabs a span { color: var(--muted); font-weight: 500; }
.filter-tabs a:hover { border-color: var(--text); }
.filter-tabs a[aria-current="page"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.filter-tabs a[aria-current="page"] span { color: inherit; opacity: 0.7; }

.pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
}
.pager > :last-child { justify-self: end; }
.pager-info { font-size: 14px; color: var(--muted); }

.empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 72px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  text-align: center;
}
.empty i { font-size: 40px; color: var(--red); }
.empty h2 { font-size: 24px; }
.empty p { color: var(--muted); margin-bottom: 8px; }

/* ── запись ── */

.post { padding: clamp(32px, 5vw, 64px) 0 clamp(56px, 7vw, 96px); }
.post-container { max-width: 800px; }
.about-title { margin-top: 8px; font-size: clamp(36px, 5.5vw, 56px); font-weight: 800; letter-spacing: -0.04em; }

.post-draft {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff4d6;
  color: #5c4810;
  font-size: 14px;
  font-weight: 600;
}

.breadcrumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; font-size: 14px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--red); }
.breadcrumbs i { font-size: 12px; }

.post-head h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.08; }
.post-lead { margin-top: 20px; font-size: 21px; line-height: 1.5; color: var(--muted); }
.post-lead-center { text-align: center; }
.post-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 20px; font-size: 14px; color: var(--muted); }
.post-meta a { color: var(--text); font-weight: 600; text-decoration: none; }
.post-meta a:hover { color: var(--red); }

.post-cover { margin: 36px 0 0; }
.post-cover img { width: 100%; border-radius: 22px; }
.post-cover figcaption { margin-top: 12px; font-size: 15px; color: var(--muted); text-align: center; }
.post-cover-photo img { max-height: 80vh; object-fit: contain; background: var(--surface-2); }

.post-quote {
  padding: clamp(36px, 6vw, 64px);
  border-radius: 28px;
  background: var(--red);
  color: #fff;
  text-align: center;
}
.post-quote > i { font-size: 54px; opacity: 0.5; }
.post-quote blockquote { margin: 12px 0 0; }
.post-quote blockquote p { font-size: clamp(26px, 3.6vw, 38px); font-weight: 700; line-height: 1.3; letter-spacing: -0.025em; }
.post-quote-author { margin-top: 22px; font-size: 18px; font-weight: 600; opacity: 0.9; }

.prose { margin-top: 40px; font-size: 18px; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 1.9em; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.prose h3 { margin-top: 1.6em; font-size: 23px; font-weight: 700; }
.prose h4 { margin-top: 1.4em; font-size: 19px; }
.prose a { color: var(--red); text-underline-offset: 3px; }
.prose strong { font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--red); }
.prose blockquote {
  margin-inline: 0;
  padding: 4px 0 4px 22px;
  border-left: 4px solid var(--red);
  font-size: 20px;
  font-style: italic;
  color: var(--text);
}
.prose img { width: 100%; border-radius: 16px; }
.prose code { padding: 2px 6px; border-radius: 6px; background: var(--surface-2); font-size: 0.9em; }
.prose pre { padding: 18px; border-radius: 14px; background: var(--surface-2); overflow-x: auto; }
.prose pre code { padding: 0; background: none; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2.4em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.prose th { font-weight: 700; background: var(--surface-2); }

.post-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 56px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.post-cta h2 { font-size: 22px; margin-bottom: 6px; }
.post-cta p { color: var(--muted); }

/* ── FAQ ── */

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}
.faq { display: grid; gap: 12px; }
.faq details {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  font-size: 18px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { flex-shrink: 0; color: var(--red); transition: transform 0.2s; }
.faq details[open] summary i { transform: rotate(45deg); }
.faq details p { padding: 0 22px 22px; color: var(--muted); }

/* ── финальный призыв ── */

.cta-band { padding: clamp(56px, 8vw, 96px) 0; background: var(--red); color: #fff; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.cta-band h2 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; letter-spacing: -0.04em; }
.cta-band p { margin-top: 10px; font-size: 18px; opacity: 0.88; }

/* ── подвал ── */

.site-footer { padding: 64px 0 28px; border-top: 1px solid var(--border); background: var(--bg); }
.site-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 32px;
}
.site-footer-about p { margin-top: 14px; max-width: 26em; color: var(--muted); font-size: 15px; }
.site-footer-grid > * { min-width: 0; } /* длинные ссылки («Политика конфиденциальности») не распирают сетку на телефоне */
.site-footer-col a { overflow-wrap: anywhere; }
.site-footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.site-footer-title {
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.site-footer-col a, .site-footer-link {
  padding: 0;
  border: none;
  background: none;
  color: var(--text);
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}
.site-footer-col a:hover, .site-footer-link:hover { color: var(--red); }
.site-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
}

/* ── окно входа ── */

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.auth-modal-backdrop { position: absolute; inset: 0; background: rgba(16, 16, 20, 0.5); backdrop-filter: blur(4px); }
.auth-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  max-height: min(92dvh, 660px);
  overflow-y: auto;
  padding: 28px 26px 24px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.auth-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: none;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.auth-modal-close:hover { color: var(--text); }
.auth-modal-title { padding-right: 40px; margin-bottom: 6px; font-size: 22px; font-weight: 800; }
.auth-modal-lead { margin-bottom: 20px; color: var(--muted); font-size: 14px; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-2);
}
.auth-tab {
  padding: 9px 12px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.auth-tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.auth-form { display: flex; flex-direction: column; gap: 6px; }
.auth-label { margin-top: 10px; font-size: 13px; font-weight: 600; }
.auth-label:first-child { margin-top: 0; }
.auth-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.auth-input:focus { outline: 3px solid color-mix(in srgb, var(--red) 22%, transparent); border-color: var(--red); }
.auth-input-code { font-size: 24px; font-weight: 700; letter-spacing: 0.3em; text-align: center; }
.auth-feedback { margin-top: 14px; font-size: 14px; font-weight: 500; color: var(--red); }
.auth-footnote, .auth-hint { margin-top: 12px; font-size: 12px; color: var(--muted); }
.auth-verify-lead { margin-bottom: 12px; color: var(--muted); font-size: 14px; }
.auth-verify-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; }
.auth-link-btn { padding: 0; border: none; background: none; color: var(--red); font-size: 13px; font-weight: 600; cursor: pointer; }
.auth-link-btn:hover { text-decoration: underline; }
body.auth-modal-open { overflow: hidden; }

/* ── адаптив ── */

@media (max-width: 980px) {
  .hero-grid, .frank-grid, .faq-grid { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr 1fr; }
  .bento-wide { grid-column: auto; }
  .steps { grid-template-columns: 1fr; }
  .site-footer-grid { grid-template-columns: 1fr 1fr; }
  .site-footer-about { grid-column: span 2; }
}

@media (max-width: 860px) {
  .site-menu-btn { display: inline-flex; }
  .site-header-actions .site-link-btn { display: none; }
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    gap: 2px;
    padding: 12px var(--gutter) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s, transform 0.15s;
  }
  .site-nav a { padding: 12px; font-size: 17px; border-radius: 12px; }
  body.site-menu-open .site-nav { opacity: 1; transform: none; pointer-events: auto; }
  .section-head-row { flex-direction: column; align-items: flex-start; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .post-cta { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  .site-header-inner { gap: 12px; }
  .site-header-actions .site-btn-sm { padding: 8px 12px; font-size: 13px; }
  .hero h1 { font-size: 40px; }
  .hero-actions .site-btn { flex: 1 1 100%; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .demo-card { padding: 20px; }
  .demo-ru { font-size: 21px; }
  .demo-pl { font-size: 19px; }
  .bento { grid-template-columns: 1fr; }
  .bento-wide { grid-column: auto; }
  .scenario-grid { grid-template-columns: 1fr; }
  .site-footer-grid { grid-template-columns: 1fr 1fr; }
  .site-footer-bottom { flex-direction: column; }
  .prose { font-size: 17px; }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager-info { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ── словарь ── */
.dict-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 640px;
  margin-top: 26px;
  padding: 6px 6px 6px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.dict-search > i { font-size: 20px; color: var(--muted); }
.dict-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 17px;
}
.dict-search:focus-within { border-color: var(--red); }
.dict-promo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.dict-promo h2 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 800; letter-spacing: -0.04em; margin-bottom: 12px; }
.dict-promo .dict-search { margin-top: 0; }
.dict-list-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; }
.dict-list-lead { color: var(--muted); margin-bottom: 18px; }
.dict-results { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--border); }
.dict-results a {
  display: grid;
  grid-template-columns: minmax(140px, 0.9fr) 150px minmax(0, 2fr);
  gap: 14px;
  align-items: baseline;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
}
.dict-results a:hover { background: var(--surface-2); }
.dict-results b { font-size: 18px; }
.dict-pos { font-size: 13px; color: var(--muted); }
.dict-ru { color: var(--text); }
.dict-popular {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.dict-popular a {
  display: flex;
  flex-direction: column;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
}
.dict-popular a:hover { border-color: var(--red); }
.dict-popular span { font-size: 13px; color: var(--muted); }
.dict-cta { margin-top: 40px; }

.word-page { padding: clamp(28px, 4vw, 52px) 0 clamp(56px, 7vw, 96px); }
.word-head { display: flex; align-items: center; gap: 14px; }
.word-head h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; }
.word-summary { margin-top: 8px; font-size: 22px; color: var(--muted); }
.word-answer { margin-top: 14px; max-width: 46em; font-size: 17px; line-height: 1.6; }
.word-answer b { font-weight: 700; }
.word-answer-entry { margin-top: 8px; font-size: 16px; color: var(--muted); }
.word-ex-src { font-size: 13px; }
.word-entry { margin-top: 28px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.word-entry-head { display: flex; flex-wrap: wrap; gap: 8px; }
.word-pos {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}
.word-pos.muted { background: var(--surface-2); color: var(--muted); }
.word-translation { margin-top: 12px; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.word-alt { margin-top: 6px; color: var(--muted); }
.word-alt a { color: var(--red); }
.word-gloss { margin-top: 10px; font-style: italic; }
.word-gloss span { font-style: normal; color: var(--muted); font-size: 13px; }
.word-subtitle { margin: 24px 0 10px; font-size: 16px; font-weight: 700; }
.word-examples { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.word-examples li { padding: 12px 14px; border-left: 3px solid var(--red); background: var(--surface-2); border-radius: 0 10px 10px 0; }
.word-ex-ru { margin-top: 2px; color: var(--muted); font-size: 15px; }
.word-entry, .word-gloss { min-width: 0; overflow-wrap: anywhere; }
.word-learn { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.word-learn-note { font-size: 13px; color: var(--muted); }
.word-learn-note a { color: var(--red); }
.word-neighbours { margin-top: 36px; }
.word-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.word-topics { margin: -4px 0 12px; font-size: 14px; color: var(--muted); }
.word-chips a {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
}
.word-chips a:hover { border-color: var(--red); }
.word-chips span { color: var(--muted); }
.word-back { margin-top: 28px; }
.word-back a { color: var(--muted); text-decoration: none; }
.word-back a:hover { color: var(--red); }

/* кнопка-динамик (как в тренажёре) */
.say-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--red);
  font-size: 22px;
  cursor: pointer;
}
.say-btn:hover { border-color: var(--red); background: var(--red-soft); }
.say-btn.is-playing { background: var(--red); border-color: var(--red); color: #fff; }

@media (max-width: 860px) {
  .dict-promo { grid-template-columns: minmax(0, 1fr); } /* 1fr не ужимается уже поиска — на 360 px вылезало на 20 px */
  .dict-results a { grid-template-columns: 1fr auto; }
  .dict-results .dict-ru { grid-column: 1 / -1; }
  .word-entry { padding: 18px 14px; }
  .word-translation { font-size: 22px; }
}

/* ── формы слова (apps/website/paradigm.py): сетки склонения и спряжения ── */
.word-forms { display: grid; gap: 28px; min-width: 0; }
.paradigm { min-width: 0; }
.paradigm-title { margin-bottom: 10px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.paradigm-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.paradigm table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.3; overflow-wrap: normal; }
.paradigm th, .paradigm td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.paradigm tbody tr:last-child > * { border-bottom: 0; }
.paradigm thead th { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; background: var(--surface-2); }
.paradigm thead td { background: var(--surface-2); }
.paradigm .paradigm-groups th { color: var(--text); font-size: 12px; text-align: center; border-bottom: 1px dashed var(--border-strong); }
.paradigm .paradigm-groups th + th, .paradigm [data-split] { border-left: 1px solid var(--border-strong); }
.paradigm tbody tr:hover > * { background: var(--surface-2); }
.paradigm tbody th { width: 1%; min-width: 120px; font-weight: 500; color: var(--muted); }
.paradigm td b { display: block; font-size: 16px; font-weight: 700; color: var(--text); }
.paradigm .form-ru { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.paradigm .form-none { color: var(--border-strong); }
.paradigm .case-name { display: block; color: var(--text); font-weight: 600; }
.paradigm .case-pl { display: block; font-size: 12px; color: var(--muted); }
.paradigm .case-q { display: block; margin-top: 4px; font-size: 12px; line-height: 1.35; color: var(--muted); }
.paradigm .case-q [lang="pl"] { color: var(--red); }
.paradigm .person { color: var(--text); font-weight: 600; white-space: nowrap; }
.paradigm-note { margin-top: 8px; font-size: 13px; color: var(--muted); }
.paradigm--plain tbody th { min-width: 0; color: var(--text); }
.paradigm--plain thead th { white-space: normal; }

/* вкладки — только на узком экране и только с JS (site.js ставит .is-tabbed) */
.paradigm-tabs { display: none; gap: 6px; margin-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
.paradigm-tabs::-webkit-scrollbar { display: none; }
.paradigm-tabs button {
  flex: 0 0 auto;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.paradigm-tabs button[aria-selected="true"] { background: var(--red); border-color: var(--red); color: #fff; }

@media (max-width: 860px) {
  .paradigm.is-tabbed .paradigm-tabs { display: flex; }
  .paradigm.is-tabbed .paradigm-groups { display: none; }
  .paradigm.is-tabbed [data-c] { border-left: 0 !important; }
  .paradigm.is-tabbed[data-active="0"] [data-c]:not([data-c="0"]),
  .paradigm.is-tabbed[data-active="1"] [data-c]:not([data-c="1"]),
  .paradigm.is-tabbed[data-active="2"] [data-c]:not([data-c="2"]),
  .paradigm.is-tabbed[data-active="3"] [data-c]:not([data-c="3"]),
  .paradigm.is-tabbed[data-active="4"] [data-c]:not([data-c="4"]),
  .paradigm.is-tabbed[data-active="5"] [data-c]:not([data-c="5"]) { display: none; }
}

@media (max-width: 640px) {
  .paradigm th, .paradigm td { padding: 9px 10px; }
  .paradigm tbody th { min-width: 0; width: 44%; }
  .paradigm table { font-size: 14px; }
  /* широкая таблица (варианты форм местоимений) — строка становится карточкой «подпись: значение» */
  .paradigm--stack thead { display: none; }
  .paradigm--stack table, .paradigm--stack tbody { display: block; }
  .paradigm--stack tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
  .paradigm--stack tbody tr:last-child { border-bottom: 0; }
  .paradigm--stack tbody th { grid-column: 1 / -1; width: auto; }
  .paradigm--stack tbody th, .paradigm--stack tbody td { display: block; border: 0; padding: 4px 12px; }
  .paradigm--stack td::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); }
}

/* ── юридические страницы ── */
.legal-page { padding: clamp(28px, 4vw, 52px) 0 clamp(56px, 7vw, 96px); }
.legal-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; margin-top: 20px; }
.legal-nav { position: sticky; top: 96px; align-self: start; display: flex; flex-direction: column; gap: 4px; }
.legal-nav a { padding: 8px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: 15px; }
.legal-nav a:hover { color: var(--text); background: var(--surface-2); }
.legal-nav a[aria-current="page"] { color: var(--red); background: var(--red-soft); font-weight: 600; }
.legal-body { max-width: 760px; overflow-wrap: anywhere; } /* длинные адреса и ссылки переносятся на телефоне */
.legal-body h1 { font-size: clamp(32px, 4.4vw, 46px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.legal-updated { margin-top: 8px; color: var(--muted); font-size: 14px; }
.legal-table { overflow-x: auto; margin: 16px 0; }
.legal-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.legal-table th, .legal-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.legal-table thead th { font-size: 13px; color: var(--muted); font-weight: 600; }
.auth-legal { margin-top: 12px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.auth-legal a { color: inherit; text-decoration: underline; }

/* ── уведомление о cookie ── */
.cookie-note {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 460px;
  padding: 12px 14px 12px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 14px;
}
.cookie-note p { margin: 0; }
.cookie-note a { color: var(--red); }

@media (max-width: 1100px) {
  .site-footer-grid { grid-template-columns: repeat(3, 1fr); }
  .site-footer-about { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .legal-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  /* на телефоне — узкая полоса внизу, не закрывает первый экран */
  .cookie-note { right: 12px; left: 12px; bottom: 12px; max-width: none; gap: 10px; padding: 8px 8px 8px 14px; font-size: 13px; line-height: 1.35; }
  .cookie-note .site-btn { flex-shrink: 0; }
}

/* ── словарь: поиск во всю ширину, алфавит, страницы буквы ── */
.dict-hero .dict-search { max-width: none; }
.dict-alphabet { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.dict-alphabet a {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.dict-alphabet a:hover { border-color: var(--red); color: var(--red); }
.dict-alphabet a[aria-current="page"] { background: var(--red); border-color: var(--red); color: #fff; }
.dict-pages { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.dict-pages a, .dict-pages span {
  min-width: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
}
.dict-pages span[aria-current] { background: var(--red); border-color: var(--red); color: #fff; }

/* ── страница слова: связанные слова, статьи, соседи по алфавиту ── */
.word-related { display: grid; gap: 4px; }
.word-posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.word-posts a { color: var(--text); font-weight: 600; }
.word-posts a:hover { color: var(--red); }
.word-posts span { display: block; font-size: 13px; color: var(--muted); }
.word-pager, .post-pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.post-pager { grid-template-columns: 1fr 1fr; }
.word-pager a, .post-pager a { display: flex; flex-direction: column; gap: 2px; color: var(--text); text-decoration: none; }
.word-pager a span, .post-pager a span { font-size: 13px; color: var(--muted); }
.word-pager a:hover b, .post-pager a:hover b { color: var(--red); }
.word-pager a[rel="next"], .post-pager a[rel="next"] { text-align: right; align-items: flex-end; }
.word-pager .word-pager-all { color: var(--muted); font-size: 14px; }
.post-sources { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.post-sources h2 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.post-sources ol { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; font-size: 15px; color: var(--muted); }
.post-sources a { color: var(--text); text-underline-offset: 3px; overflow-wrap: anywhere; }
.post-sources a:hover { color: var(--red); }
.post-words { margin-top: 40px; }
.post-words h2 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
@media (max-width: 600px) {
  .word-pager { grid-template-columns: 1fr 1fr; }
  .word-pager .word-pager-all { grid-column: 1 / -1; grid-row: 2; text-align: center; }
}

/* ── тексты по Франку: список и страница текста ── */

.texts-section { padding-top: 16px; }
.texts-group + .texts-group { margin-top: clamp(40px, 5vw, 64px); }
.texts-group h2 { margin-bottom: 20px; font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -0.03em; }
.texts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.text-card-ru { margin-top: 4px; color: var(--muted); font-weight: 500; }

.reader-modes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.reader-modes button {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.reader-modes button:hover { border-color: var(--text); }
.reader-modes button[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.reader-hint { margin-top: 12px; font-size: 14px; color: var(--muted); }

.reader { margin-top: 28px; }
.reader-par + .reader-par { margin-top: 32px; }
.reader .frank-adapted { font-size: 19px; }
.reader .frank-adapted a { color: inherit; text-decoration: none; border-bottom: 1px dotted transparent; }
.reader .frank-adapted a:hover, .reader .frank-adapted a:focus-visible { color: var(--red); border-bottom-color: currentColor; }
[data-reader-mode-active="plain"] .frank-ru,
[data-reader-mode-active="plain"] .frank-original { display: none; }
[data-reader-mode-active="plain"] .frank-adapted b { font-weight: 400; }
.frank-all { margin-top: 28px; }
.frank-sample figcaption a { color: inherit; text-decoration: none; }
.frank-sample figcaption a:hover { color: var(--red); }

/* омонимы на странице слова: rząd¹ «правительство» / rząd² «ряд» */
.word-homonym { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.word-homonym sup, .word-homonym-note sup { font-size: 0.65em; color: var(--red); }
.word-homonym-note {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--red-soft);
  font-size: 15px;
}
.word-homonym-note a { color: var(--text); font-weight: 700; }
.word-homonym-note a:hover { color: var(--red); }
