/* SDH Kolovraty – public site styles (design "Hasiči Kolovraty – web", 2026) */

@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/roboto-latin-ext-A4Xa4gb.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: "Roboto";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/roboto-latin-EEph2sr.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: "Roboto Mono";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/roboto-mono-latin-TRnhYe_.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;
}

:root {
    --red: #c8102e;
    --red-dark: #9e0c24;
    --red-soft: #fbe8eb;
    --red-on-dark: #ff6b7f;
    --ink: #1a1a1a;
    --text: #3d3d45;
    --muted: #5c5c66;
    --bg: #f2f2f4;
    --surface: #ffffff;
    --line: #e0e0e3;
    --placeholder: #d9d9de;
    --dark-text: #d4d4d8;
    --dark-muted: #bdbdc4;
    --dark-line: #3d3d45;
    --shadow: 0 4px 24px rgb(0 0 0 / 8%);
    --wrap: 1200px;
    --gutter: 24px;
    --font: Roboto, Tahoma, system-ui, sans-serif;
    --mono: "Roboto Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
}

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

a {
    color: var(--red);
    text-underline-offset: 0.15em;
}

a:hover {
    color: var(--red-dark);
}

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

h1,
h2,
h3 {
    line-height: 1.2;
}

h1 {
    margin: 0;
    font-size: 46px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.3px;
}

h2 {
    margin: 2.5rem 0 1rem;
    font-size: 28px;
    font-weight: 700;
}

h3 {
    font-weight: 700;
}

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

.skip-link {
    position: absolute;
    left: 1rem;
    top: -3rem;
    z-index: 100;
    padding: 0.5rem 1rem;
    background: var(--ink);
    color: #fff;
}

.skip-link:focus {
    top: 0.5rem;
    color: #fff;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.arrow {
    flex: none;
}

/* Emergency strip */

.topbar {
    background: var(--ink);
    color: #fff;
    font-size: 13px;
}

.topbar .wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 6px 20px;
    min-height: 34px;
}

.topbar-hide {
    color: var(--dark-muted);
}

.topbar a {
    /* the emergency numbers are tapped on phones: at least 44 px high */
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 6px;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.topbar a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--surface);
    box-shadow: 0 1px 0 var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 88px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    color: var(--ink);
    text-decoration: none;
}

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

.brand-mark {
    display: block;
    flex: none;
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    text-transform: uppercase;
}

.brand-text strong {
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.6px;
    line-height: 1.2;
}

.brand-text small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.4px;
    line-height: 1.3;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    background: var(--red);
    color: #fff;
    font: 500 15px var(--font);
    cursor: pointer;
}

.nav-toggle:hover {
    background: var(--red-dark);
}

.nav-toggle-close,
.site-header[data-nav-open] .nav-toggle-open {
    display: none;
}

.site-header[data-nav-open] .nav-toggle-close {
    display: block;
}

/* Main menu – desktop */

.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav > ul {
    display: flex;
    align-items: stretch;
    height: 88px;
}

.main-nav > ul > li {
    position: relative;
    display: flex;
}

.main-nav > ul > li > a {
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-bottom: 3px solid transparent;
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.main-nav > ul > li.is-current > a {
    border-bottom-color: var(--ink);
}

.main-nav > ul > li > a:hover,
.main-nav > ul > li:focus-within > a {
    border-bottom-color: var(--red);
    color: var(--red);
}

.main-nav .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 20;
    display: none;
    min-width: 250px;
    padding: 8px 0;
    background: var(--surface);
    border-top: 3px solid var(--red);
    box-shadow: 0 10px 24px rgb(0 0 0 / 12%);
}

.main-nav > ul > li:last-child .submenu {
    left: auto;
    right: 0;
}

.main-nav .has-children:hover > .submenu,
.main-nav .has-children:focus-within > .submenu {
    display: block;
}

.main-nav .submenu a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 20px;
    color: var(--ink);
    font-size: 15px;
    text-decoration: none;
}

.main-nav .submenu a:hover,
.main-nav .submenu a[aria-current="page"] {
    background: var(--bg);
    color: var(--red);
}

@media (min-width: 1001px) and (max-width: 1180px) {
    .main-nav > ul > li > a {
        padding-inline: 10px;
    }
}

/* Main menu – phones and tablets */

@media (max-width: 1000px) {
    .js .nav-toggle {
        display: inline-flex;
    }

    .header-inner {
        flex-wrap: wrap;
    }

    .main-nav {
        flex-basis: calc(100% + 2 * var(--gutter));
        margin-inline: calc(-1 * var(--gutter));
        padding: 4px var(--gutter) 20px;
        border-top: 3px solid var(--red);
        background: var(--surface);
    }

    .js .main-nav {
        display: none;
        max-height: 75vh;
        overflow-y: auto;
    }

    .js .site-header[data-nav-open] .main-nav {
        display: block;
    }

    .main-nav > ul {
        flex-direction: column;
        height: auto;
    }

    .main-nav > ul > li {
        flex-direction: column;
        padding: 6px 0 12px;
        border-bottom: 1px solid var(--line);
    }

    .main-nav > ul > li > a {
        min-height: 48px;
        padding: 0;
        border: 0;
        font-size: 18px;
        font-weight: 700;
    }

    .main-nav > ul > li.is-current > a {
        color: var(--red);
    }

    .main-nav .submenu {
        position: static;
        display: block;
        min-width: 0;
        padding: 0;
        border: 0;
        box-shadow: none;
    }

    .main-nav .submenu a {
        padding: 0 0 0 14px;
        border-left: 2px solid var(--line);
        color: var(--text);
    }

    .main-nav .submenu a[aria-current="page"] {
        border-left-color: var(--red);
        background: none;
    }
}

/* Header photos */

.slideshow {
    position: relative;
    overflow: hidden;
    background: #2b2b30;
}

.slideshow img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 45%;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.slideshow img.is-active {
    opacity: 1;
}

.slideshow-toggle {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 1;
    padding: 6px 12px;
    border: 0;
    background: rgb(26 26 26 / 70%);
    color: #fff;
    font: 500 13px var(--font);
    cursor: pointer;
}

.hero-bg,
.page-bg {
    height: 440px;
}

/* the floating card overlaps the bottom of the photo, keep the pause button visible above it */
.hero-bg .slideshow-toggle {
    bottom: 156px;
}

.page-bg .slideshow-toggle {
    bottom: 112px;
}

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

/* Homepage hero */

.hero {
    position: relative;
}

.hero-ov {
    position: relative;
    margin-top: -140px;
}

.hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 40px;
    align-items: center;
    padding: 44px 48px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.hero-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.hero-text p {
    max-width: 640px;
    margin: 0;
    color: var(--text);
    font-size: 18px;
    line-height: 1.6;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--red);
    font-size: 14px;
    font-weight: 500;
}

.eyebrow span {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--red);
}

.hero-logo {
    position: relative;
    z-index: 2;
    flex: none;
    width: 260px;
    height: 260px;
    margin: -170px 8px -110px 0;
    padding: 10px;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: 0 10px 30px rgb(0 0 0 / 18%);
}

.hero-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

/* Subpage header */

.page-ov {
    position: relative;
    margin-top: -96px;
}

.page-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 20px 32px 0;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.page-header-text {
    padding-bottom: 16px;
}

.page-header-image {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 32px;
}

