/* css/fonts.css */
/* Every typeface the «Оформлення» tab offers, served from the site itself
   (public/fonts/, each with its licence beside it — docs/dev/licensing.md).
   A face that no rule uses is never downloaded, so declaring all of them here
   costs nothing and keeps this file the same for every school. The choice
   itself is made by --font-body and --font-heading, which GET /theme.css
   writes. The first stylesheet of /site.css. */

/* Commissioner in two files of one face: the full file only for what lies
   beyond the core (Latin Extended-A, the rest of Cyrillic, €, ≠ ≤ ≥), the
   core — declared last, so checked first — for everything a Ukrainian page
   draws; such a page loads the core alone. */
@font-face {
  font-family: 'Commissioner';
  src: url('/fonts/Commissioner-Variable.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-0130, U+0132-017F, U+0460-048F, U+0492-04FF, U+20AC, U+2260, U+2264-2265;
}

@font-face {
  font-family: 'Commissioner';
  src: url('/fonts/Commissioner-Core.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+02BC, U+02C6-02DD, U+0300-030C, U+0400-045F, U+0490-0491,
    U+2007-200B, U+2010-2022, U+2026, U+2030, U+2032-2033, U+2039-203A, U+2044, U+20B4, U+2116,
    U+2122, U+2212;
}

@font-face {
  font-family: 'Fixel Text';
  src: url('/fonts/FixelText-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Fixel Display';
  src: url('/fonts/FixelDisplay-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Fixel in two static styles under names of its own (the «fixel-lite» face):
   the text's bold is the display cut's Bold, the file the headings preload. */
@font-face {
  font-family: 'Fixel Text Lite';
  src: url('/fonts/FixelText-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Fixel Text Lite';
  src: url('/fonts/FixelDisplay-Bold.woff2') format('woff2');
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Fixel Display Lite';
  src: url('/fonts/FixelDisplay-Bold.woff2') format('woff2');
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'e-Ukraine';
  src: url('/fonts/e-Ukraine-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'e-Ukraine';
  src: url('/fonts/e-Ukraine-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'e-Ukraine';
  src: url('/fonts/e-Ukraine-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Playfair';
  src: url('/fonts/Playfair-Variable.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

/* Noto Sans Condensed: sign lettering and headings — the upstream Noto Sans
   instanced at its condensed width, one file a weight, under a family name of
   its own. */
@font-face {
  font-family: 'Noto Sans Condensed';
  src: url('/fonts/NotoSansCondensed-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Piazzolla';
  src: url('/fonts/Piazzolla-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Sans Condensed';
  src: url('/fonts/NotoSansCondensed-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* Until the condensed face arrives: the device's own narrow sans, scaled to
   its widths and line metrics, so a late swap moves no line. */
@font-face {
  font-family: 'Noto Sans Condensed Fallback';
  src: local('Arial Narrow Bold'), local('ArialNarrow-Bold'), local('Liberation Sans Narrow Bold'),
    local('LiberationSansNarrow-Bold');
  font-weight: 500 800;
  font-style: normal;
  size-adjust: 107.6%;
  ascent-override: 99.4%;
  descent-override: 27.2%;
  line-gap-override: 0%;
}

/* The same for the text face: Arial scaled to Fixel Text's widths and line
   metrics. */
@font-face {
  font-family: 'Fixel Text Lite Fallback';
  src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans');
  font-weight: 400;
  font-style: normal;
  size-adjust: 101.9%;
  ascent-override: 88.4%;
  descent-override: 18.7%;
  line-gap-override: 28.5%;
}

/* Wix Madefor: static cuts, each declared over the weight range it stands
   for, so a 600 or 700 heading uses the ExtraBold file as it is. */
@font-face {
  font-family: 'Wix Madefor Display';
  src: url('/fonts/WixMadeforDisplay-ExtraBold.woff2') format('woff2');
  font-weight: 600 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Wix Madefor Text';
  src: url('/fonts/WixMadeforText-Regular.woff2') format('woff2');
  font-weight: 300 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Wix Madefor Text';
  src: url('/fonts/WixMadeforText-Bold.woff2') format('woff2');
  font-weight: 600 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Piazzolla';
  src: url('/fonts/Piazzolla-BlackItalic.woff2') format('woff2');
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Arsenal';
  src: url('/fonts/Arsenal-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Arsenal';
  src: url('/fonts/Arsenal-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Vollkorn: static cuts, one file a style («Стенд»'s headings). */
@font-face {
  font-family: 'Vollkorn';
  src: url('/fonts/Vollkorn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vollkorn';
  src: url('/fonts/Vollkorn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Noto Serif: static cuts of the upstream variable Noto Serif at the normal
   width — Regular, Italic and Bold. */
@font-face {
  font-family: 'Noto Serif';
  src: url('/fonts/NotoSerif-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Serif';
  src: url('/fonts/NotoSerif-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Serif';
  src: url('/fonts/NotoSerif-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Spectral: static cuts — Regular, Italic and SemiBold. Its own U+02BC reads
   as a prime at large sizes and its «№» (U+2116) is narrow and dark beside
   its digits, so the range leaves those two characters out and they come
   from the next face of the stack (Commissioner). */
@font-face {
  font-family: 'Spectral';
  src: url('/fonts/Spectral-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-02BB, U+02BD-2115, U+2117-FFFF;
}

@font-face {
  font-family: 'Spectral';
  src: url('/fonts/Spectral-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-02BB, U+02BD-2115, U+2117-FFFF;
}

@font-face {
  font-family: 'Spectral';
  src: url('/fonts/Spectral-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-02BB, U+02BD-2115, U+2117-FFFF;
}

/* Playfair Print: two static cuts of Playfair 2 (ExtraBold and Italic) under
   their own family name, so they never mix with the variable Playfair above. */
@font-face {
  font-family: 'Playfair Print';
  src: url('/fonts/Playfair-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Playfair Print';
  src: url('/fonts/Playfair-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Noto Sans: static cuts for text, one file a style. «Газета» sets its
   italics in Playfair Print; «Стенд» uses the Italic below. */
@font-face {
  font-family: 'Noto Sans';
  src: url('/fonts/NotoSans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Sans';
  src: url('/fonts/NotoSans-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Sans';
  src: url('/fonts/NotoSans-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* css/base.css */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--body);
  background: var(--paper);
  font-size: var(--fs-text);
  line-height: var(--lh-text);
}

/* Tabular figures only where numbers stand in columns — a table, the
   numbers block of the home page — not in running text, where some faces
   draw a slashed or odd-looking zero in that set. */
table,
[class*='-figures'],
.vitryna-stats {
  font-variant-numeric: tabular-nums;
}

img,
picture,
svg {
  max-width: 100%;
  display: block;
}

/* Images from the files table carry width/height attributes (issue #208), so
   the page does not jump while they load. An attribute height is a CSS
   height, though: without this rule a photo capped by max-width would keep
   its full height and stretch. Every rule that sizes an image on purpose
   (object-fit boxes, the hero) is a class selector and still wins. */
img {
  height: auto;
}

/* A photo's focal point (growth story 74): the `img` filter prints data-fx / data-fy (0..10, in tenths) for a
   file that has one, these rules turn them into custom properties, and every object-position on the site
   reads them (test/infra/cssFocus.test.js). No script, no style attribute. */
img[data-fx="0"] { --fx: 0% }
img[data-fx="1"] { --fx: 10% }
img[data-fx="2"] { --fx: 20% }
img[data-fx="3"] { --fx: 30% }
img[data-fx="4"] { --fx: 40% }
img[data-fx="5"] { --fx: 50% }
img[data-fx="6"] { --fx: 60% }
img[data-fx="7"] { --fx: 70% }
img[data-fx="8"] { --fx: 80% }
img[data-fx="9"] { --fx: 90% }
img[data-fx="10"] { --fx: 100% }
img[data-fy="0"] { --fy: 0% }
img[data-fy="1"] { --fy: 10% }
img[data-fy="2"] { --fy: 20% }
img[data-fy="3"] { --fy: 30% }
img[data-fy="4"] { --fy: 40% }
img[data-fy="5"] { --fy: 50% }
img[data-fy="6"] { --fy: 60% }
img[data-fy="7"] { --fy: 70% }
img[data-fy="8"] { --fy: 80% }
img[data-fy="9"] { --fy: 90% }
img[data-fy="10"] { --fy: 100% }
img[data-fx] {
  object-position: var(--fx, 50%) var(--fy, 50%);
}

a {
  color: var(--blue);
  text-decoration: none;
}

/* A link inside a sentence is told apart from the words around it by more
   than its colour (WCAG 1.4.1, axe link-in-text-block): the text of a page
   or a post, a contact line, a search result's section. Links that carry a
   class of their own — cards, menus, buttons — are styled by it. */
p a:not([class]) {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}


input,
select,
textarea,
.photo-slot,
[class*='card'] {
  border-radius: var(--radius);
  box-shadow: none;
}

button,
[class*='btn'] {
  border-radius: var(--radius-button);
  box-shadow: none;
}

/* Headings take the heading face (--font-heading, «Оформлення»); everything
   else keeps the text face set on body. */
h1,
h2,
h3,
h4,
.page-h1,
.hero-title,
.logo-wordmark,
.footer-org-name {
  font-family: var(--font-heading);
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-8); 
}

@media (max-width: 1279px) {
  .container {
    padding-inline: 32px;
  }
}

@media (max-width: 767px) {
  .container {
    padding-inline: var(--space-5); 
  }
}



.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;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--space-3);
  z-index: 1000;
  background: var(--paper);
  color: var(--brand-ground);
  padding: var(--space-3) var(--space-5);
  font-weight: 700;
  border: 1.5px solid var(--brand-ground);
}

.skip-link:focus {
  left: var(--space-5);
}

/* A hosted site still on review: a strip over every public page. */
.review-banner {
  background: var(--chrome-tint);
  border-bottom: 1px solid var(--chrome-tint-line);
  color: var(--ink);
  padding: var(--space-2) var(--space-4);
  font-size: 0.9rem;
  text-align: center;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}


.md-align-left {
  text-align: left;
}

.md-align-center {
  text-align: center;
}

.md-align-right {
  text-align: right;
}

.md-indent {
  padding-left: var(--space-7);
}


figure {
  width: fit-content;
  max-width: 100%;
  margin: var(--space-5) auto;
}

figure.md-align-left,
.md-align-left figure {
  margin-left: 0;
  margin-right: auto;
}

figure.md-align-center,
.md-align-center figure {
  margin-inline: auto;
}

figure.md-align-right,
.md-align-right figure {
  margin-left: auto;
  margin-right: 0;
}

figure img {
  max-width: 100%;
  border-radius: 2px;
}

figcaption {
  margin-top: var(--space-2);
  color: var(--muted);
  font-size: var(--fs-meta-lg);
  text-align: center;
}

blockquote {
  margin: var(--space-5) 0;
  padding-left: var(--space-5);
  border-left: 3px solid var(--accent);
  color: var(--body);
  font-style: italic;
}

/* Content blocks emitted by src/lib/renderMarkdown.js */

.md-table {
  overflow-x: auto;
  margin: var(--space-5) 0;
}

.md-table table {
  border-collapse: collapse;
  min-width: 100%;
  font-size: var(--fs-text);
}

.md-table th,
.md-table td {
  border: 1px solid var(--line);
  padding: var(--space-2) var(--space-4);
  text-align: left;
  vertical-align: top;
}

.md-table th {
  background: var(--line-soft);
  font-weight: 700;
}

/* Low vision turns --line-soft yellow, which is 1.3:1 against the white header
   text: the header row takes the page colours and a heavy rule instead. */
:root[data-theme='low-vision'] .md-table th {
  background: var(--paper);
  color: var(--ink);
  border-bottom: 3px solid var(--line);
}

/* A table that scrolls sideways is a focusable region (scroll-tables.js);
   the outline is drawn inside the frame so no ancestor can clip it. */
.md-table:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.md-map,
.md-video {
  width: 100%;
  margin: var(--space-6) 0;
}

.md-map iframe,
.md-video iframe {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
}

.md-map iframe {
  height: 360px;
}

.md-video iframe {
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
}

.md-map figcaption a {
  font-weight: 600;
}

.md-file {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-4) 0;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  color: var(--ink);
}

.md-file:hover {
  border-color: var(--accent);
}

.md-file-title {
  flex: 1;
  font-weight: 600;
}

.md-file-meta {
  color: var(--muted);
  font-size: var(--fs-meta-lg);
  white-space: nowrap;
}

.md-file-action {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

.md-callout {
  margin: var(--space-5) 0;
  padding: var(--space-4) var(--space-5);
  border-left: 4px solid var(--blue);
  background: var(--line-soft);
}

.md-callout-title {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--blue);
}

.md-callout > :last-child {
  margin-bottom: 0;
}

.md-details {
  margin: var(--space-4) 0;
  border: 1px solid var(--line);
  padding: var(--space-3) var(--space-4);
}

.md-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--blue);
}

.md-details[open] summary {
  margin-bottom: var(--space-3);
}

/* Titles and document names typed in the admin panel: a long compound word
   or a pasted address wraps inside its column instead of widening it past
   the edge of a phone screen; no hyphen is added inside a word (a word is
   split only when it is wider than the whole line). */
.page-h1,
.chp-title,
.chp-news-title,
.chp-doc-link {
  overflow-wrap: break-word;
  hyphens: manual;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--space-7) 0;
}

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

/* Low-vision theme. The type scale itself is redefined in tokens.css; these
   are the reading and meta sizes the component files write as literals, off
   the scale, raised to the same steps: 20px+ for text, 15px for meta lines. */
:root[data-theme='low-vision'] .news-article-body {
  font-size: 22px;
}

:root[data-theme='low-vision'] .site-footer,
:root[data-theme='low-vision'] .chp-news-summary,
:root[data-theme='low-vision'] .chp-doc-link,
:root[data-theme='low-vision'] .section-report-table table {
  font-size: 20px;
}

:root[data-theme='low-vision'] .form-group label,
:root[data-theme='low-vision'] .field-error,
:root[data-theme='low-vision'] .news-section-title,
:root[data-theme='low-vision'] .news-flag,
:root[data-theme='low-vision'] .news-share-link,
:root[data-theme='low-vision'] .news-cover figcaption,
:root[data-theme='low-vision'] .news-article-body figcaption,
:root[data-theme='low-vision'] .chp-chip,
:root[data-theme='low-vision'] .chp-chip-count,
:root[data-theme='low-vision'] .chp-doc-type,
:root[data-theme='low-vision'] .chp-year-count,
:root[data-theme='low-vision'] .chp-news-month,
:root[data-theme='low-vision'] .section-report-kicker,
:root[data-theme='low-vision'] .section-report-table th {
  font-size: 15px;
}

/* A side menu's title is never smaller than the links under it. */
:root[data-theme='low-vision'] .section-nav-title {
  font-size: var(--fs-nav-side);
}

/* Photos and embedded maps/videos stay — a gallery without its photos is an
   empty page, and CSS cannot put an image's alt text in its place — but lose
   their colour, so they do not compete with the yellow-on-black text. The
   school's logo too, like every other picture (QA, 2026-10). */
:root[data-theme='low-vision'] img,
:root[data-theme='low-vision'] iframe {
  filter: grayscale(1);
}

/* Headings without negative tracking, whatever a template set: the word
   spaces of a heavy weight nearly close at the low-vision sizes. */
:root[data-theme='low-vision'] :is(h1, h2, h3, h4, .page-h1, .hero-title) {
  letter-spacing: 0;
}

/* The credit line at the very bottom of every template's footer
   (partials/site-credit.liquid): the footer's small print — its quiet text
   colour on the dark band, --muted on a light one — with the link in the
   same colour, told apart by its underline. Every pair reads at 4.5:1
   (test/templates/siteCredit.test.js); a template whose footer is always
   dark sets its own colour back for the light variant. */
.site-footer .site-credit {
  color: var(--chrome-bar-ink);
  font-size: var(--fs-meta-lg);
}

.theme-footer-light .site-footer .site-credit {
  color: var(--muted);
}

.site-footer p + .site-credit {
  margin-top: var(--space-2);
}

.site-footer p.site-credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* Print: the page's own content only — no site frame, and none of the
   screen-only reading aids (progress bar, chapter bar, share links, the
   report-list link, the latest-post flag). Loaded before every component
   file, hence !important against their display. */
@media print {
  .topbar,
  .site-header,
  .mobile-menu-overlay,
  .announcement,
  .site-footer,
  .section-nav,
  [data-section-nav],
  [data-print],
  .section-report-tools,
  .section-report-back,
  .section-report-kicker,
  .meals-daypage .meals-calendar,
  .reading-progress,
  .chp-bar,
  .chp-report-link,
  .chp-news-flag,
  .portal-feed-flag,
  .panorama-strip--cover:not(.news-cover),
  .news-share {
    display: none !important;
  }

  /* The space under the page's last line is not printed: the templates' padding under <main> is
     large in low-vision mode and pushed an empty sheet after the text. */
  main {
    padding-bottom: 0 !important;
  }
}

/* The section nav's row on a phone (public/js/section-nav.js): a side with
   more links out of sight fades out, so the row reads as one that scrolls. */
@media (max-width: 899px) {
  [data-section-nav].has-more-after ul {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
  }

  [data-section-nav].has-more-before ul {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px);
    mask-image: linear-gradient(90deg, transparent, #000 32px);
  }

  [data-section-nav].has-more-before.has-more-after ul {
    -webkit-mask-image: linear-gradient(
      90deg,
      transparent,
      #000 32px,
      #000 calc(100% - 32px),
      transparent
    );
    mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent);
  }
}

/* The low-vision switch (partials/bvi-toggle) names the action: «Для
   слабозорих» in the regular look, «Звичайна версія» in the low-vision one.
   Keyed on the theme zir.js sets before the first paint, so the right label
   is there at once; the hidden one is not part of the button's name. */
.bvi-label-on {
  display: none;
}

:root[data-theme='low-vision'] .bvi-label-off {
  display: none;
}

:root[data-theme='low-vision'] .bvi-label-on {
  display: inline;
}

/* The low-vision switch is a GET form without a script (partials/bvi-toggle):
   it takes no box of its own, so its button sits where it always did. */
.bvi-form {
  display: contents;
}

/* The menu without JavaScript (partials/mobile-menu). The overlay is in the
   markup, not hidden. zir.js puts `js` on <html> in <head>, before the first
   paint: with it the overlay stays out of sight until mobile-menu.js has
   closed it and wired its buttons (.is-ready); without it the overlay is the
   plain list that follows the header — search, links, every dropdown's pages
   shown — and the buttons that need a script (open, close, a group's own)
   are not offered. Each stylesheet family ends the list at the width where
   its header shows the whole menu (base-template.css). */
html.js .mobile-menu-overlay:not(.is-ready) {
  display: none;
}

html:not(.js) .mobile-menu-overlay {
  position: static;
  z-index: auto;
  overflow: visible;
  padding: var(--space-5);
  border-bottom: 1px solid var(--line);
}

html:not(.js) .mobile-menu-toggle,
html:not(.js) .mobile-menu-close {
  display: none;
}

html:not(.js) .mobile-about-toggle:disabled {
  color: var(--ink);
  cursor: default;
}

/* css/components/md-blocks.css */
/* Blocks of the visual editor (story 24.3), emitted by
   src/lib/markdownSyntax.js: the three kinds of notice and the photo grid
   inside a text. The plain .md-callout and every older block stay in
   base.css. */

.md-callout-info {
  border-left-color: var(--blue);
  background: var(--line-soft);
}

.md-callout-warning {
  border-left-color: var(--callout-warning);
  background: var(--callout-warning-bg);
}

.md-callout-warning .md-callout-title {
  color: var(--callout-warning);
}

.md-callout-success {
  border-left-color: var(--callout-success);
  background: var(--callout-success-bg);
}

.md-callout-success .md-callout-title {
  color: var(--callout-success);
}

/* A gallery inside a text («@галерея 12, 15»): a grid of square-cut tiles in
   three columns, two on a phone. It keeps the .masonry-gallery class, which
   the album viewer looks for, and draws itself here, in every template's bundle. */
.md-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  margin: var(--space-5) 0;
}

.md-gallery .album-photo {
  width: auto;
  margin: 0;
}

.md-gallery .gallery-item {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 4px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  cursor: pointer;
}

.md-gallery .gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: cover;
}

@media (max-width: 600px) {
  .md-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }
}

/* Low vision: every notice is the same black box with a yellow edge — the
   three kinds keep their title, not their colour. */
:root[data-theme='low-vision'] .md-callout,
:root[data-theme='low-vision'] .md-callout-info,
:root[data-theme='low-vision'] .md-callout-warning,
:root[data-theme='low-vision'] .md-callout-success {
  border: 2px solid var(--accent);
  border-left-width: 6px;
  background: var(--paper);
  color: var(--ink);
}

:root[data-theme='low-vision'] .md-callout-title {
  color: var(--accent);
}

/* The button of «@кнопка» (growth story 31, decision G): white words on the
   accent, darker under the pointer, never underlined. [href] makes the rule
   one step more specific than a template's «text links» rule (.x-prose a),
   which used to paint the words in the link colour on the accent — the
   button was unreadable in «Панорама». */
.md-button[href],
.md-button[href]:visited {
  display: inline-block;
  padding: var(--space-3) var(--space-6);
  border: 1.5px solid var(--accent);
  background: var(--accent);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
}

.md-button[href]:hover,
.md-button[href]:focus-visible {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--paper);
  text-decoration: none;
}

/* The button inside a media block: a section page's `.<key>-body .chp-text-body a` (0,2,1) beats the
   button's (0,2,0) and would underline it in the accent. */
.md-media-text .md-button[href],
.md-media-text .md-button[href]:visited {
  color: var(--paper);
  text-decoration: none;
}

/* Low vision: yellow words and frame on black, the page's own colours. */
:root[data-theme='low-vision'] .md-button[href],
:root[data-theme='low-vision'] .md-button[href]:visited,
:root[data-theme='low-vision'] .md-button[href]:hover {
  border: 2px solid var(--accent);
  background: var(--paper);
  color: var(--accent);
  text-decoration: underline;
}

/* The text palette (story 32, B3, src/config/palette.js): a coloured word is
   <span class="c-<key>">, a highlight <mark class="fill-<key>">, a filled table
   cell <td class="fill-<key>">. Classes only, never a style attribute; the
   colours are tokens, so the low-vision mode turns them yellow and the fills
   transparent (tokens.css), and the school's two follow «Оформлення». */
.c-black {
  color: var(--pal-black);
}

.c-grey {
  color: var(--pal-grey);
}

.c-red {
  color: var(--pal-red);
}

.c-orange {
  color: var(--pal-orange);
}

.c-green {
  color: var(--pal-green);
}

.c-blue {
  color: var(--pal-blue);
}

.c-violet {
  color: var(--pal-violet);
}

.c-brown {
  color: var(--pal-brown);
}

.c-primary {
  color: var(--blue);
}

.c-accent {
  color: var(--accent);
}

/* A highlight keeps the text's own colour: the fills are light enough for
   the ink, the body text and the colour itself at 4.5:1. */
mark[class*='fill-'] {
  padding: 0 0.1em;
  color: inherit;
}

.fill-black,
.md-table .fill-black {
  background: var(--pal-black-tint);
}

.fill-grey,
.md-table .fill-grey {
  background: var(--pal-grey-tint);
}

.fill-red,
.md-table .fill-red {
  background: var(--pal-red-tint);
}

.fill-orange,
.md-table .fill-orange {
  background: var(--pal-orange-tint);
}

.fill-green,
.md-table .fill-green {
  background: var(--pal-green-tint);
}

.fill-blue,
.md-table .fill-blue {
  background: var(--pal-blue-tint);
}

.fill-violet,
.md-table .fill-violet {
  background: var(--pal-violet-tint);
}

.fill-brown,
.md-table .fill-brown {
  background: var(--pal-brown-tint);
}

.fill-primary,
.md-table .fill-primary {
  background: var(--primary-tint);
}

.fill-accent,
.md-table .fill-accent {
  background: var(--accent-tint);
}

/* Low vision: the fill is gone, so a highlighted word turns yellow instead —
   it still stands out from the white text around it. */
:root[data-theme='low-vision'] mark[class*='fill-'] {
  color: var(--accent);
}

/* A table with its own look (story 32, B1): the editor writes it as an HTML
   table inside .md-table — alignment, borders and fill per cell, the
   borders of the whole table. Two classes deep, one step above base.css's
   ".md-table th/td". A cell's own border is 2px, so in the collapsed
   table it wins over its neighbours' 1px lines. */
.md-table .cell-l {
  text-align: left;
}

.md-table .cell-c {
  text-align: center;
}

.md-table .cell-r {
  text-align: right;
}

.md-table .tbl-borders-dashed th,
.md-table .tbl-borders-dashed td {
  border-style: dashed;
  border-color: var(--line-strong);
}

.md-table .tbl-borders-none th,
.md-table .tbl-borders-none td {
  border-style: none;
}

.md-table .cell-border-solid {
  border: 2px solid var(--line-strong);
}

.md-table .cell-border-dashed {
  border: 2px dashed var(--line-strong);
}

.md-table .cell-border-none {
  border-style: hidden;
}

/* The accent of a designed block (growth story 93, B1): `acc-<key>` over the
   palette's ten keys (src/config/palette.js) sets the block's accent and its
   tint from the palette's tokens — a card reads it, and so will a step, a
   section and a title band. The accent on its tint reads at 4.5:1 (the
   palette's own rule); the low-vision tokens turn the accents yellow and the
   tints transparent, which is all this family needs. */
.acc-black {
  --acc: var(--pal-black);
  --acc-tint: var(--pal-black-tint);
}

.acc-grey {
  --acc: var(--pal-grey);
  --acc-tint: var(--pal-grey-tint);
}

.acc-red {
  --acc: var(--pal-red);
  --acc-tint: var(--pal-red-tint);
}

.acc-orange {
  --acc: var(--pal-orange);
  --acc-tint: var(--pal-orange-tint);
}

.acc-green {
  --acc: var(--pal-green);
  --acc-tint: var(--pal-green-tint);
}

.acc-blue {
  --acc: var(--pal-blue);
  --acc-tint: var(--pal-blue-tint);
}

.acc-violet {
  --acc: var(--pal-violet);
  --acc-tint: var(--pal-violet-tint);
}

.acc-brown {
  --acc: var(--pal-brown);
  --acc-tint: var(--pal-brown-tint);
}

.acc-primary {
  --acc: var(--blue);
  --acc-tint: var(--primary-tint);
}

.acc-accent {
  --acc: var(--accent);
  --acc-tint: var(--accent-tint);
}

/* «Картки» (growth story 93): `.md-cards` is a row of cards that wrap by the
   width of the column they stand in (a template's text column may be narrow,
   so this is the column's width, not the window's). Where the column is at
   least 32rem wide the cards stand three in a row (a block of five or six is
   rows of three); a narrower column stacks them one under another, never two
   and one. The basis does the switch: `(32rem - 100%) * 999` is a huge
   length in a narrow column (one card a row) and negative in a wide one, so
   the other term, 26% (three of them and two gaps fit a row, and the cards
   grow to fill it), wins. A block of two or
   four keeps its own rule: never narrower than 45% of the block, so two share
   a row and none stands alone. A template sets the look with the custom
   properties below on `.md-cards` (`--md-pad`, `--md-gap`, `--md-radius`,
   `--md-bg`, `--md-edge`, `--md-shadow`, `--md-title`, `--md-title-font`);
   the structure and the order stay as they are. */
.md-cards {
  display: flex;
  flex-wrap: wrap;
  gap: var(--md-gap, var(--space-5));
  margin: var(--space-7) 0;
}

.md-card {
  --md-in: var(--md-pad, var(--space-5));
  position: relative;
  box-sizing: border-box;
  flex: 1 1 max(calc((32rem - 100%) * 999), 26%);
  min-width: 0;
  padding: var(--md-in);
  border: var(--md-border, 0);
  border-top: var(--md-edge, 4px solid var(--acc));
  border-radius: var(--md-radius, var(--radius));
  background: var(--md-bg, var(--acc-tint));
  box-shadow: var(--md-shadow, none);
  color: var(--ink);
  overflow-wrap: break-word;
}

.md-cards > .md-card:first-child:nth-last-child(2),
.md-cards > .md-card:first-child:nth-last-child(2) ~ .md-card,
.md-cards > .md-card:first-child:nth-last-child(4),
.md-cards > .md-card:first-child:nth-last-child(4) ~ .md-card {
  flex-basis: max(15rem, 45%);
}

.md-card > * {
  margin: 0 0 var(--space-3);
}

.md-card > :last-child {
  margin-bottom: 0;
}

.md-card .md-icon {
  display: block;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  color: var(--acc);
}

.md-cards .md-card > .md-card-title {
  margin-top: 0;
  color: var(--md-title, var(--acc));
  font-family: var(--md-title-font, var(--font-heading));
  font-size: var(--fs-card-title);
  line-height: var(--lh-h3);
  letter-spacing: normal;
}

/* The photo is the card's top, one shape (3:2), to its edges. */
.md-card > figure {
  width: auto;
  max-width: none;
  margin: calc(var(--md-in) * -1) calc(var(--md-in) * -1) var(--space-4);
}

/* `.md-cards` in front: a section page's `.<key>-body .chp-text-body img`
   (0,2,1) rounds every corner of a photo in its text. */
.md-cards .md-card > figure img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  aspect-ratio: 3 / 2;
  border-radius: var(--md-radius, var(--radius)) var(--md-radius, var(--radius)) 0 0;
  object-fit: cover;
}

.md-card > figure figcaption {
  padding: 0 var(--md-in);
}

.md-card ul,
.md-card ol {
  padding-left: 1.25em;
}

.md-card a {
  position: relative;
  z-index: 1;
}

/* A card that is a link: the title's one link is stretched over the whole
   card; a link in its text stays reachable above it. The ring is drawn
   round the card. `.md-cards` in front: a section page's
   `.<key>-body .chp-text-body a` (0,2,1) underlines its links in the accent. */
.md-cards .md-card .md-card-title a {
  position: static;
  z-index: auto;
  color: inherit;
  text-decoration: none;
}

.md-card .md-card-title a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
}

.md-card .md-card-title a:hover {
  text-decoration: underline;
}

.md-card .md-card-title a:focus-visible {
  outline: 0;
}

.md-card .md-card-title a:focus-visible::after {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

/* «Списком»: one card a row, the top at the left, the title and the text
   beside it. */
.md-cards-list {
  flex-direction: column;
  flex-wrap: nowrap;
}

.md-cards-list .md-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: max(var(--md-in), var(--space-4));
  align-items: start;
  flex: 0 0 auto;
}

.md-cards-list .md-card > * {
  grid-column: 2;
}

.md-cards-list .md-card > .md-icon,
.md-cards-list .md-card > figure {
  grid-column: 1;
  grid-row: 1 / span 6;
  margin: 0;
}

.md-cards-list .md-card > figure {
  width: 8rem;
}

.md-cards-list .md-card > figure figcaption {
  padding: 0;
}

.md-cards-list .md-card > figure img {
  border-radius: var(--md-radius, var(--radius));
}

/* Light motion (owner's decision 7, public/js/md-blocks.js): a card with a
   link lifts by 2px under the pointer and on focus (the `translate` property,
   so a template's own `transform` on a card, «Стенд»'s turn, keeps it); a block below the first
   screen fades up once. The hidden state exists only under the class the
   script sets, so a page without the script, a print and the low-vision
   mode never wait for it. */
@media (prefers-reduced-motion: no-preference) {
  .md-card.is-link {
    transition: translate var(--transition-fast), box-shadow var(--transition-fast);
  }

  .md-card.is-link:focus-within {
    translate: 0 -2px;
  }

  .md-reveal {
    opacity: 0;
    transform: translateY(14px);
  }

  .md-reveal.md-in {
    opacity: 1;
    transform: none;
    transition: opacity var(--transition-base), transform var(--transition-base);
  }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .md-card.is-link:hover {
    translate: 0 -2px;
  }
}

@media print {
  .md-reveal {
    opacity: 1;
    transform: none;
  }
}

/* Low vision: one column, no tint (the tokens make it transparent), a yellow
   frame the card is read by, no motion. */
:root[data-theme='low-vision'] .md-cards > .md-card.md-card {
  flex-basis: 100%;
}

:root[data-theme='low-vision'] .md-card {
  border: 2px solid var(--acc);
  border-radius: 0;
  background: var(--paper);
  box-shadow: none;
  transform: none;
  translate: none;
  transition: none;
}

:root[data-theme='low-vision'] .md-reveal {
  opacity: 1;
  transform: none;
}

/* Below 600 px «Списком» is one column: the card is a block again (a grid of
   one track would open a second, implicit one for the title and the text,
   which keep `grid-column: 2`, and squeeze the photo to a few pixels). */
@media (max-width: 599px) {
  .md-cards-list .md-card {
    display: block;
  }

  .md-cards-list .md-card > .md-icon,
  .md-cards-list .md-card > figure {
    margin-bottom: var(--space-3);
  }

  .md-cards-list .md-card > figure {
    width: auto;
  }
}

/* «Фото поруч із текстом» (growth story 93): `.md-media` holds the photo (a
   `figure`) and the text (`.md-media-text`). They stand side by side where the
   column the block is in is at least 32rem wide (a template's text column may
   be narrow, so this is the column's width, not the window's; rem, so a larger
   text stacks sooner) and one under the other below that, the photo first. The
   basis does the switch, as the cards': `(32rem - 100%) * 999` is a huge
   length in a narrow column (each takes a line) and negative in a wide one, so
   the shares win. The side is `row-reverse`: it turns the order inside a
   line only, so a stacked block keeps the photo above the text on both sides.
   **The photo is shown whole** (owner, 2026-11-18): it is never cut, whatever
   its shape. Its width follows its shape — `width: auto` with a `max-width`
   of its place and a `max-height` of 80% of the window (720px at most) — so
   a very tall photo is drawn smaller, not cropped, and a small one is not
   stretched. The photo's place is up to 40% of the block (the same switch as
   above, so a stacked block gives it the whole column); the text takes the
   rest, at least 50%: a narrow portrait leaves the text about two thirds of
   the column, never a thin photo and a huge text. A photo narrower than its
   place stands at the block's outer edge, left in `media-left` and right in
   `media-right`, stacked too. The text's own width-by-ratio cap
   (base-template.css) does not reach it. A template sets the look with
   `--md-gap`, `--md-radius`, `--md-photo-border` and `--md-photo-shadow`
   on `.md-media`. */
.md-media {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--md-gap, var(--space-5) var(--space-6));
  margin: var(--space-7) 0;
}

.md-media-right {
  flex-direction: row-reverse;
}

.md-media > figure {
  flex: 0 1 auto;
  box-sizing: border-box;
  width: auto;
  min-width: 0;
  max-width: max(calc((32rem - 100%) * 999), 40%);
  margin: 0;
}

/* `.md-media` twice: a section page's `.<key>-body .chp-text-body img` (0,2,1) rounds every corner of a
   photo in its text. */
.md-media.md-media > figure img {
  display: block;
  box-sizing: border-box;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(80vh, 720px);
  margin: 0 auto 0 0;
  border: var(--md-photo-border, 0);
  border-radius: var(--md-radius, var(--radius-media));
  box-shadow: var(--md-photo-shadow, none);
}

.md-media.md-media-right > figure img {
  margin: 0 0 0 auto;
}

.md-media-text {
  flex: 1 1 max(calc((32rem - 100%) * 999), 50%);
  min-width: 0;
  overflow-wrap: break-word;
}

.md-media-text:only-child {
  flex-basis: 100%;
}

/* Three classes deep: a section page's `.<key>-body .chp-text-body h2` (0,2,1) sets a margin on the first line. */
.md-media .md-media-text > :first-child {
  margin-top: 0;
}

.md-media .md-media-text > :last-child {
  margin-bottom: 0;
}

/* Low vision: one column, the photo above the text in a yellow frame, no shadow or corner. */
:root[data-theme='low-vision'] .md-media > * {
  flex-basis: 100%;
}

:root[data-theme='low-vision'] .md-media.md-media > figure img {
  border: 2px solid var(--accent);
  border-radius: 0;
  box-shadow: none;
}

/* «Кроки» (growth story 93): `ol.md-steps` of `li.md-step`, each an `h3` and its text. The numbers are the
   browser's counter, drawn in a ring at the left (an ordered list again without CSS); a thin rail joins one
   ring to the next. A body restyles `ol` (a left padding, `.<key>-body .chp-text-body ol`, 0,2,1) and
   `li + li` (a margin, 0,2,2) and `h3` (a margin, a size, 0,2,1): the rules here name the block three
   times so every body gives way, and put the marker out on the `ol` itself. A text under a step keeps its
   own lists, which the counter does not touch (`>`). A template sets the look with `--md-gap`,
   `--md-ring-size`, `--md-badge-radius`, `--md-rail`, `--md-title` and `--md-title-font` on `.md-steps`. */
.md-steps.md-steps.md-steps {
  --md-ring: var(--md-ring-size, 2.5rem);
  margin: var(--space-7) 0;
  padding: 0;
  list-style: none;
  counter-reset: md-step;
}

.md-steps.md-steps > .md-step {
  position: relative;
  margin: 0;
  padding: 0 0 var(--md-gap, var(--space-6)) calc(var(--md-ring) + var(--space-4));
  counter-increment: md-step;
  list-style: none;
  overflow-wrap: break-word;
}

.md-steps.md-steps > .md-step:last-child {
  padding-bottom: 0;
}

.md-step::before {
  content: counter(md-step);
  position: absolute;
  top: 0;
  left: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--md-ring);
  height: var(--md-ring);
  border: 2px solid var(--acc);
  border-radius: var(--md-badge-radius, 50%);
  background: var(--acc-tint);
  color: var(--acc);
  font-family: var(--font-heading);
  font-size: var(--fs-card-title);
  font-weight: 700;
  line-height: 1;
}

.md-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: calc(var(--md-ring) + var(--space-1));
  bottom: var(--space-1);
  left: calc(var(--md-ring) / 2 - 1px);
  width: 2px;
  background: var(--md-rail, var(--acc));
}

.md-steps.md-steps > .md-step > h3 {
  margin: 0 0 var(--space-2);
  padding-top: calc((var(--md-ring) - var(--lh-h3) * var(--fs-card-title)) / 2);
  color: var(--md-title, var(--ink));
  font-family: var(--md-title-font, var(--font-heading));
  font-size: var(--fs-card-title);
  line-height: var(--lh-h3);
  letter-spacing: normal;
}

.md-steps.md-steps > .md-step > :not(h3) {
  margin: 0 0 var(--space-3);
}

.md-steps.md-steps > .md-step > :last-child {
  margin-bottom: 0;
}

/* A list in a step is the same in every body (a body's own list padding differs by the font and the template). */
.md-steps.md-steps > .md-step > ul,
.md-steps.md-steps > .md-step > ol {
  padding-left: 1.25em;
}

/* «Смуга цифр»: `dl.md-numbers` of `div` (`dt` the figure, `dd` its words). The row is sized by the width
   of the column the block stands in, as the cards' is: `(Trem - 100%) * 999` is a huge length in a column
   narrower than T (each figure takes a line) and negative in a wider one, so the basis falls to 0 and
   they share one row. Two figures keep a row from 20rem, three from 30rem; four share a row from 34rem,
   stand two and two from 20rem and one under another below — never three and one, never two and one.
   A figure that is too long for its place wraps and keeps its size. A template sets the look with the
   cards' properties (`--md-pad`, `--md-gap`, `--md-radius`, `--md-bg`, `--md-edge`, `--md-shadow`,
   `--md-title`, `--md-title-font`) on `.md-numbers`. */
.md-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: var(--md-gap, var(--space-5));
  margin: var(--space-7) 0;
  padding: 0;
}

.md-numbers > div {
  --md-lo: 40rem;
  --md-hi: 40rem;
  --md-pair: 0%;
  box-sizing: border-box;
  flex: 1 1
    max(
      calc((var(--md-lo) - 100%) * 999),
      min(var(--md-pair), calc((var(--md-hi) - 100%) * 999))
    );
  min-width: 0;
  padding: var(--md-pad, var(--space-4));
  border: var(--md-border, 0);
  border-top: var(--md-edge, 4px solid var(--acc));
  border-radius: var(--md-radius, var(--radius));
  background: var(--md-bg, var(--acc-tint));
  box-shadow: var(--md-shadow, none);
  color: var(--ink);
  overflow-wrap: break-word;
}

.md-numbers > div:first-child:nth-last-child(2),
.md-numbers > div:first-child:nth-last-child(2) ~ div {
  --md-lo: 20rem;
  --md-hi: 20rem;
}

.md-numbers > div:first-child:nth-last-child(3),
.md-numbers > div:first-child:nth-last-child(3) ~ div {
  --md-lo: 30rem;
  --md-hi: 30rem;
}

.md-numbers > div:first-child:nth-last-child(4),
.md-numbers > div:first-child:nth-last-child(4) ~ div {
  --md-lo: 20rem;
  --md-hi: 34rem;
  --md-pair: 45%;
}

.md-numbers.md-numbers dt {
  margin: 0;
  color: var(--md-title, var(--acc));
  font-family: var(--md-title-font, var(--font-heading));
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: normal;
}

.md-numbers.md-numbers dd {
  margin: var(--space-2) 0 0;
  font-size: var(--fs-text);
  line-height: 1.4;
}

/* Low vision: the figures lose the tint and stand in a frame, one under another (the class twice: the count's
   quantity selectors above are (0,3,2)); the ring of a step has no fill. */
:root[data-theme='low-vision'] .md-numbers.md-numbers > div {
  --md-lo: 999rem;
  --md-hi: 999rem;
  --md-pair: 0%;
  border: 2px solid var(--acc);
  border-radius: 0;
  background: var(--paper);
  box-shadow: none;
}

:root[data-theme='low-vision'] .md-step::before {
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: var(--acc);
}

/* «Кольорова секція» (growth story 93, S4): `section.md-section` holds any other blocks but a section, on the tint of its
   colour (`acc-<key>`, the palette's ten; the school's primary when none). It is as wide as the text column it stands in.
   What stands directly on the tint reads at 4.5:1: the page's ink is the palette's pair with every tint
   (test/config/palette.test.js); a template's own heading or link colour is a colour on white, and on a tint it may fall
   below — so inside the section the text and the links take the ink. The rules name the block three times: a body's
   `.<key>-body .chp-text-body a|h2|li` (0,2,1) and its `:first-child` forms (0,3,1) are lighter than that and a template's
   file comes later. A card, a figure and a callout keep their own fills and a thin ring, so they stay visible on the tint.
   A template sets the look with `--md-sec-pad`, `--md-sec-radius` and `--md-sec-border` on `.md-section`. */
.md-section {
  box-sizing: border-box;
  margin: var(--space-8) 0;
  padding: var(--md-sec-pad, var(--space-6));
  border: var(--md-sec-border, 0);
  border-radius: var(--md-sec-radius, var(--radius));
  background: var(--acc-tint);
  color: var(--ink);
  overflow-wrap: break-word;
}

.md-section.md-section > :first-child {
  margin-top: 0;
}

.md-section.md-section > :last-child {
  margin-bottom: 0;
}

.md-section.md-section.md-section :is(p, li, h2, h4, h5, h6, blockquote, summary) {
  color: var(--ink);
}

/* A word in a school colour (the palette's «Основний» and «Акцентний») is the colour on white: on a section's tint it falls
   under 4.5:1 with the lightest primaries the theme form passes (owner, 2026-11-19), so inside a section — a card, a step, a
   notice or a cell in it too — it is the section's ink. The Markdown keeps the colour. The fixed colours read on every tint. */
.md-section.md-section.md-section :is(.c-primary, .c-accent) {
  color: var(--ink);
}

/* A link is the page's ink, underlined: the accent of a colour is the palette's pair with its own tint, and a link may stand on
   another colour's tint, a callout or a card. */
.md-section.md-section.md-section :is(p, li, dd, td, th, blockquote) a:not(.md-button),
.md-section.md-section.md-section :is(p, li, dd, td, th, blockquote) a:not(.md-button):visited {
  color: var(--ink);
  text-decoration: underline;
}

.md-section.md-section .md-card,
.md-section.md-section .md-numbers > div {
  box-shadow: var(--md-shadow, 0 0 0 1px var(--line-strong));
}

.md-section.md-section .md-callout {
  box-shadow: 0 0 0 1px var(--line-strong);
}

/* A notice's title in the school's primary is the colour on white, which falls under 4.5:1 on the notice's light grey. */
.md-section.md-section .md-callout-info .md-callout-title {
  color: var(--ink);
}

/* The button in a section or in a title band must read whatever the body says of links (a section page's `a` rule is
   (0,2,1) and underlines it in the accent). */
.md-section .md-button[href],
.md-section .md-button[href]:visited {
  color: var(--paper);
  text-decoration: none;
}

/* «Заголовок на тлі»: `div.md-title-band` — an `h2` (never a second `h1`), the icon above it, one line under it and
   one button — filled with the block's colour, white words on it (the palette's pair, white on each accent at 4.5:1;
   the button is the inverse, the accent on white). A template sets the look with `--md-band-pad`, `--md-band-radius`,
   `--md-band-border`, `--md-band-bg`, `--md-band-ink`, `--md-band-align` and `--md-title-font` on `.md-title-band`. The
   title is a heading of the page below its `h1`: 22 to 30px (in px, as the headings' own sizes are: a template may set the root size), which is under the `h1` of
   every template at every width (the narrowest `h1` is 26px), and never wider than the column. */
.md-title-band {
  box-sizing: border-box;
  margin: var(--space-8) 0;
  padding: var(--md-band-pad, var(--space-8) var(--space-7));
  border: var(--md-band-border, 0);
  border-radius: var(--md-band-radius, var(--radius));
  background: var(--md-band-bg, var(--acc));
  color: var(--md-band-ink, var(--paper));
  text-align: var(--md-band-align, left);
  overflow-wrap: break-word;
}

.md-title-band .md-icon {
  display: block;
  width: 3rem;
  height: 3rem;
  margin: 0 0 var(--space-4);
  color: inherit;
}

.md-title-band.md-title-band.md-title-band > h2 {
  margin: 0 0 var(--space-3);
  padding: 0;
  color: inherit;
  font-family: var(--md-title-font, var(--font-heading));
  font-size: clamp(22px, 16px + 1.2vw, 30px);
  line-height: var(--lh-h2);
  letter-spacing: normal;
  text-transform: none;
}

.md-title-band.md-title-band.md-title-band > p {
  max-width: 40rem;
  margin: 0 0 var(--space-4);
  color: inherit;
  font-size: 1.125rem;
  line-height: 1.5;
}

.md-title-band.md-title-band.md-title-band > :last-child {
  margin-bottom: 0;
}

.md-title-band.md-title-band.md-title-band p a:not(.md-button),
.md-title-band.md-title-band.md-title-band p a:not(.md-button):visited {
  color: inherit;
  text-decoration: underline;
}

.md-title-band .md-button[href],
.md-title-band .md-button[href]:visited {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--acc);
  text-decoration: none;
}

.md-title-band .md-button[href]:hover,
.md-title-band .md-button[href]:focus-visible {
  border-color: var(--paper);
  background: transparent;
  color: var(--paper);
}

/* The band is a dark band: the site's ring is the accent, which may be the band's own fill, so the ring is the dark
   bands' white, as on the top bar and the footer. */
.md-title-band.md-title-band :focus-visible {
  outline: var(--focus-ring-on-dark);
  outline-offset: 3px;
}

/* Low vision: no tint and no fill, a yellow frame, the title in yellow; the button is the page's own (above). */
:root[data-theme='low-vision'] .md-section {
  border: 2px solid var(--acc);
  border-radius: 0;
  background: var(--paper);
  box-shadow: none;
  outline: 0;
}

:root[data-theme='low-vision'] .md-title-band {
  border: 2px solid var(--acc);
  border-radius: 0;
  background: var(--paper);
  box-shadow: none;
  outline: 0;
  color: var(--ink);
}

:root[data-theme='low-vision'] :is(.md-section, .md-title-band)::before {
  content: none;
}

:root[data-theme='low-vision'] .md-title-band.md-title-band.md-title-band > h2 {
  color: var(--acc);
}

/* A narrow window: the padding gives way, never the text. */
@media (max-width: 599px) {
  .md-section {
    padding: var(--space-4);
  }

  .md-title-band {
    padding: var(--space-6) var(--space-4);
  }
}

/* css/components/album.css */
/* The album (GitHub #201, #207; partials/album, album-thumbs, album-viewer
   and public/js/album.js): one framed photo at a time with ‹ › on the
   frame, its caption under it and the matrix of thumbnails under that, and
   the full-screen viewer. Every page template links this file; a template's
   own colours, faces and corners arrive through the tokens. Low vision: the
   photos are grey by base.css, the controls yellow on black (below). */

.album {
  margin: var(--space-7) 0;
}

.album-head {
  margin-bottom: var(--space-3);
}

.album-title {
  margin: 0;
  color: var(--ink);
  font-size: var(--fs-card-title);
  line-height: var(--lh-h3);
}

.album-title a {
  color: inherit;
}

.album-meta,
.album-source {
  margin: var(--space-1) 0 0;
  color: var(--muted);
  font-size: var(--fs-meta-lg);
}

/* Over the cards of a chapter's albums that are not in place. */
.album-more-title {
  margin: var(--space-7) 0 var(--space-4);
  color: var(--ink);
  font-size: var(--fs-card-title);
  line-height: var(--lh-h3);
}

.album-source a {
  color: var(--accent);
  font-weight: 600;
}

/* Who took a photo (growth story 34): «Фото: …» on its own line under a
   caption, an album's title or a slide, smaller than the caption itself. */
.photo-credit {
  display: block;
  font-size: var(--fs-meta-sm);
  font-style: normal;
}

/* The stage: ONE photo in a 3:2 frame. The slides stand side by side in the
   strip and the stage shows exactly one of them — the script moves the strip
   (a transform), nothing scrolls sideways. ‹ ›, the counter and «На весь
   екран» lie on the frame: .album-controls is as tall as the frame (its
   padding is two thirds of the stage's width) and lets clicks through. */
.album-stage {
  position: relative;
  max-width: 800px;
  overflow: hidden;
  /* Brought into view by a thumbnail: clear of the sticky header (and of a
     section page's chapter bar). */
  scroll-margin-top: var(--chp-offset, 96px);
}

.album-track {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  touch-action: pan-y;
  transition: transform 0.35s ease;
}

.album-track--jump {
  transition: none;
}

.album-slide {
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.album-figure {
  margin: 0;
}

.album-frame {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius-media);
  background: var(--paper-2);
}

.album-frame:focus-visible,
.album-thumb:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

.album-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.album--ready .album-frame,
.album-zoom {
  cursor: zoom-in;
}

.album-caption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: var(--space-2);
  color: var(--body);
  font-size: var(--fs-text);
  line-height: var(--lh-h3);
}

.album-caption-note {
  color: var(--muted);
  font-size: var(--fs-meta-lg);
}

.album-caption-album {
  color: var(--accent);
  font-weight: 600;
}

.album-controls {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 0;
  padding-top: 66.6667%;
  pointer-events: none;
}

.album-btn,
.album-counter {
  position: absolute;
  pointer-events: auto;
}

.album-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--chrome-bar-line);
  border-radius: var(--radius-button);
  background: var(--blue-950-a92);
  color: var(--chrome-bar-strong);
  font: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.album-btn--prev,
.album-btn--next {
  top: 50%;
  translate: 0 -50%;
}

.album-btn--prev {
  left: var(--space-3);
}

.album-btn--next {
  right: var(--space-3);
}

.album-btn--full {
  right: var(--space-3);
  bottom: var(--space-3);
  width: auto;
  height: 40px;
  padding: 0 var(--space-3);
  font-size: var(--fs-meta-lg);
  font-weight: 600;
}

.album-btn:hover,
.album-btn:focus-visible {
  border-color: var(--accent-light);
  color: var(--accent-light);
}

.album-btn:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 2px;
}

.album-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.album-btn[hidden],
.album-counter[hidden] {
  display: none;
}

.album-counter {
  bottom: var(--space-3);
  left: var(--space-3);
  margin: 0;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-button);
  background: var(--blue-950-a92);
  color: var(--chrome-bar-strong);
  font-size: var(--fs-meta-lg);
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  pointer-events: none;
}

/* The matrix of thumbnails under the frame: small squares, the framed photo
   marked. */
.album-thumbs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-2);
  max-width: 800px;
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
}

.album-thumbs-item {
  margin: 0;
}

.album-thumb {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-media);
  background: var(--paper-2);
}

.album-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.album-thumb:hover img,
.album-thumb[aria-current='true'] img {
  opacity: 1;
}

.album-thumb[aria-current='true'] {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* An album in place: «Усі N фото →» under its matrix. */
.album-all-line {
  margin: var(--space-3) 0 0;
}

.album-all {
  color: var(--accent);
  font-size: var(--fs-text);
  font-weight: 700;
}

@media (max-width: 899px) {
  .album-thumbs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 599px) {
  .album-thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .album-btn--prev {
    left: var(--space-2);
  }

  .album-btn--next {
    right: var(--space-2);
  }
}

/* The viewer: the page's dark band behind the photo, the stage snapping to
   each photo, the caption, and a strip of thumbnails at the bottom. */
.album-viewer-open {
  overflow: hidden;
}

.album-viewer {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(var(--blue-950-a92), var(--blue-950-a92)), var(--chrome-bar);
  color: var(--chrome-bar-strong);
}

.album-viewer[hidden] {
  display: none;
}

.album-viewer-top {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
}

.album-viewer-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: inherit;
  font-size: var(--fs-text);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-viewer-counter {
  margin: 0;
  color: var(--chrome-bar-ink);
  font-size: var(--fs-meta-lg);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.album-viewer-btn {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--chrome-bar-line);
  border-radius: var(--radius-button);
  background: var(--blue-950-a50);
  color: var(--chrome-bar-strong);
  font: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.album-viewer-btn:hover,
.album-viewer-btn:focus-visible {
  border-color: var(--accent-light);
  color: var(--accent-light);
}

.album-viewer-btn:focus-visible,
.album-viewer-stage:focus-visible,
.album-viewer-thumb:focus-visible,
.album-viewer-more a:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: -3px;
}

.album-viewer-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.album-viewer-main {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}

.album-viewer-stage {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

/* A swipe down closes the viewer; sideways and pinch stay the browser's. */
@supports (touch-action: pan-x pinch-zoom) {
  .album-viewer-stage {
    touch-action: pan-x pinch-zoom;
  }
}

.album-viewer-slide {
  display: flex;
  flex: 0 0 100%;
  align-items: center;
  justify-content: center;
  height: 100%;
  margin: 0;
  padding: 0 var(--space-2);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.album-viewer-slide img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.album-viewer-more a {
  color: var(--chrome-bar-strong);
  font-size: var(--fs-card-title);
  font-weight: 700;
}

.album-viewer-go {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
}

.album-viewer-go--prev {
  left: var(--space-4);
}

.album-viewer-go--next {
  right: var(--space-4);
}

.album-viewer-info {
  max-width: 70ch;
  margin: 0 auto;
  padding: var(--space-2) var(--space-4) 0;
  text-align: center;
}

.album-viewer-caption,
.album-viewer-note {
  margin: 0;
  line-height: var(--lh-h3);
}

.album-viewer-caption {
  font-size: var(--fs-text);
}

.album-viewer-note {
  color: var(--chrome-bar-ink);
  font-size: var(--fs-meta-lg);
}

.album-viewer-note a {
  color: var(--chrome-bar-strong);
  text-decoration: underline;
}

.album-viewer-caption[hidden],
.album-viewer-note[hidden] {
  display: none;
}

.album-viewer-strip {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  gap: var(--space-1);
  margin: 0;
  padding: var(--space-3) var(--space-4);
  list-style: none;
  overflow-x: auto;
  scrollbar-width: thin;
}

.album-viewer-strip li {
  flex: 0 0 auto;
  margin: 0;
}

.album-viewer-strip li:first-child {
  margin-left: auto;
}

.album-viewer-strip li:last-child {
  margin-right: auto;
}

.album-viewer-thumb {
  display: block;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  opacity: 0.7;
}

.album-viewer-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-viewer-thumb:hover,
.album-viewer-thumb[aria-current='true'] {
  opacity: 1;
}

.album-viewer-thumb[aria-current='true'] {
  border-color: var(--accent-light);
}

@media (max-width: 767px) {
  .album-viewer-top {
    padding: var(--space-2) var(--space-3);
  }

  .album-viewer-go--prev {
    left: var(--space-2);
  }

  .album-viewer-go--next {
    right: var(--space-2);
  }

  .album-viewer-slide {
    padding: 0;
  }

  .album-viewer-strip {
    padding: var(--space-2) var(--space-3);
  }

  .album-viewer-thumb {
    width: 48px;
    height: 48px;
  }
}

/* Low vision: the controls yellow on black, the current photo in yellow. */
:root[data-theme='low-vision'] .album-btn,
:root[data-theme='low-vision'] .album-viewer-btn {
  border-color: var(--accent);
  color: var(--accent);
}

:root[data-theme='low-vision'] .album-thumb img,
:root[data-theme='low-vision'] .album-viewer-thumb {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .album-track {
    transition: none;
  }
}

/* «Усі фото» on the albums collection: one page of twelve photos as 4 × 3
   thumbnails, 3 columns on a tablet and 2 on a phone; a link to another of
   its pages opens at the section, clear of the sticky header. */
.album--matrix {
  scroll-margin-top: var(--chp-offset, 96px);
}

.album--matrix .album-thumbs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1023px) {
  .album--matrix .album-thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 599px) {
  .album--matrix .album-thumbs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* css/components/meals.css */
/* «Харчування» (growth stories 38, 54, 67): the week, one look in every template. Below 1200 px it is a
   list of days — each a heading line, then rows «photo | прийом and dishes», the photo above the
   dishes where they would keep less than 11rem beside it and, in low-vision mode, below 600 px;
   from 1200 px a table at most 60rem wide (a week of three or more прийоми stays the list), a photo in a cell at most 180 px, the calendar under it
   at the column's start. A template only recolours it and sets its faces (docs/dev/templates.md
   «Харчування»). The markup is partials/meals/week and partials/meals/cell; the home block
   «Харчування сьогодні» draws the same cells (the rules at the end). Print: no week or month arrows, a day
   is not split between sheets (the @media print block at the end). Order is the DOM's: no rule here
   reorders anything. */

/* «Меню» (story 54) is the last chapter: the information above it keeps the chapters' gap. */
.meals-info + .meals-menu {
  margin-top: var(--chp-gap);
}

.meals-empty {
  color: var(--muted);
}

.meals-week {
  max-width: 60rem;
  margin: 0 0 var(--space-8);
}

.meals-weeknav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
  margin: 0 0 var(--space-3);
}

.meals-weeknav-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 44px;
  color: var(--accent);
  font-weight: 600;
}

.meals-weeknav-link--next {
  margin-inline-start: auto;
}

/* The group filter above the week (from three groups): links wrapping on a phone, each at least
   44 px high; the current one is told by weight and a heavier border, not by colour alone. */
.meals-groups {
  margin: 0 0 var(--space-3);
}

.meals-groups-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.meals-groups-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--line);
  color: var(--accent);
  font-weight: 600;
  overflow-wrap: break-word;
  min-width: 0;
  max-width: 100%;
}

.meals-groups-link[aria-current='page'] {
  border: 3px solid var(--ink);
  color: var(--ink);
  font-weight: 800;
}

.meals-scroll {
  margin: 0 0 var(--space-7);
}

.meals-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  color: var(--body);
}

.meals-caption {
  margin: 0 0 var(--space-3);
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: var(--fs-card-title);
  font-weight: 700;
  line-height: var(--lh-h3);
  text-align: left;
  overflow-wrap: break-word;
  /* A sentence, not a column: lining figures, so an old-style «1» never reads as «I». */
  font-variant-numeric: lining-nums;
}

.meals-table th,
.meals-table td {
  padding: var(--space-4) var(--space-3);
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
  hyphens: manual;
}

.meals-head th {
  border-top: 0;
  border-bottom: 2px solid var(--line-strong);
  color: var(--ink);
  font-weight: 600;
}

.meals-head th:first-child {
  width: 9.5rem;
}

/* The root is 20 px in low-vision mode: the day column keeps what its words need, so the dish
   columns keep the rest. */
:root[data-theme='low-vision'] .meals-head th:first-child {
  width: 7.5rem;
}

.meals-day {
  border-inline-start: 3px solid transparent;
  color: var(--ink);
  font-weight: 600;
}

.meals-day-name,
.meals-day-date {
  display: block;
}

.meals-day-name::first-letter {
  text-transform: uppercase;
}

.meals-day-date {
  color: var(--muted);
  font-size: var(--fs-meta-lg);
  font-weight: 400;
}

.meals-today {
  display: inline-block;
  margin-top: var(--space-1);
  color: var(--accent);
  font-size: var(--fs-meta-lg);
  font-weight: 700;
}

.meals-row.is-today .meals-day {
  border-inline-start-color: var(--accent);
}

.meals-td--note {
  color: var(--muted);
  font-size: var(--fs-text);
}

.meals-row--none .meals-day,
.meals-row--none .meals-td {
  padding-block: var(--space-2);
}

/* The cell's width, not base.css's shrink-to-fit figure (which takes the picture's `sizes` width). */
.meals-figure {
  width: auto;
  margin: 0 0 var(--space-3);
}

.meals-shot {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  background: var(--paper-2);
}

.meals-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit; /* follows the frame, not the 2px of `figure img` */
}

/* «+N» on the first photo: small, one line, so it covers a third of a 96 px photo at most. Its ground is
   `--brand-ground`, opaque: white reads at 4.5:1 on it for any primary, whatever the photo under it (a
   translucent shade of a light primary over a bright photo fell under). */
.meals-more {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 0 6px;
  background: var(--brand-ground);
  color: var(--chrome-bar-strong);
  font-size: var(--fs-meta-lg);
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}

:root[data-theme='low-vision'] .meals-more {
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
}

.meals-slot {
  display: none;
  margin: 0 0 var(--space-1);
  color: var(--ink);
  font-weight: 600;
}

.meals-dash {
  margin: 0;
  color: var(--muted);
}

.meals-group {
  margin: var(--space-3) 0 var(--space-1);
  color: var(--ink);
}

.meals-text > :first-child {
  margin-top: 0;
}

.meals-cell .meals-dishes {
  margin: 0;
  padding-left: 1.1em;
  font-size: var(--fs-text);
}

.meals-flag {
  margin: 0 0 var(--space-1);
  color: var(--muted);
  font-size: var(--fs-meta-sm);
  font-weight: 600;
}

@media (min-width: 1200px) {
  /* A photo in a cell: the day page's thumbnail size, the dishes under it. Scoped to the table: the
     home block draws the same cell. */
  .meals-table .meals-cell--photo .meals-figure {
    width: min(100%, 180px);
  }
}

/* Below 1200 px the week is the list of days. A column of the table must hold the longest dish word
   with the list's indent: measured on the school seed in all eight templates, from 768 px three
   columns cut «вермішелевий» up to 1112 px («Зошит»), two cut «фрикадельками» between 904 and 1008 px
   («Стенд», «Вітрина», «Зошит», low-vision too), where a side menu narrows the column. At 1200 px every
   template leaves a column at least 9 px more than its word needs with three прийоми (the narrowest is
   «Зошит», whose frame caps it at any width), 67 px with two. Scoped to the table: the home block draws
   the same cells. */
@media (max-width: 1199px) {
  .meals-table,
  .meals-table tbody,
  .meals-row,
  .meals-table th,
  .meals-table td {
    display: block;
  }

  /* The column heads stay for assistive technology; each cell names its прийом in the list. */
  .meals-head {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .meals-table th,
  .meals-table td {
    border-top: 0;
  }

  .meals-row {
    border-top: 1px solid var(--line);
  }

  .meals-table .meals-day {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 var(--space-3);
    padding: var(--space-4) var(--space-3) var(--space-2);
  }

  /* A block table keeps its caption a table-caption, as narrow as its words. */
  .meals-caption {
    display: block;
  }

  .meals-day-name,
  .meals-day-date {
    display: inline-block;
  }

  .meals-today {
    margin-top: 0;
  }

  .meals-table .meals-td {
    padding: var(--space-2) var(--space-3);
  }

  .meals-row--none .meals-day {
    padding-bottom: 0;
  }

  .meals-table .meals-figure {
    margin: 0;
  }

  .meals-table .meals-slot {
    display: block;
  }

  /* A прийом nobody filled is not drawn in the list, but not display: none either: that would drop
     the cell from the accessibility tree and the cells after it would be read under the wrong
     column head. Clipped like .sr-only, it is read as «немає запису». */
  .meals-table .meals-td--empty {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

/* In the week's list the photo stands beside the text where the text keeps 11rem (the longest dish
   word of the school seed, «фрикадельками», needs about 10.3rem in the widest face), else above it, still 96 px wide, so the week is as long in
   every template — by the cell's own width, whatever the template's frame; in low-vision mode below
   600 px always above (large type), as wide as 180 px. */
@media (max-width: 1199px) {
  .meals-table .meals-cell--photo {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: start;
  }

  .meals-table .meals-cell--photo .meals-figure {
    flex: 0 0 96px;
  }

  .meals-table .meals-cell--photo .meals-text {
    flex: 999 1 11rem;
    min-width: 0;
  }
}

@media (max-width: 599px) {
  :root[data-theme='low-vision'] .meals-table .meals-cell--photo {
    display: block;
  }

  :root[data-theme='low-vision'] .meals-table .meals-cell--photo .meals-figure {
    width: min(180px, 100%);
    margin-bottom: var(--space-3);
  }
}

/* A week of three or more прийоми (week.list) is the list at every width: from 1200 px the same
   rules under .meals-table--list (the markup keeps the table's roles). Below 1200 px the rules
   above already apply to it. */
@media (min-width: 1200px) {
  .meals-table--list,
  .meals-table--list tbody,
  .meals-table--list .meals-row,
  .meals-table--list th,
  .meals-table--list td {
    display: block;
  }

  .meals-table--list .meals-head {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .meals-table--list th,
  .meals-table--list td {
    border-top: 0;
  }

  .meals-table--list .meals-row {
    border-top: 1px solid var(--line);
  }

  .meals-table--list .meals-day {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 var(--space-3);
    padding: var(--space-4) var(--space-3) var(--space-2);
  }

  .meals-table--list .meals-caption {
    display: block;
  }

  .meals-table--list .meals-day-name,
  .meals-table--list .meals-day-date {
    display: inline-block;
  }

  .meals-table--list .meals-today {
    margin-top: 0;
  }

  .meals-table--list .meals-td {
    padding: var(--space-2) var(--space-3);
  }

  .meals-table--list .meals-row--none .meals-day {
    padding-bottom: 0;
  }

  .meals-table--list .meals-cell--photo {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: start;
  }

  .meals-table--list .meals-cell--photo .meals-figure {
    flex: 0 0 96px;
    width: auto;
    margin: 0;
  }

  .meals-table--list .meals-cell--photo .meals-text {
    flex: 999 1 11rem;
    min-width: 0;
  }

  .meals-table--list .meals-slot {
    display: block;
  }

  .meals-table--list .meals-td--empty {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

/* The week's photos follow the theme's corners, as the day page's do. */
.meals-table .meals-shot {
  border-radius: var(--radius-media);
}

/* Print: no arrows, a day stays whole; the week page keeps only the week — no calendar, no rows
   without a record, and (the collection page only; the day page shares `.meals`, not
   `.base-collection`) no lead, information chapters or «Меню» heading. The rest of
   the week from the menu (`.meals-upcoming`) is part of the week and stays. */
@media print {
  .meals-weeknav,
  .meals-groups,
  .meals-calnav,
  .meals-calendar,
  .meals-row--none,
  .meals-free,
  .meals-printlink,
  .meals-print-tools {
    display: none !important;
  }

  .meals-print-block {
    break-inside: avoid;
  }

  .meals-print .meals-marks,
  .meals-print .meals-legend-title,
  .meals-print .meals-legend-note,
  .meals-print .meals-print-law {
    color: var(--ink);
  }

  .meals-row {
    break-inside: avoid;
  }

  .base-collection.meals .base-collection-intro,
  .base-collection.meals .meals-info,
  .base-collection.meals .meals-menu > .chp-head {
    display: none !important;
  }

  /* The space after the last table is not printed: in low-vision mode its tokens are large enough
     to push an empty sheet after the week. */
  .base-collection.meals,
  .base-collection.meals .meals-menu,
  .base-collection.meals .meals-week {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
}

/* The home block «Харчування сьогодні» (story 54, slice 7): today's прийоми as the week's cells under
   their names — side by side from a cell of about 9.5rem (so also in the narrow column of «Газета» and
   «Портал»), one under another on a phone. */

.meals-dishes {
  margin: var(--space-3) 0 0;
  padding-left: var(--space-6);
  color: var(--body);
}

.meals-home {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
  gap: var(--space-6) var(--space-5);
}

@media (max-width: 599px) {
  .meals-home {
    grid-template-columns: minmax(0, 1fr);
  }
}

.meals-home-item {
  min-width: 0;
}

.meals-home .meals-dishes {
  margin-top: var(--space-2);
  padding-left: var(--space-5);
  overflow-wrap: break-word;
}

.meals-home-title {
  margin: 0 0 var(--space-2);
  color: var(--ink);
  font-size: var(--fs-text);
  font-weight: 600;
}

/* The heading above names the прийом; the cell's own name is for the week's list. */
.meals-home .meals-slot {
  display: none;
}

.meals-home .meals-cell--photo {
  display: block;
}

.meals-home .meals-figure {
  margin: 0 0 var(--space-3);
}

/* The home block's photos follow «Кути»; «Газета» and «Стенд» declare square ones. */
.meals-home .meals-shot {
  border-radius: var(--radius-media);
}

/* A day's link in the week. */

.meals-day-link {
  color: inherit;
  text-decoration: none;
}

.meals-day-link .meals-day-name {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* The home block's date line reads at the body size. */
.base-block--meals .base-meta {
  font-size: var(--fs-text);
}

/* A day at its own address (growth story 61): one narrow sheet, the same on every template and every
   screen — the date, the share row, then a short block per прийом (its name, 4:3 thumbnails, the dishes).
   A template may only recolour it and set the прийом name's face. */
.meals-daypage {
  max-width: 40rem;
}

:root[data-theme='low-vision'] .meals-daypage {
  max-width: 800px;
}

.meals .meals-daypage .base-kicker {
  margin: 0 0 var(--space-1);
  color: var(--muted);
  font-size: var(--fs-meta-lg);
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
}

.base-page.meals .meals-daypage .page-h1 {
  margin-top: 0;
  padding-top: 0;
  font-size: var(--fs-h2-phone);
  line-height: var(--lh-h2);
}

.meals .meals-daypage .base-kicker .meals-today {
  margin: 0;
  font-size: inherit;
}

:root[data-theme='low-vision'] .base-page.meals .meals-daypage .page-h1 {
  font-size: 30px;
  line-height: var(--lh-h2);
}

/* Sending is the first action: the button and the address side by side, wrapping on a phone. */
.meals-dayshare {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  margin: var(--space-4) 0 var(--space-6);
}

.meals-dayshare-button {
  min-height: 44px;
  padding: 0 var(--space-5);
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.meals-dayshare-button[hidden] {
  display: none;
}

/* The post's two messenger links beside the button: the same box, a 44 px target. */
.meals-dayshare-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--accent);
  border-radius: var(--radius-button);
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

/* «Копіювати посилання» is a button in the links' box; hidden until share.js runs. */
button.meals-dayshare-link {
  background: transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.meals-dayshare-link[hidden] {
  display: none;
}

/* The row is one look: the links take the buttons' corners (base.css), and a template's rule for the links
   of its main column (`.zoshyt-main a`) does not colour or underline two of the four. */
.meals-dayshare a.meals-dayshare-link {
  color: var(--accent);
  text-decoration: none;
}

.meals-dayshare-link svg {
  width: 18px;
  height: 18px;
  flex: none;
}

/* «Меню групи …» / «Усі групи» under the share row of a filtered day. */
.meals-dayfilter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-4);
  margin: 0 0 var(--space-5);
  color: var(--ink);
  font-weight: 600;
}

/* With the script the buttons are the way to send the address; the bare address stays for a page without it,
   on paper, and where the copy cannot be done (share.js). */
@media screen {
  html.js .meals-dayshare-url:not(.is-shown) {
    display: none;
  }
}

.meals-dayshare-url {
  font-size: var(--fs-meta-lg);
  color: var(--muted);
  overflow-wrap: break-word;
  min-width: 0;
}

.meals-dayblock {
  margin: 0 0 var(--space-5);
}

.meals-dayblock + .meals-dayblock {
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}

/* 22 px (26 in low-vision): a step above the 16.5 px dishes in every template's heading face, still
   below the 24 px date. */
.meals-dayblock-title {
  margin: 0 0 var(--space-3);
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: var(--fs-tagline);
  line-height: var(--lh-h3);
}

/* A block with photos and dishes: the name over the row, the thumbnails in the first column, the
   dishes in the second. The photo column is 128 px on a phone (about two dish lines), never more
   than 40% of the block so the dishes keep room on a narrow template, and 180 px (about three
   lines) from a tablet and in low-vision mode. */
.meals-dayblock--photos {
  display: grid;
  grid-template-columns: min(128px, 40%) minmax(0, 1fr);
  gap: var(--space-3) var(--space-4);
}

@media (min-width: 768px) {
  .meals-dayblock--photos {
    grid-template-columns: 180px minmax(0, 1fr);
  }
}

:root[data-theme='low-vision'] .meals-dayblock--photos {
  grid-template-columns: 180px minmax(0, 1fr);
}

.meals-dayblock--photos .meals-dayblock-title {
  grid-column: 1 / -1;
  margin: 0;
}

.meals-daythumbs {
  display: grid;
  align-content: start;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.meals-dayblock--bare .meals-daythumbs,
.meals-dayblock--above .meals-daythumbs {
  display: flex;
  flex-wrap: wrap;
}

/* More photos than dishes: the photos in a row above the dishes, sized like a block without dishes. */
.meals-dayblock--above .meals-daythumbs {
  margin-bottom: var(--space-3);
}

/* A 4:3 crop as wide as its column or list item; the border is inside the size. */
.meals-daythumbs a {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: var(--radius-media);
  overflow: hidden;
}

.meals-daythumbs img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meals-daythumbs a:focus-visible {
  outline: var(--focus-ring, 2px solid var(--accent));
  outline-offset: 2px;
}

/* Without dishes: up to 180 px, never wider than half the row, so two always fit side by side. */
.meals-dayblock--bare .meals-daythumbs li,
.meals-dayblock--above .meals-daythumbs li {
  width: min(180px, calc(50% - var(--space-2) / 2));
}

/* Low-vision on a narrow screen: the dishes would get too little room beside the photos, so the
   photos become a wrapping row above them, sized like a block without dishes. */
@media (max-width: 599px) {
  :root[data-theme='low-vision'] .meals-dayblock--photos {
    display: block;
  }

  :root[data-theme='low-vision'] .meals-dayblock--photos .meals-dayblock-title {
    margin-bottom: var(--space-3);
  }

  :root[data-theme='low-vision'] .meals-dayblock--photos .meals-daythumbs {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: var(--space-3);
  }

  :root[data-theme='low-vision'] .meals-dayblock--photos .meals-daythumbs li {
    width: min(180px, calc(50% - var(--space-2) / 2));
  }
}

.meals-daydishes {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-text);
  line-height: var(--lh-text);
}

.meals-daydishes li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  overflow-wrap: break-word;
}

.meals-daydishes li:first-child {
  padding-top: 0;
  border-top: 0;
}

.meals-dish-detail {
  color: var(--muted);
}

/* The month calendar (story 54): a plain seven-column table under the page, weekend columns muted,
   a day with a record underlined and bold (never colour alone), today boxed. */
.meals-calendar {
  max-width: 28rem;
  margin: var(--space-7) 0 0;
}

.meals-calendar-title {
  margin: 0 0 var(--space-2);
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: var(--fs-card-title);
  font-weight: 700;
  line-height: var(--lh-h3);
}

.meals-calendar-range {
  margin: 0 0 var(--space-3);
  color: var(--muted);
  font-size: var(--fs-meta-lg);
}

.meals-calnav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}

.meals-calnav-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 44px;
  color: var(--accent);
  font-weight: 600;
}

.meals-calnav-link--next {
  margin-inline-start: auto;
}

.meals-cal {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  color: var(--body);
}

.meals-cal-caption {
  margin: 0 0 var(--space-2);
  color: var(--ink);
  font-weight: 600;
  text-align: left;
}

.meals-cal th {
  padding: var(--space-2) 0;
  border-bottom: 2px solid var(--line-strong);
  color: var(--ink);
  font-size: var(--fs-meta-lg);
  font-weight: 600;
  text-align: center;
}

.meals-cal td {
  padding: 0;
  border-top: 1px solid var(--line);
  text-align: center;
}

.meals-cal .meals-cal-weekend {
  color: var(--muted);
}

.meals-cal-day {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: min(40px, 100%);
  min-height: 44px;
  margin: 0 auto;
}

.meals-cal-day--record {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Today's box (keyed on the cell: the open day of a day's page is aria-current="page" and may be
   today too) gives way to the focus ring while focused. */
.is-today > .meals-cal-day:not(:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: -4px;
}

/* The open day of a day's page: a fill, not colour alone, strong in both modes; today's box inside
   it is drawn in the page colour. */
.meals-cal-day[aria-current='page'] {
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.is-today > .meals-cal-day[aria-current='page']:not(:focus-visible) {
  outline-color: var(--paper);
}

/* A day marked «Харчування не було» (growth story 54, slice 9): its row says so across the row, and
   its page opens with the same sentence instead of blocks. The templates restyle it in slice 8. */
.meals-td--closed {
  color: var(--ink);
  font-size: var(--fs-text);
  font-weight: 600;
}

.meals-closed {
  margin: 0 0 var(--space-5);
  padding: var(--space-2) var(--space-4);
  border-inline-start: 4px solid var(--line);
  color: var(--ink);
  font-size: var(--fs-text);
  font-weight: 600;
}

/* The allergen marks (growth story 72, S8a), drawn only where the school switched them on: a dish's
   mark under its name in the grey of the note, and the legend of the codes used under the menu — two
   columns, one on a phone. Text, never an icon or colour alone; printing keeps both. */
.meals-marks {
  display: block;
  color: var(--muted);
  font-size: var(--fs-meta-sm);
  line-height: var(--lh-text);
}

/* The total of a прийом's energy under its dishes, drawn only when every dish of it has an energy value. */
.meals-total {
  margin: var(--space-2) 0 0;
  color: var(--ink);
  font-size: var(--fs-meta-lg);
  font-weight: 700;
}

.meals-legend-box {
  margin: var(--space-5) 0 0;
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  color: var(--ink);
}

.meals-legend-title,
.meals-legend-note {
  margin: 0 0 var(--space-2);
  color: var(--muted);
  font-size: var(--fs-meta-lg);
}

.meals-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-1) var(--space-5);
  margin: 0 0 var(--space-2);
  font-size: var(--fs-meta-lg);
}

.meals-legend-item {
  display: flex;
  gap: var(--space-2);
}

.meals-legend-item dt {
  min-width: 2.2em;
  font-weight: 700;
}

.meals-legend-item dd {
  margin: 0;
}

@media (max-width: 599px) {
  .meals-legend {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* «Без алергену» over the week (growth story 86, K5): a fieldset of the 15 codes, each with its words, in
   columns that wrap; the count and the found dishes under it. Text and borders only, no colour carries a
   meaning; the focus ring is the browser's. */
/* The details and the line «Про алергени…» after it: one row while closed, the line under the open filter. */
.meals-free-box {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-5);
  align-items: baseline;
  margin: 0 0 var(--space-4);
}

.meals-free {
  flex: 0 1 auto;
  min-width: 0;
}

.meals-free[open] {
  flex-basis: 100%;
  margin: 0 0 var(--space-2);
}

/* Closed, the filter is one line under the heading; the summary keeps the browser's marker and the
   site's focus ring, and is a full touch target. */
.meals-free-summary {
  display: list-item;
  min-height: 44px;
  padding: var(--space-2) 0;
  color: var(--ink);
  font-size: var(--fs-text);
  font-weight: 700;
  cursor: pointer;
}

.meals-free[open] > .meals-free-summary {
  margin: 0 0 var(--space-2);
}

.meals-free + .meals-legend-note {
  margin: 0;
}

.meals-free-set {
  min-width: 0;
  margin: 0;
  padding: var(--space-4);
  border: 1px solid var(--line);
}

.meals-free-legend {
  padding: 0 var(--space-2);
  color: var(--ink);
  font-size: var(--fs-text);
  font-weight: 700;
}

.meals-free-hint {
  margin: 0 0 var(--space-3);
  color: var(--muted);
  font-size: var(--fs-meta-lg);
}

.meals-free-codes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: var(--space-1) var(--space-5);
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
}

.meals-free-code {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  min-height: 44px;
  padding: var(--space-2) 0;
  color: var(--ink);
  font-size: var(--fs-text);
  cursor: pointer;
}

.meals-free-code input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.15rem 0 0;
}

.meals-free-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  align-items: center;
}

.meals-free-reset[hidden] {
  display: none;
}

.meals-free-count {
  margin: var(--space-4) 0 0;
  color: var(--ink);
  font-size: var(--fs-text);
  font-weight: 600;
}

/* Empty, the count keeps its place in the accessibility tree, so the first count a choice brings is
   announced; it only gives up its margin. */
.meals-free-count:empty {
  margin: 0;
}

.meals-free-title {
  margin: var(--space-5) 0 var(--space-2);
  color: var(--ink);
  font-size: var(--fs-text);
}

.meals-free-day {
  margin: var(--space-3) 0 0;
  color: var(--ink);
  font-weight: 700;
}

.meals-free-dishes {
  margin: var(--space-1) 0 0;
  padding-left: var(--space-6);
  color: var(--body);
}

.meals-free-none {
  margin: var(--space-4) 0 0;
  color: var(--ink);
}

/* The day's link to its print sheet, and the sheet itself (an A4 page): a bordered table per прийом,
   the legend and the act under it. On paper the tools and the page's own frame go; black on white. */
.meals-printlink {
  margin: var(--space-4) 0 0;
}

.meals-print-tools {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  align-items: center;
  margin: 0 0 var(--space-5);
}

.meals-print-block {
  margin: 0 0 var(--space-5);
}

.meals-print-title {
  margin: 0 0 var(--space-2);
  color: var(--ink);
  font-size: var(--fs-text);
}

.meals-print-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ink);
  font-size: var(--fs-text);
}

.meals-print-table th,
.meals-print-table td {
  padding: var(--space-2) var(--space-3);
  overflow-wrap: break-word;
  border: 1px solid var(--ink);
  text-align: left;
  vertical-align: top;
}

.meals-print-table thead th {
  font-weight: 700;
}

/* On a phone the columns share the screen: the table never scrolls the page sideways (320 px, the
   low-vision sizes); a word wider than its cell wraps, as anywhere else. */
@media (max-width: 599px) {
  .meals-print-table {
    table-layout: fixed;
  }
}

.meals-print-table tbody th {
  font-weight: 400;
}

.meals-print-law {
  margin: var(--space-3) 0 0;
  color: var(--ink);
  font-size: var(--fs-meta-lg);
}

/* css/components/records.css */
/* Records on a page (growth story 39): the cards of a page's preset with their
   filter row, and a record's own page. The markup is partials/records-content
   and partials/record-body; every template links this file and its own
   colours, faces and corners arrive through the tokens. */

.records {
  margin-block: var(--space-8);
}

.records-title {
  margin: 0 0 var(--space-5);
  color: var(--ink);
  font-size: var(--fs-card-title);
}

.records-filters {
  margin: 0 0 var(--space-6);
}

.records-filter-label {
  margin: 0 0 var(--space-2);
  color: var(--muted);
  font-size: var(--fs-meta-lg);
}

.records-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
  padding: 0;
  list-style: none;
}

.records-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-5);
  border: 1.5px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  font-size: var(--fs-nav);
  text-decoration: none;
}

