/* Client view 1.1 (spec 2026-09-30-client-view-v2): full-screen map, filter bar, drawer, card,
 * legend and hover tooltip. Every rule is prefixed cv- and scoped to this screen. */
.cv-shell {
  --cv-adensar: #2166c4;
  --cv-entrar: #d9731f;
  --cv-ink: #1f2328;
  --cv-rival: #8a8f94;
  --cv-google: #3f4650;
  --cv-own: #1f2328;
  --cv-radius: #3b6fd8;
  /* Frozen in dark mode (scripts/build_dark_css.py MAP_COLOR_TOKENS): every swatch, dot and
     tooltip mark that mirrors a hardcoded map colour (client-view.js/client-radius-view.js
     COLORS) reads this, never --cv-ink, so it always matches the map's own constants. */
  --cv-map-ink: #1f2328;
  /* "On" toggle chrome (drawer/filters button, tip CTA): its own tokens so it never rides on
     --cv-ink, which the dark-mode generator is free to invert for generic borders/accents. */
  --cv-on-bg: #1f2328;
  --cv-on-fg: #fff;
  --cv-shadow: 0 2px 12px #1c19171f, 0 0 0 1px #1c191712;
  position: relative;
  height: calc(100dvh - 48px);
  min-height: 440px;
  overflow: hidden;
  background: #f3f5f3;
}
.cv-map {
  position: absolute;
  inset: 0;
  outline-offset: -3px;
}
.cv-map .map-unavailable {
  z-index: 1;
}
.cv-shell:has(.map-unavailable) .cv-legend {
  display: none;
}

/* Filter bar */
.cv-bar {
  position: absolute;
  z-index: 5;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--cv-shadow);
}
.cv-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 6px;
  min-height: 36px;
  border-radius: 6px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ink);
}
.cv-back .icon {
  color: var(--muted);
}
.cv-back:hover {
  background: #f5f5f4;
}
.cv-search {
  position: relative;
  flex: 0 1 280px;
  min-width: 160px;
  display: flex;
  align-items: center;
}
.cv-search > .icon {
  position: absolute;
  left: 10px;
  color: var(--quiet);
  pointer-events: none;
}
.cv-search input {
  width: 100%;
  min-height: 36px;
  padding: 6px 34px 6px 34px;
  border: 1px solid var(--line);
  background: #fafaf9;
  color: var(--ink);
}
.cv-search input:focus {
  background: #fff;
  border-color: var(--accent);
  outline: 2px solid #14847b33;
  outline-offset: 0;
}
.cv-clear {
  position: absolute;
  right: 4px;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--muted);
}
.cv-clear[hidden] {
  display: none;
}
.cv-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 260px;
  margin: 0;
  padding: 4px;
  list-style: none;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--cv-shadow);
  max-height: 320px;
  overflow: auto;
}
.cv-suggest [role="option"] {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.cv-suggest [role="option"] small {
  color: var(--muted);
}
.cv-suggest [aria-selected="true"],
.cv-suggest [role="option"]:hover {
  background: #f0f4fb;
}
.cv-suggest-empty {
  padding: 8px 10px;
  color: var(--muted);
}
.cv-filters-toggle {
  display: none;
}
.cv-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

/* Segmented buttons: one exclusive choice, all options visible. */
.cv-seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 8px;
  background: #f1f0ef;
}
.cv-seg button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}
.cv-seg button:hover {
  color: var(--ink);
}
.cv-seg button[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px #1c191724;
}
.cv-seg-small button {
  padding: 4px 10px;
  font-size: 13px;
}

/* On/off switch */
.cv-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--ink);
  white-space: nowrap;
}
.cv-switch i {
  position: relative;
  width: 30px;
  height: 18px;
  border-radius: 999px;
  background: #d6d3d1;
  transition: background 140ms var(--ease-out);
}
.cv-switch i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px #0003;
  transition: transform 140ms var(--ease-out);
}
.cv-switch[aria-checked="true"] i {
  background: var(--cv-ink);
}
.cv-switch[aria-checked="true"] i::after {
  transform: translateX(12px);
}
.cv-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.cv-drawer-toggle {
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
}
.cv-drawer-toggle:hover {
  border-color: #a8a29e;
}
.cv-help {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}
.cv-help:hover {
  color: var(--ink);
  background: #f5f5f4;
}
.cv-drawer-toggle.is-on {
  background: var(--cv-on-bg);
  border-color: var(--cv-on-bg);
  color: var(--cv-on-fg);
}

