/*
 * The look of the public site and the admin: design tokens (light values on
 * :root, dark ones under [data-bs-theme="dark"]), Bootstrap 5.3 bound to
 * them, the shell (header, footer) and the shared components (cards, tiles,
 * people, page headers, slider, …). The layouts set data-bs-theme before the
 * first paint; public/js/cookies.js switches it.
 */

/* ---------- Font: Plus Jakarta Sans (SIL OFL), self-hosted in public/fonts ---------- */

@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('../fonts/plus-jakarta-sans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('../fonts/plus-jakarta-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: italic;
    font-weight: 200 800;
    font-display: swap;
    src: url('../fonts/plus-jakarta-sans-italic-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: italic;
    font-weight: 200 800;
    font-display: swap;
    src: url('../fonts/plus-jakarta-sans-italic-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */

:root,
[data-bs-theme="light"] {
    color-scheme: light;

    --zs-bg: #ffffff;
    --zs-surface: #ffffff;
    --zs-surface-2: #f7f4ef;
    --zs-surface-3: #ece7e0;
    --zs-ink: #1c1917;
    --zs-ink-2: #5b554e;
    --zs-ink-3: #847c73;
    --zs-border: #e9e4dd;

    /* Terracotta of the school building (img/skola.jpg). */
    --zs-accent: #c2410c;
    --zs-accent-hover: #9a3412;
    --zs-accent-contrast: #ffffff;
    --zs-accent-soft: #ffefe3;
    --zs-accent-tint: #fff7f0;
    --zs-accent-rgb: 194, 65, 12;

    /* Dark band: the photo side of the login page; kept for any dark block. */
    --zs-band: #1c1917;
    --zs-band-ink: #f5f1ea;
    --zs-band-ink-2: #b8b0a6;
    --zs-band-link: #fdba74;
    --zs-band-border: rgba(255, 255, 255, .12);

    --zs-focus: #1c1917;
    --zs-shadow-sm: 0 1px 2px rgba(28, 25, 23, .06), 0 1px 3px rgba(28, 25, 23, .05);
    --zs-shadow: 0 6px 20px rgba(28, 25, 23, .09);
    --zs-shadow-lg: 0 24px 60px rgba(28, 25, 23, .16);
    --zs-radius: 1rem;
    --zs-radius-sm: .625rem;
    --zs-radius-lg: 1.5rem;
    --zs-font: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --zs-max: 1480px;
    --zs-gutter: clamp(1rem, 3vw, 2.5rem);
    --zs-header-offset: 6rem;
    /* Measured by toc.js (the sticky row of links of components/section-nav sits under the navbar); never used to size the navbar itself. */
    --zs-navbar-height: 4.5rem;

    /* Tints of the tiles and badges. */
    --zs-tint-green: #dcfce7;
    --zs-tint-green-ink: #166534;
    --zs-tint-blue: #dbeafe;
    --zs-tint-blue-ink: #1e40af;
    --zs-tint-yellow: #fef3c7;
    --zs-tint-yellow-ink: #92400e;
    --zs-tint-purple: #ede9fe;
    --zs-tint-purple-ink: #5b21b6;
    --zs-tint-pink: #fce7f3;
    --zs-tint-pink-ink: #9d174d;
    --zs-tint-teal: #ccfbf1;
    --zs-tint-teal-ink: #115e59;
    --zs-tint-lime: #ecfccb;
    --zs-tint-lime-ink: #4d7c0f;

    /* Bootstrap follows the tokens. */
    --bs-body-font-family: var(--zs-font);
    --bs-body-font-size: 1rem;
    --bs-body-line-height: 1.6;
    --bs-body-bg: var(--zs-bg);
    --bs-body-color: var(--zs-ink);
    --bs-emphasis-color: var(--zs-ink);
    --bs-secondary-color: var(--zs-ink-2);
    --bs-secondary-bg: var(--zs-surface-2);
    --bs-tertiary-color: var(--zs-ink-3);
    --bs-tertiary-bg: var(--zs-surface-2);
    --bs-heading-color: var(--zs-ink);
    --bs-border-color: var(--zs-border);
    --bs-border-color-translucent: var(--zs-border);
    --bs-border-radius: var(--zs-radius-sm);
    --bs-border-radius-sm: .5rem;
    --bs-border-radius-lg: var(--zs-radius);
    --bs-border-radius-xl: var(--zs-radius-lg);
    --bs-link-color: var(--zs-accent);
    --bs-link-color-rgb: var(--zs-accent-rgb);
    --bs-link-hover-color: var(--zs-accent-hover);
    --bs-link-hover-color-rgb: 154, 52, 18;
    --bs-primary: var(--zs-accent);
    --bs-primary-rgb: var(--zs-accent-rgb);
    --bs-focus-ring-color: rgba(var(--zs-accent-rgb), .3);
}

/* Bootstrap's .link-secondary is a fixed grey (#6c757d) that fails 4.5:1 on the dark surfaces. */
.link-secondary {
    color: var(--zs-ink-2) !important;
}

.link-secondary:hover,
.link-secondary:focus {
    color: var(--zs-ink) !important;
}

[data-bs-theme="dark"] {
    color-scheme: dark;

    --zs-bg: #141211;
    --zs-surface: #1e1b19;
    --zs-surface-2: #292523;
    --zs-surface-3: #36302c;
    --zs-ink: #f3efe9;
    --zs-ink-2: #bcb4aa;
    --zs-ink-3: #948c82;
    --zs-border: #3a3430;

    --zs-accent: #fb923c;
    --zs-accent-hover: #fdba74;
    --zs-accent-contrast: #1c1917;
    --zs-accent-soft: #4a2a14;
    --zs-accent-tint: #2b2019;
    --zs-accent-rgb: 251, 146, 60;

    --zs-band: #0f0d0c;
    --zs-band-ink: #f3efe9;
    --zs-band-ink-2: #bcb4aa;
    --zs-band-link: #fdba74;
    --zs-band-border: rgba(255, 255, 255, .1);

    --zs-focus: #ffffff;
    --zs-shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --zs-shadow: 0 6px 20px rgba(0, 0, 0, .45);
    --zs-shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);

    --zs-tint-green: #15301f;
    --zs-tint-green-ink: #86efac;
    --zs-tint-blue: #172554;
    --zs-tint-blue-ink: #93c5fd;
    --zs-tint-yellow: #3b2a10;
    --zs-tint-yellow-ink: #fcd34d;
    --zs-tint-purple: #2e1065;
    --zs-tint-purple-ink: #c4b5fd;
    --zs-tint-pink: #4a1536;
    --zs-tint-pink-ink: #f9a8d4;
    --zs-tint-teal: #112f2b;
    --zs-tint-teal-ink: #5eead4;
    --zs-tint-lime: #263a0b;
    --zs-tint-lime-ink: #bef264;

    --bs-link-hover-color-rgb: 253, 186, 116;
}

/* ---------- Base ---------- */

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--zs-font);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 700;
    letter-spacing: -.015em;
    line-height: 1.2;
}

h1, .h1 {
    font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -.025em;
}

h2, .h2 {
    font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem);
}

h3, .h3 {
    font-size: 1.25rem;
}

a {
    text-underline-offset: .15em;
    text-decoration-thickness: 1px;
}

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

::selection {
    background: var(--zs-accent-soft);
    color: var(--zs-ink);
}

img {
    max-width: 100%;
    height: auto;
}

address {
    font-style: normal;
}

.zs-skip {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 2000;
    padding: .75rem 1.25rem;
    background: var(--zs-accent);
    color: var(--zs-accent-contrast);
    border-radius: var(--zs-radius-sm);
    font-weight: 700;
    text-decoration: none;
    transition: top .15s;
}

.zs-skip:focus {
    top: 1rem;
    color: var(--zs-accent-contrast);
}

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

/* ---------- Layout ---------- */

.zs-container {
    width: 100%;
    max-width: var(--zs-max);
    margin-inline: auto;
    padding-inline: var(--zs-gutter);
}

.zs-section {
    padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.zs-section--tight {
    padding-block: clamp(1.5rem, 4vw, 3rem);
}

.zs-band {
    background: var(--zs-surface-2);
}

.zs-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
}

.zs-grid--wide {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
}

.zs-grid--narrow {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
}

.zs-grid--tiles {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr));
}

