/* Inner pages: page header, layouts, content blocks and page types.
   Loaded on every page except the home page. Tokens live in site.css. */

/* ---------- Page header ---------- */

.page-header { background: var(--navy); color: var(--white); padding-block: 16px 28px; }
.page-header__rule { display: block; width: 40px; height: 4px; margin-bottom: 14px; background: var(--accent); }
.page-header__eyebrow { margin-bottom: 8px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lavender); }
.page-header h1 { font-size: clamp(1.875rem, 1.3rem + 2.4vw, 2.75rem); letter-spacing: -0.02em; }
.page-header__lead { margin-top: 10px; max-width: 680px; font-size: 1rem; color: #D4D5F5; }
@media (min-width: 960px) {
  .page-header { padding-block: 20px 44px; }
  .page-header__rule { width: 48px; margin-bottom: 16px; }
  .page-header__eyebrow { font-size: 0.875rem; }
  .page-header__lead { font-size: 1.125rem; }
}

.breadcrumbs { margin-bottom: 20px; font-size: 0.875rem; color: var(--muted); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 2px 0; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-inline: 0.5em; }
.breadcrumbs--dark { color: var(--lavender); }
.breadcrumbs--dark a { color: #D4D5F5; }
.breadcrumbs a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.breadcrumbs a:hover { text-decoration-color: currentColor; }
.crumb-strip { background: var(--sand); border-bottom: 1px solid var(--line); padding-block: 14px; }
.crumb-strip .breadcrumbs { margin: 0; }
.crumb-strip .breadcrumbs a { text-decoration-color: currentColor; }
@media (min-width: 960px) { .page-header .breadcrumbs { margin-bottom: 24px; } }

/* ---------- Layouts ---------- */

.page { padding-block: 28px 56px; }
@media (min-width: 960px) { .page { padding-block: 40px 72px; } }

.layout { display: flex; flex-direction: column; gap: 32px; }
.layout__main { min-width: 0; }
.layout__side { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.layout__sticky { display: flex; flex-direction: column; gap: 24px; }
/* A page without a side column: the text starts at the left edge, lines stay readable. */
.layout--single .layout__main { max-width: 1000px; }
@media (min-width: 960px) {
  .layout { flex-direction: row; gap: 48px; align-items: flex-start; }
  .layout__main { flex: 1 1 0; }
  /* Stays in view below the sticky site header; a long one scrolls inside itself. */
  .layout--sidebar-left .layout__side { flex: 0 0 240px; position: sticky; top: var(--anchor-top); max-height: calc(100dvh - var(--anchor-top) - 16px); overflow-y: auto; }
  .layout--sidebar-right { gap: 56px; }
  .layout--sidebar-right .layout__side { flex: 0 0 320px; }
}
.narrow { max-width: 680px; }
.narrow-wide { max-width: 900px; }
.empty { padding: 18px 20px; background: var(--sand); border-radius: 8px; color: var(--muted); }
.back { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.arrow-link--back .icon { transform: rotate(180deg); }

.side-heading { margin-bottom: 6px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); line-height: 1.55; }
.toc ul { border-top: 2px solid var(--navy); font-size: 0.9375rem; font-weight: 600; }
.toc a { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--navy); }
.side-box { padding: 20px; border: 1px solid var(--line); border-radius: 8px; }
.side-box h2 { margin-bottom: 10px; font-size: 1.125rem; }
.side-box__links { display: flex; flex-direction: column; gap: 6px; }
.side-box p { margin-top: 12px; font-size: 0.875rem; }
.side-list { padding-top: 18px; border-top: 2px solid var(--navy); }
.side-list h2 { margin-bottom: 12px; font-size: 1.25rem; }
.side-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.side-list__title { min-width: 0; font-weight: 600; }
.side-list .filebtns { flex: none; }
.promo-box--side { width: auto; margin: 0; }
.next-card { display: flex; flex-direction: column; gap: 6px; padding: 22px; background: var(--navy); color: var(--white); border-radius: 8px; --focus: var(--accent); }
.next-card:hover { color: var(--white); text-decoration: none; box-shadow: 0 6px 18px rgb(23 24 74 / 0.25); }
.next-card__eyebrow { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lavender); }
.next-card strong { font-size: 1.25rem; line-height: 1.2; }
.next-card span:last-child { font-size: 0.9375rem; color: #D4D5F5; }

/* ---------- Body: rich text and blocks ---------- */

.body { --body-gap: 28px; display: flex; flex-direction: column; gap: var(--body-gap); font-size: 1.0625rem; line-height: 1.65; }
.body > :first-child { margin-top: 0; }
.body--article { --body-gap: 22px; font-size: 1.125rem; line-height: 1.7; }
.body--program { --body-gap: 44px; }

.prose > * + * { margin-top: 0.9em; }
.prose h2, .block > h2, .block__head h2 { font-size: 1.625rem; line-height: 1.2; letter-spacing: -0.01em; }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; font-size: 1.25rem; }
.prose h4 { margin-top: 1.2em; font-size: 1.0625rem; }
.page .prose ul, .page .prose ol, .page .faq__answer ul, .page .faq__answer ol { padding-left: 1.3em; list-style: revert; }
.page .prose li + li, .page .faq__answer li + li { margin-top: 0.35em; }
.prose a, .note a, .faq__answer a, .timeline__text a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
/* A paragraph that is only a link: arrow link as elsewhere; long texts may wrap. */
.prose .arrow-link { display: inline; text-decoration: none; white-space: normal; }
.prose .arrow-link:hover { text-decoration: underline; }
.prose .arrow-link .icon { display: inline-block; margin-left: 6px; vertical-align: -3px; }
.body--program .prose h2, .body--program .block > h2, .body--program .block__head h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); letter-spacing: -0.015em; }

