:root {
    color-scheme: dark;
    --body-bg: #101316;
    --panel-bg: #181d21;
    --panel-deep: #111619;
    --border: #303840;
    --border-light: #3a454d;
    --text: #e7edf2;
    --muted: #89959e;
    --accent: #d7a452;
    --accent-border: #c99a4d;
    --primary-bg: #6d5228;
    --primary-border: #96743b;
    --shadow: 0 18px 50px rgb(0 0 0 / 24%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    min-width: 280px;
    margin: 0;
    background: radial-gradient(circle at 78% 0%, rgb(109 82 40 / 13%), transparent 34rem), var(--body-bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.65;
}

a { color: var(--accent); }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip-link {
    position: fixed;
    z-index: 20;
    top: 8px;
    left: 8px;
    padding: 8px 12px;
    transform: translateY(-150%);
    border: 1px solid var(--accent-border);
    border-radius: 6px;
    background: var(--panel-deep);
}

.skip-link:focus { transform: none; }

.site-header, .site-footer, main {
    width: min(1120px, calc(100% - 40px));
    margin-inline: auto;
}

.site-header {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--border);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
}

.brand img { border-radius: 7px; }
.brand span { display: grid; line-height: 1.1; }
.brand strong { font-size: 13px; letter-spacing: .12em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 9px; letter-spacing: .13em; }

.header-actions, .site-footer nav { display: flex; align-items: center; gap: 18px; }
.calculator-link, .site-footer nav a { color: var(--muted); font-size: 12px; font-weight: 600; text-decoration: none; }
.calculator-link:hover, .calculator-link:focus-visible,
.site-footer nav a:hover, .site-footer nav a:focus-visible { color: var(--accent); }

.language-picker { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 600; }
.language-picker select {
    max-width: 160px;
    min-height: 34px;
    padding: 6px 30px 6px 9px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--panel-deep);
    color: var(--text);
    font: inherit;
    cursor: pointer;
}
.language-picker select:hover { border-color: var(--accent-border); }
.language-picker select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

main { padding: 30px 0 72px; }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 11px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }

.map-hero {
    margin-top: 22px;
    padding: clamp(24px, 4vw, 44px);
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(380px, 1.05fr);
    align-items: center;
    gap: clamp(28px, 4vw, 48px);
    overflow: hidden;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: linear-gradient(145deg, rgb(215 164 82 / 9%), transparent 42%), var(--panel-bg);
    box-shadow: var(--shadow);
}

.eyebrow { margin: 0 0 12px; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .18em; }
h1, h2, p { overflow-wrap: anywhere; }
h1 { max-width: 760px; margin: 0; font-size: clamp(32px, 5vw, 55px); letter-spacing: -.035em; line-height: 1.05; }
.map-hero-lead { max-width: 720px; margin: 20px 0 0; color: #bac3ca; font-size: clamp(15px, 2vw, 18px); line-height: 1.65; }
.map-hero-actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }

.primary-cta {
    min-height: 42px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
}

