:root {
  --bg: #061032;
  --panel: #0a173d;
  --panel-2: #0d1d49;
  --panel-3: #102453;
  --line: #1a2d5b;
  --line-soft: #122552;
  --text: #f2f5ff;
  --muted: #a3aec8;
  --subtle: #6f7d9e;
  --accent: #4dd0e1;
  --accent-2: #8de7f0;
  --good: #71d7a2;
  --warn: #e5c36d;
  --bad: #e47979;
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); font-family: Inter, system-ui, sans-serif; }
body { margin: 0; min-height: 100vh; background: var(--bg); }
button, input { font: inherit; }
button { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }
.app-shell { min-height: 100vh; }

.topbar {
  height: 66px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(22px, calc((100vw - 1560px) / 2));
  position: sticky;
  top: 0;
  background: rgba(6, 16, 50, .94);
  backdrop-filter: blur(16px);
  z-index: 30;
}
.brand { display: flex; align-items: center; color: var(--text); text-decoration: none; height: 100%; }
.brand-logo { display: block; width: 188px; height: 54px; object-fit: contain; object-position: left center; }

main { width: min(1560px, calc(100% - 40px)); margin: 0 auto; }
.hero { padding: 76px 0 62px; text-align: center; max-width: 1040px; margin: auto; }
.eyebrow, .section-kicker { font-size: 11px; letter-spacing: .18em; font-weight: 700; color: var(--accent); }
.hero h1 { font: 800 clamp(38px, 5vw, 64px)/1.05 Manrope, sans-serif; letter-spacing: -.045em; margin: 12px 0 16px; }
.hero > p { margin: 0 auto; color: var(--muted); font-size: 17px; max-width: 720px; line-height: 1.65; }
.search-panel { display: flex; gap: 8px; margin: 34px auto 0; max-width: 750px; position: relative; z-index: 20; }
.municipality-field { flex: 1; height: 56px; background: var(--panel); border: 1px solid #263b69; display: flex; align-items: center; padding: 0 0 0 17px; gap: 12px; position: relative; text-align: left; }
.municipality-field:focus-within, .municipality-field.open { border-color: #4a7a92; box-shadow: 0 0 0 3px rgba(77, 208, 225, .055); }
.municipality-field .location-icon { width: 18px; height: 18px; color: var(--accent); flex: none; }
.municipality-input-wrap { flex: 1; min-width: 0; height: 100%; position: relative; display: flex; align-items: center; }
.municipality-input-display { position: absolute; inset: 0; display: flex; align-items: center; gap: .28em; min-width: 0; overflow: hidden; white-space: nowrap; pointer-events: none; font-size: 16px; line-height: 1; z-index: 1; }
.municipality-input-display .municipality-prefix { color: var(--text); }
.municipality-input-display .municipality-accent-name { color: var(--accent); }
.municipality-field input { position: absolute; inset: 0; z-index: 2; border: 0; outline: 0; background: transparent; color: transparent; caret-color: var(--accent); width: 100%; font-size: 16px; min-width: 0; padding: 0; }
.municipality-field input::placeholder { color: #a3aec8; opacity: 1; }
.municipality-menu button > span:first-child { display: inline-flex; align-items: center; gap: .28em; min-width: 0; }
.municipality-menu .municipality-prefix { color: #b8c2d9; }
.municipality-menu .municipality-accent-name { color: var(--accent); font-weight: 700; }
.municipality-menu button:hover .municipality-prefix,
.municipality-menu button.active .municipality-prefix { color: #fff; }
.municipality-menu button:hover .municipality-accent-name,
.municipality-menu button.active .municipality-accent-name { color: var(--accent-2); }
.dropdown-toggle { width: 48px; height: 54px; border: 0; border-left: 1px solid var(--line); background: transparent; color: #7586a9; display: grid; place-items: center; cursor: pointer; flex: none; }
.dropdown-toggle:hover { background: var(--panel-2); color: var(--text); }
.dropdown-toggle svg { width: 18px; height: 18px; transition: transform .15s ease; }
.municipality-field.open .dropdown-toggle svg, .custom-select.open .custom-select-trigger svg { transform: rotate(180deg); }
.dropdown-menu, .custom-select-menu { position: absolute; left: -1px; right: -1px; top: calc(100% + 6px); background: #09163a; border: 1px solid #29406f; box-shadow: 0 18px 40px rgba(0, 0, 0, .3); z-index: 60; max-height: 300px; overflow: auto; text-align: left; }
.municipality-menu button, .custom-select-menu button { width: 100%; display: flex; align-items: center; justify-content: space-between; border: 0; border-bottom: 1px solid #142752; background: transparent; color: #b8c2d9; padding: 11px 13px; text-align: left; cursor: pointer; font-size: 12px; }
.municipality-menu button:last-child, .custom-select-menu button:last-child { border-bottom: 0; }
.municipality-menu button:hover, .municipality-menu button.active, .custom-select-menu button:hover, .custom-select-menu button.selected { background: #102452; color: #fff; }
.municipality-menu button small { color: #66789d; margin-left: 14px; white-space: nowrap; }
.municipality-empty { padding: 14px; color: #7080a1; font-size: 12px; }
.primary-btn { height: 56px; border: 0; background: var(--accent); color: #071325; font-weight: 800; padding: 0 24px; display: flex; align-items: center; gap: 9px; cursor: pointer; }
.primary-btn:hover { background: var(--accent-2); }
.primary-btn svg { width: 18px; height: 18px; }
.quick-picks { display: flex; justify-content: center; gap: 7px; flex-wrap: wrap; margin-top: 14px; }
.quick-picks button { background: transparent; border: 1px solid var(--line); color: var(--muted); padding: 7px 10px; font-size: 11px; cursor: pointer; }
.quick-picks button:hover { color: #fff; border-color: #3c5689; background: #0a173d; }

.dashboard { padding: 0 0 90px; }
.summary-row { border-top: 1px solid var(--line-soft); padding: 32px 0 24px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; scroll-margin-top: 82px; }
.summary-row h2 { font: 700 28px/1.2 Manrope, sans-serif; margin: 7px 0 5px; letter-spacing: -.03em; }
.municipality-result-title { display: flex; align-items: baseline; gap: .28em; flex-wrap: wrap; }
.municipality-result-title .municipality-prefix { color: var(--text); }
.municipality-result-title .municipality-accent-name { color: var(--accent); }
.last-update { color: var(--subtle); font-size: 12px; margin: 0; }
.cache-notice { margin: 8px 0 0; color: var(--warn); font-size: 11px; }
.summary-actions { display: flex; align-items: stretch; gap: 8px; }
.watch-btn { min-height: 51px; border: 1px solid var(--line); background: var(--panel); padding: 0 15px; color: #b9c5dc; display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 11px; font-weight: 700; }
.watch-btn:hover { background: var(--panel-2); border-color: #385484; color: #fff; }
.watch-btn.active { border-color: #356d65; background: #0a2538; color: #8de1bd; }
.watch-btn svg { width: 16px; height: 16px; }
.summary-stats { display: flex; border: 1px solid var(--line); }
.summary-stats > div { min-width: 100px; padding: 11px 15px; text-align: left; }
.summary-stats > div + div { border-left: 1px solid var(--line); }
.summary-stats strong { display: block; font: 700 19px Manrope, sans-serif; }
.summary-stats span { font-size: 10px; color: var(--subtle); text-transform: uppercase; letter-spacing: .08em; }

.recent-section { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-soft); padding: 22px 0 24px; margin-bottom: 28px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.section-heading h3 { font: 700 18px Manrope, sans-serif; margin: 5px 0 0; }
.section-count { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--subtle); }
.recent-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); }
.recent-card { min-width: 0; padding: 15px 16px; background: #08153a; text-decoration: none; color: inherit; display: block; }
.recent-card + .recent-card { border-left: 1px solid var(--line); }
.recent-card:hover { background: var(--panel-2); }
.recent-card-top { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; color: var(--accent); }
.recent-card-top svg { width: 15px; height: 15px; flex: none; }
.recent-card-top span { font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.recent-card strong { display: block; font: 700 13px/1.45 Manrope, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-card small { display: block; margin-top: 7px; color: var(--subtle); font-size: 10px; }
.recent-empty { grid-column: 1 / -1; padding: 16px; color: var(--subtle); font-size: 11px; }

.content-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 34px; }
.filters-card { border-top: 1px solid var(--line); padding-top: 17px; }
.filter-title { font-weight: 700; font-size: 15px; margin-bottom: 22px; }
.filter-group { padding: 0 0 22px; margin-bottom: 20px; border-bottom: 1px solid var(--line-soft); }
.filter-group > label { display: block; color: var(--subtle); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 10px; }
.street-search { min-height: 42px; border: 1px solid var(--line); background: var(--panel); display: flex; align-items: center; gap: 8px; padding-left: 10px; }
.street-search:focus-within { border-color: #385484; background: var(--panel-2); }
.street-search svg { width: 15px; height: 15px; color: #7184aa; flex: none; }
.street-search input { border: 0; outline: 0; color: #dce4f6; background: transparent; width: 100%; min-width: 0; font-size: 13px; }
.street-search input::placeholder, .mini-search input::placeholder { color: #65769a; }
.clear-input { width: 36px; align-self: stretch; border: 0; border-left: 1px solid var(--line); background: transparent; color: #7c8ba8; cursor: pointer; font-size: 18px; }
.clear-input:hover { color: #fff; background: #102452; }
.custom-select { position: relative; width: 100%; z-index: 12; }
.custom-select-trigger { width: 100%; min-height: 44px; background: var(--panel); border: 1px solid var(--line); color: #dce4f6; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; cursor: pointer; font-size: 13px; }
.custom-select-trigger:hover, .custom-select.open .custom-select-trigger { border-color: #385484; background: var(--panel-2); }
.custom-select-trigger svg { width: 15px; height: 15px; color: #7586aa; flex: none; transition: transform .15s ease; }
.custom-select-menu { top: calc(100% + 5px); left: 0; right: 0; max-height: none; }
.check-list { display: grid; gap: 1px; }
.check-item { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; color: #b3bdd2; font-size: 13px; cursor: pointer; }
.check-item > span:first-child { display: flex; align-items: center; gap: 8px; min-width: 0; }
.check-item input { accent-color: var(--accent); }
.filter-icon { width: 14px; height: 14px; color: #7890b5; flex: none; }
.count-badge { font-size: 10px; color: #6f7fa1; }
.source-health { display: grid; gap: 10px; }
.source-line { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 8px; font-size: 12px; color: #aeb8cf; }
.source-line i { width: 6px; height: 6px; background: var(--good); }
.source-line.error i { background: var(--bad); }
.source-line.unconfigured i { background: var(--warn); }
.source-line.cached i { background: var(--warn); }
.source-line b { font-weight: 500; color: #65769a; }

.results-column { min-width: 0; }
.toolbar { min-height: 50px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tabs { min-height: 49px; display: flex; align-items: center; gap: 22px; }
.tabs button { align-self: stretch; background: transparent; border: 0; color: #7f8fb0; font-size: 13px; cursor: pointer; position: relative; padding: 0; }
.tabs button.active { color: #edf2ff; }
.tabs button.active::after { content: ""; position: absolute; height: 2px; background: var(--accent); left: 0; right: 0; bottom: -1px; }
.mini-search { display: flex; align-items: center; gap: 7px; color: #7080a3; }
.mini-search input { width: 240px; background: transparent; border: 0; outline: 0; color: #dce4f6; font-size: 13px; }
.mini-search svg { width: 14px; height: 14px; }
.active-filters { border-bottom: 1px solid var(--line-soft); padding: 9px 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.active-filter { border: 1px solid #2c4677; background: #0a1940; color: #aebbd6; padding: 5px 7px; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }

.results-list { display: grid; }
.result-card { padding: 26px 18px; border-bottom: 1px solid var(--line-soft); transition: background .15s; }
.result-card:hover { background: #08163a; }
.card-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-labels { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.category-pill, .source-type-pill, .status-pill { min-height: 25px; display: inline-flex; align-items: center; gap: 5px; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; border: 1px solid; padding: 4px 7px; }
.category-pill { border-color: #285062; color: #83dfe9; background: #0a2036; }
.category-pill svg { width: 12px; height: 12px; }
.source-type-pill { border-color: #283d69; color: #9cadd0; background: #0b193c; }
.source-type-pill.official { border-color: #315e5a; color: #86d8b7; background: #0b2333; }
.source-type-pill.news { border-color: #5e4e30; color: #e8ca7e; background: #221f2e; }
.status-pill.planned { border-color: #5e4e30; color: #e8ca7e; background: #221f2e; }
.status-pill.in-progress { border-color: #285062; color: #83dfe9; background: #0a2036; }
.status-pill.completed { border-color: #315e5a; color: #86d8b7; background: #0b2333; }
.relevance { font-size: 10px; color: #7181a3; white-space: nowrap; }
.result-card h3 { font: 700 20px/1.38 Manrope, sans-serif; margin: 12px 0 9px; letter-spacing: -.018em; max-width: 1120px; overflow-wrap: anywhere; }
.summary { font-size: 14px; line-height: 1.72; color: #aab5ca; margin: 0; max-width: 1180px; overflow-wrap: anywhere; }
.project-details { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; border: 0; max-width: 1120px; align-items: stretch; }
.detail-item { min-width: 0; min-height: 66px; padding: 11px 14px 12px; border: 1px solid var(--line); background: #08163a; overflow: hidden; }
.detail-item + .detail-item { border-left: 1px solid var(--line); }
.detail-item span { display: block; color: #7285aa; font-size: 9px; line-height: 1.25; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-item strong { display: block; color: #e4ebf8; font-size: 13px; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
.card-meta { margin-top: 17px; display: flex; align-items: center; gap: 8px; color: #7d8fb3; font-size: 12px; }
.source-name { color: #bcc5d9; }
.dot-sep { color: #42577d; }
.open-link { margin-left: auto; color: #9eabc4; text-decoration: none; font-weight: 600; }
.open-link:hover { color: var(--accent); }
.open-link span { font-size: 12px; }

.summary-wrap { margin-top: 0; }
.summary-toggle { margin-top: 8px; padding: 0; border: 0; background: transparent; color: var(--accent); font-size: 12px; font-weight: 700; cursor: pointer; }
.summary-toggle:hover { color: var(--accent-2); }
.document-actions { display: flex; align-items: center; gap: 8px; margin-top: 17px; }
.document-actions a { min-height: 38px; border: 1px solid #2c4774; background: #09183d; color: #c6d2e7; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-size: 12px; font-weight: 700; }
.document-actions a:hover { border-color: #4c7891; background: #0d214b; color: #fff; }
.document-actions svg { width: 15px; height: 15px; color: var(--accent); }
.pdf-download { color: var(--accent) !important; border-color: var(--accent) !important; }
.pdf-download svg { color: var(--accent) !important; }
.pdf-download:hover { color: var(--accent-2) !important; border-color: var(--accent-2) !important; background: #0d214b; }

.related-group { border-bottom: 1px solid var(--line-soft); }
.related-head { width: 100%; min-height: 58px; border: 0; background: #08153a; display: grid; grid-template-columns: 1fr auto 18px; align-items: center; gap: 12px; padding: 0 12px; cursor: pointer; text-align: left; }
.related-head:hover { background: #0a1941; }
.related-title { font: 700 13px Manrope, sans-serif; color: #dce5f7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.related-count { color: #7d8dac; font-size: 10px; }
.related-head svg { width: 15px; height: 15px; color: #7181a3; transition: transform .15s ease; }
.related-head[aria-expanded="true"] svg { transform: rotate(180deg); }
.related-items { border-top: 1px solid var(--line-soft); padding-left: 15px; }
.related-items .result-card:last-child { border-bottom: 0; }

.timeline-view { display: grid; }
.timeline-month { display: grid; grid-template-columns: 128px 1fr; border-bottom: 1px solid var(--line-soft); }
.timeline-label { padding: 22px 14px 22px 0; color: #91a2c2; font: 700 11px Manrope, sans-serif; text-transform: uppercase; letter-spacing: .08em; border-right: 1px solid var(--line); }
.timeline-items { position: relative; padding-left: 26px; }
.timeline-items::before { content: ""; position: absolute; left: 9px; top: 25px; bottom: 25px; width: 1px; background: #24406e; }
.timeline-entry { position: relative; padding: 20px 0; }
.timeline-entry + .timeline-entry { border-top: 1px solid #10234d; }
.timeline-entry::before { content: ""; position: absolute; left: -21px; top: 27px; width: 8px; height: 8px; background: #4dd0e1; border: 3px solid #061032; outline: 1px solid #2c5c78; }
.timeline-entry-top { display: flex; align-items: center; gap: 7px; color: #7181a3; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.timeline-entry h4 { margin: 8px 0 6px; font: 700 17px/1.45 Manrope, sans-serif; }
.timeline-entry p { margin: 0; color: #97a5bf; font-size: 13px; line-height: 1.65; }
.timeline-entry a { display: inline-block; margin-top: 9px; color: var(--accent); font-size: 12px; text-decoration: none; }

.loading-state, .empty-state { min-height: 360px; border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #939fba; }
.loading-state strong, .empty-state h3 { color: #e5ebf8; margin: 13px 0 6px; font: 700 15px Manrope, sans-serif; }
.loading-state small, .empty-state p { color: #697a9d; font-size: 11px; }
.scanner { width: 42px; height: 42px; border: 1px solid #2a3d68; position: relative; overflow: hidden; }
.scanner::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: scan 1.2s ease-in-out infinite; }
.scanner span { position: absolute; inset: 8px; border: 1px solid #1c315c; }
.empty-icon { font: 400 34px Manrope; color: #4d6088; }
@keyframes scan { 0% { top: 5px; } 50% { top: 35px; } 100% { top: 5px; } }

/* Keep scrolling available but never render visible scrollbars. */
html, body, * { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar, *::-webkit-scrollbar { width: 0 !important; height: 0 !important; display: none !important; }

@media (max-width: 980px) {
  .summary-row { align-items: flex-start; flex-direction: column; }
  .summary-actions { width: 100%; }
  .watch-btn { flex: 1; justify-content: center; }
  .recent-grid { grid-template-columns: 1fr; }
  .recent-card + .recent-card { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 800px) {
  main { width: min(100% - 28px, 1280px); }
  .topbar { padding: 0 14px; }
  .live-dot { display: none; }
  .hero { padding: 55px 0 48px; }
  .hero h1 { font-size: 40px; }
  .search-panel { flex-direction: column; }
  .primary-btn { justify-content: center; }
  .summary-actions { flex-direction: column; }
  .summary-stats { width: 100%; }
  .summary-stats > div { flex: 1; }
  .content-grid { grid-template-columns: 1fr; }
  .filters-card { display: block; }
  .toolbar { align-items: flex-start; flex-direction: column; padding: 10px 0; }
  .tabs { width: 100%; gap: 18px; overflow-x: auto; }
  .tabs button { min-height: 36px; white-space: nowrap; }
  .mini-search { width: 100%; border-top: 1px solid var(--line-soft); padding-top: 10px; }
  .mini-search input { width: 100%; }
  .result-card { padding-left: 0; padding-right: 0; }
  .card-meta { flex-wrap: wrap; }
  .open-link { width: 100%; margin: 5px 0 0; }
  .project-details { grid-template-columns: 1fr; width: 100%; }
  .detail-item + .detail-item { border-left: 0; border-top: 1px solid var(--line); }
  .timeline-month { grid-template-columns: 1fr; }
  .timeline-label { border-right: 0; border-bottom: 1px solid var(--line); padding: 14px 0 9px; }
  .timeline-items { padding-left: 24px; }
  .dropdown-menu { max-height: 260px; }
}

/* Deep search, visit state, regulation metadata and source coverage */
.visit-status { border: 1px solid #254b73; background: #081a3f; min-height: 54px; padding: 10px 13px; display: flex; align-items: center; gap: 11px; margin: 0 0 22px; }
.visit-status-mark, .new-pill { background: var(--accent); color: #061025; border: 1px solid var(--accent); font-size: 8px; font-weight: 900; letter-spacing: .1em; padding: 4px 6px; }
.visit-status > div { min-width: 0; }
.visit-status strong { display: block; font: 700 11px Manrope, sans-serif; color: #e7edf9; }
.visit-status small { display: block; margin-top: 3px; color: #8191b1; font-size: 10px; }

.coverage-box { border: 1px solid var(--line); background: #08153a; padding: 10px; margin-bottom: 13px; }
.coverage-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.coverage-top strong { font-size: 10px; color: #cbd5e8; }
.coverage-top span { font-size: 10px; color: var(--accent); font-weight: 800; }
.coverage-track { height: 3px; background: #162952; margin: 8px 0; overflow: hidden; }
.coverage-track span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .2s ease; }
.coverage-box small { display: block; color: #64769b; font-size: 9px; line-height: 1.45; }

.search-tools { display: flex; align-items: stretch; gap: 6px; }
.mini-search { min-height: 34px; border: 1px solid transparent; padding: 0 7px; }
.mini-search:focus-within { border-color: #294572; background: #08163a; }
.document-search-btn { min-height: 34px; border: 1px solid var(--line); background: #08153a; color: #9eabc3; display: inline-flex; align-items: center; gap: 6px; padding: 0 9px; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; cursor: pointer; }
.document-search-btn:hover { border-color: #3b5a8b; background: var(--panel-2); color: #eef4ff; }
.document-search-btn:disabled { opacity: .55; cursor: wait; }
.document-search-btn svg { width: 13px; height: 13px; }

.document-panel { border: 1px solid #25446f; border-top: 0; background: #071437; padding: 14px; }
.document-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.document-panel-head > div > span { display: block; color: var(--accent); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.document-panel-head > div > strong { display: block; color: #e6edf9; font: 700 13px Manrope, sans-serif; margin-top: 3px; }
.document-panel-head > button { width: 28px; height: 28px; border: 1px solid var(--line); background: transparent; color: #8494b2; cursor: pointer; font-size: 18px; }
.document-panel-head > button:hover { color: #fff; background: var(--panel-2); }
.document-panel > p { color: #788aab; margin: 8px 0 12px; font-size: 10px; }
.document-results { display: grid; border-top: 1px solid var(--line-soft); }
.document-hit { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); text-decoration: none; color: inherit; }
.document-hit:hover .document-hit-title { color: var(--accent); }
.document-kind { align-self: start; min-width: 37px; border: 1px solid #32547d; color: #94b7d7; padding: 4px 5px; font-size: 8px; font-weight: 800; text-align: center; }
.document-hit-body { min-width: 0; }
.document-hit-title { color: #e2e9f7; font: 700 13px/1.45 Manrope, sans-serif; }
.document-hit-body p { color: #8998b5; font-size: 12px; line-height: 1.6; margin: 6px 0 0; }
.document-hit-body small { color: #62759a; font-size: 10px; display: block; margin-top: 6px; }
.document-hit-actions { display: flex; gap: 7px; margin-top: 9px; }
.document-hit-actions a { border: 1px solid #2b4774; color: #bcd0e7; text-decoration: none; padding: 5px 8px; font-size: 10px; font-weight: 700; }
.document-hit-actions a:hover { border-color: #4b728d; color: var(--accent); }
.document-page { color: #7c8dab; font-size: 9px; white-space: nowrap; padding-top: 3px; }
.document-empty { padding: 14px 0 2px; color: #7b8cab; font-size: 10px; }

.regulation-pill { min-height: 25px; display: inline-flex; align-items: center; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; border: 1px solid; padding: 4px 7px; }
.regulation-pill.temporary { border-color: #715b31; color: #efcb77; background: #241f2c; }
.regulation-pill.permanent { border-color: #315e5a; color: #83dcb4; background: #0b2333; }
.new-pill { min-height: 25px; display: inline-flex; align-items: center; }

@media (max-width: 800px) {
  .search-tools { width: 100%; }
  .search-tools .mini-search { flex: 1; }
  .document-search-btn { flex: none; }
  .document-hit { grid-template-columns: auto 1fr; }
  .document-page { grid-column: 2; padding-top: 0; }
  .visit-status { align-items: flex-start; }
}

@media (max-width: 1100px) { main { width: min(100% - 28px, 1560px); } .content-grid { grid-template-columns: 240px minmax(0, 1fr); gap: 24px; } .result-card { padding-left: 10px; padding-right: 10px; } }

/* Nationwide search */
.global-search-block { max-width: 750px; margin: 24px auto 0; }
.global-search-label { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; color: #6f82aa; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.global-search-label span { height: 1px; background: var(--line-soft); }
.global-search-panel { margin-top: 12px; display: flex; gap: 8px; }
.global-search-field { height: 48px; flex: 1; border: 1px solid var(--line); background: #08153a; display: flex; align-items: center; gap: 10px; padding: 0 14px; }
.global-search-field:focus-within { border-color: #3b5d8e; background: #0a183e; }
.global-search-field svg { width: 17px; height: 17px; color: var(--accent); flex: none; }
.global-search-field input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 14px; }
.global-search-field input::placeholder { color: #66789d; }
.global-search-btn { min-width: 168px; height: 48px; border: 1px solid #2c6076; background: transparent; color: var(--accent); display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 16px; cursor: pointer; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.global-search-btn:hover { border-color: var(--accent); background: #0a1e43; color: var(--accent-2); }
.global-search-btn svg { width: 15px; height: 15px; }


.card-meta .municipality-name { color: inherit; font-weight: inherit; }
.global-mode .watch-btn { display: none; }
.global-mode .visit-status { display: none !important; }
.global-mode .recent-section .section-kicker { color: #83a8d1; }

@media (max-width: 800px) {
  .global-search-panel { flex-direction: column; }
  .global-search-btn { width: 100%; }
}

/* 2026 UI refresh — cleaner hierarchy, wider layout, touch-friendly controls */
:root {
  --bg: #061032;
  --panel: #0a173d;
  --panel-2: #0d1d49;
  --panel-3: #102453;
  --line: #213967;
  --line-soft: #142653;
  --text: #f5f7ff;
  --muted: #aeb9d0;
  --subtle: #7d8fb3;
}

body { font-size: 16px; line-height: 1.5; }
button, input { font-size: 15px; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.topbar {
  height: 72px;
  padding-left: max(18px, calc((100vw - 1720px) / 2));
  padding-right: max(18px, calc((100vw - 1720px) / 2));
  border-bottom-color: #18305e;
}
.brand-logo { width: 205px; height: 58px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.pwa-install-btn {
  min-height: 40px;
  border: 1px solid #2d5673;
  background: #08183d;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  cursor: pointer;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .02em;
}
.pwa-install-btn:hover { background: #0d214b; border-color: var(--accent); color: var(--accent-2); }
.pwa-install-btn svg { width: 16px; height: 16px; }

main { width: min(1720px, calc(100% - 32px)); }
.hero { max-width: 1180px; padding: 64px 0 50px; }
.hero h1 { font-size: clamp(42px, 5vw, 68px); margin-top: 10px; }
.hero > p { max-width: 780px; font-size: 18px; line-height: 1.65; }
.eyebrow, .section-kicker { font-size: 12px; }

.search-panel, .global-search-block { max-width: 900px; }
.search-panel { gap: 10px; margin-top: 32px; }
.municipality-field, .primary-btn { height: 60px; }
.municipality-field { padding-left: 18px; gap: 13px; background: #08163a; border-color: #28446f; }
.municipality-field .location-icon { width: 20px; height: 20px; }
.municipality-input-display, .municipality-field input { font-size: 17px; }
.dropdown-toggle { width: 54px; height: 58px; }
.primary-btn { padding: 0 28px; min-width: 150px; justify-content: center; font-size: 15px; }
.quick-picks { gap: 8px; margin-top: 16px; }
.quick-picks button { padding: 8px 12px; font-size: 12px; }
.dropdown-menu, .custom-select-menu { max-height: 340px; border-color: #31507f; }
.municipality-menu button, .custom-select-menu button { min-height: 46px; padding: 12px 14px; font-size: 14px; }
.municipality-menu button small { font-size: 11px; }

.global-search-block { margin-top: 28px; }
.global-search-label { font-size: 10px; gap: 14px; }
.global-search-panel { gap: 10px; }
.global-search-field, .global-search-btn { height: 52px; }
.global-search-field { padding: 0 16px; }
.global-search-field input { font-size: 15px; }
.global-search-btn { min-width: 190px; font-size: 12px; }

.dashboard { padding-bottom: 110px; }
.summary-row { padding: 28px 0 24px; scroll-margin-top: 90px; align-items: center; }
.summary-row h2 { font-size: 32px; margin: 8px 0 6px; }
.last-update { font-size: 13px; }
.summary-actions { gap: 10px; }
.watch-btn { min-height: 50px; font-size: 12px; padding: 0 16px; }
.summary-stats > div { min-width: 108px; padding: 11px 16px; }
.summary-stats strong { font-size: 20px; }
.summary-stats span { font-size: 10px; }
.visit-status { min-height: 62px; padding: 12px 15px; margin-bottom: 26px; }
.visit-status strong { font-size: 13px; }
.visit-status small { font-size: 11px; }

.recent-section { padding: 24px 0 28px; margin-bottom: 30px; }
.section-heading { margin-bottom: 16px; }
.section-heading h3 { font-size: 22px; }
.section-count { font-size: 11px; }
.recent-grid { gap: 0; }
.recent-card { padding: 18px 19px; min-height: 112px; }
.recent-card-top span { font-size: 10px; }
.recent-card strong { font-size: 15px; line-height: 1.4; }
.recent-card small { font-size: 11px; }

.content-grid { grid-template-columns: 300px minmax(0, 1fr); gap: 30px; }
.filters-card {
  position: sticky;
  top: 92px;
  align-self: start;
  border: 1px solid var(--line);
  background: #071438;
  padding: 18px;
}
.filter-title { font-size: 17px; margin-bottom: 18px; }
.filter-group { padding-bottom: 18px; margin-bottom: 18px; }
.filter-group:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.filter-group > label { font-size: 11px; margin-bottom: 9px; }
.street-search, .custom-select-trigger { min-height: 46px; }
.street-search input, .custom-select-trigger { font-size: 14px; }
.check-item { min-height: 38px; padding: 7px 0; font-size: 14px; }
.filter-icon { width: 16px; height: 16px; }
.count-badge { font-size: 11px; }
.source-line { font-size: 13px; }
.coverage-box { padding: 12px; }
.coverage-top strong, .coverage-top span { font-size: 11px; }
.coverage-box small { font-size: 10px; }

.results-column { min-width: 0; }
.toolbar {
  min-height: 58px;
  border: 1px solid var(--line);
  background: #071438;
  padding: 0 14px;
  margin-bottom: 14px;
}
.tabs { min-height: 56px; gap: 26px; }
.tabs button { font-size: 14px; font-weight: 700; }
.search-tools { gap: 8px; }
.mini-search { min-height: 40px; border: 1px solid #1b3561; background: #08163a; padding: 0 10px; }
.mini-search input { width: 270px; font-size: 14px; }
.document-search-btn { min-height: 40px; padding: 0 12px; font-size: 10px; }
.active-filters { padding: 10px 0 14px; border-bottom: 0; }
.active-filter { padding: 6px 8px; font-size: 10px; }

.results-list { gap: 14px; }
.result-card {
  padding: 22px 24px;
  border: 1px solid var(--line);
  background: #08153a;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.result-card:hover { background: #0a1942; border-color: #31507f; transform: translateY(-1px); }
.card-topline { align-items: flex-start; }
.category-pill, .source-type-pill, .status-pill, .regulation-pill, .new-pill { min-height: 27px; font-size: 9px; padding: 5px 8px; }
.relevance { font-size: 11px; }
.result-card h3 { font-size: 21px; line-height: 1.38; margin: 14px 0 10px; max-width: none; }
.summary { font-size: 15px; line-height: 1.7; max-width: 1200px; color: #b3bfd5; }
.summary-toggle { font-size: 13px; margin-top: 10px; }
.project-details { max-width: none; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-top: 18px; }
.detail-item { min-height: 72px; padding: 12px 14px; background: #071438; }
.detail-item span { font-size: 10px; }
.detail-item strong { font-size: 14px; }
.document-actions { margin-top: 18px; }
.document-actions a { min-height: 42px; padding: 0 13px; font-size: 13px; }
.card-meta { margin-top: 18px; padding-top: 14px; border-top: 1px solid #142957; font-size: 13px; }
.open-link { color: var(--accent); }

.related-group { border: 1px solid var(--line); background: #071438; }
.related-head { min-height: 62px; padding: 0 16px; background: #08163a; }
.related-title { font-size: 15px; }
.related-count { font-size: 11px; }
.related-items { padding: 12px; display: grid; gap: 10px; }
.related-items.hidden { display: none !important; }
.related-items .result-card { border: 1px solid #1a3462; }

.timeline-view { gap: 14px; }
.timeline-month { border: 1px solid var(--line); background: #071438; grid-template-columns: 150px 1fr; }
.timeline-label { padding: 22px 16px; font-size: 12px; }
.timeline-items { padding-right: 20px; }
.timeline-entry h4 { font-size: 19px; }
.timeline-entry p { font-size: 14px; }
.timeline-entry a { font-size: 13px; }

.document-panel { border: 1px solid #31507f; background: #071438; padding: 18px; margin-bottom: 14px; }
.document-panel-head > div > span { font-size: 9px; }
.document-panel-head > div > strong { font-size: 16px; }
.document-panel > p { font-size: 12px; }
.document-hit { grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; padding: 16px 0; }
.document-kind { min-width: 44px; font-size: 9px; padding: 5px 7px; }
.document-hit-title { font-size: 15px; }
.document-hit-body p { font-size: 13px; }
.document-hit-body small { font-size: 11px; }
.document-hit-actions a { min-height: 34px; display: inline-flex; align-items: center; padding: 0 10px; font-size: 11px; }
.document-page { font-size: 10px; }

.loading-state, .empty-state { min-height: 380px; border: 1px solid var(--line); background: #071438; }
.loading-state strong, .empty-state h3 { font-size: 18px; }
.loading-state small, .empty-state p { font-size: 13px; }

.app-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  max-width: min(420px, calc(100vw - 36px));
  border: 1px solid #315a7a;
  background: #08183d;
  color: #e8eef9;
  padding: 12px 14px;
  font-size: 13px;
  box-shadow: 0 18px 42px rgba(0,0,0,.35);
}

@media (max-width: 1180px) {
  main { width: min(100% - 28px, 1720px); }
  .content-grid { grid-template-columns: 260px minmax(0, 1fr); gap: 22px; }
  .filters-card { padding: 15px; }
  .summary-actions { width: auto; }
}

@media (max-width: 900px) {
  .topbar { height: 66px; padding: 0 14px; }
  .brand-logo { width: 178px; height: 50px; }
  .pwa-install-btn span { display: none; }
  .pwa-install-btn { width: 40px; padding: 0; justify-content: center; }
  .hero { padding: 48px 0 38px; }
  .hero h1 { font-size: clamp(38px, 8vw, 52px); }
  .hero > p { font-size: 16px; }
  .summary-row { padding-top: 24px; align-items: flex-start; }
  .summary-row h2 { font-size: 28px; }
  .content-grid { grid-template-columns: 1fr; }
  .filters-card { position: static; top: auto; }
  .recent-grid { grid-template-columns: 1fr; }
  .recent-card + .recent-card { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 720px) {
  main { width: min(100% - 20px, 1720px); }
  .topbar { padding: 0 10px; }
  .brand-logo { width: 160px; }
  .hero { padding: 38px 0 30px; }
  .eyebrow { font-size: 10px; }
  .hero h1 { margin-top: 8px; font-size: 38px; }
  .hero > p { font-size: 15px; line-height: 1.55; }
  .search-panel, .global-search-panel { flex-direction: column; }
  .municipality-field, .primary-btn { width: 100%; }
  .primary-btn { min-height: 54px; height: 54px; }
  .global-search-btn { width: 100%; }
  .quick-picks { justify-content: flex-start; }
  .summary-row { gap: 16px; }
  .summary-actions { width: 100%; flex-direction: column; }
  .watch-btn { width: 100%; justify-content: center; }
  .summary-stats { width: 100%; }
  .summary-stats > div { min-width: 0; flex: 1; padding: 10px; }
  .summary-stats strong { font-size: 18px; }
  .summary-stats span { font-size: 9px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .filters-card { padding: 14px; }
  .toolbar { padding: 10px 12px; align-items: stretch; }
  .tabs { width: 100%; min-height: 42px; gap: 20px; overflow-x: auto; }
  .tabs button { min-height: 42px; white-space: nowrap; }
  .search-tools { width: 100%; }
  .mini-search { flex: 1; }
  .mini-search input { width: 100%; }
  .document-search-btn { flex: none; }
  .result-card { padding: 18px 16px; }
  .result-card h3 { font-size: 19px; }
  .summary { font-size: 14px; }
  .card-topline { flex-direction: column; gap: 8px; }
  .relevance { align-self: flex-start; }
  .project-details { grid-template-columns: 1fr; }
  .document-actions { flex-direction: column; align-items: stretch; }
  .document-actions a { justify-content: center; }
  .card-meta { flex-wrap: wrap; gap: 6px; }
  .open-link { width: 100%; margin: 6px 0 0; }
  .related-head { grid-template-columns: minmax(0, 1fr) 18px; }
  .related-count { grid-column: 1; grid-row: 2; padding-bottom: 10px; }
  .related-head svg { grid-column: 2; grid-row: 1 / span 2; }
  .timeline-month { grid-template-columns: 1fr; }
  .timeline-label { border-right: 0; border-bottom: 1px solid var(--line); padding: 13px 15px; }
  .timeline-items { padding: 0 16px 0 34px; }
  .document-hit { grid-template-columns: auto 1fr; }
  .document-page { grid-column: 2; }
}

@media (display-mode: standalone) {
  .pwa-install-btn { display: none !important; }
  body { min-height: 100dvh; }
}

/* Account, pinned municipalities and reminders */
.topbar-leading { display: flex; align-items: center; min-width: 0; gap: 18px; height: 100%; }
.account-shell { position: relative; display: flex; align-items: center; height: 100%; }
.google-login-btn,
.account-button {
  height: 40px;
  border: 1px solid #28446f;
  background: #08163a;
  color: #dce5f7;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  cursor: pointer;
  min-width: 0;
}
.google-login-btn:hover,
.account-button:hover,
.account-shell.open .account-button { border-color: #3d6682; background: #0b1b45; color: #fff; }
.google-login-btn svg { width: 17px; height: 17px; color: var(--accent); flex: none; }
.account-button img { width: 25px; height: 25px; object-fit: cover; background: #102453; flex: none; }
.account-button img:not([src]) { display: none; }
.account-button > span { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; }
.account-chevron { width: 14px; height: 14px; color: #7f90b1; transition: transform .15s ease; }
.account-shell.open .account-chevron { transform: rotate(180deg); }

.account-menu {
  position: absolute;
  top: calc(100% - 5px);
  left: 0;
  width: 340px;
  max-height: min(620px, calc(100vh - 82px));
  overflow: auto;
  background: #071438;
  border: 1px solid #31507f;
  box-shadow: 0 18px 46px rgba(0,0,0,.38);
  z-index: 95;
}
.account-menu-profile { padding: 15px 16px; border-bottom: 1px solid var(--line); }
.account-menu-profile strong { display: block; font: 700 14px/1.35 Manrope, sans-serif; color: var(--text); overflow-wrap: anywhere; }
.account-menu-profile small { display: block; margin-top: 4px; color: var(--subtle); font-size: 11px; overflow-wrap: anywhere; }
.account-list-section { padding: 12px 0 2px; border-bottom: 1px solid var(--line-soft); }
.account-section-title { display: flex; align-items: center; gap: 8px; padding: 0 14px 8px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.account-section-title svg { width: 14px; height: 14px; flex: none; }
.account-list { display: grid; }
.account-list-row { display: grid; grid-template-columns: minmax(0,1fr) 38px; border-top: 1px solid #122653; }
.account-list-open,
.account-list-remove { border: 0; background: transparent; cursor: pointer; }
.account-list-open { min-width: 0; min-height: 43px; display: flex; align-items: center; gap: 9px; padding: 8px 12px 8px 14px; text-align: left; color: #cad4e8; }
.account-list-open:hover { background: #0b1d49; color: #fff; }
.account-list-open svg { width: 14px; height: 14px; color: var(--accent); flex: none; }
.account-list-open span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.account-list-remove { border-left: 1px solid #122653; color: #7586a9; font-size: 18px; }
.account-list-remove:hover { background: #1a1734; color: #f09a9a; }
.account-list-empty { padding: 10px 14px 14px; color: #687a9f; font-size: 11px; }
.account-logout { width: 100%; min-height: 43px; border: 0; background: transparent; color: #aebbd3; text-align: left; padding: 0 14px; cursor: pointer; font-size: 12px; font-weight: 700; }
.account-logout:hover { background: #0b1d49; color: #fff; }

.pinned-block { max-width: 900px; margin: 17px auto 0; border-top: 1px solid var(--line-soft); padding-top: 13px; }
.pinned-block-label { display: flex; align-items: center; justify-content: center; gap: 7px; color: #7d8eaf; font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.pinned-block-label svg { width: 14px; height: 14px; color: var(--accent); }
.pinned-municipalities { margin-top: 9px; }
.pinned-municipalities .pinned-municipality {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid #2b5271;
  background: #07183c;
  color: #d8e1f1;
  font-size: 12px;
}
.pinned-municipalities .pinned-municipality:hover { border-color: var(--accent); background: #092044; }
.pinned-municipality .pinned-pin-icon { width: 15px; height: 15px; color: var(--accent); flex: none; }
.pinned-municipality > span { display: inline-flex; align-items: baseline; gap: .28em; }
.pinned-municipality .municipality-prefix { color: #cbd5e9; }
.pinned-municipality .municipality-accent-name { color: var(--accent); font-weight: 700; }
.pinned-municipality b { font-size: 8px; letter-spacing: .08em; color: #7790ae; border-left: 1px solid #284462; padding-left: 8px; }

.pin-btn { min-height: 51px; border: 1px solid var(--line); background: var(--panel); padding: 0 15px; color: #b9c5dc; display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 11px; font-weight: 700; }
.pin-btn:hover { background: var(--panel-2); border-color: #385484; color: #fff; }
.pin-btn.active { border-color: #2f6f7b; background: #09213c; color: var(--accent); }
.pin-btn svg { width: 16px; height: 16px; }

@media (max-width: 1050px) {
  .topbar-leading { gap: 10px; }
  .account-button > span { max-width: 105px; }
  .brand-logo { width: 162px; }
}

@media (max-width: 720px) {
  .topbar-leading { gap: 8px; }
  .brand-logo { width: 126px; }
  .google-login-btn { width: 40px; padding: 0; justify-content: center; }
  .google-login-btn span { display: none; }
  .account-button { width: 40px; padding: 0; justify-content: center; }
  .account-button > span,
  .account-button .account-chevron { display: none; }
  .account-button img { width: 26px; height: 26px; }
  .account-menu { position: fixed; left: 10px; right: 10px; top: 60px; width: auto; max-height: calc(100dvh - 72px); }
  .pinned-block-label { justify-content: flex-start; }
  .pinned-municipalities { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .pinned-municipalities .pinned-municipality { flex: 0 0 auto; }
  .pin-btn { width: 100%; justify-content: center; }
}

/* Search/input polish, mobile controls and account placement */
.topbar-leading { flex: 1 1 auto; }
.topbar-actions { margin-left: auto; }
.account-menu { left: auto; right: 0; }
.google-login-btn { min-width: 92px; justify-content: center; font-size: 13px; font-weight: 700; padding: 0 16px; }

/* Keep the custom accent display when idle, but make the real field readable while typing. */
.municipality-field input:focus { color: var(--text); }
.municipality-input-wrap:focus-within .municipality-input-display { opacity: 0; }
.municipality-input-display { transition: opacity .08s ease; }

/* Search fields should not gain an extra active frame/line when clicked. */
.municipality-field:focus-within,
.municipality-field.open { border-color: #28446f; box-shadow: none; }
.global-search-field:focus-within { border-color: var(--line); background: #08153a; }
.street-search:focus-within { border-color: var(--line); background: var(--panel); }
.mini-search:focus-within { border-color: var(--line); background: #08163a; }
input:focus-visible { outline: none !important; box-shadow: none !important; }
button:focus-visible,
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Loading replaces the previous municipality data instead of leaving stale content on screen. */
.search-skeleton-line,
.search-skeleton-block {
  display: block;
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(67, 93, 146, .18) 18%, rgba(77, 208, 225, .26) 46%, rgba(67, 93, 146, .18) 74%);
  background-size: 220% 100%;
  animation: municipalitySkeleton 1.15s linear infinite;
}
.search-skeleton-line { height: 12px; }
.search-skeleton-line.title { width: min(390px, 72vw); height: 30px; }
.search-skeleton-line.meta { width: min(260px, 55vw); height: 11px; margin-top: 9px; }
.search-skeleton-line.stat { width: 42px; height: 21px; }
.search-skeleton-line.small { height: 9px; }
.search-skeleton-block { min-height: 138px; border: 1px solid #162b58; background-color: #071438; }
@keyframes municipalitySkeleton { to { background-position: -220% 0; } }

.dashboard.is-search-loading .pin-btn,
.dashboard.is-search-loading .watch-btn { opacity: .35; pointer-events: none; }
.dashboard.is-search-loading .toolbar { opacity: .48; pointer-events: none; }

.loading-recent-card { min-height: 112px; padding: 17px; background: #071438; }
.loading-recent-card + .loading-recent-card { border-left: 1px solid var(--line); }
.loading-recent-card .search-skeleton-line + .search-skeleton-line { margin-top: 10px; }
.loading-source-line { display: grid; grid-template-columns: 1fr 32px; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.loading-result-card { padding: 22px 20px; border-bottom: 1px solid var(--line); background: #071438; }
.loading-result-card .search-skeleton-line + .search-skeleton-line { margin-top: 12px; }
.loading-result-card .loading-lines { display: grid; gap: 8px; margin-top: 18px; }
.loading-category-list { display: grid; gap: 11px; }
.loading-category-row { display: grid; grid-template-columns: 1fr 30px; gap: 12px; align-items: center; }

@media (max-width: 720px) {
  .topbar-actions { gap: 6px; }
  .google-login-btn { width: auto; min-width: 78px; height: 38px; padding: 0 12px; font-size: 12px; }
  .account-menu { position: fixed; left: 10px; right: 10px; top: 60px; width: auto; max-height: calc(100dvh - 72px); }

  /* Municipality search stays on one row; the action is a compact icon button. */
  .search-panel { display: grid; grid-template-columns: minmax(0, 1fr) 54px; gap: 8px; align-items: stretch; }
  .municipality-field { width: 100%; min-width: 0; height: 56px; }
  .municipality-field .dropdown-toggle { width: 42px; height: 54px; }
  .primary-btn { width: 54px; min-width: 54px; height: 56px; min-height: 56px; padding: 0; justify-content: center; }
  .primary-btn span { display: none; }
  .primary-btn svg { width: 20px; height: 20px; }

  /* Give the global search a proper touch target instead of the thin mobile field. */
  .global-search-panel { gap: 9px; }
  .global-search-field { min-height: 58px; height: 58px; padding: 0 15px; }
  .global-search-field input { min-height: 54px; font-size: 16px; }
  .global-search-btn { min-height: 52px; }

  .loading-recent-card:nth-child(3) { display: none; }
  .recent-grid.is-loading-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 430px) {
  .brand-logo { width: 116px; }
  .pwa-install-btn span { display: none; }
  .pwa-install-btn { width: 38px; padding: 0; justify-content: center; }
  .account-button > span { display: none; }
}

/* Preserve the accent-formatted municipality after selection, while manual typing stays visible. */
.municipality-field.has-selected-value .municipality-input-display { opacity: 1; }
.municipality-field.has-selected-value input,
.municipality-field.has-selected-value input:focus { color: transparent; }
.municipality-field.has-selected-value .municipality-input-wrap:focus-within .municipality-input-display { opacity: 1; }

/* Account navigation: dropdown is navigation only; lists live on dedicated views. */
.account-menu { width: 260px; padding: 5px 0; overflow: hidden; }
.account-menu-profile,
.account-list-section { display: none !important; }
.account-nav-item {
  width: 100%;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: #cbd5e8;
  display: grid;
  grid-template-columns: 20px minmax(0,1fr) 16px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  text-align: left;
  cursor: pointer;
  font: 700 12px/1.2 Inter, sans-serif;
}
.account-nav-item:hover { background: #0b1d49; color: #fff; }
.account-nav-item > svg:first-child { width: 17px; height: 17px; color: var(--accent); }
.account-nav-item .account-nav-arrow { width: 14px; height: 14px; color: #65779d; }
.account-logout { border-top: 1px solid var(--line-soft); margin-top: 5px; }

.account-page {
  width: min(1180px, calc(100% - 48px));
  margin: 34px auto 70px;
}
.account-page-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.account-page-head h2 { margin: 3px 0 0; font: 800 26px/1.1 Manrope, sans-serif; }
.account-page-back {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: #071438;
  color: #cbd6eb;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.account-page-back:hover { border-color: var(--accent); color: var(--accent); }
.account-page-back svg { width: 19px; height: 19px; }
.account-page-list { margin-top: 18px; border-top: 1px solid var(--line-soft); }
.account-page-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) 48px;
  min-height: 58px;
  border-bottom: 1px solid var(--line-soft);
  background: #071438;
}
.account-page-open,
.account-page-remove { border: 0; background: transparent; cursor: pointer; }
.account-page-open {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 0 16px;
  color: #d6dfef;
  text-align: left;
}
.account-page-open:hover { background: #0a1a43; }
.account-page-open > svg { width: 17px; height: 17px; color: var(--accent); flex: none; }
.account-page-open > span { min-width: 0; display: inline-flex; gap: .3em; align-items: baseline; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.account-page-open .municipality-accent-name { color: var(--accent); font-weight: 700; }
.account-page-remove { border-left: 1px solid var(--line-soft); color: #6f80a2; display: grid; place-items: center; }
.account-page-remove:hover { color: #fff; background: #0b1d49; }
.account-page-remove svg { width: 16px; height: 16px; }
.account-page-empty { padding: 36px 16px; color: #7e8eae; text-align: center; font-size: 13px; border-bottom: 1px solid var(--line-soft); }

/* Pinned municipalities sit directly under search, without an extra heading. */
.pinned-block { margin: 13px auto 0; padding-top: 0; border-top: 0; }
.pinned-block-label { display: none !important; }
.pinned-municipalities { margin-top: 0; }

/* Custom square checkbox: neutral gray off, accent on. */
.check-item .custom-check-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}
.custom-check {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  border: 1px solid #59698a;
  background: #0a1738;
  color: transparent;
  display: grid;
  place-items: center;
  transition: border-color .12s ease, background-color .12s ease, color .12s ease;
}
.custom-check svg { width: 13px; height: 13px; stroke-width: 2.6; }
.custom-check-input:checked + .custom-check {
  border-color: var(--accent);
  background: var(--accent);
  color: #061032;
}
.check-item:hover .custom-check { border-color: #8594b1; }
.check-item:hover .custom-check-input:checked + .custom-check { border-color: var(--accent); }
.custom-check-input:focus-visible + .custom-check { outline: 1px solid var(--accent); outline-offset: 2px; }

/* Safari/iPhone-safe search skeletons: no blur/filter or bright color interpolation. */
.search-skeleton-line,
.search-skeleton-block {
  filter: none !important;
  -webkit-filter: none !important;
  background-image: linear-gradient(90deg, #10214a 0%, #10214a 35%, #1b315e 50%, #10214a 65%, #10214a 100%) !important;
  background-color: #10214a !important;
  background-size: 240% 100% !important;
  animation: municipalitySkeletonSafe 1.2s ease-in-out infinite !important;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
@keyframes municipalitySkeletonSafe {
  0% { background-position: 100% 0; }
  100% { background-position: -140% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .search-skeleton-line,
  .search-skeleton-block { animation: none !important; }
}

@media (max-width: 720px) {
  .account-menu { left: auto; right: 10px; width: min(270px, calc(100vw - 20px)); }
  .account-page { width: calc(100% - 24px); margin-top: 20px; }
  .account-page-head h2 { font-size: 22px; }
  .account-page-row { min-height: 56px; }
}
