/* DEM Local Petitions — global design system
 * Minimal, opinionated: owns layout + typography; legacy style.css/bootstrap
 * are no longer pulled in so there is no CSS-override war.
 * --------------------------------------------------------------- */

/* Brand font: Gotham Pro (copied from legacy IIS bundle). Legacy CSS refers
 * to four faces under the exact names "Gotham Pro Light/Reg/Med/Bold";
 * we declare them individually and also as a single "Gotham Pro" family
 * with weights so stock font-weight helpers keep working. */
@font-face {
    font-family: "Gotham Pro"; font-weight: 300; font-style: normal; font-display: swap;
    src: url("/fonts/GothamPro/GothamPro-Light.woff") format("woff");
}
@font-face {
    font-family: "Gotham Pro"; font-weight: 400; font-style: normal; font-display: swap;
    src: url("/fonts/GothamPro/GothamPro.woff") format("woff");
}
@font-face {
    font-family: "Gotham Pro"; font-weight: 500; font-style: normal; font-display: swap;
    src: url("/fonts/GothamPro/GothamPro-Medium.woff") format("woff");
}
@font-face {
    font-family: "Gotham Pro"; font-weight: 700; font-style: normal; font-display: swap;
    src: url("/fonts/GothamPro/GothamPro-Bold.woff") format("woff");
}

:root {
    --dem-red: #e63946;
    --dem-red-dark: #c32a36;
    --dem-orange: #f7943e;          /* legacy brand orange, rgb(247,148,62) */
    --dem-orange-dark: #e57620;
    --dem-orange-soft: #fdeedd;
    --dem-ink: #333333;             /* legacy body copy */
    --dem-ink-2: #4a5568;
    --dem-ink-3: #6f7784;
    --dem-muted: #9aa5b1;
    --dem-border: #e2e8f0;
    --dem-bg: #f7fafc;
    --dem-card: #ffffff;
    --dem-link: #2f6ea6;
    --dem-link-hover: #204a72;
    --dem-green: #2f9e44;
    --dem-amber: #d4a017;
    --dem-danger: #c53030;
    --dem-dark:   #414249;          /* legacy header / map-section background */
    --dem-footer: #2b2f36;          /* legacy footer slightly darker */
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--dem-bg);
    color: var(--dem-ink);
    font-family: "Gotham Pro", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    min-height: 100vh;
}

body {
    display: flex;
    flex-direction: column;
}

a { color: var(--dem-link); text-decoration: none; }
a:hover { color: var(--dem-link-hover); text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 16px; color: var(--dem-ink); font-weight: 600; line-height: 1.3; }
h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }

p { margin: 0 0 16px; }

/* --------------------------- Header ---------------------------- */
.site-header {
    background: var(--dem-dark);
    color: #fff;
    border-bottom: 3px solid var(--dem-red);
}
.site-header .inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
}

