/* Гид к экзамену: те же токены, шапка и подвал, что у лендинга (index.html) */
:root {
  --bg: #FAF7F2; --paper: #FFFFFF; --sand: #F3EDE3; --ink: #1F2328; --muted: #5F6670; --line: #E6DED1;
  --copper: #B4632A; --copper-ink: #8F4A1A; --copper-soft: #F5E6D8;
  --blue: #1F5FA8; --blue-ink: #174A84; --blue-soft: #E3ECF7;
  --read: 'Literata', Georgia, serif; --ui: 'Manrope', system-ui, -apple-system, sans-serif;
  --shadow: 0 1px 2px rgba(31,35,40,.05), 0 8px 28px rgba(31,35,40,.07);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15171A; --paper: #1D2024; --sand: #22262B; --ink: #ECE6DC; --muted: #A5ABB3; --line: #2F343A;
    --copper: #E0915A; --copper-ink: #EBA77A; --copper-soft: #3A2A1E;
    --blue: #7FA9DC; --blue-ink: #9CBDE6; --blue-soft: #1D2A3B;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px rgba(0,0,0,.25);
  }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { background: var(--bg); color: var(--ink); font-family: var(--ui); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lead { font-size: clamp(17px, 2vw, 19px); color: var(--muted); max-width: 680px; }
.star { color: var(--copper); font-weight: 700; }

/* шапка */
header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
header.scrolled { border-bottom-color: var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 17px; }
.logo-mark { width: 34px; height: 34px; flex: none; }
header nav { display: flex; gap: 4px; }
header nav a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--muted); padding: 8px 12px; border-radius: 10px; }
header nav a:hover, header nav a.on { color: var(--ink); background: var(--sand); }
@media (max-width: 860px) { header nav a:not(.on) { display: none; } }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 22px; border-radius: 999px; font: 700 16px/1 var(--ui); text-decoration: none; transition: transform .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-copper { background: var(--copper); color: #fff; box-shadow: 0 6px 18px rgba(180,99,42,.25); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-copper { color: #15171A; } }

/* страница главы: оглавление гида | статья | разделы главы */
.guide { display: grid; grid-template-columns: 230px minmax(0, 720px) 220px; gap: 48px; justify-content: center; padding-top: 36px; padding-bottom: 80px; }
.side, .toc-side { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 104px); overflow-y: auto; scrollbar-width: thin; }
.side .all { display: block; font-weight: 700; font-size: 14px; color: var(--copper); text-decoration: none; margin-bottom: 14px; }
.side-chapters { display: grid; gap: 2px; }
.side-chapters a { display: grid; grid-template-columns: 24px 1fr; gap: 6px; padding: 7px 10px; border-radius: 10px; text-decoration: none; font-size: 14.5px; font-weight: 600; color: var(--muted); line-height: 1.3; }
.side-chapters a:hover { background: var(--sand); color: var(--ink); }
.side-chapters a.on { background: var(--copper-soft); color: var(--copper-ink); }
.toc-side b { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc-side a { display: block; padding: 5px 0 5px 12px; border-left: 2px solid var(--line); font-size: 14px; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc-side a:hover { color: var(--ink); border-left-color: var(--copper); }
.toc-side a.on { color: var(--copper-ink); border-left-color: var(--copper); font-weight: 600; }

article { font-family: var(--read); font-size: 18px; line-height: 1.7; }
.crumbs { font: 600 14px/1.4 var(--ui); color: var(--muted); }
.crumbs a { color: var(--copper); text-decoration: none; }
article h1 { font: 600 clamp(34px, 5vw, 48px)/1.1 var(--read); letter-spacing: -.01em; margin: 12px 0 22px; }
article h2 { font: 600 clamp(24px, 3vw, 30px)/1.2 var(--read); margin: 52px 0 16px; letter-spacing: -.005em; }
article h3 { font: 700 19px/1.3 var(--ui); margin: 32px 0 10px; }
article p { margin: 0 0 16px; }
article b { font-weight: 600; }
article ul, article ol { margin: 0 0 18px 1.3em; }
article li { margin-bottom: 6px; padding-left: 4px; }
article li::marker { color: var(--copper); }
article .note { font: 500 15px/1.5 var(--ui); color: var(--muted); background: var(--sand); border-radius: 12px; padding: 12px 16px; margin-bottom: 22px; }
article .note i { font-style: normal; }
article figure { margin: 24px 0; }
article figure img { width: 100%; border-radius: 16px; border: 1px solid var(--line); }
article figcaption { font: 500 14px/1.4 var(--ui); color: var(--muted); margin-top: 8px; }
.table { overflow-x: auto; margin: 6px 0 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
table { width: 100%; border-collapse: collapse; font: 400 15px/1.5 var(--ui); }
th { text-align: left; font-weight: 700; font-size: 13px; letter-spacing: .03em; color: var(--muted); background: var(--sand); padding: 10px 14px; white-space: nowrap; }
td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
td:first-child { font-weight: 600; min-width: 130px; }
tbody tr:hover td { background: color-mix(in srgb, var(--copper-soft) 35%, transparent); }

details.toc { display: none; margin: 0 0 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); font-family: var(--ui); }
details.toc summary { cursor: pointer; padding: 12px 16px; font-weight: 700; font-size: 15px; list-style: none; }
details.toc summary::-webkit-details-marker { display: none; }
details.toc summary::after { content: ' ▾'; color: var(--muted); }
details.toc div { display: grid; padding: 0 16px 12px; }
details.toc a { padding: 6px 0; font-size: 15px; color: var(--muted); text-decoration: none; border-top: 1px solid var(--line); }

.cta { margin: 48px 0 28px; padding: 22px 24px; border-radius: 18px; background: var(--copper-soft); display: flex; gap: 20px; align-items: center; justify-content: space-between; font-family: var(--ui); }
.cta b { display: block; font-size: 18px; margin-bottom: 4px; }
.cta span { color: var(--muted); font-size: 15px; line-height: 1.5; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-family: var(--ui); }
.pager a { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; font-weight: 700; font-size: 16px; background: var(--paper); line-height: 1.3; }
.pager a:hover { border-color: var(--copper); }
.pager small { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.pager .next { text-align: right; }

@media (max-width: 1180px) {
  .guide { grid-template-columns: 220px minmax(0, 720px); }
  .toc-side { display: none; }
  details.toc { display: block; }
}
@media (max-width: 900px) {
  .guide { grid-template-columns: minmax(0, 1fr); padding-top: 20px; }
  .side { display: none; }
  article { font-size: 17px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .cta { flex-direction: column; align-items: stretch; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { text-align: left; }
  .btn { width: 100%; }
}

/* оглавление гида */
.guide-index { padding-top: 48px; padding-bottom: 80px; max-width: 1120px; }
.guide-index h1 { font: 600 clamp(34px, 5vw, 52px)/1.1 var(--read); margin: 12px 0 18px; letter-spacing: -.01em; }
.chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 36px; }
.chapter { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 16px; text-decoration: none; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, transform .15s; }
.chapter:hover { border-color: var(--copper); transform: translateY(-2px); }
.chapter .n { font: 600 13px/1 var(--ui); color: var(--copper); letter-spacing: .04em; }
.chapter b { font: 600 19px/1.25 var(--read); }
.chapter span { font-size: 14.5px; color: var(--muted); }
.ic { margin-right: .35em; font-style: normal; }
.chapter em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--copper-ink); background: var(--copper-soft); padding: 3px 8px; border-radius: 999px; align-self: flex-start; margin-top: 4px; }

footer { border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 1120px; }
footer a { text-decoration: none; font-weight: 600; }
footer a:hover { color: var(--ink); }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* история: лента событий (/guide/history/) */

.hist-lead { font: 400 18px/1.6 var(--ui); color: var(--muted); max-width: 720px; margin: -6px 0 24px; }

.tl-key { display: grid; grid-template-columns: auto repeat(4, 1fr); gap: 10px; align-items: stretch; margin-bottom: 18px; font-family: var(--ui); }
.tl-key small { align-self: center; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding-right: 4px; }
.tl-key a { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; text-decoration: none; line-height: 1.25; transition: border-color .15s; }
.tl-key a:hover { border-color: var(--copper); }
.tl-key b { display: block; font: 600 24px/1.1 var(--read); color: var(--copper); }
.tl-key span { font-size: 13px; color: var(--muted); }

.tl-controls { font-family: var(--ui); display: grid; gap: 10px; margin-bottom: 8px; }
.tl-search { display: flex; align-items: center; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; }
.tl-search:focus-within { border-color: var(--copper); }
.tl-search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.tl-search input { flex: 1; border: 0; background: none; font: 500 16px/1 var(--ui); color: var(--ink); padding: 14px 0; outline: none; min-width: 0; }
.tl-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.tl-chips button { font: 600 14px/1 var(--ui); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; cursor: pointer; }
.tl-chips button span { color: var(--muted); font-weight: 600; margin-left: 4px; }
.tl-chips button.on { background: var(--copper-soft); border-color: var(--copper); color: var(--copper-ink); }

.tl { list-style: none; margin: 0; padding: 0; font-family: var(--ui); position: relative; }
.tl::before { content: ''; position: absolute; left: 112px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tl > li { position: relative; }
.tl-era { display: flex; gap: 14px; align-items: center; margin: 34px 0 14px; padding-left: 132px; }
.tl-era:first-child { margin-top: 16px; }
.tl-era .n { position: absolute; left: 94px; width: 38px; height: 38px; border-radius: 50%; background: var(--copper); color: #fff; display: grid; place-items: center; font: 700 14px/1 var(--ui); box-shadow: 0 0 0 5px var(--bg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tl-era .n { color: #15171A; } }
.tl-era b { display: block; font: 600 26px/1.15 var(--read); }
.tl-era small { font-size: 14px; color: var(--muted); }
.tl-gap { padding: 2px 0 2px 132px; margin: 4px 0; }
.tl-gap span { font: 600 12.5px/1 var(--ui); color: var(--muted); background: var(--bg); border: 1px dashed var(--line); border-radius: 999px; padding: 5px 10px; display: inline-block; }
.tl-gap::before { content: ''; position: absolute; left: 112px; top: 0; bottom: 0; width: 2px; background: repeating-linear-gradient(var(--bg) 0 4px, transparent 4px 8px); }
.tl-ev { display: grid; grid-template-columns: 100px 1fr; gap: 32px; padding: 7px 0; }
.tl-year { text-align: right; font: 600 17px/1.2 var(--read); color: var(--copper-ink); padding-top: 18px; }
.tl-year.long { font-size: 14.5px; }
.tl-ev::before { content: ''; position: absolute; left: 108px; top: 26px; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); border: 2px solid var(--copper); }
.tl-ev.same .tl-year { visibility: hidden; }
.tl-ev.same::before { width: 6px; height: 6px; left: 110px; top: 28px; border-width: 2px; border-color: var(--line); }
.tl-card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; display: grid; grid-template-columns: 1fr; overflow: hidden; transition: border-color .15s; }
.tl-card.has-img { grid-template-columns: 1fr 168px; }
.tl-ev:target .tl-card { border-color: var(--copper); box-shadow: 0 0 0 3px var(--copper-soft); }
.tl-body { padding: 16px 18px 14px; min-width: 0; }
.tl-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13px; color: var(--muted); font-weight: 600; }
.tl-badge { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 8px; }
.tl-badge.star { background: var(--copper-soft); color: var(--copper-ink); }
.tl-badge.key { background: var(--blue-soft); color: var(--blue-ink); }
.tl-card h3 { font: 600 20px/1.25 var(--read); margin: 6px 0 2px; }
.tl-el { font: italic 400 15px/1.4 var(--read); color: var(--copper); margin: 0 0 6px; }
.tl-sum { font-size: 15.5px; line-height: 1.5; color: var(--ink); margin: 0; }
.tl-more { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); font: 400 16px/1.65 var(--read); }
.tl-more p { margin: 0 0 10px; }
.tl-more p:last-child { margin: 0; }
.tl-actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.tl-actions button { font: 700 13.5px/1 var(--ui); border-radius: 999px; padding: 8px 14px; cursor: pointer; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.tl-open { background: var(--ink) !important; color: var(--bg) !important; border-color: var(--ink) !important; }
.tl-img { position: relative; display: block; width: 100%; padding: 0; border: 0; border-left: 1px solid var(--line); background: none; text-align: left; cursor: zoom-in; font: inherit; }
.tl-img img { width: 100%; height: 100%; object-fit: cover; min-height: 150px; }
.tl-img span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; background: linear-gradient(transparent, rgba(15,17,20,.78)); color: #fff; font-size: 11.5px; font-weight: 700; line-height: 1.2; }
.tl-empty { font-family: var(--ui); color: var(--muted); padding: 24px 0; }

@media (max-width: 900px) {
  .guide.history { grid-template-columns: minmax(0, 1fr); }
  .tl-key { grid-template-columns: repeat(2, 1fr); }
  .tl-key small { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .tl::before { left: 9px; }
  .tl-era { padding-left: 34px; }
  .tl-era .n { left: -8px; width: 34px; height: 34px; font-size: 13px; }
  .tl-era b { font-size: 22px; }
  .tl-gap { padding-left: 34px; }
  .tl-gap::before { left: 9px; }
  .tl-ev { grid-template-columns: 1fr; gap: 4px; padding-left: 34px; }
  .tl-ev::before { left: 5px; top: 8px; }
  .tl-ev.same::before { left: 7px; top: 10px; }
  .tl-year { text-align: left; padding-top: 0; font-size: 16px; }
  .tl-ev.same .tl-year { display: none; }
  .tl-card.has-img { grid-template-columns: 1fr; }
  .tl-img { border-left: 0; border-top: 1px solid var(--line); order: -1; }
  .tl-img img { min-height: 0; aspect-ratio: 16 / 8; }
}

/* ссылки из глав на точки карты */
a.onmap { color: inherit; text-decoration: underline dotted color-mix(in srgb, var(--copper) 70%, transparent); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a.onmap:hover { color: var(--copper); }
a.onmap svg { width: .78em; height: .78em; margin-left: 2px; vertical-align: -.05em; color: var(--copper); }
.onmap-row { font: 500 14px/1.9 var(--ui); color: var(--muted); margin: -4px 0 18px; }
.onmap-row span { font-weight: 700; margin-right: 4px; }
.onmap-row a { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; margin-right: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.onmap-row a:hover { color: var(--copper); }
.onmap-row svg { width: 13px; height: 13px; color: var(--copper); }
.map-teaser { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 0; margin: 4px 0 24px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--paper); text-decoration: none; font-family: var(--ui); transition: border-color .15s; }
.map-teaser:hover { border-color: var(--copper); }
.map-teaser img { width: 100%; height: 100%; object-fit: cover; }
.map-teaser span { padding: 18px 20px; display: grid; gap: 6px; }
.map-teaser b { font-size: 18px; line-height: 1.3; }
.map-teaser small { font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.map-teaser em { font-style: normal; font-weight: 700; color: var(--copper); font-size: 15px; margin-top: 4px; }
@media (max-width: 560px) { .map-teaser { grid-template-columns: 1fr; } }

/* «Госустройство»: интерактивная схема шире обычной главы */
.guide.gov-page { grid-template-columns: 220px minmax(0, 1fr); max-width: 1240px; }
.gov-page .govx h2 { font-family: var(--ui); }
@media (max-width: 980px) { .guide.gov-page { grid-template-columns: minmax(0, 1fr); } .gov-page .side { display: none; } }

/* «← К карте»: пришли в главу из карты — плавающая кнопка возврата к тому же месту */
.map-back { position: fixed; z-index: 40; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font: 700 15px/1.2 var(--ui); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 8px 24px rgba(0,0,0,.22); }
.map-back:hover { filter: brightness(1.15); }

/* липкая строка разделов главы с подсветкой текущего (как эпохи в «Истории») */
.guide nav.secnav { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; position: sticky; top: 64px; z-index: 6;
  background: var(--bg); margin: 0 0 10px; padding: 8px 0; font-family: var(--ui); }
.guide nav.secnav::-webkit-scrollbar { display: none; }
.guide nav.secnav a { flex: none; font-size: 13px; font-weight: 600; line-height: 1.2; text-decoration: none; color: var(--muted); background: var(--paper);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px; }
.guide nav.secnav a:hover { color: var(--ink); border-color: var(--copper); }
.guide nav.secnav a.on { background: var(--copper-soft); border-color: var(--copper); color: var(--copper-ink); }
.guide nav.secnav.m-only { display: none; }
@media (max-width: 1180px) { .guide nav.secnav.m-only { display: flex; } }
html:has(nav.secnav) { scroll-padding-top: 124px; }
@media (min-width: 1181px) { html:has(nav.secnav.m-only) { scroll-padding-top: 84px; } }
/* у справочников свой scroll-margin (для отдельной страницы) — на сайте отступ задаёт scroll-padding под липкой строкой */
.guide :is(.lifex, .econx, .cultx, .govx, .holx) :is(h2, h3, .entry, .uentry) { scroll-margin-top: 0; }

.crumbs .nw { white-space: nowrap; }   /* «глава 8 из 9» не разрывается */

/* «… на карте» — единственный вид ссылки на карту в главах (как плашки справочников) */
.mapchips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 24px; font-family: var(--ui); line-height: 1.2; }
.mapchips > span { display: inline-flex; align-items: center; gap: 4px; margin-right: 2px; font-size: 13px; font-weight: 700; color: var(--muted); }
.mapchips > span svg { width: 14px; height: 14px; color: var(--copper); }
a.mapchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper); font: 700 12.5px/1.2 var(--ui); color: var(--ink); text-decoration: none; }
a.mapchip:hover { border-color: var(--copper); }
a.mapchip img, a.mapchip .pin { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: none; }
a.mapchip .pin { display: grid; place-items: center; background: var(--copper-soft); color: var(--copper); }
a.mapchip .pin svg { width: 12px; height: 12px; }
/* значок 📍 в конце строки таблицы — вместо скрытой ссылки на названии */
a.pinlink { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: 6px; border-radius: 50%; vertical-align: middle;
  background: var(--copper-soft); color: var(--copper); }
a.pinlink svg { width: 13px; height: 13px; }
a.pinlink:hover { background: var(--copper); color: #fff; }
.tl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* увеличенная картинка */
.zoombox { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 16px; background: rgba(15,17,20,.82); cursor: zoom-out; }
.zoombox img { max-width: min(960px, 100%); max-height: 88vh; border-radius: 14px; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.zoombox button { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: #1F2328; font: 400 26px/1 var(--ui); cursor: pointer; }

/* страницы для поиска (build_seo.py): сессии экзамена и районы */
.seo { max-width: 800px; padding-top: 36px; padding-bottom: 80px; }
.seo .lead { margin-bottom: 22px; }
.facts-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 16px; font-family: var(--ui); }
.facts-row div { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.facts-row b { display: block; font: 700 20px/1.2 var(--ui); }
.facts-row span { font-size: 13px; color: var(--muted); }
.topics { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; font: 600 13px/1 var(--ui); }
.topics span { background: var(--sand); border-radius: 999px; padding: 7px 11px; color: var(--muted); }
.toolbar { position: sticky; top: 64px; z-index: 6; display: flex; gap: 10px; align-items: center; padding: 8px 0; margin-bottom: 8px; background: var(--bg); font-family: var(--ui); }
.selftest { flex: none; font: 700 14px/1 var(--ui); color: var(--copper-ink); background: var(--copper-soft); border: 1px solid transparent; border-radius: 999px; padding: 10px 14px; cursor: pointer; }
.selftest:hover { border-color: var(--copper); }
.qnav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.qnav::-webkit-scrollbar { display: none; }
.qnav a { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: var(--paper); text-decoration: none; font: 600 13px/1 var(--ui); color: var(--muted); }
.qnav a:hover { border-color: var(--copper); color: var(--ink); }
.q { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px 16px; margin: 0 0 14px; scroll-margin-top: 124px; }
.q .qn { font: 700 13px/1.2 var(--ui); color: var(--copper); letter-spacing: .03em; margin-bottom: 8px; }
.q h3 { font: 600 19px/1.4 var(--read); margin: 0 0 4px; }
.q .ru { font: 500 15px/1.5 var(--ui); color: var(--muted); margin-bottom: 12px; }
.q .opts { list-style: none; margin: 0 0 12px; display: grid; gap: 6px; font-family: var(--ui); }
.q .opts li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; margin: 0; font-size: 15.5px; line-height: 1.4; }
.q .opts li > b { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--sand); font-size: 12px; color: var(--muted); }
.q .opts li > span { display: flex; flex-direction: column; gap: 2px; }
.q .opts small { font-size: 13.5px; color: var(--muted); }
.q .opts em { font-style: normal; font-size: 12px; font-weight: 700; color: #1E7A46; }
.q .opts li.ok { border-color: #8FCBA6; background: color-mix(in srgb, #2E9E5B 9%, var(--paper)); }
.q .opts li.ok > b { background: #2E9E5B; color: #fff; }
.q .why { font: 400 15.5px/1.6 var(--ui); border-top: 1px dashed var(--line); padding-top: 12px; }
.q .why p { margin: 0 0 8px; }
.q .why .more { font-size: 14px; color: var(--muted); }
.q .why a { color: var(--copper); }
.q .mapchips { margin: 4px 0 4px; }
body.quiz .q:not(.shown) .opts li.ok { border-color: var(--line); background: none; }
body.quiz .q:not(.shown) .opts li.ok > b { background: var(--sand); color: var(--muted); }
body.quiz .q:not(.shown) .opts em, body.quiz .q:not(.shown) .why { display: none; }
body.quiz .q:not(.shown) .opts { cursor: pointer; }
.sessions { columns: 2; font-family: var(--ui); font-size: 15px; }
.places { display: grid; gap: 12px; margin: 8px 0 24px; }
.place { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 12px; scroll-margin-top: 80px; }
.place .pimg img { width: 150px; height: 150px; object-fit: cover; border-radius: 12px; }
.place h3 { font: 600 19px/1.3 var(--read); margin: 4px 0 6px; }
.place h3 span { font: 500 14px/1 var(--ui); color: var(--muted); margin-left: 6px; }
.place em { display: inline-block; font-style: normal; font: 700 12px/1 var(--ui); color: var(--copper-ink); background: var(--copper-soft); padding: 5px 9px; border-radius: 999px; margin-bottom: 8px; }
.place ul { font: 400 15px/1.5 var(--ui); margin: 0 0 8px 1.1em; }
.place .plinks { display: flex; flex-wrap: wrap; gap: 6px 14px; font: 600 13.5px/1.3 var(--ui); margin: 0; }
.place .plinks a { color: var(--copper); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.place .plinks svg { width: 14px; height: 14px; }
.seo .table td small { display: block; margin-top: 4px; color: var(--muted); }
@media (max-width: 640px) {
  .facts-row b { font-size: 16px; }
  .q { padding: 16px 14px 12px; border-radius: 16px; }
  .q h3 { font-size: 17.5px; }
  .place { grid-template-columns: 88px minmax(0, 1fr); gap: 12px; }
  .place .pimg img { width: 88px; height: 88px; }
  .sessions { columns: 1; }
  .selftest { font-size: 13px; padding: 9px 12px; }
}
body.quiz .q.shown .opts li.picked:not(.ok) { border-color: #E3A3A3; background: color-mix(in srgb, #C73E3E 8%, var(--paper)); }
body.quiz .q.shown .opts li.picked:not(.ok) > b { background: #C73E3E; color: #fff; }
.seo .table td small a { color: var(--copper); }

/* новости к экзамену (/news/, пишет knowcyprus/bot/news_feed.py) */
.news .news-date { font: 600 14px/1.4 var(--ui); color: var(--muted); margin: 14px 0 -4px; }
.news-body p { margin: 0 0 16px; }
.news-body blockquote { margin: 0 0 18px; padding: 12px 16px; border-left: 3px solid var(--copper); background: var(--copper-soft); border-radius: 0 12px 12px 0; font: 500 16px/1.55 var(--ui); }
.news-body table { border-collapse: collapse; margin: 0 0 18px; font: 400 15px/1.45 var(--ui); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: block; }
.news-body td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.news-body tr:last-child td { border-bottom: 0; }
.news-body td:first-child { white-space: nowrap; }
.news-body .ht { color: var(--blue); }
.news-quiz { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; margin: 28px 0 0; font-family: var(--ui); }
.news-quiz h2 { font: 700 15px/1.3 var(--ui); color: var(--copper); margin: 0 0 8px; letter-spacing: .02em; }
.news-quiz .el { font: 600 18px/1.45 var(--read); margin: 0 0 10px; }
.news-quiz ol { margin: 0 0 12px 1.6em; font-size: 15.5px; }
.news-quiz summary { cursor: pointer; font-weight: 700; color: var(--copper-ink); }
.news-quiz details { border-top: 1px dashed var(--line); padding-top: 10px; font-size: 15.5px; line-height: 1.55; }
.news-quiz details p { margin: 10px 0; }
.news-quiz li.ok { font-weight: 700; color: #1E7A46; }
.news-tg { font: 500 14px/1.5 var(--ui); color: var(--muted); }
.news-tg a, .news .crumbs a { color: var(--copper); }
.news-list { display: grid; gap: 10px; margin: 26px 0; font-family: var(--ui); }
.news-item { display: flex; flex-direction: column; gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; text-decoration: none; transition: border-color .15s; }
.news-item:hover { border-color: var(--copper); }
.news-item time { font-size: 13px; font-weight: 600; color: var(--muted); }
.news-item b { font: 600 19px/1.3 var(--read); }
.news-item span { font-size: 15px; color: var(--muted); line-height: 1.5; }
.exam-teaser { grid-template-columns: 1fr; }

/* /knowcyprus/ — страница продукта (build_guide.py, product_page); блок бота и карточка экзамена — разметка лендинга, стили оттуда же */
.kc { max-width: 1120px; padding-top: 36px; padding-bottom: 80px; }
.kc h1 { font: 600 clamp(32px, 4.6vw, 50px)/1.12 var(--read); letter-spacing: -.01em; margin: 12px 0 26px; max-width: 900px; }
.kc h2 { font: 600 clamp(26px, 3.4vw, 36px)/1.15 var(--read); letter-spacing: -.01em; margin: 0 0 16px; }
.kc section { padding: clamp(40px, 6vw, 72px) 0 0; }
.kc section > p { font: 17px/1.6 var(--read); margin-top: 16px; }
.kc section > p a, .kc-en a { color: var(--copper); }
.btn-line { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.btn-line:hover { border-color: var(--copper); }
.kc-links { display: flex; flex-wrap: wrap; gap: 10px; }
.kc .bot { margin-top: clamp(40px, 6vw, 72px); border-top: 1px solid var(--line); }
.kc .bot-grid { display: grid; grid-template-columns: 340px 1fr; gap: 64px; align-items: start; }
.kc .bot .tg { order: -1; width: 330px; position: sticky; top: 92px; border-radius: 44px; border: 9px solid #17191C; background: #17191C; box-shadow: 0 24px 60px rgba(31,35,40,.22), 0 2px 6px rgba(31,35,40,.12); overflow: hidden; }
.kc .tg img { display: block; width: 100%; height: auto; border-radius: 35px; }
.kc .bot-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.kc .bot-ava { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font: 600 28px/1 var(--read); color: #fff; background: var(--copper); flex: none; }
.kc .bot-head small { display: block; font-size: 14px; color: var(--muted); font-weight: 600; }
.kc .feats { list-style: none; display: grid; gap: 18px; margin: 32px 0 36px; padding: 0; }
.kc .feats li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; }
.kc .feats .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 21px; background: var(--copper-soft); }
.kc .feats b { display: block; font-size: 17px; margin-bottom: 2px; }
.kc .feats span { color: var(--muted); font-size: 15.5px; }
.kc .price { font-size: 14px; color: var(--muted); margin-top: 14px; }
.kc .exam { max-width: 640px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.kc .exam .tag { align-self: flex-start; font-size: 13px; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: var(--copper-soft); color: var(--copper-ink); }
.kc .exam h3 { font: 600 24px/1.2 var(--read); margin: 0; }
.kc .exam p { color: var(--muted); margin: 0; }
.kc .exam dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 15px; margin: 4px 0 0; }
.kc .exam dt { color: var(--muted); }
.kc .exam dd { font-weight: 600; margin: 0; }
.kc-social { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 16px; }
.kc-social a { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 6px; transition: border-color .15s; }
.kc-social a:hover { border-color: var(--copper); }
.kc-social .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #2AABEE; color: #fff; }
.kc-social .ic.ig { background: linear-gradient(45deg, #F58529, #DD2A7B 55%, #8134AF); }
.kc-social .ic svg { width: 20px; height: 20px; }
.kc-social b { font-size: 17px; }
.kc-social span:last-child { font-size: 14px; color: var(--muted); line-height: 1.45; }
.kc-en { margin-top: 24px; max-width: 800px; color: var(--muted); font-size: 15px; }
@media (max-width: 960px) {
  .kc .bot-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .kc .bot .tg { order: 0; position: static; margin: 0 auto; }
}
@media (max-width: 720px) { .kc-links .btn { width: 100%; } }
@media (max-width: 400px) { .kc .bot .tg { zoom: .86; } }
