@import url("./vars.css");
@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,400;0,600;0,700;1,400&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;0,8..60,700;1,8..60,400&display=swap");

@font-face {
    font-family: "Fraktur";
    src: url("../fonts/ModerneFraktur.ttf") format("truetype");
}

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

/* Footer */
.site-footer {
    margin-top: 40px;
    padding: 40px 28px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(250,248,242,0.98), rgba(243,233,210,0.9));
    border: 1px solid rgba(30,42,56,0.08);
    box-shadow: 0 18px 40px rgba(17,24,39,0.08), inset 0 1px 0 rgba(255,255,255,0.5);
}

.site-footer__wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
    border-top: 1px solid rgba(30,42,56,0.04);
    padding-top: 18px;
}

.site-footer__col h3 {
    margin: 0 0 10px 0;
    font-family: "Fraktur", Georgia, serif;
    font-size: 1.6rem;
    line-height: 1.15;
    color: var(--text);
    text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}

.site-footer__subheading {
    margin-top: 1.25rem;
}

.site-footer__col p,
.site-footer__col li,
.site-footer__col a {
    font-family: "Typewriter", monospace;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.45;
}

.site-footer__col p {
    margin: 0;
}

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

.site-footer__col a {
    text-decoration: none;
    color: var(--text);
    opacity: 0.95;
}

.site-footer__col a:hover {
    color: var(--accent);
}

.site-footer__col a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.site-footer__col:not(:first-child) {
    border-left: 1px solid rgba(30,42,56,0.04);
    padding-left: 22px;
}

.copyright,
.credits {
    margin: 0 0 0.35rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.credits a {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    text-transform: none;
    letter-spacing: normal;
    font-size: inherit;
}

.credits__logo {
    display: inline-block;
    width: auto;
    height: 0.95em;
    max-height: 18px;
    max-width: 6.5rem;
    object-fit: contain;
    vertical-align: middle;
    /* White logo asset → readable on cream footer */
    filter: brightness(0);
}

body.coldwar .credits__logo {
    filter: none;
}

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

.site-footer__legal a {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.92rem;
}

@media (max-width: 520px) {
    .site-footer__wrap {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .site-footer__col:not(:first-child) {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid rgba(30,42,56,0.06);
        padding-top: 18px;
    }
}

@font-face {
    font-family: "Typewriter";
    src: url("../fonts/DeluxeTypewriter1938.ttf") format("truetype");
}

@font-face {
    font-family: "Handwriting";
    src: url("../fonts/RusticRoadway.otf") format("opentype");
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.3), transparent 30%),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.16), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 40%),
        var(--bg);
    color: var(--text);
    font-family: "Typewriter", "Courier New", monospace;
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 100% 48px, 48px 100%;
    opacity: 0.35;
    mix-blend-mode: soft-light;
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 72px;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -48px;
    z-index: 100;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--text);
    color: #fff;
    text-decoration: none;
    font-family: "Typewriter", monospace;
    font-size: 0.9rem;
}

.skip-link:focus {
    top: 12px;
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.top-nav {
    position: sticky;
    top: 10px;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(255, 250, 244, 0.96), rgba(245, 236, 216, 0.92));
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.12);
    backdrop-filter: blur(8px);
    overflow: visible;
}

.top-nav__brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    color: var(--text);
    text-decoration: none;
}

.top-nav__brand:focus-visible,
.top-nav__link:focus-visible,
.top-nav__toggle:focus-visible,
.top-nav__font-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.top-nav__brand-text {
    font-family: "Fraktur", Georgia, serif;
    font-size: clamp(1.1rem, 2.4vw, 1.55rem);
    line-height: 1.05;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.top-nav__end {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.top-nav__tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.top-nav__toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--text);
    padding: 8px 10px;
}

.top-nav__font-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 7px 11px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.35);
    color: var(--text);
    cursor: pointer;
    font-family: "Source Sans 3", system-ui, sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.2;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.top-nav__font-toggle:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.top-nav__font-toggle[aria-pressed="true"] {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.top-nav__font-toggle-mark {
    font-weight: 700;
    letter-spacing: 0.04em;
}

.top-nav__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    justify-content: flex-end;
    min-width: 0;
}