/* Row 1 — top strip */
.site-header__top {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.site-backlink {
    color: #c6c8cd;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.8px;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 4px;
}
.site-backlink:hover { color: #fff; background: rgba(255,255,255,0.06); text-decoration: none; }

.site-toolbar {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}
.site-toolbar a {
    color: #dce3ea;
    font-size: 13px;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.site-toolbar a:hover { color: #fff; background: rgba(255,255,255,0.06); text-decoration: none; }
.site-toolbar svg { opacity: 0.75; }

/* User dropdown menu — header — clicking on "Вітаємо, ПІБ" opens role-aware list */
.user-menu { position: relative; display: inline-block; }
.user-menu__trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 0;
    color: rgba(255,255,255,0.78);
    font: inherit;
    font-size: 13px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
}
.user-menu__trigger:hover { color: #fff; background: rgba(255,255,255,0.06); }
.user-menu__caret { opacity: 0.6; }
.user-menu__dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 200px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    padding: 6px 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}
/* HTML [hidden] attribute must override `display: flex` above —
   higher-specificity selector ensures dropdown is closed by default
   and only shown when JS toggles `hidden` off. */
.user-menu__dropdown[hidden] {
    display: none;
}
.user-menu__dropdown a {
    color: var(--dem-ink-1, #2c2c2c) !important;
    background: transparent !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    text-decoration: none;
    border-radius: 0 !important;
}
.user-menu__dropdown a:hover { background: var(--dem-grey, #f5f5f5) !important; }
.user-menu__dropdown a.user-menu__signout {
    border-top: 1px solid var(--dem-grey, #eee);
    margin-top: 4px;
    color: var(--dem-red, #e63946) !important;
}

.site-city {
    color: #fff !important;
    background: rgba(255,255,255,0.12);
    font-weight: 500;
}
.site-city:hover { background: rgba(255,255,255,0.2) !important; }
.site-city--empty {
    background: transparent;
    color: #dce3ea !important;
    font-weight: 400;
}
.site-city--empty:hover { background: rgba(255,255,255,0.06) !important; }

/* Row 2 — left-aligned brand block */
.site-header__brand {
    padding: 22px 0 18px;
}
.site-header__brand .inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.site-brand {
    display: inline-block;
    color: #fff;
    text-decoration: none;
}
.site-brand:hover { text-decoration: none; }
.site-brand__logo {
    height: 60px;
    width: auto;
    display: block;
}
.site-brand__platform {
    margin-top: 8px;
    font-size: 12px;
    letter-spacing: 0.6px;
    color: #b8c0cc;
}

/* Row 3 — municipality action bar (optional) */
.site-header__action {
    background: rgba(0,0,0,0.18);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 12px 0;
}
.site-header__action .inner { gap: 20px; }

.muni-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
}
.muni-tabs a {
    color: #dce3ea;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 14px;
    transition: background .15s, color .15s;
}
.muni-tabs a:hover { color: #fff; background: rgba(255,255,255,0.08); text-decoration: none; }
.muni-tabs a.is-active {
    background: var(--dem-orange);
    color: #fff;
    font-weight: 600;
}

.muni-search {
    flex: 1;
    max-width: 320px;
    margin-left: auto;
    position: relative;
    display: flex;
    align-items: center;
    background: transparent;
}
.muni-search__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.55);
    pointer-events: none;
}
.muni-search input {
    width: 100%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    color: #fff;
    padding: 9px 16px 9px 40px;
    border-radius: 22px;
    font-size: 13px;
    outline: 0;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color .15s, background .15s;
}
.muni-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.muni-search input::placeholder { color: rgba(255,255,255,0.5); }
.muni-search input:focus {
    border-color: var(--dem-orange);
    background: rgba(255,255,255,0.14);
}
.muni-search input:focus + .muni-search__icon,
.muni-search:focus-within .muni-search__icon { color: var(--dem-orange); }

.muni-create {
    background: var(--dem-red);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 22px;
    text-decoration: none;
    white-space: nowrap;
}
.muni-create:hover { background: #d0212f; color: #fff; text-decoration: none; }

/* --------------------------- Main ----------------------------- */
.site-main {
    flex: 1 0 auto;
}

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 48px;
}

/* ------------------------- Landing ---------------------------- */
/* --------------------------- Hero (legacy-parity) --------------------------- */
.hero-full {
    background: #F7943E;
    overflow: hidden;
}
.hero-full__inner {
    max-width: 1263px;
    margin: 0 auto;
    position: relative;
}

#position-wrapper {
    position: relative;
    width: 100%;
    height: 206px;
    background: #F7943E;
    z-index: 1;
    color: #fff;
    font-weight: 500;
}

.you-position-motto {
    position: absolute;
    top: 25px;
    left: 80px;
    width: 400px;
    z-index: 4;
    color: #fff;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 500;
    /* Білий текст + білий airplane SVG + білий cityscape pattern зливалися; темна
       тінь повертає контраст без зміни layout-у. */
    text-shadow: 0 1px 3px rgba(0,0,0,0.45), 0 0 1px rgba(0,0,0,0.6);
}
.you-position-motto > div { padding: 2px 0; }

.pattern-background-container {
    position: relative;
    width: 100%;
    height: 206px;
    background: #F69346;
    line-height: 0;
}

.e-tub-container {
    position: relative;
    left: calc((100vw - 100%) / -2 - 1px);
    width: 152px;
    height: 206px;
    z-index: 2;
}
.e-tub {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}
.e-tub path { fill: var(--dem-bg) !important; }

.city-pattern {
    position: absolute;
    top: 85px;
    left: 63px;
    width: 1200px;
    height: 121px;
    z-index: 2;
    opacity: 0.3;
    overflow: hidden;
}

#animation-container {
    position: absolute;
    inset: 0;
    z-index: 3;
    overflow: visible;
}

.fly-rtl {
    position: absolute;
    top: 30px;
    right: 0;
    width: 120px;
    height: auto;
    animation: plane-rtl 8s linear infinite;
}
.fly-ltr {
    position: absolute;
    top: 0;
    left: 0;
    width: 120px;
    height: auto;
    animation: plane-ltr 5s linear infinite;
}
.balloon-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 38px;
    height: 106px;
    animation: balloon 60s linear infinite;
}
.mill-container {
    position: absolute;
    top: 103px;
    width: 13px;
    height: 13px;
    animation-name: mill-animation;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}
.mill-one { width: 100%; height: 100%; display: block; }

@keyframes plane-rtl {
    0%   { top: 100px; margin-right: 0; }
    100% { top: 0; width: 0; margin-right: 100%; }
}
@keyframes plane-ltr {
    100% { left: 100%; }
}
@keyframes balloon {
    0%   { left: 50%; top: 50%; }
    12%  { top: 50%; }
    25%  { top: 75%; }
    50%  { left: 100%; }
    75%  { left: 75%; top: 50%; }
    85%  { top: 75%; }
    100% { left: 50%; top: 100%; }
}
@keyframes mill-animation {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.live-feed {
    max-width: 1200px;
    margin: 24px auto 48px;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.live-feed__head {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 16px;
    color: var(--dem-ink);
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--dem-red);
    box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.2);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(230, 57, 70, 0); }
    100% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0); }
}

.live-feed__count {
    background: var(--dem-red);
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 13px;
}

