:root {
    --ink: #17211d;
    --muted: #60706a;
    --paper: #fbfaf6;
    --panel: #ffffff;
    --line: #ddd7ca;
    --brand: #19352d;
    --brand-2: #8d5b32;
    --accent: #2f80ed;
    --marker: #1f9bd1;
    --shadow: 0 18px 55px rgba(23, 33, 29, .16);
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
}

body {
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
}

.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;
}

.app-shell {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    grid-template-rows: 64px minmax(0, 1fr);
    min-height: 100vh;
}

.topbar {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(260px, 620px) auto;
    gap: 18px;
    align-items: center;
    padding: 10px 18px;
    background: rgba(251, 250, 246, .96);
    border-bottom: 1px solid var(--line);
    z-index: 10;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--brand);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: #fff;
    background: var(--brand);
    border-radius: 6px;
    font-family: Georgia, "Times New Roman", serif;
}

.search-box input,
select {
    width: 100%;
    min-height: 42px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    font: inherit;
}

.icon-button,
.close-button {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--brand);
    background: #fff;
    cursor: pointer;
    font-size: 22px;
}

.side-panel {
    z-index: 5;
    overflow: auto;
    background: var(--paper);
    border-right: 1px solid var(--line);
}

.panel-section {
    padding: 22px;
    border-bottom: 1px solid var(--line);
}

.intro h1 {
    margin: 6px 0 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 32px;
    line-height: 1.05;
}

.intro p {
    color: var(--muted);
    line-height: 1.55;
}

.kicker,
.eyebrow,
.section-title {
    margin: 0;
    color: var(--brand-2);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.filter-row {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.near-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.near-list a {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    color: var(--ink);
    border-bottom: 1px solid rgba(221, 215, 202, .7);
    text-decoration: none;
}

.map-stage {
    position: relative;
    min-height: 0;
}

.map {
    position: absolute;
    inset: 0;
    background: #d9e3db;
}

.preview-card {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    max-width: 720px;
    padding: 14px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    z-index: 600;
}

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

.preview-card img {
    width: 180px;
    height: 118px;
    object-fit: cover;
    border-radius: 6px;
    background: #eee8dc;
}

.preview-card h2 {
    margin: 4px 36px 8px 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 26px;
    line-height: 1.1;
}

.preview-card .close-button {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
}

.primary-link,
.secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    color: #fff;
    background: var(--brand);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
}

.secondary-link {
    color: var(--brand);
    background: transparent;
    border: 1px solid var(--brand);
}

.heritage-marker {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    color: #fff;
    background: var(--marker);
    border: 2px solid #fff;
    border-radius: 50% 50% 50% 10%;
    box-shadow: 0 7px 18px rgba(31, 155, 209, .38);
    transform: rotate(-45deg);
}

.heritage-marker span {
    transform: rotate(45deg);
    font-size: 15px;
    font-weight: 800;
}

.heritage-marker.is-selected,
.is-selected .heritage-marker {
    background: #d54b35;
    box-shadow: 0 10px 22px rgba(213, 75, 53, .35);
}

.user-location-marker {
    width: 18px;
    height: 18px;
    background: #2f80ed;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 10px rgba(47, 128, 237, .18), 0 2px 10px rgba(0, 0, 0, .25);
}

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

.page-brand {
    margin-bottom: 22px;
}

.monument-page {
    display: grid;
    grid-template-columns: minmax(280px, 48%) minmax(0, 1fr);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.monument-hero img {
    width: 100%;
    height: 100%;
    min-height: 520px;
    object-fit: cover;
}

.monument-body {
    padding: 34px;
}

.monument-body h1,
.listing h1,
.centered h1 {
    margin: 6px 0 8px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 42px;
    line-height: 1.05;
}

.monument-body h2 {
    margin-top: 28px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
}

.monument-body p {
    line-height: 1.7;
}

.place {
    color: var(--muted);
}

.facts {
    display: grid;
    gap: 1px;
    margin: 26px 0;
    background: var(--line);
    border: 1px solid var(--line);
}

.facts div {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
    background: #fff;
}

.facts dt {
    font-weight: 800;
}

.facts dd {
    margin: 0;
    color: var(--muted);
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.result-card {
    display: grid;
    gap: 6px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    text-decoration: none;
}

.result-card span,
.result-card small {
    color: var(--muted);
}

.centered {
    min-height: 70vh;
    display: grid;
    align-content: center;
    justify-items: start;
}

@media (max-width: 860px) {
    .app-shell {
        grid-template-columns: 1fr;
        grid-template-rows: 58px auto minmax(0, 1fr);
    }

    .topbar {
        grid-template-columns: 1fr auto;
        padding: 8px 10px;
    }

    .brand {
        font-size: 22px;
    }

    .search-box {
        grid-column: 1 / -1;
        order: 3;
    }

    .side-panel {
        max-height: 220px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .intro {
        display: none;
    }

    .panel-section {
        padding: 12px;
    }

    .filter-row {
        grid-template-columns: 1fr 1fr;
    }

    .map-stage {
        min-height: calc(100vh - 278px);
    }

    .preview-card {
        left: 0;
        right: 0;
        bottom: 0;
        grid-template-columns: 86px minmax(0, 1fr);
        border-radius: 8px 8px 0 0;
    }

    .preview-card img {
        width: 86px;
        height: 86px;
    }

    .preview-card h2 {
        font-size: 21px;
    }

    .monument-page {
        grid-template-columns: 1fr;
    }

    .monument-hero img {
        min-height: 300px;
        max-height: 430px;
    }

    .monument-body {
        padding: 22px;
    }

    .monument-body h1,
    .listing h1,
    .centered h1 {
        font-size: 32px;
    }

    .facts div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
