/* ============================================================
 * Ancient Library theme styles
 * ============================================================ */

:root {
    --paper:     #ede4d3;
    --paper-dim: #c5b89c;
    --ink:       #14110d;
    --ink-soft:  #3a3128;
    --ink-mid:   #5a4d3e;
    --accent:    #b8421a;
    --gold:      #b89556;
    --bg:        #14110d;
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background: var(--bg);
    color: var(--paper);
    font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }

body.page-template-template-map,
body.home {
    height: 100vh;
    overflow: hidden;
}

body.page-template-template-coming-soon,
body.page-template-template-coming-soon.home {
    height: auto;
    min-height: 100vh;
    overflow: auto;
}

/* ============================================================
 * SITE HEADER + LOGO
 * ============================================================ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    min-height: 76px;
    padding: 9px 28px;
    background: #0f0d0b;
    border-bottom: 1px solid rgba(237, 228, 211, 0.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    pointer-events: none;
}
.site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: #0f0d0b;
}
.site-header > * { pointer-events: auto; }

.brand-link {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: inherit;
}
.custom-logo-wrap {
    display: flex;
    align-items: center;
}
.brand-logo-wrap {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}
.brand-logo {
    width: 50px;
    height: 50px;
    object-fit: cover;
    display: block;
    border: 1px solid rgba(184, 149, 86, 0.55);
    border-radius: 50%;
    box-shadow: 0 5px 18px rgba(0,0,0,0.45);
    background: #141414;
}
.custom-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    display: block;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}
.brand {
    font-style: italic;
    font-weight: 600;
    font-size: 23px;
    letter-spacing: 0.01em;
    color: var(--paper);
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.tagline {
    font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: 8px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-top: 4px;
}

.site-nav .menu {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    align-items: center;
    gap: 22px;
}
.site-nav .menu a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--paper);
    text-decoration: none;
    opacity: 0.86;
    padding: 8px 0 7px;
    border-bottom: 1px solid transparent;
    transition: color 160ms ease, opacity 160ms ease, border-color 160ms ease;
}
.site-nav .menu a:hover,
.site-nav .menu a:focus-visible,
.site-nav .menu .current-menu-item > a,
.site-nav .menu .current_page_item > a { opacity: 1; color: var(--gold); border-color: var(--gold); }

.site-nav .menu-fallback { gap: 20px; }

/* ============================================================
 * PUBLIC INFORMATION PAGES
 * ============================================================ */
.content-main {
    min-height: 100vh;
    padding: 170px 28px 90px;
    background: var(--bg);
}
.content-inner {
    max-width: 760px;
    margin: 0 auto;
}
.content-header {
    margin-bottom: 44px;
    padding-bottom: 26px;
    border-bottom: 1px solid rgba(237, 228, 211, 0.14);
}
.content-kicker {
    margin: 0 0 14px;
    color: var(--gold);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}
.content-header h1 {
    margin: 0;
    color: var(--paper);
    font-size: clamp(42px, 7vw, 72px);
    font-weight: 500;
    line-height: 1;
}
.content-body {
    color: var(--paper-dim);
    font-size: 20px;
    line-height: 1.65;
}
.content-body p { margin: 0 0 1.35em; }
.content-body a { color: var(--gold); }
.content-body a:hover { color: var(--paper); }
.content-body h2 {
    margin: 2.4em 0 0.55em;
    color: var(--paper);
    font-size: 28px;
    font-weight: 500;
    line-height: 1.1;
}
.about-lead {
    max-width: 680px;
    margin-bottom: 34px;
    color: var(--paper);
    font-size: clamp(25px, 4vw, 36px);
    font-style: italic;
    line-height: 1.22;
}
.about-lead p { margin: 0; }
.about-section {
    margin-top: 42px;
    padding-top: 22px;
    border-top: 1px solid rgba(237, 228, 211, 0.12);
}
.about-section h2 { margin-top: 0; }
.about-section p { max-width: 690px; }
.about-signoff {
    margin-top: 52px !important;
    color: var(--gold);
    font-size: 17px;
}