.top-nav__link {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    background: none;
    font-family: inherit;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.top-nav__link:hover {
    border-color: var(--accent);
    background: rgba(166, 106, 76, 0.12);
}

.top-nav__link[aria-current="page"] {
    border-color: var(--accent);
    background: var(--accent-soft);
    font-weight: 700;
}

/* Accessibility: regular fonts for visitors who struggle with Fraktur/typewriter */
html.font-readable body {
    font-family: "Source Sans 3", system-ui, sans-serif;
}

html.font-readable :is(
    button,
    input,
    summary,
    .switcher__button,
    .audio-player__toggle,
    .audio-player__time,
    .detail-card__meta,
    .section__eyebrow,
    .label,
    .timeline,
    .legend,
    .legend-list,
    figcaption,
    .bunker-description,
    .media-wrapper p,
    .site-footer__col p,
    .site-footer__col a,
    .page-subnav a,
    .skip-link
) {
    font-family: "Source Sans 3", system-ui, sans-serif;
}

html.font-readable :is(
    h1,
    h2,
    h3,
    .top-nav__brand-text,
    .hero__title-line,
    .page-hero h1,
    .chapter-link h3,
    .site-footer__col h3,
    .section__header h2,
    .event-card h3,
    .person-card h3,
    .dictionary__item h3,
    .audio-card h3,
    .bunker-container h3
) {
    font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
}

html.font-readable :is(
    .document,
    .document__body,
    .document__sign,
    .document__type,
    .typewriter,
    .hero__lead,
    .panel--quote p,
    .panel p,
    .person-card p,
    .event-card p,
    .audio-card p,
    .dictionary__item p,
    .chapter-link p
) {
    font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
}

html.font-readable .top-nav__link {
    font-family: "Source Sans 3", system-ui, sans-serif;
    text-transform: none;
    letter-spacing: 0.01em;
}

.page-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.page-subnav a {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
}

.page-subnav a:hover,
.page-subnav a:focus-visible {
    border-color: var(--accent);
    background: var(--accent-soft);
    outline: none;
}

.page-subnav a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.chapter-link {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.35);
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.chapter-link:hover,
.chapter-link:focus-visible {
    border-color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-2px);
    outline: none;
}

.chapter-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.chapter-link__eyebrow {
    margin: 0;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.chapter-link h3 {
    margin: 0;
    font-family: "Fraktur", Georgia, serif;
    font-size: 1.55rem;
    line-height: 1.1;
}

.chapter-link p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.page-hero {
    margin-top: 24px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--surface-strong), var(--surface));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 0 0 10px;
    font-family: "Fraktur", Georgia, serif;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    line-height: 1;
}

.page-hero p {
    margin: 0;
    max-width: 42rem;
    color: var(--muted);
}

.hero,
.section {
    position: relative;
    margin-top: 24px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--surface-strong), var(--surface));
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.hero {
    overflow: hidden;
    padding: clamp(36px, 6vw, 56px) clamp(24px, 4vw, 40px);
    min-height: min(72vh, 640px);
    display: grid;
    align-content: center;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -12% -30% auto;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-soft), transparent 70%);
    pointer-events: none;
}

.hero__kicker {
    margin: 0 0 14px;
    font-family: "Typewriter", monospace;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    color: var(--muted);
}

.hero__meta,
.section__header,
.hero__facts,
.grid,
.audio-grid,
.event-grid,
.cards,
.documents,
.dictionary {
    display: grid;
    gap: 16px;
}

.hero__meta {
    grid-template-columns: 1fr;
    align-items: center;
    margin-bottom: 18px;
}

.kicker,
.section__eyebrow,
.label,
.document__type,
.document__sign {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.50rem;
    color: var(--muted);
}

h1,
h2,
h3 {
    margin: 0;
    font-family: "Fraktur", Georgia, serif;
    font-weight: 400;
    letter-spacing: 0.02em;
}

h1 {
    font-size: clamp(2.8rem, 9vw, 5.8rem);
    line-height: 0.92;
    max-width: none;
}