.page-emblem {
    align-self: center;
    width: 88px;
    height: 88px;
    margin-bottom: 16px;
    object-fit: contain;
    border-radius: 50%;
    background: var(--surface);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumbs a {
    color: var(--muted);
}

.breadcrumbs [aria-current] {
    color: var(--ink);
}

.page-header h1 {
    margin: 8px 0 8px;
    font-size: 34px;
}

.page-perex {
    max-width: 720px;
    margin: 0;
    color: var(--text);
    font-size: 16px;
    line-height: 1.5;
}

.subnav {
    grid-column: 1 / -1;
    display: flex;
    margin: 0 -32px;
    padding: 0 32px;
    overflow-x: auto;
    border-top: 1px solid var(--line);
}

.subnav a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 0 18px;
    border-bottom: 3px solid transparent;
    color: var(--muted);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.subnav a:hover {
    color: var(--red);
}

.subnav a[aria-current="page"] {
    border-bottom-color: var(--red);
    color: var(--ink);
    font-weight: 700;
}

.page-body {
    padding-top: 56px;
    padding-bottom: 72px;
}

.page-body > :first-child,
.page-body > :first-child > :first-child,
.page-body > :first-child > :first-child > :first-child {
    margin-top: 0;
}

/* Common blocks */

.surface {
    padding: clamp(20px, 3vw, 40px);
    background: var(--surface);
}

.prose {
    max-width: 46rem;
    color: var(--text);
    font-size: 17px;
    line-height: 1.65;
    /* long pasted URLs must not push the page wider than a phone */
    overflow-wrap: anywhere;
}

.prose h2,
.prose h3 {
    color: var(--ink);
}

.prose h2 {
    margin: 2rem 0 0.75rem;
    font-size: 24px;
}

/* table of contents of long pages (Historie) */
.toc {
    margin: 0 0 32px;
    padding: 20px 24px;
    border-left: 4px solid var(--red);
    background: var(--bg);
}

.toc h2 {
    margin: 0 0 8px;
    font-size: 17px;
}

.toc ol {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
    gap: 0 24px;
    margin: 0;
    padding-left: 1.25rem;
}

.toc a {
    display: inline-block;
    padding: 10px 0;
    color: var(--ink);
}

.prose h2[id] {
    scroll-margin-top: 96px;
}

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

/* text from the admin editor: paragraphs are <div>s, pictures are <figure>s inside them */
.prose {
    display: flow-root;
}

.prose p,
.prose > div,
.prose ul,
.prose ol {
    margin: 0 0 1rem;
}

.prose h2,
.prose h3 {
    clear: both;
}

.prose img {
    display: block;
}

.prose figure {
    clear: both;
    margin: 1.5rem 0;
}

.prose figure img {
    width: 100%;
}

/* thumbnails the text flows around (see ProseExtension) */
.prose figure.attachment--inline {
    clear: right;
    float: right;
    max-width: 40%;
    margin: 0.35rem 0 1rem 1.5rem;
}

.prose figure.attachment--inline img {
    width: auto;
    border: 1px solid var(--line);
}

/* a paragraph of pictures only (see ProseExtension): two per row, opened enlarged on click */
.prose .gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 1.5rem 0;
}

.prose .gallery figure,
.prose .gallery figure.attachment--inline {
    float: none;
    max-width: none;
    margin: 0;
}

.prose .gallery img,
.prose .gallery figure.attachment--inline img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border: 0;
}

@media (max-width: 520px) {
    .prose .gallery {
        gap: 8px;
    }
}

.prose figcaption:empty {
    display: none;
}

.prose figcaption {
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.4;
}

@media (max-width: 520px) {
    .prose figure.attachment--inline {
        max-width: 45%;
        margin-left: 1rem;
    }
}

.prose blockquote {
    margin: 1.5rem 0;
    padding: 4px 0 4px 16px;
    border-left: 4px solid var(--red);
    color: var(--muted);
}

.surface + .surface,
section + .surface,
.surface + section,
.surface + .people {
    margin-top: 32px;
}

.section-header,
.section-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.section-title {
    justify-content: flex-start;
    align-items: baseline;
    gap: 14px;
}

.section-header h2,
.section-title h2 {
    margin: 0;
}

.more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: var(--red);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
}

.more:hover .arrow {
    transform: translateX(3px);
}

.arrow {
    transition: transform 0.15s;
}

.back-link {
    margin-top: 16px;
}

.meta {
    color: var(--muted);
    font-size: 13px;
}

.empty {
    margin: 0;
    padding: 18px 22px;
    border: 1px dashed #c9c9cf;
    color: var(--muted);
    font-size: 15px;
}

.lead {
    margin-top: 0;
    color: var(--ink);
    font-size: 18px;
    font-weight: 500;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 24px;
    border: 0;
    background: var(--red);
    color: #fff;
    font: 500 16px var(--font);
    text-decoration: none;
    cursor: pointer;
}

.button:hover {
    background: var(--red-dark);
    color: #fff;
}

.button-block {
    display: flex;
    width: 100%;
    margin-bottom: 16px;
    padding: 0 16px;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    background: var(--bg);
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 24px;
    padding: 0 6px;
    background: var(--red-soft);
    color: var(--red-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.aside-box {
    padding: 26px 24px;
    background: var(--surface);
}

.aside-box h2,
.aside-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
}

.aside-dark {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--ink);
    color: #fff;
}

.aside-dark h2 {
    margin: 0;
}

.aside-dark p {
    margin: 0;
    color: var(--dark-text);
    font-size: 15px;
    line-height: 1.55;
}

.aside-dark .more {
    color: #fff;
}

.aside-dark .more .arrow {
    color: var(--red-on-dark);
}

.address {
    margin: 0;
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
}

/* Cards */

.card-grid,
.grid3,
.tiles {
    display: grid;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

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

.card-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid3,
.tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
}

.card-media {
    /* overflow lets aspect-ratio win over a tall photo's intrinsic height */
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--placeholder);
}

.card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s;
}

.card:hover .card-media img {
    transform: scale(1.03);
}

.card-media-empty {
    display: grid;
    place-items: center;
}

.card-media-empty img,
.photo-placeholder {
    width: 72px !important;
    height: 72px !important;
    object-fit: contain;
    border-radius: 50%;
    opacity: 0.55;
    filter: grayscale(1);
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 22px 24px 26px;
}

.card-kind {
    color: var(--red);
    font-weight: 500;
}

.card-body > .card-kind {
    font-size: 13px;
}

.card-title {
    margin: 0;
    font-size: 20px;
    line-height: 1.3;
}

.card-title a {
    color: var(--ink);
    text-decoration: none;
}

/* whole card is clickable via the title link */
.card-title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.card:hover .card-title a {
    color: var(--red);
}

.card p {
    margin: 0;
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
}

.tiles-title {
    margin: 48px 0 20px;
}

.tile {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    min-height: 190px;
    padding: 26px 24px;
    border-top: 4px solid var(--red);
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
}

.tile strong {
    font-size: 19px;
}

.tile span {
    flex: 1;
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
}

.tile .arrow {
    color: var(--red);
}

.tile:hover {
    color: var(--red);
}

.tile:hover .arrow {
    transform: translateX(4px);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
}

/* Homepage */

.home-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    padding-top: 140px;
    padding-bottom: 64px;
}

.home-aside {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.home-news {
    min-width: 0;
}

/* homepage without news: where to follow us instead */
.home-follow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    padding: 22px 24px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.home-follow h2 {
    margin: 0;
}

.home-follow-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* homepage: the full notice sits between the header and the hero */
.home-notices .notices {
    padding-block: 16px;
}

/* Events */

.event-month {
    margin-top: 40px;
}

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

.event-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.event-item {
    position: relative;
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    background: var(--surface);
}

.event-date {
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 56px;
    min-height: 56px;
    padding: 8px 0;
    background: var(--red);
    color: #fff;
    line-height: 1;
}

.event-date strong {
    font-size: 24px;
    font-weight: 900;
}

.event-date span {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.event-date-youth {
    background: var(--ink);
}

.event-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.event-body p {
    margin: 0;
}

.event-kind {
    color: var(--muted);
    font-size: 13px;
}

.event-body .card-title {
    font-size: 17px;
}

.event-body .meta {
    color: var(--text);
    font-size: 14px;
}

.event-perex {
    margin-top: 6px !important;
    color: var(--text);
    font-size: 15px;
}

.event-list-past .event-date {
    background: var(--placeholder);
    color: var(--muted);
}

.event-list-compact {
    gap: 0;
}

.event-list-compact .event-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.event-list-compact .event-item:last-child {
    border-bottom: 0;
}

.event-list-compact .event-perex {
    display: none;
}

.event-list-compact + .more {
    margin-top: 4px;
}

.event-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20rem;
    gap: 24px;
    align-items: start;
}

.event-poster {
    display: block;
    margin: 0 auto 24px;
}

.event-facts {
    margin: 0;
}

.event-facts dt {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.event-facts dd {
    margin: 4px 0 16px;
    font-weight: 700;
}

/* Technika */

.equipment-section + .equipment-section {
    margin-top: 56px;
}

.equipment-section h2 {
    margin: 0 0 24px;
    font-size: 30px;
}

.section-title h2 {
    margin: 0;
}

.feat-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 24px;
    background: var(--surface);
}

.feat-photo {
    min-height: 280px;
    overflow: hidden;
    background: var(--placeholder);
}

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

.feat-photo .photo-placeholder {
    margin: 104px auto;
}

.feat-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px 28px 30px;
    border-top: 4px solid var(--red);
}

