/* Active longevity: site styles (redesign 12.10.2026, after the after55.moscow visual language).
   Audience 60+: body text 19-20px, buttons from 48px, contrast from 4.5:1 (most text 7:1+).
   Palette: dark green #175849 + brand violet #673889, white and #EFEFEF backgrounds. */

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/dl-assets/fonts/nunito-400-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/dl-assets/fonts/nunito-400-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/dl-assets/fonts/nunito-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/dl-assets/fonts/nunito-400-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;
}

/* Montserrat (SIL OFL 1.1), variable weight, local copy: headings and buttons */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/dl-assets/fonts/montserrat-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/dl-assets/fonts/montserrat-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/dl-assets/fonts/montserrat-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/dl-assets/fonts/montserrat-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;
}

/* ---------- tokens ---------- */
:root {
  --green: #175849;        /* headings, buttons, frames: 8.3:1 on white */
  --green-dark: #0F3D33;
  --green-soft: #E6F0ED;
  --green-line: #9DBFB6;
  --accent: #673889;       /* brand violet: 8.4:1 on white, 7.3:1 on #EFEFEF */
  --accent-dark: #4E2669;
  --accent-soft: #F3ECF9;
  --gray: #EFEFEF;
  --bg: #FFFFFF;
  --text: #1C2421;
  --text-2: #4A5561;       /* secondary text: 7.4:1 on white, 6.4:1 on #EFEFEF */
  --ok: #1E6B45;
  --warn: #8A4B00;
  --err: #A32020;
  --radius: 16px;
  --wrap: 1240px;
  --head: 'Montserrat', 'Nunito', Arial, sans-serif;
  --focus: 0 0 0 3px #FFFFFF, 0 0 0 6px #0B1F1A;
  /* legacy names kept for a11y.css and inline styles */
  --violet: var(--green);
  --violet-dark: var(--green-dark);
  --violet-soft: var(--green-soft);
  --violet-line: var(--green-line);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', Arial, sans-serif;
  font-size: 19px;
  line-height: 1.55;
  overflow-wrap: break-word;
}
@media (min-width: 900px) { body { font-size: 20px; } }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--green-dark); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

h1, h2, h3 { font-family: var(--head); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; color: var(--green); letter-spacing: -.01em; }
h1 { font-size: 32px; }
h2 { font-size: 27px; }
h3 { font-size: 21px; }
@media (min-width: 900px) { h1 { font-size: 44px; } h2 { font-size: 36px; } h3 { font-size: 25px; } }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 900px) { .wrap { padding: 0 32px; } }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: #fff; padding: 12px 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.ico { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- header ---------- */
.top { position: relative; background: #fff; border-bottom: 1px solid #D9E3E0; z-index: 30; }
.top-in { display: flex; align-items: center; gap: 12px; min-height: 80px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--green); flex: none; }
.brand img { width: 52px; height: 52px; }
.brand span { font-family: var(--head); font-weight: 800; font-size: 18px; line-height: 1.1; text-transform: uppercase; letter-spacing: .01em; }
.brand small { display: block; font-family: 'Nunito', Arial, sans-serif; text-transform: none; font-weight: 700; font-size: 16px; letter-spacing: 0; color: var(--text-2); margin-top: 3px; }
.brand-desc { display: none; margin: 0 auto 0 8px; max-width: 300px; font-size: 16px; line-height: 1.35; color: var(--text-2); }
@media (min-width: 1200px) { .brand-desc { display: block; } }
@media (max-width: 1199px) { .brand { margin-right: auto; } }

