/* ===== Rodando o Mundo ===== */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);

  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem;

  --radius-sm: .375rem; --radius-md: .625rem; --radius-lg: 1rem; --radius-full: 999px;
  --ease: cubic-bezier(.2,.7,.2,1);
  --transition: .18s var(--ease);

  --font-display: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --font-serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --font-logo: 'Fraunces', 'Newsreader', Georgia, serif;
  --font-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

:root, [data-theme='light'] {
  --bg: #f7f4ee;
  --surface: #faf7f2;
  --surface-2: #ffffff;
  --surface-offset: #ede7dc;
  --border: #e2dbd0;
  --divider: #e8e2d7;
  --text: #1a2332;
  --text-muted: #5f6776;
  --text-faint: #9b9e9f;
  --primary: #0d5c75;
  --primary-hover: #084a63;
  --primary-soft: #d8e7ed;
  --ocean: #e3ebec;
  --graticule: #cfdcde;
  --land-stroke: #faf7f2;
  --nodata: #ded8cb;
  --sun: #d98a1f;

  --c-norte: #c9875a;
  --c-central: #df7356;
  --c-sul: #8aa35b;
  --c-europa: #6b8fbf;
  --c-africa: #d4a845;
  --c-asia: #c26b6b;
  --c-oceania: #4fa39a;
  --p0: #5b8cc4; --p1: #e0905a; --p2: #7fae5a; --p3: #d1676f; --p4: #e2b443; --p5: #4aa8a0; --p6: #9b7fc4;

  /* Cores específicas da América do Sul (Bloco B4) */
  --c-sa-br: #a4d49e;
  --c-sa-pe: #c2a3e8;
  --c-sa-uy: #589ca4;
  --c-sa-gf: #e0b072;

  --bias-E: #c0392b;
  --bias-E-soft: #f6dcd8;
  --bias-I: #5c6b73;
  --bias-I-soft: #e2e6e8;
  --bias-D: #1f5fbf;
  --bias-D-soft: #d9e4f6;

  --shadow-sm: 0 1px 2px rgb(26 35 50 / .06);
  --shadow-md: 0 8px 28px rgb(26 35 50 / .10);
}

[data-theme='dark'] {
  --bg: #0f141c;
  --surface: #151c26;
  --surface-2: #1b2430;
  --surface-offset: #202a37;
  --border: #2c3846;
  --divider: #243040;
  --text: #e6e3dc;
  --text-muted: #9aa3ae;
  --text-faint: #5f6a76;
  --primary: #5fb8d6;
  --primary-hover: #86cbe2;
  --primary-soft: #1b3644;
  --ocean: #121a24;
  --graticule: #1d2835;
  --land-stroke: #121a24;
  --nodata: #2a3441;
  --sun: #f2b24d;

  --c-norte: #b97a52;
  --c-central: #d46548;
  --c-sul: #7f9853;
  --c-europa: #5f82b3;
  --c-africa: #c39a3f;
  --c-asia: #b46262;
  --c-oceania: #47958d;
  --p0: #5a82b5; --p1: #c98250; --p2: #739c53; --p3: #b96066; --p4: #c9a03f; --p5: #45968f; --p6: #8a72ad;

  /* Cores específicas da América do Sul (Bloco B4) */
  --c-sa-br: #6ea868;
  --c-sa-pe: #9b7fc4;
  --c-sa-uy: #43828a;
  --c-sa-gf: #c49856;

  --bias-E: #f07a6c;
  --bias-E-soft: #3a2224;
  --bias-I: #a7b4bc;
  --bias-I-soft: #26313b;
  --bias-D: #73a6f2;
  --bias-D-soft: #1d2c44;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / .3);
  --shadow-md: 0 10px 30px rgb(0 0 0 / .4);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--radius-sm); }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface-2); padding: var(--space-2) var(--space-4); z-index: 50; }
.skip:focus { left: var(--space-4); }

/* ===== Top bar ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: color-mix(in oklab, var(--bg) 95%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--divider);
  box-shadow: 0 2px 10px rgb(26 35 50 / 0.05);
}

.topbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(var(--space-2), 1.2vw, var(--space-4));
  padding: 0.55rem clamp(var(--space-4), 3vw, var(--space-8));
  border-bottom: 1px solid color-mix(in oklab, var(--divider) 60%, transparent);
}

.topbar-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 0.35rem clamp(var(--space-4), 3vw, var(--space-8));
  min-height: 2.75rem;
}

.topbar-sub .continents {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.brand { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; margin-right: auto; flex: 0 0 auto; }
.logo { width: 2.5rem; height: 2.5rem; flex: none; }
.logo-sea { fill: var(--primary); }
.logo-land path { fill: var(--sun); }
.logo-line { fill: none; stroke: color-mix(in oklab, var(--surface) 55%, transparent); stroke-width: .9; }
.logo-ring { fill: none; stroke: var(--text); stroke-width: 1.6; }
.logo-orbit { fill: none; stroke: var(--sun); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.logo-spin { animation: spin 14s linear infinite; }
@keyframes spin { from { transform: translateX(0); } to { transform: translateX(-48px); } }
@media (prefers-reduced-motion: reduce) { .logo-spin { animation: none; } }

.brand-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}
.brand-name {
  font-family: var(--font-logo);
  font-size: clamp(1.35rem, 2.5vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
}
.brand-name em { font-style: italic; font-weight: 400; color: var(--primary); font-family: var(--font-display); }
.brand-sub {
  font-family: var(--font-body);
  font-size: clamp(0.62rem, 0.76vw, 0.74rem);
  font-weight: 500;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.1;
  white-space: nowrap;
  text-align: center;
}
@media (max-width: 640px) {
  .brand-sub {
    font-size: 0.65rem;
    letter-spacing: 0.02em;
  }
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: clamp(0.2rem, 0.45vw, var(--space-2));
  flex: 0 0 auto;
  white-space: nowrap;
}

.icon-btn {
  display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 50%;
  color: var(--text-muted); transition: border-color .2s, color .2s, transform .15s;
  cursor: pointer; flex: none; text-decoration: none;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); transform: scale(1.05); }
.icon-btn svg { width: 1.15rem; height: 1.15rem; fill: currentColor; }
.icon-btn.x-link svg { width: 1rem; height: 1rem; }
.help-btn { font-weight: 700; font-size: 0.95rem; line-height: 1; }

.search {
  position: relative;
  flex: 0 1 28rem;
  max-width: 32rem;
  min-width: 14rem;
  width: auto;
  margin-left: auto;
}
.search svg { position: absolute; left: var(--space-3); top: 50%; transform: translateY(-50%); width: 1.1rem; height: 1.1rem; fill: none; stroke: var(--text-muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search input {
  width: 100%; height: 2.35rem; box-sizing: border-box; padding: var(--space-2) var(--space-3) var(--space-2) var(--space-10);
  font-size: var(--text-sm);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-full);
  transition: border-color .2s, box-shadow .2s;
}
.search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.search-list {
  position: absolute; top: calc(100% + var(--space-2)); left: 0; right: 0;
  list-style: none; margin: 0; padding: var(--space-1);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); max-height: 20rem; overflow: auto; z-index: 110;
}
.search-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--text-sm);
}
.search-list li[aria-selected='true'], .search-list li:hover { background: var(--surface-offset); }
.search-list li .search-item-main {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
}
.search-list li .search-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-list li small {
  margin-left: auto;
  color: var(--text-muted);
  font-size: var(--text-xs);
  flex-shrink: 0;
  white-space: nowrap;
  padding-left: var(--space-2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.search-list .empty { color: var(--text-muted); cursor: default; }

.search-type-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--surface-3);
  color: var(--text-muted);
}
.search-type-pill.is-outlet {
  background: color-mix(in oklab, var(--primary) 18%, transparent);
  color: var(--primary);
  border: 1px solid color-mix(in oklab, var(--primary) 35%, transparent);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 2.25rem;
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  flex: none;
  box-sizing: border-box;
  transition: background-color .2s, border-color .2s, box-shadow .2s;
}
.theme-toggle:hover { border-color: var(--primary); }
.theme-toggle svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  padding: 3px;
  border-radius: 50%;
  box-sizing: border-box;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: color .2s, background-color .2s, box-shadow .2s, opacity .2s, transform .2s;
}

/* Modo claro (padrão): sol ativo e lua atenuada lado a lado */
.theme-toggle .i-sun {
  display: inline-block;
  color: var(--sun);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  opacity: 1;
  transform: scale(1.02);
}
.theme-toggle .i-moon {
  display: inline-block;
  color: var(--text-muted);
  background: transparent;
  box-shadow: none;
  opacity: 0.42;
  transform: scale(0.92);
}

/* Modo escuro: sol atenuado e lua ativa lado a lado */
[data-theme='dark'] .theme-toggle .i-sun {
  display: inline-block;
  color: var(--text-muted);
  background: transparent;
  box-shadow: none;
  opacity: 0.42;
  transform: scale(0.92);
}
[data-theme='dark'] .theme-toggle .i-moon {
  display: inline-block;
  color: var(--primary);
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  opacity: 1;
  transform: scale(1.02);
}

.theme-toggle:hover .i-sun,
.theme-toggle:hover .i-moon {
  opacity: 0.85;
}
:root:not([data-theme='dark']) .theme-toggle:hover .i-sun,
[data-theme='dark'] .theme-toggle:hover .i-moon {
  opacity: 1;
  transform: scale(1.06);
}

/* Esconde o texto para liberar espaço pro pesquisador */
.theme-label {
  display: none !important;
}

/* ===== Faixa de últimas notícias ===== */
.news-ticker {
  min-height: 5.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--divider);
  padding: var(--space-2) clamp(var(--space-4), 3vw, var(--space-8));
}
.news-ticker-inner {
  display: flex; align-items: center; gap: var(--space-4);
  max-width: 100rem; min-height: 4rem; margin: 0 auto;
}
.news-ticker-heading { display: flex; flex-direction: column; flex: none; min-width: 8.5rem; line-height: 1.15; }
.news-live { display: inline-flex; align-items: center; gap: .35rem; color: var(--bias-E); font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.news-live i { width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in oklab, currentColor 18%, transparent); }
.news-ticker-title { margin-top: .25rem; color: var(--text-muted); font-size: var(--text-xs); font-weight: 600; }
.news-ticker-credit { margin-top: .2rem; color: var(--text-faint); font-size: .625rem; line-height: 1.15; text-decoration: none; }
.news-ticker-credit:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.news-ticker-content { display: flex; align-items: center; flex: 1; min-width: 0; min-height: 3.5rem; }
.news-ticker-status { margin: 0; color: var(--text-muted); font-size: var(--text-sm); }
.news-ticker-status.error { color: var(--bias-E); }
.news-story {
  display: grid; grid-template-columns: 5rem minmax(0, 1fr); align-items: center; gap: var(--space-3);
  width: 100%; min-width: 0; color: inherit; text-decoration: none;
  animation: news-in .28s var(--ease) both;
}
.news-story:hover .news-story-title { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.news-story-image { width: 5rem; height: 3.5rem; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-offset); }
.news-story-copy { min-width: 0; }
.news-story-title {
  display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  margin: 0; font-size: var(--text-sm); font-weight: 600; line-height: 1.25;
}
.news-story-meta { display: flex; align-items: center; gap: var(--space-2); margin-top: .3rem; color: var(--text-muted); font-size: .6875rem; line-height: 1.2; }
.news-story-source { overflow: hidden; max-width: 12rem; text-overflow: ellipsis; white-space: nowrap; }
.news-story-separator { color: var(--text-faint); }
.news-story-country { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.news-story-country img { width: 1rem; height: .7rem; object-fit: cover; border: 1px solid color-mix(in oklab, var(--text) 12%, transparent); border-radius: 1px; }
.news-ticker-controls { display: flex; align-items: center; gap: .3rem; flex: none; }
.news-ticker-controls button {
  display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 50%;
  color: var(--text-muted); font-size: 1.15rem; line-height: 1;
}
.news-ticker-controls button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.news-ticker-controls button:disabled { opacity: .45; cursor: default; }
.news-ticker-controls #news-toggle { font-size: .85rem; }
@keyframes news-in { from { opacity: 0; transform: translateY(4px); } }

/* ===== Layout ===== */
.layout { flex: 1; padding: var(--space-4) clamp(var(--space-4), 2vw, var(--space-6)) 0; }
.stage { position: relative; }
.map-wrap { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }

.continents-top {
  display: flex; align-items: center; min-height: 2.8rem; margin: var(--space-1) 0 var(--space-3);
}
.typewriter-wrap {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  color: var(--text);
  font-style: italic;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  letter-spacing: -.015em;
  line-height: 1.2;
}
.typewriter-cursor {
  display: inline-block; animation: blink 1s step-start infinite; color: var(--primary); margin-left: 4px; font-weight: 700;
  font-size: clamp(2rem, 3.2vw, 2.8rem);
}
@keyframes blink { 50% { opacity: 0; } }

.continents { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.continents button {
  position: relative;
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .65rem;
  background: transparent; border: none; box-shadow: none;
  font-size: var(--text-sm); font-weight: 500; color: var(--text-muted);
  outline: none; cursor: pointer;
  transition: color 180ms ease-out, transform 180ms ease-out;
}
.continents button i {
  width: .55rem; height: .55rem; border-radius: 50%; background: var(--cc); flex: none;
  transition: transform 180ms ease-out;
}
.continents button:focus { outline: none; }
.continents button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--radius-sm); }
.continents button:hover {
  color: var(--text);
  transform: translateY(-1px);
}
.continents button:hover i {
  transform: scale(1.25);
}
.continents button::after {
  content: ''; position: absolute; bottom: 0; left: 50%; width: 0; height: 2px;
  background: var(--cc); border-radius: var(--radius-full); transform: translateX(-50%);
  transition: width 180ms ease-out;
}
.continents button[aria-pressed='true'] {
  color: var(--text);
  font-weight: 700;
  background: transparent;
  border: none;
  box-shadow: none;
  transform: none;
}
.continents button[aria-pressed='true'] i {
  background: var(--cc);
  transform: scale(1.15);
}
.continents button[aria-pressed='true']::after { width: 75%; }