.hero__title-line {
    display: block;
}

h2 {
    font-size: clamp(1.9rem, 3.5vw, 3rem);
}

h3 {
    font-size: 1.4rem;
}

.hero__lead,
.panel p,
.event-card p,
.person-card p,
.audio-card p,
.dictionary__item p,
.document__body {
    margin: 0;
    font-size: 1rem;
}

.hero__lead {
    max-width: 42ch;
    margin-top: 22px;
    font-family: "Typewriter", monospace;
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.55;
    color: var(--muted);
    min-height: 4.8em;
}

.hero__lead.typewriter::after {
    content: "";
    display: inline-block;
    width: 0.55ch;
    height: 1.05em;
    margin-left: 2px;
    vertical-align: text-bottom;
    background: var(--accent);
    animation: caret-blink 1s steps(1) infinite;
}

@keyframes caret-blink {
    50% { opacity: 0; }
}

.hero__facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 28px;
}

.hero__facts article,
.panel,
.event-card,
.person-card,
.audio-card,
.dictionary__item,
.document {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.08);
}

.hero__facts article {
    padding: 18px;
}

.hero__facts span,
.hero__facts strong {
    display: block;
}

.hero__facts span {
    font-size: 0.76rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 10px;
}

.hero__facts strong {
    font-size: 1rem;
    line-height: 1.35;
}

.section__header p {
    margin: 0;
    max-width: 62ch;
    font-family: "Typewriter", monospace;
    color: var(--muted);
    line-height: 1.5;
}

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

.panel,
.event-card,
.person-card,
.audio-card,
.dictionary__item,
.document {
    padding: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.panel--paper,
.document,
.dictionary__item {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
}

.panel--quote {
    display: flex;
    align-items: center;
    font-family: "Handwriting", cursive;
    font-size: 1.35rem;
    line-height: 1.4;
    color: var(--accent);
}

.panel--highlight {
    border-color: var(--accent);
}

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

.timeline li {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 18px;
    align-items: start;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
}

.timeline time {
    font-weight: 700;
    letter-spacing: 0.05em;
}

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

.event-card--transition {
    border-color: var(--accent);
}

.cards--dense,
.dictionary,
.audio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.document {
    position: relative;
    min-height: 220px;
    font-family: "Handwriting", cursive;
    background:
        linear-gradient(180deg, rgba(243, 233, 210, 0.88), rgba(243, 233, 210, 0.68));
    color: #2c241d;
}

.document--letter {
    overflow: hidden;
    transform: rotate(-0.25deg);
    background:
        radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.55), transparent 28%),
        radial-gradient(circle at 82% 24%, rgba(136, 95, 50, 0.14), transparent 24%),
        radial-gradient(circle at 46% 74%, rgba(136, 95, 50, 0.1), transparent 34%),
        linear-gradient(180deg, rgba(247, 236, 214, 0.98), rgba(237, 220, 188, 0.95) 58%, rgba(224, 203, 169, 0.92));
    border: none;
    box-shadow:
        0 22px 34px rgba(47, 34, 20, 0.2),
        0 1px 0 rgba(255, 255, 255, 0.3) inset;
    filter: drop-shadow(0 12px 18px rgba(47, 34, 20, 0.12));
    clip-path: polygon(
        1.2% 1.1%, 7% 0.3%, 14% 1.1%, 22% 0.5%, 30% 1.2%, 39% 0.6%, 48% 1.1%,
        57% 0.6%, 66% 1.1%, 75% 0.5%, 84% 1.1%, 92% 0.6%, 98.8% 1.3%, 100% 6.5%,
        99.1% 14%, 100% 23%, 99.2% 33%, 100% 44%, 99.1% 56%, 100% 67%,
        99.2% 79%, 100% 90%, 98.8% 98.8%, 92% 99.4%, 84% 98.9%, 75% 99.5%,
        66% 98.9%, 57% 99.5%, 48% 98.9%, 39% 99.4%, 30% 98.9%, 22% 99.5%,
        14% 98.9%, 7% 99.4%, 1.2% 98.8%, 0 92%, 0.8% 82%, 0 71%, 0.8% 61%,
        0 50%, 0.8% 39%, 0 29%, 0.8% 19%, 0 9%
    );
}