.petition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.petition-card {
    display: block;
    background: var(--dem-card);
    border: 1px solid var(--dem-border);
    border-radius: 8px;
    padding: 16px 18px;
    color: var(--dem-ink);
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.petition-card:hover {
    text-decoration: none;
    color: var(--dem-ink);
    border-color: var(--dem-red);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.petition-card__loc {
    color: var(--dem-ink-3);
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

.petition-card__title {
    color: var(--dem-ink);
    font-weight: 600;
    font-size: 15px;
    line-height: 1.3;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.petition-card__meta {
    color: var(--dem-ink-3);
    font-size: 12px;
    margin-bottom: 8px;
}

.petition-card__bar {
    height: 4px;
    background: var(--dem-border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}
.petition-card__bar-fill {
    height: 100%;
    background: var(--dem-orange);
    border-radius: 2px;
    transition: width 0.3s;
}

.petition-card__days {
    color: var(--dem-ink-3);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ------------------------ Status pills ------------------------- */
.status-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}
.status-pill--draft    { background: var(--dem-muted); }
.status-pill--mod      { background: var(--dem-ink-3); }
.status-pill--active   { background: var(--dem-green); }
.status-pill--pending  { background: var(--dem-amber); }
.status-pill--answered { background: var(--dem-link); }
.status-pill--rejected { background: var(--dem-danger); }
.status-pill--archived { background: var(--dem-ink-3); }

/* --------------------------- Tabs ----------------------------- */
.tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--dem-border);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.tab-bar a {
    padding: 10px 18px;
    color: var(--dem-ink-2);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    font-weight: 500;
    font-size: 14px;
}
.tab-bar a:hover { color: var(--dem-ink); text-decoration: none; }
.tab-bar a.is-active {
    color: var(--dem-red);
    border-bottom-color: var(--dem-red);
    font-weight: 600;
}
.tab-bar__spacer { flex: 1; }
.tab-bar__cta {
    background: var(--dem-red);
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    align-self: center;
    margin-bottom: 4px;
}
.tab-bar__cta:hover { background: var(--dem-red-dark); color: #fff; text-decoration: none; }

/* --------------------------- Buttons -------------------------- */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    border: 0;
    cursor: pointer;
    line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--dem-red); color: #fff; }
.btn--primary:hover { background: var(--dem-red-dark); color: #fff; }
.btn--secondary { background: #fff; color: var(--dem-ink-2); border: 1px solid var(--dem-border); }
.btn--secondary:hover { background: var(--dem-bg); color: var(--dem-ink); }
.btn--success { background: var(--dem-green); color: #fff; }
.btn--warn { background: var(--dem-amber); color: #fff; }
.btn--danger { background: var(--dem-danger); color: #fff; }
.btn--block { display: block; width: 100%; }

/* --------------------------- Footer --------------------------- */
.site-footer {
    background: var(--dem-footer);
    color: #b8c0cc;
    padding: 36px 0 20px;
    font-size: 13px;
}

.site-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: auto 2fr 1fr;
    gap: 40px;
    align-items: start;
}

.site-footer__sponsor { display: flex; align-items: center; }
.site-footer__sponsor-logo {
    display: block;
    width: auto;
    height: 80px;
    max-width: 220px;
    object-fit: contain;
    filter: brightness(1.15);
}

.site-footer__egap {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    color: #93a0b1;
    line-height: 1.55;
    font-size: 12px;
}
.site-footer__egap-logo {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    object-fit: contain;
}
.site-footer__egap p { margin: 0; max-width: 540px; }
.site-footer__egap strong { color: #dce3ea; font-weight: 600; }

.site-footer__nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.site-footer__nav a { color: #dce3ea; text-decoration: none; font-size: 13px; }
.site-footer__nav a:hover { color: #fff; text-decoration: underline; }

.site-footer__copy {
    max-width: 1200px;
    margin: 24px auto 0;
    padding: 12px 24px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    color: #6b7686;
    font-size: 12px;
    text-align: center;
}

/* --------------------------- Static pages --------------------- */
.prose {
    background: var(--dem-card);
    border: 1px solid var(--dem-border);
    border-radius: 8px;
    padding: 32px 40px;
    max-width: 820px;
    margin: 24px auto 0;
}
.prose h1 { font-size: 26px; margin-bottom: 20px; }
.prose h2 { font-size: 19px; margin: 28px 0 14px; color: var(--dem-ink); }
.prose p { margin: 0 0 14px; color: var(--dem-ink-2); }
.prose a { color: var(--dem-link); }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 24px; color: var(--dem-ink-2); }
.prose li { margin: 4px 0; }
.prose .breadcrumbs { color: var(--dem-muted); font-size: 12px; margin: 0 0 16px; text-transform: uppercase; letter-spacing: 0.5px; }

/* -------------------------- Breadcrumbs ----------------------- */
.breadcrumbs {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--dem-muted);
    font-size: 11px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin: 0 0 18px;
}
.breadcrumbs a { color: var(--dem-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--dem-ink-2); text-decoration: none; }
.breadcrumbs__sep { color: var(--dem-orange); font-weight: 600; }
.breadcrumbs__current { color: var(--dem-ink-2); font-weight: 600; }

/* ------------------------ Hero compact ------------------------ */
.hero--compact {
    background: linear-gradient(135deg, var(--dem-orange) 0%, #e57620 100%);
    color: #fff;
    padding: 28px 0;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}
.hero--compact .hero__inner { position: relative; z-index: 1; }
.hero--compact .hero__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.hero--compact .hero__title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #fff;
    margin: 0;
}
.hero--compact .hero__aside { color: rgba(255,255,255,0.95); font-size: 14px; }

.hero__filter {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.95);
}
.hero__filter label {
    font-size: 13px;
    color: rgba(255,255,255,0.9);
    margin: 0;
}
.hero__select {
    padding: 7px 28px 7px 12px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.12) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='white' stroke-width='1.6'><polyline points='1 1, 5 5, 9 1'/></svg>") no-repeat right 10px center;
    color: #fff;
    font-size: 13px;
    min-width: 180px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: background-color .15s;
}
.hero__select:hover { background-color: rgba(255,255,255,0.2); }
.hero__select option { color: var(--dem-ink); background: #fff; }

/* Sort tabs (popular / newest) */
.sort-tabs {
    display: flex;
    justify-content: flex-end;
    gap: 24px;
    margin-bottom: 20px;
}
.sort-tabs__link {
    color: var(--dem-ink-3);
    font-size: 14px;
    text-decoration: none;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}
.sort-tabs__link:hover { color: var(--dem-orange); text-decoration: none; }
.sort-tabs__link.is-active {
    color: var(--dem-orange);
    border-bottom-color: var(--dem-orange);
    font-weight: 500;
}

/* --------------------- Detail layout -------------------------- */
.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
    align-items: start;
}
.detail-main { min-width: 0; }
.detail-main__title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--dem-ink);
    margin: 0 0 20px;
}
.detail-body {
    color: var(--dem-ink);
    font-size: 15px;
    line-height: 1.6;
}
.detail-body p { margin: 0 0 14px; }

.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    top: 20px;
}

.meta-row {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 10px;
    align-items: start;
    font-size: 13px;
    color: var(--dem-ink-2);
    line-height: 1.4;
}
.meta-row__icon { color: var(--dem-ink-3); font-size: 14px; line-height: 1.3; }
.meta-row__label { color: var(--dem-ink-3); display: block; font-size: 12px; }
.meta-row__value { color: var(--dem-ink); font-weight: 600; }

/* --------------------------- Sign ring ------------------------ */
.sign-box {
    background: var(--dem-card);
    border: 1px solid var(--dem-border);
    border-radius: 10px;
    padding: 22px 16px 20px;
    text-align: center;
}
.sign-box__head {
    color: var(--dem-ink-2);
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px;
}
.sign-ring {
    display: block;
    margin: 0 auto 16px;
    width: 170px;
    height: 170px;
}
.sign-ring__track { fill: none; stroke: var(--dem-orange-soft); stroke-width: 12; }
.sign-ring__fill  { fill: none; stroke: var(--dem-orange); stroke-width: 12; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 0.4s; }
.sign-ring__count { fill: var(--dem-ink); font-size: 34px; font-weight: 700; text-anchor: middle; }
.sign-ring__total { fill: var(--dem-ink-3); font-size: 13px; text-anchor: middle; }
.sign-box__share {
    color: var(--dem-ink-3);
    font-size: 12px;
    line-height: 1.4;
    margin-top: 14px;
}

/* ----------------- Share block (Telegram/Viber/Facebook/Copy) ---- */
/* ----------------- Плашка тижневого дайджеста (головна) -------------- */
.digest-banner {
    display: block;
    max-width: 1140px;
    margin: 18px auto 0;
    padding: 0 16px;
    text-decoration: none;
    color: inherit;
}
.digest-banner__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: linear-gradient(90deg, #fff8ef, #fff);
    border: 1px solid var(--dem-border);
    border-left: 5px solid var(--dem-orange);
    border-radius: 10px;
    padding: 14px 20px;
    transition: box-shadow .15s, transform .15s;
}
.digest-banner:hover .digest-banner__inner { box-shadow: 0 4px 14px rgba(0,0,0,0.08); transform: translateY(-1px); }
.digest-banner__badge {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 11.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
    color: var(--dem-orange); background: rgba(240,140,0,0.10);
    border-radius: 999px; padding: 7px 14px; white-space: nowrap;
}
.digest-banner__title { font-weight: 600; font-size: 15px; line-height: 1.4; }
.digest-banner__stats { font-size: 12.5px; color: var(--dem-ink-3); }
.digest-banner__cta { font-size: 14px; font-weight: 700; color: var(--dem-orange); white-space: nowrap; }

/* Десктоп: бейдж | заголовок + цифри другим рядком | CTA справа */
@media (min-width: 641px) {
    .digest-banner__inner {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "badge title cta"
            "badge stats cta";
        column-gap: 20px;
        row-gap: 3px;
    }
    .digest-banner__badge { grid-area: badge; align-self: center; }
    .digest-banner__title { grid-area: title; align-self: end; }
    .digest-banner__stats { grid-area: stats; align-self: start; }
    .digest-banner__cta   { grid-area: cta;   align-self: center; }
}
@media (max-width: 640px) {
    .digest-banner__stats { display: none; }
}

.share-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--dem-border); }
.share-block__hint { color: var(--dem-ink-3); font-size: 12px; text-align: center; margin-bottom: 8px; }
.share-block__primary { margin-bottom: 10px; }
.share-block__icons { display: flex; justify-content: center; gap: 8px; }
.share-block__copied { color: #166534; font-size: 12px; text-align: center; margin-top: 8px; }
.share-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%; box-sizing: border-box;
    /* padding:0 — глобальний button-стиль дає 10px 16px і стискає svg у 2px */
    padding: 0;
    border: 1px solid var(--dem-border); background: #fff; color: var(--dem-ink-2);
    text-decoration: none; cursor: pointer; transition: all 0.15s;
}
.share-icon svg { flex-shrink: 0; }
.share-icon:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
.share-icon--tg:hover    { background: #229ED9; color: #fff; border-color: #229ED9; }
.share-icon--viber:hover { background: #7360F2; color: #fff; border-color: #7360F2; }
.share-icon--fb:hover    { background: #1877F2; color: #fff; border-color: #1877F2; }
.share-icon--x:hover     { background: #000; color: #fff; border-color: #000; }
.share-icon--copy:hover  { background: var(--dem-orange); color: #fff; border-color: var(--dem-orange); }

/* ----------------- Orange pill button (sign CTA) -------------- */
.btn--orange {
    background: var(--dem-orange);
    color: #fff;
    border-radius: 999px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
}
.btn--orange:hover { background: #d97a22; color: #fff; }
.btn--orange[disabled],
.btn--orange.is-disabled { background: var(--dem-muted); cursor: not-allowed; }

/* --------------------------- CTA banner ----------------------- */
.cta-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--dem-orange-soft);
    border: 1px solid #f4d4a4;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.cta-banner__text { color: var(--dem-ink); font-size: 14px; }
.cta-banner__text strong { color: var(--dem-ink); }

/* --------------------------- Category pill -------------------- */
.category-pill {
    display: inline-block;
    border: 1px solid var(--dem-orange);
    color: var(--dem-orange);
    background: #fff;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

/* --------------------------- Alerts / notices ----------------- */
.notice {
    background: #eef5fb;
    border-left: 3px solid var(--dem-link);
    padding: 14px 16px;
    border-radius: 4px;
    margin: 16px 0;
    color: var(--dem-ink);
    font-size: 14px;
    line-height: 1.5;
}
.notice__head { font-weight: 600; margin: 0 0 6px; color: var(--dem-link); }

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin: 12px 0;
    font-size: 14px;
    line-height: 1.5;
}
.alert--danger  { background: #fdecea; border: 1px solid #f5c2c7; color: #842029; }
.alert--info    { background: #eef5fb; border: 1px solid #cfe0ee; color: #1b4c72; }
.alert--success { background: #e6f5ea; border: 1px solid #c2e0cd; color: #1b5e20; }
.alert__head { font-weight: 600; margin: 0 0 4px; }

/* --------------------------- Card wrapper --------------------- */
.card {
    background: var(--dem-card);
    border: 1px solid var(--dem-border);
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 18px;
}
.card__head {
    font-size: 14px;
    font-weight: 600;
    color: var(--dem-ink-2);
    margin: 0 0 12px;
}

/* --------------------------- How it works -------------------- */
.how-section {
    padding: 48px 0 56px;
    background: #fff;
    border-top: 1px solid var(--dem-border);
    border-bottom: 1px solid var(--dem-border);
    margin: 32px 0 0;
}
.how-section__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.how-section__head {
    text-align: left;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 0.5px;
    color: var(--dem-ink);
    margin: 0 0 28px;
}
.how-section__head::after {
    content: "?";
    color: var(--dem-ink);
}

.how-it-works {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.how-step {
    flex: 1;
    text-align: center;
    position: relative;
    min-width: 0;
}
.how-step__icon-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    position: relative;
}
.how-step__icon {
    width: 88px;
    height: 88px;
    background: var(--dem-orange);
    border-radius: 50%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 40px 40px;
}
.how-step__arrow {
    position: absolute;
    top: 50%;
    right: -14px;
    transform: translateY(-50%);
    width: 28px;
    height: 14px;
    pointer-events: none;
    color: #d9d9db;
}
.how-step__arrow::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 8px;
    height: 2px;
    background: currentColor;
}
.how-step__arrow::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    width: 10px;
    height: 10px;
    transform: translateY(-50%) rotate(-45deg);
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
}
.how-step:last-child .how-step__arrow { display: none; }
.how-step__tag {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--dem-ink);
    margin: 0 0 8px;
    display: block;
}
.how-step__text {
    font-size: 14px;
    color: var(--dem-ink);
    line-height: 1.4;
    max-width: 220px;
    margin: 0 auto;
}

/* --------------------------- Top municipalities tiles --------- */
.muni-tile {
    display: block;
    padding: 10px 14px;
    border: 1px solid var(--dem-border);
    border-radius: 6px;
    background: #fff;
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s;
}
.muni-tile:hover {
    border-color: var(--dem-orange);
    box-shadow: 0 2px 6px rgba(247, 148, 62, 0.18);
    text-decoration: none;
}
.muni-tile strong {
    color: var(--dem-ink);
    font-size: 14px;
    font-weight: 600;
    display: block;
}
.muni-tile small {
    color: var(--dem-ink-3);
    display: block;
    margin-top: 2px;
    font-size: 12px;
}

/* --------------------------- Recently accepted card ------------ */
.accepted-group {
    background: #fff8f1;
    border: 1px solid #f5d9bd;
    border-radius: 10px;
    padding: 22px 26px 24px;
    margin-top: 8px;
}
.accepted-group .section-head { margin-bottom: 16px; }
.accepted-group .petition-card {
    background: #fff;
}

/* --------------------------- Last answer (testimonial) --------- */
.last-answer {
    background: #fff;
    border: 1px solid var(--dem-border);
    border-radius: 10px;
    padding: 36px 40px 40px;
    margin: 40px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.last-answer__eyebrow {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--dem-orange);
    margin: 0 0 10px;
}
.last-answer__title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 12px;
    color: var(--dem-ink);
}
.last-answer__link {
    display: block;
    text-align: center;
    color: var(--dem-orange);
    font-size: 13px;
    margin: 0 0 20px;
}
.last-answer__who {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin: 0 0 14px;
}
.last-answer__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--dem-orange-soft);
    color: var(--dem-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}
.last-answer__name { font-weight: 700; color: var(--dem-orange); text-transform: uppercase; font-size: 13px; letter-spacing: 0.4px; }
.last-answer__post { color: var(--dem-ink-3); font-size: 12px; }
.last-answer__text { color: var(--dem-ink-2); font-size: 14px; line-height: 1.55; text-align: center; max-width: 640px; margin: 0 auto; }

/* --------------------------- Empty-state placeholder --------- */
/* Used in community-root widgets (/{slug}) when a block has no data */
.empty-state {
    padding: 40px 24px;
    text-align: center;
    color: var(--dem-ink-3);
    background: #fafafa;
    border: 1px dashed var(--dem-border);
    border-radius: 8px;
    margin: 8px 0 16px;
}
.empty-state__icon {
    font-size: 36px;
    line-height: 1;
    margin-bottom: 12px;
    opacity: 0.6;
}
.empty-state__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--dem-ink-2);
    margin-bottom: 6px;
}
.empty-state__sub {
    font-size: 13px;
    color: var(--dem-ink-3);
    line-height: 1.5;
}
.empty-state__sub a {
    color: var(--dem-orange);
    text-decoration: none;
}
.empty-state__sub a:hover { text-decoration: underline; }

/* --------------------------- Section heads -------------------- */
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 32px 0 16px;
    flex-wrap: wrap;
}
.section-head__title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--dem-ink);
    margin: 0;
    padding-left: 14px;
    position: relative;
}
.section-head__title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: var(--dem-orange);
    border-radius: 2px;
}
.section-head__link {
    color: var(--dem-orange);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: color .15s;
}
.section-head__link:hover {
    color: var(--dem-red);
    text-decoration: underline;
}