/* Marks shared by bar, list, card and legend */
.cv-dot {
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.cv-dot-adensar {
  background: var(--cv-adensar);
}
.cv-dot-entrar {
  background: var(--cv-entrar);
}
.cv-dot.is-prio {
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--cv-map-ink);
}

/* Right panels: drawer (summary and list) and the area card */
.cv-drawer,
.cv-card {
  position: absolute;
  z-index: 4;
  top: 72px;
  right: 12px;
  bottom: 12px;
  width: 420px;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--cv-shadow);
  overflow: hidden;
}
.cv-drawer {
  z-index: 6;
}
.cv-drawer[hidden],
.cv-card[hidden] {
  display: none;
}
.cv-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px 10px 16px;
  border-bottom: 1px solid var(--line);
}
.cv-panel-head h2 {
  margin: 2px 0 0;
  font-size: 18px;
  line-height: 1.25;
}
.cv-panel-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.cv-panel-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 16px 16px;
  overscroll-behavior: contain;
}
.cv-numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.cv-numbers div {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.cv-numbers strong {
  font-size: 20px;
  line-height: 1.2;
}
.cv-numbers span {
  font-size: 12px;
  font-weight: 600;
}
.cv-numbers small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.cv-details {
  margin-top: 10px;
}
.cv-details summary {
  cursor: pointer;
  font-weight: 600;
}
.cv-details ul,
.cv-details ol {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 13px;
}
.cv-sources {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.cv-more {
  margin: 16px 0 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.cv-more h3 {
  margin: 0 0 8px;
}
.cv-more-label {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--muted);
}
.cv-more .cv-switch {
  margin-top: 6px;
  padding-left: 0;
}
.cv-list-count {
  margin: 14px 0 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.cv-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.cv-item {
  width: 100%;
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: none;
  color: var(--ink);
}
.cv-item:hover,
.cv-item.is-active {
  border-color: var(--cv-ink);
}
.cv-item-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.cv-item-text span {
  font-size: 12px;
  color: var(--muted);
}
.cv-score {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.cv-src {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}
.cv-card-block {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.cv-card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.cv-street {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  margin: 12px 0;
  border-left: 3px solid var(--cv-ink);
  background: #f7f7f6;
  border-radius: 0 6px 6px 0;
}
.cv-street span {
  font-size: 12px;
  color: var(--muted);
}
.cv-street strong {
  font-size: 18px;
  line-height: 1.3;
}
.cv-street small {
  color: var(--muted);
}
.cv-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin: 0;
}
.cv-facts dt {
  font-size: 12px;
  color: var(--muted);
}
.cv-facts dd {
  margin: 0;
}
.cv-why {
  margin: 12px 0 0;
  font-size: 13px;
}
.cv-alerts {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  gap: 6px;
  font-size: 13px;
}
.cv-alerts li {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}
.cv-radius-line {
  margin: 12px 0 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: #f7f7f6;
  font-size: 13px;
  color: var(--muted);
}
.cv-google {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.cv-google h3 {
  margin: 0;
}
.cv-google .cv-radius-line {
  margin-top: 6px;
}
.cv-google-list {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  counter-reset: cv-g;
}
.cv-google-list li {
  display: grid;
  gap: 1px;
  padding-left: 18px;
  position: relative;
  font-size: 13px;
}
.cv-google-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cv-google);
}
.cv-google-list li.is-own::before {
  background: var(--cv-own);
}
.cv-google-own {
  font-weight: 400;
  color: var(--muted);
}
.cv-google-list a {
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: #d6d3d1;
  text-underline-offset: 3px;
}
.cv-google-list a:hover {
  text-decoration-color: currentColor;
}
.cv-google-list span {
  color: var(--muted);
  font-size: 12px;
}
.cv-google-source {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--quiet);
}
.cv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}

/* Legend: bottom left, only the visible layers */
.cv-legend {
  position: absolute;
  z-index: 3;
  left: 12px;
  bottom: 12px;
  max-width: 260px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fffffff0;
  box-shadow: var(--cv-shadow);
  font-size: 12px;
}
.cv-legend-toggle {
  display: none;
}
.cv-legend ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}
.cv-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cv-sw {
  flex: none;
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.cv-sw-adensar {
  background: var(--cv-adensar);
}
.cv-sw-entrar {
  background: var(--cv-entrar);
}
.cv-sw-prio {
  background: #fff;
  box-shadow: inset 0 0 0 2.5px var(--cv-map-ink);
}
.cv-sw-own {
  width: 10px;
  height: 10px;
  margin: 0 1px;
  background: var(--cv-map-ink);
  box-shadow: 0 0 0 1.5px #fff, 0 0 0 2px #1f232840;
}
.cv-sw-rival {
  width: 7px;
  height: 7px;
  margin: 0 2.5px;
  background: var(--cv-rival);
}
.cv-sw-google {
  background: var(--cv-google);
  box-shadow: 0 0 0 1.5px #fff, 0 0 0 2px #3f465055;
}
.cv-sw-radius {
  background: #3b6fd814;
  box-shadow: inset 0 0 0 2px var(--cv-radius);
}
.cv-sw-null {
  border-radius: 2px;
  background: #eeeeee;
  box-shadow: inset 0 0 0 0.5px #b03a3a;
}
.cv-legend-ramp {
  display: grid !important;
  gap: 3px !important;
  padding-top: 4px;
  margin-top: 2px;
  border-top: 1px solid var(--line);
}
.cv-ramp {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: 10px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: inset 0 0 0 0.5px #b03a3a55;
}
.cv-q0 { background: #fbe3e3; }
.cv-q1 { background: #f3b1b1; }
.cv-q2 { background: #e07474; }
.cv-q3 { background: #bd3f3f; }
.cv-q4 { background: #8e1b1b; }
.cv-ramp-ends {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Hover tooltip: one element, moved with transform */
.cv-tip {
  position: absolute;
  z-index: 8;
  top: 0;
  left: 0;
  display: grid;
  gap: 2px;
  max-width: 280px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 16px #1c191729, 0 0 0 1px #1c191714;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink);
  pointer-events: none;
  will-change: transform;
}
.cv-tip[hidden] {
  display: none;
}
.cv-tip.is-touch {
  pointer-events: auto;
}
.cv-tip strong {
  font-size: 13px;
}
.cv-tip span {
  color: #44403c;
}
.cv-tip small {
  color: var(--quiet);
}
.cv-tip-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cv-tip-bloco {
  padding: 0 6px;
  border-radius: 4px;
  color: #fff;
  font-weight: 600;
  font-size: 11px;
}
.cv-tip-adensar {
  background: var(--cv-adensar);
}
.cv-tip-entrar {
  background: var(--cv-entrar);
}
.cv-tip-open {
  margin-top: 6px;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: var(--cv-on-bg);
  color: var(--cv-on-fg);
  font-weight: 600;
}
.cv-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 24px;
}

/* Dark base map (the page follows the system dark mode): the graphite priority ring of the map
   turns light there (client-view.js COLORS.ringDark), and every mark that mirrors it follows. */
.cv-shell.cv-map-dark .cv-sw-prio {
  background: #6b7178;
  box-shadow: inset 0 0 0 2.5px #eef0f2;
}
.cv-shell.cv-map-dark .cv-dot.is-prio {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px #eef0f2;
}
.cv-shell.cv-map-dark .cv-sw-own {
  box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px #00000066;
}
.cv-shell.cv-map-dark .cv-google-list li.is-own::before {
  box-shadow: 0 0 0 1.5px #fff;
}

/* Intro: a short explanation over the dimmed map, before the first look (and from "Como usar"). */
.cv-intro {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--cv-scrim, #14161873);
  backdrop-filter: blur(2px);
}
.cv-intro[hidden] {
  display: none;
}
.cv-intro-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1120px, 100%);
  max-height: 100%;
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 64px #0000003d, 0 0 0 1px #1c191714;
  overflow: hidden;
}
.cv-intro-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 28px 32px 8px;
}
.cv-intro-head {
  position: relative;
  padding-right: 40px;
}
.cv-intro-eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--accent-dark);
}
.cv-intro-head h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -.01em;
}
/* The title takes the focus only so a screen reader starts from the top; no ring for it. */
.cv-intro-head h2:focus,
.cv-intro-head h2:focus-visible {
  outline: none;
  box-shadow: none;
}
.cv-intro-head > p:last-of-type {
  margin: 8px 0 0;
  max-width: 78ch;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}