.zs-two-columns {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 992px) {
    .zs-two-columns {
        grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    }

    .zs-two-columns--even {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

/* ---------- Header ---------- */

/*
 * The header is no box of its own: the bar sticks to the viewport, which it
 * could not do inside a parent only as tall as the strip and the bar.
 */
.zs-header {
    display: contents;
}

.zs-topbar {
    background: var(--zs-surface-2);
    color: var(--zs-ink-2);
    border-bottom: 1px solid var(--zs-border);
    font-size: .875rem;
}

.zs-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-height: 2.5rem;
}

.zs-topbar-list {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.zs-topbar a {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem 0;
    color: var(--zs-ink);
    text-decoration: none;
}

.zs-topbar a:hover {
    color: var(--zs-accent);
    text-decoration: underline;
}

.zs-topbar i {
    color: var(--zs-accent);
}

.zs-navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    padding: 0;
    background: var(--zs-surface);
    border-bottom: 1px solid var(--zs-border);
    box-shadow: var(--zs-shadow-sm);
}

.zs-navbar-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 4.5rem;
}

.zs-brand {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    color: var(--zs-ink);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.125rem;
    letter-spacing: -.01em;
    line-height: 1.15;
}

.zs-brand img {
    flex: 0 0 auto;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: .875rem;
    object-fit: cover;
    box-shadow: var(--zs-shadow-sm);
}

.zs-brand--footer img {
    width: 2.75rem;
    height: 2.75rem;
}

.zs-brand:hover {
    color: var(--zs-accent);
}

.zs-navbar-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-left: auto;
    order: 3;
}

.zs-offcanvas {
    order: 2;
}

.zs-theme-toggle,
.zs-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    height: 2.5rem;
    border: 1px solid var(--zs-border);
    border-radius: 999px;
    background: var(--zs-surface);
    color: var(--zs-ink);
    font-weight: 600;
    line-height: 1;
}

.zs-theme-toggle {
    width: 2.5rem;
    padding: 0;
}

.zs-menu-toggle {
    padding: 0 1rem;
}

.zs-theme-toggle:hover,
.zs-menu-toggle:hover {
    background: var(--zs-surface-2);
}

/* Under 360px (WCAG 1.4.10 asks for 320px) the bar tightens: smaller logo and
   name, icon-only menu button, so the name never runs into the switches. */
@media (max-width: 359.98px) {
    .zs-navbar-inner {
        gap: .75rem;
    }

    .zs-brand {
        gap: .5rem;
        font-size: 1rem;
    }

    .zs-brand img {
        width: 2.75rem;
        height: 2.75rem;
    }

    .zs-menu-toggle {
        width: 2.5rem;
        padding: 0;
    }

    .zs-menu-toggle span {
        display: none;
    }
}

.zs-nav {
    display: flex;
    align-items: center;
    gap: .125rem;
}

.zs-nav .nav-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem .9rem;
    border: 0;
    border-radius: var(--zs-radius-sm);
    background: none;
    color: var(--zs-ink);
    font-weight: 600;
    white-space: nowrap;
}

.zs-nav .nav-link:hover,
.zs-nav .nav-link:focus-visible,
.zs-nav .show > .nav-link {
    background: var(--zs-surface-2);
    color: var(--zs-ink);
}

.zs-nav .nav-link.active {
    background: var(--zs-accent-tint);
    color: var(--zs-accent);
}

.zs-nav .dropdown-toggle::after {
    margin-left: .1rem;
    vertical-align: .2em;
    opacity: .7;
}

.zs-nav .dropdown-menu {
    --bs-dropdown-min-width: 15rem;
    --bs-dropdown-padding-y: .5rem;
    --bs-dropdown-padding-x: .5rem;
    --bs-dropdown-item-padding-y: .6rem;
    --bs-dropdown-item-padding-x: .85rem;
    --bs-dropdown-spacer: .4rem;
    --bs-dropdown-link-active-bg: var(--zs-accent-tint);
    --bs-dropdown-link-active-color: var(--zs-accent);
}

.zs-nav .dropdown-item {
    border-radius: .5rem;
    font-weight: 500;
}

.zs-nav .dropdown-item.active {
    font-weight: 600;
}

.zs-offcanvas {
    --bs-offcanvas-width: min(22rem, 90vw);
    --bs-offcanvas-padding-x: 1.25rem;
    --bs-offcanvas-padding-y: 1rem;
}

@media (min-width: 992px) {
    .zs-offcanvas {
        flex: 1 1 auto;
        justify-content: flex-end;
    }
}

@media (max-width: 991.98px) {
    .zs-nav {
        flex-direction: column;
        align-items: stretch;
        gap: .25rem;
        width: 100%;
    }

    .zs-nav .nav-link {
        width: 100%;
        justify-content: space-between;
        padding: .8rem 1rem;
        font-size: 1.05rem;
        white-space: normal;
    }

    .zs-nav .dropdown-menu {
        position: static;
        margin: .25rem 0 .5rem;
        width: 100%;
        border: 0;
        box-shadow: none;
        background: var(--zs-surface-2);
    }
}

/* ---------- Footer ---------- */

.zs-footer {
    margin-top: auto;
    padding-block: clamp(2.5rem, 5vw, 4rem) 1.5rem;
    background: var(--zs-surface-2);
    color: var(--zs-ink-2);
    border-top: 1px solid var(--zs-border);
}

.zs-footer-grid {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
    margin-bottom: 2.5rem;
}

@media (min-width: 992px) {
    .zs-footer-grid {
        grid-template-columns: 1.7fr 1fr 1.2fr 1.2fr;
    }
}

.zs-footer-heading {
    margin-bottom: 1rem;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--zs-ink);
}

.zs-footer ul {
    display: grid;
    gap: .5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.zs-footer a {
    color: var(--zs-ink);
    text-decoration: none;
}

.zs-footer a:hover {
    color: var(--zs-accent);
    text-decoration: underline;
}

.zs-footer address {
    margin: 0 0 1rem;
    line-height: 1.7;
}

.zs-footer-contacts a {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
}

.zs-footer-contacts i {
    width: 1.1rem;
    text-align: center;
    color: var(--zs-accent);
}

.zs-brand--footer {
    margin-bottom: 1rem;
    color: var(--zs-ink);
}

.zs-brand--footer:hover {
    color: var(--zs-accent);
}

.zs-founder {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    line-height: 1.6;
}

.zs-founder img {
    flex: 0 0 auto;
    width: auto;
    height: 3.25rem;
    max-width: 11rem;
    padding: .25rem;
    border-radius: .5rem;
    background: #fff;
    object-fit: contain;
}

.zs-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .75rem 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--zs-border);
    font-size: .85rem;
}

.zs-footer-bottom a {
    text-decoration: underline;
}

/* ---------- Bootstrap components on the tokens ---------- */

.btn {
    --bs-btn-font-weight: 600;
    --bs-btn-padding-y: .6rem;
    --bs-btn-padding-x: 1.15rem;
    --bs-btn-border-radius: var(--zs-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}

.btn-sm {
    --bs-btn-padding-y: .4rem;
    --bs-btn-padding-x: .85rem;
    --bs-btn-border-radius: .5rem;
}

.btn-lg {
    --bs-btn-padding-y: .8rem;
    --bs-btn-padding-x: 1.5rem;
    --bs-btn-border-radius: var(--zs-radius-sm);
}

.btn-primary {
    --bs-btn-color: var(--zs-accent-contrast);
    --bs-btn-bg: var(--zs-accent);
    --bs-btn-border-color: var(--zs-accent);
    --bs-btn-hover-color: var(--zs-accent-contrast);
    --bs-btn-hover-bg: var(--zs-accent-hover);
    --bs-btn-hover-border-color: var(--zs-accent-hover);
    --bs-btn-active-color: var(--zs-accent-contrast);
    --bs-btn-active-bg: var(--zs-accent-hover);
    --bs-btn-active-border-color: var(--zs-accent-hover);
    --bs-btn-disabled-color: var(--zs-accent-contrast);
    --bs-btn-disabled-bg: var(--zs-accent);
    --bs-btn-disabled-border-color: var(--zs-accent);
    --bs-btn-focus-shadow-rgb: var(--zs-accent-rgb);
}

.btn-outline-primary {
    --bs-btn-color: var(--zs-accent);
    --bs-btn-border-color: var(--zs-accent);
    --bs-btn-hover-color: var(--zs-accent-contrast);
    --bs-btn-hover-bg: var(--zs-accent);
    --bs-btn-hover-border-color: var(--zs-accent);
    --bs-btn-active-color: var(--zs-accent-contrast);
    --bs-btn-active-bg: var(--zs-accent);
    --bs-btn-active-border-color: var(--zs-accent);
    --bs-btn-disabled-color: var(--zs-accent);
    --bs-btn-disabled-border-color: var(--zs-accent);
    --bs-btn-focus-shadow-rgb: var(--zs-accent-rgb);
}

.btn-soft,
.btn-light,
.btn-secondary {
    --bs-btn-color: var(--zs-ink);
    --bs-btn-bg: var(--zs-surface-2);
    --bs-btn-border-color: var(--zs-surface-2);
    --bs-btn-hover-color: var(--zs-ink);
    --bs-btn-hover-bg: var(--zs-surface-3);
    --bs-btn-hover-border-color: var(--zs-surface-3);
    --bs-btn-active-color: var(--zs-ink);
    --bs-btn-active-bg: var(--zs-surface-3);
    --bs-btn-active-border-color: var(--zs-surface-3);
    --bs-btn-disabled-color: var(--zs-ink-3);
    --bs-btn-disabled-bg: var(--zs-surface-2);
    --bs-btn-disabled-border-color: var(--zs-surface-2);
    --bs-btn-focus-shadow-rgb: var(--zs-accent-rgb);
}

.btn-outline-secondary {
    --bs-btn-color: var(--zs-ink);
    --bs-btn-border-color: var(--zs-border);
    --bs-btn-hover-color: var(--zs-ink);
    --bs-btn-hover-bg: var(--zs-surface-2);
    --bs-btn-hover-border-color: var(--zs-border);
    --bs-btn-active-color: var(--zs-ink);
    --bs-btn-active-bg: var(--zs-surface-3);
    --bs-btn-active-border-color: var(--zs-border);
    --bs-btn-disabled-color: var(--zs-ink-3);
    --bs-btn-disabled-border-color: var(--zs-border);
    --bs-btn-focus-shadow-rgb: var(--zs-accent-rgb);
}

.form-control,
.form-select {
    padding: .6rem .9rem;
    background-color: var(--zs-surface);
}

.form-select {
    padding-right: 2.25rem;
}

.form-select[multiple],
.form-select[size]:not([size="1"]) {
    padding-right: .9rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--zs-accent);
    box-shadow: 0 0 0 .25rem rgba(var(--zs-accent-rgb), .2);
}

