/* ==========================================================================
   1. RADIKALER RESET & DESIGN TOKENS
   ========================================================================== */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #3366cc;
    --primary-hover: #2850a8;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-alt: #f1f5f9;
    --border: #e2e8f0;
    --radius-lg: 0;
    --radius-md: 0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    border-radius: 0 !important;
}

a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
.stempel-card:focus,
.stempel-card:active {
    outline: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.stempel-card:focus-visible,
.sort-option:focus-visible {
    outline: 3px solid rgba(51, 102, 204, 0.45);
    outline-offset: 3px;
}

html, body {
    width: 100%;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
}

main {
    margin-top: 0 !important;
    width: 100%;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   PHILATELISTISCHES INFO-LAYOUT (BLAUE AKZENTE REAKTIVIERT)
   ========================================================================== */

.info-layout {
    min-height: calc(100vh - 130px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: var(--bg-body);
    padding-top: 1rem;
}

.info-inner {
    width: 100%;
    max-width: 850px;
    padding: 2rem;
}

.fact-list {
    list-style: none;
    padding: 0;
}

.fact-list > li {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 2.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
    align-items: baseline;
}

.fact-list > li:last-child {
    border-bottom: none;
}

/* ZAHLEN WIEDER IN BLAU */
.fact-num {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--primary); /* Das schöne Blau ist zurück */
}

/* TEXT IN EINHEITLICHER FARBE */
.fact-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-main);
}

/* GEZIELTE FARBAKZENTE IN DEN UNTERPUNKTEN */
.txt-red { color: #cc0000; font-weight: 800; }
.txt-blue { color: #0044cc; font-weight: 800; }

.sub-facts {
    display: block;
    margin-top: 0.8rem;
    color: var(--text-main);
}

.sub-facts span {
    display: block;
    margin-bottom: 0.4rem;
}

@media (max-width: 768px) {
    body { overflow-y: auto !important; }

    .info-layout {
        align-items: flex-start;
        padding-top: 0; 
        padding-bottom: 60px;
    }

    .info-inner {
        padding: 1rem 1.5rem; 
    }

    .fact-list > li {
        grid-template-columns: 1fr;
        gap: 0.2rem;
        padding: 1.2rem 0;
    }

    .fact-num {
        font-size: 1.1rem;
        margin-bottom: 0.1rem;
    }
}

/* ==========================================================================
   STRUKTUR 2026: SIDEBAR, PAGE START / PAGE END
   ========================================================================== */

:root {
    --sidebar-w: 260px;
    --sidebar-mobile-h: 76px;
}

body.has-sidebar {
    min-height: 100vh;
    padding-left: var(--sidebar-w);
    background: var(--bg-body);
}

.site-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    z-index: 2500;
    display: flex;
    flex-direction: column;
    gap: 2.15rem;
    padding: 1.45rem 1.2rem;
    background: #fff;
    border-right: 1px solid var(--border);
    overflow-y: auto;
}

.mobile-brand {
    display: none;
}

.logo {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    color: #111;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1;
    letter-spacing: 0;
}

.logo-main,
.logo-accent {
    display: block;
    font-weight: 900;
}

.logo-accent {
    color: var(--primary);
}

.admin-section .logo-accent,
.admin-mode .site-nav a.active,
.admin-mode .site-nav a:hover,
.admin-mode .logout-link {
    color: #ef4444;
}

.admin-login-pending .logo {
    opacity: 0.72;
}

.admin-login-pending .logo-accent {
    color: #94a3b8;
}

.site-nav {
    display: flex;
    flex-direction: column;
    gap: 0.48rem;
}

.site-nav a {
    display: flex;
    align-items: center;
    gap: 0.78rem;
    min-height: 46px;
    padding: 0.78rem 0.72rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    line-height: 1.15;
    border-left: 3px solid transparent;
}

.site-nav a i {
    width: 1.1rem;
    text-align: center;
    font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--primary);
    background: #f8fafc;
    border-left-color: currentColor;
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 0.75rem 0.72rem;
}

.sidebar-copyright {
    color: #71717a;
    font-size: 0.64rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    line-height: 1.55;
}

.sidebar-meta {
    display: flex;
    flex-direction: column;
    gap: 0.68rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-meta a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.64rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.035em;
}

.sidebar-meta a:hover {
    color: var(--primary);
}

