:root {
    --surface: #f7f9fb;
    --paper: #fff;
    --paper-muted: #f0f2f4;
    --ink: #191c1e;
    --muted: #665552;
    --line: #e7c7c3;
    --heat: #a80712;
    --heat-dark: #670007;
    --cold: #3156c8;
    --focus: #2448b8;
    --shadow: 0 16px 45px rgba(69, 10, 10, .07);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--surface);
    font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body { margin: 0; min-width: 320px; background: var(--surface); }
button, input, select { font: inherit; }
a { color: inherit; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 18px; font-size: clamp(2.2rem, 5vw, 4.4rem); line-height: .98; letter-spacing: -.045em; }
h2 { margin-bottom: 0; font-size: clamp(1.35rem, 2vw, 1.8rem); line-height: 1.15; }
#page-title { font-size: clamp(2.65rem, 3.7vw, 3.65rem); white-space: nowrap; }

.skip-link { position: fixed; left: 16px; top: -80px; z-index: 1000; padding: 10px 14px; background: var(--ink); color: #fff; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute!important; width: 1px!important; height: 1px!important; padding: 0!important; margin: -1px!important; overflow: hidden!important; clip: rect(0,0,0,0)!important; white-space: nowrap!important; border: 0!important; }

.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); }
.header-inner { position: relative; width: min(1440px, 100%); height: 78px; margin: auto; padding: 11px 24px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 22px; }
.brand { min-width: 0; display: flex; align-items: center; justify-self: start; text-decoration: none; }
.brand img { display: block; width: 240px; height: auto; }
.header-actions { grid-column: 3; height: 100%; justify-self: end; display: flex; align-items: center; gap: 0; }
.header-inner > nav { margin-left: auto; }
.header-inner nav { height: 100%; display: flex; align-self: stretch; gap: 22px; }
.header-inner nav a { display: grid; place-items: center; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.header-inner nav a:hover, .header-inner nav a.active { color: var(--heat); border-color: var(--heat); }
.icon-link { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--muted); border-radius: 50%; text-decoration: none; font-weight: 700; }