/* ============================================================
 * SITE FOOTER
 * ============================================================ */
.site-footer {
    position: relative;
    z-index: 2;
    border-top: 1px solid rgba(237, 228, 211, 0.14);
    background: #0f0d0b;
    color: var(--paper-dim);
}
.site-footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 58px 28px 24px;
}
.site-footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(2, minmax(130px, 1fr));
    gap: 44px;
    padding-bottom: 46px;
}
.footer-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--paper);
    font-family: 'Cormorant Garamond', serif;
    font-size: 25px;
    font-style: italic;
    font-weight: 600;
    text-decoration: none;
}
.footer-brand-mark {
    display: block;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(184, 149, 86, 0.65);
    border-radius: 50%;
    background: #171411;
    object-fit: cover;
}
.footer-brand p {
    max-width: 360px;
    margin: 15px 0 0;
    color: var(--paper-dim);
    font-size: 16px;
    line-height: 1.5;
}
.footer-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
}
.footer-heading {
    margin-bottom: 7px;
    color: var(--gold);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
}
.footer-nav a {
    color: var(--paper-dim);
    font-size: 16px;
    text-decoration: none;
}
.footer-nav a:hover,
.footer-nav a:focus-visible { color: var(--paper); }
.footer-easter-egg {
    margin: 0 0 28px;
    padding: 22px 0 20px;
    border-top: 1px solid rgba(237, 228, 211, 0.12);
    background: transparent;
}
.footer-easter-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 9px;
}
.footer-quote-wrap {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    margin-top: 3px;
}
.footer-quote-mark {
    color: var(--accent);
    font-family: Georgia, serif;
    font-size: 42px;
    line-height: 0.72;
}
.footer-quote {
    max-width: 980px;
    margin: 0;
    color: var(--paper);
    font-size: clamp(17px, 1.7vw, 22px);
    font-style: italic;
    line-height: 1.25;
    transition: opacity 160ms ease, transform 160ms ease;
}
.footer-easter-egg.is-changing .footer-quote,
.footer-easter-egg.is-changing .footer-quote-credit {
    opacity: 0;
    transform: translateY(4px);
}
.footer-quote-meta {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 6px 0 0 37px;
}
.footer-quote-credit {
    max-width: 82%;
    color: var(--paper-dim);
    font-size: 11px;
    line-height: 1.35;
    transition: opacity 160ms ease, transform 160ms ease;
}
.site-footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(237, 228, 211, 0.1);
    color: rgba(197, 184, 156, 0.72);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.08em;
    line-height: 1.5;
    text-transform: uppercase;
}

body.page-template-template-map .site-footer { display: none; }

/* ============================================================
 * MAP PAGE
 * ============================================================ */
.map-main { position: absolute; inset: 0; background: var(--bg); }
#map { position: absolute; inset: 0; background: var(--bg); }

/* Keep the keyless OSM tiles in the atlas palette without touching marker layers. */
.leaflet-tile-pane img.leaflet-tile {
    filter: invert(1) hue-rotate(180deg) brightness(0.48) contrast(1.12) saturate(0.72);
}

.leaflet-container {
    background: var(--bg);
    font-family: 'Cormorant Garamond', serif;
}

.leaflet-control-zoom {
    margin-top: 100px !important;
    border: none !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5) !important;
}
.leaflet-control-zoom a {
    background: var(--paper) !important;
    color: var(--ink) !important;
    border: none !important;
    font-family: 'JetBrains Mono', monospace !important;
}
.leaflet-control-zoom a:hover { background: var(--paper-dim) !important; }

.leaflet-control-attribution {
    background: rgba(10, 8, 6, 0.7) !important;
    color: rgba(237, 228, 211, 0.55) !important;
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 9px !important;
}
.leaflet-control-attribution a { color: var(--gold) !important; }