.map {
  position: relative;
  background: var(--ocean);
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: calc(100dvh - 10.5rem);
  min-height: 24rem;
}
#mapa-svg { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
#mapa-svg.zoomed { touch-action: none; }
#mapa-svg:active { cursor: grabbing; }

svg:focus,
svg *:focus,
svg:focus-visible,
svg *:focus-visible,
#mapa-svg:focus,
#mapa-svg *:focus,
#mapa-svg:focus-visible,
#mapa-svg *:focus-visible,
.country:focus,
.country:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.sphere { fill: var(--ocean); }
.graticule { display: none !important; }
.country {
  stroke: var(--land-stroke); stroke-width: .6; vector-effect: non-scaling-stroke;
  transition: fill .25s var(--ease), opacity .25s var(--ease);
  cursor: pointer;
  outline: none !important;
}
.country.nodata-in { fill-opacity: .38 !important; }
.map[data-level='world'] .country:hover, .map[data-level='world'] .country.cont-hover { filter: brightness(1.08) saturate(1.15); }
.map[data-level='continent'] .country.out { opacity: .22; }
.map[data-level='continent'] .country.out.cont-hover { opacity: .5; }
.map[data-level='continent'] .country.in:hover { filter: brightness(1.12) saturate(1.2); }
.country.active {
  stroke: var(--text) !important;
  stroke-width: 2.2px !important;
  filter: drop-shadow(0 0 6px color-mix(in oklab, var(--primary) 45%, transparent));
}

/* Cores específicas da América do Sul (Bloco B4) */
.country[data-sa='BR'] { fill: var(--c-sa-br) !important; }
.country[data-sa='PE'] { fill: var(--c-sa-pe) !important; }
.country[data-sa='UY'] { fill: var(--c-sa-uy) !important; }
.country[data-sa='GF'] { fill: var(--c-sa-gf) !important; }

/* Marcadores de ilhas e microterritórios */
.island-markers-layer {
  pointer-events: none;
}
.island-marker {
  cursor: pointer;
  pointer-events: all;
  outline: none !important;
  transition: opacity .25s var(--ease);
}
.island-marker .island-marker-hit {
  fill: transparent;
  stroke: none;
  cursor: pointer;
}
.island-marker .island-marker-ring {
  fill: none;
  stroke: var(--text);
  stroke-width: 0.8px;
  stroke-opacity: 0.45;
  vector-effect: non-scaling-stroke;
  transition: stroke-opacity .2s var(--ease), stroke-width .2s var(--ease), stroke .2s var(--ease);
}
.island-marker .island-marker-dot {
  fill: inherit;
  stroke: #ffffff;
  stroke-width: 0.6px;
  vector-effect: non-scaling-stroke;
  transition: filter .2s var(--ease), transform .2s var(--ease);
}
.island-marker:hover .island-marker-ring,
.island-marker.cont-hover .island-marker-ring {
  stroke: var(--text);
  stroke-opacity: 0.95;
  stroke-width: 1.2px;
}
.island-marker:hover .island-marker-dot {
  filter: brightness(1.25);
}
.island-marker.active .island-marker-ring {
  stroke: var(--text) !important;
  stroke-opacity: 1 !important;
  stroke-width: 1.8px !important;
  filter: drop-shadow(0 0 5px color-mix(in oklab, var(--primary) 45%, transparent));
}
.island-marker.nodata-in {
  opacity: .5;
}
.map[data-level='world'] .island-marker:hover,
.map[data-level='world'] .island-marker.cont-hover {
  filter: brightness(1.1) saturate(1.15);
}
.map[data-level='continent'] .island-marker.out {
  opacity: .22;
}
.map[data-level='continent'] .island-marker.out.cont-hover {
  opacity: .5;
}
.map[data-level='continent'] .island-marker.in:hover {
  filter: brightness(1.15) saturate(1.2);
}

.tooltip {
  position: absolute; pointer-events: none; z-index: 15;
  padding: var(--space-1) var(--space-3);
  background: var(--text); color: var(--bg);
  border-radius: var(--radius-sm); font-size: var(--text-xs); font-weight: 500;
  white-space: nowrap; translate: -50% calc(-100% - 10px);
  box-shadow: var(--shadow-sm);
}
@media (max-width: 768px) {
  .tooltip { display: none !important; }
}