.records-chip--on {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--paper);
  font-weight: 600;
}

.records-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

.records-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--paper);
}

.records-card-photo {
  line-height: 0;
}

.records-card-photo img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.records-card-body {
  padding: var(--space-4) var(--space-5) var(--space-5);
}

.records-card-title {
  margin: 0 0 var(--space-2);
  font-size: var(--fs-card-title);
  line-height: var(--lh-h3);
}

.records-card-title a {
  color: var(--ink);
}

.records-card-line {
  margin: 0 0 var(--space-1);
  color: var(--body);
  font-size: var(--fs-nav);
}

.records-empty {
  color: var(--muted);
}

.record-photo {
  margin: 0 0 var(--space-6);
  line-height: 0;
}

.record-photo img {
  width: 100%;
  max-width: 640px;
  height: auto;
}

.record-facts {
  margin: 0 0 var(--space-7);
}

.record-fact {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-5);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--line);
}

.record-fact dt {
  flex: 0 0 12em;
  color: var(--muted);
}

.record-fact dd {
  flex: 1 1 14em;
  margin: 0;
  color: var(--ink);
}

.record-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.record-text {
  margin: 0 0 var(--space-7);
}

.record-text-title {
  margin: 0 0 var(--space-3);
  font-size: var(--fs-card-title);
}