/* Filters */
.atlas-controls {
    position: fixed;
    top: 106px;
    right: 28px;
    z-index: 900;
}
.filter-menu {
    position: relative;
}
.filter-menu-summary {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 7px 11px;
    border: 1px solid rgba(237, 228, 211, 0.32);
    background: rgba(10, 8, 6, 0.9);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--paper);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    list-style: none;
    cursor: pointer;
    user-select: none;
}
.filter-menu-summary::-webkit-details-marker { display: none; }
.filter-menu-summary::after {
    content: '+';
    margin-left: 3px;
    color: var(--gold);
    font-size: 13px;
    line-height: 1;
}
.filter-menu[open] .filter-menu-summary::after { content: '−'; }
.filter-menu-summary:hover,
.filter-menu-summary:focus-visible {
    border-color: var(--gold);
    outline: none;
}
.filter-menu-label {
    color: var(--gold);
}
.filter-current {
    color: var(--paper);
    font-weight: 500;
}
.filter-current-count {
    color: var(--gold);
    letter-spacing: 0.08em;
}
.filter-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(430px, calc(100vw - 28px));
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    padding: 11px 12px 12px;
    background: rgba(10, 8, 6, 0.94);
    border: 1px solid rgba(237, 228, 211, 0.2);
    box-shadow: 0 14px 34px rgba(0,0,0,0.45);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.atlas-controls-title {
    margin: 0 0 8px;
    color: var(--gold);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.22em;
    line-height: 1;
    text-transform: uppercase;
}
.filters {
    display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
    justify-content: flex-start;
}
.filter-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px; letter-spacing: 0.13em; text-transform: uppercase;
    background: rgba(237, 228, 211, 0.06);
    color: var(--paper);
    border: 1px solid rgba(237, 228, 211, 0.22);
    min-height: 32px;
    padding: 6px 10px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.18s ease;
}
.filter-btn:hover { background: rgba(237, 228, 211, 0.14); border-color: var(--gold); }
.filter-btn.active { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.filter-btn .count { opacity: 0.55; margin-left: 6px; font-size: 9px; }

/* Markers */
.pin-icon { position: relative; background: transparent !important; border: none !important; }
.pin-svg {
    width: 28px; height: 32px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.85));
    transition: transform 0.15s ease;
    transform-origin: 50% 100%;
    cursor: pointer;
    display: block;
}
.pin-svg:hover { transform: scale(1.3); }
.pin-rare-mark {
    position: absolute;
    top: -1px;
    right: -2px;
    width: 7px;
    height: 7px;
    border: 1px solid var(--paper);
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 2px rgba(20, 17, 13, 0.8);
    pointer-events: none;
}

/* Popup */
.leaflet-popup-content-wrapper {
    background: var(--paper) !important;
    color: var(--ink) !important;
    border-radius: 0 !important;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6) !important;
    padding: 0 !important;
    overflow: hidden;
}
.leaflet-popup-content { margin: 0 !important; width: 320px !important; line-height: 1.4 !important; }
.leaflet-popup-tip { background: var(--paper) !important; }
.leaflet-popup-close-button {
    color: var(--ink-soft) !important;
    font-size: 22px !important;
    padding: 6px 9px 0 0 !important;
    z-index: 5;
}

.pp-thumb {
    width: 100%;
    height: 180px;
    background-color: var(--ink);
    overflow: hidden;
    position: relative;
}
.pp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border: 0;
}
.pp-thumb-empty { display: none; }