/* --------------------------- UA map --------------------------- */
.map-section {
    background-color: var(--dem-dark);
    background-image: url("/images/city-bg.png");
    background-repeat: repeat;
    padding: 60px 0;
    margin-top: 0;
}
.map-section__inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 40px;
    align-items: center;
    justify-content: center;
}

.ua-map {
    position: relative;
    flex: 0 1 777px;
    max-width: 777px;
    height: auto;
}
.ua-map svg,
.ua-map__svg { width: 100%; height: auto; display: block; }
.ua-map polygon,
.ua-map path { fill: #ffffff; stroke: var(--dem-dark); stroke-width: 0.6; transition: fill 0.15s ease; cursor: pointer; }
.ua-map polygon:hover,
.ua-map path:hover { fill: var(--dem-orange); }

.ua-map__badge {
    position: absolute;
    background: var(--dem-orange);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 2px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    white-space: nowrap;
    font-family: "Gotham Pro", sans-serif;
}

.map-info {
    flex: 0 0 340px;
    width: 340px;
    box-sizing: border-box;
    padding: 35px;
    background: #ffffff;
    color: var(--dem-ink);
    line-height: 1;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.map-info__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--dem-orange);
    font-size: 18px;
    font-weight: 500;
    padding-bottom: 18px;
    border-bottom: 1px solid #efefef;
    margin-bottom: 22px;
}
.map-info__head::after {
    content: "›";
    font-size: 22px;
    color: var(--dem-orange);
    transform: translateY(-2px);
}
.map-info__item { margin-bottom: 22px; }
.map-info__item:last-child { margin-bottom: 0; }
.map-info__label {
    font-size: 17px;
    font-weight: 500;
    color: var(--dem-ink);
    margin: 0 0 6px;
}
.map-info__value {
    font-size: 30px;
    font-weight: 700;
    color: var(--dem-ink);
    display: block;
    line-height: 1;
}

