/* Common Heritage public site: tokens and primitives ("Catalogue" design, 30 Nov 2026; page layout is in beta.css).
   A plain collection catalogue: white ground, ink, one grey ramp, 1px rules instead of tinted boxes, square photos'
   corners, 2px on controls. Colour comes only from the motif icons and the country colours (COUNTRY_COLORS in ui.jsx).
   Fonts are linked in beta.blade.php: Big Shoulders Display (headings, numbers) and Archivo (text, interface). */

:root {
  --ink: #111111;
  --paper: #ffffff;
  --stage: #f2f2f2;      /* behind photos: while they load, and around an uncropped photo */
  --line: #111111;       /* structural rules: section tops, header, frames */
  --line-soft: #d6d6d6;  /* rules between rows */
  --muted: #555555;      /* secondary text, 7.5:1 on white */
  --faint: #737373;      /* placeholders and tertiary text, 4.7:1 on white */

  --font-heading: "Big Shoulders Display", "Arial Narrow", sans-serif; /* Latin Extended: ș ț ă ő ű č ć đ š ž */
  --font-body: "Archivo", system-ui, sans-serif;

  --radius: 2px;
  --gutter: 48px;
  --page: 1440px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
@media (max-width: 900px) { :root { --gutter: 20px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #8f8f8f transparent; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.55; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  font-family: var(--font-heading); font-weight: 700; line-height: 1.02; letter-spacing: 0.005em;
  margin: 0; text-wrap: balance;
}
p { margin: 0 0 12px; text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
img { display: block; max-width: 100%; }
figure { margin: 0; }
button { font: inherit; color: inherit; }
::-moz-selection { background: var(--ink); color: var(--paper); }
::selection { background: var(--ink); color: var(--paper); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
input, textarea, select { caret-color: var(--ink); }
/* Years and counts: the heading face's figures, a touch larger so they match the text they sit in. */
/* Weight 800 and 1.25em keep the condensed figures (the 1 especially) legible at text sizes; data reads in ink. */
.num { font-family: var(--font-heading); font-weight: 800; font-size: 1.25em; line-height: 1; letter-spacing: 0.02em; color: var(--ink); font-variant-numeric: tabular-nums lining-nums; }

/* — buttons: rectangles; the primary is solid ink, the rest a 1px outline that fills on hover — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; cursor: pointer; text-decoration: none; text-align: center;
  font: 600 15px/1.2 var(--font-body); color: var(--ink); background: var(--paper);
  border: 1px solid var(--ink); border-radius: var(--radius);
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #3a3a3a; border-color: #3a3a3a; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:disabled:hover { background: var(--paper); color: var(--ink); }
.btn-primary:disabled:hover { background: var(--ink); color: var(--paper); }
.btn-block { width: 100%; }
.btn-icon { width: 44px; padding: 0; }
.btn svg { display: block; flex: none; }
.btn .num, .btn .ch-count { color: inherit; opacity: 0.75; } /* counts inside a button follow its text colour, filled or not */

/* A text action next to a button, or a "see all" link. */
.link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; border: 0; background: none;
  font: 600 15px/1.2 var(--font-body); color: var(--ink); cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em;
}
.link:hover { text-decoration-thickness: 2px; }

/* — forms — */
.field > label, .label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.input {
  width: 100%; min-height: 44px; padding: 10px 12px;
  font: 16px/1.4 var(--font-body); color: var(--ink); background: var(--paper);
  border: 1px solid var(--ink); border-radius: var(--radius);
}
.input::-moz-placeholder { color: var(--faint); opacity: 1; }
.input::placeholder { color: var(--faint); opacity: 1; }
.input:focus-visible { outline: 2px solid var(--ink); outline-offset: 0; }
textarea.input { min-height: 180px; resize: vertical; }
select.input {
  -moz-appearance: none;
       appearance: none; -webkit-appearance: none; cursor: pointer; text-overflow: ellipsis; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23111' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px;
}

/* Segmented choice (contact topic): one bordered strip, the chosen option filled. */
.seg { display: inline-flex; border: 1px solid var(--ink); border-radius: var(--radius); }
.seg-opt { position: relative; display: inline-flex; align-items: center; min-height: 42px; padding: 8px 16px; font-size: 15px; cursor: pointer; }
.seg-opt + .seg-opt { border-left: 1px solid var(--ink); }
.seg-opt input, .check input, .radio input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.seg-opt:has(input:checked) { background: var(--ink); color: var(--paper); }
.seg-opt:not(:has(input:checked)):hover { background: var(--stage); }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Radio row (catalog country): a round box, filled with an inset ring when chosen. */
.radio { position: relative; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.radio .box { width: 16px; height: 16px; flex: none; border: 1px solid var(--ink); border-radius: 50%; }
.radio input:checked + .box { background: var(--ink); box-shadow: inset 0 0 0 3px var(--paper); }
.radio input:focus-visible + .box { outline: 2px solid var(--ink); outline-offset: 2px; }

/* — a small square of a country's colour next to its name (--country from countryStyle() in ui.jsx) — */
.swatch { display: inline-block; width: 12px; height: 12px; flex: none; background: var(--country); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.25); }
/* Common Heritage public site: page layout on top of base.css. Desktop is laid out for 1440px, phones (≤900px) for 390px.
   Sections open with a 1px ink rule; a narrow left rail carries the section's running head (or its heading), the
   content sits to its right. Photos have square corners and are never filtered. */

body { text-wrap: pretty; }
.ch-page { min-height: 100vh; display: flex; flex-direction: column; }
.ch-page > main { flex: 1; width: 100%; max-width: var(--page); margin: 0 auto; }
.ch-gutter { padding-left: var(--gutter); padding-right: var(--gutter); }
.ch-muted { color: var(--muted); }
.ch-count { color: var(--muted); font: 500 14px var(--font-body); margin-left: 8px; }
.ch-photo { width: 100%; height: 100%; -o-object-fit: cover; object-fit: cover; display: block; }
.ch-body { font-size: 17px; line-height: 1.6; max-width: 60ch; color: #262626; }
.ch-lead { font-size: 18px; line-height: 1.6; max-width: 58ch; margin: 0; }
.ch-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 28px; }
.ch-note { font-size: 14px; color: var(--muted); margin: 12px 0 0; }
.ch-icon { flex: none; -o-object-fit: contain; object-fit: contain; }
.ch-dash { display: inline-block; width: 28px; height: 3px; flex: none; background: var(--ink); }
.ch-mobile-only { display: none; }

/* A thin line slides under the header while the catalogue loads. */
.ch-loading { height: 2px; margin: 0 var(--gutter); overflow: hidden; background: var(--line-soft); }
.ch-loading span { display: block; width: 28%; height: 100%; background: var(--ink); animation: ch-load 1.1s var(--ease) infinite; }
@keyframes ch-load { from { transform: translateX(-100%); } to { transform: translateX(360%); } }
@media (prefers-reduced-motion: reduce) { .ch-loading span { animation: none; width: 100%; opacity: 0.4; } }

/* — sections — */
/* Section rules stop at the gutter, so they line up with the content at any width (the header's rule runs full width). */
.ch-sec, .ch-ruled { position: relative; }
.ch-sec::before, .ch-ruled::before { content: ''; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: 1px solid var(--line); }
.ch-partners .ch-sec::before { left: 0; right: 0; } /* already inside the gutter */
.ch-sec { padding-top: 20px; padding-bottom: 88px; }
.ch-sec-last { padding-bottom: 120px; }
.ch-sec-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0 48px; align-items: start; }
.ch-rail { font-size: 15px; font-weight: 600; line-height: 1.35; padding-top: 6px; text-wrap: balance; }
.ch-h2 { font-size: 40px; margin: 0 0 24px; }
.ch-rail-h { font-size: 28px; margin: 0; padding-top: 2px; }
.ch-sec-title { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; }
.ch-sec-title .ch-h2 { margin-bottom: 24px; }
.ch-page-head { padding-top: 48px; padding-bottom: 40px; }
.ch-page-head h1 { font-size: 64px; }
.ch-page-head p { font-size: 18px; line-height: 1.6; max-width: 58ch; margin: 16px 0 0; }
.ch-notfound { padding-bottom: 120px; }
.ch-notfound h1 { font-size: 56px; margin-bottom: 12px; }
.ch-notfound p { font-size: 18px; margin-bottom: 28px; }

/* Rows: a list of names with a number at the right end, ruled like an index. */
.ch-rows { list-style: none; margin: 0; padding: 0; }
.ch-rows li { border-bottom: 1px solid var(--line-soft); -moz-column-break-inside: avoid; break-inside: avoid; }
.ch-rows a, .ch-rows-plain li > span { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 8px 0; text-decoration: none; }
.ch-rows a > span:first-of-type { flex: 1; }
.ch-rows a > span:last-child:not(:first-of-type):not(.num) { color: var(--muted); font-size: 14px; }
.ch-rows a .num { font-size: 19px; }
.ch-rows a:hover > span:first-of-type { text-decoration: underline; text-underline-offset: 0.22em; }
.ch-rows-cols { -moz-columns: 4; columns: 4; -moz-column-gap: 32px; column-gap: 32px; margin-top: 12px; }
.ch-index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; }
.ch-index-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.ch-index-head h3 { font-size: 26px; flex: 1; }
.ch-index-head span:last-child { font-size: 14px; color: var(--muted); }

/* Tiles: the catalogue's entries. */
.ch-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 40px 24px; }
.ch-tiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ch-tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ch-tile { display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none; }
.ch-tile-img { aspect-ratio: 4 / 5; overflow: hidden; background: var(--stage); margin-bottom: 8px; }
.ch-tile-img-wide { aspect-ratio: 4 / 3; }
.ch-tile-meta { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.35; color: var(--muted); }
.ch-tile-meta .swatch, .ch-strip-cap .swatch { margin-top: 0.18em; }
.ch-tile-meta .num, .ch-strip-cap .num { color: var(--ink); }
.ch-tile-title { font-size: 21px; line-height: 1.1; }
.ch-tile:hover .ch-tile-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.ch-tile-sub { font-size: 14px; }
.ch-tile-motifs { font-size: 13px; color: var(--muted); }