.kind {
    color: var(--red);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.feat-body h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1.25;
}

.feat-body h3 a {
    color: var(--ink);
    text-decoration: none;
}

.feat-body h3 a:hover {
    color: var(--red);
}

.designation {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 14px;
}

.figures {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 6px 0 0;
    border-top: 1px solid var(--line);
}

.figures div {
    padding: 12px 12px 0;
}

.figures div:first-child {
    padding-left: 0;
}

.figures div + div {
    border-left: 1px solid var(--line);
}

.figures dt {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.figures dd {
    margin: 4px 0 0;
    font-size: 20px;
    font-weight: 900;
}

.grid3 .card-body {
    gap: 6px;
    padding: 18px 20px 22px;
}

.grid3 .card-title {
    font-size: 18px;
}

.past-card {
    position: relative;
    display: flex;
    min-height: 96px;
    background: var(--surface);
}

.past-photo {
    display: grid;
    flex: none;
    place-items: center;
    width: 120px;
    overflow: hidden;
    background: #cfcfd4;
}

.past-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1);
}

.past-photo .photo-placeholder {
    width: 48px !important;
    height: 48px !important;
}

.past-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    padding: 16px 18px;
}

.past-body span {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.past-body a {
    color: var(--ink);
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
}

.past-body a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.past-card:hover a {
    color: var(--red);
}

/* history of the equipment, the text of the Technika page */
.hist {
    max-width: none;
    margin-top: 56px;
    padding: 44px 48px;
    background: var(--ink);
    color: #fff;
}

.hist h2 {
    margin: 0 0 28px;
    color: #fff;
    font-size: 30px;
}

.hist p {
    color: var(--dark-muted);
}

.hist ul,
.hist ol {
    margin: 0;
    padding: 0;
    columns: 2;
    column-gap: 48px;
    list-style: none;
}

.hist li {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 14px 0;
    border-top: 1px solid var(--dark-line);
    break-inside: avoid;
    color: var(--dark-text);
    font-size: 16px;
}

.hist li strong:first-child {
    flex: none;
    min-width: 64px;
    padding: 4px 0;
    background: var(--red);
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    text-align: center;
}

.hist a {
    color: #fff;
}

/* Equipment detail */

.equipment-hero {
    display: block;
    width: 100%;
    max-height: 32rem;
    margin-bottom: 24px;
    object-fit: cover;
}

.equipment-detail h2 {
    font-size: 24px;
}

.spec-table {
    width: 100%;
    max-width: 46rem;
    border-collapse: collapse;
    font-size: 15px;
}

.spec-table th,
.spec-table td {
    padding: 10px 12px 10px 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.spec-table th[scope="row"] {
    width: 40%;
    color: var(--muted);
    font-weight: 400;
}

.spec-table th[scope="rowgroup"] {
    padding-top: 24px;
    color: var(--red);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

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

.gallery a {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.gallery a:hover img {
    transform: scale(1.04);
}

/* Fire unit members */

.unit {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.unit-aside {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.unit-main {
    min-width: 0;
}

.unit .aside-title {
    margin-bottom: 14px;
    color: var(--red);
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.unit .aside-dark h2 {
    font-size: 20px;
}

.leader-list {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.leader-list li {
    display: flex;
    gap: 14px;
    align-items: center;
    line-height: 1.3;
}

.leader-list strong {
    display: block;
    font-size: 17px;
}

.leader-list small,
.leader-list a {
    display: block;
    font-size: 14px;
}

.leader-list small {
    color: var(--muted);
}

/* black square with initials (or a photo) */
.person-badge {
    display: grid;
    flex: none;
    place-items: center;
    width: 52px;
    height: 52px;
    overflow: hidden;
    background: var(--ink);
    color: #fff;
    font-size: 17px;
    font-weight: 900;
}

.person-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.legend {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px 14px;
    align-items: center;
    margin: 0;
    font-size: 15px;
}

.legend dd {
    margin: 0;
}

.tag-solid {
    background: var(--red);
    color: #fff;
}

.unit-main .section-title {
    margin-bottom: 20px;
}

.unit-main .section-title h2 {
    font-size: 30px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.chips[hidden] {
    display: none;
}

.chips button {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid #c9c9cf;
    background: var(--surface);
    color: var(--ink);
    font: 500 14px var(--font);
    cursor: pointer;
}

.chips button:hover {
    border-color: var(--ink);
}

.chips button[aria-pressed="true"] {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.member-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.member-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
}

.member-card[hidden] {
    display: none;
}

.member-photo,
.person-photo {
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--placeholder);
    color: #8a8a93;
    font-size: 34px;
    font-weight: 900;
    letter-spacing: 1px;
}

.member-photo img,
.person-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px 18px;
}

.member-body h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.3;
}

.person-function {
    color: var(--red);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
}

.member-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: auto 0 0;
    padding: 8px 0 0;
    list-style: none;
}

.member-tags .tag {
    min-width: 40px;
    border: 1px solid #c9c9cf;
    background: var(--bg);
    color: var(--ink);
    text-decoration: none;
    cursor: help;
}

/* Intervention statistics */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
    gap: 24px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.kpi {
    padding: 24px;
    border-top: 4px solid var(--red);
    background: var(--surface);
}

.kpi strong {
    display: block;
    color: var(--ink);
    font-size: 36px;
    font-weight: 900;
    line-height: 1.1;
}

.kpi span {
    color: var(--muted);
    font-size: 15px;
}

.bar-chart {
    display: grid;
    gap: 8px;
    max-width: 46rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bar-chart li {
    display: grid;
    grid-template-columns: 3rem 1fr 2.5rem;
    gap: 12px;
    align-items: center;
}

.bar-label {
    color: var(--muted);
    font-size: 14px;
}

.bar-track {
    height: 24px;
    overflow: hidden;
    background: var(--placeholder);
}

.bar {
    display: block;
    height: 100%;
    background: var(--red);
}

.bar-value {
    font-weight: 700;
    text-align: right;
}

/* Homepage: interventions in numbers */

.home-stats {
    margin-top: 40px;
}

.home-stats-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 24px;
    padding: 24px;
    border-top: 4px solid var(--red);
    background: var(--surface);
}

.home-stats-figures {
    display: grid;
    gap: 16px;
    margin: 0;
}

.home-stats-figures div {
    display: flex;
    flex-direction: column-reverse;
}

.home-stats-figures dt {
    color: var(--muted);
    font-size: 14px;
}

.home-stats-figures dd {
    margin: 0;
    color: var(--ink);
    font-size: 34px;
    font-weight: 900;
    line-height: 1.1;
}

.home-stats-types {
    align-content: center;
}

.home-stats-types li {
    grid-template-columns: minmax(0, 9rem) 1fr 2.5rem;
}

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

    .home-stats-figures {
        grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
    }
}

.table-scroll {
    overflow-x: auto;
}

.stats-table {
    width: 100%;
    min-width: 34rem;
    border-collapse: collapse;
    background: var(--surface);
    font-size: 15px;
}

.stats-table th,
.stats-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: right;
    white-space: nowrap;
}

.stats-table th[scope="row"] {
    font-weight: 400;
    text-align: left;
}

.stats-table thead th {
    background: var(--ink);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.4px;
}

.stats-table thead th:first-child {
    text-align: left;
}

.stats-table .sum {
    background: var(--red-soft);
    font-weight: 700;
}

.stats-table tfoot th,
.stats-table tfoot td {
    border-bottom: 0;
    font-weight: 700;
}

/* Footer */

.site-footer {
    background: var(--ink);
    color: var(--dark-text);
    font-size: 15px;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr));
    gap: 32px;
    padding-top: 56px;
    padding-bottom: 40px;
}

.footer-grid > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.footer-grid strong {
    margin-bottom: 8px;
    color: #fff;
}

.footer-brand {
    gap: 12px !important;
}

.footer-brand img {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
}

.footer-brand strong {
    margin: 0;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.footer-brand span {
    line-height: 1.6;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li a {
    display: flex;
    align-items: center;
    min-height: 36px;
    color: var(--dark-text);
    text-decoration: none;
}

.site-footer li a:hover {
    color: #fff;
    text-decoration: underline;
}

.copyright {
    padding-top: 18px;
    padding-bottom: 24px;
    border-top: 1px solid var(--dark-line);
    color: #a1a1aa;
    font-size: 14px;
}

/* Login (uses the public layout) */

.login-form {
    display: grid;
    gap: 8px;
    max-width: 26rem;
}

.login-form input {
    min-height: 48px;
    padding: 0 12px;
    border: 1px solid #c9c9cf;
    font: inherit;
}

.login-form button {
    margin-top: 12px;
}

.alert-danger {
    padding: 12px 16px;
    background: var(--red-soft);
    color: var(--red-dark);
}

/* Important notices (flood, storm…) */

.notices {
    padding-block: 16px 0;
}

.notices .wrap,
.notices .container {
    display: grid;
    gap: 12px;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.notice {
    padding: 16px 20px;
    border-left: 6px solid #2f6fb3;
    background: #eaf2fb;
}

.notice-warning {
    border-left-color: #d08a00;
    background: #fff5dc;
}

.notice-danger {
    border-left-color: var(--red);
    background: var(--red-soft);
}

.notice-title {
    display: block;
    font-size: 18px;
}

.notice .prose {
    margin-top: 6px;
    font-size: 16px;
}

.notice .prose > :last-child {
    margin-bottom: 0;
}

.notice .meta {
    margin: 6px 0 0;
}

.notices-compact {
    padding-bottom: 16px;
}

.notices-compact .notice {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 16px;
    padding-block: 10px;
}

.notices-compact .notice-title {
    font-size: 16px;
}

/* Article filter */

.filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.filter a,
.filter button {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid #c9c9cf;
    background: var(--surface);
    color: var(--ink);
    font: 500 15px var(--font);
    text-decoration: none;
    cursor: pointer;
}

.filter a:hover,
.filter button:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.filter a[aria-current="page"],
.filter button[aria-pressed="true"] {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

/* People (board, youth leaders) */

.people {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.people h2 {
    margin: 0 0 24px;
    font-size: 30px;
}

.person-lead {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    background: var(--surface);
}

.person-lead .person-photo {
    aspect-ratio: auto;
    min-height: 170px;
    font-size: 32px;
}

.person-lead-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    padding: 22px 28px;
    border-left: 4px solid var(--red);
}

.person-lead-text .person-function {
    font-size: 14px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.person-lead-text h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 900;
    line-height: 1.2;
}

.person-lead-text p {
    max-width: 560px;
    margin: 0;
    color: var(--text);
    line-height: 1.6;
}

.person-lead-text .button {
    align-self: flex-start;
    min-height: 44px;
    margin-top: 8px;
    padding: 0 18px;
    font-size: 15px;
    overflow-wrap: anywhere;
}

/* Kontakt: the people to call first */

.contact-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 0 0 32px;
    padding: 0;
    list-style: none;
}

.contact-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 22px 24px 24px;
    border-top: 4px solid var(--red);
    background: var(--surface);
}

.contact-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
    line-height: 1.25;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: var(--ink);
    font-size: 17px;
    font-weight: 500;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.contact-link svg {
    flex: none;
    color: var(--red);
}

.contact-link:hover {
    color: var(--red);
}

.contact-card p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

@media (max-width: 860px) {
    .contact-cards {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }
}

.person-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.person-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
}

.person-card-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px 22px;
    border-top: 4px solid var(--red);
}

.person-card-text h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
}