.cv-intro-x {
  position: absolute;
  top: -8px;
  right: -12px;
  width: 36px;
  height: 36px;
}
.cv-intro-numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0 0;
}
.cv-intro-numbers div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.cv-intro-numbers dd {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.cv-intro-numbers dt {
  font-size: 12px;
  color: var(--muted);
}
/* Wide screens: three columns (colours, the score, how to use) so it all fits without scrolling. */
.cv-intro-grid {
  display: grid;
  grid-template-columns: .9fr 1.05fr 1.2fr;
  gap: 8px 28px;
  margin-top: 8px;
}
.cv-intro-col {
  min-width: 0;
}
@media (max-width: 1180px) {
  .cv-intro-grid {
    grid-template-columns: 1fr 1fr;
  }
  .cv-intro-grid > .cv-intro-col:last-child {
    grid-column: 1 / -1;
  }
}
.cv-intro-col h3 {
  margin: 18px 0 8px;
  font-size: 14px;
}
.cv-intro-col p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}
.cv-intro-keys,
.cv-intro-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.cv-intro-keys li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
}
.cv-intro-keys strong {
  display: block;
}
.cv-intro-key {
  width: 14px;
  height: 14px;
  margin: 3px 0 0 2px;
}
.cv-intro-key.is-prio {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4.5px var(--cv-map-ink);
}
.cv-shell.cv-map-dark .cv-intro-key.is-prio {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4.5px #eef0f2;
}
.cv-intro-rules {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}
.cv-intro-rules strong {
  color: var(--ink);
  font-weight: 600;
}
.cv-intro-col .cv-intro-more {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.cv-intro-steps li {
  display: grid;
  grid-template-columns: 24px 68px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.cv-intro-n {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--cv-on-bg);
  color: var(--cv-on-fg);
  font-size: 12px;
  font-weight: 600;
}
/* Step illustrations, drawn with the map's own legend marks */
.cv-intro-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 52px;
  border-radius: 8px;
  background: #f3f5f3;
}
.cv-art-search {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 0 0 1px #1c19171f;
  color: var(--muted);
}
.cv-art-search .icon {
  width: 13px;
  height: 13px;
}
.cv-art-big {
  width: 14px;
  height: 14px;
  box-shadow: 0 0 0 1.5px #fff;
}
.cv-art-tip {
  display: grid;
  gap: 3px;
  width: 30px;
  padding: 5px;
  margin-bottom: 16px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 2px 6px #1c191729;
}
.cv-art-tip b {
  height: 3px;
  border-radius: 2px;
  background: #d6d3d1;
}
.cv-art-tip b + b {
  width: 70%;
}
.cv-art-ring {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 9px);
  grid-template-rows: repeat(2, 9px);
  gap: 1px;
  place-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #3b6fd814;
  box-shadow: inset 0 0 0 2px var(--cv-radius);
}
.cv-art-ring .cv-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1.5px #fff;
}
.cv-art-g {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cv-google);
  box-shadow: 0 0 0 1px #fff;
}
.cv-art-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 7px;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
}
.cv-art-btn .icon {
  width: 11px;
  height: 11px;
}
.cv-intro-sources {
  margin: 18px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.cv-intro-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 32px 18px;
  border-top: 1px solid var(--line);
}
.cv-intro-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.cv-intro-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}
.cv-intro-foot .button {
  min-width: 160px;
}