.form-check-input:checked {
    background-color: var(--zs-accent);
    border-color: var(--zs-accent);
}

.form-check-input:focus {
    border-color: var(--zs-accent);
    box-shadow: 0 0 0 .25rem rgba(var(--zs-accent-rgb), .2);
}

.form-label {
    font-weight: 600;
}

.card {
    --bs-card-border-radius: var(--zs-radius);
    --bs-card-inner-border-radius: calc(var(--zs-radius) - 1px);
    --bs-card-border-color: var(--zs-border);
    --bs-card-bg: var(--zs-surface);
    --bs-card-cap-bg: var(--zs-surface-2);
    --bs-card-spacer-y: 1.25rem;
    --bs-card-spacer-x: 1.25rem;
    box-shadow: var(--zs-shadow-sm);
}

.card-header {
    font-weight: 600;
}

.modal {
    --bs-modal-border-radius: var(--zs-radius);
    --bs-modal-inner-border-radius: calc(var(--zs-radius) - 1px);
    --bs-modal-bg: var(--zs-surface);
    --bs-modal-border-color: var(--zs-border);
    --bs-modal-header-border-color: var(--zs-border);
    --bs-modal-footer-border-color: var(--zs-border);
    --bs-modal-padding: 1.25rem 1.5rem;
    --bs-modal-header-padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 700;
}

.modal-body img {
    max-width: 100%;
    height: auto;
}

.modal-body table {
    max-width: 100%;
}

.dropdown-menu {
    --bs-dropdown-bg: var(--zs-surface);
    --bs-dropdown-border-color: var(--zs-border);
    --bs-dropdown-border-radius: var(--zs-radius);
    --bs-dropdown-link-color: var(--zs-ink);
    --bs-dropdown-link-hover-color: var(--zs-ink);
    --bs-dropdown-link-hover-bg: var(--zs-surface-2);
    --bs-dropdown-divider-bg: var(--zs-border);
    box-shadow: var(--zs-shadow);
}

.offcanvas {
    --bs-offcanvas-bg: var(--zs-surface);
    --bs-offcanvas-border-color: var(--zs-border);
}

.nav-tabs {
    --bs-nav-tabs-border-color: var(--zs-border);
    --bs-nav-link-color: var(--zs-ink-2);
    --bs-nav-link-hover-color: var(--zs-ink);
    --bs-nav-link-font-weight: 600;
    gap: .25rem;
}

.nav-tabs .nav-link {
    margin-bottom: -1px;
    padding: .7rem 1rem;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: var(--zs-radius-sm) var(--zs-radius-sm) 0 0;
}

.nav-tabs .nav-link:hover {
    background: var(--zs-surface-2);
    border-bottom-color: var(--zs-border);
}

.nav-tabs .nav-link.active {
    background: transparent;
    border-bottom-color: var(--zs-accent);
    color: var(--zs-accent);
}

.pagination {
    --bs-pagination-color: var(--zs-ink);
    --bs-pagination-bg: var(--zs-surface);
    --bs-pagination-border-color: var(--zs-border);
    --bs-pagination-border-radius: var(--zs-radius-sm);
    --bs-pagination-hover-color: var(--zs-ink);
    --bs-pagination-hover-bg: var(--zs-surface-2);
    --bs-pagination-hover-border-color: var(--zs-border);
    --bs-pagination-focus-color: var(--zs-ink);
    --bs-pagination-focus-bg: var(--zs-surface-2);
    --bs-pagination-focus-box-shadow: 0 0 0 .25rem rgba(var(--zs-accent-rgb), .2);
    --bs-pagination-active-color: var(--zs-accent-contrast);
    --bs-pagination-active-bg: var(--zs-accent);
    --bs-pagination-active-border-color: var(--zs-accent);
    --bs-pagination-disabled-color: var(--zs-ink-3);
    --bs-pagination-disabled-bg: var(--zs-surface);
    --bs-pagination-disabled-border-color: var(--zs-border);
    --bs-pagination-padding-x: .9rem;
    --bs-pagination-padding-y: .5rem;
    justify-content: center;
    gap: .35rem;
    margin: 1.75rem 0 0;
}

.pagination .page-link {
    min-width: 2.75rem;
    border-radius: var(--zs-radius-sm);
    font-weight: 600;
    text-align: center;
}

.badge {
    --bs-badge-border-radius: 999px;
    --bs-badge-font-weight: 600;
    --bs-badge-padding-x: .75em;
    --bs-badge-padding-y: .4em;
}

.alert {
    --bs-alert-border-radius: var(--zs-radius-sm);
}

.table {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--zs-border);
}

.table > :not(caption) > * > * {
    padding: .65rem .85rem;
}

.btn-close:focus {
    box-shadow: 0 0 0 .25rem rgba(var(--zs-accent-rgb), .25);
}

/* ---------- Shared components ---------- */

/* Title band of a page. */
.zs-page-header {
    --zs-page-accent: var(--zs-accent);
    padding-block: clamp(2rem, 5vw, 3.25rem);
    background: var(--zs-surface-2);
    border-bottom: 1px solid var(--zs-border);
}

.zs-page-header--accent {
    background: color-mix(in srgb, var(--zs-page-accent) 22%, var(--zs-surface));
    border-bottom-color: color-mix(in srgb, var(--zs-page-accent) 45%, var(--zs-border));
}

.zs-page-header h1 {
    margin: 0;
}

.zs-eyebrow {
    margin: 0 0 .5rem;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--zs-page-accent, var(--zs-accent));
}

.zs-page-header--accent .zs-eyebrow {
    color: var(--zs-ink-2);
}

.zs-lead {
    margin: .75rem 0 0;
    max-width: 65ch;
    font-size: 1.125rem;
    color: var(--zs-ink-2);
}

/* Heading of a section with an optional link on the right. */
.zs-section-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem 1.5rem;
    margin-bottom: 1.5rem;
}

.zs-section-heading h2,
.zs-section-heading h3 {
    margin: 0;
}

.zs-section-heading p {
    margin: .25rem 0 0;
    color: var(--zs-ink-2);
}

.zs-section-heading .zs-section-link {
    font-weight: 600;
    text-decoration: none;
}

.zs-section-heading .zs-section-link:hover {
    text-decoration: underline;
}

/* Card base. */
.zs-card {
    background: var(--zs-surface);
    border: 1px solid var(--zs-border);
    border-radius: var(--zs-radius);
    box-shadow: var(--zs-shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

a.zs-card {
    color: inherit;
    text-decoration: none;
}

a.zs-card:hover,
a.zs-card:focus-visible,
.zs-card--hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--zs-shadow);
    border-color: var(--zs-surface-3);
    color: inherit;
}