@media (max-width: 600px) {
  .record-fact dt {
    flex-basis: 100%;
  }
}

.records-more {
  margin: var(--space-5) 0 0;
  font-size: var(--fs-nav);
}

/* css/components/services.css */
/* External service links (growth story 39): a row of buttons under the header
   on the home page and «Вступ», and a plain list above the footer on every
   page. The markup is partials/services; every template links this file and
   its own colours, faces and corners arrive through the tokens. */

.services-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: 0 auto;
  padding-block: var(--space-4);
  list-style: none;
}

.services--top {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.services-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-5);
  border: 1.5px solid var(--accent);
  background: var(--accent);
  color: var(--paper);
  font-size: var(--fs-button);
  font-weight: 600;
  text-decoration: none;
}

.services-btn:hover,
.services-btn:focus-visible {
  background: var(--paper);
  color: var(--accent);
}

.services--foot {
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.services-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-size: var(--fs-nav);
  text-decoration: underline;
}

/* css/components/doc-protection.css */
/* The signature line under a document in a list. Colours and sizes come
   from the tokens, so it scales with the text. */

.doc-protection {
  display: block;
  margin-top: var(--space-1);
  font-size: calc(var(--fs-text) * 0.91);
  line-height: var(--lh-h3);
  color: var(--muted);
}