.mobile-chip {
  position: fixed;
  bottom: calc(2.25rem + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 999999 !important;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: min(calc(100vw - 2rem), 25rem);
  min-height: 3.5rem;
  padding: 0.4rem 0.65rem 0.4rem 0.95rem;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.32), 0 2px 8px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  animation: chip-pop 0.22s var(--ease);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), opacity 0.2s var(--ease);
  color: var(--text);
  text-decoration: none;
}
.mobile-chip:hover {
  transform: translate(-50%, -2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.36);
}
.mobile-chip:active {
  transform: translate(-50%, 0) scale(0.98);
}
@keyframes chip-pop {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.mobile-chip-info {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.mobile-chip-flag-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
}
.mobile-chip-flag img {
  width: 1.6rem;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 0 0 1px var(--border);
  display: block;
}
.mobile-chip-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  text-align: left;
  overflow: hidden;
}
.mobile-chip-name {
  color: var(--text);
  font-weight: 700;
  font-size: var(--text-sm);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-chip-lang {
  color: var(--text-muted);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.2;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-chip-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  border: 0;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 700;
  flex: none;
  white-space: nowrap;
  box-shadow: 0 2px 10px color-mix(in oklab, var(--primary) 40%, transparent);
}
.mobile-chip-action svg {
  display: inline-block;
  flex: none;
}
@media (min-width: 769px) {
  .mobile-chip { display: none !important; }
}

.zoom-ctrl {
  display: flex; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
}
.zoom-ctrl button {
  width: 2.125rem; height: 2.125rem; display: grid; place-items: center;
  font-size: 1.15rem; font-weight: 600; line-height: 1; color: var(--text);
  background: none; border: 0; cursor: pointer;
}
.zoom-ctrl button + button { border-left: 1px solid var(--divider); }
.map-gesture {
  position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; pointer-events: none;
  background: rgb(15 20 28 / .42); color: #fff; font-weight: 600; font-size: var(--text-base); text-align: center; padding: var(--space-4);
  opacity: 0; transition: opacity .2s var(--ease); border-radius: inherit;
}
.map-gesture.show { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .map-gesture { transition: none; } }
.zoom-ctrl button:hover { background: var(--surface-offset); color: var(--primary); }
.zoom-ctrl svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.map-controls {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  right: auto;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  pointer-events: none;
  z-index: 3;
}
.map-controls > * {
  pointer-events: auto;
}
.chip-btn {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: var(--space-1) var(--space-3) var(--space-1) var(--space-2);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: 600; box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.chip-btn svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chip-btn:hover { border-color: var(--primary); color: var(--primary); }

.btn-voltar-mundo {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: .35rem .65rem;
  background: transparent !important; border: none !important; box-shadow: none !important;
  color: var(--text); font-size: var(--text-sm); font-weight: 600;
  cursor: pointer; transition: color 180ms ease-out, transform 180ms ease-out;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-voltar-mundo svg {
  width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}
.btn-voltar-mundo:hover {
  color: var(--primary);
  transform: translateX(-2px);
}
.btn-voltar-label {
  display: inline-flex;
  align-items: center;
}
.btn-voltar-label .lbl-mid,
.btn-voltar-label .lbl-short {
  display: none;
}
.btn-voltar-label .lbl-full {
  display: inline;
}
.map-hint {
  position: absolute; bottom: var(--space-4); left: 50%; translate: -50% 0; margin: 0;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-full);
  background: color-mix(in oklab, var(--surface-2) 90%, transparent); box-shadow: var(--shadow-sm);
  font-size: var(--text-sm); font-weight: 500; color: var(--text); white-space: nowrap;
  transition: opacity .25s;
}
[data-open='true'] .map-hint { opacity: 0; pointer-events: none; }
/* ==========================================================================
   Bloco SUG-28: Legenda do Mapa e Linhas do Globo
   ========================================================================== */

/* Botão de focar ilhas do Caribe nos controles do mapa */
.btn-focus-caribe {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3) var(--space-1) var(--space-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn-focus-caribe svg {
  flex-shrink: 0;
}
.btn-focus-caribe-label {
  display: inline-flex;
  align-items: center;
}
.btn-focus-caribe-label .lbl-short {
  display: none;
}
.btn-focus-caribe-label .lbl-full {
  display: inline;
}
.btn-focus-caribe:hover {
  background: var(--surface-offset);
  border-color: var(--primary);
  color: var(--primary);
}
.btn-focus-caribe[aria-pressed='true'] {
  background: var(--c-central);
  border-color: var(--c-central);
  color: #ffffff;
  box-shadow: 0 2px 8px color-mix(in oklab, var(--c-central) 35%, transparent);
}
.btn-focus-caribe[aria-pressed='true'] svg {
  stroke: #ffffff;
}

/* Botão de alternar linhas do globo nos controles do mapa */
.btn-toggle-linhas {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3) var(--space-1) var(--space-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s var(--ease);
}
.btn-toggle-linhas svg {
  flex-shrink: 0;
}
.btn-toggle-linhas:hover {
  background: var(--surface-offset);
  border-color: var(--primary);
  color: var(--primary);
}
.btn-toggle-linhas[aria-pressed='true'] {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px color-mix(in oklab, var(--primary) 35%, transparent);
}
.btn-toggle-linhas[aria-pressed='true'] svg {
  stroke: #ffffff;
}

/* Responsividade dos controles do mapa (tablet & mobile) */
@media (max-width: 768px) {
  .btn-voltar-label .lbl-full {
    display: none;
  }
  .btn-voltar-label .lbl-mid {
    display: inline;
  }
  .btn-voltar-label .lbl-short {
    display: none;
  }
  .btn-toggle-linhas .btn-toggle-linhas-label {
    display: none;
  }
  .btn-toggle-linhas {
    width: 2.125rem;
    height: 2.125rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
  }
}

@media (max-width: 580px) {
  .btn-voltar-label .lbl-full,
  .btn-voltar-label .lbl-mid {
    display: none;
  }
  .btn-voltar-label .lbl-short {
    display: inline;
  }
  .btn-voltar-mundo {
    padding: 0.25rem 0.4rem;
    font-size: var(--text-xs);
  }
  .btn-focus-caribe-label .lbl-full {
    display: none;
  }
  .btn-focus-caribe-label .lbl-short {
    display: inline;
  }
  .btn-focus-caribe {
    padding: 0.25rem 0.55rem;
  }
}

/* Camada de linhas do globo no SVG */
.globe-lines-layer {
  pointer-events: none;
}
.globe-grid-path {
  fill: none;
  stroke: var(--text);
  stroke-width: 0.5px;
  stroke-opacity: 0.16;
  stroke-dasharray: 2, 4;
  vector-effect: non-scaling-stroke;
}
.globe-line-path {
  fill: none;
  vector-effect: non-scaling-stroke;
}
.globe-line-equator {
  stroke: #e05d44;
  stroke-width: 1.3px;
  stroke-opacity: 0.9;
}
[data-theme='dark'] .globe-line-equator {
  stroke: #f87171;
}
.globe-line-trop-cancer,
.globe-line-trop-capricorn {
  stroke: #d97706;
  stroke-width: 1.1px;
  stroke-opacity: 0.85;
  stroke-dasharray: 6, 4;
}
[data-theme='dark'] .globe-line-trop-cancer,
[data-theme='dark'] .globe-line-trop-capricorn {
  stroke: #fbbf24;
}
.globe-line-polar-arctic,
.globe-line-polar-antarctic {
  stroke: #0284c7;
  stroke-width: 1.05px;
  stroke-opacity: 0.85;
  stroke-dasharray: 2, 3;
}
[data-theme='dark'] .globe-line-polar-arctic,
[data-theme='dark'] .globe-line-polar-antarctic {
  stroke: #38bdf8;
}
.globe-line-greenwich {
  stroke: #059669;
  stroke-width: 1.15px;
  stroke-opacity: 0.85;
  stroke-dasharray: 5, 4;
}
[data-theme='dark'] .globe-line-greenwich {
  stroke: #34d399;
}

/* Rótulos textuais nas linhas do globo */
.globe-line-label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  user-select: none;
  pointer-events: none;
  fill: var(--text);
  paint-order: stroke fill;
  stroke: var(--surface);
  stroke-width: 3px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Caixa da Legenda do Mapa */
.map-legend {
  position: absolute;
  left: var(--space-3);
  bottom: var(--space-3);
  z-index: 6;
  width: min(320px, calc(100% - 1.5rem));
  background: color-mix(in oklab, var(--surface) 94%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  color: var(--text);
  font-size: var(--text-xs);
  transition: width 0.25s var(--ease), max-height 0.25s var(--ease), box-shadow 0.2s var(--ease);
  pointer-events: auto;
  user-select: none;
}
.map-legend.is-collapsed {
  width: auto;
  box-shadow: var(--shadow-sm);
}

.map-legend-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 6px 10px;
  background: transparent;
  border: none;
  border-radius: inherit;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 700;
  text-align: left;
}
.map-legend-toggle:hover {
  background: color-mix(in oklab, var(--surface-offset) 70%, transparent);
}
.map-legend-head-content {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.legend-badge-symbol {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.2px solid var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.legend-badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
}
.map-legend-title {
  letter-spacing: 0.01em;
}
.map-legend-chevron {
  transition: transform 0.22s var(--ease);
  color: var(--text-muted);
}
.map-legend.is-collapsed .map-legend-chevron {
  transform: rotate(-90deg);
}

.map-legend-body {
  padding: 2px 10px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.map-legend.is-collapsed .map-legend-body {
  display: none;
}

.map-legend-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.35;
}
.map-legend-island {
  border-radius: var(--radius-sm);
  padding: 2px 4px;
  transition: background-color 0.2s var(--ease);
}
.map-legend-island:hover {
  background: color-mix(in oklab, var(--primary-soft) 40%, transparent);
}
.legend-marker-sample {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.2px solid var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin-top: 1px;
}
.legend-marker-sample-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  border: 0.8px solid #ffffff;
}
.legend-item-text {
  flex: 1;
  min-width: 0;
}
.legend-item-title {
  color: var(--text);
  font-size: 0.76rem;
  line-height: 1.3;
}
.legend-item-sub {
  color: var(--text-muted);
  font-size: 0.69rem;
  margin-top: 2px;
  display: block;
}

.map-legend-divider {
  height: 1px;
  background: var(--divider);
  margin: 1px 0;
}

.map-legend-lines-section {
  flex-direction: column;
  gap: 6px;
}
.legend-lines-header-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.legend-lines-title-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text);
}
.legend-lines-title-group svg {
  color: var(--text-muted);
}

.legend-lines-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 6px 2px 3px;
  background: var(--surface-offset);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 600;
  transition: all 0.2s var(--ease);
}
.legend-lines-switch:hover {
  border-color: var(--primary);
  color: var(--text);
}
.legend-lines-switch[aria-pressed='true'] {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}
.legend-switch-track {
  width: 18px;
  height: 10px;
  border-radius: 10px;
  background: var(--border);
  position: relative;
  transition: background 0.2s var(--ease);
}
.legend-lines-switch[aria-pressed='true'] .legend-switch-track {
  background: rgba(255, 255, 255, 0.45);
}
.legend-switch-thumb {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.2s var(--ease);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.legend-lines-switch[aria-pressed='true'] .legend-switch-thumb {
  transform: translateX(8px);
}

.legend-lines-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 2px;
  padding-left: 2px;
}
.legend-line-entry {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.69rem;
  color: var(--text-muted);
  line-height: 1.25;
}
.legend-line-entry strong {
  color: var(--text);
}
.line-swatch {
  width: 16px;
  height: 0;
  border-top-width: 2px;
  border-top-style: solid;
  flex: none;
}
.line-swatch-eq {
  border-top-color: #e05d44;
}
[data-theme='dark'] .line-swatch-eq {
  border-top-color: #f87171;
}
.line-swatch-trop {
  border-top-color: #d97706;
  border-top-style: dashed;
}
[data-theme='dark'] .line-swatch-trop {
  border-top-color: #fbbf24;
}
.line-swatch-pol {
  border-top-color: #0284c7;
  border-top-style: dotted;
}
[data-theme='dark'] .line-swatch-pol {
  border-top-color: #38bdf8;
}
.line-swatch-gw {
  border-top-color: #059669;
  border-top-style: dashed;
}
[data-theme='dark'] .line-swatch-gw {
  border-top-color: #34d399;
}

/* Mobile adjustments para Legenda do Mapa */
@media (max-width: 768px) {
  .map-legend {
    left: var(--space-3);
    bottom: var(--space-3);
    z-index: 12;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }
  /* No celular, colapsada mostra SOMENTE O SÍMBOLO */
  .map-legend.is-collapsed {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    background: color-mix(in oklab, var(--surface) 92%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid var(--border);
  }
  .map-legend.is-collapsed .map-legend-toggle {
    width: 100%;
    height: 100%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
  }
  .map-legend.is-collapsed .map-legend-head-content {
    gap: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .map-legend.is-collapsed .map-legend-title {
    display: none;
  }
  .map-legend.is-collapsed .map-legend-chevron {
    display: none;
  }
  .map-legend.is-collapsed .legend-badge-symbol {
    width: 22px;
    height: 22px;
    border-width: 2px;
    border-color: var(--primary);
    box-shadow: 0 0 0 1px color-mix(in oklab, var(--primary) 25%, transparent);
  }
  .map-legend.is-collapsed .legend-badge-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
  }

  /* No celular, quando expandida abre um card compacto com fechamento fácil */
  .map-legend:not(.is-collapsed) {
    width: min(285px, calc(100vw - 1.5rem));
    max-height: min(24rem, 65vh);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    background: color-mix(in oklab, var(--surface) 96%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: legendPop 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .map-legend:not(.is-collapsed) .map-legend-toggle {
    padding: 8px 10px;
    border-bottom: 1px solid var(--divider);
  }
  .map-legend:not(.is-collapsed) .map-legend-title {
    font-size: 0.8rem;
    font-weight: 700;
  }
  .map-legend:not(.is-collapsed) .map-legend-chevron {
    transform: rotate(0deg);
    color: var(--primary);
  }
  .map-legend:not(.is-collapsed) .map-legend-body {
    padding: 8px 10px 10px 10px;
  }
}

@keyframes legendPop {
  from { opacity: 0; transform: scale(0.92) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== Panel ===== */
.panel {
  position: absolute; z-index: 4;
  top: var(--space-3); right: var(--space-3); bottom: var(--space-3);
  width: clamp(28rem, 42%, 48rem);
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-6) calc(var(--space-10) + 1.5rem);
  box-shadow: var(--shadow-md);
  transform: translateX(calc(100% + var(--space-6)));
  visibility: hidden;
  transition: transform .45s var(--ease), visibility 0s linear .45s;
}
.panel.open { transform: none; visibility: visible; transition: transform .45s var(--ease), visibility 0s; }
.panel.collapsed {
  transform: translateX(calc(100% + var(--space-6))) !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: transform .45s var(--ease), visibility 0s linear .45s !important;
}
.panel-top-controls {
  position: relative; top: auto; float: right; margin: 0 0 var(--space-2) var(--space-2); z-index: 3;
  display: inline-flex; align-items: center; gap: var(--space-2);
}
.panel-top-controls .panel-close {
  position: static; float: none; margin: 0;
}
.panel-collapse-btn {
  display: inline-flex; align-items: center; gap: 5px; height: 2.35rem; padding: 0 0.85rem;
  border-radius: var(--radius-full); border: 1.5px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size: var(--text-xs); font-weight: 600;
  cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transition: transform .18s var(--ease), background-color .18s, color .18s, border-color .18s, box-shadow .18s;
}
.panel-collapse-btn:hover, .panel-collapse-btn:focus-visible {
  border-color: var(--primary); background: var(--primary-soft); color: var(--primary);
  transform: translateY(-1px); box-shadow: 0 2px 8px color-mix(in oklab, var(--primary) 18%, transparent);
}
.panel-collapse-btn svg { flex: none; transition: transform .18s var(--ease); }
.panel-collapse-btn:hover svg { transform: translateX(2px); }

.panel-expand-pill {
  position: absolute; top: var(--space-3); right: var(--space-3); z-index: 5;
  display: inline-flex; align-items: center; gap: var(--space-2);
  height: 2.65rem; padding: 0 1.15rem; border-radius: var(--radius-full);
  border: 1.5px solid var(--primary); background: var(--surface); color: var(--primary);
  font-size: var(--text-sm); font-weight: 600; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  cursor: pointer; transition: transform .2s var(--ease), background-color .2s, color .2s, box-shadow .2s;
}
.panel-expand-pill:hover, .panel-expand-pill:focus-visible {
  transform: translateY(-2px); background: var(--primary); color: #fff;
  box-shadow: 0 6px 20px color-mix(in oklab, var(--primary) 32%, transparent);
}
.panel-expand-pill svg { flex: none; transition: transform .2s var(--ease); }
.panel-expand-pill:hover svg { transform: translateX(-3px); }
.panel-expand-pill[hidden] { display: none !important; }
.panel-close {
  position: relative; top: auto; float: right; margin: 0 0 var(--space-2) var(--space-2); z-index: 2;
  width: 2.35rem; height: 2.35rem; display: grid; place-items: center;
  background: var(--bias-E-soft);
  color: var(--bias-E);
  border: 1.5px solid color-mix(in oklab, var(--bias-E) 45%, var(--border));
  border-radius: 50%;
  box-shadow: 0 2px 8px color-mix(in oklab, var(--bias-E) 18%, transparent);
  transition: transform .18s var(--ease), background-color .18s, color .18s, border-color .18s, box-shadow .18s;
}
.panel-close:hover, .panel-close:focus-visible {
  background: var(--bias-E);
  border-color: var(--bias-E);
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 4px 12px color-mix(in oklab, var(--bias-E) 35%, transparent);
}
.panel-close svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }
.panel:focus { outline: none; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); font-size: var(--text-xs); color: var(--text-muted); margin-bottom: var(--space-4); }
.crumbs button { background: none; border: 0; padding: 0; color: var(--primary); font-weight: 500; font-size: inherit; }
.crumbs button:hover { text-decoration: underline; }
.crumbs span[aria-hidden] { color: var(--text-faint); }

.eyebrow { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: var(--text-muted); margin: 0 0 var(--space-2); }
.panel h1, .panel h2 {
  font-family: var(--font-display); font-weight: 500; letter-spacing: -.015em; line-height: 1.1;
  font-size: var(--text-xl); margin: 0 0 var(--space-3);
}
.panel .lede { color: var(--text-muted); margin: 0 0 var(--space-6); max-width: 46ch; }
.title-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.country-flag-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: none;
}
.country-flag-col .flag {
  width: 2.75rem;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0 0 1px var(--border);
}
.country-flag-lang {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 1px 7px;
  border-radius: var(--radius-full);
  text-align: center;
  white-space: nowrap;
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.02em;
}
.country-title-box {
  flex: 1;
  min-width: 0;
}
.country-title-box h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.15;
}
.country-langs-detail {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.flag { width: 2.25rem; height: auto; border-radius: 3px; box-shadow: 0 0 0 1px var(--border); flex: none; }
.flag-sm { width: 1.4rem; border-radius: 2px; }

.cont-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.cont-card {
  text-align: left; display: flex; flex-direction: column; gap: var(--space-1);
  padding: var(--space-4); border-radius: var(--radius-md);
  background: var(--surface-2); border: 1px solid var(--border);
  border-top: 3px solid var(--cc);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.cont-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.cont-card strong { font-weight: 600; font-size: var(--text-sm); }
.cont-card small { color: var(--text-muted); font-size: var(--text-xs); }

.stats { display: flex; gap: var(--space-6); margin: 0 0 var(--space-6); padding: var(--space-4) 0; border-block: 1px solid var(--divider); }
.stats div { display: flex; flex-direction: column; }
.stats b { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 500; font-variant-numeric: tabular-nums; }
.stats small { color: var(--text-muted); font-size: var(--text-xs); }

.filter-input {
  width: 100%; padding: var(--space-2) var(--space-3); margin-bottom: var(--space-3);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); font-size: var(--text-sm);
}
.filter-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.country-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.country-list li + li { border-top: 1px solid var(--divider); }
.country-list button {
  width: 100%; display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-2); background: none; border: 0; text-align: left; font-size: var(--text-sm);
  border-radius: var(--radius-sm);
}
.country-list button:hover { background: var(--surface-offset); }
.country-list .count { margin-left: auto; display: inline-flex; gap: 3px; align-items: center; }
.country-list .count i { width: .5rem; height: .5rem; border-radius: 50%; }
.country-list .count em { font-style: normal; color: var(--text-muted); font-size: var(--text-xs); margin-left: var(--space-2); font-variant-numeric: tabular-nums; }
.country-list .nod { color: var(--text-muted); }
.list-sep { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); font-weight: 600; padding: var(--space-5) var(--space-2) var(--space-2); }