/* Date stamp of a news item or a document. */
.zs-date {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .85rem;
    font-weight: 600;
    color: var(--zs-ink-2);
}

.zs-date i {
    color: var(--zs-accent);
}

/* News item. */
.zs-news-card {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    height: 100%;
    padding: 1.5rem;
    border-top: 4px solid var(--zs-card-accent, transparent);
}

.zs-news-card h3 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.35;
}

.zs-news-card .zs-news-actions {
    margin-top: auto;
    padding-top: .5rem;
}

/* The facts of a kroužek (components/activity-facts): a line each with an
   icon on its card, with the labels in a tinted box at the top of its dialog. */
.zs-activity-facts {
    display: grid;
    gap: .4rem;
    margin: 0;
}

.zs-activity-fact {
    display: flex;
    align-items: baseline;
    gap: .6rem;
}

.zs-activity-fact dt {
    flex: 0 0 auto;
    font-weight: 600;
    color: var(--zs-ink-2);
}

.zs-activity-fact dt i {
    width: 1.15em;
    text-align: center;
    color: var(--zs-accent);
}

.zs-activity-fact dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.zs-activity-facts--labelled {
    margin-bottom: 1.25rem;
    padding: .9rem 1.1rem;
    border-radius: var(--zs-radius-sm);
    background: var(--zs-surface-2);
}

.zs-activity-facts--labelled dt {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    min-width: 6.5rem;
}

/* Document / gallery link. */
.zs-doc-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
    padding: 1rem 1.25rem;
}

.zs-doc-body {
    display: block;
    flex: 1 1 auto;
}

.zs-doc-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 3rem;
    height: 3rem;
    border-radius: .875rem;
    background: var(--zs-accent-tint);
    color: var(--zs-accent);
    font-size: 1.2rem;
}

.zs-doc-body {
    min-width: 0;
}

.zs-doc-name {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.zs-doc-meta {
    margin-top: .15rem;
    font-size: .85rem;
    color: var(--zs-ink-2);
}

.zs-doc-arrow {
    margin-left: auto;
    color: var(--zs-ink-3);
    transition: transform .15s ease, color .15s ease;
}

a.zs-card:hover .zs-doc-arrow {
    transform: translateX(3px);
    color: var(--zs-accent);
}

/* Quick-link tile. */
.zs-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .9rem;
    padding: 1.25rem;
    border: 1px solid var(--zs-border);
    border-radius: var(--zs-radius);
    background: var(--zs-surface);
    color: var(--zs-ink);
    font-weight: 700;
    text-decoration: none;
    box-shadow: var(--zs-shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.zs-tile i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .875rem;
    background: var(--zs-tile-bg, var(--zs-accent-soft));
    color: var(--zs-tile-ink, var(--zs-accent));
    font-size: 1.2rem;
}

.zs-tile:hover,
.zs-tile:focus-visible {
    transform: translateY(-2px);
    border-color: var(--zs-tile-ink, var(--zs-accent));
    box-shadow: var(--zs-shadow);
    color: var(--zs-ink);
}

.zs-tile--green { --zs-tile-bg: var(--zs-tint-green); --zs-tile-ink: var(--zs-tint-green-ink); }
.zs-tile--blue { --zs-tile-bg: var(--zs-tint-blue); --zs-tile-ink: var(--zs-tint-blue-ink); }
.zs-tile--yellow { --zs-tile-bg: var(--zs-tint-yellow); --zs-tile-ink: var(--zs-tint-yellow-ink); }
.zs-tile--purple { --zs-tile-bg: var(--zs-tint-purple); --zs-tile-ink: var(--zs-tint-purple-ink); }
.zs-tile--pink { --zs-tile-bg: var(--zs-tint-pink); --zs-tile-ink: var(--zs-tint-pink-ink); }
.zs-tile--teal { --zs-tile-bg: var(--zs-tint-teal); --zs-tile-ink: var(--zs-tint-teal-ink); }
.zs-tile--lime { --zs-tile-bg: var(--zs-tint-lime); --zs-tile-ink: var(--zs-tint-lime-ink); }

/* The quick links of the home page from a tablet up: every row is filled,
   never one tile left alone under a full row. The page says in
   --zs-tiles-<n> how many tiles a row holds when <n> fit side by side (the
   fewest rows, then the fewest columns making them: eight tiles are one
   row of eight or two of four, seven are 4 + 3); the width of the box
   picks <n>, a tile being 9.5rem at least, and a row with fewer tiles
   stretches them to the edge. */
.zs-quick-links-box {
    container-type: inline-size;
}

@media (min-width: 576px) {
    .zs-quick-links {
        --zs-tile-columns: var(--zs-tiles-3, 3);
        display: flex;
        flex-wrap: wrap;
    }

    .zs-quick-links .zs-tile {
        flex: 1 1 calc((100% - (var(--zs-tile-columns) - 1) * 1.25rem) / var(--zs-tile-columns) - 1px);
        min-width: 0;
    }
}

@container (min-width: 41.75rem) {
    .zs-quick-links { --zs-tile-columns: var(--zs-tiles-4, 4); }
}

@container (min-width: 52.5rem) {
    .zs-quick-links { --zs-tile-columns: var(--zs-tiles-5, 5); }
}

@container (min-width: 63.25rem) {
    .zs-quick-links { --zs-tile-columns: var(--zs-tiles-6, 6); }
}

@container (min-width: 74rem) {
    .zs-quick-links { --zs-tile-columns: var(--zs-tiles-7, 7); }
}

@container (min-width: 84.75rem) {
    .zs-quick-links { --zs-tile-columns: var(--zs-tiles-8, 8); }
}

/* The quick links of the home page on a phone: compact rows (icon left,
   label right) in two columns, the odd last one across both, so the
   tiles take half a screen instead of a whole one. Only there: the admin
   dashboard keeps the tall tiles, which carry a line of explanation. */
@media (max-width: 575.98px) {
    .zs-quick-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .75rem;
    }

    .zs-quick-links .zs-tile {
        flex-direction: row;
        align-items: center;
        gap: .75rem;
        padding: .75rem .875rem;
        font-size: .95rem;
        line-height: 1.25;
    }

    .zs-quick-links .zs-tile i {
        flex: 0 0 auto;
        width: 2.25rem;
        height: 2.25rem;
        border-radius: .7rem;
        font-size: 1rem;
    }

    .zs-quick-links .zs-tile:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

/* Under 360px a label such as "Dokumenty pro rodiče" no longer fits beside
   its icon in half the width: one column. */
@media (max-width: 359.98px) {
    .zs-quick-links {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* A person with their contacts. */
.zs-person {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    height: 100%;
    padding: 1.25rem;
}

.zs-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--zs-accent-soft);
    color: var(--zs-accent);
    font-weight: 700;
    letter-spacing: .02em;
}

/* A photo in the circle (components/avatar); the sizes of the admin lists and of the editor. */
.zs-avatar--photo {
    overflow: hidden;
    background: var(--zs-surface-2);
}

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

.zs-avatar--sm {
    width: 2rem;
    height: 2rem;
    font-size: .75rem;
}

.zs-avatar--lg {
    width: 5rem;
    height: 5rem;
    font-size: 1.5rem;
}

.zs-person .zs-avatar {
    width: 3.5rem;
    height: 3.5rem;
}

.zs-person-body {
    min-width: 0;
}

.zs-person-name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.zs-person-role {
    margin: .1rem 0 0;
    font-size: .9rem;
    color: var(--zs-ink-2);
}

.zs-contact-list {
    display: grid;
    gap: .3rem;
    margin: .6rem 0 0;
    padding: 0;
    list-style: none;
    font-size: .95rem;
}

.zs-contact-list a {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.zs-contact-list a:hover {
    text-decoration: underline;
}

.zs-contact-list i {
    width: 1.1rem;
    text-align: center;
    color: var(--zs-ink-3);
}

/*
 * Long text (the legal pages, history), with components/toc as its menu.
 * The text keeps a readable measure; a grid of link cards (components/
 * document-links) or a two-column list spans the width.
 */
.zs-prose {
    font-size: 1.0625rem;
}

.zs-prose :is(p, ul, ol, dl, h2, h3, h4, table, blockquote, .zs-empty) {
    max-width: 68ch;
}

.zs-prose .zs-doc-links {
    max-width: none;
}

.zs-prose > :first-child {
    margin-top: 0;
}

.zs-prose h2 {
    margin-top: 2.5rem;
    margin-bottom: .75rem;
    scroll-margin-top: var(--zs-header-offset);
}

/* Any other target of an in-page link (an h3 with an id) lands under the sticky bars too. */
.zs-prose [id] {
    scroll-margin-top: var(--zs-header-offset);
}

.zs-prose h3 {
    margin-top: 1.75rem;
    font-size: 1.15rem;
}

.zs-prose h4 {
    margin-top: 1.5rem;
    font-size: 1.05rem;
}

/*
 * Texts written in the admin editor (the news dialog, the history roster;
 * the editor and its preview in the admin use the same class): an image is
 * always a centred full-width block whatever the author did (the editor
 * strips sizes, Core\Helpers\Html does on save), a long link wraps instead
 * of widening a phone page, a table (from the editor's button or pasted from
 * Word or Excel, which bring no borders) has thin cell borders.
 */
.zs-editor-content img,
.zs-img {
    display: block;
    width: 100% !important;
    height: auto !important;
    margin: 1.25rem auto;
    border-radius: var(--zs-radius);
}

.zs-editor-content a {
    overflow-wrap: anywhere;
}

.zs-editor-content table {
    max-width: 100%;
    margin: 0 0 1rem;
    border-collapse: collapse;
}

.zs-editor-content :is(td, th) {
    padding: .4rem .65rem;
    border: 1px solid var(--zs-border);
    vertical-align: top;
}

.zs-editor-content th {
    background: var(--zs-surface-2);
}

/* A Word cell holds a paragraph: no gap under its last line. */
.zs-editor-content :is(td, th) > :last-child {
    margin-bottom: 0;
}

/*
 * A gallery put into a news item from the editor, as GalleryEmbedRenderer
 * draws it (components/gallery-embed): the first photos as square tiles,
 * --zs-preview-columns of them in a row from md up (the number shown, at
 * most 4) and two below, "+N" over the last tile when the gallery holds
 * more, the caption with the link to the whole gallery under them.
 */
.zs-gallery-preview {
    margin: 1.25rem 0;
    padding: .75rem;
    border: 1px solid var(--zs-border);
    border-radius: var(--zs-radius);
    background: var(--zs-surface-2);
}

.zs-gallery-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
}

@media (min-width: 768px) {
    .zs-gallery-preview-grid {
        grid-template-columns: repeat(var(--zs-preview-columns, 4), minmax(0, 1fr));
    }
}

.zs-gallery-preview-item {
    position: relative;
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--zs-radius-sm);
    background: var(--zs-surface-3);
}