/* Above a row whose whole area is the document's link. */
.doc-protection a {
  position: relative;
  white-space: nowrap;
  z-index: 1;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.doc-protection a:hover {
  color: var(--accent);
}

/* The low-vision mode: the line is meta-sized, like the row above it, and its links are the
   mode's link colour. */
:root[data-theme='low-vision'] .doc-protection {
  font-size: var(--fs-meta-lg);
}

:root[data-theme='low-vision'] .doc-protection a {
  color: var(--accent);
}

/* The copy-protection label sits quietly in front of the signature text; the
   description of a «Лише для читання» file is a paragraph of its own. */
.doc-protection-level {
  font-style: italic;
}

.doc-protection-desc {
  display: block;
  margin-top: var(--space-1);
  max-width: 62ch;
}

/* The low-vision mode: whoever cannot read the pictures of a «Лише для
   читання» file meets its description before the labels. */
:root[data-theme='low-vision'] .doc-protection {
  display: flex;
  flex-direction: column;
}

:root[data-theme='low-vision'] .doc-protection-desc {
  order: -1;
  margin-top: 0;
  margin-bottom: var(--space-1);
}

/* The signature text and its links are one line of running text; a long name or provider
   breaks at a word, never inside it. */
.doc-protection-line {
  overflow-wrap: break-word;
}

/* The short mark by a signed document in the documents collection («Підписано») and the
   «Лише підписані» link under the count. The mark is plain text in the meta row's face and colour,
   no frame, inline after the title (the space in front of it is the partial's own, so a mark that
   starts a line has no indent); each template restyles it to its idea. */
.doc-signed-mark {
  color: var(--muted);
  font-size: var(--fs-meta-lg);
  font-weight: 400;
  white-space: nowrap;
}

.doc-signed-filter {
  margin: var(--space-3) 0;
  font-size: var(--fs-text);
}

.doc-signed-filter a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* «Перевірка підпису» (/dokument/<file id>/pidpys): the document, what the site checked, how to
   check it oneself. A text column; the sentences carry the result, the tick only repeats it. */
.doc-sign {
  padding-bottom: var(--space-11);
}

.doc-sign-doc,
.doc-sign-text,
.doc-sign-note,
.doc-sign-steps,
.doc-sign-small {
  max-width: 62ch;
  overflow-wrap: break-word;
}

/* The link to the document's page is body-size: links stay at the 15 px floor. */
.doc-sign-doc {
  margin: var(--space-2) 0 0;
  color: var(--muted);
  font-size: var(--fs-text);
}

/* Every link inside the page's text is underlined (not told by colour alone), in the mode's link
   colour in low vision. */
.doc-sign-doc a,
.doc-sign-text a,
.doc-sign-steps a,
.doc-sign-files a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

:root[data-theme='low-vision'] .doc-sign-doc a,
:root[data-theme='low-vision'] .doc-sign-text a,
:root[data-theme='low-vision'] .doc-sign-steps a,
:root[data-theme='low-vision'] .doc-sign-files a {
  color: var(--accent);
}

.doc-sign-section {
  margin-top: var(--space-7);
}

/* The page's part outranks the group heading below it (1.12 × the body): at least 1.2 × that, in the
   normal and the low-vision scale alike. */
.doc-sign-h2 {
  margin: 0 0 var(--space-3);
  color: var(--ink);
  font-size: calc(var(--fs-text) * 1.35);
  line-height: var(--lh-h3);
}

/* Several signatures: a part for the detached signature and one for those inside the PDF (its
   heading a step larger than the body, in the heading face, over a rule), a part for each signer
   (its heading bold body text); a long name breaks at a word. In low vision the body is 20 px, so
   the group heading is 22 px and still above it. */
.doc-sign-group,
.doc-sign-signer {
  margin-top: var(--space-5);
}

.doc-sign-group {
  margin-top: var(--space-7);
}

.doc-sign-h3 {
  max-width: 62ch;
}

.doc-sign-gh,
.doc-sign-h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: break-word;
}

.doc-sign-gh {
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  font-family: var(--font-heading);
  font-size: calc(var(--fs-text) * 1.12);
  line-height: var(--lh-h3);
}

.doc-sign-h3 {
  font-size: var(--fs-text);
  line-height: var(--lh-text);
}

:root[data-theme='low-vision'] .doc-sign-gh,
:root[data-theme='low-vision'] .doc-sign-h3 {
  max-width: none;
}

.doc-sign-checks,
.doc-sign-files {
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-sign-checks li {
  display: flex;
  gap: var(--space-3);
  max-width: 62ch;
  margin-top: var(--space-2);
  color: var(--body);
  font-size: var(--fs-text);
  line-height: var(--lh-text);
}

.doc-sign-checks li > span {
  min-width: 0;
  overflow-wrap: break-word;
}

.doc-sign-icon {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  margin-top: 0.2em;
  color: var(--accent);
}

.doc-sign-text,
.doc-sign-note,
.doc-sign-steps {
  margin: var(--space-3) 0 0;
  color: var(--body);
  font-size: var(--fs-text);
  line-height: var(--lh-text);
}

.doc-sign-steps {
  padding-left: 1.4em;
}

.doc-sign-steps li + li {
  margin-top: var(--space-2);
}

.doc-sign-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-1) var(--space-5);
  max-width: 62ch;
  margin: var(--space-5) 0 0;
  font-size: var(--fs-text);
  line-height: var(--lh-text);
}

.doc-sign-facts dt {
  color: var(--muted);
  font-size: var(--fs-meta-lg);
}

.doc-sign-facts dd {
  margin: 0 0 var(--space-3);
  color: var(--ink);
  overflow-wrap: break-word;
}

@media (min-width: 30em) {
  .doc-sign-facts {
    grid-template-columns: max-content minmax(0, 1fr);
  }

  .doc-sign-facts dd {
    margin: 0;
  }
}

.doc-sign-file {
  margin: 0;
}

.doc-sign-button {
  display: inline-block;
  max-width: 100%;
  padding: var(--space-3) var(--space-5);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-size: var(--fs-text);
  font-weight: 700;
  overflow-wrap: break-word;
}

.doc-sign-small {
  margin: var(--space-5) 0 0;
  color: var(--muted);
  font-size: var(--fs-meta-lg);
}

/* The separate-file links are links: body size; only the lead-in above them stays small. */
.doc-sign-files {
  margin-top: var(--space-1);
  font-size: var(--fs-text);
  line-height: var(--lh-text);
}

.doc-sign-files li + li {
  margin-top: var(--space-1);
}

:root[data-theme='low-vision'] .doc-sign-doc,
:root[data-theme='low-vision'] .doc-sign-text,
:root[data-theme='low-vision'] .doc-sign-note,
:root[data-theme='low-vision'] .doc-sign-steps,
:root[data-theme='low-vision'] .doc-sign-small,
:root[data-theme='low-vision'] .doc-sign-checks li,
:root[data-theme='low-vision'] .doc-sign-facts {
  max-width: none;
}

/* css/components/doc-viewer.css */
/* A document shown page by page (/dokument/<file id>): the title block, the page in a frame with
   a step link on each side, the list of pages. Colours, spaces and sizes come from the tokens,
   so it follows every template's look and the low-vision mode. */
.doc-viewer {
  padding-bottom: var(--space-11);
}

.doc-viewer-date {
  margin: var(--space-1) 0 0;
  color: var(--muted);
  font-size: var(--fs-meta-lg);
}

.doc-viewer-desc {
  max-width: 62ch;
  margin: var(--space-3) 0 0;
  color: var(--body);
  font-size: var(--fs-text);
  line-height: var(--lh-text);
}

/* Only on paper: where the document lives. */
.doc-viewer-address {
  display: none;
}

.doc-viewer-message {
  max-width: 62ch;
  margin: var(--space-7) 0 0;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: var(--fs-text);
}

.doc-viewer-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
  max-width: 900px;
  margin: var(--space-5) 0;
  font-size: var(--fs-nav);
}

.doc-viewer-step {
  padding: var(--space-2) 0;
  color: var(--accent);
  font-weight: 700;
}

.doc-viewer-step:last-child {
  text-align: right;
}

.doc-viewer-step--off {
  visibility: hidden;
}

.doc-viewer-status {
  color: var(--body);
  text-align: center;
}

.doc-viewer-stage {
  max-width: 900px;
  margin: 0;
  border: 1px solid var(--line-strong);
  background: var(--paper);
}

.doc-viewer-page {
  display: block;
  width: 100%;
  height: auto;
}

.doc-viewer-pages {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  max-width: 900px;
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
}

.doc-viewer-num {
  display: block;
  min-width: 44px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line-strong);
  color: var(--accent);
  font-size: var(--fs-nav);
  text-align: center;
}

.doc-viewer-num[aria-current='page'] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
  font-weight: 700;
}

/* The low-vision mode: the page takes the whole width. */
:root[data-theme='low-vision'] .doc-viewer-nav,
:root[data-theme='low-vision'] .doc-viewer-stage,
:root[data-theme='low-vision'] .doc-viewer-pages,
:root[data-theme='low-vision'] .doc-viewer-desc {
  max-width: none;
}

/* Paper: the title, the description and the address; not the pages. */
@media print {
  .doc-viewer-nav,
  .doc-viewer-stage,
  .doc-viewer-list,
  .doc-viewer-message {
    display: none !important;
  }

  .doc-viewer-address {
    display: block;
    margin-top: var(--space-5);
  }
}

/* css/templates/_base/base-template.css */
/* `_base` — the internal template every other one falls back to for a file
   it does not have (growth story 15). Plain, semantic, on the tokens only:
   the low-vision override of tokens.css repaints all of it. Colour pairs used
   throughout, each readable in both looks: text on --paper (--ink, --body,
   --muted, links --accent), --paper on --blue or --accent (buttons), the
   --chrome-bar-* inks on --chrome-bar (dark bands), --ink on --chrome-tint
   (light bands). A template that inherits a view from _base lists this file
   in its manifest, before its own stylesheet. */

/* ---------- page frame ---------- */

.base-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.base-main {
  flex: 1 0 auto;
}

.base-page {
  padding-block: var(--space-8) var(--space-10);
}

.page-h1 {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: var(--ls-heading);
  color: var(--ink);
  margin-bottom: var(--space-5);
  overflow-wrap: break-word;
}

.base-section-title {
  font-size: 22px;
  line-height: 1.25;
  color: var(--ink);
  margin: var(--space-8) 0 var(--space-4);
}

.base-kicker {
  font-size: var(--fs-meta-lg);
  font-weight: 700;
  letter-spacing: var(--ls-overline);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.base-lead {
  font-size: 19px;
  line-height: 1.55;
  color: var(--body);
  margin-bottom: var(--space-4);
}

.base-meta {
  font-size: var(--fs-meta-lg);
  color: var(--muted);
}

.base-meta a {
  color: var(--accent);
  text-decoration: underline;
}

.base-count {
  font-weight: 400;
  color: var(--muted);
  font-size: 14px;
}

.base-empty {
  color: var(--muted);
  padding: var(--space-6) 0;
}

.base-status {
  margin: var(--space-5) 0;
  font-weight: 600;
  color: var(--ink);
}

.base-crumbs {
  font-size: var(--fs-meta-lg);
  color: var(--muted);
  margin-bottom: var(--space-4);
}

.base-crumbs a {
  color: var(--accent);
}

/* Running text: a page's Markdown, a post's body, the about block. */
.base-prose {
  max-width: 72ch;
  color: var(--body);
}

.base-prose > * + * {
  margin-top: var(--space-4);
}

.base-prose h2,
.base-prose h3,
.base-prose h4 {
  color: var(--ink);
  line-height: 1.25;
  margin-top: var(--space-8);
}

.base-prose h2 {
  font-size: 26px;
}

.base-prose h3 {
  font-size: 21px;
}

.base-prose ul,
.base-prose ol {
  padding-left: 1.4em;
}

.base-prose li + li {
  margin-top: var(--space-1);
}

.base-prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.base-prose img {
  border-radius: var(--radius-media);
}

/* A photo in a text, a linked one too, is at most 80% of the window tall (720px at most), its width
   following the ratio, so a portrait one does not fill three screens; where it stands is unchanged.
   The gallery, the map, the video, a card's photo (md-blocks.css: 3:2, the card's width) and the photo of a
   «Фото поруч із текстом» (the width of its place) are not touched. «Зошит» keeps its own line system. */
:is(.base-prose, .hazeta-prose, .chp-text-body) :is(figure:not(.md-map, .md-video, .album-photo, .md-card > *, .md-media > *), p) > img,
:is(.base-prose, .hazeta-prose, .chp-text-body) :is(figure:not(.md-map, .md-video, .album-photo, .md-card > *, .md-media > *), p) > a > img {
  width: auto;
  max-height: min(80vh, 720px);
}

/* ---------- buttons and small links ---------- */

.base-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border: 2px solid var(--brand-ground);
  background: var(--brand-ground);
  color: var(--paper);
  font: inherit;
  font-size: var(--fs-button);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.base-button:hover {
  background: var(--brand-ground-deep);
  border-color: var(--brand-ground-deep);
}

.base-button--ghost {
  background: transparent;
  color: var(--brand-ground);
}

.base-button--ghost:hover {
  background: var(--brand-ground);
  color: var(--paper);
}

.base-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin-top: var(--space-5);
}

.base-more {
  font-weight: 700;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* ---------- the header ---------- */

.base-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.base-topline {
  background: var(--chrome-bar);
  color: var(--chrome-bar-ink);
  font-size: var(--fs-meta-lg);
}

.base-topline-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-5);
  min-height: 40px;
  padding-block: var(--space-1);
}

.base-topline a {
  color: var(--chrome-bar-strong);
}

.base-topline-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.base-toplink {
  font-weight: 700;
  text-decoration: underline;
}

/* The highlighted link on the dark bar: its own colour, kept readable on the bar. */
.base-topline .base-toplink {
  color: var(--toplink-on-dark, var(--chrome-bar-strong));
}

.base-bvi {
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.base-topline .base-bvi {
  color: var(--chrome-bar-strong);
}

.base-header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: 84px;
  padding-block: var(--space-3);
}

.base-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--ink);
  text-decoration: none;
  flex: none;
}

.base-brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.base-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--blue);
  color: var(--paper);
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  border-radius: var(--radius);
}

.base-brand-name {
  display: flex;
  flex-direction: column;
  font-weight: 800;
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: var(--ls-h3);
}

/* The menu: a row of links; a dropdown opens a panel under its item. */
.base-nav {
  flex: 1 1 auto;
}

.base-nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  list-style: none;
}

.base-nav-item {
  position: relative;
}

.base-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-nav-main);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.base-nav-link:hover,
.base-nav-link.is-active,
.base-nav-link[aria-expanded='true'] {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.base-nav-cta {
  background: var(--cta-fill, var(--accent));
  color: var(--cta-ink, var(--paper));
  padding-inline: 16px;
}

.base-nav-cta:hover {
  color: var(--cta-ink, var(--paper));
  background: var(--cta-fill-hover, var(--blue));
  text-decoration: none;
}

.base-nav-caret {
  font-size: 14px;
}

.base-nav-panel {
  position: absolute;
  top: 100%;
  left: 50%;
  translate: calc(-50% + var(--mega-shift, 0px)) 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  min-width: 240px;
  padding: var(--space-2);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  box-shadow: 0 12px 28px var(--blue-shadow-a22);
}

.base-nav-panel[hidden] {
  display: none;
}

.base-nav-sublink {
  display: block;
  padding: 10px 12px;
  color: var(--ink);
  text-decoration: none;
}

.base-nav-sublink:hover,
.base-nav-sublink.is-active {
  background: var(--chrome-tint);
  color: var(--accent);
}

/* The current page in a panel: underlined and heavier, not only tinted (the
   tint is gone in the low-vision look). */
.base-nav-sublink[aria-current='page'] {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.base-search {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.base-search-input {
  min-width: 0;
  width: 190px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-right: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-nav);
}

.base-search-button {
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--brand-ground);
  background: var(--brand-ground);
  color: var(--paper);
  font: inherit;
  font-size: var(--fs-nav);
  font-weight: 700;
  cursor: pointer;
}

.base-search--page {
  max-width: 640px;
  margin-bottom: var(--space-6);
}

.base-search--page .base-search-input {
  flex: 1;
  width: auto;
  font-size: var(--fs-text);
}

.base-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  margin-left: auto;
  padding: 12px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  cursor: pointer;
}

.base-menu-toggle-bar {
  display: block;
  height: 2px;
  background: var(--ink);
}

@media (max-width: 899px) {
  .base-header-nav,
  .base-header-search {
    display: none;
  }

  .base-menu-toggle {
    display: inline-flex;
  }

  .base-topline-contacts {
    display: none;
  }
}

/* ---------- the mobile menu overlay (public/js/mobile-menu.js) ---------- */

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  overflow-y: auto;
  padding: 72px var(--space-5) var(--space-8);
  background: var(--paper);
}

.mobile-menu-overlay[hidden] {
  display: none;
}

/* Without JavaScript the overlay is a plain list under the header (base.css);
   from the tablet edge the header shows the whole menu, so it goes. */
@media (min-width: 900px) {
  html:not(.js) .mobile-menu-overlay {
    display: none;
  }
}

.mobile-menu-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-4);
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.mobile-search {
  display: flex;
  margin-bottom: var(--space-5);
}

.mobile-search-input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.mobile-search-button {
  min-height: 46px;
  padding: 8px 16px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: var(--paper);
  font: inherit;
  font-weight: 700;
}

/* The ring of a joined search control (field and button, no gap) is drawn wholly inside it, past the
   1 px border, in the control's own text colour: an outward ring would land on its neighbour. A
   template with another border or ring sets its own offset with the same selectors. */
.base-search-input:focus-visible,
.base-search-button:focus-visible,
.mobile-search-input:focus-visible,
.mobile-search-button:focus-visible {
  outline-color: currentColor;
  outline-offset: -4px;
}

/* :where() keeps this at the weight of a bare a, so a template's own
   overlay colours (and .mobile-important) win over it. */
:where(.mobile-menu-overlay) a,
.mobile-about-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

/* The current location (aria-current, from the menu's `current`): a bar at
   the start of the row and a heavier weight, the page itself underlined too
   — never the colour alone, and apart from the focus ring, which outlines
   the whole row. The section above the page («true») gets the bar only. */
.mobile-menu-overlay [aria-current] {
  padding-left: var(--space-3);
  border-left: 4px solid var(--accent);
  font-weight: 700;
}

.mobile-menu-overlay [aria-current='page'] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

.mobile-about-panel {
  padding-left: var(--space-5);
}

/* The expand marker (review 2026-10, SE-13): a plus that becomes a minus, drawn once and
   bound to aria-expanded — on the mobile menu's group buttons and on a template's own
   toggle that carries `base-expand` (a side tree's folded branch). A link has none: the
   marker is what tells a button that opens a list from a row that goes somewhere. Without
   scripts the groups are open and their buttons inert (html:not(.js)): no marker. */
.mobile-about-toggle::after,
.base-expand::after {
  content: '';
  flex: none;
  width: 12px;
  height: 12px;
  margin-left: auto;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: background-size var(--transition-fast);
}

.mobile-about-toggle[aria-expanded='true']::after,
.base-expand[aria-expanded='true']::after {
  background-size:
    100% 2px,
    0 0;
}

html:not(.js) .mobile-about-toggle::after {
  display: none;
}

.mobile-about-panel[hidden] {
  display: none;
}

.mobile-important {
  color: var(--toplink-on-light, var(--accent));
}

/* ---------- the announcement strip ---------- */

.announcement {
  background: var(--chrome-tint);
  border-bottom: 1px solid var(--chrome-tint-line);
  color: var(--ink);
}

.announcement--alert {
  border-left: 6px solid var(--error);
}

.announcement-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: baseline;
  padding-block: var(--space-3);
  font-weight: 600;
}

.announcement-icon {
  color: var(--accent);
}

.announcement--alert .announcement-icon {
  color: var(--error);
}

/* The icon stays beside the first line: a long text may take the line's width less the icon's and
   wraps inside it, instead of dropping under a lone icon. */
.announcement-icon {
  flex: none;
}

.announcement-inner > [data-announcement-text] {
  max-width: calc(100% - 2em - var(--space-3));
}

/* The strip's link: after the text, 24 px tall (it is not inside a sentence), underlined; on a phone it
   takes the line under the text. At any width it drops to its own line, and a long label wraps, when it
   does not fit beside the text. */
.announcement-inner > * {
  min-width: 0;
}

.announcement-inner .announcement-link {
  display: inline-flex;
  flex: 0 1 auto;
  max-width: 100%;
  overflow-wrap: break-word;
  align-items: center;
  min-height: 24px;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* ---------- a page inside a dropdown: the section's menu on the left ---------- */

.base-with-nav {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: var(--space-8);
  align-items: start;
  padding-block: var(--space-8) 0;
}

.base-with-nav-main > .container,
.base-with-nav-main .container {
  max-width: none;
  padding-inline: 0;
}

.base-with-nav-main .base-page {
  padding-top: 0;
}

.section-nav {
  border-top: 3px solid var(--blue);
  padding-top: var(--space-3);
}

.section-nav-title {
  font-weight: 800;
  color: var(--ink);
  margin-bottom: var(--space-2);
}

.section-nav ul {
  list-style: none;
}

.section-nav a {
  display: block;
  padding: 8px 10px;
  border-left: 3px solid transparent;
  color: var(--body);
  font-size: var(--fs-nav-side);
}

.section-nav a:hover,
.section-nav a.active {
  border-left-color: var(--accent);
  color: var(--accent);
  background: var(--chrome-tint);
}

@media (max-width: 899px) {
  .base-with-nav {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-5);
    padding-top: var(--space-5);
  }

  .section-nav ul {
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
  }

  .section-nav a {
    white-space: nowrap;
    border-left: 0;
    border-bottom: 3px solid transparent;
  }

  .section-nav a.active {
    border-bottom-color: var(--accent);
  }
}

/* ---------- an info page's opening ---------- */

.base-opening {
  background: var(--chrome-tint);
  border-bottom: 1px solid var(--chrome-tint-line);
  color: var(--ink);
}

.base-opening-inner {
  display: grid;
  gap: var(--space-8);
  align-items: center;
  padding-block: var(--space-8);
}

.base-opening--photo .base-opening-inner {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.base-opening-title {
  margin-bottom: var(--space-3);
}

.base-opening-counters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin-top: var(--space-3);
}

.base-opening-counter {
  color: var(--accent);
  text-decoration: underline;
}

.base-opening-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-media);
}

@media (max-width: 899px) {
  .base-opening--photo .base-opening-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- the home page's blocks ---------- */

.base-block {
  padding-block: var(--space-8);
}

.base-block + .base-block {
  border-top: 1px solid var(--line);
}

.base-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2) var(--space-5);
  margin-bottom: var(--space-5);
}

.base-block-title {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: var(--ls-heading);
  color: var(--ink);
}

.base-hero {
  background: var(--chrome-tint);
  border-bottom: 1px solid var(--chrome-tint-line);
}

.base-hero-inner {
  display: grid;
  gap: var(--space-8);
  align-items: center;
  padding-block: var(--space-10);
}

.base-hero--photo .base-hero-inner {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}

.base-hero-title {
  font-size: clamp(34px, 5vw, var(--fs-h1));
  line-height: var(--lh-h1);
  letter-spacing: var(--ls-heading);
  color: var(--ink);
  overflow-wrap: break-word;
}

.base-hero-tagline {
  margin-top: var(--space-4);
  font-size: var(--fs-tagline);
  line-height: 1.4;
  color: var(--body);
}

.base-hero-lead {
  margin-top: var(--space-4);
  max-width: 60ch;
}

.base-hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-media);
}

@media (max-width: 899px) {
  .base-hero--photo .base-hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .base-hero-inner {
    padding-block: var(--space-8);
  }
}

/* Cards: posts, albums, related posts. The title's link covers the card. */
.base-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: var(--space-7);
  list-style: none;
}

.base-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.base-card-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.base-card-body {
  padding: var(--space-4) var(--space-5) var(--space-5);
}

.base-card-title {
  font-size: var(--fs-card-title);
  line-height: 1.3;
  color: var(--ink);
  overflow-wrap: break-word;
}

.base-card-link {
  color: var(--ink);
  text-decoration: none;
}

.base-card-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.base-card .base-card-link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.base-card:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.base-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: var(--space-4);
  list-style: none;
}

.base-tile {
  position: relative;
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: var(--radius);
}

.base-tile--accent {
  border-top-color: var(--accent);
}

.base-tile-link {
  display: block;
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
}

.base-tile-link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.base-tile-note {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--fs-meta-lg);
  color: var(--muted);
}

.base-feature {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--space-7);
  align-items: center;
}

.base-feature-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-media);
}

@media (max-width: 767px) {
  .base-feature {
    grid-template-columns: minmax(0, 1fr);
  }
}

.base-agenda {
  display: grid;
  gap: var(--space-4);
  list-style: none;
}

.base-agenda-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
}

.base-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: var(--space-2);
  border: 2px solid var(--blue);
  color: var(--blue);
  line-height: 1.1;
  text-align: center;
}

.base-date-day {
  font-size: 26px;
  font-weight: 800;
}

.base-date-month {
  font-size: var(--fs-meta-sm);
  font-weight: 700;
  text-transform: uppercase;
}

.base-quick {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
  gap: var(--space-3);
  list-style: none;
}

.base-quick-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 60px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 600;
}

.base-quick-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.base-quick-icon {
  flex: none;
  width: 26px;
  height: 26px;
  color: var(--accent);
}

