/* Зона затопления — site styles.
   The map is the page: on map pages the document does not scroll, the map fills the screen, and everything else lives in one
   panel (a floating card on desktop, a bottom sheet on phones). Colour carries meaning only: red — затопление,
   amber — подтопление, blue — your parcel and actions, grey — unconfirmed data. */
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/static/fonts/onest-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/static/fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ink: #0f1e3d;          /* navy: text, dark UI */
  --ink-2: #2e3b55;
  --muted: #5d6a80;
  --line: #dce2ea;
  --line-2: #e9edf2;
  --paper: #ffffff;
  --ground: #eef2f6;       /* behind the map, quiet fills */
  --soft: #f5f7fa;
  --blue: #2557d6;         /* actions, links, your parcel */
  --blue-ink: #1c45ad;
  --blue-soft: #eaf0fd;
  --flood: #e03a3a;        /* затопление */
  --flood-ink: #b42318;
  --flood-soft: #fdeeee;
  --under: #f08c1a;        /* подтопление */
  --under-ink: #9a5200;
  --under-soft: #fef4e7;
  --calm: #3f5c86;         /* «не найдено»: neutral, never «safe» */
  --calm-soft: #edf2f8;
  --water: #2386a8;
  --focus: #2557d6;
  --float: 0 1px 2px rgba(15,30,61,.08), 0 6px 20px rgba(15,30,61,.12);
  --r-s: 8px; --r-m: 12px; --r-l: 16px;
  --header-h: 56px;
  --panel-w: 400px;
  --gap: 12px;
  font-size: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Onest", "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--paper); line-height: 1.5;
  -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.num, .cn, td.num { font-variant-numeric: tabular-nums; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.012em; }
h1 { font-size: 2.25rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 650; }
h3 { font-size: 1.125rem; font-weight: 600; }
p { margin: 0 0 1em; }
.lead { color: var(--ink-2); font-size: 1.0625rem; }
.m { color: var(--muted); font-size: .875rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- header */
.site-header { height: var(--header-h); border-bottom: 1px solid var(--line); background: var(--paper); position: relative; z-index: 40; }
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 24px; }
.app-page .site-header .wrap { max-width: none; padding: 0 20px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.1875rem; letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.brand img { width: 28px; height: 28px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: .9375rem; padding: 7px 11px; border-radius: var(--r-s); white-space: nowrap; }
.nav a:hover { background: var(--soft); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--ground); font-weight: 500; }
.header-cta { font-size: .9375rem; font-weight: 500; color: var(--ink); text-decoration: none; border: 1px solid var(--line); padding: 7px 13px;
  border-radius: 999px; white-space: nowrap; }
.header-cta:hover { border-color: var(--ink); color: var(--ink); }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; border-radius: var(--r-s); width: 40px; height: 40px; padding: 0; color: var(--ink);
  align-items: center; justify-content: center; cursor: pointer; }
.menu-btn .i { width: 24px; height: 24px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.site-header .wrap { max-width: 1320px; }

/* ---------------------------------------------------------------- buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  border-radius: var(--r-s); border: 1px solid var(--blue); background: var(--blue); color: #fff; padding: 11px 18px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--blue-ink); border-color: var(--blue-ink); color: #fff; }
.btn[disabled], .btn.is-busy { opacity: .7; cursor: progress; }
.btn-secondary { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: var(--soft); color: var(--ink); border-color: var(--ink); }
.btn-small { font-size: .875rem; padding: 7px 12px; font-weight: 500; }
.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-size: .875rem; color: var(--ink-2); margin-bottom: 4px; }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=number], select, textarea {
  font: inherit; color: var(--ink); width: 100%; border: 1px solid #c3cbd7; border-radius: var(--r-s); padding: 10px 12px; background: #fff; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 3px solid rgba(37,87,214,.18); outline-offset: 0; }
.form-error { color: var(--flood-ink); font-size: .875rem; margin: 8px 2px 0; }
.form-error[hidden] { display: none; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
.spinner.dark { width: 14px; height: 14px; border-color: rgba(15,30,61,.16); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* search: one field with the action inside it */
.search { position: relative; }
.search-field { display: flex; align-items: center; gap: 6px; background: var(--paper); border: 1px solid #c3cbd7; border-radius: var(--r-m); padding: 4px 4px 4px 12px;
  transition: border-color .15s, box-shadow .15s; }
.search-field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,87,214,.16); }
.search-field > .i { color: var(--muted); }
.search-field input { border: 0; outline: 0; padding: 9px 2px; font-size: 1rem; min-width: 0; flex: 1; background: transparent; box-shadow: none; }
.search-field input:focus { outline: 0; }
.search-clear { border: 0; background: none; color: var(--muted); width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; cursor: pointer; padding: 0; flex: none; }
.search-clear:hover { background: var(--soft); color: var(--ink); }
.search-clear[hidden] { display: none; }
.search-go { padding: 9px 14px; font-size: .9375rem; border-radius: var(--r-s); flex: none; }
.search .hint { font-size: .8125rem; color: var(--muted); margin: 8px 2px 0; }
.search .hint button { font: inherit; color: var(--blue); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px; font-variant-numeric: tabular-nums; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border-radius: var(--r-m); margin: 0; padding: 6px;
  list-style: none; z-index: 30; max-height: 340px; overflow: auto; box-shadow: var(--float); border: 1px solid var(--line-2); }
.suggest[hidden] { display: none; }
.suggest li { padding: 9px 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; border-radius: var(--r-s); font-size: .9375rem; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--soft); }
.suggest .k { color: var(--muted); font-size: .8125rem; white-space: nowrap; }

