/* ============================================================
   Новинар — дизайн у стилі «Української правди»
   Токени зняті з живого pravda.com.ua:
   бордовий rgb(126,0,25), Fira Sans (текст) / Open Sans (акциденція),
   контейнер 1265px, колонки 945/300, сірий футер #efefef.
   ============================================================ */
:root {
  --c-accent: #7e0019;
  --c-accent-dark: #5d0013;
  --c-text: #111;
  --c-text-soft: #4a4a4a;
  --c-muted: #6b6b6b;       /* 4.9:1 на білому — WCAG AA */
  --c-tag: #767676;         /* 4.5:1 — для 10–11px тегів */
  --c-visited: #6a6a6a;
  --c-line: #e5e5e5;
  --c-line-dark: #d5d5d5;
  --c-bg: #fff;
  --c-bg-soft: #f7f7f7;
  --c-footer: #efefef;
  --c-panel: #fff;
  --c-logo: #000;
  --c-like: #1a7f37;
  --c-dislike: #b35900;
  --c-like-bg: #eaf5ee;
  --c-dislike-bg: #fdf2e7;
  --c-warn-bg: #fff7e0;
  --c-warn-fg: #9a6700;
  --c-err-bg: #fdf0f0;
  --c-updated-bg: #f2faf4;
  --c-updated-line: #bfe0c9;
  --w-container: 1265px;
  --w-side: 300px;
  --font-body: "Fira Sans", system-ui, sans-serif;
  --font-head: "Open Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--c-text);
  background: var(--c-bg);
  font-size: 16px;
  line-height: 1.45;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  overflow-x: hidden;
}
a { color: var(--c-text); }
a:hover { color: var(--c-accent); }
img { max-width: 100%; }
code { font-size: 0.85em; color: var(--c-muted); }

.container { max-width: var(--w-container); width: 100%; margin: 0 auto; padding: 0 16px; }

/* ---------- Шапка: три смуги, як в УП ---------- */
.site-header { flex: none; }

.utility-bar { border-bottom: 1px solid var(--c-line); background: var(--c-bg); }
.utility-inner { display: flex; align-items: center; justify-content: space-between; height: 32px; }
.utility-date { font-size: 11.5px; color: var(--c-muted); text-transform: capitalize; }
.utility-right { display: flex; align-items: center; gap: 14px; }
.utility-link {
  font-family: var(--font-body); font-size: 11px; font-weight: 500;
  letter-spacing: 0.4px; text-transform: uppercase;
  color: var(--c-accent); text-decoration: none;
}
.utility-link:hover { text-decoration: underline; }
.lang-toggle {
  font-family: var(--font-body); font-size: 10.5px; font-weight: 600; letter-spacing: 0.4px;
  border: 1px solid var(--c-line-dark); background: var(--c-panel);
  color: var(--c-text-soft); padding: 2px 8px; cursor: pointer; border-radius: 2px;
}
.lang-toggle:hover { border-color: var(--c-accent); color: var(--c-accent); }
body.lang-orig .lang-toggle { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }

.logo-band { display: flex; align-items: baseline; gap: 16px; padding: 16px 16px 14px; }
.logo {
  font-family: var(--font-head); font-weight: 800; font-size: 38px; line-height: 1;
  letter-spacing: 1.5px; text-transform: uppercase; text-decoration: none; color: var(--c-logo);
}
.logo:hover { color: var(--c-logo); }
.logo-tagline { font-size: 11.5px; color: var(--c-muted); }