.document--letter::before {
    inset: 10px;
    border-radius: 10px;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(118, 84, 48, 0.035) 0,
            rgba(118, 84, 48, 0.035) 1px,
            transparent 1px,
            transparent 9px
        ),
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
    opacity: 0.75;
}

.document--letter::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 14% 14%, rgba(255, 255, 255, 0.38), transparent 18%),
        radial-gradient(circle at 86% 18%, rgba(84, 59, 35, 0.12), transparent 16%),
        radial-gradient(circle at 10% 78%, rgba(84, 59, 35, 0.1), transparent 14%),
        radial-gradient(circle at 90% 84%, rgba(84, 59, 35, 0.08), transparent 14%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 42%, rgba(88, 61, 35, 0.08) 100%);
    mix-blend-mode: multiply;
    opacity: 0.7;
}

.document p,
.document span,
.document time,
.document h1,
.document h2,
.document h3,
.document h4,
.document h5,
.document h6 {
    font-family: inherit;
}

.document::before {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: 12px;
    pointer-events: none;
}

.document__type,
.document__sign {
    color: rgba(44, 36, 29, 0.72);
}

.document__body {
    margin-top: 16px;
    font-size: 1.15rem;
    line-height: 1.6;
}

.document__sign {
    margin-top: 22px;
}

.cards,
.dictionary,
.audio-grid,
.documents {
    align-items: stretch;
}

.person-card,
.audio-card,
.dictionary__item {
    display: grid;
    gap: 10px;
}

.audio-player {
    margin-top: 4px;
}

.audio-player__media {
    display: none;
}

.audio-player__controls {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(30, 42, 56, 0.08);
    border: 1px solid rgba(30, 42, 56, 0.12);
}

.audio-player__toggle {
    border: 1px solid rgba(30, 42, 56, 0.2);
    background: rgba(255, 255, 255, 0.7);
    color: var(--text);
    border-radius: 999px;
    padding: 6px 12px;
    font-family: "Typewriter", monospace;
    font-size: 0.84rem;
    cursor: pointer;
}

.audio-player__toggle:hover {
    border-color: var(--accent);
}

.audio-player__seek {
    width: 100%;
    accent-color: var(--accent);
}

.audio-player__time {
    margin: 0;
    min-width: 78px;
    text-align: right;
    font-size: 0.82rem;
    color: var(--muted);
}

.dictionary__item h3 {
    margin-bottom: 2px;
}

.dictionary__item .label {
    color: var(--accent);
}

.detail-card {
    display: grid;
    gap: 12px;
    align-content: start;
}

.detail-card__meta {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.74rem;
    color: var(--muted);
}

.switcher {
    display: grid;
    gap: 14px;
}

.switcher__list {
    display: grid;
    gap: 10px;
}

.switcher__list--timeline,
.switcher__list--tree {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.switcher__button,
.photo-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    cursor: pointer;
    font: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.switcher__button {
    padding: 12px 14px;
    text-align: left;
}

.switcher__button:hover,
.switcher__button:focus-visible,
.photo-card:hover,
.photo-card:focus-visible {
    transform: translateY(-1px);
    border-color: var(--accent);
    outline: none;
}

.switcher__button.is-active,
.photo-card.is-active {
    border-color: var(--accent);
    background: rgba(166, 106, 76, 0.16);
    box-shadow: 0 0 0 2px rgba(166, 106, 76, 0.55);
}

.family-tree {
    position: relative;
}

.family-tree__grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.family-tree__node--root {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(100%, 260px);
    text-align: center;
}

.family-tree__grid::before {
    content: "";
    position: absolute;
    inset: 82px 10% auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(30, 42, 56, 0.18), transparent);
    pointer-events: none;
}

.family-tree__grid::after {
    content: "";
    position: absolute;
    inset: 172px 8% auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(30, 42, 56, 0.14), transparent);
    pointer-events: none;
}

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

.photo-card {
    display: grid;
    gap: 0;
    overflow: hidden;
    text-align: left;
    padding: 0;
}