.page-shell { width: min(1440px, 100%); margin: auto; padding: 32px 24px 72px; }
.breadcrumbs { margin: -8px 0 24px; display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: .72rem; }
.breadcrumbs a { text-underline-offset: 2px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 36px; margin-bottom: 22px; }
.hero > div:first-child { flex: 1; max-width: 900px; }
.eyebrow { margin-bottom: 7px; color: var(--heat); font-size: .72rem; font-weight: 800; letter-spacing: .095em; text-transform: uppercase; }
.search-wrap { position: relative; max-width: 630px; }
.search-wrap > svg { position: absolute; left: 15px; top: 14px; width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.search-wrap input { width: 100%; height: 48px; padding: 0 18px 0 46px; border: 1px solid transparent; border-radius: 4px; background: var(--paper-muted); color: var(--ink); }
.search-wrap input:focus { outline: 3px solid color-mix(in srgb, var(--focus) 25%, transparent); border-color: var(--focus); background: #fff; }
.header-search { position: relative; grid-column: 2; width: min(570px, 100%); justify-self: center; }
.header-search > svg { left: 12px; top: 9px; width: 18px; height: 18px; }
.header-search input { height: 36px; padding-left: 39px; background: #fff; border-color: #e1e3e5; }
.header-search .search-results { top: 40px; left: 50%; right: auto; width: min(700px, calc(100vw - 32px)); transform: translateX(-50%); }
.search-results { position: absolute; top: 52px; left: 0; right: 0; z-index: 60; max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 4px; background: #fff; box-shadow: var(--shadow); }
.search-result { width: 100%; padding: 12px 14px; display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); align-items: center; gap: 24px; border: 0; border-bottom: 1px solid #eee; background: #fff; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer; }
.search-result:hover, .search-result:focus { background: #fff4f2; outline: none; }
.search-result strong, .search-result small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result small { color: var(--muted); }
.location-meta { min-width: 310px; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px 10px; color: var(--muted); font-size: .83rem; text-align: right; }
.location-meta strong { color: var(--heat); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.location-meta > span:last-child { flex-basis: 100%; }
.badge { padding: 5px 8px; border-radius: 3px; background: #ececee; color: #4b3d3a; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .72rem; }

.card { border: 1px solid var(--line); border-radius: 5px; background: var(--paper); box-shadow: 0 1px 0 rgba(255,255,255,.8); }
.legend { flex: 1; max-width: 720px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .73rem; }
.legend i { flex: 1; height: 13px; border-radius: 8px; background: linear-gradient(90deg,#264ec5,#bcc8ff,#fff,#f7d794,#e96b56,#a80712,#3f0003); }
.card-heading.heatmap-heading { align-items: flex-end; }
.heatmap-hint { flex: 0 0 auto; padding-bottom: 2px; text-align: right; white-space: nowrap; }

.heatmap-card { position: relative; overflow: hidden; margin-bottom: 16px; }
.card-heading { min-height: 72px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: #f1f2f4; }
.card-heading.compact { min-height: auto; padding: 0 0 18px; border: 0; background: transparent; }
.hint { margin: 0; color: var(--muted); font-size: .78rem; }
.heatmap-scroll { width: 100%; overflow-x: auto; padding: 12px 22px 7px; }
.heatmap-footer { padding: 7px 22px 16px; display: flex; justify-content: center; }
.heatmap-footer[hidden] { display: none; }
.heatmap-legend { width: min(720px, 100%); max-width: 720px; flex: 0 1 720px; }
#heatmap { display: block; min-width: 1120px; margin: 0; cursor: crosshair; }
#heatmap:focus-visible { outline: 3px solid var(--focus); outline-offset: -2px; }
.loading { padding: 70px 20px; color: var(--muted); text-align: center; }
.tooltip { position: fixed; z-index: 100; min-width: 170px; padding: 9px 11px; pointer-events: none; border: 1px solid #4d3a37; border-radius: 3px; background: rgba(25,28,30,.96); color: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.18); font-size: .75rem; line-height: 1.45; }
.tooltip-metric { display: flex; align-items: center; gap: 7px; }
.tooltip-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; }
.tooltip-dot.summer { background: #f39a14; }
.tooltip-dot.hot { background: #d51e2b; }
.tooltip-dot.temperature { background: #4d73e6; }
.data-table-wrap { border-top: 1px solid var(--line); }
.data-table-wrap summary { padding: 12px 18px; color: var(--heat); font-size: .78rem; font-weight: 700; cursor: pointer; }
.table-scroll { max-height: 430px; overflow: auto; border-top: 1px solid var(--line); }
.table-scroll table { width: 100%; border-collapse: collapse; font-size: .76rem; }
.table-scroll caption { padding: 12px; text-align: left; font-weight: 700; }
.table-scroll th, .table-scroll td { padding: 8px 12px; border-bottom: 1px solid #ece3e1; text-align: right; white-space: nowrap; }
.table-scroll th:first-child, .table-scroll td:first-child { position: sticky; left: 0; background: #fff; text-align: left; }
.table-scroll thead th { position: sticky; top: 0; z-index: 1; background: #f1f2f4; }
.table-scroll thead th:first-child { z-index: 2; background: #f1f2f4; }

.detail-grid { display: block; margin-bottom: 16px; }
.trend-card { padding: 22px; }
.chart-legend { display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: 12px; color: var(--muted); font-size: .7rem; white-space: nowrap; }
.chart-legend span, .chart-legend button { display: flex; align-items: center; gap: 5px; }
.chart-legend i { width: 18px; height: 3px; background: var(--heat); }
.chart-legend i.summer { background: #d87900; }
.chart-legend i.hot { background: #a80712; }
.chart-legend i.temperature { background: #3156c8; }
.chart-legend i.projection { height: 0; border-top: 2px dashed var(--muted); background: transparent; }
.trend-chart-legend { margin: 10px 0 0; padding: 9px 0; justify-content: center; border-top: 1px solid #ece3e1; border-bottom: 1px solid #ece3e1; }
.metric-toggle { padding: 1px 2px; border: 0; border-radius: 2px; background: transparent; color: inherit; font-size: inherit; white-space: nowrap; cursor: pointer; }
.metric-toggle:hover { color: var(--ink); }
.metric-toggle[aria-pressed="false"] { opacity: .34; }
.metric-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.trend-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 2px 0 14px; }
.trend-summary div { min-width: 0; padding: 10px 12px; display: grid; gap: 3px; background: var(--paper-muted); }
.trend-summary span { color: var(--muted); font-size: .68rem; }
.trend-summary strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; }
.trend-summary small { color: var(--heat); font-weight: 800; }
#trend-chart { display: block; width: 100%; height: auto; overflow: visible; cursor: crosshair; }
.tooltip small { display: block; margin-top: 5px; padding-top: 5px; border-top: 1px solid rgba(255,255,255,.25); color: #f6d5cf; }
.chart-note { margin: 8px 0 0; color: var(--muted); font-size: .77rem; line-height: 1.5; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.info-card { padding: 26px; }
.info-card h2 { margin-bottom: 14px; }
.info-card p { color: var(--muted); line-height: 1.65; }
.text-link { color: var(--heat); font-weight: 700; text-underline-offset: 3px; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--heat); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.place-info-card { display: grid; grid-template-columns: minmax(0,1fr) 150px; gap: 26px; align-items: center; }
.locator-map { margin: 0; text-align: center; }
.locator-map-graphic { position: relative; width: 112px; margin: 0 auto; }
.locator-map-graphic img { display: block; width: 100%; height: auto; }
.locator-map-graphic i { position: absolute; left: var(--map-x); top: var(--map-y); width: 11px; height: 11px; border: 2px solid #fff; border-radius: 50%; background: var(--heat); box-shadow: 0 0 0 2px rgba(168,7,18,.28); transform: translate(-50%,-50%); }
.locator-map figcaption { margin-top: 7px; color: var(--muted); font-size: .66rem; }
.climate-info-card { display: flex; flex-direction: column; }
.info-actions { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.no-script { margin-top: 16px; padding: 18px; }

.site-footer { border-top: 1px solid var(--line); background: #f1f2f4; }
.site-footer > div { width: min(1440px,100%); margin: auto; padding: 22px 24px; display: flex; align-items: center; gap: 28px; font-size: .72rem; }
.site-footer > div > span { color: var(--muted); }
.site-footer nav { min-width: 0; margin-left: auto; display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: 16px; overflow-x: auto; white-space: nowrap; }
.footer-link { padding: 0; border: 0; background: transparent; color: inherit; font-size: inherit; text-decoration: underline; cursor: pointer; }

.legal-page { max-width: 860px; }
.legal-page .card { padding: clamp(24px,5vw,54px); }
.legal-page h1 { font-size: clamp(2.2rem,5vw,3.6rem); }
.legal-page h2 { margin: 32px 0 10px; }
.legal-page p, .legal-page li { color: var(--muted); line-height: 1.7; }
.legal-page h3 { margin: 24px 0 8px; font-family: Georgia, serif; }
.legal-page code { padding: 1px 4px; background: var(--paper-muted); }
.legal-updated { margin-top: 34px; font-size: .78rem; }
.placeholder { padding: 15px; border: 2px dashed var(--heat); background: #fff3f1; color: var(--heat)!important; font-weight: 400; }
.analytics-optout { margin-top: 18px; padding: 16px; border: 1px solid var(--line); background: var(--paper-muted); }
.analytics-optout p { margin-bottom: 12px; }
.analytics-optout button { margin: 0 8px 8px 0; padding: 9px 12px; border: 1px solid var(--heat); border-radius: 3px; background: #fff; color: var(--heat); cursor: pointer; }
.analytics-optout button:first-of-type { background: var(--heat); color: #fff; }
#klimaentwicklung, #hoechsttemperaturen, #auswertung, #bundeslaender { scroll-margin-top: 94px; }

#klaro .cookie-modal .cm-modal.cm-klaro, #klaro .cookie-notice { background: #fff; color: var(--ink); box-shadow: 0 18px 55px rgba(44,27,25,.2); }
#klaro .cookie-modal .cm-modal p, #klaro .cookie-notice p, #klaro .cookie-modal .cm-list-title { color: var(--muted); }
#klaro .cookie-modal .cm-modal h1, #klaro .cookie-modal .cm-modal h2, #klaro .cookie-notice h1, #klaro .cookie-notice h2 { color: var(--ink); }
#klaro .cookie-modal .cm-modal .cm-header, #klaro .cookie-modal .cm-modal .cm-footer, #klaro .cookie-modal .cm-toggle-all { border-color: #e4d8d6; }
#klaro .cookie-modal .cm-modal .hide svg { stroke: var(--muted); }
#klaro .cm-bg { background: rgba(25,28,30,.36); }
#klaro .cm-btn { min-height: 40px; padding: 8px 13px; border: 1px solid transparent; font-weight: 700; }
#klaro .cm-btn-success { background: var(--heat); }
#klaro .cm-btn-info, #klaro .cm-btn-danger { border-color: #b8a8a5; background: #fff; color: var(--ink); }
#klaro .cm-list-label .slider { background: #cfd4d8!important; box-shadow: inset 0 0 0 1px #aeb6bc; }
#klaro .cm-list-label .slider::before { background: #fff!important; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
#klaro .cm-list-input:checked + .cm-list-label .slider { background: #2f7d5a!important; box-shadow: inset 0 0 0 1px #236247; }

.home-hero { max-width: 1050px; margin: 20px auto 54px; text-align: center; }
.home-hero h1 { font-size: clamp(3rem,7vw,6.4rem); }
.home-hero > p:not(.eyebrow) { max-width: 760px; margin: 0 auto 26px; color: var(--muted); font-family: Georgia, serif; font-size: 1.2rem; line-height: 1.55; }
.home-search { max-width: 760px; margin: 0 auto; text-align: left; }
.home-search input { height: 58px; border-color: var(--line); background: #fff; font-size: 1.05rem; box-shadow: var(--shadow); }
.home-search > svg { top: 19px; }
.home-search .search-results { top: 62px; }
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 46px; }
.directory-section { margin: 42px 0; scroll-margin-top: 82px; }
.section-heading { max-width: 780px; margin-bottom: 18px; }
.section-heading h2 { margin-bottom: 8px; }
.section-heading > p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
.region-grid, .place-link-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.directory-card { min-width: 0; padding: 15px 16px; display: grid; gap: 5px; border: 1px solid var(--line); border-radius: 4px; background: #fff; text-decoration: none; }
.directory-card:hover, .directory-card:focus-visible { border-color: var(--heat); background: #fff8f6; outline: none; }
.directory-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: Georgia, serif; }
.directory-card span { overflow: hidden; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.directory-more { margin-top: 16px; }
.directory-hero { max-width: 900px; margin-bottom: 38px; }
.deutschland-hero { max-width: 1050px; }
.directory-hero > p:not(.eyebrow) { color: var(--muted); font-family: Georgia, serif; font-size: 1.05rem; line-height: 1.6; }
.place-directory { grid-template-columns: repeat(5,minmax(0,1fr)); }

@media (max-width: 1340px) {
    .site-header:not(.site-header-no-search) .header-inner nav { display: none; }
}

@media (max-width: 900px) {
    #page-title { white-space: normal; }
    .header-inner { grid-template-columns: auto minmax(0,1fr); }
    .header-search { grid-column: 2; width: 100%; max-width: 450px; }
    .header-actions { display: none; }
    .hero { align-items: stretch; flex-direction: column; }
    .location-meta { min-width: 0; justify-content: flex-start; text-align: left; }
    .legend { max-width: none; width: 100%; }
    .info-grid { grid-template-columns: 1fr; }
    .home-grid { grid-template-columns: 1fr; }
    .region-grid, .place-link-grid, .place-directory { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .site-footer > div { flex-direction: column; text-align: center; }
    .site-footer nav { width: 100%; margin-left: 0; justify-content: center; }
}

@media (min-width: 901px) {
    .state-directory-hero h1 { max-width: none; white-space: nowrap; font-size: clamp(2.2rem, 4vw, 4.2rem); }
}

@media (max-width: 520px) {
    .page-shell { padding: 24px 12px 56px; }
    .header-inner { height: 70px; padding: 9px 14px; }
    .brand { font-size: 1.05rem; }
    .brand img { width: 150px; }
    .header-inner { gap: 9px; }
    .header-actions { gap: 0; }
    .header-search { min-width: 0; }
    .header-search input { padding-right: 8px; }
    .header-search input::placeholder { color: transparent; }
    .card-heading { align-items: flex-start; flex-direction: column; }
    .card-heading.compact { flex-direction: row; }
    .trend-card { padding: 17px; }
    .trend-card .card-heading.compact { align-items: flex-start; flex-direction: column; }
    .chart-legend { width: 100%; justify-content: flex-start; overflow-x: auto; }
    .heatmap-hint { width: 100%; text-align: left; }
    .trend-summary { grid-template-columns: 1fr; }
    .place-info-card { grid-template-columns: 1fr; }
    .locator-map { display: none; }
    .region-grid, .place-link-grid, .place-directory { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .site-header-no-search .header-inner nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: .01ms!important; transition-duration: .01ms!important; }
}