/* Filters */
.group-label { font-size: var(--text-xs); font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; margin: var(--space-5) 0 var(--space-2); }
.seg { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.seg button {
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: 600; display: inline-flex; align-items: center; gap: var(--space-2);
  transition: background-color .15s, border-color .15s, color .15s;
}
.seg button:hover { border-color: var(--text-muted); }
.seg button:active:not(:disabled) { transform: scale(0.96); }
.seg button:disabled { opacity: .38; cursor: not-allowed; border-color: var(--border); background: var(--surface-offset); }
.seg button[aria-pressed='true'] { background: var(--text); color: var(--bg); border-color: var(--text); }
.seg button[data-b='E'][aria-pressed='true'] { background: var(--bias-E); border-color: var(--bias-E); color: #fff; }
.seg button[data-b='I'][aria-pressed='true'] { background: var(--bias-I); border-color: var(--bias-I); color: #fff; }
.seg button[data-b='D'][aria-pressed='true'] { background: var(--bias-D); border-color: var(--bias-D); color: #fff; }
[data-theme='dark'] .seg button[data-b][aria-pressed='true'] { color: #0f141c; }

/* Bias spectrum bar */
.spectrum { display: flex; height: .5rem; border-radius: var(--radius-full); overflow: hidden; margin-top: var(--space-4); background: var(--surface-offset); }
.spectrum span { display: block; height: 100%; }
.spectrum-legend { display: flex; justify-content: space-between; font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--space-1); }

/* Outlets */
.outlets { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-5); }
.outlet {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--space-4); border-left: 4px solid var(--bc);
  animation: rise .35s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.outlet[data-b='E'] { --bc: var(--bias-E); --bs: var(--bias-E-soft); }
.outlet[data-b='I'] { --bc: var(--bias-I); --bs: var(--bias-I-soft); }
.outlet[data-b='D'] { --bc: var(--bias-D); --bs: var(--bias-D-soft); }
.outlet[data-b='N'] { --bc: var(--primary); --bs: var(--primary-soft); border-left: 1px solid var(--border); }
.outlet-body-grid {
  display: grid;
  grid-template-columns: 13.5rem minmax(0, 1fr) auto;
  align-items: stretch;
  gap: var(--space-3);
}
.outlet-col-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.outlet-col-rotator {
  min-width: 0;
  border-left: 1px dashed var(--divider);
  padding-left: var(--space-3);
}
.outlet-rotator-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: opacity 0.16s var(--ease);
}
.outlet-rotator-list.is-rotating {
  opacity: 0.25;
}
.outlet-rotator-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 0.74rem;
  line-height: 1.35;
  padding-bottom: 6px;
  border-bottom: 1px dotted var(--divider);
}
.outlet-rotator-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.outlet-rotator-tag {
  flex: none;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.outlet-rotator-tag:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.outlet-rotator-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.outlet-rotator-link:hover {
  color: var(--primary);
  text-decoration: underline;
}
.outlet-rotator-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.outlet-rotator-link svg {
  width: 0.72rem;
  height: 0.72rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  opacity: 0.7;
}
@media (max-width: 680px) {
  .outlet-body-grid {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
  .outlet-col-badges {
    height: auto;
    gap: var(--space-2);
  }
  .fav-outlet-btn {
    margin-top: var(--space-2);
  }
  .outlet-col-rotator {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px dashed var(--divider);
    padding-left: 0;
    padding-top: var(--space-2);
    margin-top: var(--space-1);
  }
}
.outlet-head { display: flex; align-items: flex-start; gap: var(--space-3); }
.outlet-head > img { width: 1.5rem; height: 1.5rem; border-radius: 4px; flex: none; margin-top: 2px; background: var(--surface-offset); }
.outlet-country-flag,
.outlet-head img.outlet-country-flag,
.outlet-carousel-title img.outlet-country-flag {
  width: 1.05rem;
  height: 0.75rem;
  object-fit: cover;
  border-radius: 2px;
  display: inline-block;
  vertical-align: -1px;
  margin: 0 3px 0 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
  background: transparent;
}
.outlet-head a { text-decoration: none; }
.outlet-head a:hover h3 { color: var(--primary); }
.outlet h3 { margin: 0; font-size: var(--text-base); font-weight: 600; line-height: 1.3; transition: color .15s; }
.outlet .domain { font-size: var(--text-xs); color: var(--text-muted); }
.outlet-col-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  min-width: 0;
  margin-left: auto;
  height: 100%;
}
.badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-1);
}
.fav-outlet-btn {
  margin-top: auto;
  align-self: flex-end;
  flex-shrink: 0;
}
.badge { font-size: var(--text-xs); font-weight: 600; padding: 1px var(--space-2); border-radius: var(--radius-full); white-space: nowrap; }
.badge-bias { background: var(--bs); color: var(--bc); }
.badge-st { background: var(--surface-offset); color: var(--text-muted); }
.badge-ind {
  display: inline-flex; align-items: center; gap: 3px;
  background: color-mix(in oklab, #10b981 16%, var(--surface-2));
  color: #047857;
  border: 1px solid color-mix(in oklab, #10b981 35%, transparent);
  cursor: help;
}
[data-theme='dark'] .badge-ind {
  background: color-mix(in oklab, #10b981 22%, transparent);
  color: #34d399;
  border-color: color-mix(in oklab, #10b981 40%, transparent);
}
.badge-ind svg { width: .75rem; height: .75rem; fill: currentColor; }
.badge-sug {
  display: inline-flex; align-items: center; gap: 3px;
  background: color-mix(in oklab, #f59e0b 16%, var(--surface-2));
  color: #b45309;
  border: 1px solid color-mix(in oklab, #f59e0b 38%, transparent);
  cursor: help;
}
[data-theme='dark'] .badge-sug {
  background: color-mix(in oklab, #f59e0b 22%, transparent);
  color: #fbbf24;
  border-color: color-mix(in oklab, #f59e0b 42%, transparent);
}
.badge-sug svg { width: .75rem; height: .75rem; fill: none; stroke: currentColor; stroke-width: 2.2; }
.badge-inline { display: inline-flex; vertical-align: middle; margin: 0 2px; }

.outlet.is-pinned {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-soft), 0 4px 12px rgba(0, 0, 0, 0.08);
  position: relative;
}

.badge-pinned {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary);
}

.badge-pinned svg {
  width: .72rem;
  height: .72rem;
  fill: currentColor;
}

.methodology-note {
  margin: var(--space-5) 0 var(--space-4); padding: var(--space-4) var(--space-5);
  background: var(--surface-offset); border-radius: var(--radius-md);
  font-size: var(--text-xs); color: var(--text-muted); line-height: 1.55;
  border-left: 3px solid var(--primary);
  overflow: visible;
}
.methodology-note p { margin: 0; }
.methodology-note strong { color: var(--text); }
.outlets-paywall-notice {
  margin: var(--space-4) 0 calc(-1 * var(--space-2));
  font-size: var(--text-xs);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.topics { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-3); }
.topics a {
  display: inline-flex; align-items: center; gap: var(--space-1);
  font-size: var(--text-xs); font-weight: 500; text-decoration: none;
  padding: var(--space-1) var(--space-3); border-radius: var(--radius-full);
  border: 1px solid var(--border); background: var(--surface);
  transition: border-color .15s, background-color .15s, color .15s;
}
.topics a:hover { border-color: var(--bc); color: var(--bc); }
.topics a.hl { background: var(--bc); border-color: var(--bc); color: #fff; }
[data-theme='dark'] .topics a.hl { color: #0f141c; }
.topics a svg { width: .8rem; height: .8rem; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; opacity: .75; }

.empty-state { text-align: center; padding: var(--space-8) var(--space-4); color: var(--text-muted); }
.empty-state h3 { color: var(--text); font-family: var(--font-display); font-weight: 500; font-size: var(--text-lg); margin: 0 0 var(--space-2); }
.empty-state p { margin: 0 auto var(--space-4); max-width: 36ch; font-size: var(--text-sm); }
.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-full);
  background: var(--primary); color: var(--surface); text-decoration: none; font-size: var(--text-sm); font-weight: 600; border: 0;
}
[data-theme='dark'] .btn:not(.btn-secondary):not(.btn-outline) { color: #0f141c; }
.btn:hover { background: var(--primary-hover); }

.mini-search { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; }

/* ===== Colabore ===== */
.support-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap !important;
  flex: none;
  font-size: clamp(0.78rem, 0.85vw, var(--text-sm));
  font-weight: 600;
  text-decoration: none;
  color: var(--primary);
  padding: 0.35rem clamp(0.45rem, 0.6vw, 0.75rem);
  border-radius: var(--radius-full);
  line-height: 1;
  transition: background-color .15s, color .15s;
}
.support-link:hover { background: var(--primary-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
.extras {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--space-4);
  max-width: 62rem; margin: var(--space-6) auto var(--space-8);
}
.support, .feedback {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5); scroll-margin-top: 6rem;
}
.support { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.support h2, .feedback h2 { font-family: var(--font-display); font-weight: 500; font-size: var(--text-lg); line-height: 1.1; margin: 0; }
.support .support-eyebrow { margin: 0; font-size: var(--text-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.support h2 { font-size: var(--text-xl); font-weight: 600; line-height: 1.05; max-width: 18ch; }
.support-text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.support-text p { margin: 0; font-size: var(--text-xs); color: var(--text-muted); max-width: 38ch; }
.btn-paypal {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-full);
  background: #ffc439; color: #111827; text-decoration: none; font-weight: 700; font-size: var(--text-xs);
  transition: background-color .2s, transform .2s var(--ease);
}
.btn-paypal:hover { background: #f2b52a; transform: translateY(-1px); }
.btn-paypal svg { width: 1rem; height: 1rem; fill: #003087; }
.btn-paypal svg path + path { fill: #009cde; opacity: 1; }
.qr { margin: 0; display: flex; flex-direction: column; align-items: center; gap: var(--space-1); flex: none; }
.qr img { width: 112px; height: 112px; image-rendering: pixelated; background: #fff; padding: var(--space-1); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.qr figcaption { font-size: var(--text-xs); color: var(--text-muted); }

.fb-form { display: flex; flex-direction: column; gap: var(--space-2); }
.fb-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.fb-rate { border: 0; margin: 0; padding: 0; }
.stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.stars input { position: absolute; opacity: 0; pointer-events: none; }
.stars label { font-size: 1.25rem; line-height: 1; color: var(--border); cursor: pointer; transition: color .15s, transform .15s; padding: 2px; }
.stars label:hover, .stars label:hover ~ label, .stars input:checked ~ label { color: var(--sun); }
.stars label:hover { transform: scale(1.1); }
.stars input:focus-visible + label { outline: 2px solid var(--primary); outline-offset: 1px; border-radius: 4px; }
.fb-form textarea, .fb-form input[type='text'], .fb-form input[type='email'] {
  width: 100%; min-width: 0; padding: var(--space-2) var(--space-3);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); font-size: var(--text-sm);
}
.fb-form textarea { resize: vertical; min-height: 3.5rem; }
.fb-form textarea:focus, .fb-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.fb-form textarea[aria-invalid='true'] { border-color: var(--bias-E); }
.fb-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: var(--space-2); }
.fb-row .btn { padding: var(--space-2) var(--space-5); cursor: pointer; justify-content: center; }
.fb-row .btn[disabled] { opacity: .6; cursor: progress; }
.fb-honey { position: absolute; left: -9999px; width: 1px; height: 1px; }
.fb-status { margin: 0; font-size: var(--text-xs); color: var(--text-muted); min-height: 0; }
.fb-status:empty { display: none; }
.fb-status.ok { color: var(--c-sul); font-weight: 600; }
.fb-status.err { color: var(--bias-E); font-weight: 600; }

/* ===== Footer ===== */
.footer {
  padding: var(--space-6) clamp(var(--space-4), 3vw, var(--space-8)) var(--space-8);
  border-top: 1px solid var(--divider);
  font-size: var(--text-xs); color: var(--text-muted);
}
.footer p { margin: 0 0 var(--space-2); max-width: 90ch; }
.footer-social-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
}
.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--text-xs);
  font-weight: 500;
  transition: color 0.15s, border-color 0.15s, transform 0.15s, background-color 0.15s;
}
.footer-social-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--surface);
  transform: translateY(-1px);
}
.footer-social-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  fill: currentColor;
}
.footer .footer-credit { max-width: none; margin: var(--space-3) 0 0; text-align: center; font-size: var(--text-sm); color: var(--text-muted); }

/* ===== Sobre ===== */
.about-page { width: min(100% - 2rem, 54rem); margin: clamp(2rem, 7vw, 5.5rem) auto; }
.about-card {
  position: relative;
  padding: clamp(var(--space-5), 5vw, var(--space-10));
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.about-close-x {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  border: 1.5px solid color-mix(in oklab, var(--bias-E) 45%, var(--border));
  background: var(--bias-E-soft);
  color: var(--bias-E);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 2px 8px color-mix(in oklab, var(--bias-E) 18%, transparent);
  transition: all 180ms ease-out;
  padding: 0;
  text-decoration: none;
}
.about-close-x:hover, .about-close-x:focus-visible {
  background: var(--bias-E);
  border-color: var(--bias-E);
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 4px 12px color-mix(in oklab, var(--bias-E) 35%, transparent);
}
.about-eyebrow { margin: 0 0 var(--space-2); color: var(--primary); font-size: var(--text-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.about-card h1 { margin: 0 0 var(--space-5); font-family: var(--font-display); font-size: clamp(2.1rem, 6vw, 3.5rem); font-weight: 500; line-height: 1; letter-spacing: -.025em; }
.about-copy { max-width: 72ch; color: var(--text-muted); font-size: var(--text-base); line-height: 1.75; }
.about-copy p { margin: 0 0 var(--space-4); }
.about-copy p:last-child, .about-highlight-closing { margin: var(--space-6) 0 0; color: var(--text); font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; line-height: 1.4; }
.about-section-title {
  margin: var(--space-6) 0 var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.about-audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--space-4);
  margin: var(--space-3) 0 var(--space-6);
}
.about-audience-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.about-audience-badge {
  align-self: flex-start;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 2px 10px;
  border-radius: var(--radius-full);
}
.about-audience-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
.about-audience-card p {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text-muted);
}
.about-pillars-list {
  margin: 0 0 var(--space-6);
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-sm);
  line-height: 1.65;
}
.about-pillars-list strong {
  color: var(--text);
}
.about-expand-details {
  margin-top: var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  overflow: hidden;
  transition: border-color 0.2s var(--ease);
}
.about-expand-details:hover,
.about-expand-details[open] {
  border-color: color-mix(in oklab, var(--primary) 50%, var(--border));
}
.about-expand-summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  padding-right: 3rem;
  user-select: none;
}
.about-expand-summary::-webkit-details-marker {
  display: none;
}
.about-expand-summary > span:first-child {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--primary);
}
.about-expand-sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.about-expand-summary::after {
  content: "▾";
  position: absolute;
  right: var(--space-5);
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--primary);
  transition: transform 0.2s var(--ease);
}
.about-expand-details[open] .about-expand-summary::after {
  transform: translateY(-50%) rotate(180deg);
}
.about-expand-body {
  padding: 0 var(--space-5) var(--space-5);
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.about-expand-body .about-section-title:first-child {
  margin-top: var(--space-4);
}
.about-back { display: inline-flex; align-items: center; gap: var(--space-2); margin-top: var(--space-6); color: var(--primary); font-size: var(--text-sm); font-weight: 600; text-decoration: none; }
.about-back:hover { text-decoration: underline; text-underline-offset: 3px; }

.about-stats-strip {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-5) 0 var(--space-6);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.about-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}
.about-stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 700;
  color: var(--primary);
  line-height: 1.1;
}
.about-stat-desc {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.about-stat-divider {
  width: 1px;
  height: 2.2rem;
  background: var(--border);
}
@media (max-width: 520px) {
  .about-stats-strip {
    flex-direction: column;
    gap: var(--space-3);
  }
  .about-stat-divider {
    display: none;
  }
}

.about-social-callout {
  margin-top: var(--space-6);
  padding: var(--space-4) var(--space-5);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.about-social-callout p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.about-x-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, transform 0.15s;
}
.about-x-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}
.about-x-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.footer-bug-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  color: var(--primary);
  cursor: pointer;
  vertical-align: middle;
  line-height: 1;
  margin-inline: 2px;
  transition: transform 0.15s var(--ease), border-color 0.15s, color 0.15s;
}
.footer-bug-trigger:hover {
  transform: scale(1.12);
  border-color: var(--primary);
  color: var(--primary-hover);
}
.footer-bug-trigger svg {
  display: inline-block;
  vertical-align: middle;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) and (min-width: 769px) {
  .topbar-main {
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
  }
  .topbar-sub {
    gap: var(--space-2);
    padding: 0.3rem var(--space-3);
  }
  .brand-sub {
    display: none;
  }
  .brand-name {
    font-size: 1.45rem;
  }
  .topbar-actions {
    gap: 0.2rem;
  }
  .support-link {
    padding: 0.3rem 0.45rem;
    font-size: 0.78rem;
  }
  .search {
    flex: 0 1 20rem;
    max-width: 24rem;
    min-width: 12rem;
  }
}

