:root {
  --bg: #ffffff;
  --ink: #14181f;
  --ink-2: #4a5361;
  --ink-3: #8a93a1;
  --line: #e7e9ee;
  --soft: #f4f5f7;
  --brand: #0f766e;
  --brand-soft: #e6f4f1;
  --up: #0f766e;
  --down: #d9480f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 12px 32px -8px rgba(16, 24, 40, .18);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: var(--font); color: var(--ink); -webkit-font-smoothing: antialiased; }
#map { position: fixed; inset: 0; background: #eef0f3; }
button { font: inherit; color: inherit; cursor: pointer; }
select { font: inherit; }
[hidden] { display: none !important; }

/* ---------- panel ---------- */
.panel {
  position: fixed; top: 16px; left: 16px; bottom: 16px; width: 372px; z-index: 5;
  display: flex; flex-direction: column;
  background: rgba(255, 255, 255, .97); backdrop-filter: blur(10px);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.brand { display: flex; gap: 12px; align-items: flex-start; padding: 18px 18px 12px; }
.logo { width: 36px; height: 36px; flex: none; }
.logo .bg { fill: var(--brand); }
.logo .bar { fill: #fff; }
.logo .dot { fill: #f2a541; }
.home { display: flex; gap: 12px; align-items: flex-start; flex: 1; min-width: 0; color: inherit; text-decoration: none; border-radius: 10px; }
.home .logo { transition: transform .15s ease; }
.home:hover .logo { transform: scale(1.06); }
.home:hover h1 { color: var(--brand); }
.home:active .logo { transform: scale(.96); }
.brand h1 { margin: 0; font-size: 19px; letter-spacing: -.02em; font-weight: 700; }
.brand h1 span { color: var(--brand); font-weight: 600; }
.tagline { margin: 2px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.home > div { flex: 1; min-width: 0; }
.icon-btn {
  width: 28px; height: 28px; flex: none; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-size: 14px; font-weight: 600; line-height: 1;
  display: grid; place-items: center;
}
.icon-btn:hover { background: var(--soft); color: var(--ink); }

.cities { display: flex; gap: 4px; padding: 0 18px 12px; flex-wrap: wrap; }
.cities button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 11px;
  font-size: 12.5px; font-weight: 500; color: var(--ink-2); transition: all .15s;
}
.cities button:hover { border-color: #cfd4dc; color: var(--ink); }
.cities button.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.tabs { display: flex; margin: 0 18px; border-bottom: 1px solid var(--line); }
.tab {
  flex: 1; background: none; border: 0; padding: 10px 0 11px; font-size: 13.5px; font-weight: 600;
  color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab.active { color: var(--ink); border-bottom-color: var(--brand); }

.scroll { flex: 1; overflow-y: auto; padding: 14px 18px 18px; scrollbar-width: thin; }
.field { margin-bottom: 14px; }
.label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 7px;
}
.link { background: none; border: 0; padding: 0; font-size: 11.5px; color: var(--brand); text-transform: none; letter-spacing: 0; font-weight: 500; }

.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff;
  border-radius: 8px; padding: 5px 9px; font-size: 12.5px; color: var(--ink-2); transition: all .12s;
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, #999); }
.chip:hover { border-color: #cfd4dc; color: var(--ink); }
.chip.on { border-color: var(--ink); color: var(--ink); background: var(--soft); font-weight: 500; box-shadow: inset 0 0 0 1px var(--ink); }

.seg { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--soft); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; border-radius: 7px; padding: 6px 2px; font-size: 12px; color: var(--ink-2); font-weight: 500; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); font-weight: 600; }

.period { display: flex; align-items: center; gap: 8px; }
.period select {
  flex: 1; appearance: none; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238a93a1' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center;
  font-size: 13px;
}
.arrow { color: var(--ink-3); }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px 0 8px; }
.kpi { background: var(--soft); border-radius: 10px; padding: 10px 12px; }
.kpi .k { font-size: 11.5px; color: var(--ink-2); }
.kpi .v { font-size: 21px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pos { color: var(--up) !important; }
.neg { color: var(--down) !important; }
.note { font-size: 12px; color: var(--ink-2); line-height: 1.45; margin: 4px 0 16px; }

.lists { display: grid; gap: 14px; }
h3 { font-size: 13px; margin: 0 0 6px; display: flex; align-items: center; gap: 7px; font-weight: 600; }
.top-h { margin-top: 4px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.up { background: var(--up); }
.dot.down { background: var(--down); }

.rank { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.rank li {
  counter-increment: r; display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 8px;
  padding: 7px 8px; margin: 0 -8px; border-radius: 8px; font-size: 13px; cursor: pointer;
}
.rank li::before { content: counter(r); font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rank li:hover, .rank li.sel { background: var(--soft); }
.rank .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .sub { display: block; font-size: 11.5px; color: var(--ink-3); }
.pill { font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.pill.up { background: var(--brand-soft); color: var(--up); }
.pill.down { background: #fdece4; color: var(--down); }
.pill.score { background: var(--ink); color: #fff; min-width: 34px; text-align: center; }
.empty { font-size: 12.5px; color: var(--ink-3); padding: 6px 0; }

.sliders { display: grid; gap: 10px; }
.slider { display: grid; grid-template-columns: 1fr 28px; gap: 2px 10px; align-items: center; }
.slider label { font-size: 12.5px; color: var(--ink); grid-column: 1 / -1; display: flex; justify-content: space-between; }
.slider label small { color: var(--ink-3); font-size: 11px; }
.slider input { grid-column: 1; width: 100%; accent-color: var(--brand); margin: 0; }
.slider output { font-size: 12px; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }

.foot { padding: 10px 18px; border-top: 1px solid var(--line); font-size: 11px; color: var(--ink-3); }
.foot a { color: inherit; }

/* ---------- detail drawer ---------- */
.detail {
  position: fixed; top: 16px; right: 16px; width: 372px; max-height: calc(100% - 32px); overflow-y: auto; z-index: 5;
  background: #f4f5f7; border-radius: var(--radius); box-shadow: var(--shadow); padding: 0; scrollbar-width: thin;
  animation: slide .18s ease-out;
}
@keyframes slide { from { opacity: 0; transform: translateX(12px); } }

.d-head {
  position: sticky; top: 0; z-index: 2; background: #fff; padding: 16px 56px 14px 18px;
  border-bottom: 1px solid var(--line);
}
.d-head .close { position: absolute; top: 14px; right: 14px; }
.d-eyebrow {
  display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-2); font-weight: 600; background: var(--soft); border-radius: 999px; padding: 3px 9px 3px 7px;
}
.d-eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.d-eyebrow i.site { background: #f2a541; }
.d-title { font-size: 21px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; margin: 8px 0 2px; }
.d-sub { font-size: 12.5px; color: var(--ink-3); }

.d-body { padding: 12px; display: grid; gap: 10px; }
.d-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 14px; }
.d-card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.d-card-h h4 { margin: 0; font-size: 13px; font-weight: 650; color: var(--ink); }
.d-meta { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.key { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.key.up { background: var(--up); }
.key.down { background: var(--down); margin-left: 6px; }
.d-foot { margin: 10px 0 0; font-size: 11.5px; color: var(--ink-3); line-height: 1.45; }

.score-big { display: flex; align-items: baseline; gap: 6px; margin-bottom: 10px; }
.score-big b { font-size: 40px; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.score-big span { font-size: 13px; color: var(--ink-3); }
.bars { display: grid; gap: 7px; }
.bar { display: grid; grid-template-columns: 128px 1fr 26px; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.bar .track { height: 7px; background: var(--soft); border-radius: 4px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--brand); border-radius: 4px; }
.bar.off { opacity: .45; }
.bar b { font-weight: 600; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }

.chart { width: 100%; height: auto; display: block; }
.chart text { font-size: 9.5px; fill: var(--ink-3); font-family: var(--font); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.stat { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.stat-l { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.stat b { font-size: 20px; line-height: 1.15; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat.pos { border-color: #bfe3da; background: #f3faf8; }
.stat.pos b { color: var(--up); }
.stat.neg { border-color: #f6d2c2; background: #fef6f2; }
.stat.neg b { color: var(--down); }
.stat-c { font-size: 11px; color: var(--ink-3); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; padding: 4px 5px 4px 9px; background: #fff;
}
.tag b { font-size: 11.5px; font-weight: 600; min-width: 20px; text-align: center; background: var(--soft); border-radius: 5px; padding: 1px 5px; font-variant-numeric: tabular-nums; }

.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.plist li:first-child { border-top: 0; padding-top: 2px; }
.pdot { width: 8px; height: 8px; border-radius: 50%; }
.pdot.up { background: var(--up); }
.pdot.down { background: var(--down); }
.pname { font-size: 13px; font-weight: 500; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.pname small { display: block; font-size: 11.5px; font-weight: 400; color: var(--ink-3); }
.pdate { font-size: 11.5px; color: var(--ink-2); background: var(--soft); border-radius: 6px; padding: 3px 7px; white-space: nowrap; font-variant-numeric: tabular-nums; }

.near { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.near div { display: flex; flex-direction: column; gap: 1px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.near div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.near b { font-size: 18px; line-height: 1.2; color: var(--ink); font-variant-numeric: tabular-nums; }
.near span { font-size: 12px; color: var(--ink-2); line-height: 1.3; }
.near .zero b { color: var(--ink-3); }

.osm-link {
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--brand); font-size: 13px; font-weight: 600; text-decoration: none;
}
.osm-link:hover { border-color: var(--brand); background: var(--brand-soft); }

/* ---------- legend / tooltip / loading ---------- */
.legend {
  position: fixed; right: 16px; bottom: 46px; z-index: 4; background: rgba(255,255,255,.96); border-radius: 10px;
  box-shadow: var(--shadow); padding: 10px 12px; font-size: 11.5px; color: var(--ink-2); min-width: 200px;
}
.legend .t { font-weight: 600; color: var(--ink); margin-bottom: 6px; font-size: 12px; }
.legend .ramp { height: 8px; border-radius: 4px; }
.legend .ticks { display: flex; justify-content: space-between; margin-top: 4px; font-variant-numeric: tabular-nums; }
.legend .pts { display: flex; gap: 10px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.legend .pts span { display: inline-flex; align-items: center; gap: 4px; }
.legend .pts i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.legend .hint { margin-top: 6px; color: var(--ink-3); font-size: 11px; }

.tooltip {
  position: fixed; z-index: 6; pointer-events: none; background: var(--ink); color: #fff; border-radius: 8px;
  padding: 7px 10px; font-size: 12px; line-height: 1.4; transform: translate(12px, 12px); max-width: 240px;
}
.tooltip b { font-weight: 600; }
.tooltip span { color: #b9c0cc; }

.loading {
  position: fixed; inset: 0; z-index: 20; display: grid; place-content: center; justify-items: center; gap: 12px;
  background: rgba(244,245,247,.85); font-size: 13px; color: var(--ink-2); transition: opacity .3s;
}
.loading.done { opacity: 0; pointer-events: none; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.modal { position: fixed; inset: 0; z-index: 30; background: rgba(20,24,31,.45); display: grid; place-items: center; padding: 20px; }
.modal-card { position: relative; background: #fff; border-radius: 16px; max-width: 560px; max-height: 85vh; overflow-y: auto; padding: 26px 28px; box-shadow: var(--shadow); font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.modal-card .close { position: absolute; top: 16px; right: 16px; }
.modal-card h2 { margin: 0 0 10px; color: var(--ink); font-size: 20px; letter-spacing: -.02em; }
.modal-card h4 { margin: 18px 0 6px; color: var(--ink); font-size: 14px; }
.modal-card ul { padding-left: 18px; margin: 0; }
.modal-card li { margin-bottom: 6px; }
.modal-card b { color: var(--ink); }

.maplibregl-ctrl-bottom-left { left: 400px; }

/* ---------- responsive: shared ---------- */
html, body { overscroll-behavior: none; }
body { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.grabber { display: none; }
.panel, .detail { padding-left: env(safe-area-inset-left); }

/* Touch screens: bigger targets */
@media (pointer: coarse) {
  .chip { padding: 8px 12px; font-size: 13px; }
  .seg button { min-height: 38px; }
  .cities button { padding: 8px 14px; font-size: 13px; }
  .rank li { padding: 10px 8px; }
  .slider input { height: 28px; }
  .icon-btn { width: 34px; height: 34px; }
  .tab { padding: 12px 0 13px; }
  .period select { padding: 9px 10px; }
}

/* Tablets and unfolded foldables (e.g. ~800px inner screens) */
@media (min-width: 761px) and (max-width: 1100px) {
  .panel { top: 12px; left: 12px; bottom: 12px; width: 324px; }
  .detail { top: 12px; right: 12px; width: 324px; }
  .bar { grid-template-columns: 104px 1fr 26px; }
  .maplibregl-ctrl-bottom-left { left: 348px; }
}

/* Phones in portrait and foldable cover screens: draggable bottom sheet */
@media (max-width: 760px) and (min-height: 521px) {
  .panel {
    top: auto; left: 0; right: 0; bottom: 0; width: auto;
    height: var(--sheet-h, 50vh); max-height: calc(100% - 44px - env(safe-area-inset-top));
    border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -6px 28px -6px rgba(16, 24, 40, .22);
    transition: height .28s cubic-bezier(.2, .8, .2, 1);
  }
  body.dragging .panel { transition: none; }
  .grabber { display: flex; justify-content: center; padding: 8px 0 4px; cursor: grab; touch-action: none; }
  .grabber span { width: 40px; height: 5px; border-radius: 3px; background: #d5d9e0; }
  .brand { padding: 2px 16px 10px; align-items: center; touch-action: none; }
  .home { align-items: center; -webkit-touch-callout: none; }
  .tagline { display: none; }
  .logo { width: 30px; height: 30px; }
  .brand h1 { font-size: 18px; }
  .cities { padding: 0 16px 10px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .cities button { flex: none; }
  .tabs { margin: 0 16px; }
  .scroll { padding: 12px 16px 16px; overscroll-behavior: contain; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
  .chip { flex: none; }
  .cities::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
  .period select { font-size: 16px; } /* stops iOS zooming on focus */
  .foot { display: none; }

  .detail {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 62%; z-index: 7;
    border-radius: 18px 18px 0 0; padding: 0 0 env(safe-area-inset-bottom);
    box-shadow: 0 -8px 32px -6px rgba(16, 24, 40, .25); animation: rise .24s ease-out;
    overscroll-behavior: contain;
  }
  .detail::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: #d5d9e0; }
  .detail::before { z-index: 3; }
  .d-head { padding-top: 22px; border-radius: 18px 18px 0 0; }
  .d-head .close { top: 18px; right: 12px; }
  .d-body { padding: 10px; }

  .legend {
    top: calc(10px + env(safe-area-inset-top)); left: 10px; right: auto; bottom: auto;
    min-width: 0; max-width: 210px; padding: 8px 10px; font-size: 10.5px;
  }
  .legend .t { font-size: 11px; }
  .legend .hint { display: none; }
  .legend .pts { gap: 8px; margin-top: 6px; padding-top: 6px; }
  .maplibregl-ctrl-bottom-left { display: none; } /* pinch to zoom instead */
  .maplibregl-ctrl-bottom-right { bottom: var(--sheet-h, 50vh); transition: bottom .28s cubic-bezier(.2, .8, .2, 1); }
  body.dragging .maplibregl-ctrl-bottom-right { transition: none; }
  .modal { align-items: end; padding: 0; }
  .modal-card { border-radius: 18px 18px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); max-height: 88%; }
}
@keyframes rise { from { transform: translateY(28px); opacity: 0; } }

/* Very narrow screens (foldable cover screens, ~280–380px) */
@media (max-width: 380px) {
  .seg button { font-size: 11px; padding-left: 0; padding-right: 0; }
  .kpi { padding: 8px 10px; }
  .kpi .v { font-size: 18px; }
  .bar { grid-template-columns: 92px 1fr 24px; font-size: 11px; }
  .legend .pts { display: none; }
  .stat b { font-size: 17px; }
  .stat { padding: 7px 8px; }
  .near b { font-size: 16px; }
}

/* Phones in landscape: compact side panel */
@media (max-height: 520px) and (orientation: landscape) {
  .panel { top: 8px; bottom: 8px; left: calc(8px + env(safe-area-inset-left)); width: 296px; padding-left: 0; }
  .tagline, .foot { display: none; }
  .brand { padding: 10px 14px 6px; }
  .cities, .scroll { padding-left: 14px; padding-right: 14px; }
  .tabs { margin: 0 14px; }
  .detail { top: 8px; right: calc(8px + env(safe-area-inset-right)); width: 296px; max-height: calc(100% - 16px); }
  .legend { bottom: 42px; right: calc(8px + env(safe-area-inset-right)); min-width: 0; padding: 6px 9px; }
  .legend .pts, .legend .hint { display: none; }
  .detail:not([hidden]) ~ .legend { display: none; }
  .maplibregl-ctrl-bottom-left { left: calc(312px + env(safe-area-inset-left)); }
}

/* Foldables / dual-screen spanning a vertical hinge: panel on the left screen, map on the right */
@media (horizontal-viewport-segments: 2) {
  .panel {
    top: 12px; bottom: 12px; left: 12px; right: auto; height: auto; max-height: none;
    width: calc(env(viewport-segment-width 0 0) - 24px); border-radius: var(--radius); transition: none;
  }
  .grabber, .detail::before { display: none; }
  .detail {
    top: 12px; bottom: auto; left: 12px; right: auto; z-index: 7; max-height: calc(100% - 24px);
    width: calc(env(viewport-segment-width 0 0) - 24px); border-radius: var(--radius);
  }
  .legend { top: auto; bottom: 46px; left: calc(env(viewport-segment-left 1 0) + 12px); right: auto; }
  .maplibregl-ctrl-bottom-left { display: block; left: env(viewport-segment-left 1 0); }
}

/* Foldables half-folded with a horizontal hinge: map on top, controls on the bottom half */
@media (vertical-viewport-segments: 2) {
  .panel {
    top: calc(env(viewport-segment-top 0 1) + 8px); bottom: 8px; left: 8px; right: 8px;
    width: auto; height: auto; max-height: none; border-radius: var(--radius); transition: none;
  }
  .grabber, .detail::before { display: none; }
  .detail {
    top: calc(env(viewport-segment-top 0 1) + 8px); bottom: 8px; left: 8px; right: 8px;
    width: auto; max-height: none; border-radius: var(--radius); z-index: 7;
  }
  .legend { top: 8px; left: 8px; right: auto; bottom: auto; }
  .maplibregl-ctrl-bottom-right { top: auto; bottom: calc(100% - env(viewport-segment-bottom 0 0) + 4px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Map credit: collapsed to an (i) button that toggles it open/closed */
.maplibregl-ctrl-attrib.maplibregl-compact { box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.maplibregl-ctrl-attrib-button { cursor: pointer; }
.maplibregl-ctrl-attrib-button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