/* — header — */
.ch-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.ch-header-in { display: flex; align-items: center; gap: 32px; max-width: var(--page); margin: 0 auto; padding: 14px var(--gutter); }
.ch-brand { display: flex; flex: none; line-height: 0; }
.ch-brand img { width: 52px; height: 52px; }
.ch-links { display: flex; gap: 28px; margin-left: auto; }
.ch-links a { font-size: 15px; font-weight: 500; text-decoration: none; padding: 6px 0; }
.ch-links a:hover { text-decoration: underline; text-underline-offset: 8px; }
.ch-links a[aria-current='page'] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.ch-lang { display: flex; gap: 2px; padding-left: 24px; border-left: 1px solid var(--line-soft); }
.ch-lang-opt { position: relative; display: grid; place-items: center; min-width: 32px; min-height: 32px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.ch-lang-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.ch-lang-opt:hover { color: var(--ink); }
.ch-lang-opt:has(input:checked) { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.ch-lang-opt:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 1px; }
.ch-menu-btn { display: none; }
.ch-mobile-menu { display: flex; flex-direction: column; padding: 0 var(--gutter) 12px; border-top: 1px solid var(--line-soft); }
.ch-mobile-menu a { font-family: var(--font-heading); font-weight: 700; font-size: 26px; padding: 10px 0; text-decoration: none; border-bottom: 1px solid var(--line-soft); }
.ch-mobile-menu a[aria-current='page'] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
@media (max-width: 1080px) {
  .ch-links { display: none; }
  .ch-lang { margin-left: auto; padding-left: 0; border-left: 0; }
  .ch-menu-btn { display: inline-flex; }
}
@media (min-width: 1081px) { .ch-mobile-menu { display: none; } }

/* — footer: a black band, where the white logo belongs — */
.ch-footer { background: var(--ink); color: var(--paper); }
.ch-footer-in { max-width: var(--page); margin: 0 auto; padding: 56px var(--gutter) 64px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; font-size: 15px; line-height: 1.6; }
.ch-footer-about { display: flex; gap: 20px; align-items: flex-start; }
.ch-footer-about img { width: 64px; height: 64px; flex: none; box-shadow: 0 0 0 1px #3a3a3a; }
.ch-footer-brand { font-family: var(--font-heading); font-weight: 700; font-size: 24px; margin-bottom: 6px; }
.ch-footer p { margin: 0; max-width: 40ch; color: #b8b8b8; }
.ch-footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ch-footer-col h2 { font-size: 20px; margin-bottom: 6px; }
.ch-footer-col a { text-decoration: none; }
.ch-footer-col a:hover { text-decoration: underline; }
.ch-footer-col span { color: #b8b8b8; }
.ch-footer ::-moz-selection { background: var(--paper); color: var(--ink); }
.ch-footer ::selection { background: var(--paper); color: var(--ink); }
.ch-footer :focus-visible { outline-color: var(--paper); }

/* — home — */
.ch-home-head { padding-top: 36px; padding-bottom: 32px; }
.ch-display { font-size: clamp(52px, 6.3vw, 92px); line-height: 0.96; letter-spacing: 0; }
.ch-home-intro { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0 48px; align-items: start; margin-top: 28px; }
.ch-home-intro .ch-actions { margin-top: 20px; }
.ch-home-intro .btn, .ch-sec-title .btn { white-space: nowrap; }
.ch-strip-wrap { padding-bottom: 72px; }
.ch-strip { display: grid; grid-template-columns: 2fr repeat(4, minmax(0, 1fr)); gap: 12px; }
.ch-strip-item { display: flex; flex-direction: column; gap: 8px; text-decoration: none; min-width: 0; }
.ch-strip-img { height: clamp(240px, 23vw, 340px); overflow: hidden; background: var(--stage); }
.ch-strip-cap { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.35; color: var(--muted); }
.ch-strip-item:hover .ch-strip-cap { color: var(--ink); }
.ch-strip-motif { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 12px; text-decoration: none; font-family: var(--font-heading); font-weight: 700; font-size: 24px; }
.ch-strip-motif:hover span:nth-child(2) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.ch-fc-teaser { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.ch-fc-teaser .ch-body { margin-bottom: 8px; }
.ch-fc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ch-fc-list li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-family: var(--font-heading); font-weight: 700; font-size: 24px; }

/* — catalog — */
.ch-cat-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; padding-top: 48px; padding-bottom: 28px; }
.ch-cat-head h1 { font-size: 64px; }
.ch-cat-head p { font-size: 17px; margin: 10px 0 0; color: var(--muted); }
.ch-search { width: 380px; }
.ch-cat-body { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 48px; align-items: start; padding-top: 24px; padding-bottom: 96px; }
.ch-cat-body > aside { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding-right: 12px; scrollbar-width: thin; }
.ch-filters { display: flex; flex-direction: column; gap: 28px; }
.ch-filter { border: 0; margin: 0; padding: 0; min-width: 0; }
.ch-filter-title { display: block; padding: 0; margin-bottom: 6px; font-family: var(--font-heading); font-weight: 700; font-size: 21px; line-height: 1.2; }
.ch-filter.field > label.ch-filter-title { font-size: 21px; font-weight: 700; margin-bottom: 8px; }
.ch-opt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 4px 0; border: 0; background: none; text-align: left; font-size: 15px; line-height: 1.3; color: var(--ink); cursor: pointer; }
.ch-opt-box { width: 14px; height: 14px; flex: none; border: 1px solid var(--ink); border-radius: 1px; }
.ch-opt[aria-pressed='true'] .ch-opt-box {
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l2.6 2.6L9 1' fill='none' stroke='%23fff' stroke-width='1.6'/%3E%3C/svg%3E") center / 10px 8px no-repeat;
}
.ch-opt[aria-pressed='true'] .ch-opt-label { font-weight: 600; }
.ch-opt-label { flex: 1; min-width: 0; }
.ch-opt-count { font-size: 18px; }
.ch-opt:hover:not(:disabled) .ch-opt-label { text-decoration: underline; text-underline-offset: 0.2em; }
.ch-opt:disabled, .ch-opt:disabled .num { color: var(--faint); cursor: default; }
.ch-opt:disabled .ch-opt-box { border-color: var(--line-soft); }
.ch-opt .ch-icon { width: 20px; height: 20px; }
.ch-family-row { display: flex; align-items: center; }
.ch-family-opt { flex: 1; font-weight: 600; }
.ch-family-toggle { display: grid; place-items: center; width: 36px; height: 34px; flex: none; padding: 0; border: 0; background: none; cursor: pointer; }
.ch-family-toggle:hover { background: var(--stage); }
.ch-family-toggle svg { transition: transform 0.2s var(--ease); }
.ch-family-list { padding-left: 24px; margin-bottom: 6px; }
.ch-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 28px; font-size: 15px; }
.ch-active .link { min-height: 32px; margin-left: 8px; }
.ch-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 10px; border: 1px solid var(--ink); border-radius: var(--radius); background: var(--paper); font-size: 14px; cursor: pointer; }
.ch-chip:hover { background: var(--ink); color: var(--paper); }
.ch-empty { font-size: 18px; padding: 48px 0; }
.ch-chapter { padding-bottom: 28px; margin-bottom: 32px; border-bottom: 1px solid var(--line-soft); }
.ch-chapter-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.ch-chapter-head h2 { font-size: 36px; }
.ch-chapter-text { max-width: 60ch; }
.ch-chapter-text p { font-size: 17px; line-height: 1.6; margin: 0 0 12px; white-space: pre-line; }
.ch-readmore { padding: 0; border: 0; background: none; font: 600 15px var(--font-body); color: var(--ink); text-decoration: underline; text-underline-offset: 0.3em; cursor: pointer; }
.ch-sheet-backdrop { position: fixed; inset: 0; z-index: 20; background: rgb(17 17 17 / 0.5); }
.ch-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-height: 86vh; display: flex; flex-direction: column; background: var(--paper); border-top: 1px solid var(--line); }
.ch-sheet-body { overflow-y: auto; padding: 24px 20px; }
.ch-sheet-foot { padding: 12px 20px 20px; border-top: 1px solid var(--line-soft); }
.ch-mobile-actions { margin-top: 16px; }
@media (max-width: 1200px) { .ch-search { width: 300px; } }