@media (max-width: 768px) {
  .layout { padding-inline: var(--space-2); padding-top: var(--space-2); width: 100%; box-sizing: border-box; }
  .stage { width: 100%; margin: 0 auto; }
  .topbar {
    position: static;
    top: auto;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    padding: 0;
  }
  .topbar-main {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3) 0 var(--space-3);
    border-bottom: none;
  }
  .brand {
    margin-right: 0;
    justify-content: space-between;
  }
  .topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: 0.35rem;
    padding-bottom: 2px;
    width: 100%;
  }
  .topbar-actions::-webkit-scrollbar { display: none; }
  .topbar-sub {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3) var(--space-2);
    border-bottom: 1px solid var(--divider);
  }
  /* No celular, a barra de pesquisa NÃO fica abaixo dos continentes: fica no topo (order: 1) e com tamanho e comportamento corretos */
  .topbar-sub .search {
    order: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    flex: none;
  }
  .topbar-sub .search input {
    height: 2.45rem;
    font-size: 16px; /* Evita zoom automatico indesejado no iOS/Safari ao focar o campo */
    padding: var(--space-2) var(--space-3) var(--space-2) 2.45rem;
    box-sizing: border-box;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
  }
  .topbar-sub .search svg {
    left: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    width: 1.1rem;
    height: 1.1rem;
    pointer-events: none;
  }
  .topic-search-form {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
  }
  .topic-search-input-wrap {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
  }
  .topic-search-input {
    height: 2.45rem;
    font-size: 16px; /* Evita zoom automatico no iOS ao focar o campo */
    padding: 0 2.2rem 0 2.35rem;
    line-height: normal;
    margin: 0;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
  }
  .topic-search-icon-btn {
    top: 50%;
    transform: translateY(-50%);
  }
  .topic-search-btn {
    flex: 0 0 auto;
    height: 2.45rem;
    box-sizing: border-box;
    padding: 0 1.15rem;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    line-height: 1;
    -webkit-appearance: none;
    appearance: none;
    vertical-align: middle;
  }
  .topbar-sub .search-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    width: 100%;
    max-height: min(18rem, 45vh);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 500;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
  }
  /* No celular, continentes vem apos a barra de pesquisa (order: 2) */
  .topbar-sub .continents {
    order: 2;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    gap: 0.25rem;
    padding-bottom: 2px;
    margin-top: 1px;
  }
  .topbar-sub .continents::-webkit-scrollbar { display: none; }
  .topbar-sub .continents button {
    flex: none;
    padding: 0.35rem 0.65rem;
    white-space: nowrap;
  }
  .support-link {
    display: inline-flex;
    flex: none;
    white-space: nowrap;
    font-size: var(--text-xs);
    padding: 0.35rem 0.65rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
  }
  .support-link.active, .support-link[aria-current="page"] {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
  }
  .theme-label { display: none !important; }
  .theme-toggle {
    height: 2.1rem;
    padding: 2px 3px;
    width: auto;
    border-radius: var(--radius-full);
    justify-content: center;
    flex: none;
    margin-left: auto;
  }
  .theme-toggle svg {
    width: 1.45rem;
    height: 1.45rem;
    padding: 2px;
  }
  .icon-btn { width: 2.1rem; height: 2.1rem; flex: none; }
  .brand-name { font-size: clamp(1.25rem, 5vw, var(--text-lg)); white-space: nowrap; }
  .logo { width: 2rem; height: 2rem; }

  .continents-top {
    min-height: 1.5rem;
    margin: var(--space-1) 0 var(--space-2);
  }
  .typewriter-wrap {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-muted);
  }
  .typewriter-cursor {
    font-size: var(--text-sm);
    margin-left: 2px;
  }

  .map { width: 100%; margin: 0 auto; box-sizing: border-box; height: clamp(16rem, 62vw, 22.5rem); min-height: 16rem; border-radius: var(--radius-md); }
  .map-controls {
    top: var(--space-2);
    left: var(--space-2);
    right: var(--space-2);
    gap: var(--space-1);
    justify-content: space-between;
    z-index: 10;
  }
  .map-controls > * {
    flex-shrink: 0;
  }
  .map-controls .zoom-ctrl {
    margin-left: 0;
  }
  .map-controls #btn-toggle-linhas {
    margin-left: auto;
  }
  .map-controls #btn-toggle-linhas[hidden] + .zoom-ctrl {
    margin-left: auto;
  }
  .map-hint { font-size: var(--text-xs); bottom: var(--space-3); }
  .continents {
    flex-wrap: nowrap; overflow-x: auto; padding-bottom: var(--space-2); scrollbar-width: none;
    margin-inline: calc(-1 * var(--space-2)); padding-inline: var(--space-3);
    gap: var(--space-2);
    mask-image: none;
    -webkit-mask-image: none;
    -webkit-overflow-scrolling: touch;
    scroll-padding-inline: var(--space-3);
  }
  .continents button { flex: none; padding: 0.35rem 0.65rem; white-space: nowrap; }
  .panel {
    position: static; width: auto; margin-top: var(--space-3);
    overflow: visible; display: none; transform: none;
    padding: var(--space-5) var(--space-4); scroll-margin-top: 7.5rem;
  }
  .panel.open { display: block; animation: rise .35s var(--ease) both; }
  .panel.collapsed { display: none !important; }
  .panel-expand-pill {
    position: fixed;
    top: auto;
    bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
    right: calc(1.25rem + env(safe-area-inset-right, 0px));
    z-index: 999999;
  }
  .panel-close { position: static; }
  .cont-grid { grid-template-columns: 1fr; }
  .extras { grid-template-columns: 1fr; margin-block: var(--space-4) var(--space-6); }
  .support, .feedback { padding: var(--space-4); }
  .qr img { width: 96px; height: 96px; }
  .fb-row { grid-template-columns: 1fr 1fr; }
  .fb-row .btn { grid-column: 1 / -1; }

  .news-ticker {
    min-height: auto;
    padding: var(--space-2) var(--space-3);
  }
  .news-ticker-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.4rem;
    min-height: auto;
    max-width: 100%;
  }
  .news-ticker-heading {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
    width: auto;
  }
  .news-ticker-title {
    margin: 0;
    font-size: var(--text-xs);
    white-space: nowrap;
  }
  .news-ticker-credit {
    display: none;
  }
  .news-ticker-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    justify-self: end;
  }
  .news-ticker-controls button {
    width: 1.75rem;
    height: 1.75rem;
  }
  .news-ticker-content {
    grid-column: 1 / -1;
    min-height: auto;
    width: 100%;
    min-width: 0;
  }
  .news-story {
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: var(--space-3);
    width: 100%;
    min-width: 0;
  }
  .news-story-image {
    width: 4.5rem;
    height: 3.25rem;
  }
  .news-story-title {
    font-size: var(--text-xs);
    -webkit-line-clamp: 2;
  }
  .news-story-meta {
    font-size: 0.625rem;
    gap: 0.25rem;
  }
}
@media (max-width: 480px) {
  .support-link { font-size: 0.75rem; padding: 0.3rem 0.55rem; }
}
@media (max-width: 360px) {
  .topbar-main, .topbar-sub { padding: var(--space-1) var(--space-2); gap: var(--space-1); }
  .brand { gap: var(--space-2); }
  .brand-name { font-size: 1.15rem; }
  .logo { width: 1.75rem; height: 1.75rem; }
  .icon-btn { width: 2rem; height: 2rem; }
}