.person-contact {
    font-size: 14px;
    overflow-wrap: anywhere;
}

.person-link {
    margin-top: 4px;
    font-size: 14px;
    font-weight: 500;
}

.person-compact-list {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.person-compact {
    display: flex;
    gap: 18px;
    align-items: center;
    max-width: 520px;
    padding: 20px 24px;
    background: var(--surface);
}

.person-compact .person-badge {
    width: 56px;
    height: 56px;
    font-size: 18px;
}

.person-compact > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.person-compact strong {
    font-size: 18px;
}

/* Documents */

.document-group {
    margin-bottom: 24px;
    background: var(--surface);
}

.document-group h2 {
    margin: 0;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    font-size: 20px;
}

.document-list {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
}

.document-list li {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 14px 20px;
    line-height: 1.35;
}

.document-list li + li {
    border-top: 1px solid var(--line);
}

.document-text {
    flex: 1;
    min-width: 0;
}

.document-text a {
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
}

.document-text a:hover {
    color: var(--red);
}

.document-list small {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.file-icon {
    flex: none;
    color: var(--red);
}

.document-download {
    flex: none;
    min-height: 44px;
    padding: 0 16px;
    font-size: 14px;
}

@media (max-width: 520px) {
    .document-download {
        width: 44px;
        padding: 0;
        font-size: 0;
        gap: 0;
    }
}

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

/* Youth competitions */

.competition-list {
    display: grid;
    gap: 16px;
    margin: 0 0 32px;
    padding: 0;
    list-style: none;
}

.competition {
    padding: 22px 24px;
}

.competition-name {
    margin: 0;
    font-size: 19px;
}

.competition > .meta {
    margin: 4px 0 12px;
    font-size: 14px;
}

.competition > a {
    display: inline-block;
    margin-top: 8px;
    font-size: 15px;
    font-weight: 500;
}

.competition .table-scroll {
    border: 1px solid var(--line);
}

/* same columns in every competition so the results line up */
.results-table {
    width: 100%;
    min-width: 32rem;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 15px;
}

.results-table th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.4px;
    text-align: left;
    text-transform: uppercase;
}

.results-table th,
.results-table td {
    padding: 8px 10px 8px 0;
    border-bottom: 1px solid var(--line);
    vertical-align: baseline;
}

.results-table tr:last-child td {
    border-bottom: 0;
}

.results-table th:nth-child(1) { width: 24%; }
.results-table th:nth-child(2) { width: 26%; }
.results-table th:nth-child(3) { width: 16%; }

.results-table-rounds th:nth-child(1) { width: 24%; }
.results-table-rounds th:nth-child(2) { width: 18%; }
.results-table-rounds th:nth-child(3) { width: 20%; }
.results-table-rounds th:nth-child(4) { width: 16%; }

.results-table th:first-child,
.results-table td:first-child {
    padding-left: 12px;
}

.place {
    display: inline-block;
    min-width: 2.2rem;
    padding: 1px 6px;
    background: var(--bg);
    font-weight: 700;
    text-align: center;
}

.place-1 {
    background: #f5d76e;
}

.results-heading {
    margin: 16px 0 4px;
    font-size: 15px;
}

.place-2 {
    background: #d9dde2;
}

.place-3 {
    background: #e7b98c;
}

/* Responsive */

@media (max-width: 1100px) {
    .member-grid,
    .person-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1000px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .hero-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .hero-logo {
        order: -1;
        width: 150px;
        height: 150px;
        margin: -110px 0 0;
        padding: 6px;
    }

    .home-layout {
        grid-template-columns: minmax(0, 1fr);
        padding-top: 48px;
    }

    .tiles,
    .feat-card,
    .unit,
    .event-detail {
        grid-template-columns: minmax(0, 1fr);
    }

    .unit-aside {
        order: 2;
    }

    .person-lead {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .person-lead .person-photo {
        min-height: 120px;
        font-size: 24px;
    }

    .person-lead-text {
        padding: 16px;
    }

    .person-lead-text .button {
        padding: 0 12px;
        font-size: 13px;
        word-break: break-all;
    }

    .feat-photo {
        min-height: 200px;
    }

    .grid3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hist ul,
    .hist ol {
        columns: 1;
    }

}

@media (max-width: 640px) {
    :root {
        --gutter: 16px;
    }

    h1 {
        font-size: 34px;
    }

    h2 {
        font-size: 24px;
    }

    .header-inner {
        min-height: 68px;
    }

    .brand-mark {
        width: 48px;
        height: 48px;
    }

    .brand-text small,
    .topbar-hide {
        display: none;
    }

    .hero-bg,
    .page-bg {
        height: 240px;
    }

    .hero-ov {
        margin-top: -48px;
    }

    .hero-bg .slideshow-toggle {
        bottom: 60px;
    }

    .hero-card {
        padding: 28px 20px;
    }

    .page-bg .slideshow-toggle {
        bottom: 52px;
    }

    .page-ov {
        margin-top: -40px;
    }

    .page-header {
        padding: 16px 16px 0;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .page-header-image {
        column-gap: 16px;
    }

    .page-emblem {
        width: 56px;
        height: 56px;
    }

    .subnav {
        margin: 0 -16px;
        padding: 0 4px;
    }

    .page-body {
        padding-top: 32px;
        padding-bottom: 48px;
    }

    .card-grid-2,
    .grid3,
    .footer-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .member-grid,
    .person-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .person-lead-text h2 {
        font-size: 22px;
    }

    .equipment-section h2,
    .hist h2 {
        font-size: 24px;
    }

    .hist {
        padding: 28px 20px;
    }

    .figures dd {
        font-size: 17px;
    }

    .document-list {
        padding-inline: 16px;
    }
}

/* Enlarged photos from page text (assets/app.js) */
.prose img.is-zoomable {
    cursor: zoom-in;
}

.prose img.is-zoomable:focus-visible {
    outline: 3px solid var(--red);
    outline-offset: 2px;
}

.lightbox {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 56px 64px;
    border: 0;
    background: rgba(10, 10, 12, 0.97);
    color: #fff;
}

.lightbox::backdrop {
    background: transparent;
}

.lightbox[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
}

.lightbox-figure img {
    flex: none;
    max-width: 100%;
    background: #fff;
}

.lightbox-figure figcaption {
    max-width: 46rem;
    margin-top: 12px;
    color: #d4d4d8;
    font-size: 15px;
    text-align: center;
}

.lightbox button {
    position: absolute;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-family: inherit;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

.lightbox button:hover,
.lightbox button:focus-visible {
    background: var(--red);
}

.lightbox-close {
    top: 8px;
    right: 8px;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev {
    left: 8px;
}

.lightbox-next {
    right: 8px;
}

.lightbox.is-single .lightbox-prev,
.lightbox.is-single .lightbox-next {
    display: none;
}

.lightbox-count {
    position: absolute;
    top: 20px;
    left: 20px;
    margin: 0;
    color: #a1a1aa;
    font-size: 14px;
}

@media (max-width: 600px) {
    .lightbox {
        padding: 56px 8px 72px;
    }

    .lightbox-prev,
    .lightbox-next {
        top: auto;
        bottom: 12px;
        transform: none;
    }
}

/* ------------------------------------------------------------------
   Second design batch (O nás, Historie, Rady občanům, Hřiště, …)
   ------------------------------------------------------------------ */

.eyebrow-text,
.chapters .eyebrow,
.aside-box .eyebrow,
.place-card .eyebrow,
.partner-bar .eyebrow {
    display: block;
    margin: 0 0 8px;
    color: var(--red);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.button-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid #c9c9cf;
    background: var(--surface);
    color: var(--ink);
    font: 500 15px var(--font);
    text-decoration: none;
    cursor: pointer;
}

.button-outline:hover {
    border-color: var(--ink);
    color: var(--ink);
}

/* Chapters: a long text in boxes with its contents on the side (Historie, Obec, Rady občanům) */

.chapters {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.chapters-aside {
    position: sticky;
    top: 112px;
    display: grid;
    gap: 24px;
}

.chapters-main {
    display: grid;
    gap: 32px;
    min-width: 0;
}

.chapter h2,
.bare-section > h2 {
    margin: 0 0 20px;
}

.chapter[id],
.bare-section[id],
.split-block[id] {
    scroll-margin-top: 104px;
}

.chapter .prose {
    max-width: none;
}

.chapter .prose > div,
.chapter .prose > p {
    max-width: 46rem;
}

.toc-box {
    padding: 22px 22px 18px;
    background: var(--surface);
}

.toc-box summary {
    margin-bottom: 14px;
    color: var(--red);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    list-style: none;
}

.toc-box summary::-webkit-details-marker {
    display: none;
}

.toc-box ol {
    margin: 0;
    padding: 0;
    border-left: 2px solid var(--line);
    list-style: none;
}

.toc-box a {
    display: block;
    margin-left: -2px;
    padding: 8px 0 8px 14px;
    border-left: 2px solid transparent;
    color: var(--text);
    font-size: 15px;
    line-height: 1.35;
    text-decoration: none;
}

.toc-box a:hover {
    color: var(--red);
}

.toc-box a[aria-current="true"] {
    border-left-color: var(--red);
    color: var(--ink);
    font-weight: 700;
}

@media (min-width: 901px) {
    /* the contents are always open next to the text */
    .toc-box summary {
        pointer-events: none;
    }
}

.aside-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 22px;
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
}

.aside-link .eyebrow {
    margin: 0;
}

.aside-link .arrow {
    color: var(--red);
}

.aside-link:hover strong {
    color: var(--red);
}

.dates-box dl {
    margin: 0;
}

.dates-box dl > div {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.dates-box dt {
    font-size: 18px;
    font-weight: 900;
}

.dates-box dd {
    margin: 0;
    color: var(--text);
    font-size: 14px;
    line-height: 1.45;
}

.milestones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 1px;
    margin: 0;
    padding: 0;
    background: var(--dark-line);
    list-style: none;
}

.milestones li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 16px;
    background: var(--ink);
    color: #fff;
}

.milestones strong {
    font-size: 24px;
    font-weight: 900;
}

.milestones span {
    color: var(--dark-muted);
    font-size: 14px;
}

/* Photos in the text: several in a row, a long series shows a few and the rest on request */

.prose .gallery {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
    gap: 8px;
}

.prose .gallery.is-collapsed > :nth-child(n + 7) {
    display: none;
}

.gallery-more {
    margin: -0.5rem 0 1rem;
}

/* Lists written in a recognisable shape (see ProseExtension::styleLists) */

.prose .timeline,
.prose .phone-tiles,
.prose .link-cards,
.prose .link-buttons,
.prose .steps,
.prose .feature-cards,
.prose .advice {
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
}

.prose .timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
    gap: 24px;
}

.prose .timeline li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 14px;
    border-top: 4px solid var(--ink);
    font-size: 15px;
    line-height: 1.55;
}

.prose .timeline li:last-child {
    border-top-color: var(--red);
}

.timeline-year {
    color: var(--ink);
    font-size: 28px;
    font-weight: 900;
    line-height: 1.1;
}

.prose .timeline strong {
    color: var(--ink);
    font-size: 16px;
}

.prose .phone-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.prose .phone-tiles a {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 14px 18px;
    background: #2a2a2e;
    color: #fff;
    text-decoration: none;
}

.prose .phone-tiles a:hover {
    background: var(--red);
}

.prose .phone-tiles strong {
    font-size: 22px;
    font-weight: 900;
    line-height: 1.25;
}

.prose .phone-tiles span {
    color: var(--dark-text);
    font-size: 14px;
    line-height: 1.4;
}

.prose .link-cards,
.prose .feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
    gap: 24px;
}

.prose .feature-cards li,
.link-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    padding: 24px;
    border-top: 4px solid var(--red);
    background: var(--surface);
    font-size: 15px;
    line-height: 1.55;
}

