@font-face {
  font-family: "DM Sans";
  src: url("fonts/DMSans.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Plex;
  src: url("fonts/IBMPlexSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Plex;
  src: url("fonts/IBMPlexSans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
:root {
  --ink: #1c1917;
  --muted: #66615d;
  --quiet: #78716c;
  --line: #e7e5e4;
  --surface: #fff;
  --canvas: #fafaf9;
  --accent: #14847b;
  --accent-dark: #0f766e;
  --accent-light: #f0fdfa;
  --danger: #a83030;
  --good: #278851;
  --gold: #b77b22;
  --radius: 8px;
  --body: "DM Sans", Plex, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}
* {
  box-sizing: border-box;
}
html {
  font-family: var(--body);
  color: var(--ink);
  background: var(--canvas);
  -webkit-tap-highlight-color: transparent;
}
body {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
summary {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  border-radius: 6px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 3px;
}
input {
  caret-color: var(--accent);
}
::selection {
  background: #ccfbf1;
  color: #134e4a;
}
* {
  scrollbar-width: thin;
  scrollbar-color: #c7c3c0 transparent;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.02em;
}
h2 {
  font-size: 17px;
  font-weight: 600;
}
h3 {
  font-size: 14px;
  font-weight: 600;
}
h1:focus,
h1[tabindex]:focus-visible,
#main:focus,
#main[tabindex]:focus-visible {
  outline: none;
}
img {
  max-width: 100%;
}
svg {
  display: block;
}
.icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
[hidden] {
  display: none !important;
}
.muted,
.small,
.field-hint {
  color: var(--muted);
}
.small,
.field-hint {
  font-size: 12px;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 9999;
  padding: 10px 16px;
  background: var(--ink);
  color: white;
  border-radius: 6px;
}
.skip-link:focus {
  top: 8px;
}
.app-header {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: relative;
  z-index: 30;
  gap: 18px;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 124px;
}
/* Official brand assets at or above the manual's minimums: horizontal lockup 120 px wide on
   desktop; below that width the manual prescribes the sign alone (minimum 16 px). */
.brand-horizontal {
  width: auto;
  height: 24px;
}
.brand-mark {
  display: none;
  width: auto;
  height: 24px;
}
.brand > span {
  font-size: 12px;
  color: var(--accent-dark);
  border-left: 1px solid #d6d3d1;
  padding-left: 10px;
  font-weight: 600;
}
.app-header nav {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-left: auto;
}
.app-header .nav-short {
  display: none;
}
.app-header nav a {
  font-size: 12px;
  color: var(--muted);
  height: 48px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  padding: 0 2px;
}
.app-header nav a[aria-current="page"] {
  color: var(--accent-dark);
  border-bottom-color: var(--accent);
}
.header-city {
  font-size: 11px;
  color: var(--quiet);
  margin-left: 20px;
}
.page-loading {
  padding: 45px 24px;
  text-align: center;
  color: var(--muted);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  border-radius: 6px;
  min-height: 40px;
  padding: 9px 15px;
  font-weight: 500;
  font-size: 13px;
  text-align: center;
  transition: background 140ms var(--ease-out);
}
.button.secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--muted);
}
.button.small {
  font-size: 12px;
  min-height: 32px;
  padding: 5px 10px;
}
.button.wide {
  width: 100%;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 30px;
  min-height: 30px;
  padding: 5px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 12px;
}
.icon-button:active,
.button:active {
  transform: translateY(1px);
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 4px;
  background: #f5f5f4;
  padding: 3px 8px;
  font-size: 11px;
  color: var(--muted);
}
.tag.complete {
  color: var(--accent-dark);
  background: var(--accent-light);
}
.tag.failed {
  color: var(--danger);
  background: #fef2f2;
}
.error-box {
  color: var(--danger);
  background: #fff1f2;
  border: 1px solid #fecdd3;
  padding: 10px 12px;
  font-size: 12px;
  border-radius: 6px;
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.notice {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafaf9;
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0;
}
.text-button {
  border: 0;
  background: transparent;
  padding: 4px 0;
  color: var(--accent-dark);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-button .icon {
  display: inline-block;
  vertical-align: middle;
  margin-right: 5px;
}
/* Reference composition: map and independent report with a persistent search dock. */
.analysis-shell {
  height: calc(100dvh - 48px);
  min-height: 440px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
}
.analysis-shell.has-result {
  grid-template-columns: minmax(0, 3fr) minmax(360px, 1fr);
}
.map-column {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}
.map-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #f3f5f3;
}
.map-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #f3f5f3;
  outline-offset: -3px !important;
}
.map-loading {
  position: absolute;
  z-index: 6;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 16px 10px 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 10px #0000001a;
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  pointer-events: none;
}
.map-loading::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: map-spin 0.9s linear infinite;
}
@keyframes map-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .map-loading::before { animation: none; } }
.address-box {
  position: absolute;
  z-index: 8;
  top: 12px;
  left: 16px;
  width: min(384px, calc(100% - 256px));
}
.address-search {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 0 10px 0 13px;
  box-shadow: 0 1px 3px #0000000d;
}
.address-search > .icon {
  color: #8d8986;
}
.address-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  height: 48px;
  font-size: 14px;
  color: var(--ink);
  text-overflow: ellipsis;
}
.address-search:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.address-search input:focus-visible {
  outline: 0;
}
.address-search input::placeholder {
  color: #78716c;
}
.address-search .icon-button {
  color: var(--accent-dark);
}
.address-detail {
  margin-top: 6px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 4px 18px #00000012;
  font-size: 12px;
  max-height: 65vh;
  overflow: auto;
}
.address-detail summary {
  color: var(--accent-dark);
  font-size: 12px;
  cursor: pointer;
}
.address-detail .fields {
  margin-top: 12px;
}
.coordinate-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.field label {
  font-size: 12px;
  color: var(--muted);
}
.field input,
.field select,
.filter-input {
  height: 40px;
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  padding: 8px 10px;
  color: var(--ink);
}
.fields {
  display: grid;
  gap: 10px;
}
.entry-switch {
  display: flex;
  gap: 16px;
  margin: 10px 0;
}
.entry-switch label {
  display: flex;
  gap: 5px;
  align-items: center;
}
.entry-switch input {
  accent-color: var(--accent);
}
.coordinate-fields ~ .field {
  margin-top: 8px;
}
.location-card {
  padding: 10px 0;
  font-size: 12px;
}
.location-card p {
  margin-bottom: 6px;
}
.confirmation {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--accent-dark);
  margin-top: 9px;
}
.confirmation input {
  accent-color: var(--accent);
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin: 1px 0;
}
.coordinates-preview {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}
.map-controls {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 7;
  width: 208px;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 1px 3px #00000010;
  background: #fffffffa;
  font-size: 12px;
  max-height: calc(100% - 132px);
  overflow-y: auto;
}
.controls-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 9px 5px 12px;
  border-bottom: 1px solid #f1f0ef;
  font-weight: 600;
}
.controls-content {
  padding: 12px;
}
.control-label {
  font-size: 10px;
  color: var(--quiet);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin: 0 0 7px;
  font-weight: 400;
}
.theme-options {
  display: flex;
  gap: 4px;
  margin-bottom: 15px;
}
/* Segmented controls share one vocabulary: same radius, border and pressed colours. */
.theme-options button {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 10px;
  min-height: 32px;
  font-size: 12px;
  background: white;
  color: var(--muted);
}
.theme-options button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.layer-list {
  display: grid;
  gap: 5px;
}
.layer-button {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 6px 9px;
  min-height: 30px;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  border-radius: 5px;
}
.layer-button[aria-pressed="true"] {
  background: #f0fdfa;
  color: #176e68;
}
.layer-button[data-layer="sectors"][aria-pressed="true"] {
  background: #fef2f2;
  color: #a72e2e;
}
.layer-dot {
  width: 9px;
  height: 9px;
  border: 1px solid currentColor;
  border-radius: 50%;
  flex-shrink: 0;
}
.layer-button[aria-pressed="true"] .layer-dot {
  background: currentColor;
}
.layer-button small {
  margin-left: auto;
  font-size: 9px;
}
.control-note {
  font-size: 10px;
  line-height: 1.45;
  color: var(--muted);
  margin-top: 10px;
}
.legend {
  margin-top: 13px;
}
.travel-preview-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 10px; font-size: 10px; color: var(--muted); }
.travel-preview-controls span { width: 100%; }
.travel-preview-controls button { border: 1px solid var(--line); border-radius: 5px; background: white; padding: 5px 8px; font-size: 10px; }
.travel-preview-controls button[aria-pressed="true"] { color: white; background: var(--accent); border-color: var(--accent); }
.layer-explanations { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 7px; }
.layer-explanations summary { color: var(--accent); cursor: pointer; font-size: 10px; }
.layer-explanations p { margin: 5px 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.legend-dot.travel-five { background: #10b981; }
.legend-dot.travel-ten { background: #c79b25; }
.legend-dot.travel-fifteen { background: #f97316; }
[data-travel-legend] { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 4px; }
[data-travel-legend][hidden] { display: none; }
[data-travel-legend] .control-label { grid-column: 1 / -1; }
[data-travel-legend] p { white-space: nowrap; }
.legend p {
  font-size: 10px;
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 5px 0;
  color: var(--muted);
}
.legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
}
.legend-dot.teal {
  background: var(--accent);
}
.legend-dot.google {
  width: 8px;
  height: 8px;
  background: #e5484d;
  box-shadow: 0 0 0 2px #fff;
}
.google-note {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--quiet);
}
.income-scale {
  height: 6px;
  border-radius: 5px;
  background: #e7e5e4;
  margin: 6px 0;
  display: flex;
  overflow: hidden;
}
.income-scale i {
  display: block;
  flex: 1;
  height: 100%;
}
.legend-range {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--muted);
}
.legend-basis {
  font-size: 9px !important;
  color: var(--quiet) !important;
  margin: 4px 0 0 !important;
  display: block !important;
}
.poll-notice {
  margin: 8px 0;
}
.map-zoom {
  position: absolute;
  right: 12px;
  bottom: 29px;
  display: grid;
  background: white;
  border: 1px solid #d6d3d1;
  border-radius: 5px;
  overflow: hidden;
  z-index: 6;
  box-shadow: 0 1px 4px #00000012;
}
.map-zoom button {
  width: 32px;
  height: 32px;
  border: 0;
  background: white;
  color: #44403c;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
}
.map-zoom button:last-child {
  border: 0;
}
.map-scope {
  position: absolute;
  left: 12px;
  bottom: 28px;
  z-index: 5;
  padding: 7px 10px;
  background: #ffffffed;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 10px;
  color: var(--muted);
  max-width: 230px;
}
.map-scope > strong {
  display: block;
  font-weight: 500;
  margin-bottom: 3px;
  color: var(--ink);
}
.map-coverage {
  display: block;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid #f1f0ef;
  color: var(--quiet);
}
.map-coverage[data-coverage="partial"],
.coverage-note[data-coverage="partial"] {
  color: #8a5a10 !important;
}
.map-attribution {
  position: absolute;
  right: 5px;
  bottom: 2px;
  z-index: 6;
  background: #ffffffd9;
  font-size: 9px;
  color: #666;
  padding: 0 3px;
}
.map-attribution a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.map-hint {
  position: absolute;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  background: #fff;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  white-space: nowrap;
  font-size: 11px;
  box-shadow: 0 2px 5px #0000000c;
}
.layers-toggle,
.map-unlock,
.reopen-report {
  display: none;
}
.query-dock {
  padding: 10px 16px 12px;
  border-top: 1px solid var(--line);
  background: #fff;
  z-index: 10;
  min-height: 89px;
}
.query-main {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.segment-field {
  width: clamp(210px, 27vw, 345px);
  position: relative;
  min-width: 180px;
}
.segment-field > label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 6px;
}
.segment-input {
  position: relative;
}
.segment-input > svg {
  position: absolute;
  left: 11px;
  top: 13px;
  color: #9b9692;
  width: 14px;
  height: 14px;
}
.segment-input input {
  width: 100%;
  height: 40px;
  padding: 8px 31px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink);
  background: #fff;
}
.segment-input .icon-button {
  position: absolute;
  right: 4px;
  top: 5px;
  min-height: 30px;
  min-width: 26px;
}
.segment-options {
  position: absolute;
  bottom: 46px;
  left: 0;
  width: 100%;
  max-height: 310px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 5px 18px #00000012;
  background: white;
  padding: 4px;
  z-index: 40;
}
.segment-option {
  width: 100%;
  border: 0;
  text-align: left;
  background: white;
  padding: 8px 10px;
  font-size: 12px;
  display: block;
  border-radius: 4px;
}
.segment-option[aria-selected="true"] {
  background: var(--accent-light);
  color: var(--accent-dark);
}
.no-options {
  padding: 12px;
  font-size: 12px;
  color: var(--muted);
}
.scope-buttons {
  display: flex;
  gap: 5px;
  align-items: center;
}
.scope-buttons button {
  background: #fff;
  border: 1px solid var(--line);
  height: 40px;
  padding: 0 13px;
  color: #57534e;
  font-size: 12px;
  white-space: nowrap;
}
.scope-buttons button[aria-pressed="true"] {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.scope-mode {
  height: 40px;
  border: 1px solid var(--line);
  padding: 0 8px;
  color: var(--muted);
  background: white;
  max-width: 110px;
  font-size: 11px;
}
.profile-options {
  display: flex;
  gap: 4px;
}
.profile-options button {
  height: 40px;
  width: 35px;
  display: grid;
  place-items: center;
  background: white;
  border: 1px solid var(--line);
  color: var(--muted);
}
.profile-options button[aria-pressed="true"] {
  background: var(--accent-light);
  color: var(--accent-dark);
  border-color: #99d4ca;
}
.query-dock .button {
  min-height: 40px;
}
.dock-context {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 10px;
  color: var(--muted);
}
.form-error:empty {
  display: none;
}
/* Saved result versus query being edited: always visible, in every width. */
.query-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.45;
}
.query-context:empty {
  display: none;
}
.query-context-label {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--muted);
}
.query-context-label .icon {
  width: 13px;
  height: 13px;
  margin-top: 2px;
}
.query-context-label.saved {
  color: var(--accent-dark);
}
.query-context-label.draft {
  color: #8a5a10;
  background: #fff8e6;
  border: 1px solid #f1dfb0;
  border-radius: 6px;
  padding: 6px 9px;
}
.query-context .text-button {
  font-size: 11px;
  white-space: nowrap;
}
.result-panel {
  min-width: 0;
  border-left: 1px solid var(--line);
  background: var(--canvas);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.result-toolbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 0;
  font-size: 10px;
  color: var(--muted);
  height: 36px;
}
.result-scroll {
  overflow: auto;
  overscroll-behavior: contain;
  flex: 1;
  padding: 0 16px 20px;
  scroll-behavior: auto;
}
/* Reading mode: the saved study is the subject; editing is a deliberate step. */
.result-context {
  flex-shrink: 0;
  padding: 2px 16px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--canvas);
}
.result-context strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.result-context > span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.result-actions {
  display: flex;
  gap: 14px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.result-actions .text-button {
  font-size: 11px;
}
.analysis-shell.dock-collapsed .query-main,
.analysis-shell.dock-collapsed .dock-context {
  display: none;
}
.analysis-shell.dock-collapsed .query-dock {
  min-height: 0;
  padding: 8px 16px;
}
.analysis-shell.dock-collapsed .query-context {
  margin-top: 0;
}
.section-nav {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 8px 0 8px;
  margin: 0 0 10px;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
}
.section-nav button {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  line-height: 1.3;
}
.section-nav button[aria-current="true"] {
  background: var(--accent-light);
  border-color: #99d4ca;
  color: var(--accent-dark);
}
.section-title:focus {
  outline: none;
}
.synthesis {
  display: grid;
  gap: 10px;
  padding: 10px 0 2px;
  border-top: 1px solid #f5f5f4;
}
.synthesis-block h3 {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 3px;
}
.synthesis-block p {
  font-size: 11px;
}
.synthesis-full {
  margin-top: 8px;
}
.synthesis-full > summary {
  font-size: 11px;
}
.saved-cuts {
  margin-top: 8px;
}
.cell-metric {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--ink);
  text-align: left;
  text-decoration: underline dotted #a8a29e;
  text-underline-offset: 3px;
  cursor: pointer;
  border-radius: 3px;
}
.cell-metric:hover {
  color: var(--accent-dark);
  text-decoration-color: var(--accent-dark);
}
.indicator-item.is-target {
  background: var(--accent-light);
  outline: 2px solid #99d4ca;
  outline-offset: -2px;
  border-radius: 6px;
  padding-left: 10px;
  padding-right: 10px;
}
.report-table td,
.compare-table td,
.indicator-value {
  font-variant-numeric: tabular-nums;
}
/* Prospecção regional: same shell as the study (map + side panel), list-first panel. */
.region-scroll {
  padding: 0 16px 24px;
}
.region-loading {
  padding: 24px 0;
  color: var(--muted);
  font-size: 12px;
}
.region-head h2 {
  font-size: 16px;
  margin: 10px 0 4px;
}
.region-head p {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
}
.region-controls {
  display: grid;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.region-control {
  display: grid;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
}
.region-control select,
.region-filter select,
.region-filter input {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0 9px;
  color: var(--ink);
  font-size: 12px;
  width: 100%;
  min-width: 0;
}
.region-control .scope-buttons button {
  flex: 1;
  height: 36px;
  font-size: 11px;
  padding: 0 8px;
}
.region-sort-rule {
  margin-top: 0 !important;
}
.region-filters > summary {
  font-size: 12px;
  font-weight: 500;
}
.region-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}
.region-filter {
  display: grid;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}