.base-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
  gap: var(--space-5);
  list-style: none;
}

.base-figure {
  display: flex;
  flex-direction: column;
}

.base-figure-value {
  font-family: var(--font-heading);
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  color: var(--blue);
}

.base-figure-label {
  color: var(--body);
}

/* «Партнери»: a grid of equal columns — two on a phone, one where even two
   would not fit (320 px, a zoomed narrow window), as many as fit from 900 px.
   Every item starts at the top of its row: the logo in a slot of a fixed
   height, centred in it, and the name in its own row under it, so a long
   name grows its item downward and never moves its logo. */
.base-logos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
  gap: var(--space-6) var(--space-5);
  align-items: start;
  list-style: none;
}

@media (min-width: 900px) {
  .base-logos {
    grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
  }
}

.base-logo {
  min-width: 0;
}

.base-logo-link {
  display: block;
}

.base-logos .partner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}

.partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
}

.partner-logo img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.base-logos .partner-name {
  max-width: none;
  overflow-wrap: break-word;
}


/* Partners: the name under the logo, so it stays when the logo does not load. */
.partner {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  max-width: 100%;
  text-align: center;
}

.partner-name {
  max-width: 180px;
  font-size: var(--fs-nav);
  line-height: 1.3;
  overflow-wrap: break-word;
}

.base-banner {
  display: grid;
  gap: var(--space-7);
  align-items: center;
  padding: var(--space-7);
  background: var(--chrome-tint);
  border: 1px solid var(--chrome-tint-line);
  border-radius: var(--radius);
}

.base-banner--image {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

.base-banner-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-media);
}

@media (max-width: 899px) {
  .base-banner--image {
    grid-template-columns: minmax(0, 1fr);
  }
}

.base-contacts {
  display: grid;
  gap: var(--space-8);
}

/* The text of «Контакти» (its «Текст» tab) stands above the contacts. */
.base-contacts-text {
  margin-bottom: var(--space-8);
}

.base-contacts--map {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
}

@media (max-width: 899px) {
  .base-contacts--map {
    grid-template-columns: minmax(0, 1fr);
  }
}

.base-facts {
  display: grid;
  gap: var(--space-3);
}

.base-fact dt {
  font-size: var(--fs-meta-lg);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.base-fact dd {
  color: var(--ink);
}

.base-fact a,
.base-contact-lines a {
  color: var(--accent);
}

/* A footer number stays whole: after its label it moves to the next line, never breaks at a hyphen. */
.site-footer .base-contact-lines a[href^='tel:'] {
  white-space: nowrap;
}

/* A phone or an e-mail in the page body is a link by more than its colour; the top line and the
   footers (outside main) keep their own rules. */
main .base-fact a,
main .base-contact-lines a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.base-map iframe {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
}

.base-map-links {
  margin-top: var(--space-2);
  font-size: var(--fs-meta-lg);
}

.base-map-links a {
  color: var(--accent);
  text-decoration: underline;
}

/* ---------- documents ---------- */

.base-doc-list {
  list-style: none;
  border-top: 1px solid var(--line);
}

/* One column in every row: the title across the row's full width, the grey meta line under it
   (wrapping like text), then the signature line. Short and long rows are laid out the same. */
.base-doc {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  gap: var(--space-1);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
}

/* The title and the «Підписано» mark after it are one grid item, so the mark follows the title; the
   signature line is a row of its own under the meta. */
.base-doc-head {
  min-width: 0;
}

.base-doc > .doc-protection {
  justify-self: stretch;
  margin-top: 0;
}

.base-doc-link {
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: break-word;
}

.base-doc-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.base-doc-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: var(--space-6);
  margin-top: var(--space-6);
}

.base-doc-group-title {
  font-size: 17px;
  color: var(--ink);
  margin-bottom: var(--space-2);
}

.base-link-list {
  list-style: none;
}

.base-link-list li + li {
  margin-top: var(--space-1);
}

.base-link-list a {
  color: var(--accent);
  text-decoration: underline;
}

/* The page a document of the documents collection hangs on (story 26). */
.base-doc-page {
  color: inherit;
  text-decoration: underline;
}

.base-doc-page:hover {
  color: var(--accent);
}

/* ---------- the two collections (story 26) ---------- */

.base-collection-intro {
  margin-bottom: var(--space-6);
}

/* The filters: a plain GET form (partials/collection-filters), its fields
   side by side while they fit. */
.base-collection-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
  padding: var(--space-5);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.base-collection-filter {
  flex: 0 1 220px;
  min-width: 0;
}

.base-collection-filter--wide {
  flex: 1 1 260px;
}

.base-collection-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

/* The sentence under the filters that says «Сторінка» was reset because the chosen «Тип» has no
   document on it; empty (and out of the way) when nothing was dropped. */
.base-collection-note {
  margin: calc(-1 * var(--space-2)) 0 var(--space-4);
  color: var(--ink);
  font-size: var(--fs-meta-lg);
  font-weight: 600;
}

.base-collection-note:empty {
  display: none;
}

.base-collection-reset {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}

.base-collection-result {
  margin-bottom: var(--space-4);
  color: var(--muted);
}

/* The page an album comes from, on the albums collection. */
.base-card-source {
  margin-top: var(--space-1);
}

/* The «Фотоальбоми» and «Люди» chapters of a page (story 26). */
.chp-albums,
.chp-people {
  margin-top: var(--space-5);
}

@media (max-width: 899px) {
  .base-collection-filter,
  .base-collection-filter--wide {
    flex: 1 1 100%;
  }
}

/* ---------- filters: chips shared by feeds and the calendar ---------- */

.base-filters {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-button);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-nav);
  text-decoration: none;
  cursor: pointer;
}

.filter-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-chip.is-active {
  background: var(--brand-ground);
  border-color: var(--brand-ground);
  color: var(--paper);
}

/* ---------- feeds and rows ---------- */

.base-lead-story {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-7);
  align-items: center;
  padding-bottom: var(--space-7);
  border-bottom: 1px solid var(--line);
}

.base-lead-story--photo {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}

.base-lead-story-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-media);
}

.base-lead-story-title {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  margin-bottom: var(--space-2);
  overflow-wrap: break-word;
}

@media (max-width: 899px) {
  .base-lead-story--photo {
    grid-template-columns: minmax(0, 1fr);
  }
}

.base-rows {
  list-style: none;
}

.base-row {
  display: flex;
  gap: var(--space-5);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--line);
}

.base-row-media {
  flex: none;
  width: 200px;
}

.base-row-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-media);
}

.base-row-title {
  font-size: 20px;
  line-height: 1.3;
  margin: var(--space-1) 0;
  overflow-wrap: break-word;
}

.base-row-title .base-card-link {
  color: var(--ink);
}

.base-row-summary {
  color: var(--body);
}

@media (max-width: 599px) {
  .base-row-media {
    width: 96px;
  }

  .base-row-title {
    font-size: 17px;
  }
}

.base-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
  margin: var(--space-6) 0;
}

.base-pagination-link {
  font-weight: 700;
  color: var(--accent);
  text-decoration: underline;
}

.base-pagination-status {
  color: var(--muted);
}

/* ---------- a post ---------- */

.base-progress {
  display: none;
}

.has-reading-progress .base-progress {
  display: block;
  position: fixed;
  inset: 0 0 auto;
  z-index: 1200;
  height: 4px;
  pointer-events: none;
}

.base-progress-bar {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.base-article {
  max-width: 860px;
}

.base-article-head {
  margin-bottom: var(--space-6);
}

.base-byline a {
  color: var(--accent);
  text-decoration: underline;
}

.base-byline {
  color: var(--body);
  margin-top: var(--space-2);
}

.base-article-cover {
  margin: 0 0 var(--space-7);
}

.base-article-cover img {
  width: 100%;
  border-radius: var(--radius-media);
  cursor: zoom-in;
}

.base-article-body {
  font-size: 18px;
}

.base-article-foot {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}

.base-related {
  margin-top: var(--space-8);
}

.news-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.news-share-label {
  font-weight: 700;
  color: var(--ink);
  margin-right: var(--space-2);
}

.news-share-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-button);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-nav);
  cursor: pointer;
}

.news-share-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.news-share-link svg {
  width: 18px;
  height: 18px;
}

/* Authors under a post (#188) and an author's page. */
.news-section-title {
  font-size: 22px;
  color: var(--ink);
  margin-bottom: var(--space-4);
}

.author-cards {
  margin-top: var(--space-8);
}

.author-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: var(--space-5);
}

.author-card {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.author-card-name {
  font-size: 18px;
  color: var(--ink);
}

.author-card-link {
  color: var(--ink);
  text-decoration: underline;
}

.author-card-sign,
.author-card-more {
  font-size: var(--fs-meta-lg);
  color: var(--muted);
}

.author-card-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.author-card-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.author-role {
  font-size: var(--fs-meta-sm);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
}

.author-av {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--chrome-tint);
  color: var(--ink);
  font-weight: 800;
  vertical-align: middle;
}

.author-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-av--xs {
  width: 24px;
  height: 24px;
  font-size: 10px;
}

.author-av--hero {
  width: 120px;
  height: 120px;
  font-size: 36px;
}

.base-author {
  display: flex;
  gap: var(--space-6);
  align-items: flex-start;
  margin-bottom: var(--space-6);
}

@media (max-width: 599px) {
  .base-author {
    flex-direction: column;
  }
}

.news-arrow {
  width: 14px;
  height: 14px;
  flex: none;
}

/* ---------- people ---------- */

.base-banner-photo img {
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: var(--space-6);
  border-radius: var(--radius-media);
}

.base-people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: var(--space-5);
  list-style: none;
  margin: var(--space-6) 0;
}

.base-person {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.base-person-photo {
  flex: none;
  width: 96px;
}

.base-person-photo img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: var(--radius-media);
}

.base-person--lead {
  margin-bottom: var(--space-6);
  align-items: center;
}

.base-person--lead .base-person-photo,
.base-person--lead .base-person-photo img {
  width: 140px;
  height: 140px;
}

.base-person-name {
  font-size: 19px;
  line-height: 1.25;
  color: var(--ink);
}

.base-person-role {
  color: var(--body);
}

.base-person-bio {
  margin-top: var(--space-2);
  color: var(--body);
}

/* The director's card and a photo placeholder inside the chapter layout. */
.director-card {
  display: flex;
  gap: var(--space-5);
  align-items: center;
  margin-bottom: var(--space-6);
}

.director-photo {
  width: 140px;
  height: 140px;
  overflow: hidden;
  flex: none;
}

.director-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.director-name {
  font-size: 22px;
  color: var(--ink);
}

.photo-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--muted);
}

/* ---------- gallery ---------- */

.base-cards--albums {
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
}

/* ---------- the chapter layout of an info page (#183) ---------- */

.section-page {
  padding-block: var(--space-8) var(--space-10);
}

.chp-bar {
  position: sticky;
  top: var(--menu-row, 0px);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-7);
  padding-block: var(--space-2);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.chp-bar-label {
  font-size: var(--fs-meta-sm);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}

.chp-bar-list {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  list-style: none;
}

.chp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-button);
  color: var(--ink);
  white-space: nowrap;
}

.chp-chip.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--paper);
}

.chp-chip-count {
  font-size: 14px;
}

.chp {
  margin-bottom: var(--space-9);
  scroll-margin-top: 72px;
}

/* What a link, the bar or the keyboard reaches stops below whatever sticks: the row and the bar from 900 px, the bar
   alone where no row sticks (below 900 px, a compact header). public/js/menu-stick.js keeps --menu-below equal to
   that height; without the script the room is the margin alone. The room is a margin on the targets, not a padding
   of the window: a padding also holds for a link of the stuck row, of the bar and of the side list, and pulls the
   page up when one of them takes the focus. The announcement and the service links stand outside <main>, under the
   stuck row too. */
:root
  :where(main, footer, .announcement, .services)
  :where(a, button, input, select, textarea, summary, [tabindex], [id], h2, h3):where(
    :not(.chp-bar *, [data-section-nav] *, .portal-section *, .chp, .album-stage, .album--matrix)
  ) {
  scroll-margin-top: calc(var(--menu-below, 0px) + var(--space-2));
}

/* The top menu's row stays in sight from 900 px: public/js/menu-stick.js sets the class and the three
   lengths on <html> (--menu-up: what stands above the row; --menu-row: its height; --menu-below: the row
   and the chapter bar). The header sticks higher by --menu-up, so only the row stays. A chapter, an
   anchor and a focused link stop below the row and the bar. */
@media (min-width: 900px) {
  :root.has-sticky-menu .site-header {
    position: sticky;
    top: calc(-1 * var(--menu-up));
    z-index: 60;
  }

  /* The bar and the side list stand under the row while they stick, so their links need the row's height alone:
     no pull while they stick, and a link that has slid under the row at the end of its column comes back out. */
  :root.has-sticky-menu
    :where(.chp-bar, [data-section-nav], .portal-section)
    :where(a, button, summary) {
    scroll-margin-top: var(--menu-row);
  }

  :root.has-sticky-menu .chp,
  :root.has-sticky-menu .album-stage,
  :root.has-sticky-menu .album--matrix {
    scroll-margin-top: calc(var(--menu-below) + var(--space-4));
  }

  /* A field of the contact form reached by focus — from the refused form's error list or by the form's own check —
     stops with its label and the field above it in sight, not under the row. */
  :root.has-sticky-menu [data-contact-form] .form-group :is(input, textarea) {
    scroll-margin-top: calc(var(--menu-below) + 6em);
  }

  /* A dropdown of the stuck row never runs past the window's bottom: it scrolls inside itself. */
  :root.has-sticky-menu .base-nav-panel {
    box-sizing: border-box;
    max-height: calc(100vh - var(--menu-row, 0px) - 8px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

.chp-head {
  display: flex;
  gap: var(--space-4);
  align-items: baseline;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--ink);
}

/* A title with a long word wraps inside the row instead of widening it. */
.chp-head-copy {
  min-width: 0;
}

.chp-num {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
}

.chp-title {
  font-size: 26px;
  color: var(--ink);
}

.chp-meta {
  font-size: var(--fs-meta-lg);
  color: var(--muted);
}

.chp-text-body,
.director-text {
  max-width: 72ch;
}

.chp-text-body > * + *,
.director-text > * + * {
  margin-top: var(--space-4);
}

.chp-news-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.chp-years {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chp-year,
.chp-report-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.chp-year.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--paper);
}

.chp-report-link svg {
  width: 16px;
  height: 16px;
}

.chp-years-single {
  color: var(--muted);
}

/* A column narrower than one card («Зошит» at 320 px leaves 218 px) holds one card at its width. */
.chp-news-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: var(--space-5);
  list-style: none;
}

.chp-news-list > li {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.chp-news-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.news-frame {
  display: block;
}

.chp-news-copy {
  padding: var(--space-4);
}

.chp-news-date {
  display: block;
  font-size: var(--fs-meta-lg);
  color: var(--muted);
}

.chp-news-day::after {
  content: ' ';
}

.chp-news-title {
  font-size: 18px;
  line-height: 1.3;
}

.chp-news-link {
  color: var(--ink);
}

.chp-news-link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.chp-news-summary {
  margin-top: var(--space-2);
  color: var(--body);
}

/* Every card shows its summary: three lines at most beside the photo. */
.chp-news:not(.is-featured) .chp-news-summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.chp-news-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--space-2);
  color: var(--accent);
  font-weight: 700;
}

.chp-news-foot {
  margin-top: var(--space-5);
}

.news-flag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--accent);
  color: var(--paper);
  font-size: var(--fs-meta-sm);
  font-weight: 700;
  text-transform: uppercase;
}

.chp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 8px 18px;
  border: 2px solid var(--blue);
  background: var(--paper);
  color: var(--blue);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.chp-btn[hidden] {
  display: none;
}

.chp-docs {
  list-style: none;
  border-top: 1px solid var(--line);
}

.chp-doc {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
}

.chp-doc[hidden] {
  display: none;
}

.chp-doc-type {
  flex: none;
  min-width: 48px;
  padding: 4px 6px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: var(--fs-meta-sm);
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.chp-doc-copy {
  flex: 1;
  min-width: 0;
}

.chp-doc-link {
  font-weight: 600;
  color: var(--ink);
}

.chp-doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--fs-meta-lg);
  color: var(--muted);
}

.chp-doc-dl svg,
.chp-icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

/* ---------- the calendar (partials/events-days) ---------- */

.base-events {
  margin-top: var(--space-6);
}

.events-day {
  margin-bottom: var(--space-5);
}

.events-day-title {
  font-size: 18px;
  color: var(--ink);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--space-3);
}

.events-list {
  list-style: none;
  display: grid;
  gap: var(--space-3);
}

.events-item-title {
  font-size: 18px;
}

.events-item-title a {
  color: var(--ink);
  text-decoration: underline;
}

.events-item-meta {
  font-size: var(--fs-meta-lg);
  color: var(--muted);
}

.events-item-summary {
  color: var(--body);
}

/* ---------- search results ---------- */

.base-result-list {
  list-style: none;
}

.base-result {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--line);
}

.base-result-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: underline;
}

.base-result-snippet {
  color: var(--body);
}

.base-result mark {
  background: var(--accent);
  color: var(--paper);
}

/* ---------- forms: contacts, the contact result ---------- */

.base-form {
  display: grid;
  gap: var(--space-4);
  max-width: 640px;
}

.form-group {
  display: grid;
  gap: var(--space-1);
}

.form-group label {
  font-weight: 600;
  color: var(--ink);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.form-group .is-invalid {
  border-color: var(--error);
  border-width: 2px;
}

.field-error {
  color: var(--error);
  font-weight: 600;
  font-size: var(--fs-meta-lg);
}

.field-error[hidden] {
  display: none;
}

.honeypot-field {
  position: absolute;
  left: -10000px;
  top: -10000px;
}

.draft-preview-banner {
  margin-bottom: var(--space-5);
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--accent);
  background: var(--chrome-tint);
  color: var(--ink);
  font-weight: 600;
}

.contact-result {
  padding-block: var(--space-8) var(--space-10);
}

.contact-result-message {
  margin-bottom: var(--space-5);
}

/* The box of a refused or failed send: the heading, what happened and, for a
   refused form, the fields to fix. It takes the focus when the page opens. */
.contact-result-errors {
  margin-bottom: var(--space-6);
  padding-left: var(--space-4);
  border-left: 3px solid var(--error);
}

.contact-result-errors ul {
  margin: 0 0 var(--space-4);
  padding-left: var(--space-5);
}

/* The links of the box and of the way out are told from the text by more than colour. */
.contact-result :is(.contact-result-errors, .contact-result-reach) a {
  text-decoration: underline;
}

.contact-result-reach {
  margin-bottom: var(--space-6);
}

/* The focus ring stands clear of the box's own edge. */
.contact-result-errors:focus {
  outline-offset: var(--space-2);
}

/* A link in the box keeps the field's label in view. */
.contact-result .form-group :is(input, textarea) {
  scroll-margin-top: 3em;
}

/* «Панорама»'s own button classes, used by the pages that moved to _base
   unchanged (contact-result, section-report, contact-block). */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border: 2px solid var(--blue);
  font: inherit;
  font-size: var(--fs-button);
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  background: var(--blue);
  color: var(--paper);
}

.btn-outline {
  background: transparent;
  color: var(--blue);
}

.text-page-contact {
  display: grid;
  gap: var(--space-2);
  justify-items: start;
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}

.text-page-contact a:not([class]) {
  color: var(--accent);
  text-decoration: underline;
}

/* ---------- /prozorist and the printable report ---------- */

.transparency-page {
  padding-block: var(--space-8) var(--space-10);
}

.transparency-lead {
  max-width: 72ch;
  color: var(--body);
  margin-bottom: var(--space-5);
}

.transparency-list {
  padding-left: 1.4em;
}

.transparency-item {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
}

.transparency-link {
  font-weight: 700;
  color: var(--accent);
  text-decoration: underline;
}

.transparency-meta {
  font-size: var(--fs-meta-lg);
  color: var(--muted);
}

.section-report {
  padding-block: var(--space-8) var(--space-10);
}

.section-report-back a {
  color: var(--accent);
}

.section-report-kicker {
  font-size: var(--fs-meta-lg);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
}

.section-report-title {
  font-size: 34px;
  color: var(--ink);
}

.section-report-year {
  color: var(--muted);
}

.section-report-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  margin: var(--space-5) 0;
}

.section-report-table {
  overflow-x: auto;
}

.section-report-table table {
  width: 100%;
  border-collapse: collapse;
}

.section-report-table th,
.section-report-table td {
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  text-align: left;
  vertical-align: top;
}

.section-report-date {
  white-space: nowrap;
}

.section-report-link a {
  color: var(--accent);
  overflow-wrap: break-word;
}

/* ---------- the footer ---------- */

.base-footer {
  margin-top: var(--space-10);
  background: var(--chrome-bar);
  color: var(--chrome-bar-ink);
}

.base-footer a {
  color: var(--chrome-bar-strong);
}

.base-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: var(--space-7);
  padding-block: var(--space-9);
}

.base-footer-name {
  font-weight: 800;
  font-size: 18px;
  color: var(--chrome-bar-strong);
  margin-bottom: var(--space-2);
}

.base-footer-tagline {
  margin-top: var(--space-2);
}

.base-footer-title {
  font-size: var(--fs-meta-lg);
  font-weight: 700;
  letter-spacing: var(--ls-overline);
  text-transform: uppercase;
  color: var(--chrome-bar-strong);
  margin-bottom: var(--space-3);
}

.base-footer-links {
  list-style: none;
}

.base-footer-links li + li {
  margin-top: var(--space-1);
}

.base-footer-links a,
.base-footer-cta {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.base-contact-lines {
  list-style: none;
}

.base-footer-contacts li + li {
  margin-top: var(--space-1);
}

.base-footer .base-contact-label {
  color: var(--chrome-bar-ink);
}

.base-footer-cta {
  font-weight: 700;
}

.base-footer-bottom {
  padding-block: var(--space-4);
  border-top: 1px solid var(--chrome-bar-line);
  font-size: var(--fs-meta-lg);
}

.base-topline-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-5);
}

.base-topline .base-contact-label {
  opacity: 0.85;
}

/* The social icons (partials/social-icons), wherever a template puts them. */
.chrome-social {
  display: flex;
  gap: var(--space-2);
  margin-block: var(--space-3);
}

.chrome-social a {
  display: inline-flex;
  width: 32px;
  height: 32px;
}

.chrome-social svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* Contact lines on the dark bands keep the bands' own link colour. */
.base-topline .base-contact-lines a,
.base-footer .base-contact-lines a {
  color: var(--chrome-bar-strong);
}

/* A block whose heading stands alone (no «all …» link beside it). */
.base-block > .base-block-title {
  margin-bottom: var(--space-5);
}

/* «Нижній колонтитул: Світлий» of «Оформлення». */
.theme-footer-light .base-footer {
  background: var(--chrome-tint);
  border-top: 1px solid var(--chrome-tint-line);
  color: var(--body);
}

.theme-footer-light .base-footer a,
.theme-footer-light .base-footer .base-contact-lines a,
.theme-footer-light .base-footer-name,
.theme-footer-light .base-footer-title,
.theme-footer-light .base-footer .base-contact-label {
  color: var(--ink);
}

.theme-footer-light .base-footer-bottom {
  border-top-color: var(--chrome-tint-line);
}

/* ---------- shared fixes (QA, 2026-10) ----------
   Every template that keeps `_base`'s markup picks these up; a template's
   own stylesheet loads after this one and still has the last word. */

/* .link-cue — the contract every template keeps (docs/dev/templates.md):
   a link whose own text names where it leads — «Усі …», a document, a
   document section or a page, the section nav, an event, a post, an album,
   a search result — answers the pointer and the keyboard alike: the accent
   and a thicker underline, never the colour alone; the focus ring of
   base.css comes on top. A template's own markup opts in by the class. */
.link-cue:hover,
.link-cue:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.base-doc-group-title a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* «Партнери»: with a link, the name (.partner-name) is in the text colour
   and takes the links' hover/focus cue. */
.base-logo-link {
  color: var(--ink);
  text-decoration: none;
}