/* MapLibre controls sit bottom right, clear of the card */
.cv-shell .maplibregl-ctrl-bottom-right {
  transition: right 160ms var(--ease-out);
}
.cv-shell:has(.cv-card:not([hidden])) .maplibregl-ctrl-bottom-right,
.cv-shell:has(.cv-drawer:not([hidden])) .maplibregl-ctrl-bottom-right {
  right: 440px;
}

/* Medium widths: the bar wraps to two lines, the panels start below it */
@media (max-width: 1180px) and (min-width: 761px) {
  .cv-bar {
    flex-wrap: wrap;
  }
  .cv-controls {
    flex-basis: 100%;
  }
  .cv-drawer,
  .cv-card {
    top: 120px;
    width: 380px;
  }
  .cv-shell:has(.cv-card:not([hidden])) .maplibregl-ctrl-bottom-right,
  .cv-shell:has(.cv-drawer:not([hidden])) .maplibregl-ctrl-bottom-right {
    right: 400px;
  }
}

/* Phone: search plus a "Filtros" button; drawer and card as bottom sheets */
@media (max-width: 760px) {
  .cv-shell {
    height: calc(100dvh - 52px);
    min-height: 420px;
  }
  .cv-bar {
    top: 8px;
    left: 8px;
    right: 8px;
    flex-wrap: wrap;
    gap: 6px;
  }
  .cv-back {
    padding: 0 4px;
  }
  .cv-back span {
    display: none;
  }
  .cv-search {
    flex: 1 1 0;
    min-width: 0;
  }
  .cv-search input {
    font-size: 16px;
  }
  .cv-filters-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 36px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font-weight: 500;
    white-space: nowrap;
  }
  .cv-filters-toggle span {
    color: var(--muted);
    font-weight: 400;
    font-size: 12px;
  }
  .cv-bar.is-open .cv-filters-toggle {
    background: var(--cv-on-bg);
    border-color: var(--cv-on-bg);
    color: var(--cv-on-fg);
  }
  .cv-bar.is-open .cv-filters-toggle span {
    color: var(--cv-on-fg);
    opacity: .75;
  }
  .cv-controls {
    display: none;
    flex-basis: 100%;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 2px 2px;
  }
  .cv-bar.is-open .cv-controls {
    display: flex;
  }
  .cv-controls .cv-seg {
    flex: 1 1 100%;
  }
  .cv-controls .cv-seg button {
    flex: 1;
    justify-content: center;
  }
  .cv-count {
    margin-left: 0;
  }
  .cv-drawer-toggle {
    margin-left: auto;
  }
  .cv-drawer,
  .cv-card {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-height: 70%;
    border-radius: 14px 14px 0 0;
  }
  .cv-card {
    height: 45%;
    max-height: 70%;
  }
  .cv-drawer {
    height: 70%;
  }
  .cv-drawer::before,
  .cv-card::before {
    content: "";
    align-self: center;
    flex: none;
    width: 36px;
    height: 4px;
    margin-top: 6px;
    border-radius: 2px;
    background: #d6d3d1;
  }
  .cv-panel-head {
    padding: 8px 10px 8px 14px;
  }
  .cv-panel-head h2 {
    font-size: 16px;
  }
  .cv-panel-body {
    padding: 10px 14px 14px;
  }
  .cv-numbers strong {
    font-size: 17px;
  }
  .cv-legend {
    left: 8px;
    bottom: 26px;
    max-width: calc(100% - 64px);
    padding: 0;
    font-size: 11px;
  }
  .cv-legend-toggle {
    display: block;
    min-height: 32px;
    padding: 4px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    font-weight: 600;
    font-size: 12px;
  }
  .cv-legend ul {
    display: none;
    grid-template-columns: repeat(2, auto);
    gap: 3px 10px;
    padding: 0 8px 8px;
  }
  .cv-legend.is-open ul {
    display: grid;
  }
  .cv-legend-ramp {
    grid-column: 1 / -1;
  }
  .cv-shell:has(.cv-card:not([hidden])) .cv-legend {
    bottom: calc(45% + 26px);
  }
  .cv-shell:has(.cv-drawer:not([hidden])) .cv-legend {
    display: none;
  }
  .cv-shell:has(.cv-card:not([hidden])) .maplibregl-ctrl-bottom-right,
  .cv-shell:has(.cv-drawer:not([hidden])) .maplibregl-ctrl-bottom-right {
    right: 0;
    bottom: 45%;
  }
  .cv-shell:has(.cv-drawer:not([hidden])) .maplibregl-ctrl-bottom-right {
    display: none;
  }
  .cv-tip {
    max-width: min(280px, calc(100vw - 32px));
  }
  .cv-shell .maplibregl-ctrl-attrib {
    font-size: 10px;
  }
  /* Intro as a full-screen sheet that scrolls, with the button always in reach */
  .cv-intro {
    padding: 0;
    place-items: stretch;
  }
  .cv-intro-panel {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
  .cv-intro-scroll {
    padding: 20px 16px 8px;
  }
  .cv-intro-head h2 {
    font-size: 21px;
  }
  .cv-intro-head > p:last-of-type {
    font-size: 14px;
  }
  .cv-intro-x {
    top: -10px;
    right: -8px;
  }
  .cv-intro-numbers {
    gap: 6px;
    margin-top: 16px;
  }
  .cv-intro-numbers div {
    padding: 10px;
  }
  .cv-intro-numbers dd {
    font-size: 20px;
  }
  .cv-intro-numbers dt {
    font-size: 11px;
  }
  .cv-intro-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .cv-intro-steps li {
    grid-template-columns: 22px 60px 1fr;
    gap: 10px;
    padding: 8px 10px;
  }
  .cv-intro-foot {
    padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
    flex-wrap: wrap;
  }
  .cv-intro-foot .button {
    flex: 1 1 160px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cv-switch i,
  .cv-switch i::after,
  .cv-shell .maplibregl-ctrl-bottom-right {
    transition: none;
  }
}

/* ---------- client account (spec 2026-09-30-client-account) ---------- */
/* No Silhar menu nor city for a client account; only the client's name and "Sair" stay. */
body[data-client="in"] .app-header nav,
body[data-client="in"] .header-city {
  display: none;
}
/* Unlike the e-mail of other accounts, the client's name stays visible at every width. */
.cv-account-client {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-weight: 500;
}
.cv-back-static {
  cursor: default;
}
.cv-back-static:hover {
  background: transparent;
}
/* On the phone the bar drops the name (the header already shows it). */
@media (max-width: 760px) {
  .cv-back-static {
    display: none;
  }
}
/* Admin: the "Acesso do cliente" form on the Clientes page. */
.cv-access-select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.cv-access-select:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 1px;
}
.cv-access-form {
  margin-top: 14px;
}
.cv-access-done:empty {
  display: none;
}
.cv-access-reactivate {
  margin-top: 8px;
}
.cv-access-revoke[data-armed] {
  color: var(--danger);
  font-weight: 600;
}