.prose .feature-cards strong,
.link-card strong {
    color: var(--ink);
    font-size: 18px;
    line-height: 1.3;
}

.link-card {
    position: relative;
    padding-right: 48px;
    color: var(--text);
    text-decoration: none;
}

.link-card::after {
    content: "";
    position: absolute;
    top: 26px;
    right: 22px;
    width: 14px;
    height: 14px;
    background: var(--red);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5'%3E%3Cpath d='M6 18 18 6M8 6h10v10'/%3E%3C/svg%3E") center / contain no-repeat;
}

.link-card:hover strong {
    color: var(--red);
}

.link-card-host {
    margin-top: auto;
    padding-top: 6px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 13px;
}

.prose .link-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.prose .link-buttons a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid #c9c9cf;
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
}

.prose .link-buttons a:hover {
    border-color: var(--ink);
}

.prose .steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
    gap: 24px;
    counter-reset: step;
}

.prose .steps li {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 60px;
    font-size: 15px;
    line-height: 1.55;
    counter-increment: step;
}

.prose .steps li::before {
    content: counter(step, decimal-leading-zero);
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    background: var(--red);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.prose .steps strong {
    color: var(--ink);
    font-size: 18px;
}

.prose .advice li {
    position: relative;
    padding: 12px 0 12px 40px;
    border-top: 1px solid var(--line);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.55;
}

.prose .advice li::before {
    content: "";
    position: absolute;
    top: 14px;
    left: 0;
    width: 28px;
    height: 28px;
    background: #1f7a3a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 16px no-repeat;
}

.prose .advice li.advice-dont::before {
    background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* Rady občanům: the emergency numbers on dark, the evacuation bag as a checklist */

#tisnova-volani {
    background: var(--ink);
    color: #fff;
}

#tisnova-volani h2,
#tisnova-volani .prose,
#tisnova-volani .prose strong {
    color: #fff;
}

