/* «Свої в Польщі» — спокійна редакційна сітка.
   Navy + cream + terracotta. Без стокової «юридичної синяви». */
:root {
  --ink: #1b2430;
  --muted: #5c6570;
  --paper: #f6f1e8;
  --paper-2: #fffdf8;
  --line: #e4d8c8;
  --navy: #1f3a5f;
  --navy-2: #16304f;
  --terra: #9a4a2a;
  --terra-2: #7a3b22;
  --green: #2c5f4a;
  --ok: #1f6b4a;
  --warn: #9a5b12;
  --shadow: 0 18px 40px rgba(27, 36, 48, 0.08);
  --radius: 18px;
  --max: 1180px;
  --header-h: 76px;       /* высота строки шапки (задаётся CSS) */
  --header-offset: 77px;  /* реальная высота шапки, обновляет JS в base.html */
}
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;          /* iOS не раздувает шрифт в landscape */
  scroll-padding-top: calc(var(--header-offset) + 12px); /* якоря не уезжают под sticky-шапку */
}
body {
  margin: 0;
  font-family: Manrope, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  overflow-x: clip;                        /* страховка от гориз. скролла; clip не ломает sticky */
}
img { max-width: 100%; height: auto; display: block; }
video, iframe, embed, object, svg { max-width: 100%; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--terra); }
h1, h2, h3, .serif { font-family: "Source Serif 4", Georgia, serif; letter-spacing: -0.02em; overflow-wrap: break-word; }
.wrap { width: min(var(--max), calc(100% - 32px)); margin-inline: auto; }
.skip {
  position: absolute; left: -999px; top: 8px;
}
.skip:focus { left: 12px; background: #fff; padding: 8px 12px; z-index: 9; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246, 241, 232, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex; align-items: center; gap: 24px;
  min-height: var(--header-h);
}
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; min-width: 0; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  background: var(--navy); color: #fff;
  display: grid; place-items: center;
  font-family: "Source Serif 4", serif; font-weight: 700;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: 16px; }