.topic-bar { background: var(--c-accent); }
.topic-menu { display: flex; overflow-x: auto; scrollbar-width: none; }
.topic-menu::-webkit-scrollbar { display: none; }
.topic-link {
  font-family: var(--font-head); font-weight: 700; font-size: 16px;
  text-transform: uppercase; letter-spacing: 0.3px;
  color: #fff; text-decoration: none; white-space: nowrap;
  padding: 13px 13px 10px; border-bottom: 3px solid transparent;
}
.topic-link:hover { background: var(--c-accent-dark); color: #fff; }
.topic-link.active { background: var(--c-accent-dark); border-bottom-color: #fff; color: #fff; }

/* ---------- Розкладка ---------- */
.layout {
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--w-side);
  gap: 36px;
  align-items: start;
  padding-top: 22px;
  padding-bottom: 40px;
}
.main-col { min-width: 0; }
.section-title { font-family: var(--font-head); font-size: 22px; font-weight: 800; margin: 4px 0 6px; }

/* ---------- Лід-блок ---------- */
.lead-story {
  display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 22px;
  padding-bottom: 20px; margin-bottom: 14px; border-bottom: 1px solid var(--c-line);
}
.lead-story.no-img { grid-template-columns: 1fr; }
.lead-story.no-img .lead-media { display: none; }
.lead-media { display: block; }
.lead-media img { width: 100%; height: 214px; object-fit: cover; display: block; }
.lead-title { margin: 6px 0 8px; }
.lead-title a {
  font-family: var(--font-body); font-weight: 600; font-size: 24px; line-height: 1.22;
  text-decoration: none;
}
.lead-title a:hover { text-decoration: underline; }
.lead-summary { margin: 0 0 10px; font-size: 15px; color: var(--c-text-soft); line-height: 1.5; }
.lead-meta { font-size: 12px; color: var(--c-muted); }

.rubric-link {
  font-family: var(--font-body); font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--c-accent); text-decoration: none;
}
.rubric-link:hover { text-decoration: underline; color: var(--c-accent); }

/* ---------- Стрічка ---------- */
.date-header {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-head); font-size: 14px; font-weight: 700;
  color: var(--c-text); margin: 24px 0 4px; text-transform: capitalize;
}
.date-header::after { content: ""; flex: 1; border-bottom: 1px solid var(--c-line-dark); }

.news-item { border-bottom: 1px solid var(--c-line); }
.news-item:last-child { border-bottom: none; }
.news-line { display: flex; gap: 12px; padding: 13px 0; }
.news-time {
  flex: none; width: 42px; padding-top: 3px;
  font-size: 12px; color: var(--c-muted); font-variant-numeric: tabular-nums;
}
.news-main { min-width: 0; flex: 1; }
.news-title {
  font-size: 19px; line-height: 1.32; font-weight: 400;
  text-decoration: none; display: inline-block;
}
.news-title:visited { color: var(--c-visited); }
.news-title:hover { color: var(--c-accent); text-decoration: underline; }
.news-item.is-hidden { opacity: 0.4; }

/* Градація важливості — як у стрічці УП */
.imp-important .news-title, .imp-important .brief-title { font-weight: 700; }
.imp-urgent .news-title, .imp-urgent .brief-title { font-weight: 700; color: var(--c-accent); }
.imp-urgent .news-title:visited, .imp-urgent .brief-title:visited { color: var(--c-accent-dark); }
.imp-urgent .news-time { color: var(--c-accent); font-weight: 600; }
.imp-breaking .news-title, .imp-breaking .brief-title {
  font-family: var(--font-head);
  font-weight: 800; font-size: 25px; line-height: 1.22; color: var(--c-accent);
}
.imp-breaking .news-title:visited, .imp-breaking .brief-title:visited { color: var(--c-accent); }
.imp-breaking .news-time { color: var(--c-accent); font-weight: 700; }
.updated-tag {
  font-family: var(--font-head); font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.4px;
  color: var(--c-like); border: 1px solid var(--c-updated-line); background: var(--c-updated-bg);
  padding: 1px 6px; border-radius: 2px; margin-left: 8px; white-space: nowrap;
}
.brief-item .updated-tag { margin-left: 6px; }

.breaking-tag {
  font-family: var(--font-head); font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.8px; color: #fff;
  background: var(--c-accent); display: inline-block;
  padding: 2px 8px; border-radius: 2px; margin-bottom: 5px;
}