.primary-cta { border-color: var(--primary-border); background: var(--primary-bg); color: #fff; }
.primary-cta:hover, .primary-cta:focus-visible { border-color: var(--accent); background: #7c5d2e; }
.primary-cta.compact { width: 100%; }

.map-hero-side { min-width: 0; display: grid; gap: 14px; }
.map-hero-media {
    position: relative;
    aspect-ratio: 16 / 9;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgb(215 164 82 / 42%);
    border-radius: 8px;
    background: var(--panel-deep);
    box-shadow: 0 16px 34px rgb(0 0 0 / 28%);
}
.map-hero-media img { width: 100%; height: 100%; display: block; object-fit: cover; }
.map-hero-media figcaption {
    position: absolute;
    right: 8px;
    bottom: 8px;
    max-width: calc(100% - 16px);
    padding: 4px 7px;
    border-radius: 4px;
    background: rgb(13 16 18 / 82%);
    color: #d9e0e5;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.25;
}

.map-highlights { padding: 18px; border: 1px solid var(--border); border-radius: 8px; background: rgb(13 16 18 / 72%); }
.map-highlights p { margin: 0 0 10px; color: var(--text); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.map-highlights ul { margin: 0; padding: 0; display: grid; gap: 9px; list-style: none; }
.map-highlights li { position: relative; padding-left: 16px; color: #b6c0c7; font-size: 12px; line-height: 1.45; }
.map-highlights li::before { position: absolute; top: .62em; left: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); content: ""; }

.map-facts {
    margin-top: 18px;
    padding: 20px;
    display: grid;
    grid-template-columns: minmax(210px, .55fr) minmax(0, 1fr);
    align-items: center;
    gap: 24px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel-bg);
}
.map-facts .eyebrow { margin-bottom: 5px; }
.map-facts h2 { margin: 0; font-size: 16px; line-height: 1.35; }
.map-facts-intro > p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.map-facts dl {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--border);
}
.map-facts dl div { min-width: 0; padding: 11px 12px; background: var(--panel-deep); }
.map-facts dt { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.map-facts dd { margin: 3px 0 0; color: var(--text); font-size: 12px; font-weight: 650; line-height: 1.35; }

.map-page-grid { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: 42px; }
.map-guide { min-width: 0; }
.map-guide-section { scroll-margin-top: 20px; }
.map-guide-section + .map-guide-section { margin-top: 34px; padding-top: 34px; border-top: 1px solid var(--border); }
.map-guide-section h2, .map-page-aside h2 { margin: 0; color: var(--text); font-size: 19px; letter-spacing: -.012em; line-height: 1.35; }
.map-guide-section p, .map-page-aside p { margin: 12px 0 0; color: #aeb9c1; }
.map-guide-section p + p { margin-top: 11px; }

.map-page-aside { position: sticky; top: 20px; display: grid; gap: 16px; }
.map-page-aside section { padding: 20px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-bg); }
.map-page-aside h2 { font-size: 14px; }
.map-page-aside p { margin-bottom: 16px; font-size: 12px; line-height: 1.55; }
.related-maps { margin-top: 12px; display: grid; gap: 7px; }
.related-maps a { padding: 9px 10px; border: 1px solid var(--border); border-radius: 5px; color: var(--text); font-size: 12px; font-weight: 600; text-decoration: none; }
.related-maps a:hover, .related-maps a:focus-visible { border-color: var(--accent-border); color: var(--accent); }

.map-faq-item { border-bottom: 1px solid var(--border); }
.map-faq-item:last-child { border-bottom: 0; }
.map-faq-item summary { padding: 15px 24px 15px 0; color: var(--text); font-size: 13px; font-weight: 650; cursor: pointer; }
.map-faq-item p { margin: -4px 0 16px; font-size: 13px; }
.map-sources ul { margin: 13px 0 0; padding-left: 18px; display: grid; gap: 7px; }
.map-sources li { color: var(--muted); font-size: 12px; }
.map-sources a { font-weight: 600; text-underline-offset: 3px; }

.site-footer {
    padding: 28px 0 40px;
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 30px;
    border-top: 1px solid var(--border);
}

.site-footer strong { font-size: 12px; }
.site-footer p { max-width: 650px; margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }

@media (max-width: 800px) {
    .site-header, .site-footer, main { width: min(100% - 28px, 700px); }
    .map-hero { grid-template-columns: 1fr; }
    .map-facts { grid-template-columns: 1fr; }
    .map-page-grid { grid-template-columns: 1fr; }
    .map-page-aside { position: static; grid-row: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 540px) {
    .site-header { min-height: 62px; }
    .header-actions { gap: 9px; }
    .calculator-link { display: none; }
    .language-picker > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .language-picker select { max-width: 138px; }
    .brand small { display: none; }
    main { padding-top: 20px; }
    .map-hero { margin-top: 16px; padding: 24px 20px; }
    h1 { font-size: clamp(30px, 11vw, 42px); }
    .map-hero-actions { display: grid; }
    .map-facts dl { grid-template-columns: 1fr; }
    .map-page-grid { margin-top: 34px; gap: 28px; }
    .map-page-aside { grid-template-columns: 1fr; }
    .site-footer { flex-direction: column; }
}

@media (prefers-color-scheme: light) {
    :root {
        color-scheme: light;
        --body-bg: #eef1f3;
        --panel-bg: #f7f8f9;
        --panel-deep: #fff;
        --border: #cbd2d7;
        --border-light: #b9c2c8;
        --text: #20272c;
        --muted: #66727b;
        --shadow: 0 18px 50px rgb(40 50 56 / 10%);
    }
    body { background: radial-gradient(circle at 78% 0%, rgb(150 116 59 / 12%), transparent 34rem), var(--body-bg); }
    .map-hero-lead, .map-guide-section p, .map-page-aside p, .map-highlights li { color: #58646c; }
    .map-highlights { background: rgb(255 255 255 / 72%); }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
