/* ==========================================================================
   Обрії — основні стилі
   Принципи: системний шрифт, трекінг залежить від розміру, анімуємо лише
   transform/opacity, відгук на натискання миттєвий, є reduced-motion.
   ========================================================================== */

:root {
  --green: #1da349;          /* фірмовий зелений */
  --green-ink: #0f7a35;      /* зелений для тексту на світлому */
  --green-soft: #e6f6ec;
  --teal: #0e5a63;           /* силует міста з логотипа */
  --ua-blue: #0057b7;
  --ua-yellow: #ffd500;
  --bg: #f5f7f4;
  --surface: #ffffff;
  --surface-2: #eef2ee;
  --ink: #0f1512;
  --muted: #5a665f;
  --line: rgba(15, 21, 18, 0.1);
  --glass: rgba(245, 247, 244, 0.72);
  --shadow-s: 0 1px 2px rgba(15, 21, 18, 0.06), 0 2px 8px rgba(15, 21, 18, 0.04);
  --shadow-l: 0 2px 4px rgba(15, 21, 18, 0.04), 0 18px 48px rgba(15, 21, 18, 0.12);
  --r-s: 10px;
  --r-m: 16px;
  --r-l: 24px;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --header-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --green: #34c268;
    --green-ink: #4fd481;
    --green-soft: #12301f;
    --teal: #5fb8c2;
    --bg: #0a0e0c;
    --surface: #131916;
    --surface-2: #1a221e;
    --ink: #eef3ef;
    --muted: #9aa69f;
    --line: rgba(238, 243, 239, 0.12);
    --glass: rgba(10, 14, 12, 0.7);
    --shadow-s: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-l: 0 18px 48px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --green: #34c268;
  --green-ink: #4fd481;
  --green-soft: #12301f;
  --teal: #5fb8c2;
  --bg: #0a0e0c;
  --surface: #131916;
  --surface-2: #1a221e;
  --ink: #eef3ef;
  --muted: #9aa69f;
  --line: rgba(238, 243, 239, 0.12);
  --glass: rgba(10, 14, 12, 0.7);
  --shadow-s: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-l: 0 18px 48px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

/* --- база --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 100%/1.55 system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 750; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--green) 70%, transparent); outline-offset: 3px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--green) 30%, transparent); }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }

@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: 0.45s; animation-timing-function: var(--ease); }

/* --- прапорова лінія та шапка -------------------------------------------- */
.flagline { height: 4px; background: linear-gradient(90deg, var(--ua-blue) 0 50%, var(--ua-yellow) 50% 100%); }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  view-transition-name: site-header;
}
/* м'який край замість жорсткої лінії — лише коли контент під шапкою */
.site-header::after {
  content: ""; position: absolute; inset: 100% 0 auto 0; height: 14px; pointer-events: none;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--ink) 9%, transparent), transparent);
  opacity: 0; transition: opacity 0.25s ease;
}
.is-scrolled .site-header::after { opacity: 1; }
.site-header__in { display: flex; align-items: center; gap: 18px; height: var(--header-h); }
.logo { flex: none; display: block; }
.logo img { height: 42px; width: auto; }
.nav { flex: 1; min-width: 0; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.nav > ul { overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.nav > ul::-webkit-scrollbar { display: none; }
.nav a {
  display: block; padding: 8px 12px; border-radius: 999px; white-space: nowrap;
  font-size: 0.94rem; font-weight: 600; letter-spacing: 0.005em; color: var(--muted);
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.1s ease-out;
}
.nav a:hover, .nav .current-menu-item > a, .nav .current-menu-parent > a { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.nav a:active { transform: scale(0.96); }
.nav .sub-menu { display: none; }
.tools { display: flex; align-items: center; gap: 6px; flex: none; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px; color: var(--ink);
  transition: background-color 0.2s ease, transform 0.1s ease-out;
}
.icon-btn:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; font-weight: 650; font-size: 0.95rem; line-height: 1;
  background: var(--green); color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 6px 18px color-mix(in srgb, var(--green) 35%, transparent);
  transition: transform 0.1s ease-out, box-shadow 0.25s ease, filter 0.2s ease;
}
.btn:hover { filter: brightness(1.06); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 10px 26px color-mix(in srgb, var(--green) 45%, transparent); }
.btn:active { transform: scale(0.97); }
.btn--ghost { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); box-shadow: none; }
.btn--ghost:hover { background: color-mix(in srgb, var(--ink) 11%, transparent); box-shadow: none; filter: none; }
.btn--light { background: #fff; color: #0f1512; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }

/* мова */
.lang { position: relative; }
.lang__btn { height: 40px; padding: 0 12px; border-radius: 999px; font-weight: 650; font-size: 0.86rem; letter-spacing: 0.04em; display: flex; align-items: center; gap: 6px; transition: background-color 0.2s ease, transform 0.1s ease-out; }
.lang__btn:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.lang__btn:active { transform: scale(0.95); }
.lang__menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px; padding: 6px; border-radius: var(--r-m);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  box-shadow: var(--shadow-l); border: 1px solid var(--line);
  transform-origin: top right; opacity: 0; transform: scale(0.94); pointer-events: none;
  transition: opacity 0.18s ease, transform 0.28s var(--ease);
}
.lang.is-open .lang__menu { opacity: 1; transform: none; pointer-events: auto; }
.lang__menu a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 0.95rem; }
.lang__menu a:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.lang__menu a[aria-current="true"] { color: var(--green-ink); }
.lang__menu small { color: var(--muted); font-weight: 500; }
.burger { display: none; }

/* --- типографіка секцій --------------------------------------------------- */
.eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--green-ink); }
.section { padding-block: clamp(28px, 5vw, 56px); }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: clamp(16px, 2.4vw, 28px); }
.section__title { font-size: clamp(1.5rem, 2.6vw, 2.25rem); line-height: 1.08; letter-spacing: -0.022em; }
.more { font-weight: 650; font-size: 0.95rem; color: var(--green-ink); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.more::after { content: "→"; transition: transform 0.3s var(--ease); }
.more:hover::after { transform: translateX(4px); }

/* --- стрічка «Головне зараз» ---------------------------------------------- */
.pulse { padding-block: 12px; border-bottom: 1px solid var(--line); }
.pulse__in { display: flex; align-items: center; gap: 14px; }
.pulse__label { flex: none; display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green-ink); }
.pulse__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 60%, transparent); animation: ping 2.4s ease-out infinite; }
@keyframes ping { 70%, 100% { box-shadow: 0 0 0 9px transparent; } }
.pulse__list { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.pulse__list::-webkit-scrollbar { display: none; }
.pulse__list a { flex: none; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.93rem; font-weight: 550; scroll-snap-align: start; }
.pulse__list a:hover { color: var(--green-ink); }
.pulse__list time { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 8px; font-weight: 500; }

/* --- картки --------------------------------------------------------------- */
.card { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card__media { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: var(--r-m); overflow: hidden; background: var(--surface-2); isolation: isolate; transition: transform 0.12s ease-out; }
.card__media img, .card__media .ph { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }
.card__media:active { transform: scale(0.985); }
.card__body { display: flex; flex-direction: column; gap: 8px; }
.chip { align-self: flex-start; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green-ink); }
.chip:hover { text-decoration: underline; text-underline-offset: 3px; }
.card__title { font-size: 1.12rem; line-height: 1.24; letter-spacing: -0.012em; font-weight: 700; }
.card__title a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size 0.4s var(--ease); }
.card:hover .card__title a { background-size: 100% 1.5px; }
.card__excerpt { color: var(--muted); font-size: 0.95rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--muted); font-size: 0.84rem; font-variant-numeric: tabular-nums; }
.meta a:hover { color: var(--ink); }
.meta .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.6; }
.lock { display: inline-flex; align-items: center; gap: 5px; color: var(--green-ink); font-weight: 650; }
.lock svg { width: 13px; height: 13px; }

.ph { display: grid; place-items: center; background: linear-gradient(135deg, var(--green) 0%, var(--teal) 100%); color: rgba(255, 255, 255, 0.9); }
.ph svg { width: 34%; max-width: 120px; opacity: 0.9; }