/* pill phone in the header */
.pill-phone {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px;
  border-radius: 999px; background: var(--green); color: #fff; text-decoration: none;
  font-family: var(--head); font-weight: 700; font-size: 17px; white-space: nowrap; flex: none;
}
.pill-phone:hover { background: var(--green-dark); color: #fff; }
.pill-phone .ico { width: 22px; height: 22px; }

/* burger: phone and tablet */
.menu { position: static; flex: none; }
.menu summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 16px;
  border: 2px solid var(--green); border-radius: 999px;
  color: var(--green); font-family: var(--head); font-weight: 700; font-size: 16px; text-transform: uppercase; letter-spacing: .04em; background: #fff;
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary .bars { width: 24px; height: 3px; background: currentColor; position: relative; border-radius: 2px; }
.menu summary .bars::before, .menu summary .bars::after { content: ''; position: absolute; left: 0; width: 24px; height: 3px; background: currentColor; border-radius: 2px; }
.menu summary .bars::before { top: -8px; } .menu summary .bars::after { top: 8px; }
.menu[open] summary { background: var(--green); color: #fff; }
.menu nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-top: 3px solid var(--green); border-bottom: 3px solid var(--green); z-index: 40; box-shadow: 0 16px 32px rgba(15, 61, 51, .2); }
.menu nav ul { list-style: none; margin: 0 auto; padding: 0; max-width: var(--wrap); }
.menu nav a {
  display: flex; align-items: center; min-height: 58px; padding: 0 20px;
  font-family: var(--head); font-size: 19px; font-weight: 700; color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--green-soft);
}
.menu nav a:hover, .menu nav a[aria-current="page"] { background: var(--green-soft); color: var(--green-dark); }
.menu nav a[aria-current="page"] { box-shadow: inset 6px 0 0 var(--green); }
.menu nav .menu-app { color: var(--accent); }
.menu nav .menu-tel { color: var(--green); }