.zs-gallery-preview-item:focus-visible {
    outline: 3px solid var(--zs-focus);
    outline-offset: 2px;
}

/* Outranks .zs-editor-content img, the full-width picture of a text. */
.zs-editor-content .zs-gallery-preview-item img,
.zs-gallery-preview-item img {
    width: 100% !important;
    height: 100% !important;
    margin: 0;
    border-radius: 0;
    object-fit: cover;
    transition: transform .2s ease, opacity .2s ease;
}

.zs-gallery-preview-item:hover img {
    transform: scale(1.04);
    opacity: .9;
}

.zs-gallery-preview-play {
    position: absolute;
    right: .4rem;
    bottom: .4rem;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .15rem .5rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, .65);
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.3;
}

.zs-gallery-preview-play .fa-play {
    font-size: .65rem;
}

.zs-gallery-preview-more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 700;
}

.zs-gallery-preview-caption {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem .75rem;
    margin-top: .75rem;
    color: var(--zs-ink-2);
    font-size: .9rem;
}

.zs-gallery-preview-caption .fa-images {
    margin-right: .25rem;
    color: var(--zs-accent);
}

.zs-gallery-preview-caption b {
    color: var(--zs-ink);
}

.zs-editor-content .zs-gallery-preview-caption a {
    overflow-wrap: normal;
    text-decoration: none;
}

.zs-prose address,
.zs-prose .zs-address {
    display: inline-block;
    min-width: min(100%, 22rem);
    margin: 0 0 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--zs-border);
    border-radius: var(--zs-radius-sm);
    background: var(--zs-surface);
    line-height: 1.7;
}

.zs-prose dt {
    margin-top: .85rem;
    font-weight: 700;
}

.zs-prose dd {
    margin: .15rem 0 0;
}

.zs-prose ul,
.zs-prose ol {
    padding-left: 1.4rem;
}

.zs-prose li + li {
    margin-top: .35rem;
}

/* Nothing to list. */
.zs-empty {
    padding: 2rem;
    border: 1px dashed var(--zs-border);
    border-radius: var(--zs-radius);
    color: var(--zs-ink-2);
    text-align: center;
}

/* Error pages. */
.zs-error {
    max-width: 36rem;
    margin: 0 auto;
    text-align: center;
}

.zs-error-code {
    margin-bottom: 1rem;
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 800;
    line-height: 1;
    color: var(--zs-accent);
}

/* ---------- Home page ---------- */

.zs-hero {
    padding-block: clamp(2rem, 5vw, 4rem);
    background:
        radial-gradient(60rem 30rem at 85% 0%, color-mix(in srgb, var(--zs-accent) 12%, transparent), transparent 70%),
        var(--zs-bg);
}

.zs-hero-grid {
    display: grid;
    gap: 2.5rem;
    align-items: center;
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 992px) {
    .zs-hero-grid {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    }
}

.zs-hero h1 {
    margin-bottom: 1rem;
    font-size: clamp(2.25rem, 1.5rem + 2.5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.08;
}

.zs-hero .zs-lead {
    max-width: 46ch;
    font-size: 1.15rem;
}

.zs-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.5rem;
}

/* The next event of the school's calendar, one card under the buttons: the
   calendar's whole place on this page, so the news stay its first section. */
.zs-hero-event {
    max-width: 27rem;
    margin-top: 2rem;
}

.zs-hero-event-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .25rem 1rem;
    margin-bottom: .5rem;
}

.zs-hero-event-heading h2 {
    margin: 0;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .1em;
    line-height: 1.5;
    text-transform: uppercase;
    color: var(--zs-ink-2);
}

.zs-hero-event-heading a {
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
}

.zs-hero-event-heading a:hover {
    text-decoration: underline;
}

/* Beside the picture the card's bottom edge is the picture's: the text
   column fills the row with the text at its top and the card at its foot,
   the picture sits at the foot of its column (on a narrower desktop the
   text is the taller one). Without an event the two stay centred. */
@media (min-width: 992px) {
    .zs-hero-grid--event {
        align-items: stretch;
    }

    .zs-hero-grid--event > :last-child {
        align-self: end;
    }

    .zs-hero-grid--event .zs-hero-main {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
}

/* The gallery page: the news item(s) the gallery is put into. */
.zs-gallery-news-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    max-width: min(100%, 28rem);
}

.zs-gallery-news-link span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zs-gallery-news-menu {
    max-width: min(92vw, 30rem);
}

.zs-gallery-news-menu .dropdown-item {
    display: flex;
    gap: .75rem;
    white-space: normal;
}

.zs-gallery-news-menu time,
.zs-gallery-news-menu .zs-gallery-news-date {
    flex: 0 0 auto;
    min-width: 5.5rem;
    color: var(--zs-ink-3);
    font-variant-numeric: tabular-nums;
}

.zs-hero-image {
    border-radius: var(--zs-radius-lg);
    box-shadow: var(--zs-shadow-lg);
}

/* Slider (public/js/slider.js). */
.zs-slider {
    position: relative;
    overflow: hidden;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    aspect-ratio: 16 / 9;
    border-radius: var(--zs-radius-lg);
    background: var(--zs-surface-2);
    box-shadow: var(--zs-shadow-lg);
}

.zs-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .8s ease;
}

.zs-slide.is-active {
    opacity: 1;
}

.zs-slider.is-dragging {
    cursor: grabbing;
}

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

.zs-slider-controls {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .9rem 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, .5), transparent);
}

.zs-slider-buttons {
    display: flex;
    flex-shrink: 0;
    gap: .5rem;
    margin-left: auto;
}

/* "3 / 8" in place of the dots when they do not fit next to the buttons
   (a phone, or many images): slider.js measures and sets .is-compact. */
.zs-slider-counter {
    display: none;
    padding: .3rem .75rem;
    border-radius: 999px;
    background: rgba(28, 25, 23, .7);
    color: #fff;
    font-size: .875rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.zs-slider.is-compact .zs-slider-counter {
    display: inline-block;
}

.zs-slider.is-compact .zs-slider-dots {
    display: none;
}

.zs-slider-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: #1c1917;
    box-shadow: var(--zs-shadow-sm);
}

.zs-slider-btn:hover {
    background: #fff;
}

.zs-slider-btn:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.zs-slider-dots {
    display: flex;
    gap: .1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* The button is the 24px touch target (WCAG 2.5.8), the visible dot its ::before. */
.zs-slider-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    transition: width .2s ease;
}