#tisnova-volani .prose p {
    color: var(--dark-text);
    font-size: 15px;
}

#evakuacni-zavazadlo .prose > ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
    padding: 0;
    list-style: none;
}

#evakuacni-zavazadlo .prose > ul li {
    position: relative;
    padding: 12px 0 12px 38px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-size: 16px;
}

#evakuacni-zavazadlo .prose > ul li::before {
    content: "";
    position: absolute;
    top: 14px;
    left: 2px;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--muted);
}

/* O nás */

.about-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 48px;
    align-items: center;
    margin: 16px 0 48px;
}

.about-intro .prose {
    max-width: 52rem;
    color: var(--ink);
    font-size: 21px;
    font-weight: 600;
    line-height: 1.5;
}

.about-intro .prose em {
    color: var(--muted);
    font-size: 16px;
    font-weight: 400;
}

.about-emblem {
    width: 240px;
    height: 240px;
    padding: 8px;
    border-radius: 50%;
    background: var(--surface);
}

.number-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
    gap: 24px;
    margin: 0 0 56px;
    padding: 0;
    list-style: none;
}

.number-tiles li {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 24px 26px 28px;
    border-top: 4px solid var(--red);
    background: var(--surface);
}

.number-tiles strong {
    font-size: 38px;
    font-weight: 900;
    line-height: 1.1;
}

.number-tiles span {
    color: var(--text);
    font-size: 15px;
    line-height: 1.45;
}

.split-blocks {
    display: grid;
    gap: 28px;
}

.split-block {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 340px;
    background: var(--surface);
}

.split-blocks .split-block:nth-child(even) .split-media {
    order: 2;
}

.split-block-text {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
}

.split-media {
    position: relative;
    max-width: none;
    min-height: 260px;
    background: var(--placeholder);
}

.split-media > img,
.place-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.split-count {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 4px 10px;
    background: rgb(0 0 0 / 70%);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    pointer-events: none;
}

.split-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: clamp(24px, 4vw, 52px);
}

.split-text h2 {
    margin: 0 0 12px;
}

.split-text h2 + .prose + h2 {
    margin-top: 16px;
}

.split-text .prose {
    font-size: 16px;
}

.split-text .more {
    align-self: flex-start;
}

.link-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    gap: 20px;
    margin: 48px 0 0;
    padding: 0;
    list-style: none;
}

.link-tiles a {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    padding: 22px 24px 24px;
    border-top: 4px solid var(--red);
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
}

.link-tiles strong {
    font-size: 19px;
}

.link-tiles span {
    flex: 1;
    margin-bottom: 12px;
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
}

.link-tiles .arrow {
    color: var(--red);
}

.link-tiles a:hover strong {
    color: var(--red);
}

/* Pages of sections: text in boxes, cards and photos on the page background */

.bare-section,
.chapter {
    margin-top: 48px;
}

.bare-section:first-child,
.chapter:first-child,
.chapters-main .chapter,
.chapters-main .milestones + .chapter {
    margin-top: 0;
}

.bare-section .prose {
    max-width: none;
}

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

/* Hasičské hřiště */

.place-top {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    margin-bottom: 48px;
}

.place-photo {
    position: relative;
    max-width: none;
    aspect-ratio: 16 / 9;
    background: var(--placeholder);
}

.place-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.place-name {
    font-size: 19px;
}

.place-card p {
    margin: 0 0 16px;
    color: var(--text);
}

#svepomoci {
    background: var(--ink);
    color: var(--dark-text);
}

#svepomoci h2,
#svepomoci .prose,
#svepomoci .prose strong {
    color: #fff;
}

/* Hasiči pro zvířátka */

.partner-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 48px;
    padding: 24px 28px;
    background: var(--ink);
    color: #fff;
    text-decoration: none;
}

.partner-bar strong {
    font-size: 20px;
}

.partner-bar .eyebrow {
    margin-bottom: 2px;
    color: var(--red-on-dark);
}

.partner-bar:hover {
    color: #fff;
    background: #000;
}