/* ---------- Стрічка-брів (/news) ---------- */
.brief-list { margin-bottom: 6px; }
.brief-item { display: flex; gap: 12px; padding: 6px 0; }
.brief-item.is-hidden { opacity: 0.4; }
.brief-item .news-time { padding-top: 2px; }
.brief-main { min-width: 0; flex: 1; display: block; }
.brief-title { font-size: 17px; line-height: 1.35; font-weight: 400; text-decoration: none; }
.brief-title:visited { color: var(--c-visited); }
.brief-title:hover { color: var(--c-accent); text-decoration: underline; }
.brief-src { font-size: 11px; color: var(--c-tag); margin-left: 8px; white-space: nowrap; }
.brief-item .controls { display: inline-flex; margin-left: 10px; vertical-align: middle; }
.brief-item .ctrl { opacity: 0.28; font-size: 12px; padding: 0 4px; }
.brief-item:hover .ctrl { opacity: 0.7; }
.ctrl:focus-visible { opacity: 1; outline: 2px solid var(--c-accent); outline-offset: 1px; }
.brief-item.imp-breaking { padding: 12px 0; }

.sum { margin: 5px 0 0; font-size: 14px; color: var(--c-text-soft); line-height: 1.5; }
body.lang-uk .sum-orig, body.lang-uk .lead-summary.sum-orig { display: none; }
body.lang-orig .sum-uk, body.lang-orig .lead-summary.sum-uk { display: none; }
body.lang-uk .news-item.show-orig .sum-orig { display: block; }
body.lang-uk .news-item.show-orig .sum-uk { display: none; }
body.lang-orig .news-item.show-uk .sum-uk { display: block; }
body.lang-orig .news-item.show-uk .sum-orig { display: none; }

.news-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 6px; font-size: 12px; }
.news-source { color: var(--c-muted); text-decoration: none; }
.news-source:hover { color: var(--c-accent); text-decoration: underline; }
.lang-tag { color: var(--c-tag); font-size: 10.5px; letter-spacing: 0.5px; }

.controls { margin-left: auto; display: flex; gap: 2px; }
.ctrl {
  font-family: var(--font-body); font-size: 13px;
  border: 1px solid transparent; background: none; cursor: pointer;
  padding: 2px 6px; border-radius: 3px; color: var(--c-muted);
  filter: grayscale(1); opacity: 0.3; transition: opacity 0.15s;
}
.news-item:hover .ctrl, .article-controls .ctrl { opacity: 0.75; }
.ctrl:hover { border-color: var(--c-line-dark); background: var(--c-bg-soft); filter: none; opacity: 1; }
.reacted-like .ctrl-like { filter: none; opacity: 1 !important; border-color: var(--c-like); background: var(--c-like-bg); }
.reacted-dislike .ctrl-dislike { filter: none; opacity: 1 !important; border-color: var(--c-dislike); background: var(--c-dislike-bg); }
/* На тач-екранах :hover не спрацьовує — показуємо контроли одразу */
@media (hover: none) {
  .ctrl { opacity: 0.7; }
  .brief-item .ctrl { opacity: 0.7; }
}

.also-about { margin-top: 6px; font-size: 12px; color: var(--c-muted); }
.also-about a { color: var(--c-text-soft); }
.older-link {
  display: inline-block; margin: 22px 0 6px; font-size: 14px; font-weight: 500;
  color: var(--c-accent); text-decoration: none;
}
.older-link:hover { text-decoration: underline; }
.empty-state { padding: 46px 0; color: var(--c-muted); font-size: 15px; }
.empty-state a { color: var(--c-accent); }

/* ---------- Сайдбар ---------- */
.sidebar { display: flex; flex-direction: column; gap: 26px; }
.side-box { border-top: 3px solid var(--c-accent); padding-top: 10px; }
.side-box-muted { border-top-color: var(--c-line-dark); }
.side-title {
  font-family: var(--font-head); font-size: 13px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.6px; margin: 0 0 12px; color: var(--c-text);
}
.popular-list { list-style: none; counter-reset: pop; margin: 0; padding: 0; }
.popular-list li {
  counter-increment: pop; display: flex; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--c-line);
}
.popular-list li:last-child { border-bottom: none; }
.popular-list li::before {
  content: counter(pop);
  font-family: var(--font-head); font-weight: 800; font-size: 20px; line-height: 1.1;
  color: var(--c-accent); flex: none; width: 18px;
}
.popular-list a { font-size: 14.5px; font-weight: 500; line-height: 1.35; text-decoration: none; }
.popular-list a:hover { color: var(--c-accent); text-decoration: underline; }

