:root {
    --ink: #283b30;
    --ink-soft: #536873;
    --paper: #fffdf8;
    --panel: #ffffff;
    --line: #dce3e2;
    --accent: #0f766e;
    --accent-dark: #095b56;
    --accent-pale: #e5f3f0;
    --compare: #6d5bd0;
    --compare-pale: #eeebff;
    --near: #e49a23;
    --brand: #f26739;
    --shadow: 0 10px 32px rgb(24 49 63 / 10%);
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
    background: var(--paper);
    color: var(--ink);
    font-size: 18px;
    line-height: 1.5;
}

button, input, select { font: inherit; }
a { color: inherit; }

.app-shell {
    display: grid;
    grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
    grid-template-areas: "views views" "panel map";
    grid-template-rows: auto minmax(0, 1fr);
    height: 100dvh;
    overflow: hidden;
}

.app-shell > .job-report-views { grid-area: views; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--paper); }
.job-report-views .job-report-home { display: inline-flex; align-items: center; gap: 7px; border: 0; padding: 3px 8px 3px 0; margin-right: 8px; }
.job-report-home img { width: 26px; height: 28px; }
.job-report-views button, .job-view-link { padding: 7px 12px; font-size: 14px; font-weight: 750; line-height: 1.35; border: 1px solid #cdd7ca; border-radius: 5px; color: var(--ink); background: var(--paper); cursor: pointer; }
.job-report-views button:hover, .job-view-link:hover { border-color: var(--ink); }
.job-report-views button[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.job-report-views button:focus-visible, .job-view-link:focus-visible { outline: 2px solid #c6522b; outline-offset: 2px; }
.job-view-actions { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; flex-wrap: wrap; }
.job-data-panel { grid-area: 2 / 1 / 3 / -1; min-width: 0; overflow: auto; padding: clamp(20px, 4vw, 52px); }
.job-data-inner { max-width: 1100px; margin: 0 auto; }
.job-data-scope { color: var(--ink-soft); margin: 8px 0 24px; }
.job-data-context { margin-top: 28px; font-size: .85rem; }
.job-data-panel .selection-prompt { display: grid; justify-items: start; }
.job-data-panel .selection-prompt button { margin-top: 10px; }
.job-total-chart { padding: 18px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.job-total-chart h2 { margin: 0 0 14px; font-size: 1.12rem; }
.job-total-chart ul { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
.job-total-chart li > div:first-child { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 4px; }
.job-total-track { height: 10px; border-radius: 5px; overflow: hidden; background: #edf2ed; }
.job-total-track i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.job-total-chart .is-secondary i { background: var(--compare); }
.job-view-heatmap .leaflet-isochrone-primary-pane,
.job-view-heatmap .leaflet-isochrone-secondary-pane,
.job-view-heatmap .leaflet-selected-origins-pane { display: none; }
.choose-origin-tip { margin: 0 0 8px; padding: 6px 9px; border-radius: 6px; background: #ffe6d8; color: #753016; font-weight: 800; font-size: .9rem; }
.choose-origin-tip span { font-size: 1.1em; margin-right: 5px; }
.primary-control:has(.choose-origin-tip:not([hidden])) select { outline: 2px solid #cf673d; outline-offset: 2px; }

.info-panel {
    grid-area: panel;
    z-index: 3;
    overflow-y: auto;
    background: var(--panel);
    border-right: 1px solid var(--line);
    box-shadow: 7px 0 30px rgb(24 49 63 / 7%);
    padding: 32px 30px 28px;
}

.map-region { grid-area: map; position: relative; min-width: 0; }
#map { width: 100%; height: 100%; background: #dfe8e5; }
#map .leaflet-tile-pane { filter: saturate(.8) brightness(1.025) contrast(.94); }
.map-mobile-controls { display: none; }
.map-share-button { display: none; }
.map-expanded-time-control, .map-expanded-origin-control { display: none; }

.hero { padding-bottom: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 21px; color: var(--ink); text-decoration: none; }
.brand img { width: 38px; height: 42px; object-fit: contain; }
.brand span { display: grid; line-height: 1.05; }
.brand strong { font-size: 1.0rem; letter-spacing: .01em; }
.brand small { margin-top: 5px; color: var(--brand); font-size: 0.8rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.eyebrow, .section-kicker {
    margin: 0 0 7px;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    max-width: 360px;
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.intro { margin: 13px 0 0; color: var(--ink-soft); max-width: 350px; }

.origin-control { margin: 0 0 18px; }
.origin-help { margin: 0 0 9px; color: var(--ink-soft); font-size: .84rem; }
.map-origin-jump { display: inline-flex; align-items: center; padding: 7px 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-size: .8rem; font-weight: 800; text-decoration: none; }
body.is-map-expanded .map-origin-jump { display: none; }
.origin-control-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.origin-control-heading .section-kicker { margin: 0; }
.origin-control-actions { display: flex; align-items: center; gap: 7px; }
.primary-control, .secondary-control { padding: 10px; border: 1px solid; border-radius: 12px; }
.primary-control { border-color: #9ed4cc; background: #f1f9f7; }
.origin-field { display: grid; gap: 4px; min-width: 0; }
.origin-field > span { color: var(--ink-soft); font-size: 0.8rem; font-weight: 700; }
.primary-control .origin-field > span { color: var(--accent-dark); }
.origin-field select {
    width: 100%;
    min-width: 0;
    padding: 10px 32px 10px 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
}
.origin-field select:focus-visible { outline: 3px solid rgb(15 118 110 / 22%); outline-offset: 2px; }
.primary-control select { border-color: #79c0b6; }
.compare-toggle {
    flex: 0 0 auto;
    padding: 7px 11px;
    border: 1px solid var(--accent);
    border-radius: 10px;
    background: #fff;
    color: var(--accent-dark);
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
}
.compare-toggle:hover, .compare-toggle[aria-pressed="true"] { background: var(--accent); color: #fff; }
.compare-toggle:disabled { border-color: var(--line); background: #f3f5f4; color: #8b989d; cursor: not-allowed; }
.share-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
}
.share-button:hover { border-color: #9eb8b3; background: #f7faf9; }
.share-button:focus-visible, .map-share-button:focus-visible { outline: 3px solid rgb(15 118 110 / 25%); outline-offset: 2px; }
.share-icon { position: relative; width: 14px; height: 14px; border: 1.8px solid currentColor; border-radius: 3px; }
.share-icon::before { content: ""; position: absolute; top: -5px; left: 4px; width: 5px; height: 5px; border-top: 1.8px solid currentColor; border-right: 1.8px solid currentColor; transform: rotate(-45deg); }
.share-icon::after { content: ""; position: absolute; top: -5px; left: 6px; width: 1.8px; height: 9px; background: currentColor; }
.share-status { min-height: 0; margin: -2px 0 6px; color: var(--accent-dark); font-size: 0.8rem; font-weight: 700; text-align: right; }
.share-status:empty { display: none; }
.secondary-control { margin-top: 9px; border-color: #d8d1ff; background: #f8f7ff; }
.secondary-control .origin-field > span { color: var(--compare); }
.secondary-control select { border-color: #cfc7ff; }
body.is-comparing #origin-primary { border-color: #62b9ae; box-shadow: 0 0 0 2px rgb(15 118 110 / 12%); }

.time-control {
    margin: 0 -8px;
    padding: 20px 18px 16px;
    border: 1px solid #cfe0dc;
    border-radius: 16px;
    background: linear-gradient(145deg, #f7fbfa, #edf6f4);
}

.control-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
#time-output { display: block; font-size: 1.65rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.025em; }
.reach-pill {
    flex: none;
    border-radius: 100px;
    background: var(--accent);
    color: white;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: 750;
}

#time-slider, #map-time-slider {
    --progress: 40%;
    display: block;
    width: 100%;
    height: 26px;
    margin: 18px 0 0;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

#time-slider::-webkit-slider-runnable-track, #map-time-slider::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 10px;
    background: linear-gradient(to right, var(--accent) var(--progress), #cad7d4 var(--progress));
}

#time-slider::-moz-range-track, #map-time-slider::-moz-range-track { height: 6px; border-radius: 10px; background: #cad7d4; }
#time-slider::-moz-range-progress, #map-time-slider::-moz-range-progress { height: 6px; border-radius: 10px; background: var(--accent); }
#time-slider::-webkit-slider-thumb, #map-time-slider::-webkit-slider-thumb {
    width: 23px;
    height: 23px;
    margin-top: -8.5px;
    appearance: none;
    border: 3px solid white;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 1px 7px rgb(11 91 86 / 40%);
}
#time-slider::-moz-range-thumb, #map-time-slider::-moz-range-thumb {
    width: 18px; height: 18px; border: 3px solid white; border-radius: 50%;
    background: var(--accent); box-shadow: 0 1px 7px rgb(11 91 86 / 40%);
}
#time-slider:focus-visible, #map-time-slider:focus-visible { outline: 3px solid rgb(15 118 110 / 25%); outline-offset: 4px; border-radius: 8px; }
#time-slider:disabled, #map-time-slider:disabled { cursor: not-allowed; opacity: .45; }
.range-labels { display: flex; justify-content: space-between; color: var(--ink-soft); font-size: 0.8rem; }

body.is-map-expanded .map-expanded-time-control {
    position: fixed;
    z-index: 2205;
    top: 62px;
    left: 10px;
    display: grid;
    width: min(360px, calc(100vw - 20px));
    padding: 11px 14px 9px;
    border: 1px solid rgb(255 255 255 / 90%);
    border-radius: 12px;
    background: rgb(255 255 255 / 96%);
    box-shadow: 0 5px 20px rgb(25 49 63 / 24%);
    backdrop-filter: blur(10px);
}
body.is-map-expanded .map-expanded-time-control > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
body.is-map-expanded .map-expanded-time-control > div:first-child span { color: var(--accent-dark); font-size: 0.8rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
body.is-map-expanded .map-expanded-time-control output { font-size: 1.0rem; font-weight: 850; }
body.is-map-expanded #map-time-slider { height: 24px; margin: 7px 0 0; }
body.is-map-expanded .map-expanded-time-control .range-labels { margin-top: -2px; font-size: 0.8rem; }
body.is-map-expanded .map-expanded-origin-control {
    position: fixed;
    z-index: 2205;
    top: 160px;
    left: 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    width: min(360px, calc(100vw - 20px));
    padding: 9px 10px 10px;
    border: 1px solid rgb(255 255 255 / 90%);
    border-radius: 12px;
    background: rgb(255 255 255 / 96%);
    box-shadow: 0 5px 20px rgb(25 49 63 / 24%);
    backdrop-filter: blur(10px);
}
body.is-map-expanded.is-comparing .map-expanded-origin-control { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.is-map-expanded .map-expanded-origin-control label { display: grid; min-width: 0; gap: 4px; }
body.is-map-expanded .map-expanded-origin-control label[hidden] { display: none; }
body.is-map-expanded .map-expanded-origin-control label > span { color: var(--accent-dark); font-size: 0.8rem; font-weight: 850; letter-spacing: .045em; text-transform: uppercase; }
body.is-map-expanded .map-expanded-origin-control select {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0 30px 0 10px;
    border: 1px solid #8ecbc2;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 750;
    text-overflow: ellipsis;
}
body.is-map-expanded .map-expanded-origin-control select:focus { border-color: var(--accent); outline: 3px solid rgb(15 118 110 / 18%); }

.data-status {
    margin: 13px 0;
    min-height: 22px;
    color: var(--ink-soft);
    font-size: 0.8rem;
}
.data-status::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #9ba8ae; }
.data-status.is-ready::before { background: var(--accent); }
.data-status.is-warning { color: #8b5a12; }
.data-status.is-warning::before { background: var(--near); }

.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.metric-card {
    min-height: 104px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
}
.metric-primary { background: var(--ink); border-color: var(--ink); color: white; }
.metric-label { display: block; min-height: 36px; color: var(--ink-soft); font-size: 0.8rem; font-weight: 650; line-height: 1.25; }
.metric-primary .metric-label, .metric-primary small { color: #c9d5d9; }
.metric-card strong { display: block; margin-top: 5px; font-size: 1.55rem; line-height: 1; letter-spacing: -0.025em; }
.metric-card .metric-name { font-size: 1.1rem; line-height: 1.15; }
.metric-card small { display: block; margin-top: 6px; color: var(--ink-soft); font-size: 0.8rem; }
.is-loading-value { color: #829198; font-size: 0.8rem !important; font-weight: 700; letter-spacing: 0 !important; }
.metric-primary .is-loading-value { color: #c9d5d9; }
.is-error-value { color: #9a4d35; font-size: 0.8rem !important; line-height: 1.2 !important; }
.metric-primary .is-error-value { color: #ffd2c5; }
.empty-state.is-error { color: #9a4d35; }
.is-loading-value::before {
    content: "";
    display: inline-block;
    width: 11px;
    height: 11px;
    margin-right: 6px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -1px;
    animation: loading-spin 700ms linear infinite;
}

.selection-prompt { display: grid; gap: 4px; margin: 18px 0; padding: 17px; border: 1px dashed #b7c9c5; border-radius: 14px; background: #f7faf9; }
.selection-prompt strong { font-size: 0.9rem; }
.selection-prompt span { color: var(--ink-soft); font-size: 0.8rem; }
.panel-section { margin-top: 27px; content-visibility: auto; contain-intrinsic-size: auto 300px; }
.fold-card { margin-top: 18px; border: 1px solid var(--line); border-radius: 15px; background: #fff; overflow: clip; content-visibility: auto; contain-intrinsic-size: auto 320px; }
.fold-card > summary, .sub-fold > summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 16px; cursor: pointer; font-weight: 800; list-style: none; }
.fold-card > summary::-webkit-details-marker, .sub-fold > summary::-webkit-details-marker { display: none; }
.fold-card > summary::after, .sub-fold > summary::after { content: "+"; margin-left: auto; color: var(--accent); font-size: 1.1rem; }
.fold-card[open] > summary::after, .sub-fold[open] > summary::after { content: "−"; }
.fold-card > summary span, .sub-fold > summary span { color: var(--ink-soft); font-size: 0.8rem; font-weight: 600; }
.fold-content { padding: 0 14px 14px; }
.sub-fold { margin-top: 12px; border-top: 1px solid var(--line); }
.sub-fold > summary { padding-inline: 0; font-size: 0.9rem; }
.sub-fold .branch-chart { padding-bottom: 4px; }
.comparison-results { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 0 12px 8px; }
.comparison-column { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.comparison-column h2 { display: flex; align-items: center; gap: 7px; margin: 0 0 12px; font-size: 0.9rem; }
.comparison-column h2 i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.compare-badge { display: inline-grid; place-items: center; width: 25px; height: 25px; border-radius: 7px; background: var(--accent); color: white; font-size: 0.8rem; }
.comparison-column.is-secondary .compare-badge { background: var(--compare); }
.comparison-column.is-secondary h2 i { background: var(--compare); }
.comparison-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.comparison-metrics > div { min-width: 0; padding: 9px; border-radius: 9px; background: #f2f6f5; }
.comparison-column.is-secondary .comparison-metrics > div { background: var(--compare-pale); }
.comparison-metrics span { display: block; min-height: 28px; color: var(--ink-soft); font-size: 0.8rem; line-height: 1.2; }
.comparison-metrics strong { display: block; margin-top: 3px; font-size: 1.0rem; line-height: 1; }
.comparison-key { display: grid; grid-template-columns: 1fr; gap: 5px; margin: 0 12px 12px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: #f7faf9; }
.comparison-key > span { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 7px; min-width: 0; color: var(--ink-soft); font-size: 0.8rem; font-weight: 750; cursor: help; }
.comparison-key b { display: grid; width: 19px; height: 19px; place-items: center; border-radius: 5px; background: var(--accent); color: #fff; font-size: 0.8rem; }
.comparison-key .is-secondary b { background: var(--compare); }
.comparison-key > span > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comparison-branches-compact, .comparison-municipalities-combined { margin: 0 12px 12px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.comparison-branches-compact > h3, .comparison-municipalities-combined > h3 { margin: 0 0 11px; font-size: 0.9rem; }
.compact-branch-row + .compact-branch-row { margin-top: 13px; }
.compact-branch-row > strong { display: block; margin-bottom: 6px; font-size: 0.8rem; line-height: 1.25; }
.compact-comparison-values { display: grid; grid-template-columns: 1fr; gap: 5px; min-width: 0; }
.compact-branch-value { display: grid; grid-template-columns: 18px minmax(0, 1fr) 56px; align-items: center; gap: 6px; min-width: 0; min-height: 18px; }
.compact-branch-value b { display: grid; width: 17px; height: 17px; place-items: center; border-radius: 5px; background: var(--accent); color: #fff; font-size: 0.8rem; cursor: help; }
.compact-branch-value.is-secondary b { background: var(--compare); }
.compact-branch-value em { color: var(--ink-soft); font-size: 0.8rem; font-style: normal; font-variant-numeric: tabular-nums; text-align: right; }
.compact-branch-value .branch-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-dark), #35a295); }
.compact-branch-value.is-secondary .branch-track i { background: linear-gradient(90deg, #5140b8, #8776e6); }
.comparison-municipality-row { border-top: 1px solid var(--line); }
.comparison-municipality-row > summary { display: grid; gap: 7px; padding: 11px 0; list-style: none; cursor: pointer; }
.comparison-municipality-row > summary::-webkit-details-marker { display: none; }
.comparison-municipality-row > summary > strong { display: flex; justify-content: space-between; gap: 10px; font-size: 0.8rem; }
.comparison-municipality-row > summary > strong::after { content: "Vis detaljer +"; color: var(--ink-soft); font-size: 0.8rem; font-weight: 650; }
.comparison-municipality-row[open] > summary > strong::after { content: "Skjul detaljer −"; }
.comparison-municipality-details { display: grid; grid-template-columns: 1fr; gap: 9px; padding: 2px 0 12px; }
.comparison-municipality-details > section { min-width: 0; padding: 8px; border-radius: 10px; background: #f6faf9; }
.comparison-municipality-details > section.is-secondary { background: #f8f7ff; }
.comparison-municipality-details h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 7px; font-size: 0.8rem; }
.comparison-municipality-details h4 b { display: grid; width: 18px; height: 18px; place-items: center; border-radius: 5px; background: var(--accent); color: #fff; font-size: 0.8rem; }
.comparison-municipality-details .is-secondary h4 b { background: var(--compare); }
.comparison-municipality-details .municipality-row { padding: 9px; }
.comparison-municipality-details .is-secondary .municipality-heading b { color: #5140b8; }
.comparison-municipality-details .is-secondary .municipality-job-bar i:first-child { background: var(--compare); }
.comparison-municipality-details .is-secondary .municipality-job-bar i:nth-child(2) { background: #a99ce8; }
.comparison-municipality-details .is-secondary .municipality-city i::before { background: var(--compare); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-heading h2, .method-note h2 { margin: 0; font-size: 0.9rem; letter-spacing: -0.01em; }
.section-heading span { color: var(--ink-soft); font-size: 0.8rem; }
.empty-state { margin: 10px 0; color: var(--ink-soft); font-size: 0.9rem; }

.branch-row + .branch-row { margin-top: 11px; }
.branch-meta { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; font-size: 0.8rem; }
.branch-meta span { max-width: 78%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.branch-meta strong { font-variant-numeric: tabular-nums; }
.branch-track { height: 6px; overflow: hidden; border-radius: 10px; background: #e9edec; }
.branch-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-dark), #35a295); }
.municipality-breakdown { display: grid; gap: 10px; padding-top: 3px; }
.municipality-row { padding: 11px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.municipality-heading { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 7px; font-size: 0.8rem; }
.municipality-heading b { color: var(--accent-dark); font-variant-numeric: tabular-nums; text-align: right; }
.municipality-job-bar { display: flex; width: 100%; height: 7px; margin-bottom: 10px; overflow: hidden; border-radius: 10px; background: #d9dddc; }
.municipality-job-bar i { min-width: 0; background: var(--accent); }
.municipality-job-bar i:nth-child(2) { background: #79bdb4; }
.municipality-job-bar i:nth-child(3) { background: #d9dddc; }
.municipality-cities { display: grid; gap: 3px; margin-bottom: 6px; }
.municipality-cities > small { margin-bottom: 2px; color: var(--ink-soft); font-size: 0.8rem; font-weight: 750; text-transform: uppercase; letter-spacing: .035em; }
.municipality-city, .municipality-overlap, .municipality-adjustment, .municipality-remainder, .municipality-outside { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; font-size: 0.8rem; }
.municipality-city i, .municipality-overlap i, .municipality-adjustment i, .municipality-remainder i, .municipality-outside i { min-width: 0; overflow-wrap: anywhere; color: var(--accent-dark); font-style: normal; font-weight: 750; }
.municipality-overlap { align-items: baseline; margin: 0 0 9px; padding: 7px 8px; border-radius: 7px; background: #f1f5f4; cursor: help; }
.municipality-overlap i { color: var(--ink-soft); font-weight: 700; }
.municipality-overlap em { color: var(--ink); font-style: normal; font-variant-numeric: tabular-nums; text-align: right; }
.municipality-adjustment { align-items: baseline; margin: -3px 0 9px; padding: 7px 8px; border: 1px solid #ead9b8; border-radius: 7px; background: #fff8e9; cursor: help; }
.municipality-adjustment i { color: #78613b; }
.municipality-adjustment em { color: #78613b; font-style: normal; font-variant-numeric: tabular-nums; text-align: right; }
.municipality-city i::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 6px 1px 0; border-radius: 50%; background: var(--accent); }
.municipality-city i small { display: block; margin: 2px 0 0 11px; color: var(--ink-soft); font-size: 0.8rem; font-weight: 600; line-height: 1.25; }
.municipality-city.is-empty i { color: var(--ink-soft); font-weight: 600; }
.municipality-city.is-empty i::before { background: #aeb8b6; }
.municipality-row em { min-width: 58px; color: var(--ink); font-style: normal; font-variant-numeric: tabular-nums; text-align: right; }
.municipality-remainder { margin-top: 7px; padding-top: 7px; border-top: 1px dashed #cfe0dc; }
.municipality-remainder i { color: #397f77; }
.municipality-outside { margin: 7px -4px 0; padding: 6px 4px; border-radius: 6px; background: #eef0ef; }
.municipality-outside i, .municipality-outside em { color: #747f82; }
.municipality-row footer { margin-top: 6px; color: var(--ink-soft); font-size: 0.8rem; text-align: right; }
.loading-chart { display: grid; gap: 9px; color: var(--ink-soft); font-size: 0.8rem; }
.loading-chart > span, .loading-list > span {
    display: block;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #edf1f0 25%, #dfe7e5 50%, #edf1f0 75%);
    background-size: 220% 100%;
    animation: loading-shimmer 1.15s ease-in-out infinite;
}
.loading-chart > span:nth-child(2), .loading-list > span:nth-child(2) { width: 82%; }
.loading-chart > span:nth-child(3), .loading-list > span:nth-child(3) { width: 68%; }
.loading-chart small { margin-top: 2px; }

.city-list { border-top: 1px solid var(--line); }
.city-list-method { margin: 0; padding: 10px 2px; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: 0.8rem; line-height: 1.4; }
.loading-list { display: grid; gap: 12px; padding: 15px 2px; color: var(--ink-soft); font-size: 0.8rem; }
.loading-list p { margin: 0; }
.city-row {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 2px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}
.city-row:hover, .city-row:focus-visible { background: #f5f8f7; outline: none; }
.city-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #a0aaae; }
.city-row.is-reached .city-status-dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-pale); }
.city-row.is-secondary .city-status-dot { background: var(--compare); box-shadow: 0 0 0 3px var(--compare-pale); }
.city-row.is-both .city-status-dot { background: linear-gradient(90deg, var(--accent) 50%, var(--compare) 50%); box-shadow: 0 0 0 3px #e8ebed; }
.city-row.is-near .city-status-dot { background: var(--near); box-shadow: 0 0 0 3px #fff0d2; }
.city-main, .city-route { min-width: 0; }
.city-main strong, .city-route strong { display: block; font-size: 0.9rem; line-height: 1.3; }
.city-main small, .city-route small { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.city-main small.city-model-basis { color: #6b777a; font-size: 0.8rem; white-space: normal; }
.city-route { text-align: right; font-variant-numeric: tabular-nums; }
.city-routes { display: grid; grid-template-columns: repeat(2, minmax(60px, auto)); gap: 12px; }
.city-routes .city-route { padding-left: 8px; border-left: 2px solid var(--accent-pale); }
.city-routes .city-route:last-child { border-color: var(--compare-pale); }
.city-row.is-muted .city-main, .city-row.is-muted .city-route { opacity: 0.65; }

.disclaimer { margin: 28px 0 0; padding: 18px; border: 2px solid #e2a05d; border-radius: 14px; background: #fff8ed; }
.disclaimer > strong { color: #8a4618; font-size: 0.9rem; }
.disclaimer p { margin: 9px 0; color: #5d5148; font-size: 0.8rem; }
.text-link { color: var(--accent-dark); font-size: 0.8rem; font-weight: 800; text-underline-offset: 3px; }
.sources { display: grid; gap: 12px; margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 0.8rem; }
.source-copy, .publisher { display: grid; gap: 4px; margin: 0; }
.sources strong { color: var(--ink); }
.source-links, .sources nav { display: flex; flex-wrap: wrap; gap: 5px 12px; }
.sources a:hover { color: var(--accent); }
.publisher { padding-left: 10px; border-left: 3px solid var(--brand); }

.map-legends {
    position: absolute;
    z-index: 500;
    left: 18px;
    right: 18px;
    bottom: 28px;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 8px;
    pointer-events: none;
}
.map-legend {
    display: flex;
    flex-wrap: wrap;
    max-width: 100%;
    gap: 10px 15px;
    padding: 10px 13px;
    border: 1px solid rgb(255 255 255 / 75%);
    border-radius: 9px;
    background: rgb(255 255 255 / 92%);
    box-shadow: var(--shadow);
    color: var(--ink-soft);
    font-size: 0.8rem;
    backdrop-filter: blur(8px);
}
.map-legend > span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.origin-dot { background: var(--accent); box-shadow: 0 0 0 2px rgb(15 118 110 / 22%); }
.secondary-dot { background: var(--compare); box-shadow: 0 0 0 2px rgb(109 91 208 / 20%); }
.near-dot { background: var(--near); }
.boundary-point-dot { width: 7px; height: 7px; background: var(--brand); box-shadow: 0 0 0 2px rgb(242 103 58 / 18%); }
.legend-line { width: 18px; height: 0; border-top: 3px dashed var(--brand); }
.context-municipality-line { border-top-width: 2px; border-top-color: #526d7a; }

.heatmap-legend {
    display: grid;
    width: min(260px, 100%);
    gap: 5px;
    padding: 10px 12px;
    border: 1px solid rgb(255 255 255 / 78%);
    border-radius: 9px;
    background: rgb(255 255 255 / 94%);
    box-shadow: var(--shadow);
    color: var(--ink-soft);
    font-size: 0.8rem;
    backdrop-filter: blur(8px);
}
.heatmap-legend strong { color: var(--ink); font-size: 0.8rem; }
.heatmap-gradient { height: 8px; border-radius: 8px; background: linear-gradient(90deg, #fff0b8, #f4c46c, #eb8a4d, #d65345, #772d4c); }
.heatmap-scale { display: flex; justify-content: space-between; gap: 10px; }
.heatmap-scale i { font-style: normal; font-variant-numeric: tabular-nums; }
.leaflet-heat-surface { pointer-events: none; image-rendering: auto; }
.heatmap-popup { display: grid; min-width: 170px; gap: 3px; color: var(--ink); }
.heatmap-popup strong { font-size: 1.05rem; }
.heatmap-popup span { color: var(--ink-soft); font-size: 0.8rem; }

.map-loading {
    position: absolute;
    z-index: 500;
    top: 18px;
    left: 18px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgb(25 49 63 / 90%);
    color: #fff;
    font-size: 0.8rem;
    box-shadow: var(--shadow);
    transition: opacity 160ms ease;
}
.map-loading::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 7px; border: 2px solid rgb(255 255 255 / 45%); border-right-color: #fff; border-radius: 50%; animation: loading-spin 700ms linear infinite; }
.map-loading.is-hidden { opacity: 0; pointer-events: none; }
.map-loading.is-error { background: rgb(139 74 26 / 92%); }
.map-loading.is-error::before { display: none; }
.map-loading.is-prompt::before { display: none; }

.origin-marker-wrap { overflow: visible !important; }
.origin-marker { position: absolute; inset: 2px; border: 3px solid white; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgb(15 118 110 / 20%), 0 2px 8px rgb(9 91 86 / 48%); }
.origin-pulse { position: absolute; inset: -8px; border: 3px solid rgb(15 118 110 / 78%); border-radius: 50%; box-shadow: 0 0 0 4px rgb(15 118 110 / 16%); animation: origin-pulse 1.7s ease-out infinite; }
.origin-label {
    position: absolute;
    left: 28px;
    top: 0;
    width: max-content;
    padding: 3px 7px;
    border-radius: 5px;
    background: var(--ink);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 2px 7px rgb(25 49 63 / 22%);
}
.origin-marker-wrap.is-secondary .origin-marker { background: var(--compare); }
.origin-marker-wrap.is-secondary .origin-marker { box-shadow: 0 0 0 4px rgb(109 91 208 / 20%), 0 2px 7px rgb(55 40 130 / 45%); }
.origin-marker-wrap.is-secondary .origin-pulse { border-color: rgb(109 91 208 / 82%); box-shadow: 0 0 0 4px rgb(109 91 208 / 18%); }
.origin-marker-wrap.is-secondary .origin-label { background: #5140b8; }
.origin-marker-wrap:not(.is-secondary) .origin-label { border: 2px solid #62c5b7; background: var(--accent-dark); padding: 2px 6px; }
@keyframes origin-pulse { from { transform: scale(0.55); opacity: 1; } 70% { opacity: .42; } to { transform: scale(1.85); opacity: 0; } }
@keyframes loading-spin { to { transform: rotate(360deg); } }
@keyframes loading-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.city-popup { display: grid; gap: 2px; min-width: 155px; color: var(--ink); }
.city-popup strong { font-size: 0.9rem; }
.city-popup span { color: var(--ink-soft); font-size: 0.8rem; }
.city-popup .city-model-jobs { margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--line); }
.city-popup .city-model-jobs strong { font-size: inherit; }
.city-popup .city-model-basis { margin-top: 3px; color: #6b777a; font-size: 0.8rem; line-height: 1.3; }
.city-popup-actions { display: flex; gap: 6px; margin-top: 7px; }
.city-popup-actions button { flex: 1; padding: 6px 8px; border: 1px solid var(--accent); border-radius: 7px; background: var(--accent); color: #fff; font-size: 0.8rem; font-weight: 800; cursor: pointer; }
.city-popup-actions button:last-child:not(:first-child) { border-color: var(--compare); background: var(--compare); }
.city-popup-actions button:hover, .city-popup-actions button:focus-visible { filter: brightness(.92); outline: 2px solid #fff; outline-offset: -3px; }
.city-touch-target { border-radius: 50%; background: transparent; }
.leaflet-tooltip.city-name-label {
    padding: 2px 5px;
    border: 1px solid rgb(92 104 108 / 24%);
    border-radius: 4px;
    background: rgb(250 251 249 / 88%);
    box-shadow: none;
    color: #566267;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.15;
    white-space: nowrap;
}
.leaflet-tooltip-top.city-name-label::before { border-top-color: rgb(92 104 108 / 24%); }
.leaflet-control-attribution { font-size: 12px; }
.google-maps-attribution { color: #5e5e5e; font-size: 15px; font-style: normal; font-weight: 400; letter-spacing: normal; white-space: nowrap; }

noscript { display: block; padding: 20px; background: #fff3cd; }

@media (max-width: 820px) {
    .app-shell {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }
    .app-shell > .job-report-views { position: sticky; top: 0; z-index: 1100; padding-inline: 10px; }
    .job-report-home span { display: none; }
    .job-report-views .job-report-home { margin-right: 0; }
    .job-report-views button { font-size: 13px; padding-inline: 8px; }
    .job-data-panel { overflow: visible; }
    #origin-controls { scroll-margin-top: 95px; }
    .map-region { order: 1; height: min(45svh, 440px); min-height: 310px; }
    .map-mobile-controls {
        position: absolute;
        z-index: 1000;
        top: 10px;
        left: 10px;
        display: flex;
        align-items: stretch;
        gap: 7px;
    }
    .map-size-toggle, .map-share-button {
        min-height: 42px;
        border: 1px solid rgb(255 255 255 / 85%);
        border-radius: 9px;
        background: rgb(255 255 255 / 94%);
        box-shadow: 0 3px 14px rgb(25 49 63 / 18%);
        backdrop-filter: blur(8px);
    }
    .map-size-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; color: var(--ink); font-size: 0.8rem; font-weight: 800; cursor: pointer; }
    .map-share-button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border: 0; color: var(--ink); font-size: 0.8rem; font-weight: 800; cursor: pointer; }
    .map-size-icon { width: 14px; height: 14px; border: 2px solid currentColor; border-radius: 2px; }
    .map-size-toggle:focus-visible { outline: 3px solid rgb(15 118 110 / 32%); outline-offset: 2px; }
    .map-loading { top: 61px; }
    body.is-map-expanded { overflow: hidden; }
    body.is-map-expanded .map-region { position: fixed; z-index: 2000; inset: 0; width: 100%; height: 100dvh; min-height: 0; }
    body.is-map-expanded .map-size-icon { box-shadow: inset 0 0 0 2px #fff; background: var(--ink); }
    body.is-map-expanded .map-loading { top: 246px; }
    .info-panel { order: 2; overflow: visible; padding: 26px 20px 30px; border: 0; box-shadow: none; }
    .hero { padding-bottom: 20px; }
    h1 { font-size: 2.0rem; }
    .map-legends { left: 10px; right: 10px; bottom: 22px; }
    .map-loading { left: 10px; }
}

@media (max-width: 600px) {
    .map-region { height: 39svh; min-height: 280px; }
    .info-panel { padding: 20px 14px 28px; }
    .brand { margin-bottom: 16px; }
    .hero { padding-bottom: 16px; }
    .intro { font-size: 0.9rem; }
    .time-control { margin-inline: 0; }
    .control-heading { align-items: center; }
    #time-output { font-size: 1.45rem; }
    .reach-pill { max-width: 105px; text-align: center; }
    .map-legend { width: 100%; gap: 7px 12px; }
    .heatmap-legend { width: 100%; }
    .map-mobile-controls { max-width: calc(100vw - 20px); flex-wrap: wrap; }
    .origin-control-heading { align-items: center; flex-wrap: wrap; }
    .origin-control-actions { margin-left: auto; }
    .comparison-results { grid-template-columns: 1fr; }
    .municipality-overlap, .municipality-adjustment { grid-template-columns: 1fr; gap: 2px; }
    .municipality-overlap em, .municipality-adjustment em { text-align: left; }
    .city-touch-target { width: 50px !important; height: 50px !important; margin-left: -25px !important; margin-top: -25px !important; }
    .fold-card > summary { position: sticky; top: 0; z-index: 1; background: #fff; }
    .metrics { gap: 7px; }
    .metric-card { min-height: 92px; padding: 11px; }
    .metric-label { min-height: 31px; font-size: 0.8rem; }
    .metric-card strong { font-size: 1.3rem; }
    .disclaimer { padding: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

@font-face{font-family:Manrope;src:url('../../../assets/manrope.ttf') format('truetype');font-weight:200 800;font-display:swap}body{font-family:Manrope,Arial,sans-serif}.hero h1{color:#283b30}.brand small{letter-spacing:.05em}.publisher{color:#283b30}

/* Læsevenlig grundstørrelse; kortets geometri er uændret. */
html{font-size:18px}


body.is-map-expanded.job-view-heatmap .map-expanded-origin-control { display: none; }