.grid { display: grid; gap: clamp(20px, 2.6vw, 32px) clamp(16px, 2.2vw, 28px); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Сітка без порожніх клітинок. data-r3 / data-r2 — залишок від ділення кількості карток на 3 і на 2.
   Залишок 1 у трьох колонках: перша й остання картки займають по дві колонки. Залишок 2: лише перша.
   Широка картка стає горизонтальною: фото ліворуч, текст праворуч. */
@media (min-width: 901px) {
  .grid--fill[data-r3="1"] > .card:is(:first-child, :last-child),
  .grid--fill[data-r3="2"] > .card:first-child { grid-column: span 2; flex-direction: row; align-items: center; gap: clamp(16px, 2.2vw, 30px); }
  .grid--fill[data-n="1"] > .card:first-child { grid-column: 1 / -1; }
  .grid--fill[data-r3="1"] > .card:is(:first-child, :last-child) > .card__media,
  .grid--fill[data-r3="2"] > .card:first-child > .card__media { flex: 1.2 1 0; align-self: stretch; aspect-ratio: auto; min-height: 250px; border-radius: var(--r-l); }
  .grid--fill[data-r3="1"] > .card:is(:first-child, :last-child) > .card__body,
  .grid--fill[data-r3="2"] > .card:first-child > .card__body { flex: 1 1 0; }
  .grid--fill[data-r3="1"] > .card:is(:first-child, :last-child) .card__title,
  .grid--fill[data-r3="2"] > .card:first-child .card__title { font-size: clamp(1.25rem, 1.9vw, 1.6rem); line-height: 1.14; letter-spacing: -0.02em; }
  .grid--fill[data-r3="1"] > .card:is(:first-child, :last-child) .card__excerpt,
  .grid--fill[data-r3="2"] > .card:first-child .card__excerpt { -webkit-line-clamp: 4; }
}
@media (min-width: 601px) and (max-width: 900px) {
  .grid--fill[data-r2="1"] > .card:first-child { grid-column: span 2; flex-direction: row; align-items: center; gap: 20px; }
  .grid--fill[data-r2="1"] > .card:first-child > .card__media { flex: 1.1 1 0; align-self: stretch; aspect-ratio: auto; min-height: 220px; border-radius: var(--r-l); }
  .grid--fill[data-r2="1"] > .card:first-child > .card__body { flex: 1 1 0; }
  .grid--fill[data-r2="1"] > .card:first-child .card__title { font-size: 1.3rem; line-height: 1.15; letter-spacing: -0.018em; }
}

.card--row { flex-direction: row; gap: 14px; align-items: flex-start; }
.card--row .card__media { flex: none; width: 112px; aspect-ratio: 1; border-radius: 12px; }
.card--row .card__title { font-size: 1rem; }

/* --- головний матеріал ---------------------------------------------------- */
.hero { padding-top: clamp(18px, 3vw, 32px); }
/* Перший екран: головна новина | дві другі | стрічка. На планшеті: головна на всю ширину, під нею другі й стрічка поруч. */
.hero__grid { display: grid; gap: clamp(18px, 2.2vw, 30px); align-items: stretch; grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.82fr) minmax(0, 0.86fr); grid-template-areas: "lead sec feed"; }
.hero__grid > .lead { grid-area: lead; }
.hero__sec { grid-area: sec; display: grid; gap: clamp(16px, 2vw, 26px); align-content: start; min-width: 0; }
.hero__sec .card__title { font-size: 1.06rem; }
.feed { grid-area: feed; min-width: 0; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-l); padding: 18px 20px 10px; box-shadow: var(--shadow-s); }
.feed__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; }
.feed__title { display: flex; align-items: center; gap: 9px; font-size: 1.08rem; letter-spacing: -0.015em; }
.feed__list { list-style: none; margin: 0; padding: 0; }
.feed__item { display: grid; grid-template-columns: 2.9rem minmax(0, 1fr); gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.feed__item time { padding-top: 1px; color: var(--muted); font-size: 0.84rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.feed__item.is-fresh time { color: var(--green-ink); }
.feed__item a { font-weight: 600; font-size: 0.95rem; line-height: 1.32; letter-spacing: -0.004em; transition: color 0.2s ease; }
.feed__item a:hover { color: var(--green-ink); }
.feed__item a svg { width: 13px; height: 13px; margin-right: 5px; vertical-align: -1px; color: var(--green-ink); }

/* Компактні картки в рядок: стільки колонок, скільки вміщується, — без порожнього поля праворуч. */
.rows { display: grid; gap: 0 clamp(18px, 2.6vw, 36px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); align-content: start; }
.rows .card { padding-block: 14px; border-bottom: 1px solid var(--line); }
.feature { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 44px); align-items: start; }
.feature .rows { grid-template-columns: minmax(0, 1fr); }
.feature .rows .card:first-child { padding-top: 0; }
.feature .rows .card:last-child { border-bottom: 0; }
.card--big .card__media { aspect-ratio: 16 / 9; border-radius: var(--r-l); }
.card--big .card__title { font-size: clamp(1.3rem, 2.3vw, 1.85rem); line-height: 1.12; letter-spacing: -0.022em; }
.card--big .card__excerpt { font-size: 1.02rem; -webkit-line-clamp: 3; }

.lead { position: relative; display: block; border-radius: var(--r-l); overflow: hidden; min-height: clamp(360px, 38vw, 540px); background: var(--teal); isolation: isolate; box-shadow: var(--shadow-l); transition: transform 0.14s ease-out; }
.lead:active { transform: scale(0.992); }
.lead img, .lead .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.lead:hover img { transform: scale(1.035); }
.lead::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(4, 12, 8, 0.9) 0%, rgba(4, 12, 8, 0.55) 34%, rgba(4, 12, 8, 0) 66%); }
.lead__body { position: absolute; inset: auto 0 0 0; z-index: 1; padding: clamp(18px, 3vw, 36px); color: #fff; display: grid; gap: 12px; }
.lead__body .chip { color: #fff; background: var(--green); padding: 6px 10px; border-radius: 999px; justify-self: start; }
.lead__title { font-size: clamp(1.6rem, 3.3vw, 2.9rem); line-height: 1.06; letter-spacing: -0.028em; font-weight: 800; max-width: 22ch; }
.lead__body .meta { color: rgba(255, 255, 255, 0.82); }
.side { display: flex; flex-direction: column; }
.side .card { padding-block: 16px; border-bottom: 1px solid var(--line); }
.side .card:first-child { padding-top: 0; }
.side .card:last-child { border-bottom: 0; padding-bottom: 0; }

/* --- патріотична смуга ---------------------------------------------------- */
.band {
  position: relative; overflow: hidden; border-radius: var(--r-l); color: #fff; isolation: isolate;
  background: radial-gradient(120% 140% at 0% 0%, #2cbf62 0%, #1da349 38%, #0e5a63 100%);
  padding: clamp(28px, 5vw, 64px); display: grid; gap: clamp(20px, 3vw, 36px);
}
.band::before { content: ""; position: absolute; inset: auto 0 0 0; height: 8px; background: linear-gradient(90deg, var(--ua-blue) 0 50%, var(--ua-yellow) 50% 100%); z-index: 1; }
.band__sky { position: absolute; inset: 0; z-index: -1; opacity: 0.2; background-image: url(../img/logo.png); background-repeat: no-repeat; background-position: right -40px bottom -8px; background-size: min(70%, 760px) auto; filter: brightness(0) invert(1); }
.band__kicker { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.85; }
.band__title { font-size: clamp(2rem, 5.4vw, 4.4rem); line-height: 0.98; letter-spacing: -0.035em; font-weight: 850; max-width: 14ch; }
.band__text { max-width: 54ch; font-size: clamp(1rem, 1.3vw, 1.15rem); opacity: 0.92; }
.band__stats { display: flex; flex-wrap: wrap; gap: clamp(18px, 4vw, 56px); }
.stat b { display: block; font-size: clamp(1.7rem, 3.4vw, 2.8rem); letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.88rem; opacity: 0.85; }
.band__cta { display: flex; flex-wrap: wrap; gap: 10px; }

/* --- громади: горизонтальна карусель -------------------------------------- */
.rail { display: flex; gap: clamp(14px, 2vw, 24px); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 6px; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
.rail::-webkit-scrollbar { display: none; }
.rail > * { flex: none; width: min(78vw, 320px); scroll-snap-align: start; }
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 20px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 9px 16px; border-radius: 999px; font-weight: 650; font-size: 0.92rem; background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--muted); transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease-out; }
.tab:active { transform: scale(0.96); }
.tab[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.tabpanel[hidden] { display: none; }

/* --- бічні блоки: Telegram, Facebook, корисне ------------------------------ */
.panels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.2vw, 28px); }
.panel { background: var(--surface); border-radius: var(--r-l); padding: clamp(18px, 2.4vw, 28px); box-shadow: var(--shadow-s); display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel__title { font-size: 1.15rem; letter-spacing: -0.015em; display: flex; align-items: center; gap: 10px; }
.panel__title svg { width: 22px; height: 22px; color: var(--green-ink); }
.tg { display: grid; gap: 14px; }
.tg__item { display: grid; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 0.95rem; line-height: 1.45; }
.tg__item:last-child { border: 0; padding-bottom: 0; }
.tg__item time { color: var(--muted); font-size: 0.8rem; }
.tg__item p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.links { display: grid; gap: 4px; }
.links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin-inline: -14px; border-radius: 12px; font-weight: 600; transition: background-color 0.2s ease, transform 0.1s ease-out; }
.links a:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.links a:active { transform: scale(0.985); }
.links a::after { content: "›"; color: var(--muted); font-size: 1.2rem; }
.fb-frame { border: 0; width: 100%; height: 420px; border-radius: 12px; background: var(--surface-2); }

/* --- рекламні місця -------------------------------------------------------- */
.ad { display: grid; gap: 6px; justify-items: center; margin-block: clamp(16px, 3vw, 32px); }
.ad__label { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.ad a, .ad img { border-radius: var(--r-s); }

/* --- сторінка рубрики / архів ---------------------------------------------- */
.pagehead { padding-block: clamp(28px, 5vw, 64px) clamp(12px, 2vw, 24px); display: grid; gap: 12px; }
.pagehead__title { font-size: clamp(2.1rem, 5.6vw, 4.2rem); line-height: 1; letter-spacing: -0.035em; font-weight: 850; }
.pagehead__text { color: var(--muted); max-width: 62ch; font-size: 1.05rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.86rem; color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.crumbs span[aria-hidden] { opacity: 0.5; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding-block: clamp(24px, 4vw, 48px); }
.pager .page-numbers { min-width: 44px; height: 44px; padding: 0 12px; display: grid; place-items: center; border-radius: 999px; font-weight: 650; font-variant-numeric: tabular-nums; transition: background-color 0.2s ease, transform 0.1s ease-out; }
.pager a.page-numbers:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.pager a.page-numbers:active { transform: scale(0.94); }
.pager .current { background: var(--ink); color: var(--bg); }

/* --- стаття ---------------------------------------------------------------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 150; background: var(--green); transform-origin: 0 50%; transform: scaleX(0); }
@supports (animation-timeline: scroll()) {
  .progress { animation: grow linear both; animation-timeline: scroll(root block); }
  @keyframes grow { to { transform: scaleX(1); } }
}
.article__head { padding-block: clamp(24px, 4vw, 48px) clamp(18px, 2.4vw, 28px); display: grid; gap: 16px; max-width: 920px; }
.article__title { font-size: clamp(1.9rem, 4.6vw, 3.5rem); line-height: 1.04; letter-spacing: -0.032em; font-weight: 820; }
.article__lead { font-size: clamp(1.1rem, 1.6vw, 1.32rem); line-height: 1.45; color: var(--muted); max-width: 62ch; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.byline__who { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.article__hero { border-radius: var(--r-l); overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow-l); }
.article__hero img { width: 100%; max-height: 72vh; object-fit: cover; }
.article__hero figcaption, .prose figcaption, .prose .wp-caption-text { padding: 10px 4px 0; color: var(--muted); font-size: 0.86rem; background: var(--bg); }
.article__grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(24px, 4vw, 64px); padding-block: clamp(22px, 3.4vw, 44px); align-items: start; }
.aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 24px; }
.aside__title { font-size: 0.8rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 14px; }
.aside .rows .card { padding-block: 12px; }

.prose { font-size: clamp(1.06rem, 1.25vw, 1.19rem); line-height: 1.72; max-width: 70ch; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: 1.6em; line-height: 1.15; letter-spacing: -0.02em; margin-top: 1.8em; }
.prose h3 { font-size: 1.28em; line-height: 1.2; letter-spacing: -0.015em; margin-top: 1.6em; }
.prose a { color: var(--green-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose img { border-radius: var(--r-m); height: auto; }
.prose figure, .prose .wp-caption { margin: 1.6em 0; max-width: 100% !important; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--green); font-size: 1.14em; line-height: 1.5; font-weight: 550; letter-spacing: -0.01em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.94em; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: var(--r-m); border: 0; }
.prose .alignleft { float: left; margin: 0.4em 1.4em 1em 0; max-width: 46%; }
.prose .alignright { float: right; margin: 0.4em 0 1em 1.4em; max-width: 46%; }
.prose .aligncenter { margin-inline: auto; }
.prose::after { content: ""; display: block; clear: both; }

.share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.share__label { color: var(--muted); font-size: 0.9rem; margin-right: 6px; }
.tagrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tagrow a { padding: 7px 12px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); font-size: 0.86rem; font-weight: 600; }
.tagrow a:hover { background: var(--green-soft); color: var(--green-ink); }

.authorbox { display: flex; gap: 18px; align-items: flex-start; background: var(--surface); border-radius: var(--r-l); padding: clamp(18px, 2.6vw, 28px); box-shadow: var(--shadow-s); margin-top: 32px; }
.authorbox .avatar { width: 72px; height: 72px; }
.authorbox h3 { font-size: 1.15rem; }
.authorbox p { color: var(--muted); margin-top: 6px; font-size: 0.97rem; }

.paywall { position: relative; margin-top: -120px; padding-top: 120px; background: linear-gradient(to bottom, transparent, var(--bg) 110px); }
.paywall__box { background: var(--surface); border-radius: var(--r-l); padding: clamp(22px, 3.4vw, 40px); box-shadow: var(--shadow-l); display: grid; gap: 14px; justify-items: start; border: 1px solid var(--line); }
.paywall__box h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -0.02em; line-height: 1.1; }
.paywall__box p { color: var(--muted); max-width: 54ch; }

/* --- автор ----------------------------------------------------------------- */
.author-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(18px, 3vw, 36px); align-items: center; padding-block: clamp(28px, 5vw, 64px) clamp(16px, 2vw, 28px); }
.author-hero .avatar { width: clamp(96px, 14vw, 160px); height: clamp(96px, 14vw, 160px); box-shadow: 0 0 0 4px var(--surface), 0 0 0 7px var(--green); }
.author-hero h1 { font-size: clamp(2rem, 4.8vw, 3.6rem); letter-spacing: -0.034em; line-height: 1; font-weight: 850; }
.author-hero p { color: var(--muted); max-width: 62ch; margin-top: 10px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.fact { padding: 8px 14px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-s); font-size: 0.9rem; font-weight: 600; }
.fact b { color: var(--green-ink); }

/* --- пошук ----------------------------------------------------------------- */
.searchbox { display: flex; gap: 10px; background: var(--surface); border-radius: 999px; padding: 8px 8px 8px 22px; box-shadow: var(--shadow-s); border: 1px solid var(--line); max-width: 720px; }
.searchbox input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 1.1rem; color: var(--ink); outline: none; }
dialog.search { border: 0; padding: 0; background: none; width: min(92vw, 760px); margin-top: 14vh; overflow: visible; }
dialog.search::backdrop { background: rgba(4, 12, 8, 0.45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
dialog.search[open] { animation: materialize 0.32s var(--ease); }
@keyframes materialize { from { opacity: 0; transform: scale(0.96); filter: blur(8px); } }
dialog.search .searchbox { max-width: none; box-shadow: var(--shadow-l); padding: 10px 10px 10px 26px; }
dialog.search .searchbox input { font-size: 1.25rem; height: 48px; }

/* --- мобільне меню: шторка знизу (перетягується) --------------------------- */
.scrim { position: fixed; inset: 0; z-index: 180; background: rgba(4, 12, 8, 0.5); opacity: 0; pointer-events: none; }
.sheet { position: fixed; inset: auto 0 0 0; z-index: 190; max-height: 88vh; background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.25); transform: translateY(105%); touch-action: none; display: flex; flex-direction: column; will-change: transform; }
.sheet__grab { flex: none; padding: 10px 0 6px; display: grid; place-items: center; cursor: grab; }
.sheet__grab::before { content: ""; width: 40px; height: 5px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 22%, transparent); }
.sheet__body { overflow-y: auto; overscroll-behavior: contain; padding: 8px var(--gutter) calc(24px + env(safe-area-inset-bottom)); touch-action: pan-y; }
.sheet ul { list-style: none; margin: 0; padding: 0; }
.sheet .menu > li > a { display: block; padding: 14px 4px; font-size: 1.2rem; font-weight: 700; letter-spacing: -0.015em; border-bottom: 1px solid var(--line); }
.sheet .sub-menu a { display: block; padding: 10px 4px 10px 16px; color: var(--muted); font-weight: 600; }
.sheet__foot { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 18px; }

/* --- підвал ---------------------------------------------------------------- */
.site-footer { margin-top: clamp(40px, 7vw, 96px); background: var(--surface); border-top: 1px solid var(--line); position: relative; overflow: hidden; }
.site-footer__in { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); padding-block: clamp(32px, 5vw, 64px); }
.site-footer h4 { font-size: 0.8rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a:hover { color: var(--green-ink); }
.site-footer .logo img { height: 56px; }
.site-footer__about { color: var(--muted); max-width: 40ch; margin-top: 14px; font-size: 0.95rem; }
.socials { display: flex; gap: 8px; margin-top: 16px; }
.supporters { padding-block: 0 clamp(24px, 4vw, 40px); }
.supporters__row { display: flex; flex-wrap: wrap; gap: 14px; align-items: stretch; }
.supporters__logo { background: #fff; border-radius: var(--r-m); padding: 12px 18px; display: grid; place-items: center; box-shadow: var(--shadow-s); border: 1px solid var(--line); }
.supporters__logo img { height: 56px; width: auto; max-width: min(100%, 300px); object-fit: contain; }
.made a { color: var(--green-ink); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.made__heart { display: inline-block; animation: beat 1.8s ease-in-out infinite; }
@keyframes beat { 0%, 60%, 100% { transform: scale(1); } 20% { transform: scale(1.22); } 40% { transform: scale(0.96); } }
.site-footer__bar { border-top: 1px solid var(--line); padding-block: 18px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: var(--muted); font-size: 0.86rem; }
.site-footer__flag { height: 6px; background: linear-gradient(90deg, var(--ua-blue) 0 50%, var(--ua-yellow) 50% 100%); }

/* --- сторінки, коментарі, форми -------------------------------------------- */
.page-body { padding-block: clamp(16px, 3vw, 40px) clamp(32px, 5vw, 64px); }
.comments { margin-top: 44px; max-width: 70ch; }
.comments h2 { font-size: 1.4rem; letter-spacing: -0.02em; margin-bottom: 18px; }
.comments ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.comments ol ol { margin: 14px 0 0 22px; }
.comment-body { background: var(--surface); border-radius: var(--r-m); padding: 16px 18px; box-shadow: var(--shadow-s); }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.comment-author img { border-radius: 50%; }
.comment-meta { color: var(--muted); font-size: 0.82rem; margin: 4px 0 8px; }
.comment-respond { margin-top: 24px; }
input[type="text"], input[type="email"], input[type="url"], input[type="tel"], input[type="number"], input[type="password"], input[type="search"], input[type="date"], textarea, select {
  width: 100%; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 20%, transparent); }
.searchbox input, .searchbox input:focus { border: 0; box-shadow: none; padding: 0; background: none; }
label { font-weight: 600; font-size: 0.92rem; }
input[type="submit"], button[type="submit"], .button, .wp-element-button, .woocommerce a.button, .woocommerce button.button, .woocommerce #respond input#submit {
  display: inline-flex; align-items: center; justify-content: center; padding: 12px 20px; border-radius: 999px; border: 0;
  background: var(--green) !important; color: #fff !important; font-weight: 650; cursor: pointer; transition: transform 0.1s ease-out, filter 0.2s ease;
}
input[type="submit"]:hover, .button:hover, .woocommerce a.button:hover, .woocommerce button.button:hover { filter: brightness(1.07); }
input[type="submit"]:active, .button:active, .woocommerce a.button:active, .woocommerce button.button:active { transform: scale(0.97); }

/* --- магазин (WooCommerce) -------------------------------------------------- */
.woocommerce ul.products { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.2vw, 28px); margin: 0 0 32px; padding: 0; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none !important; }
.woocommerce ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; background: var(--surface); border-radius: var(--r-l); padding: 14px 14px 18px; box-shadow: var(--shadow-s); transition: transform 0.4s var(--ease), box-shadow 0.4s ease; text-align: left; display: flex; flex-direction: column; }
.woocommerce ul.products li.product:hover { transform: translateY(-4px); box-shadow: var(--shadow-l); }
.woocommerce ul.products li.product img { border-radius: var(--r-m); margin-bottom: 12px !important; aspect-ratio: 1; object-fit: cover; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 1.02rem !important; font-weight: 700; letter-spacing: -0.01em; padding: 0 !important; }
.woocommerce ul.products li.product .price { color: var(--green-ink) !important; font-weight: 750; font-size: 1.05rem !important; margin: 8px 0 12px; }
.woocommerce ul.products li.product .button { margin-top: auto; align-self: flex-start; }
.woocommerce div.product { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 4vw, 56px); }
.woocommerce div.product div.images, .woocommerce div.product div.summary { width: auto !important; float: none !important; margin: 0; }
.woocommerce div.product div.images img { border-radius: var(--r-l); }
.woocommerce div.product .product_title { font-size: clamp(1.7rem, 3.4vw, 2.6rem); letter-spacing: -0.03em; line-height: 1.05; }
.woocommerce div.product p.price { color: var(--green-ink) !important; font-size: 1.6rem !important; font-weight: 800; margin-block: 14px; }
.woocommerce div.product .woocommerce-tabs, .woocommerce div.product .related, .woocommerce div.product .upsells { grid-column: 1 / -1; }
.woocommerce .quantity .qty { width: 84px; }
.woocommerce table.shop_table { border: 0; border-radius: var(--r-m); background: var(--surface); box-shadow: var(--shadow-s); overflow: hidden; }
.woocommerce-message, .woocommerce-info, .woocommerce-error { border-radius: var(--r-m); border-top-color: var(--green) !important; background: var(--surface) !important; color: var(--ink) !important; }
.woocommerce-message::before, .woocommerce-info::before { color: var(--green) !important; }
.woocommerce span.onsale { background: var(--green); border-radius: 999px; min-height: 0; min-width: 0; padding: 6px 12px; line-height: 1; }