.popup-card { padding: 16px 20px 16px 20px; }
.popup-cat {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase;
    margin-bottom: 6px;
    color: var(--ink-mid);
}
.popup-cat-dot {
    display: inline-block; width: 8px; height: 8px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.3);
}
.popup-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px; font-weight: 600; line-height: 1.15;
    color: var(--ink);
    margin: 0 0 4px;
    padding-right: 18px;
}
.popup-loc {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; color: var(--ink-soft);
    margin-bottom: 10px;
    letter-spacing: 0.04em;
}
.popup-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; color: var(--ink-soft);
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(20, 17, 13, 0.18);
    margin-bottom: 10px;
}
.popup-meta strong { color: var(--ink); font-weight: 500; }
.popup-summary {
    font-size: 15px; line-height: 1.5; color: var(--ink-soft);
    margin-bottom: 14px;
}
.popup-link {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--accent); text-decoration: none;
    border-bottom: 1px solid var(--accent);
    padding-bottom: 2px;
}
.popup-link:hover { color: var(--ink); border-color: var(--ink); }
.popup-rare-note {
    margin: 10px 0 12px;
    color: var(--ink-mid);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.popup-field-hint {
    margin: 13px 0 0;
    color: var(--ink-mid);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.05em;
    line-height: 1.4;
}
.popup-field-note {
    margin: 14px 0 0;
    padding: 12px 0 0;
    border-top: 1px solid rgba(20, 17, 13, 0.18);
}
.popup-field-note-label,
.popup-routes-label {
    margin-bottom: 5px;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.popup-field-note p {
    margin: 0 0 7px;
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.45;
}
.popup-field-note a {
    color: var(--ink-mid);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.03em;
    text-decoration: none;
}
.popup-field-note a:hover { color: var(--accent); }
.popup-routes {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(20, 17, 13, 0.18);
}
.popup-route-link {
    display: block;
    margin: 5px 0 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.04em;
    text-align: left;
    cursor: pointer;
}
.popup-route-link:hover,
.popup-route-link:focus-visible { color: var(--ink); outline: none; }

.pp-thumb-credit {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(20,17,13,0.1);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: var(--ink-mid);
    letter-spacing: 0.02em;
    line-height: 1.3;
}

/* Legend */
.legend {
    position: fixed;
    bottom: 24px; left: 24px;
    z-index: 800;
}
.legend-menu {
    position: relative;
}
.legend-summary {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid rgba(237, 228, 211, 0.28);
    background: rgba(10, 8, 6, 0.9);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--paper);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    list-style: none;
    cursor: pointer;
    user-select: none;
}
.legend-summary::-webkit-details-marker { display: none; }
.legend-summary::after {
    content: '+';
    margin-left: 2px;
    color: var(--gold);
    font-size: 13px;
    line-height: 1;
}
.legend-menu[open] .legend-summary::after { content: '−'; }
.legend-summary:hover,
.legend-summary:focus-visible {
    border-color: var(--gold);
    outline: none;
}
.legend-summary-label { color: var(--gold); }
.legend-summary-count { color: var(--paper-dim); letter-spacing: 0.08em; }
.legend-panel {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    width: 226px;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    padding: 13px 14px 14px;
    background: rgba(10, 8, 6, 0.94);
    border: 1px solid rgba(237, 228, 211, 0.2);
    box-shadow: 0 14px 34px rgba(0,0,0,0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
}
.legend-list { display: flex; flex-direction: column; gap: 2px; }
.legend-row {
    appearance: none;
    display: flex; align-items: center; gap: 10px;
    width: 100%;
    min-height: 26px;
    padding: 3px 6px;
    border: 0;
    border-left: 2px solid transparent;
    background: transparent;
    color: var(--paper);
    font: inherit;
    letter-spacing: inherit;
    text-align: left;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.legend-row:hover,
.legend-row:focus-visible,
.legend-row.active {
    background: rgba(237, 228, 211, 0.1);
    border-left-color: var(--gold);
    color: var(--gold);
    outline: none;
}
.legend-icon { width: 20px; height: 23px; flex-shrink: 0; }

/* Counter */
.ticker {
    position: fixed;
    bottom: 24px; right: 24px;
    z-index: 800;
    background: rgba(10, 8, 6, 0.85);
    border: 1px solid rgba(237, 228, 211, 0.15);
    padding: 12px 18px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px; letter-spacing: 0.2em;
    color: var(--paper); text-align: right;
    text-transform: uppercase;
}
.ticker-num {
    font-size: 24px;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0;
    text-transform: none;
}

.status-overlay {
    position: fixed; inset: 0; z-index: 3000;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg);
    transition: opacity 0.4s ease;
}
.status-overlay.hidden { opacity: 0; pointer-events: none; }
.status-line {
    color: var(--gold);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

/* ============================================================
 * EXPLORATION DISCOVERIES
 * ============================================================ */
.survey-grid-overlay {
    position: fixed;
    inset: 0;
    z-index: 650;
    pointer-events: none;
    opacity: 0.26;
    background-image:
        linear-gradient(rgba(184, 149, 86, 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(184, 149, 86, 0.18) 1px, transparent 1px);
    background-size: 72px 72px;
}
.surveyor-panel,
.route-panel,
.atlas-discovery {
    position: fixed;
    z-index: 920;
    width: min(360px, calc(100vw - 56px));
    padding: 16px 18px 17px;
    border: 1px solid rgba(184, 149, 86, 0.42);
    background: rgba(10, 8, 6, 0.94);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
    color: var(--paper);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.surveyor-panel { top: 158px; right: 28px; }
.route-panel { right: 28px; bottom: 24px; }
.atlas-discovery { top: 118px; left: 28px; }
.discovery-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.discovery-kicker {
    color: var(--gold);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.22em;
    line-height: 1.2;
    text-transform: uppercase;
}
.discovery-close {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid rgba(237, 228, 211, 0.28);
    background: transparent;
    color: var(--paper-dim);
    font-family: Georgia, serif;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
.discovery-close:hover,
.discovery-close:focus-visible { border-color: var(--gold); color: var(--paper); outline: none; }
.surveyor-readout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 12px 0;
    border-top: 1px solid rgba(237, 228, 211, 0.12);
    border-bottom: 1px solid rgba(237, 228, 211, 0.12);
}
.surveyor-readout span {
    display: block;
    margin-bottom: 4px;
    color: var(--gold);
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.surveyor-readout strong {
    color: var(--paper);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 400;
}
.surveyor-status {
    margin-top: 13px;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.surveyor-panel p,
.route-panel p,
.atlas-discovery p {
    margin: 8px 0 0;
    color: var(--paper-dim);
    font-size: 15px;
    line-height: 1.45;
}
.route-panel h2,
.atlas-discovery h2 {
    margin: 0;
    color: var(--paper);
    font-size: 26px;
    font-weight: 500;
    line-height: 1.05;
}
.route-type {
    margin-top: 7px;
    color: var(--gold);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.route-panel a {
    display: inline-block;
    margin-top: 12px;
    color: var(--gold);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}
.route-panel a:hover { color: var(--paper); }
.route-clear {
    display: block;
    margin-top: 14px;
    padding: 6px 0;
    border: 0;
    background: none;
    color: var(--paper-dim);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
}
.route-clear:hover,
.route-clear:focus-visible { color: var(--paper); outline: none; }
.discovery-stamps {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 14px;
}
.discovery-stamp {
    padding: 5px 7px;
    border: 1px solid rgba(184, 149, 86, 0.5);
    color: var(--gold);
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ============================================================
 * SINGLE SITE ARTICLE PAGE
 * ============================================================ */
.site-article {
    background: var(--bg);
    color: var(--paper);
    min-height: 100vh;
    padding-bottom: 80px;
}

.site-hero {
    position: relative;
    height: 70vh;
    min-height: 460px;
    max-height: 780px;
    overflow: hidden;
}
.site-hero-img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.site-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(20, 17, 13, 0.45) 0%,
        rgba(20, 17, 13, 0.15) 30%,
        rgba(20, 17, 13, 0.5) 75%,
        var(--bg) 100%
    );
}
.site-hero-credit {
    position: absolute;
    bottom: 14px; right: 18px;
    z-index: 2;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.05em;
    color: rgba(237, 228, 211, 0.65);
    background: rgba(10, 8, 6, 0.55);
    padding: 4px 8px;
    backdrop-filter: blur(4px);
    max-width: 60%;
    text-align: right;
    line-height: 1.4;
}

.site-article-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 28px;
}

.site-article-header {
    margin-top: -120px;
    position: relative;
    z-index: 2;
    margin-bottom: 32px;
}
.site-article:not(:has(.site-hero)) .site-article-header { margin-top: 130px; }

.site-cat-tag {
    display: inline-flex;
    align-items: center; gap: 8px;
    padding: 6px 10px 5px 8px;
    border-left: 2px solid var(--cat-color, var(--gold));
    border-radius: 1px;
    background: rgba(20, 17, 13, 0.72);
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(3px);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 14px;
}
.site-cat-dot {
    display: inline-block;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--cat-color, var(--gold));
    border: 1px solid rgba(255,255,255,0.18);
}

.site-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 600;
    line-height: 1.05;
    color: var(--paper);
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}
.site-loc {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--paper-dim);
}

.site-meta-panel {
    display: flex; flex-wrap: wrap; gap: 0;
    border-top: 1px solid rgba(237, 228, 211, 0.15);
    border-bottom: 1px solid rgba(237, 228, 211, 0.15);
    padding: 18px 0;
    margin-bottom: 32px;
}
.site-meta-item {
    flex: 1;
    min-width: 140px;
    padding: 0 18px;
    border-right: 1px solid rgba(237, 228, 211, 0.1);
}
.site-meta-item:first-child { padding-left: 0; }
.site-meta-item:last-child { border-right: none; padding-right: 0; }
.site-meta-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px; letter-spacing: 0.25em; text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 4px;
}
.site-meta-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    color: var(--paper);
}

.site-summary {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-style: italic;
    line-height: 1.45;
    color: var(--paper);
    margin: 0 0 36px;
    padding: 0 0 0 22px;
    border-left: 2px solid var(--accent);
}

.site-content {
    font-family: 'Cormorant Garamond', serif;
    font-size: 19px;
    line-height: 1.7;
    color: var(--paper-dim);
}
.site-content p { margin: 0 0 1.2em; }
.site-content h2,
.site-content h3,
.site-content h4 {
    color: var(--paper);
    font-weight: 600;
    margin: 2em 0 0.6em;
    line-height: 1.2;
}
.site-content h2 { font-size: 32px; }
.site-content h3 { font-size: 24px; }
.site-content h4 { font-size: 20px; }
.site-content a {
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid rgba(184, 149, 86, 0.4);
}
.site-content a:hover { color: var(--accent); border-color: var(--accent); }
.site-content blockquote {
    border-left: 3px solid var(--accent);
    margin: 24px 0;
    padding: 4px 0 4px 20px;
    color: var(--paper);
    font-style: italic;
}
.site-content img { max-width: 100%; height: auto; margin: 24px 0; }
.site-content figure { margin: 24px 0; }
.site-content figcaption {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px; letter-spacing: 0.05em;
    color: var(--paper-dim);
    margin-top: 6px;
}
.site-content ul,
.site-content ol { margin: 0 0 1.2em 24px; }
.site-content li { margin-bottom: 0.5em; }
.site-content-empty { color: var(--paper-dim); font-style: italic; }

.site-marginal-note {
    margin-top: 42px;
    padding: 17px 20px 18px;
    border-left: 2px solid var(--gold);
    background: rgba(184, 149, 86, 0.055);
}
.site-marginal-note-label {
    margin-bottom: 8px;
    color: var(--gold);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}
.site-marginal-note p {
    margin: 0 0 9px;
    color: var(--paper);
    font-size: 17px;
    line-height: 1.5;
}
.site-marginal-note cite {
    color: var(--paper-dim);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-style: normal;
    letter-spacing: 0.04em;
}
.site-marginal-note a { color: var(--gold); }

/* ============================================================
 * SOCIAL SHARE — atlas-style cartouche icons
 * ============================================================ */
.site-share {
    margin: 56px 0 0;
    padding: 24px 0;
    border-top: 1px solid rgba(237, 228, 211, 0.15);
    border-bottom: 1px solid rgba(237, 228, 211, 0.15);
}
.site-share-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 16px;
}
.site-share-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    align-items: center;
}
.al-share {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 64px;
    color: var(--paper-dim);
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.25s ease, transform 0.25s ease;
}
.al-share svg {
    width: 44px;
    height: 44px;
    display: block;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.al-share:hover {
    color: var(--gold);
    transform: translateY(-2px);
}
.al-share:hover svg {
    transform: rotate(15deg);
}
.al-share-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* ============================================================
 * INSET MAP
 * ============================================================ */
.site-inset-map-wrap { margin: 48px 0 0; }
.site-inset-map-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 12px;
}
.site-inset-map {
    width: 100%; height: 320px;
    background: #1a1612;
    border: 1px solid rgba(237, 228, 211, 0.12);
}