.base-logo-link:hover .partner-name,
.base-logo-link:focus-visible .partner-name {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

/* A dropdown opens under its own item, from its left edge (mega-menu.js
   still shifts it back inside the window), and a page named like the
   dropdown heads the panel as its overview, set apart by a rule. */
.base-nav-panel {
  left: 0;
  translate: var(--mega-shift, 0px) 0;
}

.base-nav-panel .base-nav-overview {
  margin-bottom: var(--space-1);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 800;
}

/* The labels of the contacts («Адреса», «Телефон») and of an event («Коли»,
   «Де»): sentence case in the text colour, set apart by weight alone — no
   grey tracked capitals, which read as faint at this size. */
.base-fact dt {
  color: var(--ink);
  font-size: var(--fs-nav-side);
  letter-spacing: 0;
  text-transform: none;
}

.base-topline .base-contact-label {
  opacity: 1;
  font-weight: 600;
}

/* No scripts: the desktop dropdown opens on hover and on keyboard focus, in
   every template over this menu (partials/main-nav). With scripts the `js`
   class is on <html> and mega-menu.js does it, as before. The bridge keeps the
   hover across a template's gap between the item and its panel. */
html:not(.js) .mega-menu-wrap:hover > .base-nav-panel[hidden],
html:not(.js) .mega-menu-wrap:focus-within > .base-nav-panel[hidden] {
  display: flex;
}

html:not(.js) .mega-menu-wrap > .base-nav-panel::before {
  content: '';
  position: absolute;
  inset: auto 0 100%;
  height: 8px;
}

/* ---------- the first screen on a phone: the name once, one line of announcement ----------
   At 480 px and below a hero title that only restates the school's name (partials/home/
   hero-title) shows the short name at one line's size — the header already names
   the school — and announcement.js clamps the strip to one line with «…» and a
   «Читати» button that opens the rest. Wider, nothing changes. */

.hero-title-short {
  display: none;
}

@media (max-width: 480px) {
  .hero-title-full {
    display: none;
  }

  .hero-title-short {
    display: block;
    font-size: var(--fs-h2-phone);
    line-height: 1.15;
    overflow-wrap: break-word;
  }

  .announcement-inner {
    flex-wrap: wrap;
  }

  .announcement-inner .announcement-link {
    flex: 0 1 auto;
    flex-basis: 100%;
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .announcement--short .announcement-inner {
    align-items: center;
  }

  /* A closed, clamped strip shows one cue, «Читати»; the link comes with the opened text. */
  .announcement--short:not(.announcement--open) .announcement-link {
    display: none;
  }

  .announcement--short:not(.announcement--open) .announcement-text {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .announcement-more {
    flex: none;
    min-height: 24px;
    padding: 0 var(--space-1);
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-size: var(--fs-nav-side);
    text-decoration: underline;
    text-underline-offset: 0.15em;
    cursor: pointer;
  }
}

/* The keyboard focus ring from the token: the same ring as base.css, and a rule with a class in
   front of it still wins. The fallback keeps the ring when tokens.css is an older copy. */
:focus-visible {
  outline: var(--focus-ring, 2px solid var(--accent));
  outline-offset: 2px;
}

/* The album's source line the way back already names (partials/album-source): hidden, kept for
   the viewer, whatever display a template gives its class. */
.album-source[hidden] {
  display: none;
}

/* An album slide after the first has no file until the frame is about to show it
   (partials/album, public/js/album.js): until then it is a blank frame, not the
   alt text of a picture that is not there. Only once the script runs (album--ready):
   without it the stage clips those slides anyway, and their frame links keep the
   photo's alt text as their name. */
.album--ready .album-img:not([src]) {
  visibility: hidden;
}

/* The no-media states: a person without a photo and a post without a cover keep their media column
   (a quiet tinted tile on the chrome tokens, so the text of every card and every row starts at the
   same x); a lead story without a cover is a deliberate text-only block with an accent rule. */
.base-person-photo--blank {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 96px;
  background: var(--chrome-tint);
  border: 1px solid var(--chrome-tint-line);
  border-radius: var(--radius-media);
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
}

.base-person--lead .base-person-photo--blank {
  font-size: 52px;
}

.base-row-blank {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  background: repeating-linear-gradient(
    135deg,
    var(--chrome-tint) 0 14px,
    var(--chrome-tint-line) 14px 28px
  );
  border-radius: var(--radius-media);
}

.base-lead-story:not(.base-lead-story--photo) .base-lead-story-copy {
  max-width: 46rem;
  padding-left: var(--space-5);
  border-left: 4px solid var(--accent);
}

:root[data-theme='low-vision'] .base-row-blank {
  background-image: none;
  border: 1px solid var(--chrome-tint-line);
}

/* On paper the section menu is hidden (base.css), so its column goes too. */
@media print {
  .base-with-nav {
    display: block;
  }

  /* The printed yearly list: titles take the room, the addresses a narrow column that wraps. */
  .section-report-table table {
    table-layout: fixed;
  }

  .section-report-table th:nth-child(1) {
    width: 6%;
  }

  .section-report-table th:nth-child(2) {
    width: 15%;
  }

  .section-report-table th:nth-child(3) {
    width: 41%;
  }

  .section-report-table th:nth-child(4) {
    width: 14%;
  }

  .section-report-table th:nth-child(5) {
    width: 24%;
  }
}

/* ---------- the photo style (growth story 72, S14b) ----------
   «Оформлення фото» of a post's cover and a page's header photo: the class
   photo-style--<value> sits on the element that holds the photo alone (never on
   a figure with its caption). 'frame': an inset border of the accent colour;
   'tint': a layer of the primary colour at 18 % multiplied over the photo;
   'duotone' (kept for later, the panel does not offer it): grey under the tint.
   The layer is a ::after that catches no clicks (the photo still opens in the
   viewer) and takes the corners of the box it covers (border-radius: inherit),
   so a box whose photo carries the media radius clips to it. The frame is
   --photo-frame wide: 6 px, 3 px on a thumbnail. A template refines these in its
   own folder where its idea calls for it. Low vision shows the photo as it is. */
:where(.photo-style--frame, .photo-style--tint, .photo-style--duotone) {
  position: relative;
}

.photo-style--frame::after,
.photo-style--tint::after,
.photo-style--duotone::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

/* The boxes whose photo carries the media radius itself: the box takes it and
   clips, so the layer's corners are the photo's. */
:where(.base-lead-story-media)[class*='photo-style--'],
:where(.base-opening-media)[class*='photo-style--'],
:where(.base-row-media)[class*='photo-style--'],
:where(.base-person-photo)[class*='photo-style--'],
:where(.base-banner-photo)[class*='photo-style--'],
:where(.base-article-cover > div)[class*='photo-style--'] {
  border-radius: var(--radius-media);
  overflow: clip;
}

/* A card's photo is clipped by the card: rounded at the top, square below. */
.base-card-media[class*='photo-style--'] {
  border-radius: var(--radius) var(--radius) 0 0;
}

.base-row-media {
  --photo-frame: 3px;
}

.photo-style--frame::after {
  box-sizing: border-box;
  border: var(--photo-frame, 6px) solid var(--accent);
}

.photo-style--tint::after,
.photo-style--duotone::after {
  background: var(--blue);
  opacity: 0.18;
  mix-blend-mode: multiply;
}

.photo-style--duotone img {
  filter: grayscale(1);
}

/* A row's media box stretches to the row's height (a long title on a phone):
   styled, it keeps to the photo, or the layer covers the empty space below it. */
.base-row-media[class*='photo-style--'] {
  align-self: flex-start;
}

/* No filter of its own here: the photo stays grey like every other picture in
   this mode (base.css), and duotone is that same grey. */
:root[data-theme='low-vision'] [class*='photo-style--']::after {
  display: none;
}

/* css/templates/vizytivka/vizytivka.css */
/* «Візитівка» — the look «Панорама» had before its rework of 2026-10, drawn on today's contracts
   (`_base` and base-template.css, the shared partials, tokens only). In page order: a dark strip with
   the contacts above a light header (the logo, the menu, the search as a magnifier, the highlighted item
   as a button; a low header with the «Меню» button under 600 px); the announcement as a band; the first
   screen on the full width, where the colour of the school fades into the photo under the name in large
   white capitals (a short window gets a tighter one); the home page's blocks; the dark footer (light by
   `theme-footer-light`); the band every inner page opens with (an info page's opening, a post's head,
   the pieces of the plain heading of any other page), the feed's front and the section's menu; last the
   cards and lists the inner pages keep from `_base`, dressed square. Square corners, no shadows, the
   primary colour for rules and figures, the accent for links. Every colour is a token: the primary bands
   are `--chrome-bar` with `--chrome-bar-strong` on them (black and white in the low-vision mode, where an
   edge in `--chrome-bar-line` or `--line` turns yellow); the filled buttons are `--blue` on `--paper`, and inside the page `--blue` is `--brand-ground`
   (the first rule below). */

/* The grounds. Every colour ground of the template — the strip, the first screen, the page band, the album
   cover, the dark footer — is `--chrome-bar`, and here it is `--brand-ground`: the primary darkened until
   white on it reads at 4.5:1, the primary itself when it already does. So a light primary never puts white on
   a pale ground, nor its own colour as text on white: inside the page `--blue` is that ground too, for the
   filled buttons, the date tile, the figures and every shared component (`--blue-900` is `--brand-ground-deep`, the
   ground one step darker, for a hover). The ink on a ground is white, not 80 % of it: at 4.5:1 any
   alpha would fall under. The light tint on it (a tagline, a date) is `--brand-ground-light`. The low-vision
   look and its print set these tokens themselves, on a rule that outweighs this one. */
:root {
  --chrome-bar: var(--brand-ground);
  --chrome-bar-ink: var(--chrome-bar-strong);
}

body {
  --blue: var(--brand-ground);
  --blue-900: var(--brand-ground-deep);
}

/* ---------- the top bar ---------- */

.vizytivka-topbar {
  min-height: 40px;
  background: var(--chrome-bar);
  color: var(--chrome-bar-ink);
  border-bottom: 1px solid var(--chrome-bar);
}

.vizytivka-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: 34px;
  padding-block: 3px;
}

.vizytivka-topbar-contacts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--space-4);
  min-width: 0;
  font-size: var(--fs-meta-lg);
}

.vizytivka-topbar a {
  color: inherit;
}

.vizytivka-topbar-contacts a {
  white-space: nowrap;
}

.vizytivka-topbar-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--space-4);
}

/* The two buttons of the strip, the highlighted link and «Для слабозорих», are one outlined white button. */
.vizytivka-toplink,
.vizytivka-bvi {
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--chrome-bar-line);
  background: transparent;
  color: var(--chrome-bar-strong);
  font-family: inherit;
  font-size: var(--fs-meta-lg);
  white-space: nowrap;
  cursor: pointer;
}

.vizytivka-topbar a.vizytivka-toplink {
  color: var(--toplink-ink, var(--chrome-bar-strong));
}

/* A colour of its own makes the highlighted link a filled button. */
.vizytivka-toplink {
  border-color: var(--toplink-fill, var(--chrome-bar-line));
  background: var(--toplink-fill, transparent);
}

.vizytivka-toplink:hover,
.vizytivka-toplink:focus-visible,
.vizytivka-bvi:hover {
  border-color: var(--chrome-bar-strong);
}

.vizytivka-toplink:hover,
.vizytivka-toplink:focus-visible {
  background: var(--toplink-fill-hover, transparent);
  text-decoration: underline;
}

:root[data-theme='low-vision'] .vizytivka-toplink,
:root[data-theme='low-vision'] .vizytivka-bvi {
  border-color: var(--chrome-bar-strong);
  background: var(--chrome-bar-strong);
  color: var(--chrome-bar);
}

.vizytivka-topbar .chrome-social {
  margin-block: 0;
  gap: var(--space-2);
}

.vizytivka-topbar .chrome-social a {
  width: 24px;
  height: 24px;
  color: var(--chrome-bar-ink);
}

.vizytivka-topbar .chrome-social a:hover {
  color: var(--chrome-bar-strong);
}

/* The focus ring on the dark bands is the bands' own white. */
.vizytivka-topbar :focus-visible,
.vizytivka-footer :focus-visible,
.vizytivka-hero :focus-visible,
.vizytivka-album :focus-visible {
  outline: var(--focus-ring-on-dark);
  outline-offset: 3px;
}

.theme-footer-light .vizytivka-footer :focus-visible {
  outline: var(--focus-ring);
}

/* Between a tablet and a narrow desktop the bar keeps the phone only. */
@media (min-width: 768px) and (max-width: 1023px) {
  .vizytivka-topbar-address,
  .vizytivka-topbar-email {
    display: none;
  }
}

/* A phone: the bar keeps its buttons; the contacts are in the footer. The bar grows with its rows. */
@media (max-width: 767px) {
  .vizytivka-topbar-contacts,
  .vizytivka-topbar .chrome-social {
    display: none;
  }

  .vizytivka-topbar-inner {
    justify-content: flex-end;
    min-height: 39px;
  }

  .vizytivka-topbar-actions {
    flex: 0 1 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--space-1) var(--space-3);
  }

  .vizytivka-toplink {
    text-align: center;
    white-space: normal;
  }
}

/* The eye of the low-vision switch shows only where its words give way to it (below 520 px). */
.vizytivka-bvi-icon {
  display: none;
}

/* A narrow phone: the strip keeps one row — the low-vision switch is its eye (the words stay for a screen
   reader), the highlighted link one line, cut with an ellipsis when it is long. The low-vision mode's larger
   words need it up to 519 px (a 40-letter link wrapped the strip up to 510 px). */
@media (max-width: 519px) {
  .vizytivka-topbar-actions {
    flex-wrap: nowrap;
    min-width: 0;
  }

  .vizytivka-toplink {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .vizytivka-bvi.base-bvi {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    align-self: stretch;
  }

  .vizytivka-bvi-icon {
    display: block;
    flex: none;
  }

  .vizytivka-bvi .bvi-label-off,
  .vizytivka-bvi .bvi-label-on {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

/* ---------- the header ---------- */

/* From 900 px only the menu's row sticks (public/js/menu-stick.js, `data-menu-row`; the room under it is the
   targets' scroll-margin-top in base-template.css); nothing sticks below that. */
.vizytivka-header {
  position: relative;
  z-index: 40;
  display: flex;
  flex-direction: column;
  min-height: 116px;
  background: var(--chrome-tint);
  border-bottom: 1px solid var(--chrome-tint-line);
}

.vizytivka-header-inner {
  flex-grow: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

/* Short of room the wordmark gives way first, down to its longest word, never inside it. */
.vizytivka-brand {
  display: flex;
  flex: 0 1000000 auto;
  align-items: center;
  gap: var(--space-4);
  min-width: 0;
  color: inherit;
}

.vizytivka-brand .base-brand-logo,
.vizytivka-brand .base-brand-mark {
  flex: none;
  width: 84px;
  height: 84px;
  font-size: 32px;
  font-weight: 800;
}

.vizytivka-brand .base-brand-logo {
  object-fit: contain;
  mix-blend-mode: multiply;
}

:root[data-theme='low-vision'] .vizytivka-brand .base-brand-logo {
  mix-blend-mode: normal;
}

.vizytivka-brand .base-brand-name {
  max-width: 12em;
  min-width: min-content;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  color: var(--brand-ground-deep);
  overflow-wrap: break-word;
}

.vizytivka-brand .base-brand-line:nth-child(2) {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.vizytivka-brand .base-brand-line:nth-child(3) {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* A long name (a line past 24 characters, header.liquid) is smaller over a few lines. */
.vizytivka-brand--long .base-brand-name {
  max-width: 19em;
  font-size: 16px;
  line-height: 1.2;
}

/* The menu: a row of links, the current one underlined by 2 px, the dropdown a panel under its item. Its
   row (`data-menu-row`) is the box menu-stick.js keeps in sight: beside the logo it is as tall as the
   header, tiered it is a band of its own under the logo's (below). */
.vizytivka-navrow {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  align-self: stretch;
  margin-left: auto;
}

.vizytivka-nav {
  flex: 0 1 auto;
}

.vizytivka-nav .base-nav-list {
  gap: var(--space-1) 6px;
  margin-inline: -4px;
}

.vizytivka-nav .base-nav-link {
  min-height: 40px;
  padding: var(--space-2) 4px;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  font-size: var(--fs-nav);
  white-space: nowrap;
  color: var(--ink);
  text-decoration: none;
}

.vizytivka-nav .base-nav-link:hover,
.vizytivka-nav .base-nav-link[aria-expanded='true'] {
  color: var(--accent);
  text-decoration: none;
}

.vizytivka-nav .base-nav-link.is-active {
  border-bottom-color: var(--accent);
  color: var(--ink);
}

/* The highlighted item is drawn beside the search (header.liquid). */
.vizytivka-nav .base-nav-cta {
  display: none;
}

.vizytivka-nav .base-nav-panel {
  top: 100%;
  flex-flow: row wrap;
  gap: 2px var(--space-3);
  width: 480px;
  max-width: 90vw;
  background: var(--chrome-tint);
  border: 1px solid var(--chrome-tint-line);
  border-top: 3px solid var(--blue);
  box-shadow:
    0 2px 6px var(--blue-950-a08),
    0 18px 44px var(--blue-950-a18);
}

.vizytivka-nav .base-nav-panel[hidden] {
  display: none;
}

.vizytivka-nav .base-nav-sublink {
  flex: 0 0 calc(50% - 6px);
  min-width: 0;
  padding: var(--space-2) var(--space-4);
  border-left: 3px solid transparent;
  font-size: var(--fs-nav-sub);
  font-weight: 500;
  overflow-wrap: break-word;
}

.vizytivka-nav .base-nav-overview {
  flex-basis: 100%;
}

.vizytivka-nav .base-nav-sublink:hover,
.vizytivka-nav .base-nav-sublink:focus-visible {
  border-left-color: var(--accent);
  background: var(--paper);
  color: var(--blue);
}

.vizytivka-nav .base-nav-sublink[aria-current='page'] {
  border-left-color: var(--accent);
  color: var(--accent);
}

/* The search and the highlighted button, at the row's end. */
.vizytivka-header-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--space-2);
}

.vizytivka-cta {
  padding: var(--space-3) var(--space-5);
  background: var(--cta-fill, var(--blue));
  color: var(--cta-ink, var(--paper));
  font-size: var(--fs-button);
  font-weight: 700;
  white-space: nowrap;
}

.vizytivka-cta:hover {
  background: var(--cta-fill-hover, var(--blue-900));
  text-decoration: underline;
}

/* The search: the header has no room for a standing field, so only the magnifier shows. It is the
   field's label: a click, or Tab, focuses the field, which then opens over the menu (no script)
   and sends on Enter. Folded, the field has no width but stays in the tab order. */
.vizytivka-search {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
}

.vizytivka-search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--blue);
  cursor: pointer;
}

.vizytivka-search-toggle:hover,
.vizytivka-search:focus-within .vizytivka-search-toggle {
  color: var(--accent);
}

.vizytivka-search-toggle svg {
  width: 20px;
  height: 20px;
}

.vizytivka-search-input {
  appearance: none;
  position: absolute;
  top: 50%;
  right: 100%;
  z-index: 45;
  width: 1px;
  padding: 0;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  font-size: var(--fs-nav-main);
  opacity: 0;
  transform: translateY(-50%);
  transition:
    width var(--transition-fast),
    opacity var(--transition-fast);
}

.vizytivka-search:focus-within .vizytivka-search-input {
  width: min(20rem, 60vw);
  height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--accent);
  opacity: 1;
  box-shadow: 0 8px 24px var(--blue-950-a10);
}

.vizytivka-search-input::placeholder {
  color: var(--muted);
}

.vizytivka-search-input:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -4px;
}

/* The «Меню» button with its word, where the list does not fit: below 900 px, and above it when menu-fit.js
   marks the header compact. */
.vizytivka-menu-toggle {
  display: none;
  flex: none;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-3);
  border: 1px solid var(--blue);
  background: transparent;
  color: var(--brand-ground-deep);
  font: inherit;
  font-size: var(--fs-button);
  font-weight: 700;
  cursor: pointer;
}

.vizytivka-menu-icon {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}

.vizytivka-menu-icon span {
  display: block;
  height: 2px;
  background: currentColor;
}

.vizytivka-header--compact .vizytivka-navrow,
.vizytivka-header--compact .vizytivka-cta {
  display: none;
}

.vizytivka-header--compact .vizytivka-header-actions {
  margin-left: auto;
}

.vizytivka-header--compact .vizytivka-menu-toggle {
  display: inline-flex;
}

@media (max-width: 899px) {
  .vizytivka-navrow,
  .vizytivka-cta {
    display: none;
  }

  .vizytivka-header-actions {
    margin-left: auto;
  }

  .vizytivka-menu-toggle {
    display: inline-flex;
  }

  /* The list is not drawn here, so a visitor without a script still gets the sheet in the page. */
  html:not(.js) .vizytivka-body .mobile-menu-overlay {
    display: block;
  }
}

/* From 1280 px: a smaller mark. */
@media (min-width: 1280px) {
  .vizytivka-header-inner {
    gap: var(--space-4);
  }

  .vizytivka-brand .base-brand-logo,
  .vizytivka-brand .base-brand-mark {
    width: 72px;
    height: 72px;
  }
}

/* Tiered: a menu too long for the logo's row stands in a band of its own under the logo, the search and
   the button (header.liquid draws it as the header's second child); the low-vision mode does the same for
   every menu (its larger type fits no school's menu beside the logo), by wrapping it onto a row of its
   own. From 900 px, where the list shows, and not while the header is compact. */
@media (min-width: 900px) {
  .vizytivka-header--tiered:not(.vizytivka-header--compact) .vizytivka-header-inner,
  :root[data-theme='low-vision'] .vizytivka-header:not(.vizytivka-header--compact) .vizytivka-header-inner {
    flex-wrap: wrap;
    align-content: center;
    row-gap: 0;
    padding-block: var(--space-3) 0;
  }

  .vizytivka-header--tiered .vizytivka-header-actions,
  :root[data-theme='low-vision'] .vizytivka-header-actions {
    margin-left: auto;
  }

  .vizytivka-header--tiered > .vizytivka-navrow {
    width: 100%;
    min-height: 48px;
  }

  :root[data-theme='low-vision'] .vizytivka-header-inner > .vizytivka-navrow {
    order: 1;
    flex: 1 0 100%;
    align-self: auto;
    min-height: 48px;
    margin-left: 0;
  }

  .vizytivka-header--tiered .vizytivka-nav .base-nav-list {
    column-gap: var(--space-2);
  }
}

/* Under 600 px a low header: the row is at least 76 px (stuck or not), the mark 48 px, the name wrapping
   beside the button and shown whole — a long one makes the row taller. */
@media (max-width: 599px) {
  .vizytivka-header {
    min-height: 76px;
  }

  .vizytivka-header-inner {
    padding-block: var(--space-2);
  }

  .vizytivka-brand .base-brand-logo,
  .vizytivka-brand .base-brand-mark {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
}

/* A phone: the wordmark, the button and the sheet's own search — the magnifier goes. */
@media (max-width: 479px) {
  .vizytivka-search,
  .vizytivka-header-actions {
    display: none;
  }

  .vizytivka-menu-toggle {
    margin-left: auto;
  }

  .vizytivka-header-inner {
    gap: var(--space-3);
  }

  .vizytivka-brand {
    gap: var(--space-3);
  }

  .vizytivka-brand .base-brand-name {
    font-size: 16px;
  }

  /* A name whose longest word does not fit beside the button (a 16-letter one in the widest face on a 320 px
     phone) sends the button to a row of its own instead of running under it; the brand's basis is its
     longest word, so every other name keeps the button beside it. */
  .vizytivka-header-inner {
    flex-wrap: wrap;
    row-gap: var(--space-2);
  }

  .vizytivka-brand {
    flex: 1 1 0;
    min-width: min-content;
  }
}

/* The mobile sheet's highlighted link is the same button. */
.vizytivka-body .mobile-menu-overlay a.mobile-important {
  margin-block: var(--space-3);
  padding-inline: var(--space-4);
  border: 1px solid var(--toplink-on-light, var(--blue));
  background: transparent;
  color: var(--toplink-on-light, var(--blue));
  font-weight: 700;
}

.vizytivka-body .mobile-menu-overlay a.mobile-cta {
  color: var(--cta-on-light, var(--ink));
}

/* ---------- the announcement ---------- */

/* A rule at the foot parts the notice from a band of the same colour under it. */
.vizytivka-body .announcement {
  border: 0;
  border-bottom: 1px solid var(--chrome-bar-line);
  background: var(--chrome-bar);
  color: var(--chrome-bar-strong);
}

.vizytivka-body .announcement--alert {
  border-bottom: 3px solid var(--error-dark);
  background: var(--error);
  color: var(--paper);
}

.vizytivka-body .announcement-inner {
  align-items: center;
  justify-content: center;
}

.vizytivka-body .announcement-icon {
  color: inherit;
  font-size: 1.25em;
  line-height: 1;
}

.vizytivka-body .announcement :focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

/* ---------- the first screen ---------- */

/* A band of a fixed height from 900 px (476 px, 420 on a tablet): the name, the tagline and the two
   buttons, so the whole of it is seen at once. The home page's own text is not in it; it stands on
   white under it (.vizytivka-intro). Without a photo the band is the colour alone and as tall as its
   content. The colour is solid under the whole name column (560 px from the container's edge, the name's
   546 px inside it), so a bright photo never reaches the title. */
.vizytivka-hero {
  --vizytivka-edge: max(0px, (100% - var(--container)) / 2);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--chrome-bar);
  color: var(--chrome-bar-strong);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.vizytivka-hero-inner {
  position: relative;
  padding-block: var(--space-10);
}

.vizytivka-hero-copy {
  max-width: 546px;
}

/* The name's size is a class from partials/home/hero (the longest word and the whole length): 28 px on
   a phone, 24 px for a long name; 36, 32 and 28 px up to 899 px; 48, 40 and 32 px from 900 px. */
.vizytivka-hero-title {
  font-size: 28px;
  font-weight: 800;
  line-height: var(--lh-h1);
  letter-spacing: var(--ls-heading);
  text-transform: uppercase;
  color: var(--chrome-bar-strong);
  overflow-wrap: break-word;
}

.vizytivka-hero-title--md,
.vizytivka-hero-title--sm {
  font-size: 24px;
}

/* Up to 480 px a title that restates the school's name shows its short form (_base); it wears the name's own
   size, not the shared 24 px, so the class above keeps the longest word inside the column. */
.vizytivka-hero-title .hero-title-short {
  font-size: inherit;
  line-height: inherit;
}

/* A narrow phone: a word of 15–17 letters at 21 px and one of 18–19 at 19 px fit the 280 px column in e-Ukraine
   (0.734 em a capital; 0.764 em in low vision, which drops the tight spacing); Noto Serif's bold capitals are
   wider (0.86 em), so under 400 px the size also follows the column: 0.86 em a letter on the longest word the class holds (17 and 19 letters), never more. */
@media (max-width: 399px) {
  .vizytivka-hero-title--md {
    font-size: min(21px, calc((100vw - 40px) / 14.7));
  }

  .vizytivka-hero-title--sm {
    font-size: min(19px, calc((100vw - 40px) / 16.5));
  }
}

@media (min-width: 600px) {
  .vizytivka-hero-title {
    font-size: 36px;
  }

  .vizytivka-hero-title--md {
    font-size: 32px;
  }

  .vizytivka-hero-title--sm {
    font-size: 28px;
  }
}

.vizytivka-hero-tagline {
  margin-top: 18px;
  font-size: var(--fs-tagline);
  font-weight: 700;
  color: var(--brand-ground-light);
}

.vizytivka-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-7);
}

.vizytivka-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-6);
  border: 1.5px solid var(--chrome-bar-strong);
  background: var(--chrome-bar-strong);
  color: var(--blue);
  font-size: var(--fs-button);
  font-weight: 700;
  text-align: center;
}

.vizytivka-button:hover {
  background: var(--chrome-tint);
  text-decoration: underline;
}

.vizytivka-button--ghost {
  border-color: var(--chrome-bar-ink);
  background: transparent;
  color: var(--chrome-bar-strong);
}

.vizytivka-button--ghost:hover {
  border-color: var(--chrome-bar-strong);
  background: transparent;
}

/* The photo across the top, fading down into the colour; the text under it. */
.vizytivka-hero-media {
  position: relative;
  aspect-ratio: 16 / 9;
}

.vizytivka-hero-media img {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: var(--fx, 50%) var(--fy, 50%);
  border-radius: 0;
}

.vizytivka-hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 30%,
    var(--chrome-bar) 100%
  );
}

.vizytivka-hero--photo .vizytivka-hero-inner {
  padding-block: 0 var(--space-9);
}

@media (min-width: 600px) and (max-width: 899px) {
  .vizytivka-hero-media {
    aspect-ratio: 21 / 9;
  }
}

/* From a tablet's width the colour stands on the left and the photo on the right. */
@media (min-width: 900px) {
  .vizytivka-hero--photo {
    min-height: 476px;
    background: linear-gradient(180deg, var(--chrome-bar) 0%, var(--blue-950) 100%);
  }

  .vizytivka-hero-media {
    position: absolute;
    inset: 0 0 0 auto;
    z-index: -2;
    aspect-ratio: 16 / 9;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, var(--chrome-bar) 22%);
    mask-image: linear-gradient(90deg, transparent 0, var(--chrome-bar) 22%);
  }

  .vizytivka-hero-media img {
    object-position: var(--fx, 100%) var(--fy, 50%);
  }

  .vizytivka-hero-media::after {
    display: none;
  }

  /* Solid colour under the whole name column, fading out beyond it, with soft top and bottom edges. */
  .vizytivka-hero--photo::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
      linear-gradient(
        90deg,
        var(--chrome-bar) 0,
        var(--chrome-bar) calc(var(--vizytivka-edge) + 560px),
        transparent calc(var(--vizytivka-edge) + 880px)
      ),
      linear-gradient(180deg, var(--blue-950-a35) 0, transparent 90px),
      linear-gradient(0deg, var(--blue-950-a45) 0, transparent 120px);
  }

  .vizytivka-hero--photo .vizytivka-hero-inner {
    display: flex;
    align-items: center;
    min-height: inherit;
    padding-block: var(--space-10);
  }

  /* The column ends inside the solid colour: 44 px of the container's padding + 516 = 560. */
  .vizytivka-hero--photo .vizytivka-hero-copy {
    max-width: 516px;
  }

  .vizytivka-hero-title {
    font-size: 48px;
  }

  .vizytivka-hero-title--md {
    font-size: 40px;
  }

  .vizytivka-hero-title--sm {
    font-size: 32px;
  }
}

/* A tablet: a lower band and the tagline a size down. */
@media (min-width: 900px) and (max-width: 1179px) {
  .vizytivka-hero--photo {
    min-height: 420px;
  }

  .vizytivka-hero--photo .vizytivka-hero-inner {
    padding-block: var(--space-8);
  }

  .vizytivka-hero-tagline {
    margin-top: var(--space-4);
    font-size: 20px;
  }

  .vizytivka-hero-actions {
    margin-top: var(--space-6);
  }
}

/* A phone: the tagline is a line under the name, not heavier than it. */
@media (max-width: 479px) {
  .vizytivka-hero-tagline {
    font-size: 18px;
    font-weight: 400;
  }
}

/* A short window (a laptop's, an old school PC's): the first button stays above the fold — less
   padding, a smaller tagline and tighter gaps; the band keeps its height. The band without a photo is as
   tall as its text and keeps its room. On a phone the photo is a low strip. */
@media (min-width: 900px) and (max-height: 760px) {
  .vizytivka-hero--photo .vizytivka-hero-inner {
    padding-block: var(--space-5) var(--space-7);
  }

  .vizytivka-hero--photo .vizytivka-hero-tagline {
    margin-top: var(--space-3);
    font-size: 18px;
  }

  .vizytivka-hero--photo .vizytivka-hero-actions {
    margin-top: var(--space-5);
  }
}