/* --- поява при прокручуванні ------------------------------------------------ */
.js .reveal { transition: opacity 0.7s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
.js .reveal.pre { opacity: 0; transform: translateY(18px); }

/* --- адаптив --------------------------------------------------------------- */
@media (max-width: 1080px) {
  .article__grid { grid-template-columns: minmax(0, 1fr); }
  .aside { position: static; }
  .site-footer__in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "lead" "sec" "feed"; }
  .lead { min-height: clamp(320px, 50vw, 520px); }
  .hero__sec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feed__list { columns: 2; column-gap: clamp(20px, 4vw, 40px); }
  .feed__item { break-inside: avoid; }
  .feed__item:first-child { border-top: 0; padding-top: 0; }
}
@media (max-width: 900px) {
  /* Телефон і планшет: рубрики лишаються на видноті другим рядком шапки, а не ховаються в меню. */
  :root { --header-h: 104px; }
  .site-header__in { flex-wrap: wrap; height: auto; gap: 0 10px; }
  .logo { display: flex; align-items: center; height: 58px; }
  .logo img { height: 38px; }
  .tools { margin-left: auto; height: 58px; }
  .tools .btn, .tools .lang { display: none; }
  .burger { display: grid; }
  .nav { order: 3; flex: 0 0 100%; border-top: 1px solid var(--line); }
  .nav > ul { padding-block: 6px; gap: 0; }
  .nav a { padding: 7px 11px; font-size: 0.9rem; }
  .nav li:first-child a { padding-left: 2px; }
  .grid, .grid--4, .panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature .rows { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
  .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .woocommerce div.product { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .feed__list { columns: 1; }
  .hero__sec { gap: 14px; }
  .hero__sec .card__title { font-size: 0.98rem; }
  .hero__sec .chip { display: none; }
}
@media (max-width: 600px) {
  .grid, .grid--2, .panels { grid-template-columns: minmax(0, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead { min-height: 400px; border-radius: 20px; }
  .card--row .card__media { width: 92px; }
  .site-footer__in { grid-template-columns: minmax(0, 1fr); }
  .author-hero { grid-template-columns: minmax(0, 1fr); }
  .prose .alignleft, .prose .alignright { float: none; margin: 1.2em 0; max-width: 100%; }
  .authorbox { flex-direction: column; }
}

/* --- доступність: рух, прозорість, контраст -------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.2s !important; }
  .js .reveal.pre { opacity: 1; transform: none; }
  .card:hover .card__media img, .lead:hover img { transform: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .progress { display: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header, .lang__menu { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --line: color-mix(in srgb, var(--ink) 45%, transparent); --muted: var(--ink); }
  .site-header { background: var(--bg); border-bottom: 2px solid var(--ink); }
}
@media print {
  .site-header, .site-footer, .aside, .share, .ad, .progress, .flagline, .comments { display: none !important; }
  .article__grid { display: block; }
}

/* ==========================================================================
   Доведення: шапка в два рядки, стаття, коментарі, магазин, сторінка підтримки
   ========================================================================== */
.pagehead__title::first-letter, .section__title::first-letter, .lead__title::first-letter, .crumbs span::first-letter, .crumbs a::first-letter { text-transform: uppercase; }
.crumbs a, .crumbs span:not([aria-hidden]) { display: inline-block; }

/* Шапка: перший рядок — логотип і кнопки, другий — усі рубрики й громади. Так вони вміщаються на будь-якому екрані. */
:root { --header-h: 102px; }
.site-header__in { flex-wrap: wrap; height: auto; gap: 0 12px; }
.site-header .logo { display: flex; align-items: center; height: 58px; }
.site-header .tools { margin-left: auto; height: 58px; }
.site-header .nav { order: 3; flex: 0 0 100%; border-top: 1px solid var(--line); }
.site-header .nav > ul { padding-block: 5px; gap: 2px; justify-content: space-between; mask-image: none; }
.site-header .nav a { padding: 7px 12px; font-size: 0.93rem; }
.site-header .nav li:first-child a { margin-left: -12px; }
.site-header .nav li:last-child a { margin-right: -12px; }
@media (min-width: 901px) { .burger { display: none; } }
@media (max-width: 1000px) {
  .site-header .nav > ul { justify-content: flex-start; mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .site-header .nav li:last-child a { margin-right: 20px; }
  .site-header .nav li:first-child a { margin-left: 0; padding-left: 2px; }
}

/* Стаття: вужчий контейнер, щоб текст заповнював свою колонку без порожнього поля до бічної. */
.article.wrap { width: min(100% - 2 * var(--gutter), 1120px); }
.article .article__head { max-width: none; }
.article .article__title { max-width: 24ch; }
.article .prose { max-width: none; }
.article .article__grid { grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(24px, 4vw, 52px); }
.article .comments { max-width: none; }
.prose p:empty { display: none; }
.prose img.alignleft, .prose img.alignright { border-radius: var(--r-m); }
@media (max-width: 1080px) {
  .article.wrap { width: min(100% - 2 * var(--gutter), 860px); }
  .article .article__grid { grid-template-columns: minmax(0, 1fr); }
}

/* коментарі */
.comment-form { display: grid; gap: 14px; margin-top: 14px; }
.comment-form p { display: grid; gap: 6px; margin: 0; }
.comment-form .comment-notes, .comment-form .logged-in-as { color: var(--muted); font-size: 0.9rem; display: block; }
.comment-form .logged-in-as a { color: var(--green-ink); }
.comment-form textarea { min-height: 140px; resize: vertical; }
.comment-form .comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 0.9rem; }
.comment-form .comment-form-cookies-consent input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--green); }
.comment-form .form-submit { justify-items: start; }
.comment-reply-title small { margin-left: 10px; font-size: 0.85rem; font-weight: 500; }
.comment-reply-title small a { color: var(--green-ink); }
.comment-content p + p { margin-top: 0.7em; }
.comment-body .reply a { color: var(--green-ink); font-weight: 650; font-size: 0.88rem; }
.comments .children { list-style: none; }
.comments .says { display: none; }

/* магазин: шапка каталогу, сортування, сторінка товару, кошик, кабінет */
.woocommerce ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.woocommerce .woocommerce-products-header { display: grid; gap: 10px; margin-bottom: 18px; }
.woocommerce .woocommerce-products-header__title, .woocommerce h1.page-title { font-size: clamp(2.1rem, 5.6vw, 4.2rem); line-height: 1; letter-spacing: -0.035em; font-weight: 850; }
.woocommerce .term-description, .woocommerce .page-description { color: var(--muted); max-width: 70ch; font-size: 1.05rem; }
.woocommerce .woocommerce-result-count { float: none; display: inline-block; margin: 0 0 18px; color: var(--muted); font-size: 0.92rem; }
.woocommerce .woocommerce-ordering { float: right; margin: -8px 0 18px; }
.woocommerce .woocommerce-ordering select { width: auto; padding: 10px 14px; border-radius: 999px; }
.woocommerce nav.woocommerce-pagination ul { border: 0; display: flex; justify-content: center; gap: 6px; }
.woocommerce nav.woocommerce-pagination ul li { border: 0; }
.woocommerce nav.woocommerce-pagination ul li a, .woocommerce nav.woocommerce-pagination ul li span { min-width: 44px; height: 44px; display: grid; place-items: center; border-radius: 999px; font-weight: 650; color: var(--ink); background: none; }
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--ink); color: var(--bg); }
.woocommerce nav.woocommerce-pagination ul li a:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); }
.woocommerce .woocommerce-breadcrumb { color: var(--muted); font-size: 0.86rem; margin-bottom: 18px; }
.woocommerce .woocommerce-breadcrumb a { color: var(--muted); }
.woocommerce div.product { align-items: start; }
.woocommerce div.product div.summary { display: grid; gap: 4px; align-content: start; }
.woocommerce div.product .woocommerce-product-details__short-description { color: var(--muted); font-size: 1.05rem; line-height: 1.6; max-width: 56ch; }
.woocommerce div.product .woocommerce-tabs { margin-top: clamp(8px, 2vw, 24px); }
.woocommerce div.product .woocommerce-tabs ul.tabs { padding: 0; margin: 0 0 16px; display: flex; gap: 6px; flex-wrap: wrap; }
.woocommerce div.product .woocommerce-tabs ul.tabs::before, .woocommerce div.product .woocommerce-tabs ul.tabs li::before, .woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { border: 0; background: color-mix(in srgb, var(--ink) 6%, transparent); border-radius: 999px; margin: 0; padding: 0; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { padding: 9px 16px; font-weight: 650; color: var(--muted); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: var(--ink); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--bg); }
.woocommerce div.product .woocommerce-tabs .panel { margin: 0; padding: 0; background: none; box-shadow: none; border-radius: 0; max-width: 70ch; font-size: 1.05rem; line-height: 1.65; }
.woocommerce div.product .woocommerce-tabs .panel > h2:first-child { display: none; }
.woocommerce div.product .woocommerce-tabs .panel img { border-radius: var(--r-m); margin-bottom: 12px; }
.woocommerce div.product .related > h2, .woocommerce div.product .upsells > h2, .woocommerce .cart_totals h2, .woocommerce-checkout h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); letter-spacing: -0.022em; margin-bottom: 18px; }
.woocommerce div.product .related, .woocommerce div.product .upsells { margin-top: clamp(24px, 4vw, 48px); }
.woocommerce div.product .product_meta { color: var(--muted); font-size: 0.9rem; margin-top: 14px; }
.woocommerce div.product .product_meta a { color: var(--green-ink); }
.woocommerce div.product form.cart { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-block: 18px 6px; }
.woocommerce div.product form.cart .button { padding: 14px 26px; font-size: 1rem; }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { padding: 14px 16px; border-color: var(--line); }
.woocommerce table.shop_table img { width: 64px; border-radius: 10px; }
.woocommerce a.remove { color: var(--muted) !important; }
.woocommerce a.remove:hover { background: #c62828; color: #fff !important; }
.woocommerce .cart-collaterals .cart_totals { float: none; width: 100%; max-width: 480px; margin-left: auto; }
.woocommerce #payment, .woocommerce-checkout #payment { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-s); }
.woocommerce #payment ul.payment_methods { border-color: var(--line); }
.woocommerce #payment div.payment_box { background: var(--surface-2); color: var(--ink); border-radius: 12px; }
.woocommerce #payment div.payment_box::before { border-bottom-color: var(--surface-2); }
.woocommerce #payment #place_order, .woocommerce .checkout-button { width: 100%; padding: 16px 22px !important; font-size: 1.05rem !important; }
.woocommerce form .form-row label { margin-bottom: 4px; }
.woocommerce form.login, .woocommerce form.register, .woocommerce form.checkout_coupon { border: 0; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-s); padding: clamp(18px, 3vw, 32px); max-width: 520px; }
.woocommerce-account .woocommerce-MyAccount-navigation { float: none; width: auto; margin-bottom: 22px; }
.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.woocommerce-account .woocommerce-MyAccount-navigation a { display: block; padding: 9px 16px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); font-weight: 650; color: var(--muted); }
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a { background: var(--ink); color: var(--bg); }
.woocommerce-account .woocommerce-MyAccount-content { float: none; width: auto; }
.woocommerce-account .woocommerce-MyAccount-content a { color: var(--green-ink); }
.wc-block-components-button, .wc-block-cart__submit-button { background: var(--green) !important; color: #fff !important; border-radius: 999px !important; font-weight: 650 !important; }
.wc-block-components-text-input input, .wc-blocks-components-select__select { border-radius: 12px !important; }

/* сторінка «Підтримати» */
.support { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(22px, 4vw, 56px); align-items: start; padding-block: clamp(12px, 2vw, 24px); }
.support__club { background: var(--surface); border-radius: var(--r-l); padding: clamp(20px, 2.8vw, 32px); box-shadow: var(--shadow-s); }
.support__club h2 { font-size: 1.25rem; letter-spacing: -0.018em; margin-bottom: 14px; }
.support__club ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.support__club li { position: relative; padding-left: 30px; line-height: 1.4; }
.support__club li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 21px; height: 21px; border-radius: 50%; background: var(--green); color: #fff; font-size: 0.78rem; font-weight: 800; display: grid; place-items: center; }
.donates { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: clamp(12px, 2vw, 22px); }
.donate { display: grid; gap: 14px; justify-items: center; padding: clamp(24px, 3.4vw, 40px) 20px; border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow-s); border: 1.5px solid transparent; transition: transform 0.4s var(--ease), box-shadow 0.4s ease, border-color 0.2s ease; }
.donate:hover { transform: translateY(-4px); box-shadow: var(--shadow-l); border-color: var(--green); }
.donate:active { transform: scale(0.98); }
.donate b { font-size: clamp(2.2rem, 4.4vw, 3.4rem); letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.donate b small { font-size: 0.36em; letter-spacing: 0; font-weight: 650; color: var(--muted); }
.donate span { padding: 10px 18px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 7%, transparent); font-weight: 650; font-size: 0.95rem; }
.donate--main { background: radial-gradient(120% 140% at 0 0, #2cbf62, #1da349 45%, #0e5a63); color: #fff; }
.donate--main b small { color: rgba(255, 255, 255, 0.8); }
.donate--main span { background: #fff; color: #0f1512; }
.donates__note { margin-top: 16px; color: var(--muted); font-size: 0.93rem; }

/* Telegram-канал на головній */
.tgwall { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.tgpost { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-l); overflow: hidden; box-shadow: var(--shadow-s); transition: transform 0.4s var(--ease), box-shadow 0.4s ease; }
.tgpost:hover { transform: translateY(-4px); box-shadow: var(--shadow-l); }
.tgpost:active { transform: scale(0.985); }
.tgpost__img { aspect-ratio: 16 / 10; background: var(--surface-2) center / cover no-repeat; }
.tgpost__body { display: grid; gap: 10px; padding: 16px 18px 18px; align-content: start; flex: 1; }
.tgpost__body p { font-size: 0.96rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.tgpost:not(:has(.tgpost__img)) .tgpost__body p { -webkit-line-clamp: 9; }
.tgpost__meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 0.82rem; margin-top: auto; }
.tghead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: clamp(16px, 2.4vw, 28px); }
.tghead__who { display: flex; align-items: center; gap: 14px; }
.tghead__icon { width: 48px; height: 48px; border-radius: 50%; background: #2aabee; color: #fff; display: grid; place-items: center; flex: none; }
.tghead__icon svg { width: 24px; height: 24px; }
.tghead small { display: block; color: var(--muted); font-size: 0.9rem; font-weight: 500; }

@media (max-width: 1080px) { .tgwall { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .support { grid-template-columns: minmax(0, 1fr); }
  .woocommerce .woocommerce-ordering { float: none; margin: 0 0 18px; }
  .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-header .tools .btn, .site-header .tools .lang { display: none; }
}
@media (max-width: 560px) {
  .tgwall { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 10px; scroll-padding-inline: var(--gutter); }
  .tgwall::-webkit-scrollbar { display: none; }
  .tgwall { align-items: flex-start; }
  .tgpost { flex: none; width: 78vw; scroll-snap-align: start; }
}

.tgpost__img { background: var(--surface-2); }
.tgpost__img img { width: 100%; height: 100%; object-fit: cover; }
.panels--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) { .panels--2 { grid-template-columns: minmax(0, 1fr); } }

/* Шапка: дата й погода; пункти меню не обрізаються */
.today { display: flex; align-items: center; gap: 14px; margin-left: clamp(8px, 2vw, 28px); color: var(--muted); font-size: 0.9rem; min-width: 0; white-space: nowrap; }
.today__date { font-weight: 600; color: var(--ink); display: inline-block; }
.today__date::first-letter { text-transform: uppercase; }
.today__wx { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 9px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.today__wx b { color: var(--ink); font-variant-numeric: tabular-nums; }
.site-header .nav > ul { margin-inline: -12px; }
.site-header .nav li:first-child a, .site-header .nav li:last-child a { margin-inline: 0; padding-inline: 12px; }
@media (max-width: 1000px) { .site-header .nav > ul { margin-inline: -12px 0; } }
@media (max-width: 900px) { .today { margin-left: 4px; gap: 8px; font-size: 0.84rem; } .today__city { display: none; } .today__wx { padding: 5px 10px 5px 8px; } }
@media (max-width: 520px) { .today__date { display: none; } }

/* Підвал: колонки-розділи. На комп'ютері завжди розкриті, на телефоні — згорнуті рядки, які відкриваються дотиком. */
.fcol > summary { list-style: none; font-size: 0.8rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); font-weight: 750; margin-bottom: 14px; }
.fcol > summary::-webkit-details-marker { display: none; }
@media (min-width: 601px) { .fcol > summary { pointer-events: none; } }
@media (max-width: 600px) {
  .site-footer { margin-top: 40px; }
  .site-footer__in { gap: 0; padding-block: 22px 6px; }
  .site-footer__in > div:first-child { padding-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .site-footer .logo img { height: 44px; }
  .site-footer__about { display: none; }
  .site-footer .socials { margin: 0; }
  .fcol { border-top: 1px solid var(--line); }
  .fcol > summary { display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 15px 0; cursor: pointer; font-size: 0.86rem; color: var(--ink); }
  .fcol > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.25s var(--ease); margin-right: 4px; }
  .fcol[open] > summary::after { transform: rotate(-135deg); }
  .fcol ul { padding-bottom: 16px; gap: 12px; }
  .supporters { padding-block: 16px; border-top: 1px solid var(--line); }
  .supporters h4 { margin-bottom: 10px; }
  .supporters__row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 10px; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .supporters__row::-webkit-scrollbar { display: none; }
  .supporters__logo { flex: none; padding: 8px 12px; }
  .supporters__logo img { height: 38px; }
  .site-footer__bar { flex-direction: column; gap: 6px; padding-block: 14px calc(14px + env(safe-area-inset-bottom)); font-size: 0.8rem; }
  .site-footer__bar > span:nth-child(2) { display: none; }
}

/* Кнопки: компактні, текст в один рядок */
.btn { padding: 9px 16px; font-size: 0.92rem; white-space: nowrap; gap: 7px; }
.btn svg { width: 16px; height: 16px; flex: none; }
.site-header .tools .btn { padding: 8px 14px; font-size: 0.9rem; box-shadow: none; }
.site-header .tools { gap: 2px; }
.lang__btn { height: 36px; padding: 0 10px; }
.icon-btn { width: 38px; height: 38px; }
.more { font-size: 0.9rem; }
.tab { padding: 7px 14px; font-size: 0.9rem; }
.pager .page-numbers { min-width: 40px; height: 40px; }
.band__cta .btn, .of-total .btn, .of-single__actions .btn { padding: 11px 20px; }
input[type="submit"], button[type="submit"]:not(.btn):not(.icon-btn), .button, .wp-element-button, .woocommerce a.button, .woocommerce button.button, .woocommerce #respond input#submit { padding: 9px 16px; font-size: 0.92rem; white-space: nowrap; line-height: 1.2; }
.woocommerce ul.products li.product .button { padding: 8px 14px; font-size: 0.88rem; }
.woocommerce div.product form.cart .button { padding: 11px 22px; font-size: 0.95rem; }
.woocommerce #payment #place_order, .woocommerce .checkout-button { padding: 13px 20px !important; font-size: 1rem !important; }
.donate span { padding: 8px 16px; font-size: 0.9rem; }
.ad-house .btn { padding: 9px 16px; }

/* Нижня панель — лише на телефоні */
.tabbar { display: none; }

/* ==========================================================================
   Телефон: окрема розкладка
   - навігація внизу, під великим пальцем; шапка ховається під час читання і повертається при русі вгору
   - після головної новини — щільний список: фото ліворуч, заголовок праворуч
   - усе, на що натискають, не менше 44 px
   ========================================================================== */
@media (max-width: 900px) {
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .site-header { transition: transform 0.32s var(--ease); will-change: transform; }
  .head-away .site-header { transform: translateY(-101%); }
  .site-header .burger, .site-header [data-open-search] { display: none; }
  .site-header .logo, .site-header .tools { height: 52px; }
  .site-header .logo img { height: 34px; }
  :root { --header-h: 94px; }
  .icon-btn { width: 44px; height: 44px; }

  .tabbar {
    position: fixed; inset: auto 0 0 0; z-index: 120; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
    background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--line);
  }
  .tabbar__item { display: grid; justify-items: center; gap: 2px; padding: 7px 2px 5px; min-height: 52px; border-radius: 12px; color: var(--muted); font-size: 0.68rem; font-weight: 650; letter-spacing: 0.01em; transition: color 0.2s ease, transform 0.1s ease-out; }
  .tabbar__item svg { width: 23px; height: 23px; }
  .tabbar__item:active { transform: scale(0.92); }
  .tabbar__item.is-active { color: var(--green-ink); }
  .tabbar__item--accent { color: var(--green-ink); }
  .site-footer__bar { padding-bottom: 14px; }
}
@media (max-width: 600px) {
  :root { --gutter: 14px; }
  .section { padding-block: 22px; }
  .section__head { margin-bottom: 14px; }
  .section__title { font-size: 1.4rem; }
  .hero { padding-top: 12px; }
  .lead { min-height: 0; aspect-ratio: 4 / 5; max-height: 74vh; border-radius: 18px; }
  .lead__body { padding: 16px; gap: 8px; }
  .lead__title { font-size: 1.45rem; line-height: 1.1; }
  .feed { padding: 14px 14px 6px; border-radius: 18px; }
  .feed__item { padding: 12px 0; min-height: 44px; }

  /* списки статей: перша картка велика, решта — компактні рядки */
  .grid { gap: 0; }
  .grid > .card:first-child { padding-bottom: 16px; }
  .grid > .card:not(:first-child) { flex-direction: row; align-items: flex-start; gap: 12px; padding-block: 12px; border-top: 1px solid var(--line); }
  .grid > .card:not(:first-child) > .card__media { flex: none; width: 108px; aspect-ratio: 1; border-radius: 12px; }
  .grid > .card:not(:first-child) .card__title { font-size: 1rem; line-height: 1.26; }
  .grid > .card:not(:first-child) .card__excerpt { display: none; }
  .grid > .card:not(:first-child) .chip { font-size: 0.68rem; }
  .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .rows .card { padding-block: 12px; }
  .card--row .card__media { width: 108px; }
  .card--big .card__title { font-size: 1.3rem; }

  .pagehead { padding-block: 20px 8px; }
  .pagehead__title { font-size: 2rem; }
  .article__title { font-size: 1.7rem; line-height: 1.1; }
  .article__head { padding-block: 16px 14px; gap: 12px; }
  .article__hero { border-radius: 16px; margin-inline: calc(-1 * var(--gutter)); border-radius: 0; box-shadow: none; }
  .prose { font-size: 1.06rem; line-height: 1.68; }
  .share { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 5; margin-top: 22px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); justify-content: space-between; }
  .share__label { margin-left: 6px; font-size: 0.84rem; }
  .authorbox { padding: 16px; border-radius: 18px; }
  .band { padding: 22px 18px 26px; border-radius: 18px; }
  .band__title { font-size: 2rem; }
  .band__stats { gap: 14px 22px; }
  .panel { padding: 16px; border-radius: 18px; }
  .links a { min-height: 44px; }
  .tabs { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .rail > * { width: 72vw; }
  .of-form form { padding: 16px; border-radius: 18px; }
  .of-total { position: sticky; bottom: calc(60px + env(safe-area-inset-bottom)); background: var(--surface); margin-inline: -16px; padding: 12px 16px; border-top: 1px solid var(--line); z-index: 4; }
  .of-total strong { font-size: 1.4rem; }
  .woocommerce ul.products li.product { padding: 10px 10px 14px; border-radius: 16px; }
  .pager .page-numbers { min-width: 44px; height: 44px; }
  input, select, textarea { font-size: 16px !important; }   /* iOS не збільшує сторінку при наборі */
}

/* Шапка: коротка дата і кнопка Telegram; на телефоні громади — сіткою в чотири колонки, без прокручування */
.today__short { display: none; }
.icon-btn--tg { color: #2aabee; }
.icon-btn--tg:hover { background: color-mix(in srgb, #2aabee 14%, transparent); }
@media (max-width: 900px) {
  .today__long { display: none; }
  .today__short { display: inline; text-transform: capitalize; }
  .today__date { display: inline-block; }
  .today { gap: 8px; margin-left: 2px; }
  .site-header .tools { gap: 0; }
  .site-header .nav > ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px 4px; overflow: visible; margin-inline: 0; padding-block: 6px 7px; mask-image: none; justify-content: stretch; }
  .site-header .nav a, .site-header .nav li:first-child a, .site-header .nav li:last-child a { margin: 0; padding: 8px 4px; min-height: 36px; text-align: center; font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; }
  .site-header .nav-suf { display: none; }
  :root { --header-h: 140px; }
}
@media (max-width: 520px) {
  .today__date { display: inline-block; }
  .site-header .nav a, .site-header .nav li:first-child a, .site-header .nav li:last-child a { font-size: 0.8rem; padding-inline: 2px; }
  .today__wx { padding: 5px 8px 5px 6px; gap: 4px; }
  .today { font-size: 0.8rem; gap: 6px; }
}
@media (max-width: 380px) { .site-header .logo img { height: 30px; } .site-header .icon-btn { width: 40px; } }

/* Шапка: кнопка Facebook поруч із Telegram */
.icon-btn--fb { color: #1877f2; }
.icon-btn--fb:hover { background: color-mix(in srgb, #1877f2 14%, transparent); }
@media (max-width: 900px) { .site-header .icon-btn { width: 40px; } }
@media (max-width: 380px) { .site-header .icon-btn { width: 36px; } .today__wx b { font-size: 0.78rem; } }

/* ==========================================================================
   Строга сітка: рівні картки, щільний ритм, без порожніх місць
   ========================================================================== */

/* Картки в сітці: фото, рубрика, заголовок (до 3 рядків), дата по нижній лінії ряду. Анонс — лише у великих картках. */
.grid > .card { height: 100%; }
.grid > .card > .card__body { flex: 1; }
.grid > .card .meta { margin-top: auto; padding-top: 4px; }
.grid > .card .card__excerpt { display: none; }
.card__title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card--row .card__title { -webkit-line-clamp: 3; }
.card--big .card__title, .lead__title { display: block; overflow: visible; }
@media (min-width: 901px) {
  .grid--fill[data-r3="1"] > .card:is(:first-child, :last-child) .card__excerpt,
  .grid--fill[data-r3="2"] > .card:first-child .card__excerpt,
  .grid--fill[data-n="1"] > .card .card__excerpt { display: -webkit-box; }
  .grid--fill[data-r3="1"] > .card:is(:first-child, :last-child) .meta,
  .grid--fill[data-r3="2"] > .card:first-child .meta { margin-top: 6px; }
  .grid--fill[data-r3="1"] > .card:is(:first-child, :last-child) > .card__body,
  .grid--fill[data-r3="2"] > .card:first-child > .card__body { justify-content: center; }
}
@media (min-width: 601px) and (max-width: 900px) { .grid--fill[data-r2="1"] > .card:first-child .card__excerpt { display: -webkit-box; } }

/* Вертикальний ритм: менші проміжки між розділами та перед підвалом */
.section { padding-block: clamp(18px, 2.8vw, 36px); }
.section__head { margin-bottom: clamp(14px, 1.8vw, 22px); }
.site-footer { margin-top: clamp(24px, 4vw, 48px); }
.site-footer__in { padding-block: clamp(26px, 4vw, 44px); gap: clamp(20px, 3vw, 44px); }
.supporters { padding-block: 0 clamp(18px, 3vw, 28px); }
.pager { padding-block: clamp(18px, 3vw, 32px) 0; }
.article__grid { padding-block: clamp(18px, 2.6vw, 32px) clamp(8px, 1.5vw, 16px); }
.page-body { padding-block: clamp(12px, 2vw, 24px) clamp(18px, 3vw, 32px); }
.pagehead { padding-block: clamp(20px, 3.4vw, 40px) clamp(10px, 1.6vw, 18px); }
.band { padding: clamp(24px, 4vw, 48px); gap: clamp(16px, 2.4vw, 26px); }
.ad, .ad-house { margin-block: clamp(10px, 2vw, 20px); }
.comments { margin-top: 28px; }
.authorbox { margin-top: 24px; }
.prose > * + * { margin-top: 1em; }

/* Перший екран: три колонки однієї висоти — друга заповнює весь стовпчик */
@media (min-width: 1081px) {
  .hero__sec { grid-template-rows: repeat(2, minmax(0, 1fr)); align-content: stretch; }
  .hero__sec > .card { height: 100%; min-height: 0; }
  .hero__sec > .card > .card__media { flex: 1 1 0; aspect-ratio: auto; min-height: 140px; }
  .hero__sec > .card > .card__body { flex: none; }
  .feature { align-items: stretch; }
  .feature > .card--big { height: 100%; }
  .feature > .card--big > .card__media { flex: 1 1 0; aspect-ratio: auto; min-height: 280px; }
  .feature .rows { align-content: space-between; }
  .feature .rows .card { padding-block: 16px; }
}
.feed { justify-content: space-between; }
.feed__list { display: flex; flex-direction: column; flex: 1; justify-content: space-between; }
@media (max-width: 1080px) { .feed__list { display: block; } }

/* Блоки внизу головної: однакова висота, нічого не «висить» */
.panel { height: 100%; }
.panel .links { flex: 1; align-content: start; }
.panel__cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.fb-frame { flex: 1; min-height: 380px; height: auto; }
.gc-cta { display: grid; align-content: center; justify-items: start; gap: 12px; padding: clamp(20px, 3vw, 36px); border-radius: var(--r-l); background: var(--green-soft); border: 1.5px dashed color-mix(in srgb, var(--green) 55%, transparent); }
.gc-cta strong { font-size: clamp(1.25rem, 2.2vw, 1.7rem); letter-spacing: -0.02em; line-height: 1.12; max-width: 22ch; }
.gc-cta span { color: var(--muted); max-width: 46ch; }
.gc-grid { align-items: stretch; }
@media (max-width: 900px) { .gc-cta { grid-column: auto !important; } }

/* Віджет Facebook: рівно по центру блока, на всю його висоту, без білого поля на темній темі */
.fb-box { flex: 1; min-height: 420px; display: grid; place-items: start center; overflow: hidden; border-radius: 14px; background: var(--surface-2); }
.fb-frame { flex: none; display: block; width: 100%; max-width: 500px; height: 100%; min-height: 0; border: 0; border-radius: 14px; background: transparent; }
@media (max-width: 700px) { .fb-box { min-height: 460px; } }

/* ==========================================================================
   Пошук: вікно з кнопкою закриття та підказками; сторінка результатів
   ========================================================================== */
dialog.search { width: min(94vw, 720px); margin-top: 10vh; max-height: 82vh; }
.search__panel { display: grid; gap: 10px; background: var(--surface); border-radius: 26px; padding: 10px; box-shadow: var(--shadow-l); border: 1px solid var(--line); }
dialog.search .searchbox { box-shadow: none; border: 0; background: var(--bg); padding: 6px 6px 6px 16px; align-items: center; gap: 8px; max-width: none; }
dialog.search .searchbox input { font-size: 1.12rem; height: 44px; }
.searchbox__icon { display: grid; place-items: center; color: var(--muted); flex: none; }
.searchbox__icon svg { width: 20px; height: 20px; }
.searchbox input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.search__close { flex: none; width: 44px; height: 44px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.search__close:hover { background: color-mix(in srgb, var(--ink) 13%, transparent); }
.search__close svg { width: 18px; height: 18px; }
.search__live { display: grid; gap: 2px; max-height: min(54vh, 460px); overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
.search__live[hidden] { display: none; }
.search__item { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; border-radius: 14px; transition: background-color 0.15s ease, transform 0.1s ease-out; }
.search__item:hover, .search__item.is-active { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.search__item:active { transform: scale(0.99); }
.search__item img, .search__ph { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: linear-gradient(135deg, var(--green), var(--teal)); display: block; }
.search__item strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.97rem; line-height: 1.28; font-weight: 650; }
.search__item small { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
.search__all { display: block; text-align: center; padding: 12px; margin-top: 4px; border-radius: 14px; background: var(--green-soft); color: var(--green-ink); font-weight: 650; font-size: 0.93rem; }
.search__all:hover, .search__all.is-active { filter: brightness(0.97); outline: 2px solid color-mix(in srgb, var(--green) 50%, transparent); }
.search__none, .search__fix { padding: 12px 10px; color: var(--muted); font-size: 0.93rem; }
.search__fix { padding-bottom: 2px; }
.search__hint { padding: 0 12px 6px; color: var(--muted); font-size: 0.8rem; }

.searchpage .pagehead { gap: 14px; }
.searchbox--page { max-width: 760px; padding: 6px 6px 6px 16px; align-items: center; gap: 8px; }
.searchbox--page input { font-size: 1.12rem; height: 44px; }
.searchbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.searchbar__count { font-weight: 650; }
.searchbar__group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: 0.88rem; }
.searchbar__group .tab { padding: 6px 12px; font-size: 0.86rem; }
.tab[aria-current="true"] { background: var(--ink); color: var(--bg); }
.results { display: grid; max-width: 900px; }
.result { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 18px; padding-block: 18px; border-top: 1px solid var(--line); align-items: start; }
.result:first-child { border-top: 0; padding-top: 4px; }
.result__media { display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.result__media img, .result__media .ph { width: 100%; height: 100%; object-fit: cover; }
.result__body { display: grid; gap: 6px; min-width: 0; }
.result__title { font-size: 1.2rem; line-height: 1.24; letter-spacing: -0.014em; font-weight: 720; }
.result__title a:hover { color: var(--green-ink); }
.result__text { color: var(--muted); font-size: 0.96rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
mark { background: color-mix(in srgb, var(--ua-yellow) 55%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.noresults { display: grid; gap: 12px; justify-items: start; padding-block: 8px 4px; }
.noresults__title { font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -0.024em; line-height: 1.1; }
.noresults__fix { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* Телефон: пошук на весь екран зверху; у шапці верхній рядок лишається завжди, ховається лише блок громад */
@media (max-width: 600px) {
  dialog.search { width: 100vw; max-width: 100vw; margin: 0; max-height: 100dvh; height: 100dvh; }
  .search__panel { border-radius: 0; height: 100%; align-content: start; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); border: 0; }
  dialog.search .searchbox .btn { display: none; }
  .search__live { max-height: none; flex: 1; }
  .result { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding-block: 14px; }
  .result__title { font-size: 1.04rem; }
  .result__text { -webkit-line-clamp: 2; font-size: 0.9rem; }
  .searchbar { gap: 8px 14px; }
  .searchbox--page .btn { padding: 9px 14px; }
}
@media (max-width: 900px) {
  .head-away .site-header { transform: none; }
  .site-header .nav { position: absolute; inset: 100% 0 auto 0; padding-inline: var(--gutter); background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--line); transition: opacity 0.22s ease, transform 0.3s var(--ease); }
  .site-header .nav::after { content: ""; position: absolute; inset: 100% 0 auto 0; height: 12px; pointer-events: none; background: linear-gradient(to bottom, color-mix(in srgb, var(--ink) 8%, transparent), transparent); }
  .site-header::after { display: none; }
  .head-away .site-header .nav { opacity: 0; transform: translateY(-12px); pointer-events: none; }
  .head-away .site-header { box-shadow: 0 1px 0 var(--line), 0 6px 16px rgba(0, 0, 0, 0.06); }
  main { padding-top: var(--nav-h, 88px); }
  :root { --header-h: 60px; }
}
@media (prefers-reduced-transparency: reduce) { .site-header .nav { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; } }

/* ==========================================================================
   Пагінація: «Показати ще», кроки назад/вперед, номери, «Сторінка N з M»
   ========================================================================== */
.pager { display: grid; justify-items: center; gap: 14px; padding-block: clamp(18px, 3vw, 32px) 0; }
.pager__more { min-width: min(100%, 320px); padding: 13px 22px; font-size: 0.98rem; }
.pager__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; width: 100%; }
.pager__nums { display: flex; align-items: center; gap: 4px; }
.pager .page-numbers { min-width: 40px; height: 40px; padding: 0 10px; display: grid; place-items: center; border-radius: 999px; font-weight: 650; font-variant-numeric: tabular-nums; transition: background-color 0.2s ease, transform 0.1s ease-out; }
.pager a.page-numbers:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.pager a.page-numbers:active { transform: scale(0.94); }
.pager .page-numbers.current { background: var(--ink); color: var(--bg); }
.pager .page-numbers.dots { min-width: 20px; padding: 0; color: var(--muted); }
.pager__step { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px; font-weight: 650; font-size: 0.92rem; background: color-mix(in srgb, var(--ink) 6%, transparent); transition: background-color 0.2s ease, transform 0.1s ease-out; }
a.pager__step:hover { background: color-mix(in srgb, var(--ink) 11%, transparent); }
a.pager__step:active { transform: scale(0.96); }
.pager__step.is-off { opacity: 0.35; }
.pager__info { display: none; color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  /* на телефоні: велика «Показати ще», під нею «← Новіші · Сторінка 1 з 12 · Старіші →» одним рядком */
  .pager__more { width: 100%; min-height: 48px; }
  .pager__row { flex-wrap: nowrap; justify-content: space-between; gap: 8px; }
  .pager__nums { display: none; }
  .pager__info { display: block; white-space: nowrap; }
  .pager__step { height: 44px; padding: 0 14px; }
}

/* Підвал на телефоні: три логотипи підтримки в один ряд, підпис — одним рядком */
.hide-phone { display: inline; }
@media (max-width: 600px) {
  .hide-phone { display: none; }
  .supporters__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; overflow: visible; margin-inline: 0; padding-inline: 0; }
  .supporters__logo { padding: 8px 6px; min-width: 0; border-radius: 12px; }
  .supporters__logo img { width: 100%; height: 34px; max-width: 100%; object-fit: contain; }
  .site-footer__bar { flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 8px; white-space: nowrap; font-size: 0.72rem; padding-block: 12px; }
  .site-footer__bar .made { overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 360px) { .site-footer__bar { font-size: 0.66rem; } }