.site-back-nav {
    margin-top: 56px;
    padding-top: 28px;
    border-top: 1px solid rgba(237, 228, 211, 0.1);
}
.back-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--gold);
    text-decoration: none;
}
.back-link:hover { color: var(--accent); }

/* ============================================================
 * GENERIC FALLBACK
 * ============================================================ */
.generic-main { padding: 130px 28px 60px; }
.generic-inner { max-width: 760px; margin: 0 auto; }
.generic-article h1 a { color: var(--paper); text-decoration: none; }
.generic-article h1 a:hover { color: var(--gold); }

/* ============================================================
 * COMING SOON
 * ============================================================ */
.coming-soon-main {
    min-height: 100vh;
    padding: 170px 28px 90px;
    background:
        radial-gradient(circle at 78% 18%, rgba(184, 149, 86, 0.12), transparent 32rem),
        linear-gradient(135deg, #17120d 0%, #0f0d0b 52%, #1a1510 100%);
}
.coming-soon-inner {
    max-width: 1040px;
    margin: 0 auto;
}
.coming-soon-kicker {
    margin: 0 0 18px;
    color: var(--gold);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}
.coming-soon-main h1 {
    max-width: 760px;
    margin: 0;
    color: var(--paper);
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(46px, 8vw, 88px);
    font-weight: 500;
    line-height: 0.98;
    letter-spacing: -0.025em;
}
.coming-soon-intro {
    max-width: 640px;
    margin: 30px 0 0;
    color: var(--paper-dim);
    font-size: 22px;
    line-height: 1.45;
}
.coming-soon-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 62px;
}
.coming-soon-card {
    min-height: 190px;
    padding: 22px 22px 20px;
    border: 1px solid rgba(237, 228, 211, 0.16);
    background: rgba(10, 8, 6, 0.38);
}
.coming-soon-number {
    display: block;
    margin-bottom: 28px;
    color: var(--gold);
    font-family: 'JetBrains Mono', monospace;
    font-size: 23px;
    letter-spacing: 0.08em;
}
.coming-soon-card h2 {
    margin: 0 0 7px;
    color: var(--paper);
    font-size: 26px;
    font-weight: 500;
}
.coming-soon-card p {
    margin: 0;
    color: var(--paper-dim);
    font-size: 16px;
    line-height: 1.4;
}
.coming-soon-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 42px;
    padding-top: 22px;
    border-top: 1px solid rgba(237, 228, 211, 0.14);
}
.coming-soon-footer p {
    max-width: 560px;
    margin: 0;
    color: var(--paper-dim);
    font-size: 17px;
}
.coming-soon-link {
    flex: 0 0 auto;
    padding: 12px 16px;
    border: 1px solid rgba(184, 149, 86, 0.62);
    color: var(--gold);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-decoration: none;
    text-transform: uppercase;
}
.coming-soon-link:hover,
.coming-soon-link:focus-visible {
    border-color: var(--paper);
    color: var(--paper);
}