/* --------------------- Municipalities catalog ----------------- */
.muni-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 20px 0 24px;
    flex-wrap: wrap;
}
.muni-toolbar__search {
    flex: 1 1 260px;
    max-width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--dem-border);
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
    color: var(--dem-ink);
    transition: border-color 0.15s;
}
.muni-toolbar__search:focus { outline: none; border-color: var(--dem-orange); box-shadow: 0 0 0 3px rgba(242, 142, 51, 0.12); }

/* Picker layout: left col = top active, right col = oblasts (CSS columns) */
.muni-picker-layout {
    display: flex;
    gap: 0;
    align-items: flex-start;
    margin-bottom: 28px;
}
.muni-picker-col {
    padding: 20px 24px;
}
.muni-picker-col--active {
    flex: 0 0 220px;
    min-width: 180px;
    background: var(--dem-orange-soft);
    border-radius: 6px 0 0 6px;
    border-right: 1px solid var(--dem-border);
}
.muni-picker-col--regions {
    flex: 1 1 0;
    background: #fff;
    border: 1px solid var(--dem-border);
    border-radius: 0 6px 6px 0;
    border-left: none;
    min-width: 0;
}
.muni-picker-col__title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    color: var(--dem-ink-3);
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--dem-border);
    white-space: nowrap;
}
.muni-picker-col--active .muni-picker-col__title { color: var(--dem-orange-dark); }