@media (max-width: 899px) and (max-height: 640px) {
  .vizytivka-hero-media {
    aspect-ratio: auto;
    height: 64px;
  }

  .vizytivka-hero--photo .vizytivka-hero-inner {
    padding-bottom: var(--space-7);
  }

  .vizytivka-hero-tagline {
    margin-top: var(--space-3);
    font-size: 16px;
  }

  .vizytivka-hero-actions {
    margin-top: var(--space-5);
  }
}

/* Low vision: no photo, plain high-contrast text on black, as tall as its (larger) text. */
:root[data-theme='low-vision'] .vizytivka-hero {
  min-height: 0;
  border-bottom: 1px solid var(--chrome-bar-line);
  background: var(--chrome-bar);
}

:root[data-theme='low-vision'] .vizytivka-hero--photo {
  min-height: 0;
}

:root[data-theme='low-vision'] .vizytivka-hero-media,
:root[data-theme='low-vision'] .vizytivka-hero--photo::before {
  display: none;
}

:root[data-theme='low-vision'] .vizytivka-hero--photo .vizytivka-hero-inner {
  min-height: 0;
  padding-block: var(--space-10);
}

:root[data-theme='low-vision'] .vizytivka-button {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--paper);
}

:root[data-theme='low-vision'] .vizytivka-button--ghost {
  background: transparent;
  color: var(--chrome-bar-strong);
}

/* ---------- the home page's blocks ---------- */

/* The blocks' rhythm of the mock-up: 64 px between two blocks and under the first screen, 44 px on a
   phone. */
.vizytivka-main .base-block {
  padding-block: 32px;
}

.vizytivka-hero + .base-block {
  padding-top: 64px;
}

.vizytivka-main > .base-block:last-child {
  padding-bottom: 64px;
}

/* The first screen alone (a site right after the first run, or the hero the only block): white between
   it and the footer, which wears the same colour. */
.vizytivka-main > .vizytivka-hero:last-child {
  margin-bottom: 64px;
}

@media (max-width: 599px) {
  .vizytivka-main .base-block {
    padding-block: 22px;
  }

  .vizytivka-hero + .base-block {
    padding-top: 44px;
  }

  .vizytivka-main > .base-block:last-child {
    padding-bottom: 44px;
  }
}

.vizytivka-main .base-block + .base-block {
  border-top: 0;
}

.vizytivka-main .base-block-head {
  margin-bottom: var(--space-7);
}

.vizytivka-main .base-block-title {
  font-size: clamp(28px, 4vw, var(--fs-h2-news));
  font-weight: 800;
  line-height: var(--lh-h2);
  color: var(--ink);
  overflow-wrap: break-word;
}

.vizytivka-main .base-block > .base-block-title,
.vizytivka-main .vizytivka-numbers > .base-block-title {
  margin-bottom: var(--space-7);
}

.vizytivka-main .base-more {
  font-size: var(--fs-button);
  white-space: nowrap;
}

/* The home text under the first screen: ordinary text on white, in the content column. */
.vizytivka-intro {
  padding-top: var(--space-9);
}

/* «Про заклад» and «… у цифрах» side by side when they follow each other: the text and the four figures
   in a narrow column; the figures first when the school put them first. */
.vizytivka-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-8) 56px;
  align-items: start;
}

.vizytivka-main .vizytivka-pair .base-figures {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5) var(--space-6);
}

@media (min-width: 900px) {
  .vizytivka-pair {
    grid-template-columns: minmax(0, 1fr) 420px;
  }

  .vizytivka-pair--figures-first {
    grid-template-columns: 420px minmax(0, 1fr);
  }
}

/* «Розділи сайту»: three columns of rows with a line of note. */
.vizytivka-sections {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 32px;
  list-style: none;
}

.vizytivka-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding-block: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.vizytivka-section-link {
  max-width: 100%;
  font-size: var(--fs-card-title);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: var(--ls-h3);
  color: var(--ink);
  overflow-wrap: break-word;
}

.vizytivka-section-link--accent {
  color: var(--accent);
}

.vizytivka-section-note {
  font-size: var(--fs-meta-lg);
  color: var(--muted);
  overflow-wrap: break-word;
}

.vizytivka-section:hover .vizytivka-section-link {
  color: var(--accent);
  text-decoration: underline;
}

@media (max-width: 899px) {
  .vizytivka-sections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 599px) {
  .vizytivka-sections {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* «Цифри»: figures over a rule. */
.vizytivka-main .base-figures {
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
}

.vizytivka-main .base-figure {
  gap: var(--space-2);
  padding-top: var(--space-4);
  border-top: 2px solid var(--blue);
}

/* The figures and the date tile are lining numerals: Playfair's own are old-style, a «14» a third of a «92 %». */
.vizytivka-main .base-figure-value {
  font-size: var(--fs-h2-news);
  line-height: 1.1;
  font-variant-numeric: lining-nums;
}

.vizytivka-main .base-figure-label {
  font-size: var(--fs-text);
  line-height: var(--lh-text);
}

/* «Новини»: a grid of cards — the cover at 4:3, the date in the accent, a bold title; the whole
   card is the title's link. A post without a cover is a tinted tile. */
.vizytivka-main .base-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-7);
}

.vizytivka-card {
  position: relative;
}

.vizytivka-card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.vizytivka-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* No cover: a tile of the primary colour's tint under the 3 px rule the side menu wears, never a pale
   box that reads as a picture that did not load. */
.vizytivka-card-blank {
  display: block;
  width: 100%;
  height: 100%;
  border-top: 3px solid var(--blue);
  background: var(--primary-tint);
}

:root[data-theme='low-vision'] .vizytivka-card-blank {
  border: 2px solid var(--chrome-bar-line);
  background: var(--chrome-bar);
}

.vizytivka-card-date {
  margin-top: var(--space-4);
  font-size: var(--fs-meta-lg);
  font-weight: 600;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--accent);
}

.vizytivka-card-title {
  display: -webkit-box;
  margin-top: 7px;
  overflow: hidden;
  font-size: var(--fs-card-title);
  font-weight: 700;
  line-height: 1.37;
  letter-spacing: -0.02em;
  color: var(--ink);
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow-wrap: break-word;
}

.vizytivka-card-link {
  color: inherit;
}

.vizytivka-card-link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.vizytivka-card:hover .vizytivka-card-link {
  color: var(--blue);
  text-decoration: underline;
}

.vizytivka-card:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 767px) {
  .vizytivka-main .base-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* A post without a cover is a row of its date and title under the cards, three in a row on a desktop,
   on a hairline rule; the title's link is the row's. */
.vizytivka-lines {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 var(--space-7);
  margin-top: var(--space-6);
  border-top: 1px solid var(--line);
  list-style: none;
}

.vizytivka-main .base-cards + .vizytivka-lines {
  margin-top: var(--space-7);
}

.vizytivka-main .base-block-head + .vizytivka-lines {
  margin-top: 0;
}

.vizytivka-line {
  position: relative;
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--line);
}

.vizytivka-line-date {
  font-size: var(--fs-meta-lg);
  font-weight: 600;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--accent);
}

.vizytivka-line-title {
  margin-top: var(--space-1);
  font-size: var(--fs-nav);
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  overflow-wrap: break-word;
}

.vizytivka-line-link {
  color: inherit;
}

.vizytivka-line-link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.vizytivka-line:hover .vizytivka-line-link {
  color: var(--blue);
  text-decoration: underline;
}

.vizytivka-line:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 899px) {
  .vizytivka-lines {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 599px) {
  .vizytivka-lines {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The second and third cards as rows, for a phone only (partials/home/posts). */
@media (min-width: 600px) {
  .vizytivka-line--phone {
    display: none;
  }
}

/* «Найближчі події»: three columns of cards with a filled date tile; the month is short, in ordinary case. */
.vizytivka-main .base-agenda {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}

.vizytivka-main .base-agenda-item {
  grid-template-columns: 64px minmax(0, 1fr);
  padding: var(--space-4);
  border: 1px solid var(--line);
  background: var(--paper);
}

.vizytivka-main .base-agenda-item .base-date {
  min-height: 64px;
  padding: var(--space-1);
  border: 0;
  background: var(--blue);
  color: var(--paper);
  font-variant-numeric: lining-nums;
}

.vizytivka-main .base-agenda-item .base-date-month {
  margin-top: 2px;
  text-transform: none;
}

@media (max-width: 899px) {
  .vizytivka-main .base-agenda {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 599px) {
  .vizytivka-main .base-agenda {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* «Банер»: the photo beside a tinted panel. */
.vizytivka-main .base-banner {
  gap: 0;
  padding: 0;
  overflow: hidden;
  border-color: var(--line);
  background: var(--paper-2);
}

.vizytivka-main .base-banner-media img {
  display: block;
  height: 100%;
  aspect-ratio: 4 / 3;
}

.vizytivka-main .base-banner-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-8);
}

.vizytivka-main .base-banner-copy > p {
  margin: 0;
}

.vizytivka-main .base-banner-copy .base-block-title {
  margin-bottom: 0;
  line-height: 1.15;
}

@media (max-width: 899px) {
  .vizytivka-main .base-banner-copy {
    padding: var(--space-6);
  }
}

/* «Документи»: the latest files as rows — the title across the full row, the meta line under it, the
   same in every row — then the sections in columns. */
.vizytivka-main .base-doc-list {
  border-top: 2px solid var(--blue);
}

.vizytivka-main .base-doc {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  gap: var(--space-1);
  padding-block: 15px;
  border-bottom: 1px solid var(--line);
}

.vizytivka-main .base-doc > .doc-protection {
  justify-self: stretch;
}

.vizytivka-main .base-doc-link {
  font-size: var(--fs-nav);
  font-weight: 600;
}

.vizytivka-main .base-doc .base-meta {
  font-variant-numeric: tabular-nums;
}

/* The five latest rows with the document sections in a tinted column beside them from 900 px; under the
   rows below it. */
.vizytivka-docs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-7) 56px;
  align-items: start;
}

@media (min-width: 900px) {
  .vizytivka-docs--groups {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
}

.vizytivka-doc-groups {
  padding: var(--space-5) var(--space-6);
  background: var(--chrome-tint);
  overflow-wrap: break-word;
}

.vizytivka-doc-groups-title {
  margin-bottom: var(--space-2);
  font-size: var(--fs-nav);
  font-weight: 700;
  color: var(--ink);
}

.vizytivka-main .base-link-list {
  list-style: none;
}

.vizytivka-main .base-link-list a {
  display: block;
  padding-block: var(--space-1);
  color: var(--body);
  font-size: var(--fs-nav);
  text-decoration: none;
}

.vizytivka-main .base-link-list a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* The labels the shared components set in capitals are in ordinary case here: capitals are the first
   screen's name alone. */
.vizytivka-main :is(.chp-bar-label, .news-flag, .chp-doc-type, .section-report-kicker) {
  text-transform: none;
}

/* A document's file type on a page's list of files: a small outlined tag in the primary colour (a
   text, so never the colour alone). */
.vizytivka-main .chp-doc-type {
  min-width: 48px;
  padding: 3px 6px;
  border: 1px solid var(--blue);
  color: var(--blue);
  font-size: var(--fs-meta-lg);
  letter-spacing: 0.04em;
}

/* «Фотоальбоми»: the first album as a wide cover wearing the first screen's sign — the colour solid under
   the title, fading into the photo — and the next albums as small covers with their names under it. */
.vizytivka-album {
  position: relative;
  isolation: isolate;
  min-height: 200px;
  overflow: hidden;
  background: var(--chrome-bar);
  color: var(--chrome-bar-strong);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* The width is set: with an auto width, the min-height would widen the box through the ratio (832 px). */
.vizytivka-album--photo {
  width: 100%;
  aspect-ratio: 16 / 5;
  min-height: 260px;
}

/* The photo fades in from its left edge, and the colour is solid up to that edge and steps out over it, as on
   the first screen: no line where the photo starts. */
.vizytivka-album-media {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: -2;
  width: 62%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, var(--chrome-bar) 22%);
  mask-image: linear-gradient(90deg, transparent 0, var(--chrome-bar) 22%);
}

.vizytivka-album-media img {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.vizytivka-album--photo::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    90deg,
    var(--chrome-bar) 0,
    var(--chrome-bar) 38%,
    transparent calc(38% + 320px)
  );
}

.vizytivka-album-copy {
  position: absolute;
  bottom: var(--space-7);
  left: var(--space-7);
  max-width: min(320px, 50%);
}

.vizytivka-album:not(.vizytivka-album--photo) .vizytivka-album-copy {
  position: static;
  max-width: none;
  padding: var(--space-7);
}

.vizytivka-album-title {
  font-size: var(--fs-h2-news);
  font-weight: 800;
  line-height: var(--lh-h2);
  letter-spacing: var(--ls-heading);
  overflow-wrap: break-word;
}

.vizytivka-album-link {
  color: inherit;
}

.vizytivka-album-link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.vizytivka-album:hover .vizytivka-album-link {
  text-decoration: underline;
}

.vizytivka-album:focus-within {
  outline: var(--focus-ring-on-dark);
  outline-offset: -4px;
}

.vizytivka-album-meta {
  margin-top: var(--space-2);
  font-size: var(--fs-text);
  color: var(--brand-ground-light);
}

/* Three small covers in a row (the model gives at most three beside a wide one with a photo); four only
   when the wide one has none, from 900 px. */
.vizytivka-covers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-3);
  list-style: none;
}

.vizytivka-cover {
  position: relative;
}

.vizytivka-cover-media img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 0;
}

.vizytivka-cover-title {
  margin-top: var(--space-2);
  font-size: var(--fs-nav);
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  overflow-wrap: break-word;
}

.vizytivka-cover-link {
  color: inherit;
}

.vizytivka-cover-link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.vizytivka-cover:hover .vizytivka-cover-link {
  color: var(--blue);
  text-decoration: underline;
}

.vizytivka-cover:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

:root[data-theme='low-vision'] .vizytivka-album {
  border: 1px solid var(--chrome-bar-line);
}

:root[data-theme='low-vision'] .vizytivka-album-media,
:root[data-theme='low-vision'] .vizytivka-album--photo::before {
  display: none;
}

:root[data-theme='low-vision'] .vizytivka-album--photo {
  aspect-ratio: auto;
  min-height: 0;
}

:root[data-theme='low-vision'] .vizytivka-album--photo .vizytivka-album-copy {
  position: static;
  max-width: none;
  padding: var(--space-7);
}

@media (min-width: 900px) {
  .vizytivka-covers--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* A phone: the wide cover's photo across the top, fading down into the colour under the title. */
@media (max-width: 599px) {
  .vizytivka-album--photo {
    display: flex;
    flex-direction: column;
    aspect-ratio: auto;
    min-height: 0;
  }

  .vizytivka-album-media {
    position: relative;
    z-index: auto;
    inset: auto;
    width: 100%;
    aspect-ratio: 16 / 9;
    -webkit-mask-image: linear-gradient(180deg, var(--chrome-bar) 35%, var(--blue-a50) 70%, transparent 100%);
    mask-image: linear-gradient(180deg, var(--chrome-bar) 35%, var(--blue-a50) 70%, transparent 100%);
  }

  .vizytivka-album--photo::before {
    display: none;
  }

  .vizytivka-album-copy,
  .vizytivka-album:not(.vizytivka-album--photo) .vizytivka-album-copy {
    position: static;
    max-width: none;
    padding: var(--space-3) var(--space-5) var(--space-5);
  }

  .vizytivka-album-title {
    font-size: 22px;
  }

  .vizytivka-covers {
    gap: var(--space-2);
  }
}

/* «Харчування сьогодні»: the first photo small, beside the прийом's name and dishes. */
.vizytivka-main .meals-home .vizytivka-meal--photo {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  grid-template-areas: 'photo name' 'photo text';
  grid-template-rows: auto 1fr;
  gap: 0 var(--space-5);
  align-items: start;
}

.vizytivka-main .meals-home .vizytivka-meal--photo .meals-cell--photo {
  display: contents;
}

.vizytivka-main .meals-home .vizytivka-meal--photo .meals-home-title {
  grid-area: name;
}

.vizytivka-main .meals-home .vizytivka-meal--photo .meals-figure {
  grid-area: photo;
  margin: 0;
}

.vizytivka-main .meals-home .vizytivka-meal--photo .meals-text {
  grid-area: text;
}

.vizytivka-main .meals-home {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

@media (max-width: 899px) {
  .vizytivka-main .meals-home {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 599px) {
  .vizytivka-main .meals-home .vizytivka-meal--photo {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 0 var(--space-4);
  }
}

/* «Корисні посилання»: three columns of tiles. */
.vizytivka-main .base-quick {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.vizytivka-main .base-quick-link {
  height: 100%;
  min-height: 72px;
  padding: var(--space-5);
  border-color: var(--line);
  font-size: var(--fs-text);
  font-weight: 700;
  line-height: 1.3;
}

.vizytivka-main .base-quick-link:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.vizytivka-main .base-quick-icon {
  width: 28px;
  height: 28px;
  color: var(--blue);
}

@media (max-width: 899px) {
  .vizytivka-main .base-quick {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 479px) {
  .vizytivka-main .base-quick {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* «Контакти»: one framed row — the address, the phone, the e-mail and «Написати нам». */
.vizytivka-contacts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5) var(--space-7);
  align-items: end;
  padding: var(--space-6) var(--space-7);
  border: 1px solid var(--line);
}

.vizytivka-contacts-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4) var(--space-7);
}

.vizytivka-contacts-fact dt {
  font-size: var(--fs-meta-lg);
  color: var(--muted);
}

.vizytivka-contacts-fact dd {
  margin-top: var(--space-1);
  font-size: var(--fs-text);
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: break-word;
}

.vizytivka-contacts-fact a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.vizytivka-contacts-action {
  margin: 0;
}

.vizytivka-contacts-map {
  margin-top: var(--space-6);
}

@media (min-width: 900px) {
  .vizytivka-contacts {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .vizytivka-contacts-facts {
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  }
}

/* A phone shows fewer items in a block: one news card and three rows, two events, three documents (and,
   beside rows, not the sections' column, as the mock-up's phone), four links, the wide album cover and three
   small ones, the site's sections without their notes; the block's «Усі …» link leads to the rest. */
@media (max-width: 599px) {
  .base-block--posts .base-cards > :nth-child(n + 2),
  .vizytivka-lines > :nth-child(n + 4),
  .base-block--events .base-agenda > :nth-child(n + 3),
  .base-block--documents .base-doc-list > :nth-child(n + 4),
  .base-block--documents .vizytivka-docs--groups > .vizytivka-doc-groups,
  .vizytivka-covers > :nth-child(n + 4),
  .vizytivka-section-note {
    display: none;
  }

  .vizytivka-main .base-block-head,
  .vizytivka-main .base-block > .base-block-title,
  .vizytivka-main .vizytivka-numbers > .base-block-title {
    margin-bottom: 16px;
  }

  .vizytivka-contacts {
    padding: var(--space-5);
  }
}

/* «Партнери»: the tiles of a row are as tall as the tallest, the logo's slot at the top of each. */
.vizytivka-main .base-logos {
  align-items: stretch;
}

.vizytivka-main .base-logo {
  padding: var(--space-4);
  border: 1px solid var(--line);
  background: var(--paper);
}

.vizytivka-main .base-fact {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: var(--space-3);
}

.vizytivka-main .base-fact dd {
  overflow-wrap: break-word;
}

/* ---------- the footer ---------- */

.vizytivka-footer {
  padding-block: var(--space-8) var(--space-5);
  background: var(--chrome-bar);
  color: var(--chrome-bar-ink);
  font-size: var(--fs-nav);
  line-height: 1.6;
}

:root[data-theme='low-vision'] .vizytivka-footer {
  border-top: 1px solid var(--chrome-bar-line);
}

.vizytivka-footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
}

.vizytivka-footer-col {
  flex: 1 1 160px;
  min-width: 0;
}

.vizytivka-footer-about {
  flex: 1.4 1 240px;
}

.vizytivka-footer-name {
  margin-bottom: var(--space-3);
  font-size: var(--fs-nav);
  font-weight: 700;
  color: var(--chrome-bar-strong);
  overflow-wrap: break-word;
}

.vizytivka-footer-tagline {
  margin-top: var(--space-4);
  font-weight: 700;
  color: var(--brand-ground-light);
}

.vizytivka-footer-title {
  margin-bottom: var(--space-4);
  font-size: var(--fs-nav);
  font-weight: 700;
  color: var(--chrome-bar-strong);
}

.vizytivka-footer-links,
.vizytivka-footer-lines {
  margin: 0;
  list-style: none;
}

.vizytivka-footer-links a,
.vizytivka-footer-lines a {
  color: var(--chrome-bar-ink);
  overflow-wrap: break-word;
}

.vizytivka-footer-links a {
  display: block;
  padding-block: var(--space-1);
}

.vizytivka-footer a:hover {
  color: var(--chrome-bar-strong);
  text-decoration: underline;
}

.vizytivka-footer .chrome-social a {
  color: var(--chrome-bar-ink);
}

.vizytivka-footer-cta {
  display: inline-block;
  margin-top: var(--space-3);
  padding: var(--space-1) var(--space-4);
  border: 1px solid var(--chrome-bar-line);
  color: var(--chrome-bar-strong);
  font-weight: 600;
}

.vizytivka-footer .vizytivka-footer-cta {
  color: var(--chrome-bar-strong);
}

/* The bottom line and the credit on one row; the row gap parts them when they wrap. */
.vizytivka-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2) var(--space-6);
  margin-top: var(--space-7);
  padding-top: var(--space-4);
  border-top: 1px solid var(--chrome-bar-line);
  font-size: var(--fs-meta-lg);
}

.vizytivka-footer-bottom p,
.vizytivka-footer-bottom p + .site-credit {
  margin: 0;
}

/* «Нижній колонтитул: Світлий» of «Оформлення». */
.theme-footer-light .vizytivka-footer {
  border-top: 1px solid var(--chrome-tint-line);
  background: var(--chrome-tint);
  color: var(--body);
}

.theme-footer-light .vizytivka-footer-name,
.theme-footer-light .vizytivka-footer-title,
.theme-footer-light .vizytivka-footer a,
.theme-footer-light .vizytivka-footer .vizytivka-footer-cta,
.theme-footer-light .vizytivka-footer .chrome-social a {
  color: var(--ink);
}

.theme-footer-light .vizytivka-footer-tagline {
  color: var(--accent);
}

.theme-footer-light .vizytivka-footer-cta {
  border-color: var(--line-strong);
}

.theme-footer-light .vizytivka-footer-bottom {
  border-top-color: var(--chrome-tint-line);
  color: var(--muted);
}

/* A low footer (docs/dev/templates.md): from 1100 px the name, the groups and the contacts in one
   row, the contacts the widest; the low-vision look keeps wrapping up to 1365 px. On a phone the name
   and the contacts across, the groups flowing in two columns between them (one in low vision), the
   contacts one run. */
@media (min-width: 1100px) {
  .vizytivka-footer-grid {
    flex-wrap: nowrap;
    gap: var(--space-7);
  }

  .vizytivka-footer-col {
    flex: 1 1 0;
  }

  .vizytivka-footer-contacts {
    flex-grow: 1.4;
  }
}

@media (min-width: 1100px) and (max-width: 1365px) {
  :root[data-theme='low-vision'] .vizytivka-footer-grid {
    flex-wrap: wrap;
  }

  :root[data-theme='low-vision'] .vizytivka-footer-col {
    flex: 1 1 40%;
  }
}

@media (max-width: 767px) {
  .vizytivka-footer-grid {
    display: block;
    column-count: 2;
    column-gap: var(--space-5);
  }

  :root[data-theme='low-vision'] .vizytivka-footer-grid {
    column-count: 1;
  }

  .vizytivka-footer-col {
    margin-bottom: var(--space-6);
    break-inside: avoid;
  }

  .vizytivka-footer-about,
  .vizytivka-footer-contacts {
    column-span: all;
  }

  .vizytivka-footer-contacts {
    margin-bottom: 0;
  }

  .vizytivka-footer-lines {
    display: flex;
    flex-wrap: wrap;
    gap: 0 var(--space-4);
  }

  .vizytivka-footer-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

/* The narrowest phones: a little less between the rows and a looser title, so the footer is no taller
   than at 375 px. */
@media (max-width: 359px) {
  .vizytivka-footer {
    padding-top: var(--space-7);
  }

  .vizytivka-footer-grid {
    column-gap: var(--space-4);
  }

  .vizytivka-footer-col {
    margin-bottom: var(--space-5);
  }

  .vizytivka-footer-contacts {
    margin-bottom: 0;
  }

  .vizytivka-footer-bottom {
    margin-top: var(--space-5);
  }

  .vizytivka-footer-title {
    margin-bottom: var(--space-3);
    letter-spacing: 0.02em;
  }

  .vizytivka-footer-links a {
    padding-block: 3px;
  }
}

/* ---------- the band every inner page opens with ----------
   The primary colour from the announcement down, across the whole width: crumbs in the light tint, the
   title in white (40 px, 28 on a phone), then the description. It is a header of its own on an info page's
   opening and on a post (the photo or the cover on its right from 900 px, across its top below); the section
   menu stands under it, never beside it. On every page the template falls back to, the heading is `_base`'s
   plain one — the way back, the kicker, the title, the lead and the meta as siblings — and each of them wears
   the colour and runs edge to edge by its border-image, which is ink overflow: no sideways scroll, and no
   100vw that ignores the scrollbar. Each of the five ends in a band's bottom padding, and the next one
   pulls itself up by it, so the last of them, whichever it is, closes the band. */

.vizytivka-main {
  --vizytivka-pad: calc(var(--space-8) - var(--space-2));
  --vizytivka-h1: 40px;
}

@media (max-width: 599px) {
  .vizytivka-main {
    --vizytivka-pad: var(--space-6);
    --vizytivka-h1: 28px;
  }
}

.vizytivka-main .base-page,
.vizytivka-main .section-page {
  padding-top: 0;
}

.vizytivka-main :is(.base-page, .section-page, .container:not(.vizytivka-band-inner)) > :where(.base-crumbs, .base-kicker, .page-h1, .page-h1 + .base-lead, .page-h1 + .base-meta, .page-h1 + .base-lead + .base-meta) {
  margin: 0;
  padding: var(--vizytivka-pad) 0;
  background-color: var(--chrome-bar);
  border-image: linear-gradient(var(--chrome-bar), var(--chrome-bar)) fill 0 / 0 / 0 100vmax;
  color: var(--chrome-bar-strong);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* Not the first of the band: no padding above, pulled up by the one under the one before. */
.vizytivka-main :is(.base-page, .section-page, .container:not(.vizytivka-band-inner)) > .base-crumbs + :is(.base-kicker, .page-h1),
.vizytivka-main :is(.base-page, .section-page, .container:not(.vizytivka-band-inner)) > .base-kicker + .page-h1,
.vizytivka-main :is(.base-page, .section-page, .container:not(.vizytivka-band-inner)) > .page-h1 + :is(.base-lead, .base-meta),
.vizytivka-main :is(.base-page, .section-page, .container:not(.vizytivka-band-inner)) > .page-h1 + .base-lead + .base-meta {
  padding-top: 0;
  margin-top: calc(var(--space-3) - var(--vizytivka-pad));
}

/* What follows the band stands clear of it. */
.vizytivka-main :is(.base-page, .section-page, .container:not(.vizytivka-band-inner)) > .page-h1 + :not(.base-lead, .base-meta),
.vizytivka-main :is(.base-page, .section-page, .container:not(.vizytivka-band-inner)) > .page-h1 + .base-lead + :not(.base-meta),
.vizytivka-main :is(.base-page, .section-page, .container:not(.vizytivka-band-inner)) > .page-h1 + .base-meta + *,
.vizytivka-main :is(.base-page, .section-page, .container:not(.vizytivka-band-inner)) > .page-h1 + .base-lead + .base-meta + *,
.vizytivka-main > .vizytivka-band + :not(.base-with-nav) {
  margin-top: var(--vizytivka-after, var(--space-8));
}

.vizytivka-main :is(.base-page, .section-page, .container:not(.vizytivka-band-inner)) > .base-crumbs {
  font-size: var(--fs-meta-lg);
  color: var(--chrome-bar-ink);
}

.vizytivka-main :is(.base-page, .section-page, .container:not(.vizytivka-band-inner)) > .base-kicker {
  color: var(--brand-ground-light);
}

.vizytivka-main :is(.base-page, .section-page, .container:not(.vizytivka-band-inner)) > .page-h1 {
  max-width: none;
  font-size: var(--vizytivka-h1);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
}

.vizytivka-main :is(.base-page, .section-page, .container:not(.vizytivka-band-inner)) > .page-h1 + .base-lead {
  font-size: 17px;
  line-height: 1.5;
  color: var(--chrome-bar-ink);
}

.vizytivka-main :is(.base-page, .section-page, .container:not(.vizytivka-band-inner)) > :is(.page-h1 + .base-meta, .page-h1 + .base-lead + .base-meta) {
  font-weight: 600;
  color: var(--brand-ground-light);
}

.vizytivka-main :is(.base-page, .section-page, .container:not(.vizytivka-band-inner)) > :is(.base-crumbs, .page-h1 + .base-lead, .page-h1 + .base-meta, .page-h1 + .base-lead + .base-meta) a {
  color: inherit;
  text-decoration: underline;
}

.vizytivka-main :is(.base-page, .section-page, .container:not(.vizytivka-band-inner)) > :is(.base-crumbs, .page-h1 + .base-lead, .page-h1 + .base-meta, .page-h1 + .base-lead + .base-meta) a:hover {
  color: var(--chrome-bar-strong);
}

.vizytivka-main :is(.base-page, .section-page, .container:not(.vizytivka-band-inner)) > :is(.base-crumbs, .page-h1 + .base-lead, .page-h1 + .base-meta, .page-h1 + .base-lead + .base-meta) :focus-visible {
  outline: var(--focus-ring-on-dark);
  outline-offset: 3px;
}

.vizytivka-main .meals-today {
  color: inherit;
}

/* A page with the section's menu and a plain heading: the heading's pieces lie across both columns, so the
   band is as wide as the page's, and the menu and the text stand under it, in their columns. The columns
   hold the pieces, the menu and the page's own blocks as one grid (the wrappers `_base` puts around them
   make no box), told apart by `order`; the menu spans the rows of the text, so the text's rows do not
   follow its height. */
.vizytivka-with-nav--plain {
  --vizytivka-after: var(--space-5);
  row-gap: 0;
  padding-block: 0 var(--space-10);
}

.vizytivka-with-nav--plain > .base-with-nav-main,
.vizytivka-with-nav--plain > .base-with-nav-main > .container {
  display: contents;
}

.vizytivka-with-nav--plain > .base-with-nav-main > .container > * {
  grid-column: 1;
  order: 2;
  min-width: 0;
}

.vizytivka-with-nav--plain > .base-with-nav-main > .container > :is(.base-crumbs, .base-kicker, .page-h1, .page-h1 + .base-lead, .page-h1 + .base-meta, .page-h1 + .base-lead + .base-meta) {
  grid-column: 1 / -1;
  order: 0;
}

/* The menu and the page's first block stand clear of the band; a page with no band of its own (the day of
   «Харчування» wraps its heading) starts under the announcement's room the same way. */
.vizytivka-with-nav--plain > .section-nav,
.vizytivka-with-nav--plain > .base-with-nav-main > .container > :first-child:not(.base-crumbs, .base-kicker, .page-h1) {
  margin-top: var(--vizytivka-after);
}

.vizytivka-with-nav--plain > .section-nav {
  order: 1;
}

/* The crumbs of a plain page (layouts/base) are the band's first piece, as `_base`'s own way back is on a page that
   brings one; the heading after them is a later piece of the band, pulled up by the crumbs' padding. */
.vizytivka-with-nav--plain > .vizytivka-band-crumbs {
  grid-column: 1 / -1;
  order: 0;
}

.vizytivka-with-nav--plain > .vizytivka-band-crumbs + .base-with-nav-main > .container > :first-child:is(.base-kicker, .page-h1) {
  padding-top: 0;
  margin-top: calc(var(--space-3) - var(--vizytivka-pad));
}

/* The blocks are grid items here: their margins add up instead of collapsing, and a first child's margin stays
   inside its box. Where two neighbours both carry one, the larger stands, as it did in a block flow. */
.vizytivka-with-nav--plain > .base-with-nav-main > .container > .base-people + .text-page-contact {
  margin-top: calc(var(--space-8) - var(--space-6));
}

.vizytivka-with-nav--plain > .base-with-nav-main > .container > .album + .base-pagination,
.vizytivka-with-nav--plain > .base-with-nav-main > .container > .base-events {
  margin-top: 0;
}

.vizytivka-with-nav--plain > .base-with-nav-main > .container > .base-events > :last-child {
  margin-bottom: 0;
}

.vizytivka-with-nav--plain > .base-with-nav-main > .container > .base-lead + .base-actions {
  margin-top: calc(var(--space-5) - var(--space-4));
}

.vizytivka-with-nav--plain > .base-with-nav-main > .container > .base-collection-result + section > :first-child {
  margin-top: calc(var(--space-8) - var(--space-4));
}

@media (min-width: 900px) {
  .vizytivka-with-nav--plain {
    --vizytivka-after: var(--space-8);
  }

  .vizytivka-with-nav--plain > .base-with-nav-main > .container > * {
    grid-column: 2;
  }

  .vizytivka-with-nav--plain > .section-nav {
    grid-row: span 99;
  }
}

/* Page with an opening: the menu stands after the text in the document and is placed by the grid, beside it from
   900 px and above it on a phone. */
.vizytivka-main .base-with-nav:not(.vizytivka-with-nav--plain) > .section-nav {
  order: -1;
}

@media (min-width: 900px) {
  .vizytivka-main .base-with-nav:not(.vizytivka-with-nav--plain) > .section-nav {
    grid-column: 1;
    grid-row: 1;
  }

  .vizytivka-main .base-with-nav:not(.vizytivka-with-nav--plain) > .base-with-nav-main {
    grid-column: 2;
    grid-row: 1;
  }
}

/* The band of an info page's opening and of a post. The white title needs its colour on paper too: a
   browser that leaves backgrounds out of a print would otherwise print it white on white. */
.vizytivka-band {
  --vizytivka-edge: max(0px, (100% - var(--container)) / 2);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0;
  padding-block: var(--vizytivka-pad);
  background: var(--chrome-bar);
  color: var(--chrome-bar-strong);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.vizytivka-band-title {
  max-width: 24em;
  margin: 0;
  font-size: var(--vizytivka-h1);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--chrome-bar-strong);
  overflow-wrap: break-word;
}

.vizytivka-band-crumbs {
  margin: 0 0 var(--space-3);
  font-size: var(--fs-meta-lg);
  color: var(--chrome-bar-ink);
}

.vizytivka-band a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.vizytivka-band a:hover {
  color: var(--chrome-bar-strong);
}

.vizytivka-band-lead {
  max-width: 56ch;
  margin: var(--space-3) 0 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--chrome-bar-ink);
}

.vizytivka-band-meta,
.vizytivka-band-byline {
  margin: var(--space-4) 0 0;
  font-size: var(--fs-meta-lg);
  font-weight: 600;
}

.vizytivka-band-meta {
  max-width: 36em;
  padding-top: var(--space-4);
  border-top: 1px solid var(--chrome-bar-line);
  color: var(--brand-ground-light);
}

.vizytivka-band-byline {
  color: var(--chrome-bar-ink);
}

.vizytivka-band-counters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  margin: var(--space-5) 0 0;
}

.vizytivka-band a.vizytivka-band-counter {
  padding: 3px var(--space-3);
  border: 1px solid var(--chrome-bar-line);
  font-size: var(--fs-text);
  text-decoration: none;
}

.vizytivka-band a.vizytivka-band-counter:hover {
  border-color: var(--chrome-bar-strong);
  text-decoration: underline;
}

.vizytivka-band-counter strong {
  color: var(--brand-ground-light);
}

.vizytivka-band :focus-visible {
  outline: var(--focus-ring-on-dark);
  outline-offset: 3px;
}

.vizytivka-band-inner {
  width: 100%;
}

.vizytivka-band-media img {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: var(--fx, 50%) var(--fy, 50%);
}

/* Below a tablet: the photo across the top, fading down into the colour, the text under it. */
.vizytivka-band--photo {
  padding-top: 0;
}

/* No frame line along the faded photo's edges: «Рамка шаблону» draws where a photo stands as an
   object. */
.vizytivka-band-media.photo-style--frame::after {
  display: none;
}

/* The photo fades into the band's colour by a mask, so there is no edge between them. */
.vizytivka-band-media {
  position: relative;
  aspect-ratio: 5 / 2;
  margin-bottom: var(--space-5);
  -webkit-mask-image: linear-gradient(180deg, var(--chrome-bar) 30%, var(--blue-a50) 68%, transparent 100%);
  mask-image: linear-gradient(180deg, var(--chrome-bar) 30%, var(--blue-a50) 68%, transparent 100%);
}

@media (min-width: 600px) and (max-width: 899px) {
  .vizytivka-band-media {
    aspect-ratio: 21 / 9;
  }
}

/* A post's cover opens in the viewer: its figure stands in the band, the note on a solid chip of the colour. */
.vizytivka-band-cover {
  position: relative;
  margin: 0;
}

.vizytivka-band-cover img {
  cursor: zoom-in;
}

.vizytivka-band-cover-note {
  position: absolute;
  right: var(--space-5);
  bottom: var(--space-3);
  margin: 0;
  padding: 3px var(--space-3);
  background: var(--chrome-bar);
  color: var(--chrome-bar-strong);
  font-size: var(--fs-meta-lg);
  text-align: left;
}

/* From a tablet's width the colour stands on the left and the photo on the right, as on the first screen:
   solid under the text column (560 px from the container's edge, the text's 512 px inside it), fading out
   beyond it, with soft top and bottom edges. */
@media (min-width: 900px) {
  .vizytivka-band--photo {
    min-height: 240px;
    padding-block: var(--vizytivka-pad);
    background: linear-gradient(180deg, var(--chrome-bar) 0%, var(--blue-950) 100%);
  }

  .vizytivka-band-media {
    position: absolute;
    inset: 0 0 0 auto;
    z-index: -2;
    width: 680px;
    aspect-ratio: auto;
    margin: 0;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, var(--chrome-bar) 22%);
    mask-image: linear-gradient(90deg, transparent 0, var(--chrome-bar) 22%);
  }

  .vizytivka-band--photo::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
      linear-gradient(
        90deg,
        var(--chrome-bar) 0,
        var(--chrome-bar) calc(var(--vizytivka-edge) + 560px),
        transparent calc(var(--vizytivka-edge) + 880px)
      ),
      linear-gradient(180deg, var(--blue-950-a35) 0, transparent 90px),
      linear-gradient(0deg, var(--blue-950-a45) 0, transparent 120px);
    pointer-events: none;
  }

  .vizytivka-band-cover {
    position: static;
  }

  /* The cover lies under the text's container, which spans the band: the container lets a click through. */
  .vizytivka-band--photo .vizytivka-band-inner {
    pointer-events: none;
  }

  .vizytivka-band--photo .vizytivka-band-inner > * {
    max-width: min(32rem, 100%);
    pointer-events: auto;
  }
}