.region-filter small {
  color: var(--quiet);
}
.region-filter-wide {
  grid-column: 1 / 3;
}
.region-filter-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.region-filter-actions .button {
  min-height: 36px;
  font-size: 12px;
}
.region-universe {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 10px;
  line-height: 1.6;
}
.region-universe strong {
  color: var(--ink);
}
.region-universe a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.region-table td:first-child {
  min-width: 140px;
}
.region-table tbody tr.is-selected td {
  background: var(--accent-light);
}
.regional-rate-warning {
  display: block;
  color: #9a3412;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 4px;
}
.region-row {
  border: 0;
  background: transparent;
  padding: 2px 0;
  text-align: left;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  display: block;
  width: 100%;
  border-radius: 4px;
}
.region-row strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
}
.region-row small {
  display: block;
  font-size: 10px;
  color: var(--quiet);
}
.region-row[aria-current="true"] strong {
  color: var(--accent-dark);
}
.region-empty {
  padding: 34px 16px;
}
.region-empty h2 {
  font-size: 15px;
}
.region-detail {
  border-color: #99d4ca;
  background: #fbfefd;
}
.region-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}
.region-detail-head h2 {
  font-size: 15px;
}
.region-detail-head p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.region-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}
.region-metric {
  padding: 9px 0;
  border-top: 1px solid #edf3f1;
  min-width: 0;
}
.region-metric-label {
  font-size: 10px;
  color: var(--muted);
}
.region-metric-value {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.region-metric-unit {
  font-size: 9px;
  color: var(--quiet);
  margin: 2px 0 3px;
}
.region-detail-actions {
  margin-top: 12px;
}
.region-detail-actions .button {
  width: 100%;
}
.region-sources {
  margin-top: 18px;
  font-size: 11px;
  color: var(--muted);
}
.region-sources h3 {
  font-size: 11px;
  margin-bottom: 6px;
}
.region-sources li {
  margin: 5px 0;
  line-height: 1.55;
}
.region-legend {
  position: absolute;
  left: 12px;
  bottom: 28px;
  z-index: 5;
  width: 210px;
  padding: 9px 11px;
  background: #ffffffed;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 10px;
  color: var(--muted);
}
.region-legend strong {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
}
.region-legend p {
  font-size: 9px;
  line-height: 1.4;
  margin-top: 5px;
}
.region-origin {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--accent-dark);
  background: var(--accent-light);
  border: 1px solid #99d4ca;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 10px;
}
.region-origin > span {
  flex: 1 1 260px;
  min-width: 0;
  line-height: 1.5;
}
.region-origin .icon {
  flex-shrink: 0;
  margin-top: 2px;
}
.region-origin .text-button {
  font-size: 11px;
}
@media (max-width: 760px) {
  .region-scroll {
    padding: 0 12px 20px;
  }
  .region-legend {
    width: 170px;
    bottom: 76px;
    left: 12px;
  }
  .region-shell .map-column {
    grid-template-rows: 350px;
  }
  .region-metrics {
    grid-template-columns: 1fr;
  }
}
.report-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  margin: 0 0 18px;
  overflow-wrap: anywhere;
}
.section-title {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--quiet);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.section-title > span {
  flex: 1 1 auto;
  min-width: 0;
}
.report-card p,
.report-card li {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.65;
}
.report-card p + p {
  margin-top: 8px;
}
.report-card ul {
  padding-left: 16px;
  margin: 10px 0;
}
.report-card li {
  margin: 6px 0;
}
.score-value {
  font-size: 30px;
  line-height: 1.3;
  color: var(--gold);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.score-value small {
  font-size: 11px;
  font-weight: 400;
  color: var(--quiet);
}
/* Ranges are intervals: a neutral track with only the band between the extremes coloured. */
.range-track {
  height: 7px;
  position: relative;
  background: #ecebe9;
  border-radius: 5px;
  overflow: hidden;
  margin: 8px 0;
}
.range-track b {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 5px;
  background: var(--gold);
  min-width: 3px;
}
.factor-track {
  height: 4px;
  margin: 4px 0;
}
.factor-track b {
  background: #2f8f62;
}
.chart-track b {
  background: #1f8a80;
}
.score-description {
  color: #936419 !important;
  font-size: 11px !important;
  margin-bottom: 6px;
}
.score-calibration {
  font-size: 11px !important;
  color: var(--muted) !important;
  border-left: 1px solid #e0c58a;
  padding-left: 9px;
  margin-bottom: 14px;
}
.factor {
  margin: 13px 0;
}
.factor-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}
.factor-title > span {
  flex: 1 1 auto;
  min-width: 0;
}
.factor-title strong {
  font-size: 11px;
  margin-left: auto;
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.factor-title > .icon {
  width: 13px;
  height: 13px;
  color: #a8a29e;
}
.factor small {
  font-size: 10px;
  color: var(--muted);
  display: block;
  line-height: 1.5;
}
.help-button {
  border: 1px solid #a8a29e;
  width: 13px;
  height: 13px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  font-size: 9px;
  line-height: 1;
  background: white;
  color: var(--muted);
  flex-shrink: 0;
}
.help-content {
  font-size: 11px;
  line-height: 1.55;
  background: #f5f5f4;
  padding: 9px 11px;
  border-radius: 5px;
  margin: -6px 0 12px;
  color: var(--muted);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  overflow-wrap: anywhere;
}
.help-content:focus {
  outline: 2px solid var(--accent-dark);
  outline-offset: 2px;
}
.factor .help-content {
  margin: 6px 0 4px;
}
.modern-score-value {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  color: var(--good);
  font-size: 31px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.modern-score-value small { color: var(--quiet); font-size: 12px; font-weight: 400; }
.modern-score-value .score-label { font-size: 14px; font-weight: 600; margin-left: 6px; }
.factor-weight { color: var(--quiet); font-size: 11px; font-weight: 400; margin-left: 6px; }
.modern-score.caution .modern-score-value { color: var(--gold); }
.modern-score.poor .modern-score-value { color: var(--danger); }
.modern-score.pending .modern-score-value { color: var(--quiet); font-size: 22px; }
.modern-score-track { height: 5px; margin: 5px 0 2px; background: #eeefee; border-radius: 8px; overflow: hidden; }
.modern-score-track b { display: block; height: 100%; background: #1d9b55; border-radius: inherit; }
.modern-total { height: 8px; margin: 10px 0 7px; }
.modern-score.caution .modern-total b { background: #e2aa16; }
.modern-score.poor .modern-total b { background: #c64d42; }
.modern-factor { margin: 12px 0 14px; }
.modern-factor .factor-title { font-size: 12px; }
.modern-factor .factor-title strong { font-size: 12px; }
.modern-factor .factor-title > .icon { width: 15px; height: 15px; }
.modern-factor small { font-size: 10px; color: var(--quiet); }
.competitor-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.google-place-card { margin: 12px 0; padding: 14px; border: 1px solid #d7dedc; border-radius: 8px; background: #fafcfb; }
.google-place-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.google-place-head strong { font-size: 14px; }
.google-attribution { font-family: Roboto, Arial, sans-serif; font-weight: 400; font-size: 12px; color: #5e5e5e; white-space: nowrap; }
.google-reviews { list-style: none; margin: 12px 0; padding: 0; }
.google-review { border-top: 1px solid #e3e8e5; padding: 10px 0; }
.google-review-author { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.google-review-author img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.google-review p { margin: 6px 0; overflow-wrap: anywhere; }
.source-note {
  font-size: 10px !important;
  color: var(--muted) !important;
  line-height: 1.5 !important;
  margin-top: 12px !important;
}
.summary-status {
  color: var(--good);
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 10px;
}
.summary-text {
  padding: 10px 0;
  border-top: 1px solid #f5f5f4;
}
.copy-summary {
  width: 100%;
  height: 30px;
  margin-top: 14px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: white;
  border-radius: 5px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 12px;
}
.metric {
  min-width: 0;
  padding: 13px 9px;
  border-top: 1px solid #f1f0ef;
}
.metric:nth-child(odd) {
  padding-left: 0;
  border-right: 1px solid #f1f0ef;
}
.metric:nth-child(even) {
  padding-right: 0;
  padding-left: 12px;
}
.metric-label {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 6px;
}
.metric-number {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  overflow-wrap: normal;
}
.metric-unit {
  font-size: 10px;
  color: var(--muted);
  margin: 4px 0;
}
.metric-kind {
  font-size: 9px;
  color: var(--quiet);
}
details {
  font-size: 11px;
}
summary {
  cursor: pointer;
  color: var(--accent-dark);
  min-height: 24px;
  padding: 3px 0;
}
details p {
  margin: 7px 0;
}
.range-chart {
  display: grid;
  gap: 11px;
  margin-top: 12px;
}
.chart-row {
  font-size: 11px;
}
.chart-label {
  display: flex;
  justify-content: space-between;
  gap: 7px;
  margin-bottom: 4px;
  color: var(--muted);
}
.chart-label strong {
  font-weight: 500;
  color: var(--ink);
  font-size: 10px;
}
.chart-track {
  height: 7px;
  border-radius: 3px;
  margin: 0;
}
.bar-legend {
  display: flex;
  gap: 15px;
  margin: 10px 0;
  font-size: 10px;
  color: var(--muted);
}
/* Segment market series: openings use the chart teal, closures the range gold. */
.bar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.bar-legend .legend-dot {
  display: inline-block;
}
.legend-dot.gold,
.chart-track.market-closed b {
  background: var(--gold);
}
.chart-track.market-closed {
  margin-top: 3px;
}
.chart-track b.market-band {
  opacity: 0.45;
}
.market-recent {
  margin: 4px 0 8px;
  padding-left: 18px;
  font-size: 12px;
}
.competitor-row {
  padding: 11px 0;
  border-bottom: 1px solid #f1f0ef;
}
.competitor-row summary {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: var(--ink);
  list-style: none;
}
.competitor-number {
  font-size: 10px;
  line-height: 22px;
  color: var(--accent-dark);
  border-radius: 50%;
  background: #f0fdfa;
  min-width: 22px;
  text-align: center;
}
.competitor-name {
  font-size: 12px;
  font-weight: 500;
  flex: 1;
}
.competitor-distance {
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}
.competitor-row details {
  padding-top: 6px;
}
.competitor-row p {
  margin: 5px 0;
}
.competitor-row .icon {
  height: 13px;
  width: 13px;
  margin-top: 3px;
}
.report-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 10px;
  margin: 9px 0;
}
.report-table th,
.report-table td {
  padding: 7px 5px;
  text-align: left;
  border-bottom: 1px solid #f1f0ef;
  vertical-align: top;
  font-weight: 400;
}
.report-table th {
  color: var(--quiet);
  font-size: 9px;
  text-transform: uppercase;
  overflow-wrap: normal; /* whole words in headers; .table-wrap scrolls if needed */
}
.table-wrap {
  max-width: 100%;
  overflow: auto;
}
.report-table td:first-child {
  min-width: 85px;
}
.report-table th:first-child,
.report-table td:first-child {
  padding-left: 0;
}
.subheading {
  font-size: 11px;
  margin: 14px 0 6px;
  color: var(--muted);
  font-weight: 500;
}
.report-footer {
  flex-shrink: 0;
  padding: 10px 16px 12px;
  border-top: 1px solid var(--line);
  background: #fafaf9;
}
.report-footer > .button {
  width: 100%;
  height: 44px;
}
.secondary-downloads {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 5px;
}
.secondary-downloads a,
.secondary-downloads button {
  font-size: 10px;
  color: var(--accent-dark);
  border: 0;
  background: transparent;
  padding: 3px;
  cursor: pointer;
}
.result-panel .processing {
  padding: 25px 20px;
}
.processing h2 {
  font-size: 18px;
  margin-bottom: 12px;
}
.processing p {
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0;
}
.progress-steps {
  margin: 25px 0;
  padding-left: 22px;
}
.progress-steps li {
  font-size: 12px;
  padding: 7px;
  color: var(--muted);
}
.progress-steps .active {
  color: var(--accent-dark);
  font-weight: 600;
}
.processing-mark {
  height: 4px;
  background: #e7f5f1;
  border-radius: 3px;
  overflow: hidden;
  margin: 18px 0;
}
.processing-mark::after {
  content: "";
  display: block;
  height: 100%;
  width: 35%;
  background: var(--accent);
  animation: processing 1.8s linear infinite;
}
@keyframes processing {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(385%);
  }
}
.analysis-shell.report-hidden {
  grid-template-columns: 1fr;
}
.analysis-shell.report-hidden .result-panel {
  display: none;
}
.analysis-shell.report-hidden .reopen-report {
  display: flex;
}
.reopen-report {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 12;
}
.map-controls.collapsed {
  display: none;
}
.controls-open {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 7;
}
.result-panel.is-hidden {
  display: none;
}
/* History and supplementary reading keep the centered width of the reference. */
.history-page,
.method-page {
  max-width: 1040px;
  margin: auto;
  padding: 36px 24px 60px;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.page-head p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 5px;
}
.history-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}
.history-filters > .search-field {
  flex: 1;
  position: relative;
}
.search-field > .icon {
  position: absolute;
  left: 12px;
  top: 12px;
  color: #9b9692;
}
.search-field input {
  padding-left: 36px;
}
.history-filters select {
  height: 40px;
  border: 1px solid var(--line);
  background: white;
  padding: 0 12px;
  color: #57534e;
  max-width: 190px;
  font-size: 12px;
}
.studies-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.study-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  background: #fff;
  transition: border-color 140ms;
}
.study-card > a {
  display: block;
  min-height: 108px;
}
.study-card-header {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.study-card h2 {
  font-size: 14px;
  line-height: 1.6;
  font-weight: 600;
  margin-bottom: 7px;
}
.study-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
}
.study-card-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f5f5f4;
}
.card-fact {
  display: block;
  font-size: 11px;
  color: var(--muted);
  min-width: 0;
}
.card-fact strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.card-fact small {
  display: block;
  font-size: 10px;
  color: var(--quiet);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-fact.gap {
  font-size: 11px;
  color: var(--quiet);
  padding-top: 3px;
}
.sort-notice {
  font-size: 12px;
  color: #8a5a10;
  background: #fff8e6;
  border: 1px solid #f1dfb0;
  border-radius: 6px;
  padding: 8px 12px;
  margin: -12px 0 18px;
}
.study-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 13px;
  border-top: 1px solid #f5f5f4;
  padding-top: 10px;
}
.compare-check {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.compare-check input {
  accent-color: var(--accent);
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 25px;
  font-size: 12px;
  color: var(--muted);
}
.empty {
  padding: 64px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed #d6d3d1;
  border-radius: 10px;
  background: #fff;
}
.empty h2 {
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 9px;
}
.empty p {
  font-size: 13px;
  margin-bottom: 18px;
}
.compare-bar {
  position: fixed;
  z-index: 30;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, calc(100% - 32px));
  bottom: 20px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 4px 20px #00000012;
  border-radius: 8px;
  margin-top: 20px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  font-size: 13px;
}
.compare-table {
  width: 100%;
  min-width: 640px; /* five studies scroll inside .table-wrap on narrow screens */
  border-collapse: collapse;
  font-size: 12px;
  background: #fff;
}
.compare-table th,
.compare-table td {
  padding: 14px;
  border: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}
.compare-table th {
  background: #f5f5f4;
  font-weight: 500;
}
.compare-table td {
  font-variant-numeric: tabular-nums;
}
.compare-table small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}
.compare-table .compare-source {
  margin-top: 8px;
  font-variant-numeric: normal;
}
.compare-table .compare-source summary {
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 11px;
}
.compare-table .compare-source small {
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.compare-subtitle {
  font-size: 14px;
  margin: 24px 0 10px;
}
.read-only-notice {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: #8a5a10;
  background: #fff8e6;
  border-color: #f1dfb0;
  font-size: 12px;
}
.read-only-notice .icon {
  flex-shrink: 0;
  margin-top: 2px;
}
.query-dock > .read-only-notice {
  margin: 0 0 10px;
}
.method-page {
  max-width: 940px;
}
.method-page > h1 {
  margin-bottom: 15px;
}
.method-page > p {
  color: var(--muted);
  max-width: 70ch;
  margin-bottom: 20px;
}
.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.method-grid .report-card {
  margin: 0;
  font-size: 13px;
}
.method-grid .report-card p {
  font-size: 13px;
}
.method-grid .report-card h2 {
  margin-bottom: 12px;
}
.initial-guidance {
  position: absolute;
  left: 16px;
  bottom: 45px;
  width: 270px;
  background: white;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  z-index: 5;
  box-shadow: 0 2px 6px #00000006;
}
.initial-guidance h2 {
  font-size: 15px;
  margin-bottom: 6px;
}
.initial-guidance p {
  font-size: 12px;
  color: var(--muted);
}
.initial-guidance .text-button {
  margin-top: 10px;
}
.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  gap: 20px;
  margin-bottom: 20px;
}
.modal-tabs button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 9px 0;
  color: var(--muted);
  font-size: 12px;
}
.modal-tabs button[aria-selected="true"] {
  border-color: var(--accent);
  color: var(--accent-dark);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  background: white;
  color: var(--ink);
  max-height: 85dvh;
  width: min(880px, calc(100vw - 32px));
  box-shadow: 0 16px 60px #0003;
}
dialog::backdrop {
  background: #11182766;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: white;
  z-index: 2;
}
.dialog-head h2 {
  font-size: 16px;
}
.dialog-head .icon-button {
  min-width: 44px;
}
.dialog-head .icon-button > .icon {
  width: 19px;
  height: 19px;
}
#detail-body {
  padding: 20px;
  min-height: 260px;
}
.indicator-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}
.indicator-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.indicator-item h3 {
  font-size: 12px;
  margin-bottom: 6px;
}
.indicator-value {
  font-size: 17px;
  font-weight: 600;
}
.indicator-item p {
  font-size: 11px;
  margin: 6px 0;
  color: var(--muted);
}
.indicator-item summary {
  font-size: 11px;
}
.indicator-search-row {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}
.indicator-search-row input {
  flex: 1;
}
.indicator-search-row span {
  font-size: 11px;
  color: var(--muted);
}
.section-list > details {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.section-list > details > summary {
  font-size: 13px;
}
.section-list p,
.section-list li {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0;
}
.sources-list p,
.sources-list li {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0;
}
.sources-list h3 {
  margin: 18px 0 10px;
}
.source-table {
  font-size: 11px;
  width: 100%;
  border-collapse: collapse;
}
.source-table td,
.source-table th {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.source-table th {
  font-weight: 500;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  background: #1c3633;
  color: white;
  box-shadow: 0 4px 15px #0002;
  border-radius: 7px;
  padding: 12px 18px;
  font-size: 12px;
  max-width: calc(100% - 32px);
}
#layers-dialog {
  width: 100%;
  max-width: 100%;
  max-height: 78dvh;
  margin: auto 0 0;
  border-radius: 16px 16px 0 0;
  padding-bottom: env(safe-area-inset-bottom);
}
#mobile-layers {
  padding: 5px 20px 24px;
}
#mobile-layers .controls-content {
  padding: 10px 0;
}
#mobile-layers .layer-button {
  min-height: 44px;
  font-size: 13px;
}
#mobile-layers .theme-options button {
  min-height: 40px;
  font-size: 12px;
}
#mobile-layers .control-label {
  font-size: 11px;
}
#mobile-layers .control-note,
#mobile-layers .legend p {
  font-size: 12px;
}
#mobile-layers .legend-range {
  font-size: 11px;
}
@media (hover: hover) and (pointer: fine) {
  .button:hover {
    background: var(--accent-dark);
  }
  .button.secondary:hover,
  .scope-buttons button:not([aria-pressed="true"]):hover {
    background: #f5f5f4;
  }
  .icon-button:hover {
    background: #f5f5f4;
    border-radius: 5px;
  }
  .segment-option:hover,
  .segment-option:focus {
    background: #f0fdfa;
  }
  .study-card:hover {
    border-color: #a8c7c0;
  }
  .layer-button:hover {
    border-color: #ccede7;
  }
  .app-header nav a:hover {
    color: var(--accent-dark);
  }
}
@media (min-width: 1700px) {
  .report-card {
    padding: 20px;
  }
  .result-scroll {
    padding-left: 16px;
    padding-right: 16px;
  }
  .query-main {
    gap: 8px;
  }
  .segment-field {
    width: 345px;
  }
}
@media (max-width: 1200px) and (min-width: 761px) {
  .analysis-shell.has-result {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
  .address-box {
    width: calc(100% - 236px);
    left: 12px;
  }
  .address-search input {
    font-size: 12px;
  }
  .segment-field {
    width: 220px;
  }
  .scope-buttons button {
    padding: 0 9px;
    font-size: 11px;
  }
  .scope-buttons button span {
    display: none;
  }
  .query-main {
    gap: 6px;
  }
  .query-dock {
    padding: 9px 12px;
  }
  .query-context {
    font-size: 10px;
  }
  .header-city {
    display: none;
  }
  .report-card {
    padding: 16px;
  }
  .result-scroll {
    padding: 0 12px 16px;
  }
}
@media (max-width: 760px) {
  body {
    font-size: 14px;
  }
  .app-header {
    padding: 0 12px;
    gap: 8px;
    height: 52px;
  }
  .brand {
    min-width: 0;
    gap: 7px;
  }
  .brand-horizontal {
    display: none;
  }
  .brand-mark {
    display: block;
  }
  .brand > span {
    font-size: 10px;
    padding-left: 7px;
  }
  /* The header must fit a 390 px phone; wider, the browser widened every page by a few
     pixels and fixed bars went off screen (T-27 phone test). */
  .app-header nav {
    gap: 2px;
  }
  .app-header nav a {
    font-size: 11px;
    height: 52px;
  }
  .app-header .nav-full {
    display: none;
  }
  .app-header .nav-short {
    display: inline;
  }
  .header-city {
    display: none;
  }
  .analysis-shell,
  .analysis-shell.has-result {
    height: auto;
    min-height: calc(100dvh - 52px);
    display: flex;
    flex-direction: column;
    overflow: visible;
  }
  .map-column {
    height: calc(100dvh - 52px);
    min-height: 530px;
    overflow: visible;
    display: grid;
    grid-template-rows: minmax(340px, 1fr) auto;
  }
  .has-result .map-column {
    height: auto;
    min-height: 0;
    grid-template-rows: 280px auto;
  }
  /* The score must show without a long scroll on a phone (T-27 phone test). */
  .has-result .map-stage {
    min-height: 280px;
  }
  .map-stage {
    min-height: 340px;
    overflow: hidden;
  }
  .map-viewport {
    touch-action: pan-y;
  }
  .address-box {
    width: calc(100% - 24px);
    top: 12px;
    left: 12px;
  }
  .address-search {
    min-height: 46px;
  }
  .address-search input {
    height: 44px;
    font-size: 16px;
  }
  .address-detail {
    max-height: 260px;
  }
  .field input,
  .field select,
  .filter-input,
  .segment-input input,
  .history-filters select {
    font-size: 16px;
  }
  .address-detail .coordinate-fields input {
    font-size: 16px;
  }
  .map-controls {
    display: none;
  }
  .controls-open {
    display: none;
  }
  .layers-toggle {
    display: flex;
    position: absolute;
    left: 12px;
    bottom: 30px;
    background: #fff;
    z-index: 7;
    font-size: 12px;
    border: 1px solid var(--line);
    min-height: 36px;
    padding: 7px 11px;
    gap: 7px;
    align-items: center;
    border-radius: 6px;
    box-shadow: 0 1px 4px #0000000c;
  }
  .layers-toggle .icon {
    width: 15px;
    height: 15px;
  }
  .map-scope {
    left: 12px;
    bottom: 72px;
    max-width: 185px;
    font-size: 9px;
  }
  .map-hint {
    display: none;
  }
  .map-zoom {
    right: 12px;
    bottom: 30px;
  }
  .map-zoom button {
    width: 44px;
    height: 44px;
  }
  .map-unlock {
    display: flex;
    align-items: center;
    position: absolute;
    left: auto;
    right: 64px;
    top: auto;
    bottom: 30px;
    transform: none;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffffef;
    font-size: 11px;
    color: var(--muted);
    z-index: 6;
    box-shadow: 0 2px 5px #0000000c;
  }
  .map-unlock.is-active {
    border-color: var(--accent, #16857a);
    color: var(--ink);
  }
  .map-stage:has(.silhar-sector-card:not(.silhar-sector-hover)) .map-scope,
  .map-stage:has(.silhar-sector-card:not(.silhar-sector-hover)) .map-unlock,
  .map-stage:has(.silhar-sector-card:not(.silhar-sector-hover)) .layers-toggle {
    display: none;
  }
  .query-dock {
    padding: 10px 12px 12px;
    min-height: 146px;
  }
  .query-main {
    gap: 7px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .segment-field {
    width: 100%;
    min-width: 0;
    grid-column: 1/3;
  }
  .segment-field > label {
    font-size: 11px;
    margin-bottom: 4px;
  }
  .segment-input input {
    height: 42px;
  }
  .scope-buttons {
    gap: 4px;
    min-width: 0;
    flex-wrap: wrap;
  }
  .scope-buttons button {
    height: 38px;
    font-size: 11px;
    padding: 0 10px;
    flex: 1;
  }
  .scope-buttons button span {
    display: none;
  }
  .scope-mode {
    height: 38px;
    max-width: 96px;
    font-size: 10px;
  }
  .query-main > .button {
    height: 38px;
    min-height: 38px;
    padding: 8px 12px;
    align-self: end;
  }
  .query-main > .profile-options {
    grid-row: 3;
    grid-column: 1/2;
  }
  .profile-options button {
    height: 32px;
    width: 38px;
  }
  .query-main > .scope-mode {
    grid-column: 1/2;
    grid-row: 3;
    justify-self: end;
  }
  .dock-context {
    font-size: 9px;
    gap: 5px;
  }
  .query-context {
    font-size: 11px;
  }
  .result-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    display: block;
    overflow: visible;
  }
  .result-toolbar {
    height: 39px;
    padding: 6px 12px;
  }
  .result-context {
    padding: 2px 12px 10px;
  }
  .section-nav {
    top: 52px;
  }
  .analysis-shell.dock-collapsed .query-dock {
    padding: 8px 12px;
    min-height: 0;
  }
  .result-scroll {
    overflow: visible;
    padding: 0 12px 16px;
  }
  .report-card {
    padding: 18px;
    margin-bottom: 14px;
  }
  .section-title {
    font-size: 12px;
  }
  .report-card p,
  .report-card li {
    font-size: 12px;
  }
  .factor-title {
    font-size: 12px;
  }
  .factor small {
    font-size: 10px;
  }
  .metric-number {
    font-size: 18px;
  }
  .metric-label {
    font-size: 11px;
  }
  .metric-unit {
    font-size: 11px;
  }
  .report-footer {
    position: sticky;
    bottom: 0;
    z-index: 16;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 8px #00000008;
  }
  .analysis-shell.report-hidden .map-column {
    height: calc(100dvh - 52px);
  }
  .reopen-report {
    right: 12px;
    top: 70px;
    font-size: 11px;
  }
  .history-page,
  .method-page {
    padding: 26px 16px 40px;
  }
  .page-head {
    align-items: flex-start;
    margin-bottom: 25px;
    gap: 12px;
  }
  .page-head h1 {
    font-size: 22px;
  }
  .page-head p {
    font-size: 12px;
  }
  .page-head .button {
    font-size: 11px;
    white-space: nowrap;
    padding: 8px 10px;
    min-height: 36px;
  }
  .history-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .history-filters > .search-field {
    grid-column: 1/3;
  }
  .history-filters select {
    width: 100%;
    max-width: none;
    font-size: 13px;
  }
  .studies-grid {
    grid-template-columns: 1fr;
  }
  .study-card {
    padding: 18px;
  }
  .study-card > a {
    min-height: 0;
  }
  .study-card h2 {
    font-size: 14px;
  }
  .study-card-meta {
    font-size: 12px;
  }
  .compare-bar {
    font-size: 12px;
    padding: 10px;
    bottom: 12px;
  }
  .compare-bar .button {
    font-size: 11px;
  }
  .method-grid {
    grid-template-columns: 1fr;
  }
  .initial-guidance {
    left: 12px;
    bottom: 125px;
    width: 240px;
    padding: 15px;
  }
  .initial-guidance h2 {
    font-size: 14px;
  }
  .initial-guidance p {
    font-size: 11px;
  }
  .indicator-list {
    grid-template-columns: 1fr;
  }
  .indicator-search-row {
    display: block;
  }
  .indicator-search-row span {
    display: block;
    margin-top: 8px;
  }
  .modal-tabs {
    gap: 15px;
    overflow: auto;
    white-space: nowrap;
  }
  .modal-tabs button {
    font-size: 12px;
  }
  dialog {
    max-height: 90dvh;
  }
  .dialog-head {
    padding: 12px 15px;
  }
  #detail-body {
    padding: 15px;
  }
  .source-table {
    font-size: 10px;
  }
  .source-table td,
  .source-table th {
    padding: 8px 5px;
  }
  .help-button {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }
  .icon-button {
    min-height: 36px;
    min-width: 36px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .processing-mark::after {
    width: 100%;
    opacity: 0.5;
  }
}

.legend-dot.green {
  background: #22c55e;
}
.legend-dot {
  background: #f87171;
}

.street-view-frame{width:100%;aspect-ratio:16/10;min-height:230px;overflow:hidden;border:1px solid #e7e5e4;border-radius:10px;background:#f5f5f4}
.street-view-frame iframe{display:block;width:100%;height:100%;border:0}
.street-view-open{display:inline-flex;align-items:center;margin-top:8px;color:#0f766e;font-size:12px;font-weight:600;text-decoration:none}
.street-view-open:hover,.street-view-open:focus-visible{text-decoration:underline}
.street-view-card .source-note{font-size:11px;line-height:1.5}
@media(max-width:600px){.street-view-frame{aspect-ratio:4/3;min-height:210px}}

/* Accounts: header state, sign-in and sign-up pages. */
body[data-auth="out"] .app-header nav,
body[data-auth="out"] .header-city,
body[data-auth="unknown"] .app-header nav {
  display: none;
}
.account {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 18px;
  font-size: 12px;
  color: var(--muted);
  min-width: 0;
}
.account[hidden] {
  display: none;
}
.account-email {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-credits {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 8px;
  color: var(--ink);
  white-space: nowrap;
}
a.account-credits {
  text-decoration: none;
}
.credits-short {
  display: none;
}
a.account-credits:hover,
a.account-credits:focus-visible {
  border-color: var(--ink);
}
.credits-total {
  font-size: 18px;
  margin: 8px 0 12px;
}
.credits-buckets {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.credits-buckets li {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 12px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-width: 150px;
}
.credits-rule,
.credits-empty {
  color: var(--muted);
  max-width: 64ch;
}
.credits-title {
  font-size: 16px;
  margin: 24px 0 8px;
}
.credit-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}
.credit-entry {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.credit-when {
  color: var(--muted);
  font-size: 13px;
}
.credit-what small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.credit-what a {
  overflow-wrap: anywhere;
}
.credit-delta {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
@media (max-width: 560px) {
  .credit-entry {
    grid-template-columns: 1fr auto;
  }
  .credit-when {
    grid-column: 1 / -1;
  }
}
.pack-intro {
  margin: 0 0 16px;
  color: var(--muted);
}
.pack-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  max-width: 760px;
}
.pack {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--surface);
}
.pack.is-featured {
  border: 2px solid var(--accent);
  padding: 23px 21px 21px;
}
.pack-badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.pack-kind {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 8px;
}
.pack-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.pack-price {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.pack-each {
  color: var(--accent);
  font-size: 14px;
}
.pack-headline {
  margin-top: 14px;
  font-size: 16px;
}
.pack-subtitle {
  color: var(--muted);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.pack-features {
  list-style: none;
  padding: 0;
  margin: 14px 0 20px;
  display: grid;
  gap: 10px;
  flex: 1;
  align-content: start;
}
.pack-features li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 8px;
  font-size: 14px;
  line-height: 1.4;
}
.pack-features svg {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--accent);
}
.pack .button {
  width: 100%;
  justify-content: center;
}
.order-entry .credit-what a {
  display: inline-block;
  margin-top: 4px;
  margin-right: 12px;
  font-size: 13px;
}
.grant-form {
  max-width: 420px;
}
.account-logout {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 12px;
  min-height: 36px;
  padding: 0 4px;
  cursor: pointer;
}
.account-logout:hover {
  color: var(--ink);
}
.credit-notice {
  margin-bottom: 8px;
}
/* The Silhar mancha (design system v6.2): blurred warm and cool patches behind the account pages,
   the one place the brand atmosphere enters this operational interface (decisão do Bruno, 25/09/2026). */
.auth-page {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #edf1f4;
  min-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 56px 16px;
}
.auth-page::before {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: -1;
  background:
    radial-gradient(34% 40% at 14% 82%, #fcc06e 0%, #ffe7c2 42%, transparent 72%),
    radial-gradient(38% 44% at 86% 18%, #92d2fc 0%, #b4b3fe 46%, transparent 74%),
    radial-gradient(26% 30% at 70% 78%, #b8b4f6 0%, transparent 70%),
    radial-gradient(22% 26% at 24% 16%, #ffe7c2 0%, transparent 70%);
  filter: blur(48px);
  pointer-events: none;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.auth-card h1 {
  font-size: 22px;
  line-height: 1.25;
  margin: 0 0 8px;
}
/* The heading receives focus programmatically on each page change; it is not a control. */
.auth-card h1:focus,
.auth-card h1:focus-visible {
  outline: none;
  box-shadow: none;
}
.auth-lead {
  margin: 0 0 20px;
  color: var(--muted);
}
.auth-form {
  display: grid;
  gap: 14px;
}
.auth-field {
  display: grid;
  gap: 6px;
}
.auth-field label {
  font-weight: 500;
  font-size: 13px;
}
.auth-field input,
.auth-field select {
  min-height: 44px;
  border: 1px solid #d6d3d1;
  border-radius: 6px;
  padding: 8px 12px;
  background: #fff;
  color: var(--ink);
}
.auth-field input:focus-visible,
.auth-field select:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 1px;
}
.auth-field input[aria-invalid="true"],
.auth-field select[aria-invalid="true"] {
  border-color: var(--danger);
}
.auth-hint {
  margin: 0;
  font-size: 12px;
  color: var(--quiet);
}
.auth-error:empty {
  display: none;
}
.auth-error .text-button {
  margin-top: 8px;
}
.auth-ok {
  margin: 0 0 14px;
  color: var(--accent-dark);
}
.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 0;
  font-size: 13px;
}
.auth-links a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.auth-legal {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.auth-legal a,
.auth-site a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-site {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13px;
}
.auth-site a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}
#auth-status:not(:empty) {
  margin-bottom: 14px;
}
@media (max-width: 1200px) {
  .account-email {
    display: none;
  }
}
@media (max-width: 760px) {
  .account {
    margin-left: 4px;
    gap: 6px;
  }
  .account-credits {
    font-size: 11px;
    padding: 1px 6px;
  }
  .account-credits .credits-word {
    display: none;
  }
  .account-credits .credits-short {
    display: inline;
  }
  .account-logout {
    font-size: 10px;
  }
  .auth-page {
    padding: 24px 16px;
    min-height: calc(100dvh - 52px);
  }
  .auth-card {
    padding: 22px 18px;
  }
}

/* City search (T-34): above the address, the list opens downward over the map. */
.city-picker {
  width: 100%;
  margin-bottom: 8px;
  padding: 8px 10px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 3px #0000000d;
}
.city-picker .city-options {
  top: 64px;
  bottom: auto;
}
.city-picker .segment-option[aria-disabled="true"] {
  color: var(--muted);
  cursor: not-allowed;
}

/* City of each study (T-36): with every municipality, the address alone is ambiguous. */
.study-card .study-card-city {
  margin: -4px 0 7px;
  font-size: 12px;
  color: var(--muted);
}
.region-panel .city-picker {
  margin-bottom: 12px;
  box-shadow: none;
}
.location-card .location-city {
  margin: 2px 0 6px;
  font-size: 12px;
  color: var(--muted);
}

.address-box .street-options {
  position: relative;
  bottom: auto;
  margin-top: 4px;
}
.client-index{list-style:none;padding:0;display:grid;gap:8px}
.client-index a{display:grid;gap:4px;text-decoration:none}
/* No WebGL on the device: the map area says so and the page goes on (T-27 phone test). */
.map-unavailable {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  background: var(--paper, #f4f5f3);
}
/* The fixed compare bar must not cover the last cards of the list. */
.history-page:has(.compare-bar) {
  padding-bottom: 140px;
}
/* Scrolling to a card (keyboard focus, links) stops above the fixed compare bar. */
html:has(.compare-bar) {
  scroll-padding-bottom: 140px;
}
/* Without a drawn map its controls and legends have nothing to act on: the notice stands alone. */
.map-stage:has(.map-unavailable) :is(.map-zoom, .map-unlock, .map-scope, .layers-toggle, .region-legend, .legend) {
  display: none;
}
/* Phones up to 430 px (iPhone SE to Pro Max, with the admin "Clientes" link): the product name
   gives way so the menu and "Sair" fit without widening the page (T-27 phone test). */
@media (max-width: 430px) {
  .app-header .brand > span {
    display: none;
  }
}
/* On short phones the fixed documents bar of the result covered what the page scrolled to
   (report tabs, indicator button on a 667 px iPhone SE; T-27 phone battery). */
@media (max-width: 760px) {
  html:has(.report-footer) {
    scroll-padding-bottom: 120px;
  }
}

/* Business form of the Funil 1: wider card, two columns on larger screens. */
.business-card {
  max-width: 620px;
}
.business-grid {
  display: grid;
  gap: 14px;
}
.business-section {
  margin: 8px 0 0;
  font-size: 15px;
}
.auth-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
}
.auth-check input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex: none;
}
.business-next {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
@media (min-width: 640px) {
  .business-grid {
    grid-template-columns: 1fr 1fr;
  }
  .business-grid .is-wide {
    grid-column: 1 / -1;
  }
}
.processing-time {
  margin: 4px 0 18px;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.processing-time:empty {
  display: none;
}