/* ============================================================
 * MOBILE
 * ============================================================ */
@media (max-width: 720px) {
    .site-header {
        display: grid;
        grid-template-columns: 1fr;
        min-height: 88px;
        padding: 8px 12px 9px;
        gap: 5px;
    }
    .brand { font-size: 20px; }
    .brand-logo,
    .custom-logo { width: 42px; height: 42px; }
    .brand-link { gap: 7px; }
    .tagline { display: none; }

    .site-nav { width: 100%; margin-left: 0; }
    .site-nav .menu {
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 17px;
    }
    .site-nav .menu a {
        font-size: 9px;
        letter-spacing: 0.14em;
        padding: 4px 0 3px;
        white-space: nowrap;
    }

    .atlas-controls {
        top: 126px;
        right: 14px;
    }
    .filter-menu-panel { right: 0; }
    .filter-btn { padding: 6px 9px; font-size: 8px; }

    .legend { bottom: 14px; left: 14px; }
    .legend-panel { width: min(226px, calc(100vw - 28px)); padding: 10px 12px 12px; }
    .ticker { bottom: 14px; right: 14px; padding: 8px 12px; }
    .ticker-num { font-size: 18px; }

    .surveyor-panel,
    .route-panel,
    .atlas-discovery { width: calc(100vw - 28px); padding: 14px; }
    .surveyor-panel { top: 166px; right: 14px; }
    .route-panel { right: 14px; bottom: 14px; }
    .atlas-discovery { top: 112px; left: 14px; }
    .surveyor-readout { gap: 7px; }
    .surveyor-readout strong { font-size: 10px; }

    .leaflet-popup-content { width: 270px !important; }
    .leaflet-control-zoom { margin-top: 130px !important; }

    .site-article-inner { padding: 0 18px; }
    .site-article-header { margin-top: -90px; }
    .site-meta-panel {
        display: grid;
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr) minmax(0, 1fr);
        gap: 0;
        padding: 14px 0;
    }
    .site-meta-item {
        min-width: 0;
        padding: 0 9px;
        border-right: 1px solid rgba(237, 228, 211, 0.1);
        border-bottom: none;
    }
    .site-meta-item:first-child { padding-left: 0; }
    .site-meta-item:last-child { border-right: none; padding-right: 0; }
    .site-meta-label {
        margin-bottom: 5px;
        font-size: 8px;
        letter-spacing: 0.16em;
    }
    .site-meta-value {
        font-size: 15px;
        line-height: 1.15;
        overflow-wrap: anywhere;
    }
    .site-summary { font-size: 18px; padding-left: 16px; }
    .site-content { font-size: 17px; }

    .coming-soon-main { padding: 130px 18px 60px; }
    .coming-soon-intro { font-size: 19px; }
    .coming-soon-grid { grid-template-columns: 1fr; margin-top: 40px; }
    .coming-soon-card { min-height: 0; }
    .coming-soon-number { margin-bottom: 18px; }
    .coming-soon-footer { align-items: flex-start; flex-direction: column; }

    .content-main { padding: 132px 18px 60px; }
    .content-body { font-size: 18px; }

    .site-footer-inner { padding: 42px 18px 20px; }
    .site-footer-grid { grid-template-columns: 1fr 1fr; gap: 34px 24px; padding-bottom: 36px; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-easter-egg { padding: 16px 0 14px; }
    .footer-quote-wrap { grid-template-columns: 24px minmax(0, 1fr); gap: 7px; }
    .footer-quote-mark { font-size: 37px; }
    .footer-quote { font-size: 18px; }
    .footer-quote-meta { align-items: center; gap: 10px; margin-left: 31px; }
    .footer-quote-credit { max-width: 100%; font-size: 10px; }
    .site-footer-bottom { align-items: flex-start; flex-direction: column; gap: 8px; }

    .site-share-icons { gap: 12px; }
    .al-share { width: 54px; }
    .al-share svg { width: 38px; height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
    .pin-svg,
    .footer-quote,
    .footer-quote-credit,
    .al-share,
    .al-share svg { transition: none !important; }
}