/* Active list: vertical chips with region subtitle */
.muni-picker-active-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Oblast groups rendered via CSS columns for multi-column flow */
.muni-region-columns {
    column-count: 3;
    column-gap: 24px;
}
.region-group {
    margin-bottom: 22px;
    break-inside: avoid;
}
.region-group__title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--dem-ink-3);
    margin: 0 0 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--dem-border);
}

/* Per-oblast item list */
.muni-region-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

/* legacy-style grid (provider-restricted view) */
.municipality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px 16px;
}

/* Chips */
.municipality-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border-radius: 4px;
    color: var(--dem-ink);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.1s;
}
.municipality-chip:hover { background: var(--dem-orange-soft); text-decoration: none; color: var(--dem-ink); }
.municipality-chip__dot { width: 8px; height: 8px; background: var(--dem-orange); border-radius: 50%; flex-shrink: 0; }
.municipality-chip__text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.municipality-chip__name { font-weight: 500; }
.municipality-chip__name--main { font-weight: 700; }
.municipality-chip__count { color: var(--dem-ink-3); font-size: 11px; margin-left: auto; flex-shrink: 0; }
.municipality-chip__badge {
    display: inline-block;
    margin-left: 4px;
    font-size: 10px;
    color: var(--dem-orange, #ff8800);
    cursor: help;
    font-style: italic;
    white-space: nowrap;
}
.municipality-chip__region {
    font-size: 11px;
    color: var(--dem-ink-3);
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Active chip variant: larger text, more padding */
.municipality-chip--active {
    padding: 7px 8px;
    font-size: 14px;
}
.municipality-chip--active .municipality-chip__name { font-size: 14px; font-weight: 700; }
.municipality-chip--active .municipality-chip__region { font-size: 12px; }

.muni-not-found {
    margin: 28px 0 20px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid var(--dem-border);
    border-radius: 6px;
    text-align: center;
}
.muni-not-found summary {
    color: var(--dem-link);
    font-size: 15px;
    cursor: pointer;
    list-style: none;
    border-bottom: 1px dashed var(--dem-link);
    display: inline-block;
    padding-bottom: 2px;
}
.muni-not-found summary:hover { color: var(--dem-link-hover); }
.muni-not-found__body {
    margin-top: 14px;
    color: var(--dem-ink-2);
    font-size: 14px;
    text-align: left;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}
.muni-not-found__body p { margin: 0 0 10px; }

/* City-pill change link */
.site-city__change {
    color: rgba(255,255,255,0.55) !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    padding: 2px 4px !important;
    background: none !important;
    text-decoration: none;
    margin-left: 0 !important;
}
.site-city__change:hover { color: #fff !important; text-decoration: underline !important; background: none !important; }

/* --------------------------- Forms ---------------------------- */
.form-field { margin-bottom: 18px; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--dem-ink-2);
    margin: 0 0 6px;
}
.form-input,
.form-textarea,
.form-select {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--dem-border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: var(--dem-ink);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--dem-orange);
    box-shadow: 0 0 0 3px rgba(242, 142, 51, 0.12);
}
.form-textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.form-hint { color: var(--dem-ink-3); font-size: 12px; margin-top: 6px; }
.form-error { color: var(--dem-danger); font-size: 12px; margin-top: 6px; }

/* --------------------------- Table ---------------------------- */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--dem-card);
    border: 1px solid var(--dem-border);
    border-radius: 8px;
    overflow: hidden;
    font-size: 14px;
}
.table thead th {
    background: #f8f9fa;
    color: var(--dem-ink-3);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--dem-border);
}
.table tbody td {
    padding: 10px 16px;
    border-top: 1px solid var(--dem-border);
    color: var(--dem-ink);
}
.table tbody tr:hover td { background: #fbfbfd; }
.table td.num,
.table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.muted,
.table th.muted { color: var(--dem-ink-3); }

/* --------------------------- Pagination ----------------------- */
.pagination {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
    margin: 24px 0;
    flex-wrap: wrap;
}
.pagination a,
.pagination span {
    display: inline-block;
    min-width: 36px;
    padding: 6px 10px;
    text-align: center;
    border-radius: 4px;
    color: var(--dem-ink-2);
    text-decoration: none;
    font-size: 14px;
    border: 1px solid transparent;
}
.pagination a:hover { background: var(--dem-orange-soft); color: var(--dem-ink); text-decoration: none; }
.pagination .is-current { background: var(--dem-orange); color: #fff; font-weight: 600; }
.pagination .is-disabled { color: var(--dem-muted); cursor: not-allowed; }

/* ========================= Muni-Picker Modal ========================= */
/* Buttons that trigger modal (reset from <a> link defaults) */
button.site-city,
button.site-city--empty {
    background: rgba(255,255,255,0.12);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 4px;
}
button.site-city { color: #fff !important; }
button.site-city:hover { background: rgba(255,255,255,0.2) !important; }
button.site-city--empty { background: transparent; color: #dce3ea !important; font-weight: 400; }
button.site-city--empty:hover { background: rgba(255,255,255,0.06) !important; }
button.site-city__change {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    color: rgba(255,255,255,0.55) !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    padding: 2px 4px !important;
    text-decoration: none;
    margin-left: 0 !important;
}
button.site-city__change:hover { color: #fff !important; text-decoration: underline !important; }

/* Modal overlay */
.muni-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}
.muni-modal[hidden] { display: none; }
/* CRITICAL: every visible inner block has explicit `display: ...` which beats
   the UA default `[hidden]{display:none}`. Re-establish it via specific
   selectors so JS toggling `el.hidden = true` actually hides things. */
.muni-cities-grid[hidden],
.muni-oblasts-grid[hidden],
.muni-tab-pane[hidden],
.muni-search-oblasts[hidden],
.muni-oblast-drill[hidden],
.muni-show-all[hidden],
.muni-empty[hidden],
.municipality-chip[hidden],
.muni-oblast-choice[hidden] { display: none !important; }
.muni-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 0;
}
.muni-modal__panel {
    position: relative;
    z-index: 1;            /* Firefox needed explicit z-index to keep the
                              panel above the position:fixed backdrop —
                              chip clicks went through to backdrop and
                              closed the modal instead of navigating. */
    background: #fff;
    max-width: 1100px;
    width: 100%;
    max-height: calc(100vh - 48px);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.muni-modal__head {
    background: var(--dem-dark);
    color: #fff;
    padding: 18px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1;
}
.muni-modal__head h2 {
    color: #fff;
    font-size: 22px;
    margin: 0;
}
.muni-modal__close {
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    border-radius: 4px;
    font-family: inherit;
}
.muni-modal__close:hover { background: rgba(255,255,255,0.1); }
.muni-modal__body { padding: 24px 28px; flex: 1; overflow-y: auto; }
.muni-modal__search input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--dem-border);
    border-radius: 4px;
    font-size: 15px;
    margin-bottom: 20px;
    font-family: inherit;
    color: var(--dem-ink);
}
.muni-modal__search input:focus {
    outline: 2px solid var(--dem-orange);
    outline-offset: 1px;
    border-color: var(--dem-orange);
}
/* Scoped under .muni-modal so the existing global `.muni-tabs` rules
   in _MuniActionBar (header pill-tabs) are not overridden. */
.muni-modal .muni-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--dem-border);
    margin-bottom: 20px;
}
.muni-modal .muni-tab {
    background: transparent;
    border: 0;
    padding: 12px 20px;
    font-size: 14px;
    cursor: pointer;
    color: var(--dem-ink-2);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-family: inherit;
}
.muni-modal .muni-tab.is-active {
    color: var(--dem-orange);
    border-bottom-color: var(--dem-orange);
    font-weight: 600;
}
.muni-tab-pane { display: none; }
.muni-tab-pane.is-active { display: block; }
.muni-cities-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px 16px;
}
.muni-oblasts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px 16px;
}
.muni-oblast-choice {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    color: var(--dem-ink);
    background: transparent;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
}
.muni-oblast-choice:hover { background: var(--dem-orange-soft); }
.muni-show-all {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.muni-show-all button {
    background: transparent;
    border: 0;
    color: var(--dem-orange);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    padding: 0;
    font-family: inherit;
}
.muni-show-all button:hover { text-decoration: underline; }
.muni-show-all__hint {
    color: var(--dem-ink-3);
    font-size: 13px;
    font-style: italic;
}
.muni-oblast-drill__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--dem-border);
}
.muni-oblast-drill__head h3 { margin: 0; }
.muni-oblast-drill__head button {
    background: transparent;
    border: 0;
    color: var(--dem-orange);
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}
.muni-oblast-drill__head button:hover { text-decoration: underline; }
.muni-search-oblast-group { margin-bottom: 24px; }
.muni-search-oblast-group__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--dem-ink-2);
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--dem-border);
}
/* Override the existing .muni-not-found inside the modal so it doesn't interfere */
#muni-picker-modal .muni-not-found {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--dem-border);
    background: none;
    border: none;
    border-top: 1px solid var(--dem-border);
    border-radius: 0;
    text-align: left;
    padding-left: 0;
    padding-right: 0;
}
#muni-picker-modal .muni-not-found summary {
    color: var(--dem-link);
    font-size: 14px;
    cursor: pointer;
    display: inline-block;
    list-style: none;
    border-bottom: none;
}
#muni-picker-modal .muni-not-found__body { margin-top: 12px; max-width: 560px; }
.muni-empty {
    text-align: center;
    padding: 32px;
    color: var(--dem-ink-3);
}