.brand-text small { font-size: 11px; color: var(--muted); max-width: 260px; }
.nav { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; font-weight: 600; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { color: var(--terra); }
.header-actions { margin-left: auto; display: flex; gap: 12px; align-items: center; font-size: 14px; }
.header-actions form { margin: 0; }
.who { color: var(--muted); font-size: 13px; }
.lang-switch { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-weight: 700; font-size: 12px; letter-spacing: 0.06em; text-decoration: none; color: var(--navy); background: var(--paper-2); }
.lang-switch:hover { border-color: var(--terra); color: var(--terra); }
.linkish { background: none; border: 0; color: var(--navy); cursor: pointer; font: inherit; padding: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 10px 16px;
  border: 1px solid var(--navy); color: var(--navy);
  text-decoration: none; font-weight: 600; background: transparent;
  cursor: pointer; white-space: nowrap; font: inherit; font-weight: 600;
}
.btn:hover { background: var(--navy); color: #fff; }
.btn-solid { background: var(--terra); border-color: var(--terra); color: #fff; }
.btn-solid:hover { background: var(--terra-2); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-wide { width: 100%; }

.hero {
  padding: 48px 0 28px;
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 36px; align-items: center;
}
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.16em;
  font-size: 12px; font-weight: 700; color: var(--terra); margin: 0 0 10px;
}
.hero h1 { font-size: clamp(30px, 5vw, 54px); line-height: 1.08; margin: 0 0 16px; }
.lede { font-size: 18px; color: var(--muted); margin: 0 0 22px; }
.hero-photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hero-photo img { width: 100%; height: 360px; object-fit: cover; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.rubricator { padding: 10px 0 40px; }
.rubricator h2 { margin: 0 0 16px; font-size: 28px; }
.rubric-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.rubric-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 100%;
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow);
}
.rubric-card img { width: 100%; height: 168px; object-fit: cover; }
.rubric-body { padding: 16px 18px 18px; }
.rubric-kicker {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--navy);
}
.rubric-card h3 { margin: 6px 0 8px; font-size: 20px; }
.rubric-card p { margin: 0; color: var(--muted); font-size: 14px; }
.meta { font-size: 12px; color: var(--muted); margin-top: 10px; }

.section { padding: 12px 0 48px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.feed { display: grid; gap: 14px; }
.feed-item {
  display: grid; grid-template-columns: 160px 1fr; gap: 16px;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit;
}
.feed-item img { width: 100%; height: 110px; object-fit: cover; }
.feed-item h3 { margin: 12px 12px 6px; font-size: 20px; }
.feed-item p { margin: 0 12px 12px; color: var(--muted); font-size: 14px; }

.layout {
  display: grid; grid-template-columns: 1fr 320px; gap: 32px;
  padding: 36px 0 56px;
}
/* grid-дети по умолчанию min-width:auto → длинный URL/таблица/pre распирает колонку */
.layout > *, .hero-grid > *, .feed-item > *, .topic-row > *,
.form-grid > *, .footer-grid > *, .rubric-grid > *, .stats-grid > * { min-width: 0; }

.prose {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 32px; overflow-wrap: break-word;
}
.prose h1 { margin-top: 0; font-size: clamp(26px, 4vw, 42px); line-height: 1.15; }
.prose h2 { font-size: 26px; margin-top: 28px; }
.prose .lead { font-size: 19px; color: var(--muted); }
.prose a { overflow-wrap: anywhere; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.prose pre, .prose code { white-space: pre-wrap; overflow-wrap: anywhere; }
.prose pre { overflow-x: auto; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.cover { border-radius: 14px; overflow: hidden; margin: 12px 0 22px; }
.cover img { width: 100%; height: min(420px, 52vw); object-fit: cover; }
.badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: #efe4d4; color: var(--navy); padding: 3px 8px; border-radius: 999px;
  white-space: nowrap;
}
.badge-expert { background: #dceae3; color: var(--green); }

.side-card {
  background: var(--navy);
  color: #f6f1e8;
  border-radius: var(--radius);
  padding: 22px;
}
.side-card h2, .side-card p, .side-card label { color: #f6f1e8; }
.side-card .field {
  background: #fff; color: var(--ink); width: 100%;
}
/* форма заявки (includes/lead_card.html) */
.lead-card h2 { margin-top: 0; }
.lead-card label { margin-top: 8px; }
.lead-card textarea { height: 110px; min-height: 80px; resize: vertical; }
.lead-card .btn { margin-top: 14px; }
.lead-card .fine { color: #e8dccb; margin-bottom: 0; }
.lead-card .errorlist { color: #ffc2ad; }

/* ПК: сайдбар с формой едет вместе со скроллом.
   align-self:start обязателен — иначе grid растягивает aside на всю высоту и sticky не работает.
   Если форма выше экрана — скроллится внутри себя, а не обрезается. */
@media (min-width: 921px) {
  .layout > aside {
    position: sticky;
    top: calc(var(--header-offset) + 16px);
    align-self: start;
    max-height: calc(100vh - var(--header-offset) - 32px);
    max-height: calc(100dvh - var(--header-offset) - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    border-radius: var(--radius);
  }
}
/* невысокие экраны ноутбуков (768–900px): ужимаем форму, чтобы кнопка была видна без прокрутки */
@media (min-width: 921px) and (max-height: 900px) {
  .lead-card { padding: 16px 18px; }
  .lead-card h2 { font-size: 20px; line-height: 1.2; margin-bottom: 4px; }
  .lead-card > p { margin: 0 0 4px; font-size: 14px; }
  .lead-card label { margin: 6px 0 3px; font-size: 12px; }
  .lead-card input, .lead-card select { padding: 7px 12px; }
  .lead-card textarea { height: 70px; padding: 7px 12px; }
  .lead-card .btn { margin-top: 10px; padding: 9px 16px; }
  .lead-card .fine { font-size: 11px; line-height: 1.4; margin-top: 8px; }
}

.side-soft {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; margin-top: 16px;
}
.side-soft a { display: block; margin: 8px 0; font-weight: 600; text-decoration: none; }

.field, input, textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; font: inherit; background: #fff;
}
/* глобальный width:100% растягивал чекбоксы/радио из стандартных Django-форм */
input[type="checkbox"], input[type="radio"] {
  width: auto; padding: 0; border-radius: 0; accent-color: var(--terra);
}
input[type="file"] { padding: 8px; }
.field-lg { font-size: 18px; padding: 12px 14px; }
label { display: block; font-size: 13px; font-weight: 600; margin: 10px 0 4px; }
.help { color: var(--muted); font-size: 13px; }
.errorlist { color: var(--terra); padding-left: 16px; }

.comments { margin-top: 36px; }
.comment {
  border-top: 1px solid var(--line); padding: 14px 0;
}
.comment-meta { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.replies { margin-left: 22px; }

.topic-row {
  display: grid; grid-template-columns: 1fr auto; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit;
}
.topic-row h3 { margin: 0 0 4px; font-size: 20px; }

.flashes { padding-top: 12px; }
.flash { background: #e7f3ec; border: 1px solid #b7d7c6; padding: 10px 12px; border-radius: 12px; }
.flash-error { background: #f8e8e2; border-color: #e3b6a6; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 24px;
  background: #efe6d8;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.footer-grid a { display: block; margin: 4px 0; text-decoration: none; color: var(--ink); }
.footer-label { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.fine { font-size: 13px; color: var(--muted); }
.footer-bottom { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--line); }

.auth-box { max-width: 460px; margin: 48px auto; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }

.dash-tabs {
  display: flex; gap: 8px; margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;   /* вкладки скроллятся, а не распирают страницу */
}
.dash-tabs::-webkit-scrollbar { display: none; }
.dash-tab {
  padding: 10px 18px; font-weight: 600; text-decoration: none;
  color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
  white-space: nowrap; flex: none;
}
.dash-tab:hover { color: var(--terra); }
.dash-tab.is-active { color: var(--navy); border-bottom-color: var(--terra); }

.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
}
.stat-label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--navy);
}
.stat-value {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 40px; line-height: 1.1; margin: 6px 0;
}
.stat-value.is-warn { color: var(--terra); }

.dash-panel {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 28px;
}

/* форма: центрируем как .wrap и задаём единый вид */
.article-form {
  width: min(var(--max), calc(100% - 32px));
  margin: 24px auto 48px;
}
.form-section { margin-bottom: 18px; }
.form-section h2 { margin: 0 0 16px; font-size: 22px; }
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  align-items: start;
}
.form-row { margin-bottom: 14px; }
.form-row:last-child { margin-bottom: 0; }
.form-row > label { margin: 0 0 6px; }

/* все поля одного размера, включая заголовок */
.article-form .field {
  font-size: 16px; padding: 10px 14px; border-radius: 12px;
}
.article-form textarea.field { resize: vertical; line-height: 1.5; }

/* чекбоксы: квадрат слева, подпись справа */
.check {
  display: flex; align-items: center; gap: 10px;
  margin: 0; font-weight: 600; cursor: pointer;
}
.check input[type="checkbox"] {
  width: 18px; height: 18px; flex: none; margin: 0;
  accent-color: var(--terra);
}

.form-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

.dash-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; gap: 12px; flex-wrap: wrap;
}
.dash-toolbar h2 { margin: 0; font-size: 24px; }

.table-wrap {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  overflow-x: auto; margin-bottom: 48px;
  -webkit-overflow-scrolling: touch;
}
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
  text-align: left; padding: 14px 16px; white-space: nowrap;
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--navy);
  background: #efe6d8; border-bottom: 1px solid var(--line);
}
.data-table td {
  padding: 12px 16px; vertical-align: middle;
  border-bottom: 1px solid var(--line);
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbf6ec; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table.top td { vertical-align: top; }
.cell-title { font-weight: 600; min-width: 220px; max-width: 340px; }
.empty-row { text-align: center; color: var(--muted); padding: 32px 16px; }

.thumb {
  width: 72px; height: 48px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line);
}
.thumb-empty {
  display: grid; place-items: center; color: var(--muted);
  background: #efe6d8;
}

.row-actions { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.row-actions form { margin: 0; }
.btn-danger { border-color: var(--terra); color: var(--terra); }
.btn-danger:hover { background: var(--terra); color: #fff; }

.badge.status-published { background: #dceae3; color: var(--green); }
.badge.status-draft { background: #f3e6c8; color: var(--warn); }
.badge.status-archived { background: #e6e2da; color: var(--muted); }
.tag-yes { color: var(--ok); font-weight: 600; }
.tag-no { color: var(--terra); font-weight: 600; }

.share-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
}
.share-fb { background: #1877f2; }
.share-li { background: #0a66c2; }

/* ===== Ліди ===== */
.muted { color: var(--muted); font-size: 12px; }
.badge.lead-new { background: #dde6f2; color: var(--navy); }
.badge.lead-in_progress { background: #f3e6c8; color: var(--warn); }
.badge.lead-done { background: #dceae3; color: var(--green); }
.badge.lead-spam { background: #e6e2da; color: var(--muted); }
.lead-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.lead-stats a { text-decoration: none; }
.lead-stats .badge { font-size: 12px; padding: 5px 10px; }
.lead-stats .badge.is-active { outline: 2px solid var(--terra); outline-offset: 1px; }
.lead-filters {
  display: grid; grid-template-columns: 2fr repeat(3, 1fr) auto auto;
  gap: 8px; align-items: center; margin-bottom: 12px;
}
.lead-filters .btn { height: 100%; }
.lead-msg summary { cursor: pointer; color: var(--muted); }
.lead-msg pre {
  white-space: pre-wrap; overflow-wrap: anywhere; font: inherit;
  margin: 6px 0 0; max-width: 420px;
}
.lead-contacts a { overflow-wrap: anywhere; }
.crm-ok { color: var(--ok); font-weight: 700; }
.crm-fail { color: var(--terra); font-weight: 700; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin: -24px 0 48px; }

/* ===== Адаптив ===== */
@media (max-width: 920px) {
  :root { --header-h: 60px; --header-offset: 100px; }
  .hero-grid, .layout, .rubric-grid, .footer-grid, .feed-item { grid-template-columns: 1fr; }
  .rubric-grid { grid-template-columns: 1fr 1fr; }
  .layout { padding: 24px 0 40px; gap: 20px; }
  .hero-photo img { height: 240px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }

  /* шапка: бренд + кнопки в одну строку, меню — горизонтальный скролл.
     Раньше меню переносилось в 3–4 строки и sticky-шапка съедала пол-экрана */
  .header-row { flex-wrap: wrap; gap: 8px 12px; min-height: 0; padding: 10px 0 0; }
  .brand-text small { display: none; }
  .brand-text strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand { flex: 1 1 0; }
  .header-actions { margin-left: auto; gap: 8px; flex-wrap: nowrap; justify-content: flex-end; }
  .nav {
    order: 3; width: 100%; flex-wrap: nowrap; gap: 18px;
    overflow-x: auto; scrollbar-width: none; padding: 4px 0 10px;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; flex: none; }

  .lead-filters { grid-template-columns: 1fr 1fr; }
  .lead-filters input[type="search"] { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  /* таблица → карточки (только для .data-table.stack, td нужен data-label) */
  .table-wrap:has(.stack) { overflow: visible; background: none; border: 0; box-shadow: none; }
  .data-table.stack thead { display: none; }
  .data-table.stack, .data-table.stack tbody,
  .data-table.stack tr, .data-table.stack td { display: block; width: 100%; }
  .data-table.stack tr {
    background: var(--paper-2); border: 1px solid var(--line);
    border-radius: 14px; padding: 12px 14px; margin-bottom: 12px;
  }
  .data-table.stack tbody tr:hover { background: var(--paper-2); }
  .data-table.stack td { border: 0; padding: 6px 0; }
  .data-table.stack td[data-label]::before {
    content: attr(data-label); display: block;
    font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--muted); margin-bottom: 2px;
  }
  .data-table.stack .cell-title { min-width: 0; max-width: none; }
  .data-table.stack .lead-msg pre { max-width: none; }
  .pager { margin-top: 0; }
}

@media (max-width: 560px) {
  .wrap, .article-form { width: calc(100% - 24px); }
  .who { display: none; }
  .header-actions .btn-sm { padding: 6px 10px; font-size: 12px; }

  .hero { padding: 28px 0 16px; }
  .lede { font-size: 16px; }
  .hero-actions .btn { flex: 1; }
  .rubric-grid { grid-template-columns: 1fr; }
  .rubric-card img { height: 150px; }
  .feed-item img { height: 180px; }

  .prose { padding: 20px 16px; border-radius: 14px; }
  .prose h2 { font-size: 22px; }
  .prose .lead { font-size: 17px; }
  .dash-panel { padding: 18px 16px; }
  .auth-box { margin: 24px auto; padding: 20px 16px; }
  .side-card { padding: 18px; }
  .replies { margin-left: 12px; }

  .stats-grid { gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 30px; }
  .form-actions .btn { flex: 1; }
  .dash-tab { padding: 10px 12px; }

  /* < 16px в инпуте → iOS зумит страницу при фокусе */
  input, textarea, select, .field { font-size: 16px; }
}
.comment-replies {
  margin-left: 1.5rem;
  padding-left: 1rem;
  border-left: 2px solid var(--line);
}

@media (max-width: 560px) {
  .comment { padding: 10px 0; }
  .comment-meta { font-size: 12px; }
  .comment p { margin: 4px 0 6px; }

  .comment-replies {
    margin-left: 4px;
    padding-left: 10px;
  }
  /* с 3-го уровня отступ больше не растёт */
  .comment-replies .comment-replies .comment-replies {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }
}
/* ---- Аналітика (dashboard) ---- */
.an-subnav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.an-subnav a { padding: 6px 14px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--muted); border: 1px solid var(--line); background: var(--paper-2); }
.an-subnav a.is-active { color: #fff; background: var(--navy); border-color: var(--navy); }
.an-period { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 20px; }
.an-period .badge { text-decoration: none; font-size: 13px; padding: 6px 12px; }
.an-period .badge.is-active { outline: 2px solid var(--terra); outline-offset: 1px; }
.an-custom { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.an-custom input[type="date"] { font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-2); }
.an-stats-2 { grid-template-columns: 1fr 2fr; }
.an-h { font-size: 20px; margin: 24px 0 12px; }
.an-panel { margin-bottom: 18px; }
.an-panel .an-h { margin-top: 0; }
.an-chart { margin: 0; }
.an-chart svg { width: 100%; height: auto; display: block; }
.an-grid { stroke: var(--line); stroke-width: 1; }
.an-axis { fill: var(--muted); font-size: 11px; font-family: Manrope, system-ui, sans-serif; }
.an-line { fill: none; stroke: var(--navy); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.an-bar { fill: var(--terra); }
.an-dot { fill: var(--navy); stroke: var(--paper-2); stroke-width: 2; opacity: 0; }
.an-hit:hover .an-dot { opacity: 1; }
.an-hit:hover rect { fill: rgba(31, 58, 95, 0.06); }
.an-table { margin-top: 8px; font-size: 13px; }
.an-table summary { cursor: pointer; color: var(--muted); }
.an-barcell { width: 30%; min-width: 80px; }
.an-hbar { display: block; height: 8px; border-radius: 4px; background: var(--navy); min-width: 2px; }
@media (max-width: 760px) { .an-stats-2 { grid-template-columns: 1fr; } }
.an-custom input[type="date"] { width: auto; flex: none; }
.an-barcell { vertical-align: middle; }
.an-hbar { margin-top: 2px; }
.an-two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.an-two > * { min-width: 0; }
.an-kinds { margin-bottom: 8px; }
.an-filters { margin-bottom: 12px; }
@media (max-width: 900px) { .an-two { grid-template-columns: 1fr; } }
.an-rows td.an-barcell { vertical-align: middle; }
.an-rows .an-hbar { margin-top: 0; }

/* ---- Банер згоди на cookies ---- */
.consent-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1000; max-width: 760px; margin: 0 auto; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 18px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.consent-banner[hidden] { display: none; }
.consent-text { margin: 0; font-size: 14px; flex: 1 1 320px; }
.consent-actions { display: flex; gap: 8px; }
@media (max-width: 480px) { .lang-switch { padding: 3px 8px; letter-spacing: 0; } }