.block > h2 { margin-bottom: 14px; }
.block__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; margin-bottom: 14px; }
.block__note { margin: -6px 0 12px; font-size: 0.9375rem; color: var(--muted); }
.block--tinted { padding: 24px; background: var(--sand); border-radius: 8px; }
@media (min-width: 640px) { .block--tinted { padding: 32px; } }

/* Facts */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 0; overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: 8px; }
.facts > div { padding: 18px 20px; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.facts dt { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); line-height: 1.5; }
.facts dd { margin: 4px 0 0; font-size: 1.1875rem; font-weight: 700; line-height: 1.3; }
.facts dd a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.facts dd a:hover { color: var(--accent); }
.facts dd small { display: block; margin-top: 2px; font-size: 0.8125rem; font-weight: 400; color: var(--muted); }
.facts--overlap { position: relative; margin-top: -32px; }
.today--aside { margin-bottom: 16px; }
.today--aside .today__widget { padding: 10px 12px; }
.today__more { align-self: flex-end; margin-top: 2px; color: var(--accent); }

/* Note / alert */
.note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--lavender-bg); border-radius: 8px; }
.note > .icon { margin-top: 2px; color: var(--link); }
.note--warning { background: #FBEDE7; }
.note--warning > .icon { color: var(--accent); }
.note__title { display: block; }

/* Timeline */
.page .timeline { margin-left: 5px; padding-left: 4px; border-left: 2px solid var(--line); }
.timeline__item { position: relative; padding: 0 0 22px 28px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before { content: ""; position: absolute; left: -11px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 2px solid var(--accent); }
.timeline__item--highlight::before { background: var(--accent); }
.timeline__date { display: block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.timeline__title { display: block; font-size: 1.0625rem; font-weight: 600; line-height: 1.4; }
.timeline__text { margin-top: 4px; font-size: 0.9375rem; color: var(--muted); }

/* Documents */
.doclist { border-top: 2px solid var(--navy); }
.doclist__heading { margin: 22px 0 8px; font-size: 1.0625rem; }
.doclist__heading:first-of-type { margin-top: 0; }
.doclist__source { margin-block: 32px 12px; }
.doclist__source:first-child { margin-top: 0; }
.doclist__source a { color: inherit; }
.doclist__source a:hover { color: var(--accent); }
.doclist__item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 1rem; line-height: 1.45; }
.doclist__title { flex: 1 1 280px; min-width: 0; font-weight: 600; }
.doclist__meta { display: block; font-size: 0.875rem; font-weight: 400; color: var(--muted); }
.doclist__preview { flex: none; width: 48px; height: 64px; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; }
/* A picture to download (a logo): whole, not cropped like the cover of a document. */
.doclist__preview--picture { width: 112px; padding: 6px; object-fit: contain; background: var(--white); }
.doclist__preview--picture + .doclist__title { flex-basis: 160px; }  /* beside the picture on a phone too */
.doclist__item--superseded .doclist__title { color: var(--muted); }
/* The same rows as links to pages (block "Karty / rozcestník" as a list). */
.doclist--links .doclist__item { flex-wrap: nowrap; color: var(--navy); }
.doclist--links .doclist__item:hover { color: var(--accent); text-decoration: none; }
.doclist--links .doclist__title { flex-basis: 0; }
.doclist--links svg { flex: none; color: var(--accent); }
.filebtns { display: flex; flex-wrap: wrap; gap: 6px; }
.filebtn { --format: var(--muted); display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 0.75rem; font-weight: 700; color: var(--format); white-space: nowrap; }
.filebtn:hover { color: var(--format); text-decoration: none; border-color: var(--format); }
.filebtn--pdf { --format: #B84A2A; }
.filebtn--doc, .filebtn--docx, .filebtn--odt, .filebtn--rtf { --format: #2F5BD3; }
.filebtn--xls, .filebtn--xlsx, .filebtn--ods, .filebtn--csv { --format: #1E7A45; }
.tag--muted, .tag--ukoncen { background: var(--muted); }
.tag--bezi { background: #1E7A45; }

/* Figure, quote */
.figure { margin: 0; }
.figure img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
/* A picture beside the text: the body is a flex column, where nothing floats, so a body with
   such a picture becomes a plain flow. The text block next to the picture keeps its own
   column for its whole length and does not run under the picture. */
@media (min-width: 640px) {
  .body:has(> .figure--aside) { --aside-width: min(46%, 400px); --aside-gap: 32px; display: flow-root; }
  .body:has(> .figure--aside) > * + * { margin-top: 28px; }
  .body:has(> .figure--aside) > .figure--aside:first-child + * { margin-top: 0; }
  .body:has(> .figure--aside) > * + .figure--aside { margin-top: 34px; }
  .body:has(> .figure--aside) > :not(.prose, .figure--aside) { clear: both; }
  .figure--aside { float: right; clear: right; width: var(--aside-width); margin: 6px 0 20px var(--aside-gap); }
  .figure--aside + .prose { margin-right: calc(var(--aside-width) + var(--aside-gap)); }
  /* A larger picture beside a short text (the invitation to the open days). */
  .body:has(> .figure--aside) { --aside-large: min(60%, 520px); }
  .figure--aside.figure--large { width: var(--aside-large); }
  .figure--large + .prose { margin-right: calc(var(--aside-large) + var(--aside-gap)); }
  .figure--aside figcaption { text-align: center; }
  /* A map beside the text: its long caption reads from the left. It keeps the margins of
     a picture there (.map resets them) with more room below the stops, and it sits close
     to the picture above it. */
  .map.figure--aside { margin: 6px 0 32px var(--aside-gap); }
  .map.figure--aside figcaption { text-align: left; }
  .body:has(> .figure--aside) > .figure--aside + .map.figure--aside { margin-top: 0; }
  /* The lunch widget above a picture beside the text: one column with the picture. */
  .body:has(> .figure--aside) > .today--aside + .figure--aside { margin-top: 0; }
}
/* A picture that opens in the lightbox: a small label in the corner says so. */
.figure__zoom { position: relative; display: block; }
.figure__zoom-hint {
  position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--radius); background: var(--white); color: var(--navy);
  font-size: 0.8125rem; font-weight: 700; box-shadow: 0 2px 8px rgb(23 24 74 / 0.2);
}
.figure__zoom:hover .figure__zoom-hint { background: var(--navy); color: var(--white); }
.figure figcaption, .map figcaption { margin-top: 8px; font-size: 0.875rem; color: var(--muted); }
/* A link below the picture (with its caption): on the right, and when a text opening with
   a heading follows, on the line of that heading. */
.figure__more { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 4px 16px; }
.figure__more .arrow-link { font-size: 1rem; }
@media (min-width: 640px) {
  .figure:not(.figure--aside):has(> .figure__more):has(+ .prose > h2:first-child) { position: relative; }
  .figure:not(.figure--aside):has(+ .prose > h2:first-child) > .figure__more {
    position: absolute; right: 0; top: 100%; max-width: 48%; min-height: 1.95rem; margin-top: var(--body-gap); align-items: center;
  }
  .figure:not(.figure--aside):has(> .figure__more) + .prose > h2:first-child { max-width: 50%; }
}
.quote { margin: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); }
.quote blockquote { margin: 0; font-size: 1.25rem; line-height: 1.5; color: #3D3F66; }
.quote figcaption { margin-top: 8px; font-size: 0.9375rem; color: var(--muted); }
.quote figcaption::before { content: "— "; }

/* Photo grid + lightbox */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.photo-grid a { display: block; overflow: hidden; border-radius: 4px; background: var(--sand-dark); }
.photo-grid img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform 0.3s; }
.photo-grid a:hover img { transform: scale(1.04); }
/* Album preview under an article: always whole rows (8 photos = 2 × 4 on phones, 4 × 2 from 640 px) */
.photo-grid--preview { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) {
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .photo-grid--mosaic li:first-child { grid-column: span 2; grid-row: span 2; }
  .photo-grid--mosaic li:first-child a, .photo-grid--mosaic li:first-child img { height: 100%; }
  .photo-grid--preview { grid-template-columns: repeat(4, 1fr); }
}

.lightbox { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: rgb(12 12 40 / 0.96); color: var(--white); --focus: var(--white); }
.lightbox::backdrop { background: rgb(12 12 40 / 0.96); }
.lightbox__inner { display: grid; grid-template-rows: auto 1fr auto; height: 100%; }
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 16px; font-size: 0.875rem; }
.lightbox__stage { display: flex; align-items: center; justify-content: center; min-height: 0; padding-inline: 8px; }
.lightbox__stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox__caption { min-height: 2.6em; padding: 10px 16px 16px; text-align: center; font-size: 0.9375rem; }
.lightbox button { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; cursor: pointer; background: rgb(255 255 255 / 0.12); border: 0; border-radius: 50%; color: var(--white); }
.lightbox button:hover { background: rgb(255 255 255 / 0.25); }
.lightbox button[hidden] { display: none; }  /* no arrows for a single picture */
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: 12px; }
.lightbox__nav--prev .icon { transform: rotate(180deg); }
.lightbox__nav--next { right: 12px; }

/* FAQ */
.faq { border-top: 2px solid var(--navy); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: 12px; padding: 16px 0; cursor: pointer; list-style: none; font-size: 1.0625rem; font-weight: 700; line-height: 1.4; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 1.375rem; font-weight: 400; line-height: 1; color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq__answer { padding-bottom: 16px; color: #3D3F66; }
.faq__answer > * + * { margin-top: 0.7em; }
.faq details > .doclist { margin-bottom: 16px; border-top-width: 1px; }

/* People */
.people { display: flex; flex-direction: column; gap: 12px; }
.person { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.people .person { padding: 20px; border: 1px solid var(--line); border-radius: 8px; }
.person__photo { flex: none; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #E8E6E0; }
.person__name { flex: 1 1 200px; min-width: 0; line-height: 1.4; }
.person__name strong { display: block; font-size: 1.0625rem; }
.person__name span { color: var(--muted); }
.person__contact { flex: 1 1 200px; min-width: 0; font-size: 0.9375rem; line-height: 1.7; overflow-wrap: anywhere; }
.person__contact a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.person__hours { color: var(--muted); }
.side-box .person__photo { width: 56px; height: 56px; }

/* Video */
.video { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: var(--navy); border-radius: var(--radius); }
.video__link { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; color: var(--white); text-align: center; --focus: var(--white); }
.video__link:hover { color: var(--white); text-decoration: none; }
.video__link img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.video__play { position: relative; display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; background: var(--accent); border-radius: 50%; transition: transform 0.15s; }
.video__link:hover .video__play { transform: scale(1.08); }
.video__text { position: relative; display: flex; flex-direction: column; gap: 2px; }
.video__text span { font-size: 0.8125rem; color: var(--navy-text); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 24px; }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.45; }
.table-wrap caption { padding: 12px 16px; text-align: left; font-weight: 700; }
.table-wrap th, .table-wrap td { padding: 10px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table-wrap .amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-wrap thead th { background: var(--sand); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.table-wrap tbody tr:last-child > * { border-bottom: 0; }
.substitution__filters { display: grid; gap: 12px; margin-bottom: 8px; }
.substitution__filter { display: grid; gap: 6px; }
.substitution__filter-label { color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.substitution__filters .chips { margin-bottom: 0; }
.substitution__filters .chips ul { gap: 6px; }
.substitution__filters .chips a { padding: 6px 12px; }
@media (min-width: 640px) {
  .substitution__filter { grid-template-columns: 7.5em 1fr; align-items: baseline; }
}
.substitution__day { margin-block: 24px 10px; font-size: 1.25rem; }
.substitution th[scope="rowgroup"] { width: 5.5em; white-space: nowrap; }
.substitution td:first-of-type { width: 6em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.substitution__source { margin-top: 12px; font-size: 0.875rem; color: var(--muted); }
.table-wrap--narrow { max-width: 560px; font-variant-numeric: tabular-nums; }
/* The lesson going on (terracotta) or the break after it (blue), like the wedge of the clock. */
.bells tr[data-now="lesson"] > * { background: var(--accent-bg); font-weight: 700; }
.bells tr[data-now="lesson"] > th { box-shadow: inset 4px 0 0 var(--accent); }
.bells tr[data-now="break"] > * { background: var(--lavender-bg); }
.bells tr[data-now="break"] > td:last-child { font-weight: 700; box-shadow: inset 4px 0 0 var(--link); }
.programs-table { min-width: 620px; }
.programs-table td:nth-child(2) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.programs-table .programs-table__group th { padding-block: 8px; background: var(--sand); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.programs-table thead th { background: var(--white); }

/* Study paths: the tracks of the home page (.track in site.css) joined by steps */
.paths { display: flex; flex-direction: column; line-height: 1.55; }
.paths__row { display: grid; gap: 16px; }
.paths__col { display: flex; flex-direction: column; min-width: 0; }
.paths__col > .track:last-child { flex: 1; }
.paths__step { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-block: 8px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--accent); }
.paths__step:first-child { padding-top: 0; }
.paths__step svg { transform: rotate(90deg); }
@media (min-width: 640px) {
  .paths__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .paths__final { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; align-items: center; padding-bottom: 22px; }
  .paths__final .track__list { margin-top: 0; }
  .paths__final .track__link { border-top: 0; }
}

/* Staff list */
.staff__group { margin-block: 32px 12px; }
.staff__group:first-child { margin-top: 0; }
/* A real table, one per group: name with position, phones, e-mail, room. Every number and
   room starts with a tag of the same width (building or "mobil"), so the values stand in a
   column. Where the block is narrower than 820 px the cells of a person are stacked and
   the column heads hidden. */
.staff-block { container-type: inline-size; }
.staff { overflow-wrap: anywhere; }
.staff thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.staff tr { display: block; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.staff tbody tr:last-child { border-bottom: 0; }
.table-wrap .staff tbody th, .table-wrap .staff td { display: block; padding: 0; border: 0; }
.table-wrap .staff td:not(:empty) { margin-top: 6px; }
.staff__name { font-weight: 400; }
.staff__name strong { display: block; font-size: 1rem; }
.staff__name span { display: block; font-size: 0.8125rem; color: var(--muted); }
.staff__phones > span, .staff__mail a, .staff__room > span { display: block; }
.staff__phones { font-variant-numeric: tabular-nums; white-space: nowrap; }
.staff__tag { display: inline-block; min-width: 46px; margin-right: 6px; padding: 0 6px; border-radius: 4px; background: var(--sand); color: var(--muted); font-size: 0.75rem; font-weight: 600; line-height: 1.5; text-align: center; text-decoration: none; vertical-align: 1px; }
.staff__tag--none { background: none; }
.body .staff__mail a { text-decoration: none; }
.body .staff__mail a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.placements__note { margin: -4px 0 12px; font-size: 0.9375rem; color: var(--muted); }
.placements th[scope="row"] { font-weight: 600; }
.placements__field { width: 1%; white-space: nowrap; }
.placements a { text-decoration: underline; text-underline-offset: 3px; }
.staff__legend { margin-top: 12px; font-size: 0.875rem; color: var(--muted); }
.staff__legend abbr { font-weight: 600; text-decoration: none; }
@container (min-width: 820px) {
  .staff { table-layout: fixed; }
  .staff thead { position: static; display: table-header-group; width: auto; height: auto; clip-path: none; }
  .staff tr { display: table-row; padding: 0; border: 0; }
  .table-wrap .staff tbody th, .table-wrap .staff td { display: table-cell; margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table-wrap .staff tbody tr:last-child > * { border-bottom: 0; }
  .staff tbody tr:hover > * { background: var(--sand); }
  .staff tbody tr:hover .staff__tag:not(.staff__tag--none) { background: var(--white); }
  /* Just what the longest number, address and room need; the name gets the rest. */
  .staff th:nth-child(2) { width: 188px; }
  .staff th:nth-child(3) { width: 252px; }
  .staff th:nth-child(4) { width: 132px; }
  .staff__label { display: none; }
}

/* Map */
.map { margin: 0; }
/* Under its heading the plan is not stretched over the column (owner, 14 Oct 2026: too big). */
.block > .map { max-width: 600px; }
.map a { position: relative; display: block; overflow: hidden; border-radius: 8px; background: #E8E6E0; }
.map img { display: block; width: 100%; height: auto; }
.map__link { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; background: var(--white); border-radius: var(--radius); color: var(--navy); font-size: 0.875rem; font-weight: 700; box-shadow: 0 2px 8px rgb(23 24 74 / 0.2); }

/* Buttons */
.button--outline { background: none; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--navy); }
.button--outline:hover { background: var(--navy); color: var(--white); }
.button--light { background: var(--white); color: var(--navy); }
.button--light:hover { background: var(--lavender-bg); color: var(--navy); }

/* Payment */
.payment { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; }
.page .payment__details { flex: 1 1 280px; display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; font-size: 1rem; }
.payment__details > div { display: contents; }
.payment__details dt { color: var(--muted); }
.payment__details dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.payment__qr { flex: none; margin: 0; text-align: center; }
.payment__qr svg { display: block; width: 168px; height: 168px; margin-inline: auto; }
.payment__qr figcaption { max-width: 180px; margin-top: 4px; font-size: 0.8125rem; line-height: 1.35; color: var(--muted); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 20px; border: 1px solid var(--line); border-top: 3px solid var(--navy); border-radius: var(--radius); color: var(--navy); transition: box-shadow 0.15s; }
.card:hover { color: var(--navy); text-decoration: none; box-shadow: 0 6px 18px rgb(23 24 74 / 0.14); border-top-color: var(--accent); }
.card strong { font-size: 1.0625rem; line-height: 1.3; }
.card span { font-size: 0.9375rem; line-height: 1.45; color: var(--muted); }
.page > .block + .block, .narrow-wide > .block + .block { margin-top: 36px; }

/* ---------- Forms ---------- */

.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--textarea, .field--checkbox, .field--radioselect, .field--checkboxselectmultiple, .form__errors, .form__note, .form__actions { grid-column: 1 / -1; }
.field__label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); line-height: 1.5; }
.field fieldset { margin: 0; padding: 0; border: 0; }
.field input:not([type="checkbox"], [type="radio"]), .field select, .field textarea, .searchform input {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 1rem; color: var(--navy);
  background: var(--white); border: 1px solid #8E8C86; border-radius: var(--radius);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input[type="checkbox"], .field input[type="radio"] { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--accent); }
.field__check, .field fieldset label { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9375rem; color: #3D3F66; }
.field fieldset > div { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.field__required { color: var(--accent); }
.field__help, .form__note { font-size: 0.875rem; color: var(--muted); }
.field__error, .form__errors { font-size: 0.875rem; font-weight: 600; color: #A12B12; }
.form__errors ul { padding: 0; list-style: none; }
.field--invalid input, .field--invalid textarea, .field--invalid select { border-color: #A12B12; box-shadow: 0 0 0 1px #A12B12; }
.form .button, .searchform .button { border: 0; cursor: pointer; font-family: inherit; }

/* ---------- Search ---------- */

.searchform { display: flex; gap: 10px; max-width: 640px; margin-top: 18px; }
.searchform input { flex: 1 1 auto; min-width: 0; border-color: transparent; }
.search-count { margin-bottom: 16px; color: var(--muted); }
.search-results { max-width: 800px; border-top: 2px solid var(--navy); }
.search-results li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.search-results a { font-size: 1.125rem; font-weight: 700; }
.search-results p { margin-top: 4px; color: var(--muted); }

/* ---------- Chips (pagination is in site.css: the home page uses it too) ---------- */

.chips { margin-bottom: 20px; }
.chips ul { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: block; padding: 8px 16px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--navy); font-size: 0.875rem; font-weight: 600; }
.chips a:hover { border-color: var(--navy); text-decoration: none; }
.chips a[aria-current] { background: var(--navy); border-color: var(--navy); color: var(--white); font-weight: 700; }
/* Tabs of a topic split into subpages: a plain row of text links on a rule, the current one underlined. */
.chips--tabs { margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.chips--tabs ul { gap: 0 24px; }
.chips--tabs a { margin-bottom: -1px; padding: 10px 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); font-size: 0.9375rem; }
.chips--tabs a:hover { color: var(--navy); }
.chips--tabs a[aria-current] { background: none; border-bottom-color: var(--accent); color: var(--navy); font-weight: 600; }
.filterbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; }
.filterbar > span { margin-bottom: 20px; font-size: 0.875rem; color: var(--muted); }

/* ---------- Programme ---------- */

.page-header--program { padding-bottom: 64px; }
.program-hero { display: flex; flex-direction: column; gap: 24px; }
.program-hero__text { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.program-hero h1 { font-size: clamp(2.125rem, 1.4rem + 3vw, 3.5rem); letter-spacing: -0.025em; line-height: 1.08; }
.program-hero .buttons { margin-top: 18px; }
.program-hero .button { text-transform: none; letter-spacing: 0; font-size: 1.0625rem; padding: 13px 22px; }
/* The programme pictogram from the home page, in the programme colour, without a tile. It only fills
   the space beside the title, so narrow screens, where the title spans the width, leave it out. */
.program-hero__icon { --program: var(--white); display: none; place-items: center; color: var(--program); }
.program-hero__icon .icon { width: auto; height: 100%; }
.program-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
@media (min-width: 960px) {
  .page-header--program { padding-block: 28px 96px; }
  .page-header--program .breadcrumbs { margin-bottom: 36px; }
  .program-hero { flex-direction: row; align-items: center; gap: 56px; }
  .program-hero__text { flex: 1 1 460px; }
  .program-hero__icon { display: grid; flex: 1 1 500px; min-width: 0; max-width: 540px; height: 220px; }
  .facts--overlap { margin-top: -44px; }
  .page-header--program + .container + .page { padding-top: 64px; }
}

/* ---------- News ---------- */

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 28px 24px; }
.post-card { display: flex; flex-direction: column; gap: 12px; }
.post-card__image { overflow: hidden; aspect-ratio: 16 / 10; background: var(--sand-dark); border-radius: var(--radius); }
.post-card__image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-card__body { display: flex; flex-direction: column; gap: 6px; }
.post-card h2 { font-size: 1.25rem; line-height: 1.25; }
.post-card h2 a { color: var(--navy); }
.post-card__body > p:last-child { color: var(--muted); font-size: 0.9375rem; }

.article { max-width: 780px; }
.article h1 { margin: 10px 0 18px; font-size: clamp(1.875rem, 1.3rem + 2.4vw, 2.75rem); line-height: 1.12; letter-spacing: -0.02em; }
.article .eyebrow { font-size: 0.75rem; letter-spacing: 0.1em; }
.article__lead { margin-bottom: 28px; font-size: 1.25rem; line-height: 1.55; color: #3D3F66; }
.article > .figure { margin-bottom: 32px; }
.article > .block { margin-top: 40px; }
.article__footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.875rem; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--muted); }
.share ul { display: flex; flex-wrap: wrap; }
.share li:not([hidden]) ~ li:not([hidden])::before { content: "·"; margin-inline: 8px; }
.share a, .share button { padding: 0; background: none; border: 0; cursor: pointer; font: inherit; color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.share .share__tag { margin-left: 8px; font-weight: 700; color: var(--link); text-decoration: none; }
.share .share__tag:hover { text-decoration: underline; text-underline-offset: 3px; }
.social-tag { margin: 0 0 24px; color: var(--muted); }
.social-tag a { font-weight: 700; text-decoration: none; }
.social-tag a:hover { text-decoration: underline; text-underline-offset: 3px; }
.share__status { font-weight: 600; color: #1E7A45; }
.side-posts { border-top: 2px solid var(--navy); }
.side-posts a { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--navy); }
.side-posts__image { flex: none; overflow: hidden; width: 88px; height: 66px; background: var(--sand-dark); border-radius: 4px; }
.side-posts__image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.side-posts time { display: block; font-size: 0.8125rem; color: var(--muted); }
.side-posts strong { font-size: 0.9375rem; line-height: 1.35; }
.layout__side > p { font-size: 0.9375rem; }

/* ---------- Kitchen tips ---------- */

.side-posts__kind { display: block; font-size: 0.8125rem; color: var(--muted); }
.tip__facts { margin-bottom: 32px; }
.tip__ingredients { margin-bottom: 36px; padding: 20px 22px; background: var(--sand); border-radius: 8px; }
.tip__ingredients h2 { margin-bottom: 12px; font-size: 1.375rem; }
.tip__ingredients h3 { font-size: 1rem; }
@media (min-width: 640px) { .tip__ingredients ul { columns: 2; column-gap: 32px; } .tip__ingredients li { break-inside: avoid; } }
/* A post without a photo shows the pictogram of its kind. */
.tip-picture { display: flex; align-items: center; justify-content: center; background: var(--sand); color: var(--accent); }
.tip__steps { margin-bottom: 16px; font-size: 1.625rem; line-height: 1.2; }
.tip__author { margin-top: 32px; color: var(--muted); }
.tip__author strong { color: var(--navy); }

/* ---------- Gallery ---------- */

.tiles--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: 150px; gap: 10px; overflow: visible; margin: 0; padding: 0; }
.tiles--grid li { flex: none; height: auto; }
.tiles--grid li.empty { grid-column: 1 / -1; }
.tile__meta { display: block; font-size: 0.8125rem; font-weight: 400; opacity: 0.9; }
@media (min-width: 640px) { .tiles--grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); grid-auto-rows: 190px; gap: 12px; } }

/* ---------- Projects ---------- */

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.project-card { display: flex; flex-direction: column; overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: 8px; color: var(--navy); transition: box-shadow 0.15s; }
.project-card:hover { color: var(--navy); text-decoration: none; box-shadow: 0 6px 18px rgb(23 24 74 / 0.14); }
.project-card__image { display: block; aspect-ratio: 16 / 9; background: var(--sand-dark); }
.project-card__image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.project-card__body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; }
.project-card__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.project-card__program { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.project-card strong { font-size: 1.25rem; line-height: 1.25; }
.project-card__period { font-size: 0.875rem; color: var(--muted); }
.project-card__number { margin-top: auto; padding-top: 10px; font-size: 0.8125rem; color: var(--muted); overflow-wrap: anywhere; }
.publicity { margin-bottom: 24px; }
.publicity img { display: block; max-height: 88px; width: auto; }
.narrow-wide > .facts { margin-bottom: 28px; }
.narrow-wide > .body + .block, .narrow-wide > .block + .block { margin-top: 36px; }

/* ---------- Contact ---------- */

.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.contact-card { padding: 22px; border: 1px solid var(--line); border-radius: 8px; line-height: 1.75; }
.contact-card h2 { margin-bottom: 10px; font-size: 0.75rem; letter-spacing: 0.1em; line-height: 1.55; }
.contact-card a, .contact-info__ids a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
/* The cards share the rows of the grid (address with the link, map, where the building is),
   so the maps are level; without subgrid the parts just follow each other. */
.contact-card { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 16px; align-content: start; }
.contact-card p { margin-top: 10px; }
.contact-card .contact-card__link { margin-top: 6px; }
.contact-card__link .arrow-link { text-decoration: none; }
/* Below the map: where the building is (small) and the stops with their lines as tags. */
.contact-card__where, .map .map__where { font-size: 0.8125rem; line-height: 1.5; color: var(--muted); }
.contact-card__where p, .map__where p { margin: 0; }
.stops { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.contact-card .stops__heading, .map .stops__heading { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; line-height: 1.4; text-transform: uppercase; color: var(--accent); }
.page .stops ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.page .stops li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; padding: 0; }
.stops li::before { content: none; }
.stops strong { flex-basis: 100%; font-size: 0.875rem; color: var(--text); }
.stops__lines { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.stops__lines > span:not(.visually-hidden) { min-width: 24px; padding: 1px 5px; border-radius: 4px; background: var(--lavender-bg); color: var(--navy); font-size: 0.75rem; font-weight: 700; line-height: 1.5; text-align: center; }
.contact-card__map { line-height: 1.4; }
.contact-card__map .map__link { right: 8px; bottom: 8px; padding: 6px 12px; text-decoration: none; }
.contact-card__hours { font-size: 0.9375rem; color: var(--muted); line-height: 1.5; }
.contact-info { display: flex; flex-wrap: wrap; gap: 24px 32px; margin-top: 32px; }
.contact-info__map { flex: 3 1 420px; min-width: 0; }
/* Identification data: a low box across the whole width – the items in equal columns
   divided by lines, label above the value. */
.contact-info__ids { flex: 1 1 100%; min-width: 0; padding: 22px 24px 24px; background: var(--sand); border-radius: 8px; }
.page .contact-info__ids dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 18px 0; margin: 14px 0 0; }
.contact-info__ids dl > div { padding: 2px 12px 2px 14px; border-left: 2px solid var(--sand-dark); }
.contact-info__ids dt { color: var(--muted); font-size: 0.8125rem; line-height: 1.4; }
.contact-info__ids dd { margin: 2px 0 0; font-size: 1rem; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
/* The same box as a block of a content page (blocks/identification.html): the name of
   the school and its seat have a row each, so they stay on one line. */
/* Two columns on a phone; from 640 px the identifiers of the organisation (IČ, DIČ, data
   box, bank account) are one row and those of the school (RED IZO, IZO) the next one. */
.page .ids dl { grid-template-columns: repeat(2, 1fr); margin-top: 0; }
.ids__row { grid-column-start: 1; }
@media (min-width: 640px) {
  .page .ids dl { grid-template-columns: repeat(4, 1fr); }
}
.ids__wide { grid-column: 1 / -1; }
/* On a narrow screen the seat breaks behind the street, not inside the town. */
.ids__wide span { white-space: nowrap; }
.contact-form { display: flex; flex-wrap: wrap; gap: 24px 32px; margin-top: 40px; padding-top: 28px; border-top: 2px solid var(--navy); }
.contact-form > div { flex: 1 1 260px; }
.contact-form h2 { margin-bottom: 8px; font-size: 1.625rem; }
.contact-form > div p { color: var(--muted); }
.contact-form .form { flex: 2 1 480px; min-width: 0; }

/* ---------- Calendar page ---------- */

.calendar-month { margin-bottom: 14px; font-size: 1.625rem; }
.calendar__list--full .calendar__date { flex-basis: 66px; }
/* Past events stay readable (no opacity): only the accent is toned down. */
.calendar__item--past .calendar__date { color: var(--muted); }
.calendar__item--past .calendar__title { font-weight: 500; }

/* ---------- Offers ---------- */

/* Offers: cards of the same build – kind and place, employer, position, short text, contact. */
.offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.chips + .offers { margin-top: 20px; }
.offer { display: flex; flex-direction: column; gap: 10px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); font-size: 0.9375rem; line-height: 1.5; overflow-wrap: anywhere; }
.offer__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 0.875rem; color: var(--muted); }
.offer h2 { margin: 2px 0 0; font-size: 1.25rem; line-height: 1.25; }
.offer__position { margin-top: -6px; font-weight: 600; color: var(--accent); }
.offer__text p + p { margin-top: 6px; }
.offer__text ul, .offer__text ol { padding-left: 20px; }
.offer__contact a { text-decoration: underline; text-underline-offset: 3px; }
.offer__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--muted); }
.offer-form { margin-top: 48px; padding-top: 32px; border-top: 2px solid var(--navy); scroll-margin-top: var(--anchor-top); }
.offer-form > p { margin: 8px 0 20px; max-width: 70ch; }
.offer-form__sent { padding: 18px 20px; background: var(--sand); border-radius: 8px; font-weight: 600; }
.field--file { grid-column: 1 / -1; }
/* The trap field of the offer form: off the screen, people do not fill it in. */
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