/* ================= Responsive ================= */
@media (max-width: 768px) {
    /* ---- Header ---- */
    .site-header .inner { padding: 0 16px; }
    .site-backlink { display: none; }
    .site-header__top { padding: 6px 0; }
    .site-header__top .inner { justify-content: flex-end; }
    .site-toolbar { gap: 0; margin-left: 0; flex-wrap: wrap; }
    .site-toolbar a { padding: 6px 8px; font-size: 12px; gap: 4px; }
    .site-toolbar a[href="/about"] { display: none; }
    .site-city, .site-city--empty { font-size: 12px; padding: 6px 8px; }

    .site-header__brand { padding: 14px 0 12px; }
    .site-brand__logo { height: 40px; }
    .site-brand__platform { display: none; }

    .site-header__action { padding: 10px 0; }
    .site-header__action .inner {
        flex-wrap: wrap;
        gap: 10px;
        padding: 0 16px;
    }
    .muni-tabs {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .muni-tabs::-webkit-scrollbar { display: none; }
    .muni-tabs a { padding: 6px 10px; font-size: 13px; flex-shrink: 0; }
    /* flex-basis 100%: базовий flex:1 дає basis 0% і width:100% ігнорується —
       поле ділило рядок з кнопкою «Створити» замість повної ширини */
    .muni-search { flex: 1 1 100%; width: 100%; max-width: none; margin-left: 0; order: 2; }
    /* mobile.css вантажиться після site.css і його глобальний input[type="search"]
       (padding:10px 12px) перебиває відступ під лупу — повертаємо специфічністю */
    .muni-search input[type="search"] { padding-left: 40px; }
    .muni-create { order: 3; padding: 8px 14px; font-size: 13px; }

    /* ---- Landing hero: hide decorations, simplify ---- */
    .hero-full__inner { max-width: 100%; }
    #position-wrapper { height: auto; min-height: 120px; }
    .you-position-motto {
        position: static;
        width: auto;
        padding: 28px 20px 24px;
        font-size: 22px;
        line-height: 1.25;
    }
    .pattern-background-container { display: none; }
    .e-tub-container,
    .city-pattern,
    #animation-container { display: none; }

    /* ---- Page container ---- */
    .page-container { padding: 20px 16px 32px; }

    /* ---- LIVE feed head ---- */
    .live-feed { margin: 16px auto 32px; padding: 0 16px; }
    .live-feed__head { flex-wrap: wrap; font-size: 14px; gap: 8px; }
    .live-feed__count { font-size: 12px; }

    /* ---- Section head (top-munis etc.) ---- */
    .section-head { flex-wrap: wrap; gap: 8px; }
    .section-head__title { font-size: 16px; }
    .section-head__link { font-size: 13px; }

    /* ---- How it works: 2×2 grid ---- */
    .how-section { padding: 32px 16px; }
    .how-section__head { font-size: 18px; margin: 0 0 20px; }
    .how-it-works {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 16px;
    }
    .how-step__icon { width: 64px; height: 64px; background-size: 30px 30px; }
    .how-step__arrow { display: none; }
    .how-step__text { font-size: 13px; max-width: 160px; }

    /* ---- Accepted / Last-answer cards ---- */
    .accepted-group { padding: 20px 16px; }
    .last-answer { padding: 28px 20px; }

    /* ---- Ukraine map: hide, keep stats only ---- */
    .map-section { padding: 32px 0; }
    .map-section__inner { flex-direction: column; gap: 20px; padding: 0 16px; }
    .ua-map { display: none; }
    .map-info { width: 100%; flex: none; padding: 24px; }

    /* ---- Municipalities catalog ---- */
    .muni-toolbar { padding: 0 0 16px; }
    .municipality-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .muni-picker-layout { flex-direction: column; }
    .muni-picker-col--active { flex: none; width: 100%; border-radius: 6px 6px 0 0; border-right: none; border-bottom: 1px solid var(--dem-border); }
    .muni-picker-col--regions { border-radius: 0 0 6px 6px; border-left: 1px solid var(--dem-border); border-top: none; }
    .muni-region-columns { column-count: 2; column-gap: 16px; }

    /* ---- Petition details ---- */
    .detail-grid { grid-template-columns: 1fr; gap: 20px; }
    .detail-sidebar { position: static; }
    .prose { padding: 20px; }

    /* ---- Petition list hero/filters ---- */
    .hero--compact .hero__inner { flex-direction: column; align-items: flex-start; gap: 10px; }
    .hero__title { font-size: 20px; }
    .sort-tabs { flex-wrap: wrap; justify-content: flex-start; gap: 12px; }

    /* ---- Footer ---- */
    .site-footer { padding: 28px 16px 20px; }
    .site-footer__inner { grid-template-columns: 1fr; gap: 20px; }
    .site-footer__egap { flex-direction: column; align-items: flex-start; gap: 10px; }
    .site-footer__nav { flex-direction: column; gap: 8px; align-items: flex-start; }

    /* ---- Muni-picker modal ---- */
    .muni-modal { padding: 0; align-items: flex-start; }
    .muni-modal__panel { margin: 0; max-width: 100%; max-height: 100dvh; border-radius: 0; height: 100dvh; }
    .muni-modal__body { padding: 16px; }
    .muni-modal__head { padding: 14px 16px; }
    .muni-modal__head h2 { font-size: 17px; }
    .muni-cities-grid, .muni-oblasts-grid { grid-template-columns: repeat(2, 1fr); }
    button.site-city, button.site-city--empty { font-size: 12px; padding: 6px 8px; }
}

@media (max-width: 480px) {
    /* Extra-narrow tweaks */
    .site-toolbar a span,
    .site-toolbar a[href="/me"] { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .site-brand__logo { height: 36px; }
    .you-position-motto { font-size: 19px; padding: 22px 16px 20px; }

    .how-it-works { grid-template-columns: 1fr; gap: 20px; }
    .how-step__text { max-width: none; }

    .muni-create { padding: 7px 12px; font-size: 12px; }
    .petition-grid { grid-template-columns: 1fr; }
    .muni-region-columns { column-count: 1; }

    /* ---- Muni-picker modal ---- */
    .muni-cities-grid, .muni-oblasts-grid { grid-template-columns: 1fr; }
}