/* ===== Botão flutuante de fechar painel de veículos ===== */
.panel-floating-close {
  position: fixed;
  bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  right: calc(1.25rem + env(safe-area-inset-right, 0px));
  z-index: 999999 !important;
  display: inline-flex; align-items: center; gap: var(--space-2);
  height: 3rem; min-height: 48px; min-width: 48px; padding: 0 1.15rem;
  border-radius: var(--radius-full);
  border: 1.5px solid color-mix(in oklab, #fff 28%, var(--bias-E));
  background: var(--bias-E); color: #fff; box-shadow: var(--shadow-md);
  font-size: var(--text-sm); font-weight: 600;
  transition: transform .2s var(--ease), background-color .2s;
  cursor: pointer;
}
.panel-floating-close:hover, .panel-floating-close:focus-visible {
  transform: scale(1.06); background: color-mix(in oklab, var(--bias-E) 85%, #000); color: #fff;
}
.panel-floating-close svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
@media (min-width: 769px) {
  .panel-floating-close { display: none !important; }
}

/* ===== Botão flutuante de voltar ao topo (sem conflito com Fechar veículos / Início) ===== */
.scroll-top-floating {
  position: fixed;
  bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  right: calc(1.25rem + env(safe-area-inset-right, 0px));
  z-index: 999998;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 2.65rem;
  padding: 0 0.95rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--primary);
  box-shadow: var(--shadow-md);
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s, background-color 0.2s, bottom 0.2s var(--ease);
}
.scroll-top-floating:hover,
.scroll-top-floating:focus-visible {
  transform: translateY(-2px);
  border-color: var(--primary);
  background: var(--primary-soft);
}
.scroll-top-floating.above-panel-close {
  bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
}
.timeline-meta .fav-news-btn {
  margin-left: auto;
}
.entenda-related-news-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ===== Favoritos (Países, Veículos e Notícias) ===== */
dialog:not([open]) {
  display: none !important;
}
.fav-top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  font-family: inherit;
  flex: none;
}
.fav-top-btn:hover {
  border-color: #f59e0b;
  background: color-mix(in oklab, #f59e0b 12%, var(--surface-2));
}
.fav-top-btn svg {
  width: 1rem;
  height: 1rem;
  color: #f59e0b;
  display: block;
  flex: none;
}
.fav-count-pill {
  background: var(--primary);
  color: var(--surface);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  line-height: 1.3;
}
[data-theme='dark'] .fav-count-pill {
  color: #0f141c;
}
.country-title-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.fav-star-btn,
.country-list button.fav-star-btn {
  display: inline-grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  min-width: 1.85rem;
  max-width: 1.85rem;
  padding: 0;
  margin: 0;
  flex: 0 0 1.85rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  z-index: 1;
  overflow: hidden;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.fav-star-btn svg,
.country-list button.fav-star-btn svg {
  width: 0.95rem;
  height: 0.95rem;
  display: block;
  flex: none;
  pointer-events: none;
}
.fav-star-btn:hover,
.country-list button.fav-star-btn:hover {
  border-color: #f59e0b;
  color: #d97706;
  background: color-mix(in oklab, #f59e0b 10%, var(--surface-2));
}
.fav-star-btn.is-fav,
.country-list button.fav-star-btn.is-fav {
  background: color-mix(in oklab, #f59e0b 16%, var(--surface-2));
  border-color: color-mix(in oklab, #f59e0b 55%, var(--border));
  color: #d97706;
}
[data-theme='dark'] .fav-star-btn.is-fav,
[data-theme='dark'] .country-list button.fav-star-btn.is-fav {
  color: #fbbf24;
}
.territory-notice-btn {
  display: inline-grid; place-items: center; width: 1.85rem; height: 1.85rem;
  min-width: 1.85rem; max-width: 1.85rem; padding: 0; margin: 0; flex: 0 0 1.85rem;
  border: 1.5px solid var(--border); background: var(--surface-2); color: var(--text-muted);
  border-radius: 50%; cursor: pointer; position: relative; z-index: 1;
  transition: border-color .15s var(--ease), color .15s var(--ease), background-color .15s var(--ease), transform .15s var(--ease);
}
.territory-notice-btn:hover, .territory-notice-btn:focus-visible {
  border-color: #f59e0b; color: #d97706;
  background: color-mix(in oklab, #f59e0b 12%, var(--surface-2));
  transform: scale(1.08);
}
[data-theme='dark'] .territory-notice-btn:hover,
[data-theme='dark'] .territory-notice-btn:focus-visible {
  border-color: #fbbf24; color: #fbbf24;
  background: color-mix(in oklab, #f59e0b 20%, var(--surface-2));
}
.territory-notice-btn svg { width: 1rem; height: 1rem; display: block; pointer-events: none; }
.territory-notice-tooltip {
  position: fixed; z-index: 999999; max-width: 22rem; padding: 0.65rem 0.85rem;
  background: var(--text); color: var(--bg); font-size: var(--text-xs); line-height: 1.45;
  border-radius: var(--radius-md); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  pointer-events: none; font-family: var(--font-body);
  transition: opacity .15s ease, transform .15s ease;
}
.territory-notice-tooltip[hidden] { display: none !important; opacity: 0; }
.topic-news-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.hub-news-meta .fav-news-btn,
.resumo-meta-row .fav-news-btn {
  margin-left: auto;
}
.country-list li.country-row-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.country-list li.country-row-item .country-row-main {
  flex: 1;
  min-width: 0;
  width: auto;
}
.favorites-dialog {
  width: min(94vw, 36rem);
}
.favorites-dialog-sub {
  margin: 0 0 var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.favorites-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-1);
  margin-bottom: var(--space-3);
  background: var(--surface-2);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.fav-tab-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.fav-tab-btn[aria-selected="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.fav-tab-btn span {
  font-size: var(--text-xs);
  background: var(--surface-offset);
  padding: 1px 7px;
  border-radius: var(--radius-full);
}
.favorites-panel-body {
  max-height: 55vh;
  overflow-y: auto;
}
.fav-empty {
  text-align: center;
  padding: var(--space-6) var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-muted);
  background: var(--surface-2);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
}
.fav-items-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.fav-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.fav-item-main {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-align: left;
  cursor: pointer;
  padding: 2px 0;
}
.fav-item-main:hover .fav-item-title {
  color: var(--primary);
}
.fav-item-title {
  font-weight: 600;
  font-size: var(--text-sm);
}
.fav-item-meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-left: auto;
}
.fav-outlet-info {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  flex: 1;
}
.fav-outlet-fav {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 4px;
  flex: none;
}
.fav-outlet-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.fav-outlet-Text .fav-item-meta,
.fav-outlet-text .fav-item-meta {
  margin-left: 0;
}
.fav-outlet-name {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text);
  text-decoration: none;
}
.fav-outlet-name:hover {
  color: var(--primary);
}
.fav-outlet-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.fav-visit-btn {
  padding: 4px 10px;
  font-size: var(--text-xs);
}
.fav-Visit-btn svg,
.fav-visit-btn svg {
  width: 0.75rem;
  height: 0.75rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}
.fav-remove-btn {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
}
.fav-remove-btn:hover {
  background: var(--bias-E-soft);
  color: var(--bias-E);
  border-color: var(--bias-E);
}
.favorites-dialog-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border);
}
.fav-clear-all-btn {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color var(--ease), background var(--ease);
}
.fav-clear-all-btn:hover {
  color: var(--bias-E);
  background: var(--bias-E-soft);
}
.fav-clear-all-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.fav-clear-all-btn svg {
  flex: none;
  opacity: 0.8;
}
.fav-clear-all-btn:hover svg {
  opacity: 1;
}

/* ===== Bug Dialog ===== */
.bug-dialog {
  border: 0; padding: 0; background: transparent;
  width: min(92vw, 30rem); margin: auto;
}
.bug-dialog::backdrop {
  background: rgb(0 0 0 / .55); backdrop-filter: blur(4px);
}
.bug-dialog-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: var(--space-5); color: var(--text);
  animation: modal-in .2s var(--ease);
}
@keyframes modal-in { from { opacity: 0; transform: scale(.95); } }
.bug-dialog-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.bug-dialog-header h2 { font-family: var(--font-display); font-size: var(--text-lg); margin: 0; font-weight: 600; }
.bug-dialog-x {
  width: 2.1rem; height: 2.1rem; display: grid; place-items: center;
  background: var(--bias-E-soft);
  border: 1.5px solid color-mix(in oklab, var(--bias-E) 45%, var(--border));
  font-size: 1.05rem; font-weight: 700; line-height: 1;
  color: var(--bias-E); cursor: pointer; padding: 0; border-radius: 50%;
  transition: all .18s var(--ease);
}
.bug-dialog-x:hover, .bug-dialog-x:focus-visible {
  background: var(--bias-E); border-color: var(--bias-E); color: #fff; transform: scale(1.08);
}
.bug-form { display: flex; flex-direction: column; gap: var(--space-2); }
.bug-label { font-size: var(--text-xs); font-weight: 600; color: var(--text-muted); }
.bug-label .req { color: var(--bias-E); }
.bug-form textarea, .bug-form input[type='email'], .bug-form input[type='text'] {
  width: 100%; padding: var(--space-2) var(--space-3); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-md); font-size: var(--text-sm);
}
.bug-form textarea:focus, .bug-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.bug-form-actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-3); }
.btn-secondary { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.btn-secondary:hover { background: var(--surface-offset); }
.bug-status { margin: var(--space-2) 0 0; font-size: var(--text-xs); min-height: 1.2em; }
.bug-status.ok { color: #10b981; font-weight: 600; }
.bug-status.err { color: var(--bias-E); font-weight: 600; }

/* ===== Tutorial Bubble ===== */
.tutorial-bubble {
  position: fixed;
  bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 9998;
  width: min(90vw, 22rem);
  background: var(--text);
  color: var(--bg);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(0,0,0,0.32);
  border: 1px solid color-mix(in oklab, var(--bg) 18%, transparent);
  animation: tut-in .25s var(--ease);
}
@keyframes tut-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.tutorial-badge { font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--sun); margin-bottom: var(--space-1); }
.tutorial-text { font-size: var(--text-sm); line-height: 1.4; margin: 0 0 var(--space-3); }
.tutorial-actions { display: flex; justify-content: space-between; align-items: center; }
.tutorial-skip { background: none; border: 0; color: color-mix(in oklab, var(--bg) 70%, transparent); font-size: var(--text-xs); cursor: pointer; text-decoration: underline; padding: 0; }
.btn-sm { padding: 4px 12px; font-size: var(--text-xs); font-weight: 700; }
.tutorial-target-highlight {
  outline: 2.5px solid var(--sun) !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px color-mix(in oklab, var(--sun) 35%, transparent) !important;
  background: var(--primary-soft) !important;
  color: var(--primary) !important;
}

/* ===== Dica flutuante (viés) ===== */
.dica-flut {
  position: fixed; z-index: 60; max-width: 19rem; pointer-events: none;
  background: var(--text); color: var(--bg); font-size: var(--text-xs); line-height: 1.45;
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  opacity: 1; transform: none; transition: opacity .15s, transform .15s;
}
.dica-flut[hidden] { display: none !important; opacity: 0; }
.dica-flut.show { opacity: 1; transform: none; }
[data-dica]:not(button) { cursor: help; }
.info-btn {
  display: inline-grid; place-items: center; width: 1.1rem; height: 1.1rem; margin-left: var(--space-1); vertical-align: -2px;
  border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-muted);
  font: 700 .65rem/1 var(--font-body); padding: 0;
}
.info-btn:hover { color: var(--primary); border-color: var(--primary); }