/* desktop: second header row with all sections */
.nav-row { display: none; border-top: 1px solid #D9E3E0; }
.nav-row .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.nav-desk ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.nav-desk a { display: flex; align-items: center; min-height: 48px; padding: 0 13px; font-family: var(--head); font-size: 17px; font-weight: 600; color: var(--text); text-decoration: none; border-radius: 999px; }
.nav-desk a:hover { background: var(--green-soft); color: var(--green-dark); }
.nav-desk a[aria-current="page"] { background: var(--green); color: #fff; }
.nav-row .pill-app { margin-left: auto; }
@media (min-width: 1100px) {
  .menu { display: none; }
  .nav-row { display: block; }
}
@media (max-width: 1099px) { .top .app-btn { display: none; } }

/* phone: logo, phone icon and menu in one line; the a11y button goes below (a11y.css) */
@media (max-width: 639px) {
  .top-in { flex-wrap: wrap; gap: 8px; min-height: 72px; }
  .brand { gap: 8px; min-width: 0; }
  .brand img { width: 44px; height: 44px; }
  .brand span { font-size: 16px; }
  .brand small { font-size: 15px; }
  .pill-phone { width: 48px; padding: 0; justify-content: center; }
  .pill-phone .ph-num { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .menu summary { padding: 0 14px; }
}
/* narrow phones: burger icon only, the word stays for screen readers */
@media (max-width: 439px) { .menu summary { width: 56px; padding: 0; justify-content: center; } .menu summary .menu-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }

/* header over the hero photo on the home page */
.top-over { position: absolute; left: 0; right: 0; top: 0; background: transparent; border-bottom: 0; }
.top-over .brand, .top-over .brand small, .top-over .brand-desc { color: #fff; }
.top-over .brand img { background: #fff; border-radius: 12px; padding: 3px; }
.top-over .pill-phone { background: #fff; color: var(--green); }
.top-over .pill-phone:hover { background: var(--green-soft); }
.top-over .menu summary { background: rgba(255, 255, 255, .95); }
.top-over .nav-row { border-top-color: rgba(255, 255, 255, .35); }
.top-over .nav-desk a { color: #fff; }
.top-over .nav-desk a:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.top-over .nav-desk a[aria-current="page"] { background: #fff; color: var(--green); }

/* ---------- buttons ---------- */
.btn, .pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 999px; border: 2px solid var(--green);
  background: var(--green); color: #fff;
  font-family: var(--head); font-weight: 700; line-height: 1.2; text-transform: uppercase; letter-spacing: .04em;
  text-decoration: none; text-align: center; cursor: pointer;
}
.btn { min-height: 56px; padding: 10px 30px; font-size: 17px; }
.pill { min-height: 48px; padding: 8px 24px; font-size: 16px; }
.btn:hover, .pill:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn-light { background: #fff; color: var(--green); }
.btn-light:hover { background: var(--green-soft); color: var(--green-dark); }
.btn-accent, .pill-accent { background: var(--accent); border-color: var(--accent); }
.btn-accent:hover, .pill-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-xl { min-height: 68px; padding: 12px 44px; font-size: 19px; }
.btn-small { min-height: 48px; padding: 8px 20px; font-size: 16px; }
.btn-wide { width: 100%; }
.btn-more { margin-top: 14px; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; }
@media (max-width: 599px) { .btns .btn, .btn-xl { width: 100%; } }
.cta-center { text-align: center; padding-top: 40px; padding-bottom: 8px; }
@media (min-width: 900px) { .cta-center { padding-top: 56px; } }
@media (max-width: 599px) { .btn-xl { font-size: 16px; letter-spacing: .02em; padding: 12px 16px; } }

/* ---------- hero slider ---------- */
.hero { position: relative; background: #0B1F1A; color: #fff; }
.slide { position: relative; min-height: 620px; display: flex; align-items: flex-end; overflow: hidden; }
.slide + .slide { border-top: 2px solid #fff; }
.slide-media, .slide-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 20, 16, .62) 0%, rgba(5, 20, 16, .28) 30%, rgba(5, 20, 16, .55) 58%, rgba(5, 20, 16, .88) 100%); }
.slide-text { position: relative; width: 100%; padding-top: 180px; padding-bottom: 96px; }
.slide-t { font-family: var(--head); color: #fff; text-transform: uppercase; font-weight: 800; font-size: 34px; line-height: 1.08; letter-spacing: .005em; margin: 0 0 14px; max-width: 900px; text-shadow: 0 2px 16px rgba(0, 0, 0, .35); }
.slide-lead { font-size: 20px; max-width: 640px; margin: 0 0 22px; text-shadow: 0 1px 8px rgba(0, 0, 0, .4); }
.slide .btn { background: #fff; color: var(--green); border-color: #fff; }
.slide .btn:hover { background: var(--green-soft); color: var(--green-dark); }
@media (min-width: 640px) { .slide-t { font-size: 48px; } }
@media (min-width: 1000px) {
  .slide { min-height: max(680px, min(92vh, 820px)); }
  .slide-text { padding-bottom: 112px; }
  .slide-t { font-size: 68px; }
  .slide-lead { font-size: 23px; }
}
.hero.is-slider .slide[hidden] { display: none; }
.hero.is-slider .slide + .slide { border-top: 0; }
.hero-ctrl { position: absolute; left: 0; right: 0; bottom: 20px; display: flex; align-items: center; justify-content: center; gap: 10px; z-index: 2; }
.hero-ctrl[hidden] { display: none; }
.hero-dots { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.hero-dot, .hero-arrow { width: 48px; height: 48px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; padding: 0; color: #fff; border-radius: 50%; }
.hero-dot::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-sizing: border-box; }
.hero-dot[aria-current="true"]::before { background: #fff; width: 18px; height: 18px; }
.hero-arrow svg { width: 26px; height: 26px; }
.hero-arrow:hover, .hero-dot:hover { background: rgba(255, 255, 255, .18); }

/* ---------- sections ---------- */
.section { padding: 44px 0; }
.section-soft, .section-gray { background: var(--gray); }
.section-violet { background: var(--accent); color: #fff; }
.section-violet h2, .section-violet a { color: #fff; }
.section-violet .btn-light { color: var(--accent); }
.section-violet .btn-light:hover { color: var(--accent-dark); background: var(--accent-soft); }
@media (min-width: 900px) { .section { padding: 72px 0; } }
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 24px; }
.sec-head h2 { margin: 0; }
.sec-head p { margin: 0; }
.lead { font-size: 21px; }
@media (min-width: 900px) { .lead { font-size: 23px; } }
.crumbs { font-size: 18px; margin: 24px 0 8px; color: var(--text-2); }
.crumbs a { font-weight: 700; }
.page-head { padding: 8px 0 28px; }
.muted { color: var(--text-2); }
.note { background: var(--green-soft); border-left: 6px solid var(--green); padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; margin: 0 0 20px; }

/* legacy two-column header used on "О программе" and district pages */
.hero-grid { display: grid; gap: 24px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 48px; } }
.quote { font-size: 20px; border-left: 6px solid var(--accent); padding: 4px 0 4px 18px; margin: 20px 0 0; }
.quote footer { font-size: 18px; margin-top: 8px; color: var(--text-2); }

/* ---------- horizontal cards (events, programs) ---------- */
.hlist { display: grid; gap: 24px; }
.hcard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--green); border-radius: var(--radius); overflow: hidden; }
.hcard-media { position: relative; aspect-ratio: 16 / 9; background: var(--green-soft); flex: none; }
.hcard-media img { width: 100%; height: 100%; object-fit: cover; }
.hcard-ico { display: grid; place-items: center; font-size: 56px; line-height: 1; aspect-ratio: auto; height: 112px; }
.hcard-body { display: flex; flex-direction: column; gap: 10px; padding: 20px 20px 22px; flex: 1; min-width: 0; }
.hcard-t { margin: 0; font-size: 22px; font-weight: 600; color: var(--green); }
.hcard-text { margin: 0; color: var(--text-2); }
.hcard-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--green); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.hcard-when { margin: 0; display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--green); }
.hcard-when .ico { width: 28px; height: 28px; }
.hcard-foot .pill { flex: none; }
@media (max-width: 599px) { .hcard-foot .pill { width: 100%; } }
@media (min-width: 760px) {
  .hcard { flex-direction: row; min-height: 250px; }
  .hcard-media { width: 33%; aspect-ratio: auto; }
  .hcard-ico { font-size: 80px; height: auto; }
  .hcard-body { padding: 26px 32px 24px; }
  .hcard-t { font-size: 27px; }
}

/* ---------- news cards ---------- */
.ncard { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); height: 100%; border: 1px solid #DADADA; }
.ncard img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.ncard-ph { aspect-ratio: 3 / 2; background: var(--accent-soft); display: grid; place-items: center; }
.ncard-ph img { width: 96px; height: 96px; aspect-ratio: auto; object-fit: contain; }
.ncard-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ncard h3 { margin: 0; font-size: 20px; font-weight: 700; color: var(--accent); }
.ncard p { margin: 0; color: var(--text-2); font-size: 18px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ncard time { font-size: 17px; color: var(--text-2); font-weight: 700; margin-top: auto; padding-top: 6px; }
.ncard:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ncard:hover { border-color: var(--accent); color: var(--text); }
@media (min-width: 900px) { .ncard h3 { font-size: 21px; } }

/* news carousel: native horizontal scroll with snap, arrows added by JS */
.news-track { list-style: none; margin: 0; padding: 4px 2px 16px; display: grid; grid-auto-flow: column; grid-auto-columns: 82%; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; }
.news-track > li { scroll-snap-align: start; }
@media (min-width: 640px) { .news-track { grid-auto-columns: calc((100% - 20px) / 2); } }
@media (min-width: 1000px) { .news-track { grid-auto-columns: calc((100% - 40px) / 3); } }
.car-arrows { display: flex; gap: 10px; }
.car-arrows[hidden] { display: none; }
.car-arrow { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--accent); background: #fff; color: var(--accent); display: grid; place-items: center; cursor: pointer; padding: 0; }
.car-arrow svg { width: 26px; height: 26px; }
.car-arrow:hover { background: var(--accent); color: #fff; }
.car-arrow:disabled { opacity: .45; cursor: default; background: #fff; color: var(--accent); }

/* ---------- card grids (news page, legacy) ---------- */
.grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: 1fr 1fr 1fr; } }
.card { background: #fff; border: 1px solid var(--green); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; }
.card p { margin: 0; }
.card-link { text-decoration: none; color: var(--text); }
.tag { display: inline-block; align-self: flex-start; font-family: var(--head); font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 4px 12px; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); }

/* directions: sport / culture / education */
.dirs { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 8px; }
@media (min-width: 760px) { .dirs { grid-template-columns: 1fr 1fr 1fr; } }
.dir { display: flex; flex-direction: column; justify-content: center; min-height: 92px; padding: 16px 26px; border-radius: var(--radius); background: var(--green); color: #fff; text-decoration: none; font-family: var(--head); font-size: 22px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.dir small { font-family: 'Nunito', Arial, sans-serif; font-size: 18px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.dir:hover { background: var(--green-dark); color: #fff; }

/* tile list of links */
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .links { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .links-3 { grid-template-columns: 1fr 1fr 1fr; } }
.links a { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 18px; border: 1px solid var(--green); border-radius: 14px; text-decoration: none; font-weight: 700; color: var(--text); background: #fff; }
.links a:hover { background: var(--green-soft); color: var(--green-dark); }
.links a::after { content: '→'; margin-left: auto; color: var(--green); font-weight: 800; }
.links img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; }
.links small { display: block; font-weight: 600; font-size: 17px; color: var(--text-2); }

/* ---------- afisha ---------- */
.events { display: grid; gap: 24px; }
.seats { font-weight: 800; padding: 4px 12px; border-radius: 10px; align-self: flex-start; margin: 0; font-size: 18px; }
.seats-ok { background: #E3F3EA; color: var(--ok); }
.seats-few { background: #FFF1DC; color: var(--warn); }
.seats-none { background: #FBE4E4; color: var(--err); }
.state { border: 1px dashed var(--green); border-radius: var(--radius); padding: 24px; background: var(--green-soft); }
.state h3 { margin-bottom: 8px; }

/* ---------- district map ---------- */
.map-box { border: 1px solid var(--green); border-radius: var(--radius); background: #fff; padding: 8px; }
.map-box svg { width: 100%; height: auto; display: block; }
.map-box .rg { fill: #D3E5DF; stroke: #fff; stroke-width: 2; fill-rule: evenodd; transition: fill .15s; }
.map-box a:hover .rg, .map-box a:focus .rg { fill: var(--green); }
.map-box a:focus { outline: none; }
.map-box a:focus-visible .rg { stroke: #0B1F1A; stroke-width: 4; }
.map-box .city { fill: #A6CBBF; }
.map-box text { font-family: 'Nunito', Arial, sans-serif; font-size: 15px; font-weight: 800; fill: #1C2421; pointer-events: none; paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.map-cap { font-size: 17px; margin: 8px 4px 0; color: var(--text-2); }
.map-hint { font-weight: 700; }
@media (max-width: 699px) { .map-box .labels { display: none; } }

/* ---------- articles ---------- */
.article { max-width: 840px; }
.article img { border-radius: var(--radius); margin: 0 0 18px; }
.article .date { font-weight: 700; color: var(--text-2); margin-bottom: 18px; }
.gallery { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 20px 0; }
@media (min-width: 640px) { .gallery { grid-template-columns: 1fr 1fr; } }
.gallery img { margin: 0; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.archive { list-style: none; padding: 0; margin: 0; columns: 1; }
@media (min-width: 1000px) { .archive { columns: 2; column-gap: 48px; } }
.archive li { border-bottom: 1px solid #D9E3E0; break-inside: avoid; }
.archive a { display: block; padding: 12px 0; min-height: 48px; font-weight: 700; color: var(--text); text-decoration: none; }
.archive a:hover { color: var(--accent); text-decoration: underline; }
.archive time { display: block; font-weight: 600; font-size: 17px; color: var(--text-2); }
.posters { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .posters { grid-template-columns: 1fr 1fr; } }
.posters a { display: block; border: 1px solid var(--green); border-radius: 12px; overflow: hidden; }

/* knowledge base: topic chips and VK video links */
.topic-nav { background: var(--gray); border-radius: var(--radius); padding: 20px; margin: 0 0 32px; }
.topic-nav-h { font-size: 22px; }
.topic-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.topic-chips a { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 8px 6px 18px; border-radius: 999px; background: #fff; border: 1px solid var(--green); color: var(--green); font-weight: 700; text-decoration: none; }
.topic-chips a:hover { background: var(--green-soft); }
.topic-chips .cnt { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 999px; background: var(--green); color: #fff; display: inline-grid; place-items: center; font-size: 16px; }
.topic { margin: 0 0 40px; }
.topic-n { font-family: 'Nunito', Arial, sans-serif; font-size: 18px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.to-topics { margin: 12px 0 0; }
.videos { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 900px) { .videos { grid-template-columns: 1fr 1fr; } }
.videos a { display: flex; gap: 14px; align-items: center; min-height: 64px; padding: 10px 16px; border: 1px solid var(--green); border-radius: 14px; text-decoration: none; color: var(--text); font-weight: 700; }
.videos a:hover { background: var(--green-soft); }
.videos .play { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 18px; }

/* ---------- contacts and form ---------- */
.contacts { display: grid; gap: 16px; }
.contact-big { font-family: var(--head); font-size: 26px; font-weight: 700; }
.contact-big a { text-decoration: none; }
@media (min-width: 900px) { .contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; } }
.form { display: grid; gap: 18px; max-width: 640px; }
.field label { display: block; font-weight: 800; margin-bottom: 6px; }
.field .hint { display: block; font-size: 17px; color: var(--text-2); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; min-height: 56px; padding: 12px 16px;
  font: inherit; font-size: 20px; color: var(--text);
  border: 2px solid #6F7E79; border-radius: 14px; background: #fff;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--green); box-shadow: var(--focus); outline: none; }
.check { display: flex; gap: 14px; align-items: flex-start; font-size: 18px; }
.check input { width: 30px; height: 30px; flex: none; margin: 2px 0 0; accent-color: var(--green); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { padding: 16px 18px; border-radius: 12px; font-weight: 700; }
.form-msg.ok { background: #E3F3EA; color: var(--ok); }
.form-msg.err { background: #FBE4E4; color: var(--err); }
#vopros { margin-top: 32px; }
@media (min-width: 900px) { #vopros { margin-top: 0; } }

/* ---------- footer ---------- */
.foot { background: var(--green-dark); color: #fff; padding: 48px 0 40px; margin-top: 48px; font-size: 18px; }
.foot a { color: #fff; }
.foot-grid { display: grid; gap: 28px; }
@media (min-width: 900px) { .foot-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.foot h2 { color: #fff; font-size: 18px; text-transform: uppercase; letter-spacing: .05em; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.foot ul a { display: inline-flex; min-height: 44px; align-items: center; }
.foot .small { font-size: 17px; color: #D5E6E1; }
.foot .foot-tel { font-family: var(--head); font-size: 24px; font-weight: 700; text-decoration: none; }

/* long policy text */
.doc { max-width: 860px; }
.doc h2 { font-size: 24px; margin-top: 1.4em; }

@media (prefers-reduced-motion: reduce) { .news-track { scroll-behavior: auto; } }

/* space before the footer; none when the page ends with a coloured band */
main { padding-bottom: 48px; }
main:has(> .section-violet:last-child) { padding-bottom: 0; }
.foot { margin-top: 0; }

/* 8 пунктов меню (с «Центр долголетия») в одну строку на широких экранах (16.10.2026) */
@media (min-width: 1100px) {
  .nav-row .wrap { gap: 8px; }
  .nav-desk ul { flex-wrap: nowrap; }
  .nav-desk a { padding: 0 8px; font-size: 15.5px; white-space: nowrap; }
  .nav-row .pill-app { padding: 8px 14px; font-size: 14px; white-space: nowrap; }
}
@media (min-width: 1100px) and (max-width: 1279px) {
  .nav-desk a { padding: 0 6px; font-size: 14px; }
  .nav-row .pill-app { padding: 6px 10px; font-size: 13px; }
}

/* 19.10.2026 (QA О-9): на планшете 640-1099 px шапка не шире экрана. Было: логотип, «Для слабовидящих»,
   телефон с номером и «Меню» не сжимались, на 768 px ширина 940 px, телефон за краем.
   Теперь название может переноситься, а до 1023 px телефон показан значком (номер остаётся для чтения с экрана). */
@media (min-width: 640px) and (max-width: 1099px) {
  .top-in { gap: 10px; }
  .brand { flex: 0 1 auto; min-width: 0; }
  .brand span { min-width: 0; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .pill-phone { width: 48px; padding: 0; justify-content: center; }
  .pill-phone .ph-num { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* 19.10.2026: на 440-640 px кнопка «Для слабовидящих» влезала в первую строку и наезжала на телефон и «Меню».
   Основа 60% не даёт ей встать рядом с названием: строка 1 название и телефон, строка 2 «Для слабовидящих» и «Меню». */
@media (max-width: 640px) { header.top .top-in .a11y-btn { flex: 1 1 60%; } }