.photo-card__frame {
    min-height: 180px;
    display: flex;
    align-items: flex-end;
    padding: 14px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.92);
    background:
        radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.42), transparent 30%),
        linear-gradient(135deg, rgba(30, 42, 56, 0.2), rgba(166, 106, 76, 0.18)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
}

.photo-card__title {
    padding: 14px;
    font-size: 1rem;
}

@media (max-width: 960px) {
    [data-nav-hide="mobile"] {
        display: none;
    }

    .hero__facts,
    .grid--split,
    .event-grid,
    .cards--dense,
    .dictionary,
    .audio-grid,
    .documents,
    .switcher__list--timeline,
    .switcher__list--tree,
    .photo-archive__grid,
    .family-tree__grid,
    .chapter-grid {
        grid-template-columns: 1fr;
    }

    .timeline li {
        grid-template-columns: 1fr;
    }

    .hero__meta {
        grid-template-columns: 1fr;
        justify-items: start;
    }

}

@media (max-width: 640px) {
    .top-nav__toggle {
        display: inline-block;
    }

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

    .top-nav__brand-text {
        white-space: normal;
        max-width: 11ch;
        font-size: 1.15rem;
        line-height: 0.95;
    }

    .top-nav__list {
        display: none;
    }

    .top-nav__list.is-open {
        display: flex;
    }

    .page-shell {
        width: min(100% - 20px, 1180px);
        padding-top: 10px;
    }

    .top-nav__list {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        margin-top: 4px;
        flex-direction: column;
        gap: 0;
        padding: 8px;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        background: linear-gradient(180deg, rgba(255, 250, 244, 0.98), rgba(245, 236, 216, 0.96));
        box-shadow: 0 14px 30px rgba(17, 24, 39, 0.14);
        z-index: 1;
    }

    .top-nav__link {
        display: block;
        width: 100%;
        text-align: left;
        padding: 10px 12px;
        border-radius: 10px;
    }

    .hero,
    .section {
        padding: 20px;
        border-radius: 22px;
    }

    h1 {
        font-size: clamp(2.6rem, 15vw, 4.4rem);
    }

    .audio-player__controls {
        grid-template-columns: 1fr;
        border-radius: 14px;
    }

    .audio-player__time {
        text-align: left;
    }

}

video {
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}

iframe {
    border-radius: var(--radius-sm);
}

.media-wrapper {
    display: grid;
    gap: 14px;
    margin: 24px 0 0;
}

.media-wrapper p {
    margin: 0;
    font-family: "Typewriter", monospace;
    color: var(--muted);
    line-height: 1.5;
    max-width: 70ch;
}

.media-16x9 {
    display: block;
    width: 100%;
    max-width: 720px;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 1px solid var(--border);
    background: #111;
    object-fit: cover;
}

/* Bunker containers and legend */
.bunker-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bunker-container h3 {
    font-family: "Fraktur", Georgia, serif;
    font-size: 1.6rem;
    color: var(--text);
    margin: 0 0 8px 0;
    border-bottom: 2px solid var(--accent-soft);
    padding-bottom: 8px;
}

.bunker-container figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bunker-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(30, 42, 56, 0.1);
}

.bunker-container figcaption {
    font-size: 0.92rem;
    color: var(--muted);
    font-style: italic;
    text-align: center;
}

.bunker-description {
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--text);
    margin: 0;
}

/* Legend styling */
.legend {
    border: 1px solid rgba(30, 42, 56, 0.12);
    border-radius: 8px;
    padding: 16px;
    background: rgba(243, 233, 210, 0.4);
}

.legend summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    padding: 8px;
    margin: -8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    user-select: none;
}

.legend summary:hover {
    background: rgba(243, 233, 210, 0.6);
    color: var(--accent);
}

.legend-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 16px 0 0 0;
    padding-left: 20px;
    list-style-position: inside;
}

.legend-list li {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text);
}

.legend-list strong {
    font-weight: 600;
    color: var(--text);
}

@media (max-width: 768px) {
    .legend-list {
        grid-template-columns: 1fr;
    }
}