/* A tablet and a phone: the text at its size. */
@media (max-width: 599px) {
  .vizytivka-band-lead {
    font-size: 16px;
  }
}

/* Low vision: black, a yellow edge, no backdrop photo. */
:root[data-theme='low-vision'] .vizytivka-main :is(.base-page, .section-page, .container:not(.vizytivka-band-inner)) > :where(.base-crumbs, .base-kicker, .page-h1, .page-h1 + .base-lead, .page-h1 + .base-meta, .page-h1 + .base-lead + .base-meta) {
  border-image: linear-gradient(var(--chrome-bar) calc(100% - 3px), var(--chrome-bar-line) 0) fill 0 / 0 / 0 100vmax;
}

:root[data-theme='low-vision'] .vizytivka-band {
  background: var(--chrome-bar);
  box-shadow: inset 0 -3px 0 var(--chrome-bar-line);
}

:root[data-theme='low-vision'] .vizytivka-band::before,
:root[data-theme='low-vision'] .vizytivka-band-media,
:root[data-theme='low-vision'] .vizytivka-band-cover-note {
  display: none;
}

:root[data-theme='low-vision'] .vizytivka-band--photo {
  min-height: 0;
  padding-top: var(--vizytivka-pad);
}

/* A post's cover is the post's picture, not a backdrop: it stays, across the top of the band without a fade,
   and still opens in the viewer. */
:root[data-theme='low-vision'] .vizytivka-band--post.vizytivka-band--photo {
  padding-top: 0;
}

:root[data-theme='low-vision'] .vizytivka-band-cover {
  width: auto;
}

:root[data-theme='low-vision'] .vizytivka-band-cover .vizytivka-band-media {
  display: block;
  position: relative;
  inset: auto;
  z-index: auto;
  width: auto;
  height: min(40vw, 420px);
  aspect-ratio: auto;
  margin: 0 0 var(--space-5);
  -webkit-mask-image: none;
  mask-image: none;
}

/* ---------- a post ---------- */

.vizytivka-post-reading {
  display: grid;
  grid-template-columns: 172px minmax(0, 680px);
  gap: var(--space-11);
  padding-block: var(--space-9) var(--space-10);
}

/* The left column: «Опубліковано» and the share row, under a primary rule. It stays in sight under the menu row. */
.vizytivka-post-rail {
  position: sticky;
  top: calc(var(--menu-row, 0px) + var(--space-4));
  align-self: start;
  display: grid;
  gap: var(--space-5);
  padding-top: var(--space-3);
  border-top: 3px solid var(--blue);
}

.vizytivka-post-rail-item {
  display: grid;
  gap: 2px;
  margin: 0;
  font-size: var(--fs-text);
  font-weight: 600;
  color: var(--ink);
}

.vizytivka-post-rail-label {
  font-size: var(--fs-meta-sm);
  font-weight: 700;
  color: var(--muted);
}

.vizytivka-post-rail .news-share {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}

.vizytivka-post-rail .news-share-label {
  margin: 0 0 var(--space-2);
  font-size: var(--fs-meta-sm);
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

.vizytivka-post-rail .news-share-link {
  min-height: 40px;
  padding-inline: 0;
  border-width: 0 0 1px;
  border-color: var(--line);
  background: transparent;
  font-size: var(--fs-meta-lg);
  font-weight: 600;
  color: var(--blue);
}

.vizytivka-post-rail .news-share-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.vizytivka-post-main {
  min-width: 0;
}

.vizytivka-post-main .base-article-body {
  max-width: none;
  line-height: 1.75;
}

.vizytivka-post-main .base-article-body > p:first-child {
  font-size: 20px;
  line-height: 1.65;
  color: var(--ink);
}

.vizytivka-post-main .base-article-body.has-dropcap > p:first-child::first-letter {
  float: left;
  margin: 0.08em 0.1em 0 0;
  font-size: 3.6em;
  font-weight: 800;
  line-height: 0.8;
  color: var(--blue);
}

.vizytivka-post-main .news-share {
  display: none;
}

.vizytivka-post-related {
  padding-block: 0 var(--space-10);
}

@media (max-width: 899px) {
  .vizytivka-post-reading {
    grid-template-columns: minmax(0, 1fr);
  }

  /* The share row at the end of the text covers a small screen. */
  .vizytivka-post-rail {
    display: none;
  }

  .vizytivka-post-main .news-share {
    display: flex;
  }
}

/* ---------- the feed, the section's menu ---------- */

/* The feed's dark front: the title, the filters and the newest post under one gradient, with soft
   shades at the top and the bottom. The gradient lies over the ground with `darken` (the darker of the two
   per channel), and so do the shades: --blue-950 and its alphas come from the raw primary, which for a light
   one is lighter than the ground the white text is set on (story 105, C11); for a dark one nothing changes. */
.vizytivka-front {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--brand-ground);
  background-image: linear-gradient(180deg, var(--chrome-bar) 0%, var(--blue-950) 100%);
  background-blend-mode: darken;
  color: var(--chrome-bar-strong);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.vizytivka-front::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, var(--blue-950-a35) 0, transparent 90px),
    linear-gradient(0deg, var(--blue-950-a50) 0, transparent 140px);
  mix-blend-mode: darken;
  pointer-events: none;
}

.vizytivka-front :focus-visible {
  outline: var(--focus-ring-on-dark);
  outline-offset: 3px;
}

.vizytivka-front-inner {
  padding-block: var(--space-7) var(--space-10);
}

.vizytivka-masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4) var(--space-7);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--chrome-bar-line);
}

.vizytivka-masthead-title {
  margin: 0;
  font-size: var(--vizytivka-h1);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--chrome-bar-strong);
  overflow-wrap: break-word;
}

.vizytivka-front .base-filters {
  justify-items: end;
  margin: 0;
}

.vizytivka-front .chip-row {
  justify-content: flex-end;
}

.vizytivka-front .filter-chip {
  min-height: 34px;
  padding: 5px 14px;
  border: 1px solid var(--chrome-bar-line);
  background: transparent;
  color: var(--chrome-bar-strong);
  font-size: var(--fs-meta-lg);
}

.vizytivka-front .filter-chip:hover {
  border-color: var(--chrome-bar-strong);
  color: var(--chrome-bar-strong);
  text-decoration: underline;
}

.vizytivka-front .filter-chip.is-active {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--blue);
}

/* The newest post: the text on the left, the cover in a white frame on the right. */
.vizytivka-lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-8);
  align-items: center;
  margin-top: var(--space-9);
  padding: 0;
  border: 0;
}

.vizytivka-lead--photo {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-10);
}

.vizytivka-lead-copy {
  position: relative;
  min-width: 0;
  max-width: 760px;
}

.vizytivka-lead-kicker {
  display: inline-block;
  margin: 0 0 var(--space-5);
  padding: 4px 10px;
  background: var(--brand-ground-light);
  color: var(--brand-ground-deep);
  font-size: var(--fs-meta-lg);
  font-weight: 700;
}

.vizytivka-lead-title {
  margin: 0;
  font-size: clamp(27px, 2.8vw, 36px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
}

.vizytivka-lead-link {
  color: var(--chrome-bar-strong);
  text-decoration: none;
}

.vizytivka-lead-link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.vizytivka-lead-copy:hover .vizytivka-lead-link {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.vizytivka-lead-date {
  margin: var(--space-4) 0 0;
  font-size: var(--fs-meta-lg);
  font-weight: 600;
  color: var(--brand-ground-light);
}

.vizytivka-lead-summary {
  max-width: 52ch;
  margin: var(--space-4) 0 0;
  font-size: 17.5px;
  line-height: 1.6;
  color: var(--chrome-bar-ink);
}

.vizytivka-lead-cue {
  display: inline-block;
  margin-top: var(--space-7);
  padding: var(--space-4) var(--space-6);
  background: var(--paper);
  color: var(--blue);
  font-size: var(--fs-button);
  font-weight: 700;
}

.vizytivka-lead-copy:hover .vizytivka-lead-cue {
  background: var(--chrome-tint);
}

/* The cover: a white mat, a shadow and a second sheet behind it. */
.vizytivka-lead-media {
  order: 2;
  position: relative;
  isolation: isolate;
  margin-right: 24px;
  border: 8px solid var(--paper);
  background: var(--paper);
  box-shadow:
    0 28px 56px -22px var(--blue-950-a50),
    0 2px 8px var(--blue-950-a35);
}

.vizytivka-lead-media::before {
  content: '';
  position: absolute;
  inset: 8px -32px -32px 8px;
  z-index: -1;
  border: 1px solid var(--accent-light-a55);
}

.vizytivka-lead-media img {
  display: block;
  width: 100%;
  height: auto;
}

.vizytivka-front + .base-feed {
  padding-top: var(--space-8);
}

/* The light behind the cover: a soft lighter area on the right, a wash of the light blue under the
   framed cover (a front with a lead that has a cover only). It is the lead's own pseudo-element, over the
   cover's column only and off on a phone: a lighter area under the text would take the white text's 4.5:1
   from a light primary's ground (story 105, C11). */
.vizytivka-lead--photo {
  position: relative;
}

.vizytivka-lead--photo::before {
  content: '';
  position: absolute;
  inset: 0 0 0 50%;
  z-index: -1;
  background: radial-gradient(ellipse 70% 80% at 65% 55%, var(--accent-light-a55), transparent 100%);
  opacity: 0.7;
  pointer-events: none;
}

:root[data-theme='low-vision'] .vizytivka-lead--photo::before {
  display: none;
}

@media print {
  .vizytivka-lead--photo::before {
    display: none;
  }
}

:root[data-theme='low-vision'] .vizytivka-front {
  border-block: 2px solid var(--chrome-bar-line);
  background: var(--chrome-bar);
}

:root[data-theme='low-vision'] .vizytivka-lead-kicker {
  border: 2px solid var(--chrome-bar-line);
  background: var(--chrome-bar);
  color: var(--chrome-bar-strong);
}

:root[data-theme='low-vision'] .vizytivka-lead-cue {
  border: 2px solid var(--chrome-bar-line);
}

:root[data-theme='low-vision'] .vizytivka-lead-media {
  border-color: var(--chrome-bar-line);
  box-shadow: none;
}

:root[data-theme='low-vision'] .vizytivka-lead-media::before {
  display: none;
}

@media (max-width: 899px) {
  .vizytivka-lead--photo {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-8);
  }

  .vizytivka-lead--photo::before {
    display: none;
  }

  .vizytivka-lead-media {
    margin-right: 0;
  }

  .vizytivka-lead-media::before {
    display: none;
  }

  .vizytivka-masthead {
    align-items: flex-start;
  }

  .vizytivka-front .base-filters {
    justify-items: start;
  }

  .vizytivka-front .chip-row {
    justify-content: flex-start;
  }
}

/* The rest of the feed: the cards of the home page in a grid. Only the feed: an author page lists its posts as
   `_base`'s rows, a picture beside the text, which a narrow column would squeeze. */
.vizytivka-main .base-feed .base-rows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-7);
}

@media (max-width: 899px) {
  .vizytivka-main .base-feed .base-rows {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 599px) {
  .vizytivka-main .base-feed .base-rows {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The section's menu: a tinted panel with a 3 px primary rule, the section's name over the list, the current
   page on white with a primary edge. On a phone it is one line under the band that opens the list (the fold of
   partials/section-nav); from 900 px the fold is gone and the list stays in sight. */
.vizytivka-main .section-nav {
  padding: 0 0 var(--space-3);
  border-top: 3px solid var(--blue);
  background: var(--chrome-tint);
}

/* Beside the text the list stays in sight under the menu row, with its own scroll when it is taller than the window. */
@media (min-width: 900px) {
  .vizytivka-main .section-nav {
    position: sticky;
    top: calc(var(--menu-row, 0px) + var(--space-4));
    max-height: calc(100vh - var(--menu-row, 0px) - 2 * var(--space-4));
    overflow-y: auto;
  }

  .vizytivka-section-fold {
    display: none;
  }
}

/* A phone and a tablet: the line, closed; the list opens under it, and its links wrap instead of scrolling. */
@media (max-width: 899px) {
  .vizytivka-main .section-nav {
    padding-bottom: 0;
  }

  .vizytivka-main .section-nav-title,
  .vizytivka-main .section-nav ul {
    display: none;
  }

  .vizytivka-main .vizytivka-section-fold[open] ~ ul {
    display: block;
    overflow: visible;
    padding-bottom: var(--space-3);
  }

  .vizytivka-main .section-nav a {
    border-bottom: 0;
    border-left: 3px solid transparent;
    white-space: normal;
  }

  .vizytivka-section-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    min-height: 48px;
    padding: var(--space-2) var(--space-5);
    color: var(--ink);
    font-size: var(--fs-nav-side);
    font-weight: 700;
    line-height: 1.3;
    cursor: pointer;
    list-style: none;
  }

  .vizytivka-section-summary::-webkit-details-marker {
    display: none;
  }

  .vizytivka-section-summary::after {
    content: '';
    flex: none;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
  }

  .vizytivka-section-fold[open] > .vizytivka-section-summary::after {
    transform: translateY(2px) rotate(-135deg);
  }
}

.vizytivka-main .section-nav-title {
  margin: 0;
  padding: var(--space-4) var(--space-5) var(--space-2);
  font-size: var(--fs-meta-lg);
  font-weight: 800;
  color: var(--brand-ground-deep);
}

.vizytivka-main .section-nav ul {
  padding: 0 var(--space-2);
}

.vizytivka-main .section-nav a {
  padding: var(--space-2) var(--space-3);
  font-size: var(--fs-nav-side);
  line-height: 1.35;
  text-decoration: none;
}

.vizytivka-main .section-nav a:hover {
  border-left-color: var(--blue);
  background: var(--paper);
  color: var(--blue);
}

.vizytivka-main .section-nav a[aria-current] {
  border-left-color: var(--blue);
  background: var(--paper);
  color: var(--blue);
  font-weight: 700;
}

:root[data-theme='low-vision'] .vizytivka-main .section-nav {
  border: 2px solid var(--chrome-bar-line);
}

:root[data-theme='low-vision'] .vizytivka-main .section-nav a[aria-current] {
  border-left-color: var(--chrome-bar-line);
  text-decoration: underline;
}

/* ---------- the rest: people, albums, events, filters ---------- */

/* Square cards with a primary rule on top; names bold, a role in the accent, titles in the ink. */
.vizytivka-main .base-person-role {
  color: var(--accent);
  font-weight: 600;
}

.vizytivka-main .base-cards--albums .base-card,
.vizytivka-main .vizytivka-post-related .base-card {
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  background: var(--paper);
}

.vizytivka-main .base-card-title {
  font-weight: 700;
}

.vizytivka-main .base-section-title {
  padding-top: var(--space-3);
  border-top: 3px solid var(--blue);
  font-size: var(--fs-text);
  font-weight: 800;
  color: var(--blue);
}

/* An idle chip on a light surface turns the primary colour on hover. Kept at the weight of the shared rule
   (`:where`), so the feed's dark front and an active chip keep their own colours. */
:where(.vizytivka-main) .filter-chip:where(:not(.is-active)):hover {
  border-color: var(--blue);
  color: var(--blue);
}

:root[data-theme='low-vision'] .vizytivka-main .base-section-title {
  border-top-color: var(--chrome-bar-line);
  color: var(--ink);
}

/* «Кути» of «Оформлення»: the buttons follow the chosen variant (square by default). */
.vizytivka-button,
.vizytivka-cta,
.vizytivka-toplink,
.vizytivka-bvi,
.vizytivka-menu-toggle,
.vizytivka-lead-cue,
.vizytivka-footer-cta {
  border-radius: var(--radius-button);
}

/* ---------- designed blocks of a text (growth story 93) ---------- */

/* Text inside a page sits on white: cards and figures are white with a hairline and the card's colour as a
   3 px rule on top, the template's corner, no shadow; the title in the ink. */
.vizytivka-body .md-cards,
.vizytivka-body .md-numbers {
  --md-bg: var(--paper);
  --md-border: 1px solid var(--line);
  --md-edge: 3px solid var(--acc);
  --md-radius: var(--radius);
  --md-shadow: none;
  --md-gap: var(--space-5);
  --md-pad: var(--space-5);
  --md-title: var(--ink);
}

/* A plain photo beside the text: the template's corner for photos, no frame, no shadow. */
.vizytivka-body .md-media {
  --md-gap: var(--space-6) var(--space-8);
  --md-radius: var(--radius-media);
  --md-photo-border: 0;
  --md-photo-shadow: none;
}

/* Steps: square badges filled with the step's colour on the page's line. */
.vizytivka-body .md-steps {
  --md-badge-radius: var(--radius);
  --md-title: var(--ink);
  --md-rail: var(--line);
}

.vizytivka-body .md-step::before {
  background: var(--acc);
  color: var(--paper);
}

/* A table's head on the tint of the header under a 2 px primary rule, the rows on white; a quote with a primary
   rule on its left, in the ink and upright. Low vision keeps the shared black-and-white table head. */
.vizytivka-main .md-table th {
  background: var(--chrome-tint);
  border-bottom: 2px solid var(--blue);
}

.vizytivka-main blockquote {
  padding: var(--space-1) 0 var(--space-1) var(--space-5);
  border-left: 3px solid var(--blue);
  color: var(--ink);
  font-size: 18px;
  font-style: normal;
  font-weight: 600;
}