/* ---------- intro in three steps (rodada 7, T-38/T-39) ---------- */
.cv-intro-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px 0 32px;
}
.cv-intro-progress {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.cv-intro-dots {
  display: inline-flex;
  gap: 6px;
}
.cv-intro-dots i {
  width: 22px;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
}
.cv-intro-dots i.is-on {
  background: var(--accent);
}
.cv-intro-restart {
  margin-left: auto;
  font-size: 13px;
}
.cv-intro-bar .cv-intro-x {
  position: static;
  margin-left: auto;
}
.cv-intro-restart + .cv-intro-x {
  margin-left: 4px;
}
.cv-intro-scroll {
  padding-top: 12px;
}
.cv-intro-head {
  padding-right: 0;
}
.cv-intro-nav {
  display: flex;
  gap: 10px;
  margin-left: auto;
}
.cv-intro-nav .button svg {
  width: 16px;
  height: 16px;
}
.cv-intro-skip {
  font-size: 13px;
}
/* step 1: welcome */
.cv-welcome-logos {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 8px 0 22px;
}
.cv-welcome-silhar img {
  display: block;
  height: 44px;
  width: auto;
}
.cv-welcome-sep {
  width: 1px;
  align-self: stretch;
  background: var(--line);
}
.cv-welcome-client {
  display: inline-flex;
  align-items: center;
  height: 56px;
  padding: 6px 12px;
  border-radius: 10px;
  background: #ffffff;
}
.cv-welcome-client img {
  display: block;
  height: 44px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}
.cv-intro-boas-vindas .cv-intro-head h2,
.cv-intro-historia .cv-intro-head h2 {
  font-size: 30px;
}
.cv-welcome-lead {
  margin: 6px 0 0 !important;
  font-size: 15px !important;
  font-weight: 600;
  color: var(--accent-dark) !important;
}
.cv-welcome-text {
  max-width: 72ch;
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
}
.cv-welcome-path {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 24px 0 8px;
  padding: 0;
  list-style: none;
  counter-reset: cvpath;
}
.cv-welcome-path li {
  counter-increment: cvpath;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.cv-welcome-path li::before {
  content: counter(cvpath);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.cv-welcome-path strong {
  font-size: 14px;
}
.cv-welcome-path span {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}
/* step 2: the story */
.cv-story {
  position: relative;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.cv-story li {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  padding-bottom: 18px;
}
.cv-story li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.cv-story-n {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  color: var(--accent-dark);
  font-weight: 700;
  background: var(--surface);
}
.cv-story-body h3 {
  margin: 6px 0 2px;
  font-size: 16px;
}
.cv-story-body p {
  margin: 4px 0 0;
  max-width: 78ch;
  font-size: 14px;
  line-height: 1.55;
}
.cv-story-body .cv-story-num {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--accent-dark);
  font-variant-numeric: tabular-nums;
}
.cv-story-body .cv-story-src {
  font-size: 12px;
  color: var(--muted);
}
.cv-story-close {
  margin: 4px 0 8px 52px;
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: var(--accent-light);
  font-size: 14px;
  line-height: 1.5;
}
/* step 3: approve and reject art */
.cv-art-vote {
  display: inline-flex;
  gap: 6px;
}
.cv-art-vote b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: #fff;
}
.cv-art-vote b svg {
  width: 14px;
  height: 14px;
}
.cv-art-vote .is-yes {
  background: #1a7f4b;
}
.cv-art-vote .is-no {
  background: #8a8f94;
}
@media (max-width: 760px) {
  .cv-intro-bar {
    padding: 10px 10px 0 16px;
  }
  .cv-welcome-logos {
    gap: 12px;
  }
  .cv-welcome-silhar img {
    height: 32px;
  }
  .cv-welcome-client {
    height: 44px;
  }
  .cv-welcome-client img {
    height: 32px;
    max-width: 150px;
  }
  .cv-intro-boas-vindas .cv-intro-head h2,
  .cv-intro-historia .cv-intro-head h2 {
    font-size: 23px;
  }
  .cv-welcome-text {
    font-size: 15px;
  }
  .cv-welcome-path {
    grid-template-columns: 1fr 1fr;
  }
  .cv-story li {
    grid-template-columns: 30px 1fr;
    gap: 12px;
  }
  .cv-story-n {
    width: 30px;
    height: 30px;
  }
  .cv-story li:not(:last-child)::after {
    left: 14px;
    top: 30px;
  }
  .cv-story-close {
    margin-left: 0;
  }
  .cv-intro-nav {
    width: 100%;
  }
  .cv-intro-nav .button {
    flex: 1 1 0;
    min-width: 0;
  }
}
/* The client's logo as the legend swatch for its own stores (T-47) */
.cv-sw-logo {
  width: 40px;
  height: 12px;
  margin-right: 0;
  border-radius: 3px;
  object-fit: contain;
  background: #fff;
  flex: none;
}
/* ---------- the client's decision on the area card (T-44) ---------- */
.cv-vote {
  margin: 16px 0 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.cv-vote-title {
  margin: 0;
  font-size: 15px;
}
.cv-vote-help {
  margin: 4px 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}
.cv-vote-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cv-vote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.cv-vote-btn svg {
  width: 18px;
  height: 18px;
}
.cv-vote-btn.is-yes {
  border: 1px solid #1a7f4b;
  background: #1a7f4b;
  color: #fff;
}
.cv-vote-btn.is-yes:hover {
  background: #146a3e;
}
.cv-vote-btn.is-no {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.cv-vote-btn.is-no:hover {
  border-color: var(--muted);
}
.cv-vote-btn[aria-pressed="true"] {
  box-shadow: 0 0 0 3px #1a7f4b33;
}
.cv-vote-btn.is-no[aria-pressed="true"] {
  box-shadow: 0 0 0 3px #8a8f9433;
  border-color: var(--muted);
}
.cv-vote-form {
  margin-top: 12px;
}
.cv-vote-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
}
.cv-vote-form textarea {
  display: block;
  width: 100%;
  min-height: 84px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.45;
  resize: vertical;
}
.cv-vote-form textarea:focus {
  outline: 2px solid var(--accent-dark);
  outline-offset: 1px;
}
.cv-vote-count {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}
.cv-vote-error {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--danger);
}
.cv-vote-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}
.cv-vote-actions .cv-vote-send-yes {
  background: #1a7f4b;
}
.cv-vote-done {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 15px;
}
.cv-vote-done svg {
  width: 18px;
  height: 18px;
}
.cv-vote.is-aprovada {
  border-color: #1a7f4b;
  background: #1a7f4b0f;
}
.cv-vote.is-aprovada .cv-vote-done {
  color: #1a7f4b;
}
.cv-vote.is-reprovada .cv-vote-done {
  color: var(--muted);
}
.cv-vote-reason {
  margin: 8px 0;
  padding-left: 12px;
  border-left: 3px solid var(--line);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.cv-tag-aprovada,
.cv-tag-reprovada {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}
.cv-tag-aprovada {
  background: #1a7f4b;
  color: #fff;
}
.cv-tag-reprovada {
  background: #8a8f9433;
  color: var(--ink);
}
.cv-item .cv-tag-aprovada,
.cv-item .cv-tag-reprovada {
  margin-left: auto;
  margin-right: 6px;
}
.cv-sw-yes {
  background: #fff;
  box-shadow: inset 0 0 0 3px #1a7f4b;
}
.cv-sw-no {
  background: #8a8f94;
  opacity: .55;
}
@media (max-width: 760px) {
  .cv-vote-buttons {
    grid-template-columns: 1fr;
  }
}
/* admin: the client's decisions (T-43) */
.cv-returns-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 8px 0 4px;
}
.cv-returns-list .credit-what small {
  display: block;
  white-space: pre-wrap;
}
/* Proposed areas are diamonds everywhere (map, legend, bar, list, intro); stores stay circles. */
.cv-dot.cv-dot-adensar,
.cv-dot.cv-dot-entrar,
.cv-sw-adensar,
.cv-sw-entrar,
.cv-sw-prio,
.cv-sw-yes,
.cv-sw-no {
  width: 8px;
  height: 8px;
  margin: 0 2px;
  border-radius: 1px;
  transform: rotate(45deg);
}
.cv-sw-prio,
.cv-sw-yes {
  width: 9px;
  height: 9px;
}
.cv-sw-yes {
  background: #1a7f4b;
  box-shadow: 0 0 0 2px #1a7f4b55;
}
.cv-intro-key.cv-dot-adensar,
.cv-intro-key.cv-dot-entrar {
  width: 11px;
  height: 11px;
  margin: 4px 3px 0;
}
/* Optional front: cidades médias no padrão da rede */
.cv-medias-info {
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--cv-entrar);
  border-radius: 10px;
  background: #d9731f0d;
}
.cv-medias-info h3 {
  margin: 0 0 6px;
  font-size: 15px;
}
.cv-medias-info p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
}
.cv-medias-table {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
  font-size: 13px;
}
.cv-medias-table th,
.cv-medias-table td {
  padding: 5px 4px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.cv-medias-table th {
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
}
.cv-medias-table td small {
  display: block;
  color: var(--muted);
}
.cv-medias-table td:nth-child(n+3),
.cv-medias-table th:nth-child(n+3) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.cv-medias-table .text-button {
  padding: 0;
  min-height: 0;
  text-align: left;
}
.cv-medias-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--cv-entrar);
  background: #d9731f0d;
  font-size: 13px;
  line-height: 1.5;
}
.cv-switch-medias[aria-checked="true"] {
  color: var(--cv-entrar);
}