.logo {
    position: static;
    width: 100%;
    height: auto;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo::before {
    content: none;
}

.logo-mark {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    display: block;
}

.logo-copy {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    min-width: 0;
}

.logo-main {
    color: #111;
    font-size: 0.74rem;
    font-weight: 900;
    line-height: 1;
}

.logo-accent {
    color: var(--primary);
    font-size: 0.74rem;
    font-weight: 900;
    line-height: 1;
    transform-origin: top left;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
}

/* Sammlung: kritische Styles zusätzlich in der Hauptdatei, damit die Galerie nie blank fällt. */
.collection-page {
    padding: 0.45rem 0 0;
}

.collection-toolbar {
    position: sticky;
    top: 0;
    z-index: 500;
    display: grid;
    grid-template-columns: minmax(260px, 1.2fr) minmax(260px, 1fr);
    gap: 1rem;
    align-items: end;
    width: min(1400px, 100%);
    margin: 0 auto 1.25rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #e5e7eb;
    backdrop-filter: blur(10px);
}

.toolbar-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toolbar-label,
.result-count {
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.search-grid {
    display: grid;
    grid-template-columns: 0.8fr 1fr 1fr;
    gap: 0.65rem;
}

.search-grid input {
    width: 100%;
    min-height: 42px;
    padding: 0.72rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    outline: none;
}

.search-grid input:focus {
    border-color: #111;
    background: #fff;
}

.sort-controls {
    display: grid;
    grid-template-columns: 1fr 0.7fr;
    gap: 0.65rem;
}

.tab-nav {
    display: flex;
    min-height: 42px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.tab-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.65rem;
    border: none;
    border-left: 1px solid #e2e8f0;
    background: transparent;
    color: #64748b;
    font: inherit;
    font-size: 0.68rem;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
}

.tab-item:first-child {
    border-left: none;
}

.tab-item.is-active {
    background: #fff;
    color: #111;
}

.result-count {
    align-self: center;
    justify-self: end;
}

.gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
    gap: 20px;
    width: min(1400px, 100%);
    max-width: none;
    margin: 0 auto;
    padding: 0 0 0.75rem !important;
}

.stempel-card {
    height: 216px;
    padding: 0;
    background: #fff;
    border: 1px solid #eee;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stempel-card:focus,
.stempel-card:active {
    outline: none;
    border-color: #eee;
}

@media (hover: hover) {
    .stempel-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    }
}

.img-container {
    width: 100%;
    height: 144px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 0;
    overflow: hidden;
}

.img-container img {
    max-width: 94%;
    max-height: 94%;
    object-fit: contain;
}

.card-info {
    min-height: 72px;
    padding: 8px 10px;
    text-align: center;
    border-top: 1px solid #f8f8f8;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

.primary-label {
    display: block;
    font-weight: 800;
    font-size: 0.8rem;
    color: #111;
    margin-bottom: 2px;
}

.secondary-label {
    display: block;
    width: 100%;
    color: #777;
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Aktuelles Sidebar- und Sammlungs-Layout */
.logo {
    position: static;
    width: 100%;
    min-height: 168px;
    position: relative;
    display: block;
    color: #111;
    text-decoration: none;
    line-height: 1;
}

.logo::before {
    content: none !important;
}

.logo-mark {
    position: absolute;
    top: 1.15rem;
    left: 50%;
    width: 104px;
    height: 104px;
    transform: translateX(-50%);
}

.logo-admin {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    color: #ef4444;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    line-height: 1;
}

.logo-copy {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.18rem;
    width: 1.05rem;
}

.logo-main {
    color: #111;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    writing-mode: vertical-rl;
    text-orientation: upright;
}

.logo-accent {
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 0;
}

.sidebar-collection-tools {
    display: flex;
    flex-direction: column;
    gap: 0.78rem;
    padding: 0.82rem 0.45rem 0.92rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.sidebar-collection-tools .toolbar-group {
    gap: 0.3rem;
}

.sidebar-collection-tools .toolbar-label {
    color: #a1a1aa;
    font-size: 0.52rem;
    letter-spacing: 0.1em;
}

.sidebar-collection-tools .search-grid,
.sidebar-collection-tools .sort-controls {
    display: flex;
    flex-direction: column;
    gap: 0.26rem;
}

.sidebar-collection-tools .search-grid input {
    min-height: 30px;
    padding: 0.28rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid #e4e7ec;
    color: #111;
    font-size: 0.7rem;
    font-weight: 700;
}

.sidebar-collection-tools .search-grid input:focus {
    border-bottom-color: #111;
}

.sidebar-collection-tools .tab-nav {
    min-height: 30px;
    background: transparent;
    border: 1px solid #e5e7eb;
}

.sidebar-collection-tools .tab-item {
    padding: 0.32rem 0.25rem;
    background: transparent;
    color: #71717a;
    font-size: 0.52rem;
    letter-spacing: 0.03em;
    border-left: 1px solid #e5e7eb;
}

.sidebar-collection-tools .tab-item:first-child {
    border-left: none;
}

.sidebar-collection-tools .tab-item.is-active {
    background: #f8fafc;
    color: #111;
}

.sidebar-collection-tools .result-count {
    justify-self: auto;
    align-self: flex-start;
    padding-top: 0;
    color: #a1a1aa;
    font-size: 0.6rem;
    letter-spacing: 0.05em;
}

.collection-toolbar {
    display: none;
}

.collection-page {
    padding-top: 0.45rem;
}

.legal-layout {
    min-height: 100vh !important;
    margin-top: 0 !important;
}

@media (min-width: 769px) {
    body.has-sidebar {
        overflow-x: hidden;
        overflow-y: auto !important;
    }
}

@media (max-width: 768px) {
    body.has-sidebar {
        padding-left: 0;
        padding-top: 96px !important;
        padding-bottom: 24px !important;
    }

    .mobile-brand {
        position: fixed;
        inset: 0 0 auto 0;
        z-index: 2600;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.12rem;
        background: #fff;
        border-bottom: 1px solid var(--border);
        color: #111;
        font-size: 0.9rem;
        font-weight: 900;
        line-height: 1;
    }

    .mobile-brand-logo {
        width: 36px;
        height: 36px;
        display: block;
    }

    .site-sidebar {
        position: fixed;
        inset: 44px 0 auto 0;
        width: 100%;
        z-index: 2500;
        height: 52px;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0;
        padding: 0;
        background: #fff;
        border-top: none;
        border-bottom: 1px solid var(--border);
        border-right: none;
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    }

    .logo {
        display: none;
    }

    .sidebar-collection-tools {
        display: none;
    }

    .site-nav {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-around;
        gap: 0;
        overflow-x: auto;
        padding: 0 0.35rem;
    }

    .site-nav a {
        flex: 1 0 auto;
        min-width: 64px;
        min-height: 51px;
        justify-content: center;
        flex-direction: column;
        gap: 0.22rem;
        padding: 0.45rem 0.35rem;
        border-left: none;
        border-bottom: 2px solid transparent;
        font-size: 0.56rem;
        text-align: center;
    }

    .site-nav a span {
        display: block;
    }

    .site-nav a i {
        width: auto;
        font-size: 1rem;
    }

    .site-nav a:hover,
    .site-nav a.active {
        border-bottom-color: currentColor;
    }

    .sidebar-footer {
        display: none;
    }

    .sidebar-copyright {
        display: none;
    }

    .sidebar-meta {
        flex-direction: row;
        justify-content: center;
        gap: 0.75rem;
        width: 100%;
        overflow-x: auto;
    }

    .sidebar-meta a {
        flex: 0 0 auto;
        font-size: 0.56rem;
    }

    .legal-layout {
        height: auto !important;
        min-height: calc(100vh - 96px);
    }

    .collection-page {
        padding: 0.45rem 0.75rem 0;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
        width: 100%;
        padding-bottom: 0.75rem !important;
    }
}

/* ==========================================================================
   ÖFFENTLICHE SEITEN
   ========================================================================== */

.index-content {
    padding: 40px 1.5rem 100px;
    display: flex;
    justify-content: center;
}

.content-container,
.info-inner,
.legal-inner {
    width: 100%;
    max-width: 850px;
}

.intro-section {
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--text-main);
}

.intro-eyebrow {
    margin-bottom: 0.5rem !important;
    color: var(--primary);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.intro-section h1,
.info-heading h1 {
    margin: 0 0 1rem;
    color: var(--text-main);
    font-size: clamp(2rem, 3.2vw, 3rem);
    font-weight: 900;
    line-height: 1.08;
}

.intro-lead,
.info-heading p {
    max-width: 760px;
    color: var(--text-main);
    font-size: 1.14rem;
    line-height: 1.75;
}

.intro-section p {
    margin-bottom: 1.5rem;
}

.intro-section strong {
    color: var(--primary);
}

.intro-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0 2.25rem;
}

.intro-links a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--border);
    color: var(--primary);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.intro-links a:hover,
.intro-links a:focus-visible {
    border-color: currentColor;
    background: #fff;
}

.intro-overview {
    margin: 0 0 2rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.intro-overview h2 {
    margin: 0 0 0.85rem;
    color: var(--text-main);
    font-size: 1.2rem;
    line-height: 1.25;
}

.intro-overview ul {
    display: grid;
    gap: 0.45rem;
    padding-left: 1.1rem;
}

.intro-overview li {
    padding-left: 0.2rem;
}

.info-heading {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.legal-layout {
    width: 100%;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    background: var(--bg-body);
}

.legal-inner {
    padding: 2rem 1.5rem 100px;
}

.legal-body {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-main);
}

.legal-body h2,
.legal-body h3 {
    font-size: 1.35rem;
    margin: 2rem 0 1rem;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.legal-body p {
    margin-bottom: 1.2rem;
}

.legal-body a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

.legal-body a:hover {
    text-decoration: underline;
}

.page-datenschutz .legal-body .content > h2:first-of-type {
    margin: 0 0 0.6rem;
    padding: 0;
    border-bottom: 0;
    color: var(--text-main);
    font-size: clamp(2rem, 3vw, 2.45rem);
    line-height: 1.08;
}

.page-datenschutz .legal-body .content > h2:first-of-type + p {
    margin-bottom: 2rem;
    color: var(--text-main);
    font-style: italic;
}

.page-datenschutz .legal-body .content > h2:nth-of-type(2) {
    margin: 0 0 0.65rem;
    padding: 0;
    border-bottom: 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-datenschutz .legal-body .index {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.2rem 1.25rem;
    padding: 0;
    margin: 0 0 2.25rem;
    list-style: none;
}

.page-datenschutz .legal-body .index li {
    margin: 0;
}

.page-datenschutz .legal-body .index-link {
    display: block;
    padding: 0.42rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 850;
    line-height: 1.25;
    text-decoration: none;
}

.page-datenschutz .legal-body .index-link:hover {
    color: var(--primary);
    text-decoration: none;
}

.legal-spacer {
    height: 50px;
}

.info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem 100px;
}

.info-card {
    background: #ffffff;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.info-image-section {
    flex: 1.2;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.info-image-section img {
    max-width: 100%;
    height: auto;
    max-height: 500px;
    box-shadow: 0 10px 15px rgba(0,0,0,0.15);
}

.info-content-section {
    flex: 1;
    padding: 50px;
    display: flex;
    flex-direction: column;
}

.info-content-section h1 {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 800;
    color: #1e293b;
}

.info-tag {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: block;
}

.info-meta {
    color: #64748b;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.data-item {
    border-left: 4px solid var(--primary);
    padding-left: 15px;
}

.data-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
}

.data-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
}

.back-btn {
    margin-top: auto;
    background: var(--primary);
    color: white;
    text-decoration: none;
    text-align: center;
    padding: 15px;
    font-weight: 700;
    transition: background 0.2s;
}

.back-btn:hover {
    background: var(--primary-hover);
}

@media (max-width: 850px) {
    .info-card {
        flex-direction: column;
    }

    .info-image-section {
        padding: 20px;
    }

    .info-content-section {
        padding: 30px;
    }

    .info-content-section h1 {
        font-size: 1.8rem;
    }

    .data-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .index-content,
    .legal-inner,
    .info-wrapper {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .intro-section {
        font-size: 1rem;
    }
}

/* Finale Korrektur: nur das Vierring-Logo im Markenblock. */
@media (min-width: 769px) {
    .site-sidebar {
        gap: 1.6rem;
    }

    .logo {
        width: 100%;
        min-height: 222px;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1.35rem 0 1.6rem;
        border-bottom: 1px solid var(--border);
        cursor: default;
    }

    .logo::before {
        content: none !important;
    }

    .logo-mark {
        position: static;
        width: 184px;
        height: 184px;
        transform: none;
        margin: 0;
        display: block;
        opacity: 1;
    }
}

.admin-login-pending .logo {
    opacity: 1;
}

.admin-login-pending .logo-mark {
    opacity: 1;
    filter: grayscale(1);
}

.admin-login-pending .site-nav a:hover,
.admin-login-pending .site-nav a.active,
.admin-login-pending .sidebar-meta a:hover {
    color: #111;
}

.admin-login-pending .site-nav a:hover,
.admin-login-pending .site-nav a.active {
    background: #f4f4f5;
    border-left-color: #111;
}

.admin-login-pending .sidebar-footer {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.admin-login-pending .sidebar-meta {
    border-bottom-color: #d4d4d8;
}

.mobile-brand-admin {
    color: #ef4444;
    letter-spacing: 0.18em;
}

.admin-login-pending .mobile-brand-admin {
    color: #111;
}

/* Öffentliches Header-Layout: keine Sidebar, Suche nur auf der Sammlung. */
body.has-public-header {
    min-height: 100vh;
    padding-left: 0 !important;
    background: var(--bg-body);
}

.public-header {
    position: sticky;
    top: 0;
    z-index: 2400;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border);
}

.public-header-main {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    width: 100%;
    padding: 0.72rem clamp(1rem, 4vw, 3rem);
}

.public-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.public-brand-logo {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    display: block;
}

.public-wordmark {
    display: flex;
    align-items: baseline;
    flex-wrap: nowrap;
    color: #111;
    font-size: clamp(0.86rem, 1.2vw, 1rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
    white-space: nowrap;
}

.public-wordmark strong {
    color: var(--primary);
    font: inherit;
}

.public-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.public-nav-group {
    position: relative;
    display: inline-flex;
    align-items: stretch;
}

.public-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0.6rem 0.75rem;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.035em;
}

.public-nav-group > a {
    gap: 0.38rem;
}

.public-nav-group > a::after {
    width: 0.34rem;
    height: 0.34rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    opacity: 0.62;
    content: "";
}

.public-nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 2600;
    width: max-content;
    min-width: 100%;
    max-width: 190px;
    display: none;
    padding: 0.12rem 0;
    background: #fff;
    border: 1px solid var(--border);
    border-top: 2px solid var(--primary);
    box-shadow: 0 8px 14px rgba(15, 23, 42, 0.07);
}

.public-nav-group:hover .public-nav-dropdown,
.public-nav-group:focus-within .public-nav-dropdown {
    display: grid;
}

.public-nav-dropdown a {
    min-height: 28px;
    justify-content: flex-start;
    padding: 0.38rem 0.5rem;
    border-bottom: 1px solid #eef2f7;
    color: var(--text-muted);
    font-size: 0.63rem;
    font-weight: 850;
    line-height: 1.25;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
}

.public-nav-dropdown a:last-child {
    border-bottom: 0;
}

.public-nav-dropdown a:hover,
.public-nav-dropdown a.active {
    background: #f7faff;
    color: var(--primary);
    box-shadow: inset 2px 0 0 currentColor;
}

.public-nav a:hover,
.public-nav a.active {
    color: var(--primary);
    border-bottom-color: currentColor;
}

.public-nav .public-nav-dropdown a:hover,
.public-nav .public-nav-dropdown a.active {
    border-bottom-color: #eef2f7;
}

.public-menu-toggle,
.public-mobile-menu {
    display: none;
}

.header-collection-tools {
    display: grid;
    grid-template-columns: minmax(360px, 1.1fr) minmax(320px, 0.9fr) auto;
    gap: 0.9rem;
    align-items: end;
    padding: 0.65rem clamp(1rem, 4vw, 3rem) 0.85rem;
    border-top: 1px solid #eef2f7;
}

.header-collection-tools .toolbar-group {
    gap: 0.32rem;
}

.header-collection-tools .toolbar-label,
.header-collection-tools .result-count {
    color: #94a3b8;
    font-size: 0.58rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.header-collection-tools .search-grid {
    display: grid;
    grid-template-columns: 0.9fr 1fr 1fr;
    gap: 0.45rem;
}

.header-collection-tools .search-grid input {
    min-height: 36px;
    padding: 0.5rem 0.62rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #111;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 750;
}

.header-collection-tools .search-grid input:focus {
    border-color: #111;
}

.header-collection-tools .sort-controls {
    display: grid;
    grid-template-columns: 1fr 0.62fr;
    gap: 0.45rem;
}

.header-collection-tools .tab-nav {
    min-height: 36px;
    display: flex;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.header-collection-tools .tab-item {
    flex: 1;
    border: 0;
    border-left: 1px solid #e2e8f0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    font: inherit;
    font-size: 0.58rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.header-collection-tools .tab-item:first-child {
    border-left: 0;
}

.header-collection-tools .tab-item.is-active {
    background: #f8fafc;
    color: #111;
}

.header-collection-tools .result-count {
    align-self: center;
    white-space: nowrap;
    text-transform: none;
    letter-spacing: 0.04em;
}

.public-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding: 1.2rem clamp(1rem, 4vw, 3rem);
    border-top: 1px solid var(--border);
    background: #fff;
}

.public-footer-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.public-footer a,
.public-footer-copy {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.public-footer a:hover {
    color: var(--primary);
}

body.has-public-header .collection-toolbar,
body.has-public-header .sidebar-collection-tools {
    display: none !important;
}

@media (min-width: 769px) {
    body.has-sidebar .logo {
        min-height: 118px;
        padding: 0.45rem 0 0.9rem;
    }

    body.has-sidebar .logo-mark {
        width: 96px;
        height: 96px;
    }
}

@media (max-width: 900px) {
    body.has-public-header {
        padding-top: 58px;
    }

    .public-header {
        position: fixed;
        inset: 0 0 auto 0;
        z-index: 2400;
    }

    .public-header-main {
        min-height: 58px;
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
        padding: 0.55rem 1rem;
    }

    .public-brand {
        justify-content: flex-start;
        flex: 1;
    }

    .public-nav {
        display: none;
    }

    .header-collection-tools {
        display: none;
    }

    .public-wordmark {
        font-size: 0.98rem;
    }

    .public-menu-toggle {
        width: 38px;
        height: 38px;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        border: 1px solid var(--border);
        background: #fff;
        color: #111;
        cursor: pointer;
    }

    .public-menu-toggle span {
        width: 16px;
        height: 2px;
        display: block;
        background: currentColor;
    }

    .public-mobile-menu {
        position: fixed;
        inset: 58px 0 auto 0;
        z-index: 2390;
        display: none;
        padding: 0.8rem 1rem 1rem;
        background: #fff;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 16px 28px rgba(15, 23, 42, 0.08);
    }

    body.public-menu-open .public-mobile-menu {
        display: block;
    }

    .public-mobile-nav {
        display: grid;
        gap: 0.35rem;
    }

    .public-mobile-nav a,
    .public-mobile-info-toggle {
        min-height: 42px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0;
        background: transparent;
        border: 0;
        border-bottom: 1px solid #edf1f5;
        color: var(--text-muted);
        cursor: pointer;
        text-decoration: none;
        font: inherit;
        font-size: 0.78rem;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        text-align: left;
    }

    .public-mobile-info-toggle i {
        color: currentColor;
        font-size: 0.72rem;
        transition: transform 0.16s ease;
    }

    .public-mobile-info-toggle[aria-expanded="true"] i {
        transform: rotate(180deg);
    }

.public-mobile-nav a.active,
.public-mobile-info-toggle.active {
    color: var(--primary);
}

.public-mobile-subnav {
    display: none;
    gap: 0.2rem;
    margin: 0.15rem 0 0.35rem;
    padding: 0.15rem 0 0.25rem 0.85rem;
    border-left: 2px solid #dbe4ef;
}

.public-mobile-subnav.is-open {
    display: grid;
}

.public-mobile-subnav a {
    min-height: 34px;
    border-bottom: 0;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: none;
    letter-spacing: 0;
}

.public-mobile-subnav a.active {
    color: var(--primary);
}

    .mobile-sort {
        display: grid;
        gap: 0.35rem;
        margin-top: 0.85rem;
    }

    .mobile-search-input {
        width: 100%;
        min-height: 40px;
        padding: 0.55rem 0.2rem;
        background: #fff;
        border: 0;
        border-bottom: 1px solid #dbe2ea;
        color: #111;
        font: inherit;
        font-size: 0.82rem;
        font-weight: 800;
    }

    body.has-public-header .legal-layout {
        min-height: 0;
        overflow-y: visible;
        align-items: flex-start;
    }

    body.has-public-header .legal-inner {
        padding: 0.9rem 1.05rem 2.25rem;
    }

    body.has-public-header .legal-body {
        font-size: 0.92rem;
        line-height: 1.62;
    }

    body.has-public-header .legal-body > :first-child {
        margin-top: 0;
    }

    body.has-public-header .legal-body h1 {
        margin: 0 0 0.8rem;
        font-size: 1.72rem;
        line-height: 1.08;
        letter-spacing: 0;
    }

    body.has-public-header .legal-body h2,
    body.has-public-header .legal-body h3 {
        margin: 1.35rem 0 0.65rem;
        padding-bottom: 0.35rem;
        font-size: 1.12rem;
        line-height: 1.2;
    }

    body.has-public-header .legal-body h4 {
        margin: 1.05rem 0 0.45rem;
        font-size: 0.98rem;
        line-height: 1.25;
        color: var(--text-main);
    }

    body.has-public-header .legal-body p {
        margin-bottom: 0.9rem;
    }

    body.has-public-header .legal-body ul {
        padding-left: 1.1rem;
        margin: 0 0 1rem;
    }

    body.has-public-header .legal-body li {
        margin-bottom: 0.45rem;
    }

    body.has-public-header .legal-body a {
        overflow-wrap: anywhere;
    }

    body.page-index .index-content,
    body.page-beschreibung .info-layout {
        min-height: 0;
    }

    body.page-index .index-content {
        padding-bottom: 1.2rem;
    }

    body.page-beschreibung .info-layout {
        padding-bottom: 1.2rem;
    }

    body.has-public-header .collection-page {
        padding-bottom: 0.75rem !important;
    }

    body.has-public-header .legal-spacer {
        height: 0;
    }

    body.has-public-header.page-impressum .legal-layout {
        min-height: auto !important;
    }

    body.has-public-header.page-impressum {
        min-height: 100svh;
        display: flex;
        flex-direction: column;
    }

    body.has-public-header.page-impressum .legal-inner {
        padding-bottom: 0.75rem;
    }

    body.has-public-header.page-impressum .legal-body p:last-child {
        margin-bottom: 0;
    }

    body.has-public-header.page-impressum .public-footer {
        margin-top: auto;
    }

    .page-datenschutz .legal-body .content > h2:first-of-type {
        font-size: 1.72rem;
    }

    .page-datenschutz .legal-body .content > h2:first-of-type + p {
        margin-bottom: 1.35rem;
    }

    .page-datenschutz .legal-body .index {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 1.6rem;
    }

    .page-datenschutz .legal-body .index-link {
        padding: 0.36rem 0;
        font-size: 0.78rem;
    }
}

@media (max-width: 560px) {
    .public-brand-logo {
        width: 42px;
        height: 42px;
    }

    .public-wordmark {
        font-size: 0.9rem;
    }

    .public-nav a {
        min-height: 34px;
        padding: 0.45rem 0.48rem;
        font-size: 0.62rem;
    }

    .public-footer {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
        margin-top: 0.9rem;
        padding: 1.1rem 0.9rem calc(1.85rem + env(safe-area-inset-bottom));
        text-align: center;
    }

    .public-footer-links {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }

    .public-footer-links a {
        flex: 1 1 auto;
        min-width: 96px;
        padding: 0.55rem 0.35rem;
        border: 1px solid var(--border);
        background: #fff;
        font-size: 0.62rem;
    }

    .public-footer-copy {
        font-size: 0.6rem;
        line-height: 1.35;
    }

    body.has-public-header .gallery-grid {
        padding-bottom: 0.75rem !important;
    }
}

/* Desktop: fester Public-Header/Footer und einzeilige Sammlungstools. */
@media (min-width: 901px) {
    body.has-public-header {
        padding-top: 72px;
        padding-bottom: 58px;
    }

    body.page-index,
    body.page-impressum {
        overflow-y: hidden;
    }

    body.has-public-header .legal-layout {
        min-height: calc(100vh - 130px) !important;
        overflow-y: visible;
    }

    body.has-public-header .legal-inner {
        padding-top: 0.35rem;
        padding-bottom: 4.5rem;
    }

    body.page-impressum .legal-inner {
        padding-bottom: 1rem;
    }

    body.page-index .index-content {
        height: calc(100vh - 130px);
        min-height: 0;
        padding-top: 2.1rem;
        padding-bottom: 0;
        align-items: flex-start;
    }

    body.page-beschreibung .info-layout {
        padding-top: 0;
    }

    body.page-beschreibung .info-inner {
        padding-top: 0.7rem;
    }

    body.has-public-header.page-galerie {
        padding-top: 72px;
    }

    .public-header {
        position: fixed;
        inset: 0 0 auto 0;
        z-index: 2400;
    }

    .public-header-main {
        min-height: 72px;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .page-galerie .public-header-main {
        display: grid;
        grid-template-columns: auto minmax(520px, 1fr) auto;
        align-items: center;
        gap: 1rem;
    }

    .page-galerie .public-brand-logo {
        width: 46px;
        height: 46px;
    }

    .page-galerie .public-nav {
        justify-self: end;
        gap: 0.25rem;
    }

    .page-galerie .public-nav a {
        min-height: 40px;
        padding: 0.6rem 0.75rem;
        font-size: 0.72rem;
    }

    .page-galerie .header-collection-tools {
        display: grid;
        grid-template-columns: minmax(240px, 1fr) minmax(230px, 0.9fr) auto;
        align-items: end;
        gap: 0.5rem;
        padding: 0;
        border-top: none;
    }

    .page-galerie .header-collection-tools .toolbar-group {
        gap: 0.22rem;
    }

    .page-galerie .header-collection-tools .toolbar-label,
    .page-galerie .header-collection-tools .result-count {
        font-size: 0.5rem;
        letter-spacing: 0.06em;
    }

    .page-galerie .header-collection-tools .search-grid {
        grid-template-columns: 0.72fr 1fr 1fr;
        gap: 0.28rem;
    }

    .page-galerie .header-collection-tools .search-grid input {
        min-height: 32px;
        padding: 0.42rem 0.48rem;
        font-size: 0.68rem;
    }

    .page-galerie .header-collection-tools .sort-controls {
        grid-template-columns: 1fr 0.58fr;
        gap: 0.28rem;
    }

    .page-galerie .header-collection-tools .tab-nav {
        min-height: 32px;
    }

    .page-galerie .header-collection-tools .tab-item {
        font-size: 0.5rem;
    }

    .page-galerie .header-collection-tools .result-count {
        align-self: end;
        padding-bottom: 0.3rem;
    }

    .public-footer {
        position: fixed;
        inset: auto 0 0 0;
        z-index: 2300;
        margin-top: 0;
        min-height: 58px;
        padding-top: 0.9rem;
        padding-bottom: 0.9rem;
    }
}

/* Galerie: echte dynamische Spalten je nach verfügbarem Platz. */
body.page-galerie .gallery-grid {
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
    padding: 0 clamp(0.8rem, 1.8vw, 1.6rem) 0.75rem !important;
    gap: clamp(0.55rem, 0.9vw, 0.9rem) !important;
}

body.page-galerie .stempel-card {
    min-width: 0;
}

@media (max-width: 560px) {
    body.page-galerie .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Öffentlicher Header: kompakte Wortmarke ohne zusätzliches Logo. */
body.has-public-header .public-brand-logo {
    display: none !important;
}

body.has-public-header .public-brand {
    gap: 0;
}

body.page-index .index-content {
    min-height: calc(100vh - 130px);
    overflow: hidden;
}

body.page-index .content-container {
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
}

.about-inner {
    width: min(1080px, 100%);
    max-width: none;
    margin: 0 auto;
}

body.page-index .intro-section {
    max-width: 760px;
    line-height: 1.8;
    font-size: 1.08rem;
}

body.page-index .intro-section h1 {
    margin: 0 0 1.4rem;
    color: var(--text-main);
    font-size: clamp(2rem, 3vw, 2.55rem);
    font-weight: 900;
    line-height: 1.12;
}

body.page-index .intro-section p {
    margin: 0 0 1.35rem;
}

.section-eyebrow {
    margin: 0 0 0.55rem;
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.about-intro h1 {
    max-width: 760px;
    margin: 0 0 1rem;
    color: var(--text-main);
    font-size: clamp(2rem, 4vw, 3.45rem);
    font-weight: 900;
    line-height: 1.06;
}

.about-lead {
    max-width: 760px;
    margin: 0 0 1.25rem;
    color: var(--text-main);
    font-size: clamp(1.05rem, 1.5vw, 1.22rem);
    line-height: 1.75;
}

.about-text p {
    color: var(--text-main);
    font-size: 1.02rem;
    line-height: 1.75;
}

.about-text {
    padding: 1.6rem 0;
    border-bottom: 1px solid var(--border);
}

.about-text h2 {
    margin: 0 0 0.9rem;
    color: var(--text-main);
    font-size: 1.18rem;
    line-height: 1.25;
}

.about-text p {
    margin: 0;
}

.about-layout {
    display: flex;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 3rem) 3rem;
}

.about-intro {
    padding-bottom: 1.8rem;
    border-bottom: 1px solid var(--border);
}

.about-overview {
    display: grid;
    gap: 1.4rem;
    border-bottom: 1px solid var(--border);
}

.about-facts-panel {
    padding: 1.35rem 0;
}

.about-facts-panel h2 {
    margin: 0 0 0.9rem;
    color: var(--text-main);
    font-size: 1.08rem;
    line-height: 1.25;
}

.about-facts {
    display: grid;
    gap: 0.72rem;
    margin: 0 0 1.35rem;
}

.about-facts div {
    display: grid;
    gap: 0.12rem;
}

.about-facts dt {
    display: block;
    color: var(--text-muted);
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.about-facts dd {
    margin: 0;
    color: var(--text-main);
    font-size: 0.98rem;
    font-weight: 900;
    line-height: 1.25;
}

.about-facts-panel p {
    margin: 0 0 0.45rem;
    color: var(--text-main);
    font-size: 0.94rem;
    line-height: 1.5;
}

.about-facts-panel a {
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 850;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.about-facts-panel a:hover {
    text-decoration: underline;
}

.about-memberships {
    display: grid;
    gap: 0.42rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.about-memberships li {
    position: relative;
    padding: 0 0 0 0.95rem;
    color: var(--text-main);
    font-size: 0.9rem;
    line-height: 1.32;
}

.about-memberships li::before {
    position: absolute;
    top: 0.48em;
    left: 0;
    width: 0.34rem;
    height: 0.34rem;
    background: var(--primary);
    content: "";
}

.about-memberships li:last-child {
    padding-bottom: 0;
}

.about-focus-list {
    display: grid;
    gap: 0.42rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.about-focus-groups {
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
}

.about-focus-group h3 {
    margin: 0 0 0.35rem;
    color: var(--text-muted);
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

.about-focus-list li {
    position: relative;
    padding: 0 0 0 0.95rem;
    color: var(--text-main);
    font-size: 0.9rem;
    line-height: 1.32;
}

.about-focus-list li::before {
    position: absolute;
    top: 0.48em;
    left: 0;
    width: 0.34rem;
    height: 0.34rem;
    background: var(--primary);
    content: "";
}

.about-reference-note {
    display: block;
    margin-top: 0.18rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.25;
}

.about-reference-link {
    color: var(--primary);
    font-size: inherit;
    font-weight: 800;
    letter-spacing: 0;
    line-height: inherit;
    text-decoration: none;
    text-transform: none;
    overflow-wrap: anywhere;
}

.about-reference-link:hover {
    text-decoration: underline;
}

.about-text a {
    color: var(--primary);
    font-weight: 850;
    text-decoration: none;
}

.about-text a:hover {
    text-decoration: underline;
}

.info-topic-note {
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.info-topic-note h2 {
    margin: 0 0 0.8rem;
    color: var(--text-main);
    font-size: 1.12rem;
    line-height: 1.25;
}

.info-topic-note ul {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.info-topic-note li {
    position: relative;
    padding-left: 1rem;
    color: var(--text-main);
    font-size: 0.98rem;
    line-height: 1.5;
}

.info-topic-note li::before {
    position: absolute;
    top: 0.68em;
    left: 0;
    width: 0.34rem;
    height: 0.34rem;
    border-radius: 50%;
    background: var(--primary);
    content: "";
}

.statistics-inner {
    display: grid;
    gap: 1.15rem;
}

.statistics-reference {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
    align-items: start;
}

.statistics-reference article {
    min-width: 0;
    padding-top: 0;
}

.statistics-reference span {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text-muted);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.statistics-reference strong {
    display: block;
    color: var(--text-main);
    font-size: clamp(1.55rem, 2.5vw, 2.05rem);
    font-weight: 900;
    line-height: 1.05;
}

.statistics-reference p {
    margin: 0.55rem 0 0;
    color: var(--text-main);
    font-size: 0.84rem;
    line-height: 1.38;
}

.statistics-info-button {
    display: inline-flex;
    margin-top: 0.62rem;
    padding: 0 0 0.1rem;
    border: 0;
    border-bottom: 1px dotted currentColor;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    line-height: 1.25;
    text-transform: uppercase;
}

.statistics-info-button:hover {
    color: var(--primary);
}

.statistics-modal[hidden] {
    display: none;
}

body.statistics-modal-open {
    overflow: hidden;
}

.statistics-modal {
    position: fixed;
    inset: 0;
    z-index: 3200;
    display: grid;
    place-items: center;
    padding: 1.25rem;
}

.statistics-modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.34);
    cursor: pointer;
}

.statistics-modal-panel {
    position: relative;
    z-index: 1;
    width: min(460px, 100%);
    padding: 1.25rem 1.35rem 1.3rem;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
}

.statistics-modal-close {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    width: 1.85rem;
    height: 1.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-muted);
    cursor: pointer;
}

.statistics-modal-close:hover {
    color: var(--text-main);
    border-color: #cbd5e1;
}

.statistics-modal-kicker {
    margin: 0 2.2rem 0.35rem 0;
    color: var(--primary);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.statistics-modal-panel h2 {
    margin: 0 2.2rem 0.65rem 0;
    color: var(--text-main);
    font-size: 1.18rem;
    line-height: 1.25;
}

.statistics-modal-panel p:last-child {
    margin: 0;
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.55;
}

.statistics-colors {
    padding-top: 1.15rem;
    border-top: 2px solid #dce4ef;
}

.statistics-colors h2 {
    margin: 0 0 0.85rem;
    color: var(--text-main);
    font-size: 1.05rem;
    line-height: 1.25;
}

.statistics-color-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
}

.statistics-color-card {
    min-width: 0;
    padding-top: 0;
}

.statistics-color-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}

.statistics-color-title span {
    width: 0.64rem;
    height: 0.64rem;
    flex: 0 0 auto;
    background: currentColor;
}

.statistics-color-card.is-red .statistics-color-title {
    color: #b91c1c;
}

.statistics-color-card.is-blue .statistics-color-title {
    color: #2563eb;
}

.statistics-color-title h3 {
    margin: 0;
    color: var(--text-main);
    font-size: 0.98rem;
    line-height: 1.25;
}

.statistics-color-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 0 0 0.75rem;
}

.statistics-color-card div {
    min-width: 0;
}

.statistics-color-card dt {
    color: var(--text-muted);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.statistics-color-card dd {
    margin: 0.16rem 0 0;
    color: var(--text-main);
    font-size: 1.7rem;
    font-weight: 900;
    line-height: 1;
}

.statistics-color-progress {
    height: 0.26rem;
    overflow: hidden;
    background: #e7edf6;
}

.statistics-color-progress span {
    display: block;
    height: 100%;
    background: currentColor;
}

.statistics-color-card.is-red .statistics-color-progress {
    color: #b91c1c;
}

.statistics-color-card.is-blue .statistics-color-progress {
    color: #2563eb;
}

.statistics-color-card p {
    margin: 0.65rem 0 0;
    color: var(--text-main);
    font-size: 0.84rem;
    line-height: 1.4;
}

.district-inner {
    display: grid;
    gap: 1rem;
}


.district-list-section {
    padding-top: 0;
    border-top: 0;
}

.district-list-section h2 {
    margin: 0 0 0.85rem;
    color: var(--text-main);
    font-size: 1.05rem;
    line-height: 1.25;
}

.district-intro {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.district-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.15rem 1.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.district-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: baseline;
    min-width: 0;
    padding: 0.42rem 0;
    border-top: 1px solid var(--border);
}

.district-list span {
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.3;
}

.district-list small,
.district-empty {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.42;
    white-space: nowrap;
}

/* Sammlung: eine Suche und ein Dropdown statt schwerer Button-Leisten. */
.header-collection-tools .header-search-input {
    width: 100%;
    min-height: 26px;
    padding: 0.2rem 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #dbe2ea;
    color: #111;
    font: inherit;
    font-size: 0.62rem;
    font-weight: 800;
    outline: none;
}

.sort-menu {
    position: relative;
}

.sort-menu-trigger {
    width: 100%;
    min-height: 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    padding: 0.2rem 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #dbe2ea;
    color: #475569;
    cursor: pointer;
    font: inherit;
    font-size: 0.62rem;
    font-weight: 850;
    text-align: left;
}

.sort-menu-trigger i {
    color: #94a3b8;
    font-size: 0.55rem;
}

.sort-menu-panel {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    min-width: 100%;
    z-index: 2600;
    display: none;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
}

.sort-menu.is-open .sort-menu-panel {
    display: grid;
}

.sort-option {
    min-height: 32px;
    padding: 0.52rem 0.65rem;
    background: #fff;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    color: #64748b;
    cursor: pointer;
    font: inherit;
    font-size: 0.65rem;
    font-weight: 850;
    text-align: left;
}

.sort-option:last-child {
    border-bottom: 0;
}

.sort-option:hover,
.sort-option.is-active {
    color: #111;
    background: #f8fafc;
}

.header-collection-tools .header-search-input:focus,
.sort-menu-trigger:focus {
    border-bottom-color: #111;
}

.header-search-input:focus-visible,
.sort-menu-trigger:focus-visible {
    outline: 3px solid rgba(51, 102, 204, 0.35);
    outline-offset: 4px;
}

body.has-public-header .header-collection-tools .search-grid,
body.has-public-header .header-collection-tools .sort-controls,
body.has-public-header .header-collection-tools .tab-nav {
    display: none;
}

@media (min-width: 901px) {
    .page-galerie .public-header-main {
        grid-template-columns: auto minmax(340px, 0.64fr) auto;
        gap: 1rem;
    }

    .page-galerie .header-collection-tools {
        grid-template-columns: minmax(210px, 1fr) minmax(150px, 0.62fr) auto;
        gap: 0.62rem;
    }

    .page-galerie .header-collection-tools .header-search-input,
    .page-galerie .sort-menu-trigger {
        min-height: 25px;
        font-size: 0.6rem;
    }

    .page-galerie .header-collection-tools .toolbar-label,
    .page-galerie .header-collection-tools .result-count {
        color: #a1a9b6;
        font-size: 0.46rem;
        letter-spacing: 0.05em;
    }
}

@media (min-width: 701px) and (max-width: 1100px) {
    .district-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .mobile-sort .sort-menu-trigger {
        min-height: 40px;
        padding: 0 0.2rem;
        font-size: 0.78rem;
    }

    .mobile-sort .sort-menu-panel {
        position: static;
        margin-top: 0.4rem;
        box-shadow: none;
    }
}

/* Desktop: Start, Informationen und Über mich als klare Onepager. */
@media (min-width: 901px) {
    body.has-public-header {
        padding-top: 72px;
        padding-bottom: 58px;
    }

    body.page-index,
    body.page-information,
    body.page-ueber-mich {
        overflow-y: hidden !important;
    }

    body.page-index .public-footer,
    body.page-information .public-footer,
    body.page-ueber-mich .public-footer {
        position: fixed !important;
        inset: auto 0 0 0;
        z-index: 2300;
        min-height: 58px;
        margin-top: 0;
        padding-top: 0.9rem;
        padding-bottom: 0.9rem;
    }

    body.page-index .index-content,
    body.page-information .info-layout,
    body.page-ueber-mich .about-layout {
        height: calc(100vh - 130px) !important;
        min-height: 0 !important;
        overflow: hidden !important;
        padding: 1.25rem clamp(2rem, 5vw, 5.5rem) 0.9rem !important;
        display: flex;
        align-items: flex-start;
        justify-content: center;
    }

    body.page-index .content-container,
    body.page-information .info-inner,
    body.page-ueber-mich .about-inner {
        width: min(1180px, 100%);
        max-width: none;
    }

    body.page-index .content-container {
        width: min(820px, 100%);
    }

    body.page-index .intro-section {
        max-width: 820px;
        margin: 0 auto;
        font-size: 1rem;
        line-height: 1.58;
    }

    body.page-index .intro-section h1,
    body.page-information .info-heading h1,
    body.page-ueber-mich .about-intro h1 {
        margin-bottom: 0.85rem;
        font-size: clamp(1.8rem, 2.5vw, 2.35rem);
        line-height: 1.08;
    }

    body.page-index .intro-section h1 {
        max-width: 720px;
    }

    body.page-index .intro-section p {
        margin-bottom: 0.95rem;
    }

    body.page-information .info-inner {
        padding: 0;
    }

    body.page-information .info-heading {
        margin-bottom: 0.85rem;
        padding-bottom: 0.85rem;
    }

    .info-topic-layout .info-inner {
        display: grid;
        grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
        gap: 3rem;
        align-items: start;
    }

    .info-topic-layout .info-heading {
        margin-bottom: 0;
    }

    .info-topic-layout .info-topic-note {
        margin-top: 0;
        padding-top: 0.25rem;
        padding-left: 1.7rem;
        border-top: 0;
        border-left: 1px solid var(--border);
    }

    body.page-statistik .statistics-inner {
        gap: 0.85rem;
    }

    body.page-statistik {
        overflow-y: auto !important;
    }

    body.page-statistik .info-layout {
        height: auto !important;
        min-height: calc(100vh - 130px) !important;
        overflow: visible !important;
        padding-bottom: 1.4rem !important;
    }

    body.page-statistik .info-heading {
        margin-bottom: 0;
        padding-bottom: 0.65rem;
    }

    body.page-statistik .statistics-reference {
        gap: 1.25rem;
    }

    body.page-statistik .statistics-reference p {
        font-size: 0.78rem;
    }

    body.page-information .info-heading p,
    body.page-ueber-mich .about-lead {
        max-width: 1080px;
        font-size: 1rem;
        line-height: 1.5;
    }

    body.page-regierungsbezirke .district-inner {
        gap: 0.85rem;
    }

    body.page-regierungsbezirke .info-heading {
        margin-bottom: 0;
        padding-bottom: 0.65rem;
    }

    body.page-regierungsbezirke .district-list-section {
        padding-top: 0.8rem;
    }

    body.page-regierungsbezirke .district-list-section h2 {
        margin-bottom: 0.65rem;
        font-size: 1rem;
    }

    body.page-regierungsbezirke .district-list span {
        font-size: 0.84rem;
    }

    body.page-regierungsbezirke .district-list small {
        font-size: 0.76rem;
        line-height: 1.35;
    }

    body.page-information .fact-list > li {
        grid-template-columns: 190px 1fr;
        gap: 2.4rem;
        padding: 0.66rem 0;
    }

    body.page-information .fact-num {
        font-size: 0.98rem;
    }

    body.page-information .fact-text {
        font-size: 0.98rem;
        line-height: 1.5;
    }

    body.page-ueber-mich .about-intro {
        padding-bottom: 0.85rem;
    }

    body.page-ueber-mich .about-overview {
        display: grid;
        grid-template-columns: minmax(310px, 0.78fr) minmax(410px, 1.12fr) minmax(320px, 0.9fr);
        gap: 2.4rem;
        padding: 0.95rem 0 1rem;
        align-items: start;
    }

    body.page-ueber-mich .about-facts-panel {
        padding: 0;
        border-right: 0;
    }

    body.page-ueber-mich .about-primary {
        padding: 0;
        border-right: 0;
    }

    body.page-ueber-mich .about-membership-panel {
        padding-top: 0;
    }

    body.page-ueber-mich .about-text {
        padding: 0;
        border-bottom: 0;
    }

    body.page-ueber-mich .about-text h2 {
        margin-bottom: 0.65rem;
        font-size: 1.08rem;
    }

    body.page-ueber-mich .about-text p {
        font-size: 0.94rem;
        line-height: 1.5;
        margin-bottom: 0;
    }

    body.page-ueber-mich .about-focus-groups {
        margin-top: 0.75rem;
        gap: 0.62rem;
    }

    body.page-ueber-mich .about-focus-list {
        gap: 0.34rem;
    }

    body.page-ueber-mich .about-focus-list li {
        font-size: 0.82rem;
        line-height: 1.26;
        padding-left: 0.95rem;
    }

    body.page-ueber-mich .about-memberships {
        grid-template-columns: 1fr;
        gap: 0.34rem;
    }

    body.page-ueber-mich .about-memberships li {
        font-size: 0.82rem;
        line-height: 1.26;
        padding-left: 0.95rem;
    }
}

@media (max-width: 900px) {
    body.page-index,
    body.page-information,
    body.page-ueber-mich {
        overflow-y: auto !important;
    }

    .statistics-reference,
    .statistics-color-grid,
    .district-list {
        grid-template-columns: 1fr;
    }

    .district-list li {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }

    body.page-ueber-mich .about-overview {
        display: block;
    }

    body.page-ueber-mich .about-facts-panel {
        border-right: 0;
    }

    body.page-ueber-mich .about-primary {
        border-right: 0;
    }
}

@media (min-width: 701px) and (max-width: 900px) {
    .district-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .district-list li {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.65rem;
    }
}

/* Referenzlisten auf den Fachseiten dürfen über eine Bildschirmhöhe hinausgehen. */
body.page-farbige-nummernstempel,
body.page-entwertungen-dritte-ausgabe,
body.page-regierungsbezirke,
body.page-doppelte-dreifache-vergabe {
    overflow-y: auto !important;
}
body.page-information .reference-layout {
    height: auto !important;
    min-height: calc(100vh - 130px) !important;
    overflow: visible !important;
    padding-bottom: 2rem !important;
}
.reference-section {
    min-width: 0;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.reference-section h2 {
    margin: 0 0 0.65rem;
    color: var(--text-main);
    font-size: 1.15rem;
    line-height: 1.35;
}
.reference-section p {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}
.reference-code {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.12rem 0.4rem;
    border: 1px solid currentColor;
    font-size: 0.78rem;
    vertical-align: middle;
}
.reference-color-red .reference-code { color: #a52b32; }
.reference-color-blue .reference-code { color: #2456a6; }
.reference-section .reference-count {
    font-size: 0.78rem;
    font-weight: 700;
}
.reference-table-wrap { overflow-x: auto; }
.reference-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.84rem;
    line-height: 1.45;
}
.reference-table th,
.reference-table td {
    padding: 0.65rem 0.6rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.reference-table th:first-child,
.reference-table td:first-child { padding-left: 0; }
.reference-table thead th {
    color: var(--text-muted);
    font-size: 0.73rem;
    font-weight: 700;
}
.reference-table tbody th {
    color: var(--text-main);
    white-space: nowrap;
}
.reference-table td { overflow-wrap: anywhere; }
.reference-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
@media (max-width: 900px) {
    .reference-table { font-size: 0.8rem; }
    .reference-table th,
    .reference-table td { padding-right: 0.35rem; padding-left: 0.35rem; }
}

/* Lange Fachbegriffe auf Handys vollständig lesbar halten. */
@media (max-width: 900px) {
    body.page-index .index-content {
        overflow: visible;
        padding-top: 1.5rem;
    }
    body.page-index .content-container,
    body.page-information .info-inner {
        min-width: 0;
    }
    body.page-index .intro-section h1,
    body.page-information .info-heading h1,
    body.page-ueber-mich .about-intro h1 {
        max-width: 100%;
        font-size: clamp(1.7rem, 6.5vw, 2rem);
        line-height: 1.18;
        overflow-wrap: anywhere;
        -webkit-hyphens: manual;
        hyphens: manual;
    }
    body.page-index .intro-section h1 {
        -webkit-hyphens: manual;
        hyphens: manual;
        margin-bottom: 1rem;
    }
    body.page-index .intro-section,
    body.page-information .info-heading p:not(.intro-eyebrow) {
        font-size: 1rem;
        line-height: 1.65;
    }
    body.page-information .info-heading {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }
    body.page-information .info-heading h2,
    body.page-information .district-list-section h2,
    body.page-information .reference-section h2,
    body.page-information .district-list span {
        overflow-wrap: anywhere;
        -webkit-hyphens: auto;
        hyphens: auto;
    }
    body.page-information .intro-eyebrow {
        font-size: 0.74rem;
        line-height: 1.2;
    }
}


/* Einheitliche Vergabetabellen mit zwei Umschaltern. */
.info-tabs {
    display: flex;
    gap: 1.5rem;
    margin: 0 0 1.4rem;
    border-bottom: 1px solid var(--border);
}
.info-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.7rem 0.1rem;
    border-bottom: 3px solid transparent;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none;
}
.info-tabs a span { font-size: 0.74rem; font-weight: 600; }
.info-tabs a[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); }
.info-tabs a:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.assignment-panel[hidden] { display: none !important; }
.assignment-layout .reference-section { margin-top: 0; padding-top: 0; border-top: 0; }
.assignment-section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 1rem;
}
.assignment-section-heading h2 { margin: 0; }
.assignment-section-heading > span { color: var(--text-muted); font-size: 0.78rem; }
.assignment-table { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: left; font-size: 0.84rem; line-height: 1.5; }
.assignment-number-column { width: 75px; }
.assignment-table th,
.assignment-table td { padding: 0.8rem 0.7rem; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
.assignment-table thead { background: #eef2f8; }
.assignment-table thead th { color: var(--text-muted); font-size: 0.72rem; font-weight: 700; }
.assignment-table thead tr:first-child th { color: var(--text-main); }
.assignment-table tbody th { color: var(--primary); font-weight: 800; }
.assignment-table tbody td:nth-child(even) { font-weight: 700; color: var(--text-main); }
.assignment-table tbody td:nth-child(odd) { color: var(--text-muted); }
.assignment-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.55); }
.assignment-table th[scope="colgroup"],
.assignment-table tbody td:nth-child(even) { border-left: 1px solid var(--border); }
.assignment-table td div + div { margin-top: 0.5rem; }
.assignment-mobile-number-label { display: none; }
@media (max-width: 900px) {
    .info-tabs { gap: 0.5rem; }
    .info-tabs a { flex: 1; font-size: 0.8rem; }
    .assignment-table,
    .assignment-table tbody { display: block; }
    .assignment-table colgroup { display: none; }
    .assignment-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
    .assignment-table tbody tr { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); padding: 0.3rem 0 0.8rem; border-top: 1px solid var(--border); }
    .assignment-table tbody th { display: block; grid-column: 1 / -1; border-bottom: 0; padding: 0.65rem 0; font-size: 1rem; }
    .assignment-mobile-number-label { display: inline; }
    .assignment-table tbody td { display: block; padding: 0.6rem 0.5rem 0.6rem 0; border-bottom: 0; }
    .assignment-table tbody td:nth-child(even) { border-left: 0; }
    .assignment-table tbody td:nth-child(odd) { padding-left: 0.6rem; padding-right: 0; }
    .assignment-table tbody td::before { content: attr(data-label); display: block; margin-bottom: 0.2rem; color: var(--text-muted); font-size: 0.65rem; font-weight: 600; }
}

/* Rote und blaue Abschläge: Sammlungsstücke über den Ortsnamen öffnen. */
.info-panel[hidden] { display: none !important; }
.color-layout .reference-section { margin-top: 0; padding-top: 0; border-top: 0; }
.color-tabs a { min-width: 100px; }
.color-tabs #red-tab[aria-selected="true"] { color: #a52b32; border-bottom-color: #a52b32; }
.color-tabs #blue-tab[aria-selected="true"] { color: #2456a6; border-bottom-color: #2456a6; }
.color-context { margin-bottom: 1.25rem; }
.color-context p { margin-bottom: 0; }
.color-reference { min-width: 0; }
/* Gleiche Spaltenpositionen beim Wechsel zwischen Rot und Blau. */
.color-reference .reference-table { table-layout: fixed; }
.color-reference .reference-table thead th:nth-child(1) { width: 16%; }
.color-reference .reference-table thead th:nth-child(2) { width: 44%; }
.color-reference .reference-table thead th:nth-child(3) { width: 40%; }
.color-section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; min-height: 2.3rem; border-bottom: 1px solid var(--border); }
.color-section-heading h3 { margin: 0; font-size: 0.86rem; line-height: 1.4; font-weight: 800; }
.color-section-heading > span { color: var(--text-muted); font-size: 0.75rem; white-space: nowrap; }
.reference-piece-link {
    display: inline;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary);
    font: inherit;
    text-align: left;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    overflow-wrap: anywhere;
}
.reference-color-red .reference-piece-link { color: #a52b32; }
.reference-color-blue .reference-piece-link { color: #2456a6; }
.reference-piece-link:hover { opacity: 0.8; }
.reference-piece-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
@media (max-width: 700px) {
    .color-reference .reference-table thead th:nth-child(1) { width: 24%; }
    .color-reference .reference-table thead th:nth-child(2),
    .color-reference .reference-table thead th:nth-child(3) { width: 38%; }
    .color-section-heading { min-height: 2rem; }
}

/* Dritte Ausgabe: jede Wertstufe mit ihrer Erläuterung in einer Zeile. */
.third-issue-layout h2 { font-size: 1.05rem; margin: 0 0 0.65rem; }
.third-issue-note { color: var(--text-muted); font-size: 0.84rem; line-height: 1.6; max-width: 85ch; margin-bottom: 1.2rem; text-wrap: pretty; }
.third-issue-values { width: 100%; max-width: none; }
.third-issue-value { display: grid; grid-template-columns: 115px minmax(0,1fr); gap: 2rem; align-items: center; padding: 1.3rem 0; border-top: 1px solid var(--border); }
.third-issue-image { height: 125px; display: flex; align-items: center; justify-content: center; }
.third-issue-image img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; }
.third-issue-description { min-width: 0; }
.third-issue-description h3 { display: flex; flex-wrap: wrap; gap: 0.3rem 0.85rem; margin: 0 0 0.25rem; font-size: 1rem; line-height: 1.5; }
.third-issue-description h3 span { font-weight: 600; }
.third-issue-color { margin: 0 0 0.7rem; color: var(--text-muted); font-size: 0.8rem; line-height: 1.5; }
.third-issue-text { margin: 0; max-width: none; font-size: 0.95rem; line-height: 1.65; text-wrap: wrap; }
@media (max-width: 600px) {
    .third-issue-value { grid-template-columns: 78px minmax(0,1fr); gap: 1.1rem; align-items: start; padding: 1.25rem 0; }
    .third-issue-image { height: 95px; margin-top: 0.25rem; }
    .third-issue-description h3 { display: block; font-size: 0.95rem; }
    .third-issue-description h3 span { display: block; font-size: 0.9rem; }
    .third-issue-text { font-size: 0.9rem; line-height: 1.6; }
    .third-issue-color { font-size: 0.74rem; }
}

/* Gleicher Seitenkopf und lesbare Erläuterungen statt schmaler Textspalten. */
body.page-information .third-issue-layout,
body.page-information .district-layout { padding-top: 2rem !important; }
body.page-regierungsbezirke .district-inner { display: block; }
body.page-regierungsbezirke .info-heading { margin-bottom: 1.5rem; padding-bottom: 1.25rem; }
body.page-regierungsbezirke .district-list-section { padding-top: 0; }
/* Einleitungen der Referenzseiten nutzen die gesamte verfügbare Breite. */
body.page-information .reference-layout .info-heading > p:not(.intro-eyebrow) {
    max-width: none;
    width: auto;
    text-wrap: wrap;
}
.third-issue-note { max-width: none; text-wrap: wrap; }
@media (max-width: 900px) {
    body.page-information .third-issue-layout,
    body.page-information .district-layout { padding-top: 0.5rem !important; }
}

/* Gemeinsamer Startpunkt für die öffentlichen Textseiten. */
@media (min-width: 901px) {
    html { scrollbar-gutter: stable; }
}
body.page-information { overflow-y: auto !important; }
body.page-information .info-layout {
    height: auto !important;
    min-height: calc(100vh - 130px) !important;
    overflow: visible !important;
    padding: 2rem clamp(2rem, 5vw, 5.5rem) 2rem !important;
}
body.page-information .info-inner {
    width: min(1180px, 100%);
    max-width: none;
    padding: 0;
}
body.page-information .info-topic-layout .info-inner { display: block; }
body.page-information .info-heading {
    margin: 0 0 1.5rem;
    padding: 0 0 1.25rem;
    border-bottom: 1px solid var(--border);
}
body.page-information .info-heading .intro-eyebrow {
    margin: 0 0 0.5rem !important;
    font-size: 0.74rem;
    line-height: 1.2;
}
body.page-information .info-heading h1 { margin: 0 0 0.85rem; }
body.page-information .info-heading > p:not(.intro-eyebrow) {
    max-width: none;
    margin: 0;
    font-size: 1rem;
    line-height: 1.65;
    text-wrap: wrap;
}
body.page-information .info-topic-note {
    margin-top: 0;
    padding: 0;
    border: 0;
}
body.page-information .statistics-inner { gap: 0; }
body.page-information .statistics-inner > :not(.info-heading) + * { margin-top: 1.25rem; }
body.page-information .statistics-info-button { margin-top: 0.75rem; }
@media (min-width: 901px) {
    body.page-index .index-content,
    body.page-ueber-mich .about-layout { padding-top: 2rem !important; overflow: visible !important; height: auto !important; min-height: calc(100vh - 130px) !important; }
    body.page-index,
    body.page-ueber-mich { overflow-y: auto !important; }
    body.page-index .content-container,
    body.page-index .intro-section { width: min(1180px, 100%); max-width: none; }
}
body.page-index .intro-eyebrow,
body.page-ueber-mich .section-eyebrow { margin: 0 0 0.5rem !important; font-size: 0.74rem; line-height: 1.2; }
@media (max-width: 900px) {
    body.page-information .info-layout { padding: 1.5rem 1.5rem 2rem !important; }
    body.page-index .index-content,
    body.page-ueber-mich .about-layout { padding-top: 1.5rem !important; }
}

/* Über mich: Einleitung ohne künstliche Breitenbegrenzung. */
body.page-ueber-mich .about-lead { max-width: none; width: auto; text-wrap: wrap; }

/* Fachtext mit zwei gleich großen, ausdrücklich illustrativen Grafiken. */
.sought-stamps-text { display: grid; gap: 1.5rem; }
.sought-stamps-layout h2 { margin: 0 0 0.6rem; font-size: 1.1rem; line-height: 1.4; }
.sought-stamps-text p { margin: 0; font-size: 0.95rem; line-height: 1.7; text-wrap: wrap; }
.sought-stamps-text p + p { margin-top: 0.65rem; }

/* Informationsübersicht: kurzer Einstieg und direkte Verweise auf die Fachseiten. */
.information-overview-layout h2 { margin: 0 0 0.65rem; font-size: 1.1rem; line-height: 1.4; }
.information-overview-intro p { margin: 0; font-size: 0.95rem; line-height: 1.7; }
.information-overview-intro p + p { margin-top: 0.75rem; }
.information-overview-topics { margin-top: 1.75rem; }
.information-overview-note { margin: 0 0 1rem; color: var(--text-muted); font-size: 0.85rem; line-height: 1.65; }
.information-topic-list { margin: 0; padding: 0; list-style: none; }
.information-topic-list li { display: grid; grid-template-columns: 265px minmax(0,1fr); gap: 2rem; padding: 1rem 0; border-top: 1px solid var(--border); }
.information-topic-list h3 { margin: 0; font-size: 0.95rem; line-height: 1.6; }
.information-topic-list a { color: var(--primary); text-decoration: none; }
.information-topic-list a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.information-topic-list a:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.information-topic-list p { margin: 0; font-size: 0.9rem; line-height: 1.65; }
@media (max-width: 700px) {
    .information-topic-list li { grid-template-columns: minmax(0,1fr); gap: 0.35rem; }
}