.zs-slider-dot::before {
    content: '';
    width: .65rem;
    height: .65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .55);
    transition: width .2s ease, background .2s ease;
}

.zs-slider-dot[aria-current="true"] {
    width: 2.5rem;
}

.zs-slider-dot[aria-current="true"]::before {
    width: 1.6rem;
    background: #fff;
}

.zs-slider-dot:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* Contact block with the map. */
.zs-contact-band {
    background: var(--zs-accent-tint);
    border-top: 1px solid var(--zs-border);
}

.zs-contact-grid {
    display: grid;
    gap: 2.5rem;
    align-items: center;
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 992px) {
    .zs-contact-grid {
        grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    }
}

.zs-contact-lines {
    display: grid;
    gap: .75rem;
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 1.05rem;
}

.zs-contact-lines li {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
}

.zs-contact-lines i {
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .7rem;
    background: var(--zs-accent-soft);
    color: var(--zs-accent);
}

.zs-contact-lines a {
    text-decoration: none;
}

.zs-contact-lines a:hover {
    text-decoration: underline;
}

.zs-map {
    display: block;
    overflow: hidden;
    border-radius: var(--zs-radius-lg);
    box-shadow: var(--zs-shadow-lg);
}

.zs-map img {
    display: block;
    width: 100%;
    height: auto;
}

.zs-map-note {
    margin-top: .75rem;
    font-size: .85rem;
    color: var(--zs-ink-2);
}

/* ---------- Classes ---------- */

/* The name sits in the middle row of three equal ones, so it stays in the
   centre of the tile, level with the names of the tiles next to it, whether
   or not the class has a description in the bottom row. */