/* ===== Seleção Mobile no Mapa ===== */
.country.mobile-selected {
  stroke: var(--primary) !important;
  stroke-width: 2.5px !important;
  stroke-dasharray: 4 2;
  filter: drop-shadow(0 0 4px var(--primary-soft));
}

@media (prefers-reduced-motion: reduce) {
  .news-story { animation: none; }
  .dica-flut { transition: none; }
  .typewriter-cursor { display: none; }
}

/* ===== Página não encontrada (404) ===== */
.not-found-view {
  width: min(100% - 2rem, 42rem);
  margin: clamp(1.5rem, 5vw, 4rem) auto;
}
.not-found-card {
  padding: clamp(var(--space-5), 4vw, var(--space-8));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.not-found-card h1 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  margin: 0 0 var(--space-3);
}
.not-found-copy {
  color: var(--text-muted);
  font-size: var(--text-base);
  max-width: 48ch;
  margin: 0 auto var(--space-5);
}

/* ===== Busca por assunto específico e Carrosséis por Veículo ===== */
.topic-search-section {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--divider);
}
.topic-search-form {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.topic-search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}
.topic-search-icon-btn {
  position: absolute;
  left: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  z-index: 2;
  transition: color .18s, background-color .18s;
}
.topic-search-icon-btn:hover {
  color: var(--primary);
  background: var(--surface-offset);
}
.topic-search-icon {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.topic-search-icon-btn .topic-search-icon {
  position: static;
  transform: none;
  stroke: currentColor;
}
.topic-search-input {
  width: 100%;
  height: 2.45rem;
  box-sizing: border-box;
  padding: 0 2.2rem 0 2.35rem;
  font-size: var(--text-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text);
  line-height: normal;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s, box-shadow .2s;
}
.topic-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.topic-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}
.topic-search-clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  border: 0;
  background: var(--surface-offset);
  color: var(--text-muted);
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  z-index: 2;
  transition: color .15s, background-color .15s;
}
.topic-search-clear:hover {
  color: var(--text);
  background: var(--border);
}
.topic-search-btn {
  flex: none;
  height: 2.45rem;
  box-sizing: border-box;
  padding: 0 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 600;
  border: 0;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  margin: 0;
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
  vertical-align: middle;
}

.topic-search-results {
  margin-top: var(--space-3);
}
.topic-search-results:empty {
  margin-top: 0;
}
.topic-search-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
}
.topic-search-status p {
  margin: 0;
}
.topic-search-spinner {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  animation: topic-spin 0.75s linear infinite;
}
@keyframes topic-spin {
  to { transform: rotate(360deg); }
}
.topic-search-empty-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
}
.topic-search-empty-sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
  max-width: 36ch;
}

.topic-search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.topic-search-summary {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.topic-search-summary strong {
  color: var(--text);
}
.topic-translate-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  min-height: 32px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: border-color .15s, background-color .15s, color .15s, transform .1s;
}
.topic-translate-all-btn:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.topic-translate-all-btn:active {
  transform: scale(0.96);
}
.topic-translate-all-btn[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.topic-translate-all-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}
.topic-translate-all-btn svg {
  width: 0.85rem;
  height: 0.85rem;
  flex: none;
}

.topic-carousels {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.outlet-carousel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}
.outlet-carousel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.outlet-carousel-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  flex-wrap: wrap;
}
.outlet-carousel-title > img {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 4px;
  flex: none;
  background: var(--surface-offset);
}
.outlet-carousel-title h4 {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.outlet-carousel-count {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--surface-offset);
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-weight: 500;
}
.outlet-carousel-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}
.carousel-btn {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  display: grid;
  place-items: center;
  padding: 0;
  transition: border-color .15s, color .15s;
}
.carousel-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.outlet-carousel-track {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding-bottom: var(--space-1);
  -webkit-overflow-scrolling: touch;
}
.topic-news-card {
  flex: 0 0 min(15.5rem, 78vw);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.topic-news-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.topic-news-card-media {
  display: block;
  width: 100%;
  height: 7.5rem;
  background: var(--surface-offset);
  overflow: hidden;
  flex: none;
}
.topic-news-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.topic-news-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--space-3);
  gap: var(--space-1);
}
.topic-news-meta {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.6875rem;
  color: var(--text-muted);
  line-height: 1.2;
  flex-wrap: wrap;
}
.topic-news-source {
  font-weight: 600;
  color: var(--primary);
}
.topic-news-sep {
  color: var(--text-faint);
}
.topic-news-title {
  margin: 0;
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.topic-news-title a {
  text-decoration: none;
  color: var(--text);
}
.topic-news-title a:hover {
  color: var(--primary);
  text-decoration: underline;
}
.topic-news-desc {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.topic-news-card-footer {
  margin-top: auto;
  padding-top: var(--space-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.topic-news-open {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.topic-news-open:hover {
  text-decoration: underline;
}
.topic-news-open svg {
  width: 0.8rem;
  height: 0.8rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}
.topic-news-translate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 9px;
  min-height: 28px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.70rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: border-color .15s, background-color .15s, color .15s, transform .1s;
}
.topic-news-translate-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.topic-news-translate-btn:active {
  transform: scale(0.96);
}
.topic-news-translate-btn[aria-pressed="true"] {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}
.topic-news-translate-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}
.topic-news-translate-btn svg {
  width: 0.8rem;
  height: 0.8rem;
  flex: none;
}
.topic-news-card.is-translated {
  border-color: color-mix(in oklab, var(--primary) 55%, var(--border));
}

/* ===== Fase 2: Comparar perspectivas, Linha do Tempo, Resumo do Dia, Hubs Temáticos e Entenda ===== */
.perspective-section-head {
  margin-bottom: var(--space-2);
}
.perspective-section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text);
}
.perspective-section-sub {
  margin: 2px 0 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.perspective-controls-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.perspective-period-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.period-btn {
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.period-btn:hover {
  border-color: var(--primary);
  color: var(--text);
}
.period-btn[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}
.perspective-quick-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.quick-tags-list {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.quick-tags-refresh {
  display: inline-grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color .15s, color .15s, transform .2s;
}
.quick-tags-refresh:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: rotate(90deg);
}
.perspective-period-after-search {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--divider);
}
.quick-tags-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}
.quick-tag-chip {
  padding: 2px 9px;
  font-size: 0.7rem;
  border-radius: var(--radius-full);
  border: 1px dashed var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
}
.quick-tag-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--surface);
}
.perspective-dynamic-banner {
  margin-top: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--surface);
  border-left: 3px solid var(--primary);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.perspective-dynamic-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text);
}
.perspective-dynamic-correction {
  margin: 3px 0 0;
  font-size: var(--text-xs);
  color: var(--primary);
}
.perspective-correction-orig,
.topic-search-corrected-note {
  color: var(--text-muted);
  font-style: italic;
}
.perspective-dynamic-subtitle {
  margin: 4px 0 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.perspective-dynamic-meta {
  margin: 6px 0 0;
  font-size: 0.7rem;
  color: var(--text-faint);
}
.perspective-editorial-links {
  margin-top: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.perspective-links-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.perspective-links-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}
.perspective-internal-pill,
.card-internal-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--surface-2);
  color: var(--primary);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.perspective-internal-pill:hover,
.card-internal-tag:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.topic-news-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