@media (max-width: 900px) {
    .chapters {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .chapters-aside {
        position: static;
    }

    .toc-box summary {
        margin: 0;
        cursor: pointer;
    }

    .toc-box summary::after {
        content: "▾";
        float: right;
        color: var(--ink);
    }

    .toc-box[open] summary {
        margin-bottom: 14px;
    }

    .toc-box[open] summary::after {
        content: "▴";
    }

    .about-intro {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .about-emblem {
        order: -1;
        width: 140px;
        height: 140px;
    }

    .split-block {
        grid-template-columns: minmax(0, 1fr);
    }

    .split-blocks .split-block:nth-child(even) .split-media {
        order: 0;
    }

    .place-top {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .about-intro .prose {
        font-size: 18px;
    }

    .prose .phone-tiles,
    #evakuacni-zavazadlo .prose > ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #evakuacni-zavazadlo .prose > ul {
        grid-template-columns: minmax(0, 1fr);
    }

    .number-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .number-tiles li {
        padding: 18px;
    }

    .number-tiles strong {
        font-size: 30px;
    }

    .milestones {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Zásahová činnost */

.kpi {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kpi-dark {
    border-top-color: var(--ink);
}

.kpi strong {
    font-size: 34px;
}

.stats-charts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin: 32px 0 48px;
}

.stats-chart h2 {
    margin: 0 0 20px;
    font-size: 22px;
}

.year-chart {
    display: flex;
    align-items: stretch;
    gap: 16px;
    height: 240px;
    margin: 0 0 12px;
    padding: 0;
    border-bottom: 1px solid #c9c9cf;
    list-style: none;
}

.year-chart li {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    position: relative;
    padding-bottom: 24px;
}

.year-chart-bar {
    width: 100%;
    height: calc(var(--h) - 40px);
    min-height: 2px;
    background: var(--red);
}

.year-chart .is-running .year-chart-bar {
    background: #c9c9cf;
}

.year-chart-value {
    font-size: 15px;
    font-weight: 700;
}

.year-chart-label {
    position: absolute;
    bottom: 2px;
    color: var(--muted);
    font-size: 13px;
}

/* not share-*: ad blockers hide share-* classes as social sharing buttons */
.kind-bar {
    display: flex;
    height: 28px;
    margin-bottom: 16px;
}

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

.kind-legend li {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) auto 3rem;
    gap: 10px;
    align-items: center;
    padding: 7px 0;
    border-top: 1px solid var(--line);
    font-size: 15px;
}

.kind-swatch {
    width: 14px;
    height: 14px;
}

.kind-percent {
    color: var(--muted);
    font-size: 14px;
    text-align: right;
}

.segmented {
    display: inline-flex;
    gap: 8px;
}

.segmented button {
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid #c9c9cf;
    background: var(--surface);
    color: var(--ink);
    font: 500 15px var(--font);
    cursor: pointer;
}

.segmented button[aria-pressed="true"] {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.stats-table .zero {
    color: #b5b5bc;
}

.stats-table thead .sum {
    background: #3a1219;
}

.th-note {
    color: var(--dark-muted);
    font-weight: 400;
}

[data-stats-table] + [data-stats-table] {
    margin-top: 24px;
}

.stats-latest {
    margin-top: 64px;
}

.row-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.row-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
    background: var(--surface);
}

.row-badge {
    flex: none;
    min-width: 52px;
    padding: 8px 6px;
    background: var(--ink);
    color: #fff;
    font-weight: 900;
    text-align: center;
}

.row-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.row-title {
    color: var(--ink);
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
}

/* the whole row is clickable via its title */
.row-title::after {
    content: "";
    position: absolute;
    inset: 0;
}

.row-item .arrow {
    color: var(--red);
}

.row-item:hover .row-title {
    color: var(--red);
}

@media (max-width: 900px) {
    .stats-charts {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .year-chart {
        gap: 8px;
        height: 200px;
    }

    /* the first column stays in place while the table scrolls sideways */
    .stats-table th[scope="row"],
    .stats-table thead th:first-child {
        position: sticky;
        left: 0;
        z-index: 1;
        background: var(--surface);
    }

    .stats-table thead th:first-child {
        background: var(--ink);
    }

    .stats-table th[scope="row"] {
        max-width: 11rem;
        white-space: normal;
    }
}

.stats-charts > .surface,
.chapters-main > * {
    margin-top: 0;
}

/* Equipment detail */

.equipment-top {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.equipment-photos {
    max-width: none;
}

.equipment-main {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: var(--placeholder);
}

.equipment-main-empty {
    display: grid;
    place-items: center;
}

.equipment-thumbs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.equipment-thumbs img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.equipment-aside {
    display: grid;
    gap: 20px;
}

.equipment-about {
    border-top: 4px solid var(--red);
}

.equipment-about .prose {
    font-size: 16px;
}

.equipment-figures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
    gap: 2px;
    margin: 48px 0 0;
}

.equipment-figures div {
    padding: 20px 22px;
    background: var(--surface);
}

.equipment-figures dt {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.equipment-figures dd {
    margin: 4px 0 0;
    font-size: 28px;
    font-weight: 900;
}

.designation-parts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
    margin: 0;
}

.designation-parts div:first-child {
    background: var(--red);
    color: #fff;
}

.designation-parts div {
    padding: 14px 16px;
}

.designation-parts dt {
    font-family: var(--mono);
    font-size: 24px;
    font-weight: 500;
}

.designation-parts dd {
    margin: 4px 0 0;
    color: var(--text);
    font-size: 13px;
    line-height: 1.4;
}

.designation-parts div:first-child dd {
    color: #fff;
}

.spec-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.spec-card {
    padding: 22px 24px;
    background: var(--surface);
}

.spec-card-wide {
    grid-column: span 2;
}

.spec-card h2,
.spec-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.spec-card dl {
    margin: 0;
}

.spec-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-top: 1px solid var(--line);
    font-size: 15px;
}

.spec-card dt {
    color: var(--muted);
}

.spec-card dd {
    margin: 0;
    font-weight: 700;
    text-align: right;
}

.check-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
    gap: 0 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.check-list li {
    position: relative;
    padding: 10px 0 10px 28px;
    border-top: 1px solid var(--line);
    font-size: 15px;
}

.check-list li::before {
    content: "";
    position: absolute;
    top: 14px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: var(--red);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3'%3E%3Cpath d='m4 12 5 5 11-11'/%3E%3C/svg%3E") center / contain no-repeat;
}

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 40px;
}

.pager-all {
    margin-left: auto;
    order: 3;
}

@media (max-width: 900px) {
    .equipment-top,
    .spec-cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .spec-card-wide {
        grid-column: auto;
    }
}

/* Akce a kultura, Plánované akce */

.events-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.events-toolbar .filter {
    margin: 0;
}

.events-toolbar .button-outline {
    margin-left: auto;
}

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

.poster-media {
    position: relative;
    aspect-ratio: 16 / 10;
}

.poster-date {
    position: absolute;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 10px 8px;
    background: var(--red);
    color: #fff;
    line-height: 1;
}

.poster-date strong {
    font-size: 30px;
    font-weight: 900;
}

.poster-date span {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.poster-card .card-body {
    gap: 4px;
}

.poster-card .card-kind {
    font-size: 13px;
}

.poster-card .card-title {
    font-size: 21px;
}

.poster-when {
    color: var(--text) !important;
    font-size: 15px !important;
}

.events-past-title {
    margin-top: 56px;
}

.events-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 26rem;
    gap: 32px;
    align-items: start;
}

.events-layout .event-month:first-child {
    margin-top: 0;
}

.events-layout .event-month {
    color: var(--muted);
    font-size: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.events-layout .event-item {
    align-items: center;
    gap: 22px;
    padding: 22px 24px;
}

.events-layout .event-date,
.events-layout .event-date-youth {
    width: 72px;
    min-height: 64px;
    background: var(--red);
}

.events-layout .event-kind {
    color: var(--red);
    font-weight: 500;
}

.events-layout .event-body .card-title {
    font-size: 22px;
}

.events-layout .event-list + .empty,
.events-layout .event-month + .event-list {
    margin-top: 20px;
}

.events-layout .event-list + .empty {
    margin-top: 32px;
}

.events-aside {
    display: grid;
    gap: 20px;
}

.events-aside .eyebrow {
    color: var(--red-on-dark);
}

.events-aside .aside-title {
    font-size: 24px;
}

.events-aside .button-outline {
    width: 100%;
}

@media (max-width: 900px) {
    .events-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Mladí hasiči: the introduction with meetings, payment and joining on the side */

.youth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24rem;
    gap: 32px;
    align-items: start;
    margin-bottom: 48px;
}

.youth-aside {
    display: grid;
    gap: 20px;
}

.youth-aside .aside-dark .eyebrow {
    color: var(--red-on-dark);
}

.youth-aside .aside-title {
    display: block;
    font-size: 24px;
}

.youth-aside p {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
}

.youth-account {
    display: grid;
    gap: 10px;
    margin: 16px 0 0;
}

.youth-account div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    background: var(--bg);
}

.youth-account dt {
    color: var(--muted);
    font-size: 15px;
}

.youth-account dd {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}

.youth-join,
.youth-news {
    display: grid;
    gap: 12px;
}

.youth-join .eyebrow,
.youth-join .aside-title,
.youth-news .eyebrow,
.youth-news .aside-title {
    margin-bottom: 0;
}

.youth-news .button-outline {
    width: 100%;
}

.youth-join .button {
    justify-self: start;
    max-width: 100%;
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .youth-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Soutěže a výsledky */

.upcoming-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
    margin-bottom: 40px;
    padding: 22px 26px;
    background: var(--ink);
    color: #fff;
}

.upcoming-bar .eyebrow {
    margin: 0 0 4px;
    color: var(--red-on-dark);
}

.upcoming-bar .competition-list {
    margin: 8px 0 0;
}

.upcoming-bar .competition {
    padding: 0;
}

.upcoming-bar .meta,
.upcoming-bar .competition-name,
.upcoming-bar a {
    color: #fff;
}

.upcoming-none {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.upcoming-bar .more .arrow {
    color: #fff;
}

.season + .season {
    margin-top: 40px;
}

.season-switch {
    flex-wrap: wrap;
    margin-left: auto;
}

.season .competition {
    border-top: 4px solid var(--red);
}

.season .competition > .meta {
    margin: 0 0 2px;
    font-size: 13px;
}

.season .competition-name {
    margin-bottom: 12px;
    font-size: 22px;
}

.results-heading {
    margin: 18px 0 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.standings {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

.standing {
    display: flex;
    flex-direction: column;
    min-width: 8rem;
    padding: 12px 16px;
    background: var(--bg);
}

.standing strong {
    font-size: 28px;
    font-weight: 900;
    line-height: 1.1;
}

.standing span {
    font-size: 14px;
}

.standing small {
    font-size: 12px;
    opacity: 0.75;
}

.standing-1 {
    background: var(--red);
    color: #fff;
}

.standing-2 {
    background: var(--ink);
    color: #fff;
}

.standing-3 {
    background: #5c5c66;
    color: #fff;
}

/* podium places in the tables are red, the rest plain */
.place,
.place-1,
.place-2,
.place-3 {
    min-width: 0;
    padding: 0;
    background: none;
}

.place-1,
.place-2,
.place-3 {
    color: var(--red);
}

/* Aktuality */

.featured-article {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 28px;
    background: var(--surface);
}

.featured-media {
    position: relative;
    min-height: 320px;
    overflow: hidden;
    background: var(--placeholder);
}

.featured-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-media.card-media-empty img {
    position: static;
    margin: auto;
}

.featured-media.card-media-empty {
    display: grid;
}

.featured-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: clamp(24px, 4vw, 48px);
    border-top: 4px solid var(--red);
}

.featured-title {
    margin: 0;
    font-size: clamp(26px, 3vw, 34px);
}

.featured-title a {
    color: var(--ink);
    text-decoration: none;
}

.featured-title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.featured-article:hover .featured-title a {
    color: var(--red);
}

.featured-body p {
    margin: 0;
    color: var(--text);
    font-size: 17px;
}

.featured-body .more {
    align-self: flex-start;
}

.card-no-media {
    border-top: 4px solid var(--red);
}

.news-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
    align-items: start;
}

.pagination {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 44px;
    min-height: 44px;
    padding: 0 12px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 500;
    text-decoration: none;
}

.pagination span {
    background: none;
}

.pagination a:hover {
    color: var(--red);
}

.pagination a[aria-current="page"] {
    background: var(--red);
    color: #fff;
}

/* Article detail */

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 21rem;
    gap: 32px;
    align-items: start;
}

.article-main {
    min-width: 0;
    background: var(--surface);
}

.article-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    margin: 0;
    border-top: 4px solid var(--red);
}

.article-facts div {
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
}

.article-facts div + div {
    border-left: 1px solid var(--line);
}

.article-facts dt {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.article-facts dd {
    margin: 2px 0 0;
    font-size: 16px;
    font-weight: 700;
}

.article-photo {
    display: block;
    width: 100%;
    max-height: 560px;
    object-fit: cover;
}

.article-body {
    padding: clamp(20px, 4vw, 40px);
}

.article-body > .eyebrow {
    display: block;
    margin: 0 0 12px;
    color: var(--red);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.share {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.article-aside {
    display: grid;
    gap: 20px;
}

.related-box ul {
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

.related-box li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.related-box li a {
    color: var(--ink);
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
}

.related-box li a:hover {
    color: var(--red);
}

.stats-box {
    gap: 4px;
    text-decoration: none;
}

.stats-box .eyebrow {
    color: var(--red-on-dark);
}

.stats-box strong {
    font-size: 38px;
    font-weight: 900;
    line-height: 1.1;
}

.stats-box span:not(.eyebrow) {
    color: var(--dark-text);
    font-size: 15px;
}

.stats-box .arrow {
    margin-top: 8px;
    color: var(--red-on-dark);
}

.stats-box:hover {
    color: #fff;
}

.article-pager {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.article-pager a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 16px 22px;
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
}

.article-pager a:hover strong {
    color: var(--red);
}

.article-pager-next {
    grid-column: 2;
    align-items: flex-end;
    text-align: right;
}

@media (max-width: 900px) {
    .featured-article,
    .article-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .featured-media {
        min-height: 220px;
    }
}

@media (max-width: 640px) {
    .article-pager {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .article-pager-next {
        grid-column: auto;
    }

    .article-facts div:nth-child(odd) {
        border-left: 0;
    }
}

/* single-column grids must not grow wider than the phone because of a wide table or photo inside */
.chapters-main,
.split-blocks,
.competition-list,
.row-list,
.event-list,
.equipment-aside,
.article-aside,
.events-aside {
    grid-template-columns: minmax(0, 1fr);
}

/* visually hidden headers inside a scrolling table stay inside it instead of widening the page */
.table-scroll {
    position: relative;
}

.prose .phone-tiles strong {
    white-space: nowrap;
}

@media (max-width: 640px) {
    .prose .phone-tiles strong {
        font-size: 19px;
    }
}

/* Zásahová činnost: bars of each kind under the legend, older years set apart in the table */
.kind-legend li {
    grid-template-columns: 14px minmax(0, 1fr) auto 3rem;
    row-gap: 6px;
}

.kind-track {
    grid-column: 2 / -1;
    height: 8px;
    background: var(--bg);
}

.kind-track span {
    display: block;
    height: 100%;
}

.stats-table .earlier {
    color: var(--muted);
}

.stats-table thead .earlier {
    background: #3d3d45;
    color: #fff;
}

.stats-table td.earlier.zero {
    color: #c9c9cf;
}

.year-chart {
    gap: clamp(6px, 1.5vw, 16px);
}

@media (max-width: 640px) {
    .year-chart-value {
        font-size: 12px;
    }

    .year-chart-label {
        font-size: 11px;
    }
}

/* photos in a text keep their own height, so their captions stay inside the section */
.prose .gallery img,
.prose .gallery figure.attachment--inline img {
    height: auto;
}

/* two photos side by side (e.g. before and after) are large */
.prose .gallery:has(> figure:nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.bare-section .prose .gallery {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}

.bare-section .prose .gallery:has(> figure:nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 520px) {
    .prose .gallery:has(> figure:nth-child(2):last-child),
    .bare-section .prose .gallery:has(> figure:nth-child(2):last-child) {
        gap: 8px;
    }
}

.chapter .prose > .gallery {
    max-width: none;
}

/* Facebook and Instagram next to the menu */

.main-nav {
    display: flex;
    align-items: stretch;
}

.main-nav .nav-social {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid var(--line);
}

.nav-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 40px;
    min-height: 40px;
    color: var(--ink);
    text-decoration: none;
}

.nav-social a:hover {
    color: var(--red);
}

.nav-social-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media (max-width: 1000px) {
    .js .site-header[data-nav-open] .main-nav,
    .main-nav {
        flex-direction: column;
    }

    .js .site-header[data-nav-open] .main-nav {
        display: flex;
    }

    .main-nav .nav-social {
        gap: 12px;
        margin: 16px 0 0;
        padding: 0;
        border: 0;
    }

    .nav-social a {
        padding: 0 14px;
        border: 1px solid #c9c9cf;
        font-weight: 500;
    }

    .nav-social-label {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
    }
}

@media (max-width: 1000px) {
    .main-nav > ul.nav-social {
        flex-direction: row;
    }

    .main-nav > ul.nav-social > li {
        padding: 0;
        border: 0;
    }

    .main-nav > ul.nav-social > li > a {
        min-height: 44px;
        padding: 0 14px;
        border: 1px solid #c9c9cf;
        font-size: 15px;
        font-weight: 500;
    }
}

/* Zásahová činnost: the chart of all years across the page, the kinds below it */
.stats-charts {
    grid-template-columns: minmax(0, 1fr);
}

.stats-chart .kind-legend {
    columns: 2 22rem;
    column-gap: 40px;
}

.stats-chart .kind-legend li {
    break-inside: avoid;
}

/* older years are in the table on request (assets/app.js) */
.stats-tables.hide-earlier .earlier {
    display: none;
}

.earlier-toggle {
    margin-top: 16px;
}

@media (max-width: 640px) {
    .year-chart .is-old {
        display: none;
    }
}