/* ---------------------------------------------------------------- app shell (map pages) */
body.app-page { height: 100vh; height: 100dvh; overflow: hidden; }
body.app-page main { height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); }
.app { --map-left: calc(var(--panel-w) + var(--gap)); position: relative; height: 100%; overflow: hidden; background: var(--ground); }
.app.panel-closed { --map-left: 0px; }
.app > .map { position: absolute; inset: 0; }
.map-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .9375rem; padding: 24px;
  padding-left: calc(var(--map-left) + 24px); text-align: center; }
.glyph.dashed .g-edge { stroke-dasharray: 3 3; stroke: #7b879b; }

.panel { position: absolute; z-index: 10; top: var(--gap); left: var(--gap); bottom: var(--gap); width: var(--panel-w); display: flex; flex-direction: column;
  background: var(--paper); border-radius: var(--r-l); box-shadow: var(--float); transition: transform .26s cubic-bezier(.2,.8,.2,1); }
.app.panel-closed .panel { transform: translateX(calc(-100% - var(--gap) - 8px)); }
.panel > .search { padding: 14px 14px 10px; }
.sheet { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sheet-grip { display: none; }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px 22px 22px; scrollbar-width: thin; scrollbar-color: #c9d1dc transparent; }
.panel-toggle { position: absolute; z-index: 11; top: calc(50% - 22px); left: calc(var(--gap) + var(--panel-w) - 1px); width: 22px; height: 44px; border: 0;
  background: var(--paper); border-radius: 0 10px 10px 0; box-shadow: 4px 2px 10px rgba(15,30,61,.10); color: var(--muted); cursor: pointer; display: flex;
  align-items: center; justify-content: center; padding: 0; transition: left .26s cubic-bezier(.2,.8,.2,1); }
.panel-toggle:hover { color: var(--ink); }
.panel-toggle .i { width: 16px; height: 16px; transition: transform .2s; }
.app.panel-closed .panel-toggle { left: 0; }
.app.panel-closed .panel-toggle .i { transform: rotate(180deg); }

/* panel content: the page's own text (intro) and, after a check, the result */
.intro h1 { font-size: 1.75rem; line-height: 1.12; margin: 6px 0 10px; }
.intro .lead { font-size: 1rem; margin-bottom: 14px; }
.intro .crumbs { margin: 6px 0 10px; }
.free-note { display: flex; gap: 10px; align-items: flex-start; font-size: .875rem; color: var(--ink-2); background: var(--soft); border-radius: var(--r-m);
  padding: 10px 12px; margin: 0 0 18px; }
.free-note .i { color: var(--blue); margin-top: 1px; width: 18px; height: 18px; }
.free-note a { white-space: nowrap; }
.examples { list-style: none; margin: 0 0 8px; padding: 0; }
.examples-title { font-size: .9375rem; font-weight: 600; margin: 0 0 6px; }
.examples li { margin: 0; }
.examples a { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; padding: 9px 10px; margin: 0 -10px; border-radius: var(--r-m);
  text-decoration: none; color: var(--ink); }
.examples a:hover { background: var(--soft); color: var(--ink); }
.examples .cn { font-weight: 600; font-size: .9375rem; color: var(--blue); }
.examples small { display: block; color: var(--muted); font-size: .8125rem; line-height: 1.35; }
.examples .glyph { width: 44px; height: 44px; }

.info { border-top: 1px solid var(--line-2); padding: 18px 0 4px; margin-top: 14px; font-size: .9375rem; color: var(--ink-2); }
.info h2 { font-size: 1.125rem; color: var(--ink); margin-bottom: 10px; }
.info h3 { font-size: .9375rem; color: var(--ink); margin: 0 0 3px; }
.info p { margin: 0 0 .8em; }
.info ul { padding-left: 18px; margin: 0 0 .8em; }
.info table { width: 100%; border-collapse: collapse; font-size: .875rem; margin: 0 0 .8em; }
.info th, .info td { text-align: left; padding: 7px 8px 7px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.info th { color: var(--muted); font-weight: 500; }
.info td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 0 12px; }
.steps li::before { content: counter(s); grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; background: var(--ground); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: .8125rem; }
.steps p { margin: 0; }
.verdict-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.verdict-legend li { border-left: 3px solid var(--calm); padding: 1px 0 1px 12px; }
.verdict-legend p { margin: 0; }
.verdict-legend .danger { border-color: var(--flood); }
.verdict-legend .warning { border-color: var(--under); }
.verdict-legend .neutral { border-color: #9aa4b5; }
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li { border-bottom: 1px solid var(--line-2); padding: 10px 0; }
.news-list .d { color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; background: #9aa4b5; }
.status-confirmed { background: var(--blue); }
.status-partial { background: #7d97c9; }
.status-none { background: #c3cad6; }
.mini-footer { border-top: 1px solid var(--line-2); margin-top: 18px; padding-top: 14px; font-size: .8125rem; color: var(--muted); }
.mini-footer nav { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 8px; }
.mini-footer a { color: var(--muted); }
.mini-footer p { margin: 0 0 6px; }

/* ---------------------------------------------------------------- map overlays */
.basemap-switch { position: absolute; z-index: 8; top: var(--gap); right: calc(var(--gap) + 56px); display: flex; padding: 4px;
  background: var(--paper); border-radius: var(--r-m); box-shadow: var(--float); gap: 2px; }
.basemap-switch button { border: 0; border-radius: 8px; padding: 8px 12px; min-height: 36px; font: inherit; font-size: .8125rem;
  font-weight: 600; color: var(--ink); background: transparent; cursor: pointer; }
.basemap-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.basemap-switch button:focus-visible, .sat-in:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.imagery-status { position: absolute; z-index: 7; top: calc(var(--gap) + 56px); right: calc(var(--gap) + 56px); max-width: 280px;
  background: var(--paper); box-shadow: var(--float); border-radius: var(--r-m); padding: 10px 12px; font-size: .8125rem; }
.imagery-status[hidden] { display: none; }
.imagery-status button { display: block; background: none; border: 0; padding: 8px 0 0; color: var(--blue); font: inherit; cursor: pointer; }
@media (max-width: 900px) and (min-height: 501px), (max-width: 559px) {
  .basemap-switch { top: 102px; right: var(--gap); }
  .basemap-switch button { padding: 7px 9px; min-height: 40px; }
  .imagery-status { top: 260px; right: var(--gap); max-width: calc(100% - 78px); }
  .has-satellite .mapctl.top { top: 158px; }
  .has-satellite .mapctl.mid { top: 209px; }
  .app.sheet-full .basemap-switch, .app.sheet-full .imagery-status, .search-active .basemap-switch, .search-active .imagery-status { visibility: hidden; }
}
.mapctl { position: absolute; z-index: 8; right: var(--gap); display: flex; flex-direction: column; gap: 8px; }
.mapctl.top { top: var(--gap); }
.mapctl.mid { top: 50%; transform: translateY(-50%); }
.ctl-group { display: flex; flex-direction: column; background: var(--paper); border-radius: var(--r-m); box-shadow: var(--float); overflow: hidden; }
.ctl { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: var(--paper); border: 0; color: var(--ink);
  cursor: pointer; padding: 0; border-radius: var(--r-m); box-shadow: var(--float); position: relative; }
.ctl-group .ctl { box-shadow: none; border-radius: 0; }
.ctl-group .ctl + .ctl { border-top: 1px solid var(--line-2); }
.ctl:hover { color: var(--blue); }
.ctl[aria-pressed="true"], .ctl[aria-expanded="true"] { background: var(--ink); color: #fff; }
.ctl[hidden] { display: none; }
.ctl .i { width: 22px; height: 22px; }
.ctl[data-tip]:hover::after { content: attr(data-tip); position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%); white-space: nowrap;
  background: var(--ink); color: #fff; font-size: .8125rem; padding: 5px 9px; border-radius: 6px; pointer-events: none; }
.ctl.is-busy .i { animation: spin 1s linear infinite; }

.pop { position: absolute; z-index: 9; top: var(--gap); right: calc(var(--gap) + 56px); width: 300px; max-height: calc(100% - var(--gap) * 2); overflow: auto;
  background: var(--paper); border-radius: var(--r-l); box-shadow: var(--float); padding: 14px 16px 16px; font-size: .9375rem; }
.pop[hidden] { display: none; }
.pop h3 { font-size: .875rem; font-weight: 600; color: var(--muted); margin: 14px 0 6px; }
.pop h3:first-of-type { margin-top: 0; }
.pop-close { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border: 0; background: none; color: var(--muted); border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.pop-close:hover { background: var(--soft); color: var(--ink); }
.pop label { display: flex; gap: 10px; align-items: center; padding: 6px 0; cursor: pointer; }
.pop input[type=checkbox], .pop input[type=radio] { width: 18px; height: 18px; accent-color: var(--blue); margin: 0; flex: none; }
.pop .note { color: var(--muted); font-size: .8125rem; margin: 10px 0 0; }
.pop .styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pop .styles label:nth-child(n+4) { grid-column: span 1; }
.pop .styles label { display: block; text-align: center; border: 1px solid var(--line); border-radius: var(--r-s); padding: 7px 4px; font-size: .8125rem; }
.pop .styles input { position: absolute; opacity: 0; pointer-events: none; }
.pop .styles label:has(input:checked) { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); font-weight: 500; }
.pop .styles label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 1px; }
.pop .unavailable { color: var(--muted); font-size: .8125rem; margin: 8px 0 0; }
.sat-in { font: inherit; font-size: .8125rem; color: var(--blue); border: 0; background: none; cursor: pointer; white-space: nowrap; }
.sat-in:hover { text-decoration: underline; }
.result-actions { align-items: center; flex-wrap: wrap; }
.result-actions .sat-in { margin-left: auto; padding: 6px 2px; min-height: 40px; }

/* legend: what the colours mean, always visible on desktop */
.legend-card { position: absolute; z-index: 7; left: calc(var(--map-left) + var(--gap)); bottom: 40px;
  background: rgba(255,255,255,.96); border-radius: var(--r-m); box-shadow: var(--float); padding: 8px 12px; font-size: .8125rem; color: var(--ink-2);
  display: flex; flex-wrap: wrap; gap: 4px 14px; max-width: min(560px, calc(100% - var(--map-left) - 90px)); transition: left .26s cubic-bezier(.2,.8,.2,1); }
.legend-card span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend { list-style: none; margin: 0; padding: 0; font-size: .875rem; }
.legend li { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.sw { display: inline-block; width: 22px; height: 14px; border-radius: 3px; flex: none; border: 1.5px solid transparent; }
.sw-flood { background: rgba(224,58,58,.36); border-color: #c62828; }
.sw-underflood { background: rgba(240,140,26,.34); border-color: #d97706; }
.sw-under-strong { background: rgba(240,140,26,.46); border-color: #d97706; }
.sw-under-weak { background: rgba(240,140,26,.2); border-color: #d97706; }
.sw-flood_mixed { background: rgba(234,90,42,.36); border-color: #c2410c; }
.sw-parcel { background: rgba(37,87,214,.1); border: 2.5px solid var(--blue); }
.sw-water { background: transparent; border: 1.5px dashed var(--water); }
.sw-lines { background: transparent; border: 1.5px solid #8393ab; }
.sw-ref { background: rgba(107,122,144,.16); border: 1.5px dashed #6b7a90; }
.sw-degrees { display: inline-flex; gap: 2px; }
.sw-degrees .sw { width: 12px; }

.map-status { position: absolute; z-index: 6; left: calc(var(--map-left) + (100% - var(--map-left)) / 2); bottom: 30px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; max-width: min(520px, calc(100% - var(--map-left) - 40px)); background: rgba(255,255,255,.96);
  color: var(--ink-2); border-radius: 999px; padding: 7px 14px; font-size: .8125rem; line-height: 1.3; pointer-events: none; box-shadow: var(--float);
  transition: left .26s cubic-bezier(.2,.8,.2,1); }
.map-status[hidden] { display: none; }
.map-status.busy { color: var(--ink); }
@media (min-width: 901px) { .app:has(.legend-card:not([hidden])) .map-status { bottom: 88px; } }
.map-hint { position: absolute; z-index: 9; left: calc(var(--map-left) + (100% - var(--map-left)) / 2); top: 16px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 999px; font-size: .8125rem; pointer-events: none; opacity: 0;
  transition: opacity .2s; max-width: calc(100% - var(--map-left) - 40px); text-align: center; }
.map-hint.on { opacity: 1; }
.map-tip { position: absolute; left: 0; top: 0; z-index: 3; display: none; max-width: 280px; background: var(--ink); color: #fff; border-radius: 10px;
  padding: 7px 10px; font-size: .75rem; line-height: 1.4; pointer-events: none; box-shadow: 0 4px 14px rgba(15,30,61,.25); }
.map-tip.on { display: block; }
.map-tip b { display: block; font-size: .8125rem; font-variant-numeric: tabular-nums; font-weight: 600; }
.map-tip span { display: block; color: #c9d3e6; }
.map-tip em { display: block; font-style: normal; color: #a9c3ff; margin-top: 3px; }
.measure-out { position: absolute; z-index: 9; top: var(--gap); left: calc(var(--map-left) + var(--gap)); background: var(--paper);
  border-radius: var(--r-m); box-shadow: var(--float); padding: 10px 12px; font-size: .875rem; max-width: 280px; }
.measure-out[hidden] { display: none; }
.coords:empty { display: none; }
.coords { position: absolute; z-index: 5; right: 66px; bottom: 8px; background: rgba(255,255,255,.85); border-radius: 6px; padding: 2px 7px; font-size: .75rem;
  color: var(--ink-2); font-variant-numeric: tabular-nums; pointer-events: none; }

/* MapLibre: quiet chrome that matches ours */
.app .maplibregl-ctrl-bottom-left { left: var(--map-left); transition: left .26s cubic-bezier(.2,.8,.2,1); }
.app .maplibregl-ctrl-scale { border-color: var(--muted); color: var(--ink-2); background: rgba(255,255,255,.8); font-size: 11px; }
.app .maplibregl-ctrl-attrib { font-size: 11px; background: rgba(255,255,255,.8); }
.app .maplibregl-ctrl-attrib a { color: var(--ink-2); }
.app .maplibregl-ctrl-geolocate { display: none; }
.app .maplibregl-popup-content { font-family: "Onest", sans-serif; padding: 14px 16px; border-radius: var(--r-m); box-shadow: var(--float); max-width: 320px; }
.app .maplibregl-popup-close-button { font-size: 20px; width: 30px; height: 30px; right: 4px; top: 4px; border-radius: 50%; color: var(--muted); }
.app .maplibregl-popup-close-button:hover { background: var(--soft); color: var(--ink); }
.popup-zone h4 { margin: 0 24px 4px 0; font-size: .9375rem; }
.popup-zone dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 8px 0 0; font-size: .8125rem; }
.popup-zone dt { color: var(--muted); }
.popup-zone dd { margin: 0; }
.popup-zone .m, .maplibregl-popup-content .m { margin: 0 0 6px; font-size: .8125rem; }
.pp-actions { margin: 10px 0 0; }

/* ---------------------------------------------------------------- result */
.result[hidden] { display: none; }
.result-head { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0 12px; }
.result-head .t { flex: 1; min-width: 0; }
.result-head .cn { font-size: 1.25rem; font-weight: 650; letter-spacing: .005em; display: block; }
.result-head .addr { display: block; color: var(--muted); font-size: .8125rem; line-height: 1.35; margin-top: 2px; }
.icon-btn { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--soft); color: var(--ink-2); display: inline-flex; align-items: center;
  justify-content: center; cursor: pointer; padding: 0; flex: none; text-decoration: none; }
.icon-btn:hover { background: var(--ground); color: var(--ink); }
.icon-btn .i { width: 18px; height: 18px; }
.icon-btn.done { background: var(--blue-soft); color: var(--blue); }

.verdict { --tone: var(--calm); --tone-soft: var(--calm-soft); background: var(--tone-soft); border-radius: var(--r-l); padding: 16px 16px 14px; margin: 0 0 18px; }
.verdict.danger { --tone: var(--flood); --tone-soft: var(--flood-soft); }
.verdict.warning { --tone: var(--under); --tone-soft: var(--under-soft); }
.verdict.neutral { --tone: #7b879b; --tone-soft: #f1f3f6; }
.verdict h2 { font-size: 1.1875rem; line-height: 1.25; margin: 0; font-weight: 650; }
.verdict .vrow { display: flex; align-items: center; gap: 14px; margin: 12px 0 0; }
.verdict .glyph { width: 64px; height: 64px; }
.verdict .figure { margin: 0; min-width: 0; }
.verdict .figure b { display: block; font-size: 2rem; line-height: 1.05; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.verdict .figure span { display: block; color: var(--ink-2); font-size: .875rem; line-height: 1.35; margin-top: 3px; }
.verdict .sub { margin: 12px 0 0; color: var(--ink-2); font-size: .9375rem; }
.verdict .asof { margin: 10px 0 0; color: var(--muted); font-size: .75rem; }
.glyph .g-ground { fill: #fff; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.glyph .g-zone { fill: rgba(240,140,26,.55); stroke: none; }
.glyph .g-zone.flood { fill: rgba(224,58,58,.55); }
.glyph .g-edge { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.verdict.neutral .glyph .g-edge { stroke-dasharray: 3 3; stroke: #7b879b; }

.sec { margin: 0 0 18px; }
.sec > h3 { font-size: 1rem; margin: 0 0 8px; }
.facts { display: grid; grid-template-columns: 8.5rem 1fr; gap: 7px 14px; margin: 0; font-size: .9375rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.zone-list { list-style: none; margin: 0; padding: 0; }
.zone-list li { border-top: 1px solid var(--line-2); padding: 11px 0; display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: start; }
.zone-list li:last-child { border-bottom: 1px solid var(--line-2); }
.zone-list .sw { margin-top: 4px; }
.zone-list .t { font-weight: 550; font-size: .9375rem; line-height: 1.35; }
.zone-list .m { font-size: .8125rem; margin-top: 2px; }
.zone-list .a { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; font-size: .9375rem; }
.zone-list .a small { display: block; font-weight: 400; color: var(--muted); font-size: .8125rem; }
.zone-list .near .t { font-weight: 450; color: var(--ink-2); }
.zone-list details summary { cursor: pointer; color: var(--blue); font-size: .8125rem; margin-top: 4px; list-style: none; }
.zone-list details summary::-webkit-details-marker { display: none; }
.zone-list details[open] summary { margin-bottom: 4px; }
.zone-list details .facts { grid-template-columns: 7rem 1fr; font-size: .8125rem; gap: 4px 10px; margin-top: 6px; }
.tag { display: inline-block; font-size: .75rem; font-weight: 450; padding: 1px 7px; border-radius: 999px; background: var(--ground); color: var(--ink-2); margin-left: 6px;
  white-space: nowrap; vertical-align: 1px; }
.tag-warn { background: #fdf0db; color: #7a4a00; }
.fold { border: 1px solid var(--line-2); border-radius: var(--r-m); margin: 0 0 12px; }
.fold > summary { cursor: pointer; padding: 11px 14px; font-weight: 550; font-size: .9375rem; list-style: none; display: flex; justify-content: space-between; gap: 8px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: ""; width: 8px; height: 8px; border-right: 1.8px solid var(--muted); border-bottom: 1.8px solid var(--muted); transform: rotate(45deg);
  margin-top: 4px; transition: transform .15s; flex: none; }
.fold[open] > summary::after { transform: rotate(225deg); margin-top: 8px; }
.fold > .in { padding: 0 14px 12px; font-size: .9375rem; }
.meaning { border-left: 3px solid var(--tone, var(--flood)); padding: 2px 0 2px 14px; font-size: .9375rem; color: var(--ink-2); }
.meaning ul { list-style: none; padding: 0; margin: 0 0 8px; }
.meaning li { margin-bottom: 6px; }
.caveat { font-size: .8125rem; color: var(--ink-2); background: var(--soft); border-radius: var(--r-m); padding: 10px 12px; margin: 0 0 16px; }
.notice { border-radius: var(--r-m); background: #fff8eb; color: #5c3d00; padding: 11px 14px; font-size: .9375rem; margin: 0 0 16px; }
.report-cta { background: var(--blue-soft); border-radius: var(--r-l); padding: 16px; margin: 0 0 16px; }
.report-cta .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.report-cta b { font-size: 1rem; }
.report-cta .price { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.report-cta p { color: var(--ink-2); font-size: .875rem; margin: 0 0 12px; }
.sources { font-size: .75rem; color: var(--muted); line-height: 1.45; }
.sources a { color: var(--muted); }
.loading { padding: 4px 0; }
.loading .bar { height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--ground) 0, #f6f8fb 40%, var(--ground) 80%); background-size: 300% 100%;
  animation: shimmer 1.4s ease infinite; margin: 0 0 10px; }
.loading .bar.big { height: 96px; border-radius: var(--r-l); }
.loading p { color: var(--muted); font-size: .875rem; margin: 12px 0 0; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* ---------------------------------------------------------------- content pages */
.page { padding: 36px 0 0; }
.page .wrap { max-width: 1040px; }
.crumbs { font-size: .8125rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.prose { max-width: 720px; font-size: 1.0625rem; line-height: 1.6; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: .35em; }
.prose blockquote { margin: 1em 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--line); color: var(--ink-2); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.2em; }
.prose table, table.data { border-collapse: collapse; width: 100%; font-size: .9375rem; margin: 0 0 1.2em; }
.table-scroll > table { margin: 0; }
.prose th, .prose td, table.data th, table.data td { border-bottom: 1px solid var(--line); padding: 9px 12px 9px 0; text-align: left; vertical-align: top; }
.prose th, table.data th { color: var(--muted); font-weight: 500; font-size: .875rem; }
.meta-line { color: var(--muted); font-size: .875rem; margin-bottom: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.band { padding: 44px 0 8px; }
.band + .band { border-top: 1px solid var(--line); }
.box { border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px 18px; margin: 0 0 16px; }
.box h3 { margin-bottom: 6px; }
.box p:last-child, .box ul:last-child { margin-bottom: 0; }
.cover-table td:first-child { font-weight: 500; }
.pill { display: inline-block; font-size: .75rem; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; color: var(--ink-2); }
.err-page { padding: 80px 0; }
.cover { margin: 0 0 1.4em; }
.cover img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-m); background: var(--ground); display: block; }
.cover figcaption { font-size: .8125rem; color: var(--muted); margin-top: 6px; }
.art-list { list-style: none; margin: 0; padding: 0; }
.art-item { display: grid; grid-template-columns: 168px 1fr; gap: 18px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.art-item img, .art-ph { width: 168px; height: 95px; object-fit: cover; border-radius: var(--r-s); background: var(--ground); display: block; }
.art-item a { color: var(--ink); text-decoration: none; }
.art-item a:hover b { color: var(--blue); }
.art-item b { font-size: 1.0625rem; font-weight: 600; display: block; margin-bottom: 4px; line-height: 1.3; }
.art-item br { display: none; }
.art-item .m { display: block; line-height: 1.45; }

/* ---------------------------------------------------------------- footer (content pages) */
.site-footer { border-top: 1px solid var(--line); background: var(--soft); margin-top: 64px; padding: 36px 0 28px; font-size: .875rem; color: var(--ink-2); }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h3 { font-size: .9375rem; margin-bottom: .6em; color: var(--ink); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 6px; }
.site-footer a { color: var(--ink-2); }
.footnote { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8125rem; }

/* cookie banner: compact, never over the map controls */
.cookie { position: fixed; left: 16px; bottom: 16px; max-width: 396px; background: #fff; border-radius: var(--r-m); padding: 12px 14px; font-size: .875rem;
  z-index: 50; box-shadow: var(--float); }
.cookie[hidden] { display: none; }
.cookie { display: flex; align-items: center; gap: 12px; }
.cookie p { margin: 0; }
.cookie .btn { flex: none; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .nav a { padding: 7px 8px; font-size: .875rem; }
  .site-header .wrap { gap: 14px; }
}
@media (max-width: 1240px) {
  .header-cta { display: none; }
}
@media (max-width: 900px) {
  :root { --header-h: 52px; --gap: 10px; }
  h1 { font-size: 1.75rem; }
  .site-header .wrap, .app-page .site-header .wrap { padding: 0 8px 0 14px; gap: 10px; }
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: #fff; flex-direction: column; gap: 0; padding: 6px 10px 12px;
    box-shadow: 0 12px 24px rgba(15,30,61,.12); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 10px; font-size: 1rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 18px; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; gap: 20px; }
  .wrap { padding: 0 16px; }
  .page { padding-top: 24px; }
  .art-item { grid-template-columns: 104px 1fr; gap: 12px; }
  .art-item img, .art-ph { width: 104px; height: 59px; }

  /* app shell on phones: map on the whole screen, search on top, everything else in a bottom sheet */
  .app { --map-left: 0px; --sheet-visible: 200px; }
  .panel { inset: 0; width: auto; border-radius: 0; background: none; box-shadow: none; pointer-events: none; transform: none !important; transition: none; }
  .panel > * { pointer-events: auto; }
  .panel > .search { position: absolute; top: var(--gap); left: var(--gap); right: var(--gap); padding: 0; z-index: 3; }
  .panel > .search .search-field { box-shadow: var(--float); border-color: transparent; }
  .panel > .search .search-field:focus-within { border-color: var(--blue); }
  .panel > .search .hint { display: none; }
  .search .form-error { background: #fff; border-radius: var(--r-s); padding: 8px 10px; box-shadow: var(--float); margin-top: 6px; }
  .sheet { position: absolute; left: 0; right: 0; bottom: 0; height: calc(100% - 64px); background: var(--paper); border-radius: 18px 18px 0 0;
    box-shadow: 0 -2px 18px rgba(15,30,61,.14); transform: translateY(calc(100% - var(--sheet-visible))); transition: transform .3s cubic-bezier(.2,.8,.2,1);
    will-change: transform; z-index: 2; }
  .sheet.dragging { transition: none; }
  .sheet-grip { display: flex; justify-content: center; align-items: center; height: 26px; flex: none; cursor: grab; touch-action: none; border: 0; background: none;
    width: 100%; padding: 0; }
  .sheet-grip::before { content: ""; width: 40px; height: 5px; border-radius: 3px; background: #cdd4de; }
  .sheet-body { padding: 0 18px calc(22px + env(safe-area-inset-bottom)); }
  .sheet:not(.full) .sheet-body { overflow: hidden; touch-action: none; }
  .panel-toggle { display: none; }
  .intro h1 { font-size: 1.5rem; margin-top: 2px; }
  .mapctl.top { top: auto; bottom: calc(var(--sheet-visible) + 40px); transition: bottom .3s cubic-bezier(.2,.8,.2,1); }
  .mapctl.mid { display: none; }
  .app.sheet-full .mapctl, .app.sheet-full .map-status { opacity: 0; pointer-events: none; }
  .sheet.dragging ~ .mapctl, .app.dragging .mapctl, .app.dragging .map-status { transition: none; }
  .ctl[data-tip]:hover::after { display: none; }
  .pop { top: 70px; right: var(--gap); left: var(--gap); width: auto; max-height: calc(100% - 70px - var(--sheet-visible) - 16px); }
  .legend-card { display: none; }
  .map-status { left: calc(50% - 22px); bottom: calc(var(--sheet-visible) + 14px); max-width: calc(100% - 120px); font-size: .75rem; padding: 6px 12px; white-space: normal;
    transition: bottom .3s cubic-bezier(.2,.8,.2,1); }
  .map-hint { top: 70px; left: 50%; max-width: calc(100% - 40px); }
  .map-tip, .coords { display: none !important; }
  .measure-out { top: 70px; left: var(--gap); }
  .app .maplibregl-ctrl-bottom-left, .app .maplibregl-ctrl-bottom-right { bottom: calc(var(--sheet-visible) - 2px); transition: bottom .3s cubic-bezier(.2,.8,.2,1); }
  .app .maplibregl-ctrl-bottom-left { left: 0; }
  .app .maplibregl-ctrl-attrib.maplibregl-compact { margin: 0 8px 8px 0; }
  .app.sheet-full .maplibregl-ctrl-bottom-left, .app.sheet-full .maplibregl-ctrl-bottom-right { opacity: 0; }
  .cookie { left: 10px; right: 10px; bottom: 10px; max-width: none; }
}
@media (max-width: 560px) {
  .site-footer .cols { grid-template-columns: 1fr; }
  /* tables become stacked rows: each cell labelled by its column */
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  table.stack td { border: 0; padding: 2px 0; }
  table.stack td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: .75rem; }
  .facts { grid-template-columns: 7.5rem 1fr; }
  .prose table { display: block; overflow-x: auto; }
  h1 { font-size: 1.625rem; }
  .lead { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print { .site-header, .site-footer, .mapctl, .cookie { display: none; } }

/* Map controls, clear loading states and saved checks. */
.map-fallback.failed { z-index: 5; background: var(--ground); flex-direction: column; gap: 14px; }
.map-fallback.failed p { max-width: 340px; margin: 0; }
.search-cancel { display: none; }
.search-secondary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 2px 0; font-size: .75rem; color: var(--muted); }
.search-secondary button, .map-status button { font: inherit; border: 0; background: none; color: var(--blue); cursor: pointer; padding: 4px 0; font-weight: 600; }
.suggest li { align-items: flex-start; }
.suggest .k { white-space: normal; max-width: 48%; text-align: right; }
.suggest-recent { flex-direction: column; gap: 2px !important; }
.suggest-recent .k { text-align: left; max-width: 100%; }
.result-head-actions { display: flex; gap: 2px; flex-shrink: 0; }
.result-head .addr { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.result-actions { display: flex; gap: 8px; padding: 0 0 16px; }
.result-details { scroll-margin-top: 12px; }
.map-status { white-space: normal; max-width: min(540px, calc(100% - var(--map-left) - 100px)); text-align: center; flex-wrap: wrap; justify-content: center; gap: 2px 12px; pointer-events: auto; }
.map-status button { white-space: nowrap; min-height: 32px; }
.tools-toggle { display: none; }
.opacity-control { justify-content: space-between; margin-top: 12px; }
#zone-opacity { width: 100%; accent-color: var(--blue); }
.compare-dialog { border: 0; border-radius: 18px; max-width: 1080px; width: calc(100% - 32px); max-height: calc(100dvh - 32px); color: var(--ink); padding: 24px; box-shadow: var(--float); }
.compare-dialog::backdrop { background: rgba(15,30,61,.45); }
.compare-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.compare-heading h2 { margin: 0; }
.compare-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 16px; margin: 20px 0; }
.compare-item { border: 1px solid var(--line); border-radius: 12px; padding: 16px; min-width: 0; }
.compare-item .cn { font-weight: 650; }
.compare-item h3 { font-size: 1rem; line-height: 1.4; }
.compare-item dl { font-size: .875rem; }
.compare-item dt { color: var(--muted); margin-top: 12px; }
.compare-item dd { margin: 2px 0; }
.compare-item .btn { margin: 4px 4px 0 0; }

/* Report preview and ordering stay close together on both screen sizes. */
.report-overview { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; margin: 28px 0 40px; padding: 30px; background: var(--soft); border: 1px solid var(--line-2); border-radius: 20px; }
.eyebrow { color: var(--blue-ink); font-size: .8125rem; font-weight: 600; }
.report-benefits { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.report-benefits span { padding: 5px 9px; border-radius: 6px; background: #fff; font-size: .8125rem; }
.report-overview .m { margin: 12px 0 0; }
.report-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.report-preview { display: flex; gap: 16px; justify-content: center; align-items: center; }
.report-preview { gap: 12px; }
.report-preview img { width: calc(33.333% - 8px); height: auto; border-radius: 4px; box-shadow: 0 4px 18px rgba(15,30,61,.14); border: 1px solid var(--line); }
.report-preview img:nth-child(2) { transform: translateY(14px); }
.report-preview img:nth-child(3) { transform: translateY(28px); }
.report-page > .grid-2 { grid-template-areas: "details order"; }
.report-details { grid-area: details; }
.report-order { grid-area: order; }
.report-order .box { background: var(--soft); }

@media (max-width: 900px) and (min-height: 501px), (max-width: 559px) {
  .map-fallback { padding: 100px 24px calc(var(--sheet-visible) + 24px); }
  .search-secondary { background: #fff; border-radius: 8px; padding: 1px 10px; margin-top: 6px; box-shadow: 0 1px 4px #0f1e3d12; }
  .mapctl.top { top: 102px; bottom: auto; flex-direction: row; gap: 6px; }
  .tools-toggle { display: inline-flex; }
  .mapctl.mid { display: flex; top: 153px; bottom: auto; transform: none; }
  .mapctl.mid > .ctl-group { flex-direction: row; }
  .mapctl.mid .measure-group { display: none; }
  .app.tools-open .mapctl.mid .measure-group { display: flex; }
  .legend-card { display: flex; flex-wrap: wrap; left: 10px; bottom: calc(var(--sheet-visible) + 8px); font-size: .6875rem; padding: 4px 7px; gap: 10px; max-width: calc(100% - 44px); }
  .legend-card > span:last-child { display: none; }
  .map-status { left: 10px; bottom: calc(var(--sheet-visible) + 46px); transform: none; max-width: calc(100% - 76px); font-size: .6875rem; border-radius: 12px; padding: 6px 10px; }
  .map-status > span { display: block; }
  .map-status button { font-size: .75rem; }
  .app.sheet-full .legend-card { visibility: hidden; }
  .app .maplibregl-ctrl-bottom-left { top: 102px; bottom: auto; }
  .pop { top: 102px; max-height: calc(100% - 118px); z-index: 15; }
  .result-head { margin-bottom: 8px; }
  .result-head .cn { font-size: 1rem; }
  .result-head .addr { -webkit-line-clamp: 1; font-size: .75rem; }
  .result-head-actions .icon-btn { width: 32px; height: 32px; }
  .verdict { padding: 12px; margin-bottom: 10px; }
  .verdict h2 { font-size: 1rem; line-height: 1.3; }
  .verdict .glyph { width: 52px; height: 52px; }
  .verdict .figure b { font-size: 1.6rem; }
  .verdict .figure span { font-size: .8125rem; }
  .verdict .asof { margin-top: 6px; font-size: .6875rem; }
  .result-actions { padding-bottom: 10px; }
  .result-actions .btn { min-height: 36px; padding: 6px 10px; }
  .search-active .panel::before { content: ""; position: fixed; inset: 0; background: #fff; z-index: 1; }
  .search-active .sheet, .search-active .mapctl, .search-active .legend-card, .search-active .map-status { visibility: hidden; }
  .search.is-focused .search-field { margin-right: 62px; box-shadow: none; }
  .search.is-focused .search-go { display: none; }
  .search.is-focused .search-cancel { display: block; position: absolute; right: 0; top: 10px; background: none; border: 0; font: inherit; color: var(--blue); padding: 5px 0; }
  .search.is-focused .search-secondary { box-shadow: none; }
  .suggest { max-height: min(340px, calc(var(--visual-height, 100dvh) - 190px)); }
}

/* A sideways phone uses a narrow side panel; no controls can sit behind the search field. */
@media (min-width: 560px) and (max-width: 900px) and (max-height: 500px) {
  :root { --panel-w: 292px; --gap: 10px; }
  .basemap-switch { top: 122px; right: var(--gap); }
  .basemap-switch button { padding: 7px 9px; }
  .imagery-status { top: 174px; right: var(--gap); max-width: calc(100% - var(--panel-w) - 30px); }
  .has-satellite .mapctl.mid { flex-direction: row; }
  .app { --map-left: calc(var(--panel-w) + 10px); --sheet-visible: 0px; }
  .app.panel-closed { --map-left: 0px; }
  .panel { inset: var(--gap) auto var(--gap) var(--gap); width: var(--panel-w); border-radius: 14px; background: #fff; box-shadow: var(--float); pointer-events: auto; }
  .app.panel-closed .panel { transform: translateX(calc(-100% - 20px)) !important; }
  .panel > .search { position: relative; inset: auto; padding: 10px; }
  .search-field { padding-left: 8px; }
  .search-field > .i { display: none; }
  .search-go { padding: 9px 8px; font-size: .8125rem; }
  .search-field input { font-size: .875rem; }
  .sheet { position: relative; inset: auto; height: auto; flex: 1; border-radius: 0; box-shadow: none; transform: none !important; overflow: hidden; }
  .sheet-grip { display: none; }
  .sheet-body, .sheet:not(.full) .sheet-body { padding: 0 12px 16px; overflow-y: auto; touch-action: pan-y; }
  .panel-toggle { display: flex; }
  .mapctl.top { top: var(--gap); bottom: auto; flex-direction: row; }
  .mapctl.mid { display: flex; top: 70px; transform: none; }
  .mapctl.mid > .ctl-group { flex-direction: row; }
  .pop { left: auto; top: 58px; width: min(340px,calc(100% - 32px)); max-height: calc(100% - 72px); z-index: 15; }
  .legend-card { display: flex; left: calc(var(--map-left) + 10px); bottom: 30px; font-size: .6875rem; gap: 8px; }
  .legend-card > span:last-child { display: none; }
  .map-status { left: calc(var(--map-left) + 10px); bottom: 72px; transform: none; max-width: calc(100% - var(--map-left) - 78px); font-size: .6875rem; }
  .app .maplibregl-ctrl-bottom-left, .app .maplibregl-ctrl-bottom-right { bottom: 0; }
  .app .maplibregl-ctrl-bottom-left { left: var(--map-left); }
  .map-fallback { padding-left: calc(var(--map-left) + 16px); }
  .intro h1 { font-size: 1.2rem; }
  .intro .lead { font-size: .875rem; }
}
@media (max-width: 900px) {
  .report-overview { padding: 20px; gap: 20px; }
  .report-page > .grid-2 { grid-template-areas: "order" "details"; }
}
@media (max-width: 560px) {
  .report-overview { grid-template-columns: 1fr; margin: 20px 0; }
  .report-preview { max-width: 280px; margin: 0 auto 12px; }
  .compare-dialog { padding: 16px; width: calc(100% - 20px); }
}