/* Linha do tempo */
.panel-timeline-slot:empty {
  display: none;
}
.panel-timeline-slot {
  margin-top: var(--space-2);
}
.editorial-timeline-block {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.editorial-timeline-head h4 {
  margin: 4px 0;
  font-family: var(--font-display);
  font-size: var(--text-base);
}
.editorial-timeline-head p {
  margin: 0 0 var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.editorial-eyebrow {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin: 0 0 4px;
}
.editorial-timeline-list {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0 0 0 18px;
  border-left: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.editorial-timeline-item {
  position: relative;
}
.timeline-marker {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px var(--border);
}
.timeline-content {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}
.timeline-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.timeline-date {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
}
.timeline-source-badge {
  font-size: 0.68rem;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.timeline-item-title {
  margin: 0 0 4px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
}
.timeline-item-summary {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.45;
}
.timeline-item-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.timeline-article-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.timeline-article-link:hover {
  text-decoration: underline;
}
.timeline-article-link svg {
  width: 0.8rem;
  height: 0.8rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Seções editoriais na página inicial */
.editorial-home-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.editorial-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}
.editorial-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}
.editorial-section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  color: var(--text);
}
.editorial-section-sub {
  margin: 6px 0 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: 68ch;
}

/* Resumo do dia */
.resumo-dia-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
.resumo-dia-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: border-color var(--transition);
}
.resumo-dia-card:hover {
  border-color: var(--primary);
}
.resumo-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  flex-shrink: 0;
}
.resumo-body-col {
  flex: 1;
  min-width: 0;
}
.resumo-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.resumo-cat-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
}
.resumo-source-name {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.resumo-item-title {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.35;
}
.resumo-item-title a {
  color: var(--text);
  text-decoration: none;
}
.resumo-item-title a:hover {
  color: var(--primary);
  text-decoration: underline;
}
.resumo-item-summary {
  margin: 0 0 var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.5;
}
.resumo-links-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.resumo-hub-pill,
.resumo-entenda-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.resumo-hub-pill:hover,
.resumo-entenda-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.resumo-original-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  margin-left: auto;
}
.resumo-original-link:hover {
  text-decoration: underline;
}
.resumo-original-link svg {
  width: 0.85rem;
  height: 0.85rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

/* Grid de Páginas Temáticas (Hubs) */
.hubs-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
}
.hub-home-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: transform var(--transition), border-color var(--transition);
}
.hub-home-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.hub-home-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}
.hub-home-route {
  font-family: monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--surface);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.hub-home-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: var(--text-base);
}
.hub-home-card h3 a {
  color: var(--text);
  text-decoration: none;
}
.hub-home-card h3 a:hover {
  color: var(--primary);
}
.hub-home-card p {
  margin: 0 0 var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.45;
  flex: 1;
}
.hub-home-open {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.hub-home-open:hover {
  text-decoration: underline;
}

/* Seção Entenda o assunto */
.entenda-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: var(--space-4);
}
.entenda-home-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  gap: var(--space-2);
}
.entenda-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.entenda-word-badge {
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
}
.entenda-home-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-base);
}
.entenda-home-card h3 a {
  color: var(--text);
  text-decoration: none;
}
.entenda-home-card h3 a:hover {
  color: var(--primary);
}
.entenda-simple-summary {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.5;
}
.entenda-expand-details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
}
.entenda-expand-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--primary);
}
.entenda-expand-prose {
  margin-top: var(--space-2);
  color: var(--text);
  line-height: 1.6;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}
.entenda-expand-prose p {
  margin: 0 0 var(--space-2);
}
.entenda-related-block,
.entenda-related-hubs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
}
.entenda-related-label {
  font-weight: 600;
  color: var(--text-muted);
}
.entenda-related-news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.entenda-related-news-list a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.entenda-related-news-list a:hover {
  color: var(--primary);
  text-decoration: underline;
}
.entenda-related-news-list svg {
  width: 0.75rem;
  height: 0.75rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.entenda-card-actions {
  margin-top: auto;
  padding-top: var(--space-2);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* Visualização dedicada de Página Temática (Hub) e Página de Explicação */
.thematic-hub-view {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
}
.hub-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.hub-breadcrumbs {
  font-size: var(--text-xs);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.hub-breadcrumbs a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.hub-breadcrumbs a:hover {
  text-decoration: underline;
}
.hub-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}
.hub-hero-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}
.hub-country-pill,
.entenda-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.hub-title {
  margin: 0 0 var(--space-2);
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  line-height: 1.2;
}
.hub-subtitle {
  margin: 0 0 var(--space-4);
  font-size: var(--text-base);
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 72ch;
}
.hub-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.hub-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.hub-block h2 {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-lg);
}
.hub-context-block p,
.entenda-body-prose p {
  margin: 0 0 var(--space-3);
  font-family: var(--font-serif);
  font-size: 1.04rem;
  line-height: 1.7;
  color: var(--text);
}
.hub-context-block p:last-child,
.entenda-body-prose p:last-child {
  margin-bottom: 0;
}
.hub-latest-grid,
.hub-entenda-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-3);
}
.hub-news-card,
.hub-entenda-card {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.hub-news-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.hub-news-source {
  font-weight: 700;
  color: var(--primary);
}
.hub-news-card h3,
.hub-entenda-card h3 {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.35;
}
.hub-news-card h3 a,
.hub-entenda-card h3 a {
  color: var(--text);
  text-decoration: none;
}
.hub-news-card h3 a:hover,
.hub-entenda-card h3 a:hover {
  color: var(--primary);
  text-decoration: underline;
}
.hub-news-card p,
.hub-entenda-card p {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.45;
  flex: 1;
}
.hub-entenda-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.hub-search-form {
  margin-bottom: var(--space-3);
}
.hub-faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.hub-faq-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}
.hub-faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text);
}
.hub-faq-item p {
  margin: var(--space-2) 0 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.55;
}
.hub-related-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-3);
}
.hub-related-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--transition);
}
.hub-related-card:hover {
  border-color: var(--primary);
}
.hub-related-card strong {
  color: var(--primary);
  font-size: var(--text-sm);
}
.hub-related-card span {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.newsletter-dialog-desc {
  margin: 0 0 var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.45;
}

@media (max-width: 768px) {
  .editorial-home-wrap {
    padding: var(--space-4) var(--space-3) 0;
    gap: var(--space-4);
  }
  .editorial-section,
  .hub-hero,
  .hub-block {
    padding: var(--space-4);
  }
  .resumo-dia-card {
    flex-direction: column;
    gap: var(--space-2);
  }
  .resumo-original-link {
    margin-left: 0;
  }
  .entenda-cards-grid,
  .hubs-cards-grid {
    grid-template-columns: 1fr;
  }
  .topic-search-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
  .topic-translate-all-btn {
    align-self: flex-start;
    min-height: 34px;
    padding: 6px 14px;
    font-size: 0.78rem;
  }
  .topic-news-card-footer {
    gap: var(--space-2);
  }
  .topic-news-card-actions {
    gap: 8px;
  }
  .topic-news-translate-btn {
    min-height: 32px;
    padding: 4px 10px;
    font-size: 0.72rem;
  }
}

/* ===== Cadastrar Veículo (Jornalismo Independente) ===== */
.cadastrar-veiculo-section {
  padding: clamp(var(--space-5), 4vw, var(--space-8));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-8);
}
.cad-wrap {
  max-width: 860px;
  margin: 0 auto;
}
.cad-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
.btn-back-map {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--primary-soft);
  transition: opacity .15s ease, transform .15s ease;
}
.btn-back-map:hover {
  opacity: .9;
  transform: translateX(-2px);
}
.cad-badge-independent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--surface-offset);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.cad-hero {
  margin-bottom: var(--space-6);
}
.cad-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  line-height: 1.2;
  margin: var(--space-2) 0 var(--space-3);
  color: var(--text);
}
.cad-lead {
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 72ch;
  margin: 0;
}
.cad-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.cad-step-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  position: relative;
  display: flex;
  flex-direction: column;
}
.cad-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: var(--text-xs);
  margin-bottom: var(--space-2);
}
.cad-step-card h3 {
  font-size: var(--text-sm);
  font-weight: 700;
  margin: 0 0 var(--space-1);
  color: var(--text);
}
.cad-step-card p {
  font-size: var(--text-xs);
  line-height: 1.45;
  color: var(--text-muted);
  margin: 0;
}
.cad-reqs-card {
  background: var(--surface-offset);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-6);
}
.cad-reqs-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  color: var(--primary);
}
.cad-reqs-header h3 {
  font-size: var(--text-base);
  font-weight: 700;
  margin: 0;
  color: var(--text);
}
.cad-reqs-list {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text);
  line-height: 1.5;
}
.cad-reqs-list strong {
  color: var(--text);
}
.cad-form-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-4), 4vw, var(--space-6));
  box-shadow: var(--shadow-sm);
}
.cad-form-head {
  margin-bottom: var(--space-5);
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--space-3);
}
.cad-form-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin: 0 0 var(--space-1);
  color: var(--text);
}
.cad-form-head p {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: 0;
}
.cad-fieldset {
  border: none;
  padding: 0;
  margin: 0 0 var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.cad-legend {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: var(--space-2);
  display: block;
  border-bottom: 2px solid var(--primary-soft);
  padding-bottom: 4px;
  width: 100%;
}
.cad-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.cad-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cad-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text);
}
.cad-label-highlight {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text);
}
.cad-subtext {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: 0 0 var(--space-2);
}
.cad-muted {
  font-weight: 400;
  color: var(--text-muted);
}
.cad-field input[type="text"],
.cad-field input[type="email"],
.cad-field input[type="tel"],
.cad-field input[type="url"],
.cad-field select,
.cad-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
  box-sizing: border-box;
}
.cad-field input:focus,
.cad-field select:focus,
.cad-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.cad-field textarea {
  resize: vertical;
  min-height: 100px;
}
.cad-field-counter {
  font-size: 11px;
  color: var(--text-muted);
  align-self: flex-end;
}
.cad-owner-box {
  background: var(--surface-offset);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin: var(--space-2) 0;
}
.cad-radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-1);
}
.cad-radio-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.cad-radio-label:hover {
  border-color: var(--primary);
}
.cad-radio-label input[type="radio"] {
  margin-top: 3px;
  cursor: pointer;
  accent-color: var(--primary);
}
.cad-radio-text {
  display: flex;
  flex-direction: column;
}
.cad-radio-text strong {
  font-size: var(--text-xs);
  color: var(--text);
}
.cad-radio-text small {
  font-size: 11px;
  color: var(--text-muted);
}
.cad-radio-not-owner {
  border-left: 3px solid var(--primary);
}
.cad-conditional-detail {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--border);
}
.cad-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin: 4px 0 0;
}
.cad-checkbox-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-1);
}
.cad-check-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--surface-offset);
  border: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  transition: all .15s ease;
}
.cad-check-pill input {
  margin: 0;
  accent-color: var(--primary);
}
.cad-check-pill:hover {
  border-color: var(--primary);
}
.cad-terms-check {
  margin-top: var(--space-2);
  padding: var(--space-3);
  background: var(--surface-offset);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.cad-check-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  cursor: pointer;
  font-size: var(--text-xs);
  color: var(--text);
  line-height: 1.45;
}
.cad-check-label input {
  margin-top: 2px;
  accent-color: var(--primary);
}
.cad-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
  flex-wrap: wrap;
}
.cad-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 12px 24px;
  font-size: var(--text-sm);
  font-weight: 700;
  border-radius: var(--radius-full);
}
.cad-status {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  line-height: 1.5;
  border-radius: var(--radius-md);
  display: none;
}
.cad-status.active {
  display: block;
  padding: var(--space-4);
}
.cad-status.ok {
  background: #e8f5e9;
  border: 1px solid #81c784;
  color: #1b5e20;
}
[data-theme="dark"] .cad-status.ok {
  background: #102814;
  border-color: #2e7d32;
  color: #a5d6a7;
}
.cad-status.err {
  background: #ffebee;
  border: 1px solid #e57373;
  color: #b71c1c;
}
[data-theme="dark"] .cad-status.err {
  background: #2b1111;
  border-color: #c62828;
  color: #ef9a9a;
}
.fb-partner-invite {
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.fb-partner-invite a {
  color: var(--primary);
  text-decoration: underline;
}
@media (max-width: 768px) {
  .cad-steps-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
  .cad-grid-2 {
    grid-template-columns: 1fr;
  }
  .cad-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .cad-actions button,
  .cad-actions a {
    text-align: center;
    justify-content: center;
  }
}

/* ===== Ocultar selos/badges injetados pelo Netlify que colidem no mobile e desktop ===== */
.netlify-badge,
[class*="netlify-badge"],
[id*="netlify-badge"],
a[href*="netlify.com"]:not(.support-link):not(.brand),
div:has(> a[href*="netlify.com"]:not(.support-link):not(.brand)),
iframe[src*="netlify"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
  z-index: -1 !important;
}