.filter-form { display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; }
.filter-form select {
  width: 100%; padding: 5px 6px; font-family: var(--font-body); font-size: 13px;
  border: 1px solid var(--c-line-dark); border-radius: 2px; background: var(--c-panel);
}
.check { display: flex; align-items: center; gap: 6px; }
.check.inline { display: inline-flex; margin-right: 12px; }
.agent-note { font-size: 13px; color: var(--c-text-soft); margin: 0 0 8px; }
.side-more { font-size: 12.5px; color: var(--c-accent); text-decoration: none; }
.side-more:hover { text-decoration: underline; }
.run-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-like); animation: pulse 1.2s infinite; vertical-align: middle;
}
@keyframes pulse { 50% { opacity: 0.3; } }

/* ---------- Кнопки ---------- */
.btn {
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  border: 1px solid var(--c-accent); color: var(--c-accent); background: var(--c-panel);
  padding: 7px 16px; cursor: pointer; border-radius: 2px; text-decoration: none; display: inline-block;
}
.btn:hover { background: var(--c-accent); color: #fff; }
.btn-primary { background: var(--c-accent); color: #fff; }
.btn-primary:hover { background: var(--c-accent-dark); color: #fff; }
.btn:disabled { opacity: 0.5; cursor: default; }

/* ---------- Сторінка статті ---------- */
.article-page { max-width: 720px; }
.article-meta-top { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin-bottom: 6px; }
.article-time { font-size: 12.5px; color: var(--c-muted); }
.article-title {
  font-family: var(--font-head); font-size: 31px; font-weight: 800; line-height: 1.2;
  margin: 4px 0 10px;
}
.article-orig-title { color: var(--c-muted); font-style: italic; font-size: 15px; margin: 0 0 16px; }
/* width:auto — малі RSS-мініатюри не розтягуються до розмиття;
   повнорозмірні og:image самі займуть доступну ширину через max-width */
.article-media { margin: 18px 0; text-align: center; }
.article-media img { width: auto; max-width: 100%; max-height: 480px; display: inline-block; }
.article-lead { font-size: 17.5px; line-height: 1.55; margin: 14px 0; }
.summary-block { border-left: 3px solid var(--c-line-dark); padding: 2px 0 2px 14px; margin: 18px 0; }
.summary-label {
  font-family: var(--font-head); font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--c-muted); margin: 0 0 5px;
}
.summary-block p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--c-text-soft); }
.read-source { margin: 22px 0; }
.btn-source { font-size: 15px; padding: 10px 20px; }
.article-controls { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--c-line); }
.article-controls .controls { margin-left: 0; gap: 8px; }
.article-controls .ctrl { font-size: 14px; border-color: var(--c-line); opacity: 0.85; }
.why-selected { font-size: 12.5px; color: var(--c-muted); margin-top: 14px; }

