@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/static/fonts/golos-cyr.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045f, U+0490-0491, U+04b0-04b1, U+2116;
}

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/static/fonts/golos-latin.woff2") format("woff2");
  unicode-range: U+0000-00ff, U+0131, U+0152-0153, U+02bb-02bc, U+02c6, U+02da, U+02dc, U+0304, U+0308, U+0329, U+2000-206f, U+20ac, U+2122, U+2191, U+2193, U+2212, U+2215, U+feff, U+fffd;
}

:root {
  color-scheme: light;
  --page: #f5f7fb;
  --surface: #fff;
  --text: #172033;
  --muted: #718096;
  --border: #e5e0d8;
  --primary: #174ea6;
  --primary-hover: #123f88;
  --primary-soft: #e8f0fe;
  --success: #25884a;
  --success-soft: #eaf7ed;
  --danger: #b42318;
  --focus: #1b5cc5;
  --shadow: 0 8px 28px rgba(30, 38, 48, 0.05);
  --shadow-raised: 0 24px 70px rgba(22, 34, 56, 0.18);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --container: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; background: var(--page); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--page); font: 400 15px/1.55 "Golos Text", Arial, sans-serif; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(27, 92, 197, 0.35); outline-offset: 3px; }
[hidden] { display: none !important; }

.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; border-radius: 8px; background: var(--text); color: #fff; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid rgba(229, 224, 216, 0.8); background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(14px); }
.site-header__inner, .site-footer__inner { width: min(calc(100% - 40px), var(--container)); margin: 0 auto; }
.site-header__inner { min-height: 68px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; }
.brand-wordmark { display: inline-flex; width: 166px; height: 46px; align-items: center; overflow: hidden; }
.brand-wordmark img { width: 166px; height: auto; }
.site-nav { min-width: 0; }
.site-nav__link { display: inline-flex; min-height: 44px; align-items: center; gap: 9px; padding: 0 14px; border-radius: 12px; color: var(--primary); font-weight: 700; text-decoration: none; }
.site-nav__link:hover { background: var(--primary-soft); }
.portal-link { display: inline-flex; min-height: 44px; align-items: center; gap: 7px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.portal-link:hover { color: var(--primary); }

.page-shell { width: min(calc(100% - 40px), var(--container)); min-height: calc(100vh - 156px); margin: 0 auto; padding: 52px 0 72px; }
.catalog-heading { max-width: 700px; margin-bottom: 30px; }
.section-label { margin: 0 0 8px; color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.catalog-heading h1, .poll-heading h1 { margin: 0; max-width: 850px; font-size: clamp(32px, 5vw, 50px); line-height: 1.07; letter-spacing: -0.04em; }
.catalog-heading > p:last-child, .poll-heading > p { margin: 16px 0 0; max-width: 720px; color: var(--muted); font-size: 17px; line-height: 1.6; }

.poll-list { display: grid; gap: 16px; }
.poll-card { position: relative; display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 24px; align-items: center; min-height: 180px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.poll-card:hover { transform: translateY(-2px); border-color: #cbd8ea; box-shadow: 0 12px 34px rgba(30, 38, 48, 0.08); }
.poll-card--without-image { grid-template-columns: minmax(0, 1fr) auto; min-height: 150px; padding-left: 28px; }
.poll-card__media { height: 148px; overflow: hidden; border-radius: 12px; background: #e8edf5; }
.poll-card__media img { width: 100%; height: 100%; object-fit: cover; }
.poll-card__body { min-width: 0; }
.poll-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 9px; color: var(--muted); font-size: 12px; }
.poll-card h2 { margin: 0; font-size: clamp(20px, 2.5vw, 27px); line-height: 1.18; letter-spacing: -0.025em; }
.poll-card h2 a { text-decoration: none; }
.poll-card h2 a::after { position: absolute; inset: 0; content: ""; }
.poll-card p { margin: 9px 0 0; max-width: 650px; color: var(--muted); }
.poll-card__action { position: relative; z-index: 1; min-width: 158px; }

.status { display: inline-flex; align-items: center; gap: 7px; width: max-content; color: var(--muted); font-size: 13px; font-weight: 700; }
.status > span { width: 8px; height: 8px; border-radius: 50%; background: #9caabd; }
.status--open { color: var(--success); }
.status--open > span { background: #32a85a; box-shadow: 0 0 0 4px var(--success-soft); }

.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 10px; padding: 10px 18px; cursor: pointer; font-weight: 750; line-height: 1.2; text-align: center; text-decoration: none; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.button:active { transform: translateY(1px); }
.button--primary { color: #fff; background: var(--primary); box-shadow: 0 5px 14px rgba(23, 78, 166, 0.18); }
.button--primary:hover { background: var(--primary-hover); }
.button--secondary { border-color: #dbe2ec; color: var(--primary); background: #f3f7fd; }
.button--secondary:hover { border-color: #bed0e9; background: var(--primary-soft); }

.empty-state { max-width: 680px; padding: 54px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; text-align: center; box-shadow: var(--shadow); }
.empty-state__mark { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 18px; color: var(--primary); background: var(--primary-soft); font-size: 26px; }
.empty-state h2 { margin: 0; font-size: 25px; }
.empty-state p { margin: 10px 0 0; color: var(--muted); }

.back-link { display: inline-flex; min-height: 44px; align-items: center; gap: 9px; margin-bottom: 25px; color: var(--muted); font-weight: 650; text-decoration: none; }
.back-link:hover { color: var(--primary); }
.poll-page { max-width: 960px; margin: 0 auto; }
.poll-heading { padding-bottom: 28px; }
.poll-heading__meta { margin-bottom: 17px; }
.gallery--poll { margin: 6px 0 28px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.section-row h2 { margin: 0; font-size: 18px; }
.section-row span { color: var(--muted); font-size: 13px; }
.gallery__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.gallery__item { display: block; min-width: 0; padding: 0; overflow: hidden; border: 0; border-radius: 10px; cursor: zoom-in; background: #e8edf5; }
.gallery__item img { width: 100%; height: 140px; object-fit: cover; transition: transform .2s ease; }
.gallery__item:hover img { transform: scale(1.025); }
.gallery--option { display: flex; gap: 8px; padding: 0 18px 16px 56px; }
.gallery--option .gallery__item { width: 92px; flex: 0 0 92px; }
.gallery--option .gallery__item img { height: 66px; }

.notice { margin: 8px 0 24px; padding: 15px 17px; border: 1px solid #b9dfc4; border-radius: 12px; color: #146b34; background: var(--success-soft); font-weight: 650; }
.option-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.option-fieldset legend { width: 100%; margin-bottom: 14px; font-size: 19px; font-weight: 800; }
.selection-error { margin: -2px 0 12px; color: var(--danger); font-weight: 650; }
.option-list { display: grid; gap: 12px; }
.option-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: 0 5px 18px rgba(30, 38, 48, 0.035); transition: border-color .16s ease, box-shadow .16s ease; }
.option-card:has(input:checked) { border-color: #3173d7; box-shadow: 0 0 0 2px rgba(27, 92, 197, 0.1), 0 8px 22px rgba(30, 38, 48, 0.05); }
.option-card__choice { min-height: 92px; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 16px; align-items: center; padding: 18px; cursor: pointer; }
.option-card__choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.option-control { width: 22px; height: 22px; display: grid; place-items: center; border: 1.5px solid #9caabd; border-radius: 50%; background: #fff; }
input[type="checkbox"] + .option-control { border-radius: 6px; }
.option-card__choice input:checked + .option-control { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 5px #fff; }
.option-card__choice input[type="checkbox"]:checked + .option-control { box-shadow: none; }
.option-card__choice input[type="checkbox"]:checked + .option-control::after { width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; content: ""; transform: translateY(-1px) rotate(-45deg); }
.option-card__choice input:focus-visible + .option-control { outline: 3px solid rgba(27, 92, 197, 0.3); outline-offset: 3px; }
.option-copy { display: grid; gap: 5px; }
.option-copy strong { font-size: 17px; line-height: 1.28; }
.option-copy > span { color: var(--muted); font-size: 14px; }
.vote-actions { display: flex; justify-content: flex-end; margin-top: 20px; }
.button--vote { min-width: 240px; }

.results { margin-top: 40px; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); }
.results__heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.results__heading h2 { margin: 0; font-size: 28px; }
.results__heading > p { margin: 0; color: var(--muted); }
.results__heading > p strong { color: var(--text); font-size: 23px; }
.results__note { padding: 11px 14px; border-radius: 9px; color: #174e8c; background: #f0f5fc; font-size: 13px; }
.results__list { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.results__list li > div { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 7px; }
.results__list strong { white-space: nowrap; }
.results__track { width: 100%; height: 9px; display: block; overflow: hidden; border: 0; border-radius: 99px; appearance: none; background: #e9eef6; }
.results__track::-webkit-progress-bar { border-radius: inherit; background: #e9eef6; }
.results__track::-webkit-progress-value { border-radius: inherit; background: var(--primary); }
.results__track::-moz-progress-bar { border-radius: inherit; background: var(--primary); }

.confirm-dialog, .lightbox { padding: 0; border: 0; }
.confirm-dialog { width: min(calc(100% - 28px), 480px); border-radius: 18px; color: var(--text); background: #fff; box-shadow: var(--shadow-raised); }
.confirm-dialog::backdrop { background: rgba(17, 27, 45, 0.5); backdrop-filter: blur(3px); }
.confirm-dialog__panel { position: relative; padding: 28px; }
.confirm-dialog h2 { margin: 0 38px 8px 0; font-size: 24px; }
.confirm-dialog p { margin: 0; color: var(--muted); }
.confirm-dialog ul { margin: 18px 0 0; padding: 15px 16px 15px 34px; border-radius: 10px; background: var(--page); }
.confirm-dialog__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.dialog-close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border: 0; border-radius: 50%; color: var(--muted); background: transparent; cursor: pointer; font-size: 24px; }

.lightbox { width: 100vw; max-width: none; height: 100dvh; max-height: none; color: #fff; background: rgba(9, 14, 24, 0.96); }
.lightbox::backdrop { background: rgba(9, 14, 24, 0.96); }
.lightbox[open] { display: grid; grid-template-columns: 70px minmax(0, 1fr) 70px; grid-template-rows: 64px minmax(0, 1fr); }
.lightbox__bar { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding: 8px 18px 0; }
.lightbox__count { margin: 0; color: rgba(255, 255, 255, 0.72); }
.lightbox__close, .lightbox__arrow { width: 48px; height: 48px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 50%; color: #fff; background: rgba(255, 255, 255, 0.08); cursor: pointer; font-size: 27px; }
.lightbox__arrow { align-self: center; justify-self: center; }
.lightbox__figure { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 14px; margin: 0; padding: 12px; text-align: center; }
.lightbox__figure img { width: 100%; height: 100%; max-height: calc(100dvh - 125px); object-fit: contain; touch-action: pan-y; }
.lightbox__figure figcaption { min-height: 24px; color: rgba(255, 255, 255, 0.8); }

.site-footer { border-top: 1px solid var(--border); color: var(--muted); background: #fff; }
.site-footer__inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; font-size: 13px; }
.site-footer a { color: var(--primary); text-decoration: none; }

@media (max-width: 780px) {
  .site-header__inner { min-height: 62px; grid-template-columns: 1fr auto; gap: 10px; }
  .brand-wordmark { width: 142px; height: 42px; }
  .brand-wordmark img { width: 142px; }
  .site-nav { justify-self: end; }
  .site-nav__link { padding: 0 10px; font-size: 13px; }
  .portal-link { display: none; }
  .page-shell { width: min(calc(100% - 28px), var(--container)); padding: 34px 0 96px; }
  .catalog-heading { margin-bottom: 22px; }
  .catalog-heading h1, .poll-heading h1 { font-size: clamp(30px, 9vw, 40px); }
  .catalog-heading > p:last-child, .poll-heading > p { font-size: 15px; }
  .poll-card, .poll-card--without-image { grid-template-columns: 112px minmax(0, 1fr); gap: 15px; min-height: 0; padding: 13px; }
  .poll-card--without-image { grid-template-columns: 1fr; padding: 20px; }
  .poll-card__media { height: 106px; }
  .poll-card h2 { font-size: 18px; }
  .poll-card p { display: none; }
  .poll-card__meta { gap: 8px; margin-bottom: 7px; }
  .poll-card__meta > span:last-child { display: none; }
  .poll-card__action { grid-column: 1 / -1; width: 100%; }
  .gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery__item img { height: 120px; }
  .gallery--option { overflow-x: auto; padding-left: 56px; }
  .option-card__choice { min-height: 80px; gap: 13px; padding: 15px; }
  .option-copy strong { font-size: 15px; }
  .vote-actions { position: fixed; z-index: 15; right: 0; bottom: 0; left: 0; margin: 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(12px); }
  .button--vote { width: 100%; min-width: 0; }
  .results { padding: 20px 17px; }
  .results__heading { align-items: start; }
  .results__heading h2 { font-size: 24px; }
  .results__list li > div { font-size: 14px; }
  .lightbox[open] { grid-template-columns: 1fr 1fr; grid-template-rows: 58px minmax(0, 1fr) 64px; }
  .lightbox__bar { grid-column: 1 / -1; }
  .lightbox__figure { grid-column: 1 / -1; grid-row: 2; padding: 4px 10px; }
  .lightbox__figure img { max-height: calc(100dvh - 160px); }
  .lightbox__arrow { grid-row: 3; }
  .lightbox__arrow--prev { grid-column: 1; }
  .lightbox__arrow--next { grid-column: 2; }
  .site-footer__inner { min-height: 78px; flex-direction: column; justify-content: center; gap: 4px; text-align: center; }
}

@media (max-width: 430px) {
  .site-header__inner, .site-footer__inner { width: calc(100% - 24px); }
  .brand-wordmark, .brand-wordmark img { width: 128px; }
  .site-nav__link { font-size: 0; }
  .site-nav__link span { font-size: 20px; }
  .page-shell { width: calc(100% - 24px); padding-top: 25px; }
  .section-label { font-size: 11px; }
  .catalog-heading h1, .poll-heading h1 { font-size: 30px; }
  .poll-card, .poll-card--without-image { grid-template-columns: 94px minmax(0, 1fr); }
  .poll-card--without-image { grid-template-columns: 1fr; }
  .poll-card__media { height: 92px; }
  .gallery--poll { padding: 13px; }
  .gallery__item img { height: 100px; }
  .option-card__choice { grid-template-columns: 21px minmax(0, 1fr); padding: 14px; }
  .gallery--option { padding-left: 49px; }
  .confirm-dialog__panel { padding: 24px 18px 18px; }
  .confirm-dialog__actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
