@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@500;700;800&display=swap");

:root {
  --bg: #f3f4f6;
  --paper: #ffffff;
  --ink: #12151a;
  --muted: #5c6570;
  --line: #e3e6eb;
  --navy: #13293d;
  --blue: #1d4f91;
  --chip: #f7f8fa;
  --shadow: 0 16px 40px rgba(19, 41, 61, 0.08);
  --radius: 18px;
  --max: 1120px;
}
* { box-sizing: border-box; }
html, body { overflow-x: visible; overflow-y: visible; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Manrope, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
a { color: inherit; }
img, svg, pre { max-width: 100%; }
.wrap { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; min-width: 0; }
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(243, 244, 246, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(227, 230, 235, 0.9);
}
.header-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0 10px;
  flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -0.03em; min-height: 44px; }
.mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--navy); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
}
.nav { display: flex; flex-wrap: nowrap; gap: 6px 14px; width: 100%; order: 3; overflow-x: auto; }
.nav a {
  text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 700;
  min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap;
}
.nav a.is-on, .nav a:hover { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  text-decoration: none; font-weight: 700; border: 1px solid transparent;
  font-size: 14px; font-family: inherit; cursor: pointer;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-ghost { background: #fff; border-color: #cfd5dd; color: var(--ink); }
.pack { padding: 28px 0 48px; }
h1 { font-size: 34px; line-height: 1.08; letter-spacing: -0.045em; margin: 0 0 12px; font-weight: 800; text-wrap: balance; }
h2 { font-size: 26px; letter-spacing: -0.04em; margin: 0 0 8px; line-height: 1.15; }
h3 { margin: 18px 0 8px; font-size: 18px; }
.kicker { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--blue); margin: 0 0 10px; }
.kicker i { width: 8px; height: 8px; border-radius: 50%; background: #3d8b6e; display: block; }
.kicker a { color: var(--blue); }
.lead, .prose p, .card p { color: var(--muted); }
.lead { margin: 0 0 16px; font-size: 16.5px; }
.tools { display: grid; gap: 12px; margin: 18px 0; }
.search { display: grid; gap: 6px; font-weight: 700; }
.search input {
  width: 100%; min-height: 48px; border-radius: 14px; border: 1px solid var(--line);
  padding: 12px 14px; font: 16px/1.4 Manrope, sans-serif; background: #fff;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; overflow: visible; }
.chip {
  flex: 0 0 auto; width: auto; max-width: none; overflow: visible; text-overflow: clip;
  min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid #d7e3f7;
  background: #eff6ff; color: #1d4ed8; font-weight: 700; font-family: inherit; white-space: nowrap;
}
.chip.is-on { background: var(--navy); color: #fff; border-color: var(--navy); }
.cards { display: grid; gap: 12px; }
.card, .prose, .gate, .flow, .lesson-list {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
}
.card { padding: 16px; min-height: 160px; display: flex; flex-direction: column; gap: 8px; }
.card h2 { font-size: 20px; }
.card > p:not(.eyebrow) {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3;
  overflow: hidden; margin: 0; min-height: 4.65em;
}
.card h2 a, .lesson-list a { text-decoration: none; }
.eyebrow { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--blue); }
.more { margin-top: auto; font-size: 13px; font-weight: 800; color: var(--blue); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.prose, .gate { padding: 18px 16px; margin-top: 16px; min-width: 0; max-width: 100%; }
.prose ul, .check { margin: 0 0 12px; padding-left: 18px; }
.prose li { margin: 6px 0; }
.prose code { overflow-wrap: anywhere; word-break: break-word; }
.prompt {
  display: block; width: 100%; max-width: 100%; min-width: 0; margin: 0;
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
  overflow-x: hidden; background: var(--chip); border-radius: 14px;
  padding: 14px; font: 15px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink);
}
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.gate p { margin: 0 0 12px; }
.gate-note { color: var(--muted); font-size: 14px; }
.flow { list-style: none; margin: 16px 0; padding: 12px; display: grid; gap: 8px; }
.pack ol.flow,
.pack ol.flow > li { list-style: none; }
.pack ol.flow > li::marker { content: none; }
.flow li { background: var(--chip); border-radius: 12px; padding: 12px 14px; font-weight: 700; }
.lesson-list { list-style: none; margin: 16px 0; padding: 8px; }
.pack ol.lesson-list,
.pack ol.lesson-list > li { list-style: none; }
.pack ol.lesson-list > li::marker { content: none; }
.lesson-list li { display: grid; gap: 2px; padding: 8px; border-bottom: 1px solid var(--line); }
.lesson-list li:last-child { border-bottom: 0; }
.lesson-list span { display: block; font-size: 12px; font-weight: 800; color: var(--blue); text-transform: uppercase; letter-spacing: 0.04em; }
.lesson-list small { color: var(--muted); }
.note, .copy-status { color: var(--muted); font-size: 14px; }
.empty { padding: 12px 0; }
.site-footer { padding: 8px 0 36px; color: var(--muted); font-size: 13px; }
.site-footer a { color: var(--blue); }
@media (min-width: 800px) {
  h1 { font-size: 48px; }
  .nav { order: 0; width: auto; margin-left: 8px; flex: 1; overflow: visible; }
  .cards { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
  .cards { grid-template-columns: 1fr 1fr 1fr; }
  .cards.courses { grid-template-columns: 1fr 1fr; }
}
/* Тема Root подключает style.min.css позже плагина и меняет сетку до 992px.
   Эти правила стоят в том же файле, а сам файл ставится на wp_enqueue_scripts:100,
   чтобы карточки, поиск и чипы на телефоне совпадали с компьютером. */
.entry-content .pack .cards { display: grid; gap: 12px; }
.entry-content .pack article.card {
  float: none; width: auto; max-width: none; margin: 0;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 8px;
}
.entry-content .pack article.card h2 { font-size: 20px; margin: 0; letter-spacing: -0.04em; line-height: 1.15; }
.entry-content .pack .tools,
.entry-content .pack .search input { max-width: none; }
.entry-content .pack .chips { display: flex; flex-wrap: wrap; overflow: visible; max-width: none; }
.entry-content .pack .chip { flex: 0 0 auto; width: auto; max-width: none; overflow: visible; text-overflow: clip; white-space: nowrap; }
.entry-content .pack article.card > p:not(.eyebrow) {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3;
  overflow: hidden; margin: 0; min-height: 4.65em;
}
@media (min-width: 800px) {
  .entry-content .pack .cards { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1100px) {
  .entry-content .pack .cards { grid-template-columns: 1fr 1fr 1fr; }
  .entry-content .pack .cards.courses { grid-template-columns: 1fr 1fr; }
}