/* ---------- Налаштування / Агент ---------- */
.set-box { border: 1px solid var(--c-line); border-top: 3px solid var(--c-accent); padding: 18px; margin: 0 0 18px; }
.set-box h2 { font-family: var(--font-head); font-size: 16px; font-weight: 800; margin: 0 0 12px; }
.set-box h3 { font-family: var(--font-head); font-size: 14px; font-weight: 700; margin: 18px 0 8px; }
.set-box label { display: block; margin: 9px 0; font-size: 14px; }
.set-box input[type="text"], .set-box input[type="number"], .set-box input[type="url"],
.set-box select, .set-box textarea {
  font-family: var(--font-body); font-size: 14px;
  padding: 6px 8px; border: 1px solid var(--c-line-dark); border-radius: 2px;
  margin-top: 3px; display: block; width: 100%; max-width: 420px; background: var(--c-panel);
}
.set-box textarea { max-width: 620px; }
.hint { font-size: 12.5px; color: var(--c-muted); margin: 4px 0 10px; }
.theme-schedule { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
.theme-schedule label { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.theme-schedule input[type="time"] { width: auto; display: inline-block; margin: 0; }
.topic-row { display: flex; align-items: center; gap: 12px; padding: 3px 0; }
.topic-row .check { margin: 0; flex: 1; }
.topic-row .topic-weight { width: 70px; display: inline-block; margin: 0; }
.save-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.save-status { font-size: 13.5px; color: var(--c-like); }
.save-status.err { color: var(--c-accent); }
.sources-table, .runs-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.sources-table th, .runs-table th {
  font-family: var(--font-head); font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.4px; color: var(--c-muted);
  text-align: left; padding: 7px 8px; border-bottom: 2px solid var(--c-line-dark);
}
.sources-table td, .runs-table td { padding: 7px 8px; border-bottom: 1px solid var(--c-line); vertical-align: top; }
.add-source { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.add-source input, .add-source select { width: auto; display: inline-block; margin: 0; }
.add-source input[name="feed_url"] { flex: 1; min-width: 220px; }
.source-sick { background: var(--c-err-bg); }
.err-cell { color: var(--c-accent); font-size: 12px; max-width: 260px; overflow-wrap: anywhere; }

.run-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.run-hint { margin: 0; margin-left: auto; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.nowrap { white-space: nowrap; }
.live-log, .run-log {
  background: #1b1b1b; color: #d8d8d8; font-size: 12px; line-height: 1.5;
  padding: 12px; border-radius: 3px; overflow-x: auto; white-space: pre-wrap;
  max-height: 320px; overflow-y: auto; margin: 12px 0 0;
}
.status-badge { font-size: 11px; padding: 2px 7px; border-radius: 2px; text-transform: uppercase; font-weight: 700; letter-spacing: 0.3px; }
.s-success { background: var(--c-like-bg); color: var(--c-like); }
.s-running, .s-partial { background: var(--c-warn-bg); color: var(--c-warn-fg); }
.s-error, .s-aborted { background: var(--c-err-bg); color: var(--c-accent); }
.log-row pre { max-height: 260px; }

/* ---------- Футер ---------- */
.site-footer { background: var(--c-footer); border-top: 1px solid var(--c-line-dark); margin-top: auto; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; padding-top: 34px; padding-bottom: 34px; }
.footer-logo {
  font-family: var(--font-head); font-weight: 800; font-size: 19px;
  letter-spacing: 1px; text-transform: uppercase; color: var(--c-logo);
}
.footer-note { font-size: 12.5px; color: var(--c-text-soft); max-width: 480px; margin: 8px 0 0; line-height: 1.5; }
.footer-nav { display: flex; gap: 20px; align-items: flex-start; padding-top: 4px; }
.footer-nav a { font-size: 13px; color: var(--c-text-soft); text-decoration: none; }
.footer-nav a:hover { color: var(--c-accent); text-decoration: underline; }

/* ---------- Тост ---------- */
.toast[hidden] { display: none; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #222; color: #fff; padding: 10px 18px; border-radius: 4px;
  font-size: 14px; z-index: 50; display: flex; gap: 14px; align-items: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.toast button { background: none; border: none; color: #ffb3c0; cursor: pointer; font-size: 14px; text-decoration: underline; }

/* ---------- Адаптив ---------- */
@media (max-width: 700px) {
  .col-m-hide { display: none; }
  .runs-table, .sources-table { font-size: 12.5px; }
  .runs-table th, .runs-table td, .sources-table th, .sources-table td { padding: 6px 5px; }
  .err-cell { max-width: 140px; }
  .set-box { padding: 12px; }
  .run-hint { margin-left: 0; width: 100%; }
}

@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; gap: 30px; }
  .sidebar { order: 2; }
  .logo { font-size: 27px; }
  .logo-tagline { display: none; }
  .logo-band { padding: 12px 16px 10px; }
  .topic-link { font-size: 14px; padding: 11px 10px 8px; }
  .lead-story { grid-template-columns: 1fr; gap: 12px; }
  .lead-media img { height: auto; max-height: 230px; }
  .lead-title a { font-size: 21px; }
  .news-time { width: 40px; }
  .footer-inner { flex-direction: column; gap: 14px; }
  .utility-date { display: none; }
  .utility-inner { justify-content: flex-end; }
}

/* color-scheme слідує ОБРАНІЙ темі, а не ОС — інакше при «завжди світла» на
   темному пристрої браузер малює темні контроли форм на світлих панелях */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* ---------- Темна тема ----------
   Керує інлайн-скрипт у <head>, ставлячи data-theme на <html> (анти-мерехтіння).
   Бордовий акцент трохи світлішає для контрасту на темному тлі. */
:root[data-theme="dark"] {
  --c-accent: #e5567a;
  --c-accent-dark: #c73e63;
  --c-text: #e8e8ea;
  --c-text-soft: #b7b7bd;
  --c-muted: #9a9aa2;
  --c-tag: #8f8f97;
  --c-visited: #9a90a0;
  --c-line: #2c2c31;
  --c-line-dark: #3a3a41;
  --c-bg: #16161a;
  --c-bg-soft: #1e1e23;
  --c-footer: #121216;
  --c-panel: #1e1e23;
  --c-logo: #f2f2f4;
  --c-like: #4ac26b;
  --c-dislike: #e0913f;
  --c-like-bg: #16301f;
  --c-dislike-bg: #33240f;
  --c-warn-bg: #332a0d;
  --c-warn-fg: #e0b64a;
  --c-err-bg: #331717;
  --c-updated-bg: #16301f;
  --c-updated-line: #2c5138;
}
/* Бордова смуга меню та плашки лишаються фірмово-бордовими, не рожевіють */
:root[data-theme="dark"] .topic-bar { background: #6a0016; }
:root[data-theme="dark"] .topic-link.active,
:root[data-theme="dark"] .topic-link:hover { background: #52000f; }
:root[data-theme="dark"] .breaking-tag,
:root[data-theme="dark"] body.lang-orig .lang-toggle { background: #6a0016; }
:root[data-theme="dark"] .topic-chip:hover { background: #6a0016; }
:root[data-theme="dark"] .lead-media img { opacity: 0.92; }
:root[data-theme="dark"] .article-media img { opacity: 0.94; }
/* білий текст на світло-рожевому акценті = 3.5:1 — темніший фон дає ≥4.5 (AA) */
:root[data-theme="dark"] .btn-primary { background: #ab2247; border-color: #ab2247; }
:root[data-theme="dark"] .btn-primary:hover { background: #921d3c; }
:root[data-theme="dark"] .btn:hover { background: #ab2247; border-color: #ab2247; color: #fff; }

/* ---------- Індикатор стану наповнення (/agent) ---------- */
.health-box { border-left: 4px solid var(--c-line-dark); }
.health-box.health-ok { border-left-color: var(--c-like); }
.health-box.health-info { border-left-color: var(--c-muted); }
.health-box.health-warn { border-left-color: var(--c-warn-fg); }
.health-box.health-error { border-left-color: var(--c-accent); }
.health-line { margin: 0 0 6px; font-size: 14.5px; line-height: 1.5; }
.health-badge {
  display: inline-block; font-family: var(--font-head); font-size: 11px; font-weight: 800;
  letter-spacing: 0.6px; padding: 2px 8px; border-radius: 2px; margin-right: 8px;
  vertical-align: 1px;
}
.health-badge-ok { background: var(--c-like-bg); color: var(--c-like); }
.health-badge-info { background: var(--c-bg-soft); color: var(--c-text-soft); }
.health-badge-warn { background: var(--c-warn-bg); color: var(--c-warn-fg); }
.health-badge-error { background: var(--c-err-bg); color: var(--c-accent); }

/* ---------- Сторінка-документ (політика приватності) ---------- */
.doc-page { max-width: 720px; }
.doc-page h2 {
  font-family: var(--font-head); font-size: 17px; font-weight: 800;
  margin: 26px 0 8px;
}
.doc-page p { font-size: 15.5px; line-height: 1.6; margin: 0 0 12px; color: var(--c-text); }
.doc-page code {
  background: var(--c-bg-soft); padding: 1px 5px; border-radius: 3px;
  font-size: 13.5px; color: var(--c-text-soft);
}
.doc-updated { font-size: 12.5px; color: var(--c-muted); margin: 0 0 20px; }
.doc-back { margin-top: 28px; }