/* — building — */
.ch-crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 20px; padding-bottom: 20px; font-size: 14px; color: var(--muted); }
.ch-crumbs a { text-decoration: none; }
.ch-crumbs a:hover { color: var(--ink); text-decoration: underline; }
.ch-crumbs [aria-current] { color: var(--ink); }
.ch-building { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; padding-top: 28px; padding-bottom: 88px; }
.ch-stage { display: flex; align-items: center; justify-content: center; background: var(--stage); overflow: hidden; }
.ch-stage .ch-photo { -o-object-fit: contain; object-fit: contain; }
.ch-building-media .ch-stage { height: min(74vh, 760px); }
.ch-building-media .ch-stage .ch-photo { animation: ch-photo-in 0.45s var(--ease); }
@keyframes ch-photo-in { from { opacity: 0; filter: blur(6px); } to { opacity: 1; filter: none; } }
@media (prefers-reduced-motion: reduce) { .ch-building-media .ch-stage .ch-photo { animation: none; } }
.ch-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ch-thumbs button { width: 88px; height: 88px; padding: 0; border: 0; background: var(--stage); cursor: pointer; overflow: hidden; }
.ch-thumbs button[aria-pressed='true'] { outline: 2px solid var(--ink); outline-offset: 2px; }
.ch-thumbs button:not([aria-pressed='true']):hover { opacity: 0.8; }
.ch-building-text h1 { font-size: 60px; line-height: 0.98; }
.ch-sub { display: flex; align-items: center; gap: 8px; font-size: 17px; color: var(--muted); margin: 12px 0 28px; }
.ch-facts { margin: 0; border-top: 1px solid var(--line); }
.ch-facts > div { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.ch-facts dt { font-size: 14px; color: var(--muted); padding-top: 1px; }
.ch-facts dd { margin: 0; font-size: 16px; font-weight: 500; }
.ch-facts dd a { text-decoration: underline; text-decoration-color: #9a9a9a; }
.ch-facts dd a:hover { text-decoration-color: var(--ink); }
.ch-label-h { font-size: 24px; margin: 36px 0 4px; }
.ch-motif-rows a { min-height: 40px; }

/* — map — */
.ch-map-page { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 48px; align-items: start; padding-top: 40px; padding-bottom: 96px; }
.ch-map { position: relative; overflow: hidden; background: var(--paper); border: 1px solid var(--line); } /* aspect-ratio comes from map/shapes.js, so % positions match the SVG */
.ch-map-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ch-map-svg path { stroke: var(--paper); stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ch-map-neighbour { fill: #f4f4f4; }
.ch-map-rest { fill: color-mix(in srgb, var(--country) 40%, var(--paper)); }
.ch-map-unit { fill: var(--country); }
.ch-map-svg .ch-map-dkmt { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.ch-map-county { position: absolute; transform: translate(-50%, -50%); font-size: var(--county-fs, 12px); font-weight: 500; line-height: 1.3; white-space: pre; text-align: center; color: #4a4a4a; pointer-events: none; }
.ch-map-country { position: absolute; transform: translate(-50%, -50%); font-size: 13px; font-weight: 700; letter-spacing: 0.14em; color: #4a4a4a; pointer-events: none; }
.ch-map-note { position: absolute; left: 20px; top: 20px; display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 10px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.ch-map-key { width: 18px; border-top: 2px solid var(--ink); }
/* A marker's anchor is the centre of its circle (--d = circle size, set in Map.jsx); map/labels.js picks the name's side. */
.ch-marker { position: absolute; display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; cursor: pointer; transform: translate(calc(var(--d) / -2), -50%); }
.ch-marker-left { flex-direction: row-reverse; transform: translate(calc(-100% + var(--d) / 2), -50%); }
.ch-marker-bottom { flex-direction: column; gap: 2px; transform: translate(-50%, calc(var(--d) / -2)); }
.ch-marker-top { flex-direction: column-reverse; gap: 2px; transform: translate(-50%, calc(-100% + var(--d) / 2)); }
.ch-dot { width: var(--d); height: var(--d); flex: none; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; transition: background-color 0.15s, color 0.15s; }
.ch-marker-label { font-weight: 600; font-size: var(--fs, 15px); line-height: 1.3; white-space: nowrap; text-shadow: 0 0 3px var(--paper), 0 0 3px var(--paper), 0 0 6px var(--paper); }
.ch-marker:hover .ch-dot { background: var(--ink); color: var(--paper); }
.ch-marker[aria-pressed='true'] .ch-dot { background: var(--ink); color: var(--paper); box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--ink); }
.ch-marker[aria-pressed='true'] .ch-marker-label { font-weight: 700; }
.ch-marker-nolabel:not(:hover, :focus-visible) .ch-marker-label { display: none; } /* no room for the name: it shows on hover */
.ch-map-side { display: flex; flex-direction: column; gap: 20px; }
.ch-map-side h1 { font-size: 56px; line-height: 1; }
.ch-map-intro { font-size: 17px; line-height: 1.6; margin: 0; }
.ch-map-pills { display: none; flex-wrap: wrap; gap: 8px; }
.ch-map-panel { border-top: 1px solid var(--line); padding-top: 16px; }
.ch-map-panel-head { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.ch-map-panel h2 { font-size: 40px; margin: 6px 0 12px; }
.ch-map-list { display: flex; flex-direction: column; max-height: 460px; overflow-y: auto; margin-right: -12px; padding-right: 12px; border-top: 1px solid var(--line-soft); scrollbar-width: thin; }
.ch-map-row { display: flex; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); text-decoration: none; }
.ch-map-row:hover .ch-map-row-name { text-decoration: underline; text-underline-offset: 0.18em; }
.ch-map-row-name { font-family: var(--font-heading); font-weight: 700; font-size: 19px; line-height: 1.15; }
.ch-map-row .ch-muted { font-size: 14px; }
.ch-thumb { width: 56px; height: 56px; flex: none; overflow: hidden; background: var(--stage); }
.ch-map-panel .btn-block { margin-top: 20px; }
@media (max-width: 1200px) { .ch-map-page { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; } }

/* — motifs — */
.ch-family-rail { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; font-weight: 500; color: var(--muted); }
.ch-motif-family .ch-h2 a { text-decoration: none; }
.ch-motif-family .ch-h2 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.12em; }
.ch-family-icon { width: 72px; height: 72px; }
.ch-family-intro { margin: 0 0 28px; }
.ch-motif-family.ch-sec { padding-bottom: 64px; }
/* A family's motifs: icon, name and count, unboxed, under one rule. */
.ch-specimens { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 28px 24px; padding-top: 24px; border-top: 1px solid var(--line-soft); }
.ch-motif { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-decoration: none; }
.ch-motif:hover .ch-motif-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.ch-motif-img { width: 72px; height: 72px; margin-bottom: 10px; overflow: hidden; background: var(--stage); }
.ch-motif-icon { background: none; }
.ch-motif-icon .ch-icon { width: 100%; height: 100%; }
.ch-motif-name { font-family: var(--font-heading); font-weight: 700; font-size: 20px; line-height: 1.15; }
.ch-motif-n { font-size: 13px; color: var(--muted); }
.ch-compare-grid { display: grid; grid-template-columns: minmax(0, 1fr) 240px minmax(0, 1fr); gap: 32px; align-items: start; }
.ch-compare-side select.input { margin-bottom: 12px; }
.ch-compare-photo { display: flex; aspect-ratio: 4 / 3; }
.ch-compare-side h3 { font-size: 26px; margin: 16px 0 6px; }
.ch-compare-side h3 a { text-decoration: none; }
.ch-compare-side h3 a:hover { text-decoration: underline; }
.ch-compare-side .ch-muted { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.ch-compare-mid { display: flex; flex-direction: column; gap: 6px; padding-top: 56px; }
.ch-compare-label { font-family: var(--font-heading); font-weight: 700; font-size: 20px; margin-top: 12px; }
.ch-compare-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ch-compare-list li { padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.ch-compare-shared li { font-weight: 600; }
@media (max-width: 1100px) { .ch-compare-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .ch-compare-mid { grid-column: 1 / -1; grid-row: 2; padding-top: 0; } }

/* — about — */
.ch-about-intro { padding-top: 48px; padding-bottom: 72px; }
.ch-about-intro h1 { font-size: 64px; line-height: 1; }
.ch-about-lead { font-size: 22px; line-height: 1.55; max-width: 52ch; margin: 28px 0 20px; }
.ch-rows-plain li > span { font-size: 16px; }
.ch-timeline { list-style: none; margin: 0; padding: 0; }
.ch-timeline li { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; padding: 20px 0; border-bottom: 1px solid var(--line-soft); }
.ch-timeline li:first-child { padding-top: 4px; }
.ch-year { font-family: var(--font-heading); font-weight: 700; font-size: 56px; line-height: 0.9; }
.ch-timeline h3 { font-size: 28px; margin-bottom: 8px; }
.ch-timeline h3 a { text-decoration: none; }
.ch-timeline h3 a:hover { text-decoration: underline; }
.ch-timeline p { font-size: 17px; line-height: 1.6; max-width: 58ch; margin: 0; }
.ch-names { list-style: none; margin: 0; padding: 0; -moz-columns: 3; columns: 3; -moz-column-gap: 32px; column-gap: 32px; border-top: 1px solid var(--line-soft); }
.ch-names li { padding: 9px 0; border-bottom: 1px solid var(--line-soft); -moz-column-break-inside: avoid; break-inside: avoid; }

/* — four cities — */
.ch-fc-head { padding-top: 48px; padding-bottom: 48px; }
.ch-fc-head-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.ch-fc-head h1 { font-size: 72px; line-height: 0.96; }
.ch-fc-head .ch-body { margin: 0; }
.ch-fc-cities { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding-bottom: 88px; }
.ch-fc-city { display: flex; flex-direction: column; }
.ch-fc-city > a { display: block; }
.ch-fc-img { aspect-ratio: 4 / 5; overflow: hidden; background: var(--stage); }
/* Odesa has no photos in the catalogue: its frame carries the name instead. */
.ch-fc-img-empty { display: grid; place-items: center; font-family: var(--font-heading); font-weight: 700; font-size: clamp(40px, 5vw, 72px); color: #7a7a7a; }
.ch-fc-city .ch-dash { margin: 16px 0 10px; }
.ch-fc-city h2 { font-size: 30px; }
.ch-fc-city .ch-muted { font-size: 15px; }
.ch-fc-found p { font-family: var(--font-heading); font-weight: 700; font-size: 36px; line-height: 1.15; max-width: 30ch; margin: 0 0 28px; }

/* — partners — */
.ch-partners .ch-sec { padding-bottom: 56px; }
.ch-partner-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
.ch-partner { display: flex; flex-direction: column; gap: 12px; padding: 16px 0 20px; border-bottom: 1px solid var(--line-soft); }
.ch-partner-logo { height: 88px; display: grid; place-items: center; padding: 12px 20px; border: 1px solid var(--line-soft); }
.ch-partner-logo img { max-height: 60px; max-width: 100%; -o-object-fit: contain; object-fit: contain; }
.ch-partner-name { font-family: var(--font-heading); font-weight: 700; font-size: 21px; line-height: 1.2; }
.ch-partner .ch-muted { font-size: 14px; margin-top: 2px; }

/* — contact — */
.ch-contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: start; padding-top: 48px; padding-bottom: 120px; }
.ch-contact h1 { font-size: 64px; line-height: 1; }
.ch-contact-intro { font-size: 18px; line-height: 1.6; margin: 20px 0 32px; max-width: 44ch; }
.ch-contact-info { margin: 0; border-top: 1px solid var(--line); }
.ch-contact-info > div { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.ch-contact-info dt { font-size: 14px; font-weight: 600; }
.ch-contact-info dd { margin: 4px 0 0; font-size: 16px; line-height: 1.55; color: #262626; }
.ch-contact-form { display: flex; flex-direction: column; gap: 22px; border-top: 1px solid var(--line); padding-top: 24px; }
.ch-contact-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.ch-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.ch-topic { flex-wrap: wrap; }
.ch-field-error { display: block; margin-top: 6px; font-size: 14px; font-weight: 600; }
.ch-field-error::before { content: '— '; }
.ch-send { align-self: flex-start; min-width: 180px; }
.ch-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.ch-contact-sent h2 { font-size: 44px; }
.ch-contact-sent p { font-size: 18px; margin: 0; }
.ch-contact-sent .btn { align-self: flex-start; }
@media (max-width: 1100px) { .ch-contact { gap: 40px; } .ch-contact-row { grid-template-columns: 1fr; } }

/* — tablets — */
@media (max-width: 1200px) {
  .ch-tiles-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ch-rows-cols { -moz-columns: 3; columns: 3; }
  .ch-partner-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ch-building-text h1 { font-size: 48px; }
}

/* — phones — */
@media (max-width: 900px) {
  .ch-header-in { gap: 12px; padding-top: 10px; padding-bottom: 10px; }
  .ch-brand img { width: 44px; height: 44px; }
  .ch-lang { padding-left: 0; border-left: 0; }
  .ch-lang-opt { min-width: 30px; min-height: 44px; font-size: 12px; }

  .ch-sec { padding-top: 16px; padding-bottom: 48px; }
  .ch-sec-last { padding-bottom: 64px; }
  /* One column: the heading comes first, the running head sits under it, then the rest. */
  .ch-sec-grid { grid-template-columns: 1fr; }
  .ch-sec-grid > div:not(.ch-rail) { display: contents; }
  .ch-sec-grid > div:not(.ch-rail) > * { order: 2; }
  .ch-sec-grid > div:not(.ch-rail) > :first-child { order: 0; }
  .ch-sec-grid > .ch-rail { order: 1; padding-top: 0; margin: -16px 0 20px; color: var(--muted); font-size: 14px; font-weight: 500; }
  .ch-rail-h { font-size: 26px; margin-bottom: 16px; }
  .ch-h2 { font-size: 30px; margin-bottom: 20px; }
  .ch-sec-title { flex-wrap: wrap; }
  .ch-page-head { padding-top: 24px; padding-bottom: 24px; }
  .ch-page-head h1, .ch-cat-head h1, .ch-contact h1, .ch-about-intro h1 { font-size: 44px; }
  .ch-page-head p { font-size: 16px; }
  .ch-body { font-size: 16px; }

  .ch-home-head { padding-top: 20px; padding-bottom: 16px; }
  .ch-display { font-size: 46px; line-height: 0.98; }
  .ch-home-intro { grid-template-columns: 1fr; gap: 0; margin-top: 16px; }
  .ch-home-intro .ch-rail { margin-bottom: 10px; color: var(--muted); font-size: 14px; font-weight: 500; padding-top: 0; }
  .ch-lead { font-size: 16px; line-height: 1.55; }
  .ch-home-intro .ch-actions { margin-top: 16px; flex-wrap: wrap; }
  .ch-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ch-strip-item:first-child { grid-column: 1 / -1; }
  .ch-strip-img { height: 180px; }
  .ch-strip-item:first-child .ch-strip-img { height: 260px; }
  .ch-strip-item:nth-child(n+4) { display: none; } /* the first three already show all three countries */
  .ch-strip-wrap { padding-bottom: 48px; }
  .ch-index { grid-template-columns: 1fr; gap: 28px; }
  .ch-rows-cols { -moz-columns: 2; columns: 2; -moz-column-gap: 20px; column-gap: 20px; }
  .ch-tiles, .ch-tiles-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; }
  .ch-tiles-3 { grid-template-columns: 1fr; }
  .ch-tile-title { font-size: 18px; }
  .ch-tile-sub { font-size: 13px; }
  .ch-fc-teaser { grid-template-columns: 1fr; gap: 24px; }

  .ch-cat-head { display: block; padding-top: 24px; padding-bottom: 16px; }
  .ch-cat-head p { font-size: 15px; margin: 6px 0 16px; }
  .ch-search { width: 100%; }
  .ch-mobile-only { display: flex; }
  .ch-cat-body { display: block; padding-top: 20px; padding-bottom: 56px; }
  .ch-cat-body > aside { display: none; }
  .ch-chapter-head h2 { font-size: 28px; }
  .ch-chapter-text p { font-size: 16px; }

  .ch-crumbs { padding-top: 12px; padding-bottom: 12px; }
  .ch-building { grid-template-columns: 1fr; gap: 24px; padding-top: 0; border-top: 0; padding-left: 0; padding-right: 0; }
  .ch-building-media .ch-stage { height: auto; }
  .ch-building-media .ch-stage .ch-photo { height: auto; max-height: 72vh; }
  .ch-thumbs { padding: 0 var(--gutter); }
  .ch-thumbs button { width: 64px; height: 64px; }
  .ch-building-text { padding: 0 var(--gutter); }
  .ch-building-text h1 { font-size: 40px; }
  .ch-facts > div { grid-template-columns: 108px minmax(0, 1fr); }
  .ch-building-text .ch-actions .btn { flex: 1 1 100%; }

  .ch-map-page { display: flex; flex-direction: column; align-items: stretch; gap: 16px; padding-top: 20px; padding-bottom: 56px; } /* the map has only absolute children: it needs the stretch for a width */
  .ch-map-side { display: contents; }
  .ch-map-side h1 { order: 0; font-size: 40px; }
  .ch-map-intro { order: 0; font-size: 15px; }
  .ch-map { order: 1; }
  .ch-map-pills { order: 2; display: flex; }
  .ch-map-pills .btn { min-height: 40px; padding: 8px 12px; font-size: 14px; }
  .ch-map-panel { order: 3; }
  .ch-dot { font-size: 11px; }
  .ch-map-country { font-size: 11px; }
  .ch-map-note { left: 10px; top: 10px; font-size: 11px; padding: 4px 8px; }
  .ch-map-list { max-height: none; overflow: visible; }

  .ch-family-rail { flex-direction: row; align-items: center; gap: 12px; }
  .ch-family-icon { width: 44px; height: 44px; }
  .ch-specimens { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .ch-motif-img { width: 56px; height: 56px; }
  .ch-motif-name { font-size: 18px; }
  .ch-compare-grid { grid-template-columns: 1fr; gap: 24px; }
  .ch-compare-mid { grid-row: auto; } /* between the two buildings */

  .ch-about-intro { padding-top: 24px; padding-bottom: 40px; }
  .ch-about-lead { font-size: 18px; }
  .ch-timeline li { grid-template-columns: 1fr; gap: 8px; }
  .ch-year { font-size: 40px; }
  .ch-names { -moz-columns: 1; columns: 1; }

  .ch-fc-head { padding-top: 24px; padding-bottom: 32px; }
  .ch-fc-head-in { grid-template-columns: 1fr; gap: 16px; }
  .ch-fc-head h1 { font-size: 48px; }
  .ch-fc-cities { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; padding-bottom: 48px; }
  .ch-fc-city h2 { font-size: 24px; }
  .ch-fc-found p { font-size: 26px; }

  .ch-partner-grid { grid-template-columns: 1fr; }

  .ch-contact { grid-template-columns: 1fr; gap: 32px; padding-top: 24px; padding-bottom: 64px; }
  .ch-contact-intro { font-size: 16px; margin: 14px 0 20px; }
  .ch-topic { display: flex; flex-direction: column; }
  .ch-topic .seg-opt + .seg-opt { border-left: 0; border-top: 1px solid var(--ink); }
  .ch-send, .ch-contact-sent .btn { align-self: stretch; }

  .ch-footer-in { grid-template-columns: 1fr 1fr; gap: 32px 20px; padding-top: 40px; padding-bottom: 48px; }
  .ch-footer-about { grid-column: 1 / -1; }
}