.zs-class-tile {
    display: grid;
    grid-template-rows: 1fr auto 1fr;
    justify-items: center;
    row-gap: .35rem;
    container-type: inline-size;
    aspect-ratio: 4 / 3;
    padding: 1rem 1.25rem;
    border-radius: var(--zs-radius);
    background: var(--zs-class-color, var(--zs-surface-2));
    color: var(--zs-ink);
    color: lch(from var(--zs-class-color, #e8e1d7) calc((49.44 - l) * infinity) 0 0);
    font-size: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -.02em;
    text-align: center;
    text-decoration: none;
    box-shadow: var(--zs-shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease;
}

.zs-class-tile:hover,
.zs-class-tile:focus-visible {
    transform: translateY(-3px);
    box-shadow: var(--zs-shadow);
}

.zs-class-tile-name {
    grid-row: 2;
    line-height: 1.15;
}

/* The optional description ("3. a 4. ročník") under the name, cut to the
   lines the bottom half of the tile holds (more on a wide tile), so a long
   one never pushes the name up; the class page prints it whole. */
.zs-class-tile-note {
    grid-row: 3;
    align-self: start;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    font-size: .875rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

@container (min-width: 14rem) {
    .zs-class-tile-note {
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
}

@container (min-width: 17rem) {
    .zs-class-tile-note {
        -webkit-line-clamp: 4;
        line-clamp: 4;
    }
}

/* Anything drawn in a class colour (admin badges, the form preview): same text rule. */
.zs-class-badge {
    background: var(--zs-class-color, var(--zs-surface-2));
    color: #1c1917;
    color: lch(from var(--zs-class-color, #e8e1d7) calc((49.44 - l) * infinity) 0 0);
}

/* ---------- Sitemap ---------- */

.zs-page-map ul {
    padding-left: 1.25rem;
}

.zs-page-map > ul {
    padding-left: 0;
    list-style: none;
    display: grid;
    gap: .35rem;
}

.zs-page-map > ul > li {
    padding: .35rem 0;
}

.zs-page-map > ul > li > a,
.zs-page-map-group {
    font-weight: 700;
}

.zs-page-map ul ul {
    margin-top: .35rem;
    display: grid;
    gap: .2rem;
}

/* ---------- Motion ---------- */

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

    .zs-card,
    .zs-tile,
    .zs-class-tile,
    .zs-slide,
    .zs-slider-dot,
    .zs-doc-arrow {
        transition: none;
    }

    a.zs-card:hover,
    .zs-tile:hover,
    .zs-class-tile:hover {
        transform: none;
    }
}

@media print {
    .zs-topbar,
    .zs-navbar-actions,
    .zs-offcanvas,
    .zs-footer,
    .zs-skip {
        display: none !important;
    }
}

/* ---------- Text cards and lists ---------- */

.zs-card-body {
    padding: 1.5rem;
}

.zs-card-body > :first-child {
    margin-top: 0;
}

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

.zs-prose-card h2,
.zs-prose-card h3 {
    margin-top: 1.25rem;
    margin-bottom: .6rem;
}

.zs-prose-card h2:first-child {
    margin-top: 0;
}

.zs-prose-card ul,
.zs-prose-card ol {
    padding-left: 1.3rem;
}

.zs-prose-card li + li {
    margin-top: .35rem;
}

.zs-team-card {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    height: 100%;
    padding: 1.5rem;
}

.zs-team-card h3 {
    margin: 0;
}

.zs-team-card h3 a {
    text-decoration: none;
}

.zs-team-card h3 a:hover {
    text-decoration: underline;
}

.zs-team-card .zs-person-role {
    margin-top: -.5rem;
}

/*
 * The konzultační hodiny of the poradenské stránky (components/consultation-hours):
 * a clock heading over a .zs-timeline of day groups and their hours, in a
 * card under the contacts as wide as its content.
 */
.zs-hours-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0 0 .6rem;
    font-size: 1rem;
    font-weight: 700;
}

.zs-hours-title i {
    color: var(--zs-accent);
}

.zs-hours-card {
    width: fit-content;
    max-width: 100%;
    margin-top: 1.5rem;
}

.zs-timeline {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: .5rem 1.25rem;
    margin: 0 0 1rem;
}

.zs-timeline dt {
    font-weight: 700;
    white-space: nowrap;
}

.zs-timeline dd {
    margin: 0;
}

/* Numbered list in balanced columns: an item is a number, the name and the detail under it. */
.zs-allergens {
    columns: 3;
    column-gap: 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: allergen;
}

@media (max-width: 991.98px) {
    .zs-allergens {
        columns: 2;
    }
}

@media (max-width: 575.98px) {
    .zs-allergens {
        columns: 1;
    }
}

.zs-allergens li {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    margin-bottom: .75rem;
    padding: .6rem .75rem;
    break-inside: avoid;
    border: 1px solid var(--zs-border);
    border-radius: var(--zs-radius-sm);
    background: var(--zs-surface);
    counter-increment: allergen;
}

.zs-allergens li::before {
    content: counter(allergen);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--zs-accent-soft);
    color: var(--zs-accent);
    font-size: .85rem;
    font-weight: 700;
}

.zs-allergens strong {
    display: block;
}

.zs-allergens li > div {
    min-width: 0;
}

/*
 * The jídelníček from Strava.cz (components/canteen-menu): a row of week
 * tabs over a list of days, each day its date on the left and its dishes
 * (course, text, allergen numbers, the ⓘ of the dialog) on the right; a
 * phone puts the tabs two to a row and stacks the date over the dishes and
 * the course over the text. The tabs wrap rather than scroll: a scrolled
 * row hides the later weeks without a sign that they are there.
 */
.zs-menu-weeks {
    flex-wrap: wrap;
    gap: .4rem;
    margin: 0 0 1rem;
    padding: 0;
}

.zs-menu-weeks .nav-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: .5rem 1rem;
    border: 1px solid var(--zs-border);
    border-radius: var(--zs-radius-sm);
    background: var(--zs-surface);
    color: var(--zs-ink-2);
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

.zs-menu-weeks .nav-link:hover,
.zs-menu-weeks .nav-link:focus-visible {
    background: var(--zs-surface-2);
    color: var(--zs-ink);
}

.zs-menu-weeks .nav-link.active {
    border-color: transparent;
    background: var(--zs-accent-soft);
    color: var(--zs-accent);
}

.zs-menu-week-dates {
    font-size: .8rem;
    font-weight: 500;
}

.zs-menu-days {
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--zs-border);
    border-radius: var(--zs-radius);
    background: var(--zs-surface);
    overflow: hidden;
}

.zs-menu-day {
    display: grid;
    grid-template-columns: 9rem minmax(0, 1fr);
    gap: .5rem 1.5rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--zs-border);
    scroll-margin-top: var(--zs-header-offset);
}

.zs-menu-day:first-child {
    border-top: 0;
}

.zs-menu-day.is-today {
    background: var(--zs-accent-tint);
}

.zs-menu-date {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .15rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
}

.zs-menu-date-day {
    color: var(--zs-ink-2);
    font-weight: 500;
}

.zs-menu-today {
    margin-top: .2rem;
    padding: .1rem .55rem;
    border-radius: 999px;
    background: var(--zs-accent);
    color: var(--zs-accent-contrast);
    font-size: .75rem;
    font-weight: 700;
}

.zs-menu-dishes {
    display: grid;
    gap: .4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.zs-menu-dish {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr) auto;
    grid-template-areas: "course text info";
    gap: .1rem 1rem;
    align-items: baseline;
}

.zs-menu-course {
    grid-area: course;
    color: var(--zs-ink-2);
    font-size: .875rem;
    font-weight: 600;
}

.zs-menu-text {
    grid-area: text;
}

.zs-menu-allergens {
    margin-left: .3rem;
    color: var(--zs-ink-2);
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
}

.zs-menu-info {
    grid-area: info;
    align-self: center;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--zs-ink-2);
    font-size: 1.1rem;
}

.zs-menu-info:hover,
.zs-menu-info:focus-visible {
    background: var(--zs-surface-2);
    color: var(--zs-accent);
}

.zs-menu-day.is-closed .zs-menu-date,
.zs-menu-note {
    color: var(--zs-ink-2);
}

.zs-menu-note {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    margin: 0;
}

.zs-menu-footnote {
    margin: .75rem 0 0;
    color: var(--zs-ink-2);
    font-size: .875rem;
}

@media (max-width: 575.98px) {
    .zs-menu-weeks {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .zs-menu-weeks .nav-link {
        width: 100%;
        height: 100%;
        padding: .5rem .75rem;
        white-space: normal;
    }

    .zs-menu-day {
        grid-template-columns: minmax(0, 1fr);
        padding: .9rem 1rem;
    }

    .zs-menu-date {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: baseline;
        gap: .5rem;
    }

    .zs-menu-dish {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "course info" "text info";
    }
}

/* The dialog of a dish: what it is, then its allergens as numbered lines. */
.zs-dish-name {
    font-weight: 700;
}

.zs-dish-heading {
    margin: 1.25rem 0 .5rem;
    font-size: 1rem;
    font-weight: 700;
}

.zs-dish-allergens {
    display: grid;
    gap: .4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.zs-dish-allergens li {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.zs-allergen-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--zs-accent-soft);
    color: var(--zs-accent);
    font-size: .8rem;
    font-weight: 700;
}

@media print {
    /* Every week on paper, without the tabs and the buttons. */
    .zs-menu-weeks,
    .zs-menu-info {
        display: none !important;
    }

    .zs-menu .tab-pane {
        display: block !important;
        opacity: 1 !important;
        margin-bottom: 1rem;
    }
}

.zs-columns-2 {
    column-count: 2;
    column-gap: 2rem;
}

@media (max-width: 767.98px) {
    .zs-columns-2 {
        column-count: 1;
    }
}

/* ---------- Pages made of sections (družina, jídelna, třída, the ŠPP pages) ---------- */

/*
 * A page mixing several kinds of content stacks them as full-width sections,
 * each a grid sized by its own content: side by side, columns of different
 * heights leave holes. components/section-nav under the title band links
 * the sections ("Na této stránce"), the same bar components/toc builds from
 * the h2 headings of a long text (.zs-prose); it sticks under the navbar
 * where the screen is wide or tall enough (below), toc.js marks the link in
 * view, scrolls the row to it when it overflows and measures
 * --zs-navbar-height.
 */
.zs-page-sections {
    display: grid;
    /* One column no wider than the page: a wide table or a row that scrolls
       sideways (the week tabs of the jídelníček) scrolls in its own box
       instead of widening the page on a phone. */
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(3rem, 6vw, 4.5rem);
}

.zs-page-sections > section {
    scroll-margin-top: var(--zs-header-offset);
}

.zs-subnav {
    background: var(--zs-surface);
    border-bottom: 1px solid var(--zs-border);
}

.zs-subnav ul {
    display: flex;
    gap: .25rem;
    margin: 0 calc(-1 * var(--zs-gutter));
    padding: .6rem var(--zs-gutter);
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
    /* The gutters fade out, so a row longer than the screen shows it goes on. */
    -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--zs-gutter), #000 calc(100% - var(--zs-gutter)), transparent);
    mask-image: linear-gradient(to right, transparent, #000 var(--zs-gutter), #000 calc(100% - var(--zs-gutter)), transparent);
}

.zs-subnav ul::-webkit-scrollbar {
    display: none;
}

.zs-subnav a {
    display: inline-block;
    padding: .45rem .95rem;
    border-radius: 999px;
    color: var(--zs-ink-2);
    font-size: .95rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
}

.zs-subnav a:hover,
.zs-subnav a:focus-visible {
    background: var(--zs-surface-2);
    color: var(--zs-ink);
}

.zs-subnav a.active {
    background: var(--zs-accent-soft);
    color: var(--zs-accent);
}

/* The arrows of a row longer than the screen (toc.js), over the faded gutters. */
.zs-subnav .zs-container {
    position: relative;
}

.zs-subnav-arrow {
    position: absolute;
    top: 50%;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid var(--zs-border);
    border-radius: 50%;
    background: var(--zs-surface);
    color: var(--zs-ink-2);
    font-size: .75rem;
    box-shadow: var(--zs-shadow-sm);
    transform: translateY(-50%);
}

.zs-subnav-arrow:hover {
    background: var(--zs-surface-2);
    color: var(--zs-ink);
}

.zs-subnav-arrow-prev {
    left: .25rem;
}

.zs-subnav-arrow-next {
    right: .25rem;
}

@media (hover: none) and (pointer: coarse) {
    /* A touch screen swipes the row. */
    .zs-subnav-arrow {
        display: none;
    }
}

/*
 * Sticky where the screen has room for two bars: from lg up, and on a
 * narrower screen at least as tall as a laptop's browser window (a phone
 * in portrait, not in landscape), whose share of the height they take.
 */
@media (min-width: 992px), (min-height: 650px) {
    .zs-subnav {
        position: sticky;
        top: var(--zs-navbar-height);
        z-index: 1020;
    }

    .zs-page-sections > section,
    .zs-subnav ~ .zs-container .zs-prose h2,
    .zs-subnav ~ .zs-container .zs-prose [id] {
        /* Under the navbar and the sticky row of links. */
        scroll-margin-top: calc(var(--zs-navbar-height) + 5rem);
    }
}

/* Two halves of a card (the provoz and the timeline of the družina). */
.zs-split {
    display: grid;
    gap: 1.5rem 2.5rem;
}

@media (min-width: 768px) {
    .zs-split {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.zs-split h3 {
    margin-top: 0;
}

/* Text in two balanced columns keeps an item, a paragraph and a heading with its list whole. */
.zs-columns-2 li,
.zs-columns-2 p {
    break-inside: avoid;
}

.zs-columns-2 h3 {
    break-after: avoid;
}

.zs-columns-2 > :last-child {
    margin-bottom: 0;
}

/* ---------- The events calendar ----------
 * /kalendar (pages/calendar): a section per month, its events as rows under
 * date tiles (components/event-day, event-row) and a small month grid
 * beside them (components/event-month-grid). Outside it the events are
 * cards with the same tile (components/event-card) in the grid of the news
 * cards: the nearest ones on the home page, the calendar of a class and of
 * the družina. See .claude-plans/events-calendar.md, section 7.
 */

.zs-calendar {
    max-width: 74rem;
}

.zs-calendar-title {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    margin: 0 0 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--zs-border);
}

.zs-calendar-title span {
    font-size: .65em;
    font-weight: 500;
    color: var(--zs-ink-2);
}

.zs-calendar-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem 3rem;
    align-items: start;
}

/* The days of a month: a date tile and the events of that day. */
.zs-calendar-days {
    display: grid;
    gap: .75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.zs-calendar-day {
    display: grid;
    grid-template-columns: 3.75rem minmax(0, 1fr);
    gap: 0 .75rem;
    align-items: start;
    scroll-margin-top: calc(var(--zs-navbar-height) + 5rem);
}

.zs-calendar-date {
    display: grid;
    align-content: center;
    justify-items: center;
    min-height: 4.1rem;
    padding: .4rem .25rem;
    border-radius: var(--zs-radius-sm);
    background: var(--zs-accent-soft);
    color: var(--zs-accent);
    line-height: 1.15;
    text-align: center;
}

.zs-calendar-date-num {
    font-size: 1.6rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.zs-calendar-date-wd {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.zs-calendar-day.is-today .zs-calendar-date {
    background: var(--zs-accent);
    color: var(--zs-accent-contrast);
}

/* An event that began earlier: the tile says when it ends. */
.zs-calendar-date--until {
    background: var(--zs-surface-2);
    color: var(--zs-ink-2);
}

.zs-calendar-date--until .zs-calendar-date-num {
    font-size: .95rem;
    font-weight: 700;
}

/* The last day of a longer event, under a line in its tile. */
.zs-calendar-date-end {
    display: grid;
    justify-items: center;
    width: 100%;
    margin-top: .4rem;
    padding-top: .35rem;
    border-top: 1px solid color-mix(in srgb, currentColor 35%, transparent);
}

.zs-calendar-date-last {
    font-size: .95rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* The card is as tall as its tile, a row alone in it fills it. */
.zs-calendar-events {
    display: grid;
    align-self: stretch;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: hidden;
}

/* One event: the name opens its page, the whole row is the click target. */
.zs-event {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem 1rem;
    min-height: 4.1rem;
    padding: .7rem 2.6rem .7rem 1.1rem;
    transition: background-color .15s ease;
}

.zs-event + .zs-event {
    border-top: 1px solid var(--zs-border);
}

.zs-event:hover,
.zs-event:focus-within {
    background: var(--zs-surface-2);
}

.zs-event-main {
    flex: 1 1 15rem;
    min-width: 0;
}

.zs-event-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--zs-ink);
    text-decoration: none;
}

.zs-event:hover .zs-event-name,
.zs-event-name:focus-visible {
    color: var(--zs-accent);
    text-decoration: underline;
}

/* When and where. The when is the strong line: a parent reads the name,
   then the time; the place is a detail. */
.zs-event-facts {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .15rem 1.25rem;
    margin: .2rem 0 0;
}

.zs-event-when {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .1rem .5rem;
    font-size: 1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--zs-ink);
}

.zs-event-when i {
    width: 1rem;
    color: var(--zs-accent);
    text-align: center;
}

/* A half of "first day -> last day" never breaks inside. */
.zs-event-when-part {
    white-space: nowrap;
}

.zs-event-when-part i {
    margin-right: .5rem;
    font-size: .85em;
}

.zs-event-place {
    font-size: .95rem;
    color: var(--zs-ink-2);
}

.zs-event-place i {
    width: 1rem;
    margin-right: .35rem;
    color: var(--zs-ink-3);
    text-align: center;
}

.zs-event-side {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
}

.zs-event-flag,
.zs-event-more {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .15rem .6rem;
    border: 1px solid var(--zs-border);
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--zs-ink-2);
    white-space: nowrap;
}

.zs-event-flag--today {
    border-color: transparent;
    background: var(--zs-accent);
    color: var(--zs-accent-contrast);
}

.zs-event-arrow {
    position: absolute;
    top: 50%;
    right: 1.1rem;
    translate: 0 -50%;
    font-size: .8rem;
    color: var(--zs-ink-3);
}

/* The small month beside the list: a second way to read the same days. */
.zs-calendar-grid-box {
    display: none;
}

.zs-calendar-grid {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0 .2rem;
    font-size: .9rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.zs-calendar-grid th {
    padding: 0 0 .4rem;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--zs-ink-2);
}

.zs-calendar-grid abbr {
    text-decoration: none;
    cursor: default;
}

.zs-calendar-grid td {
    padding: 0;
}

.zs-calendar-grid td > * {
    display: inline-grid;
    place-items: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 999px;
    color: var(--zs-ink);
    text-decoration: none;
}

/* The days already over: greyer than the days ahead, in a tone that still passes the contrast rule. */
.zs-calendar-grid .is-past > * {
    color: var(--zs-ink-2);
}

/* A day on which anything takes place, one day of a longer event included:
   always the same mark, a link to the row that says what it is. */
.zs-calendar-grid a {
    background: var(--zs-accent-soft);
    color: var(--zs-accent);
    font-weight: 700;
}

.zs-calendar-grid a:hover,
.zs-calendar-grid a:focus-visible {
    background: var(--zs-accent);
    color: var(--zs-accent-contrast);
}

.zs-calendar-grid [aria-current="date"] > * {
    box-shadow: inset 0 0 0 2px var(--zs-accent);
    font-weight: 800;
}

.zs-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem 1.25rem;
    margin: .75rem 0 0;
    padding-top: .75rem;
    border-top: 1px solid var(--zs-border);
    font-size: .8rem;
    color: var(--zs-ink-2);
}

.zs-calendar-legend span {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.zs-calendar-legend-mark {
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    background: var(--zs-accent-soft);
}

.zs-calendar-legend-mark--today {
    background: none;
    box-shadow: inset 0 0 0 2px var(--zs-accent);
}

/* The row a day of the small month led to. */
.zs-calendar-day:target .zs-calendar-events {
    border-color: var(--zs-accent);
    box-shadow: 0 0 0 3px rgba(var(--zs-accent-rgb), .25);
}

.zs-calendar-archive {
    margin: 0;
}

@media (min-width: 576px) {
    .zs-calendar-day {
        grid-template-columns: 4.25rem minmax(0, 1fr);
        gap: 0 1rem;
    }
}

@media (min-width: 768px) {
    .zs-calendar-body {
        grid-template-columns: minmax(0, 1fr) 16.5rem;
    }

    .zs-calendar-grid-box {
        display: block;
        position: sticky;
        top: calc(var(--zs-navbar-height) + 5rem);
        padding: 1rem;
        border: 1px solid var(--zs-border);
        border-radius: var(--zs-radius);
        background: var(--zs-surface);
    }
}

@media (min-width: 1200px) {
    .zs-calendar-body {
        grid-template-columns: minmax(0, 1fr) 18.5rem;
    }
}

/* The archive of a school year: an event that is over, dimmed in tones that keep their contrast. */
.zs-calendar-day.is-past .zs-calendar-date {
    background: var(--zs-surface-2);
    color: var(--zs-ink-2);
}

.zs-calendar-day.is-past .zs-event-name,
.zs-calendar-day.is-past .zs-event-when {
    color: var(--zs-ink-2);
}

.zs-calendar-day.is-past .zs-event-when i {
    color: var(--zs-ink-3);
}

/* The page of one event (pages/event): when and where under its name in the title band. */
.zs-event-page {
    max-width: 62rem;
}

.zs-event-facts--lead {
    gap: .35rem 1.5rem;
    margin-top: .9rem;
}

.zs-event-facts--lead .zs-event-when {
    font-size: 1.2rem;
}

/* The whole sentence may wrap on a phone. */
.zs-event-facts--lead .zs-event-when-part {
    white-space: normal;
}

.zs-event-facts--lead .zs-event-place {
    font-size: 1.05rem;
}

.zs-event-side--lead {
    margin: .9rem 0 0;
}

.zs-event-text {
    padding: clamp(1.25rem, 3vw, 2rem);
}

/* Events as compact cards: the calendar of a class and of the družina (the
   home page shows one alone in its hero, .zs-hero-event). The columns are
   those of the news cards beside them (.zs-grid), so both grids line up and
   fill the same width. */
.zs-event-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.zs-event-card {
    position: relative;
    display: grid;
    grid-template-columns: 3.75rem minmax(0, 1fr);
    gap: 0 .9rem;
    align-items: center;
    padding: .75rem;
}

.zs-event-card .zs-event-name {
    display: block;
    line-height: 1.3;
}

.zs-event-card:hover .zs-event-name {
    color: var(--zs-accent);
    text-decoration: underline;
}

.zs-event-card.is-today .zs-calendar-date {
    background: var(--zs-accent);
    color: var(--zs-accent-contrast);
}

/* A card is narrow: the place has a line of its own under the when, the
   class pills and the chip of what the event's page adds one under that. */
.zs-event-card .zs-event-facts {
    flex-direction: column;
    gap: .1rem;
}

.zs-event-card .zs-event-side {
    margin: .45rem 0 0;
}

/* The calendar of a class: the card's top edge in the class colour, as its news cards. */
.zs-event-card--accent {
    border-top: 4px solid var(--zs-card-accent);
}

/* The events a news item is linked to, under its text in the dialog (components/news-events). */
.zs-news-events {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--zs-border);
}

.zs-news-events-title {
    margin: 0 0 .75rem;
    font-size: 1rem;
}

.zs-news-events-title i {
    margin-right: .35rem;
    color: var(--zs-accent);
}

/* "Odebírat kalendář" under the calendar of a class or of the družina. */
.zs-calendar-subscribe {
    margin: 1.25rem 0 0;
}
