/* =========================================================
   Portal EV Brasil — folha de estilo principal (mobile first)
   Identidade: verde-escuro #1a5c3f · branco · cinza-claro
   ========================================================= */

:root {
  --green-900: #0f3d2a;
  --green-800: #144a35;
  --green-700: #1a5c3f;
  --green-600: #217a56;
  --green-500: #2e9368;
  --green-100: #dff0e7;
  --green-50: #f1faf5;

  --gray-900: #1f2421;
  --gray-700: #3d4541;
  --gray-600: #5b655f;
  --gray-500: #79837d;
  --gray-400: #a7afab;
  --gray-300: #d5dbd7;
  --gray-200: #e7ebe8;
  --gray-100: #f4f6f5;
  --white: #ffffff;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(15, 61, 42, 0.06);
  --shadow: 0 4px 6px -1px rgba(15, 61, 42, 0.06), 0 12px 26px -10px rgba(15, 61, 42, 0.18);

  --header-h: 64px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* ===== Semânticas de tema — tema CLARO (padrão) =====
     Os componentes usam estas variáveis; o tema escuro só as redeclara
     no bloco [data-theme="dark"] lá embaixo desta folha. */
  color-scheme: light;

  /* Superfícies */
  --bg-page: var(--white);
  --bg-surface: var(--white);
  --bg-surface-alt: #fbfcfb;
  --bg-surface-soft: #fafbfa;
  --bg-subtle: var(--gray-100);
  --bg-tint: var(--green-50);
  --bg-tint-strong: var(--green-100);
  --bg-header: rgba(255, 255, 255, 0.92);
  --bg-nav: var(--white);

  /* Texto */
  --text-heading: var(--green-900);
  --text-strong: var(--gray-900);
  --text: var(--gray-700);
  --text-muted: var(--gray-600);
  --text-faint: var(--gray-500);
  --text-placeholder: var(--gray-400);

  /* Bordas */
  --border-soft: var(--gray-100);
  --border: var(--gray-200);
  --border-strong: var(--gray-300);
  --border-dashed: var(--gray-300);
  --border-tint: #b9dfcb;
  --border-hover: #cfe4d9;

  /* Acento da marca (verde elétrico) */
  --link: var(--green-700);
  --accent: var(--green-700);
  --accent-mid: var(--green-500);
  --accent-strong: var(--green-800);
  --accent-eyebrow: var(--green-600);

  /* Botões */
  --btn-primary-bg: var(--green-700);
  --btn-primary-bg-hover: var(--green-800);
  --btn-primary-text: var(--white);
  --btn-primary-shadow: rgba(26, 92, 63, 0.55);
  --btn-outline-bg: var(--white);
  --btn-outline-text: var(--green-700);
  --btn-outline-border: var(--green-700);
  --btn-outline-bg-hover: var(--green-50);

  /* Foco e sombras */
  --focus: rgba(26, 92, 63, 0.45);
  --focus-ring: rgba(26, 92, 63, 0.15);
  --shadow-header: 0 10px 24px -16px rgba(15, 61, 42, 0.5);
  --shadow-panel: 0 18px 30px -20px rgba(15, 61, 42, 0.45);

  /* Erro em formulários */
  --danger-text: #b42318;
  --danger-bg: #fdecec;
  --danger-border: #f6c9c6;
  --danger-strong: #d64545;

  /* Badges de categoria */
  --badge-autonomia-text: #1a5c3f;
  --badge-autonomia-bg: #e7f3ed;
  --badge-custo-text: #9a5b06;
  --badge-custo-bg: #fdf0e0;
  --badge-carregamento-text: #0b5e8f;
  --badge-carregamento-bg: #e6f1fa;
  --badge-comparativo-text: #6d28d9;
  --badge-comparativo-bg: #f1eafe;
  --badge-compra-text: #0f6d75;
  --badge-compra-bg: #e1f4f5;
  --badge-hibrido-text: #b4451c;
  --badge-hibrido-bg: #fdeee5;
  --badge-padrao-text: #475569;
  --badge-padrao-bg: #eef2f6;

  /* Skeleton Loader (comunidade) — base clara / brilho */
  --skeleton-base: rgba(15, 61, 42, 0.07);
  --skeleton-shine: rgba(15, 61, 42, 0.14);
  --skeleton-border: var(--border-soft);

  /* Extras */
  --gradient-accent: linear-gradient(90deg, var(--green-700), var(--green-500));
  --select-arrow-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b655f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* ===== Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Reset do atributo `hidden`.
   Alguns componentes definem `display` explícito (.feed → grid, .feed__more → flex,
   .btn → inline-flex), que sobrepõe o `display:none` padrão do navegador para
   [hidden]. Sem este reset, `el.hidden = true` não oculta visualmente o
   elemento (apenas marca o atributo), quebrando estados como o fallback de erro
   da comunidade, em que a lista e o botão "Carregar mais" devem sumir. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-strong);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
figure,
ul {
  margin: 0;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

[id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.container {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 20px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font-weight: 600;
  border-radius: 0 0 10px 10px;
}

.skip-link:focus {
  top: 0;
  text-decoration: none;
}

/* ===== Botões ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.3rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease,
    transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background-color: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  box-shadow: 0 6px 14px -6px var(--btn-primary-shadow);
}

.btn--primary:hover {
  background-color: var(--btn-primary-bg-hover);
  transform: translateY(-1px);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--outline {
  background-color: var(--btn-outline-bg);
  color: var(--btn-outline-text);
  border-color: var(--btn-outline-border);
}

.btn--outline:hover {
  background-color: var(--btn-outline-bg-hover);
}

.btn--lg {
  padding: 0.95rem 1.7rem;
  font-size: 1rem;
  border-radius: 12px;
}

.btn--block {
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
/* ===== Header fixo ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: var(--bg-header);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-header);
}

/* Evita que o conteúdo fique cortado pela barra fixa do cabeçalho */
#conteudo {
  padding-top: calc(var(--header-h) + 16px);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-heading);
}

.logo:hover {
  text-decoration: none;
}

.logo__text strong {
  color: var(--link);
}

.logo__mark svg {
  width: 32px;
  height: 32px;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.header__cta {
  display: none;
}

/* Botão hambúrguer */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--text-heading);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Painel de navegação (mobile) */
.nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  gap: 6px;
  padding: 10px 20px 20px;
  background-color: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-panel);
  margin-left: 24px;
}

.nav.is-open {
  display: flex;
}

.nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.nav__link {
  display: block;
  padding: 12px 4px;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border-soft);
}

.nav__link:hover,
.nav__link--active {
  color: var(--link);
  text-decoration: none;
}

@media (min-width: 900px) {
  :root {
    --header-h: 72px;
  }

  .nav-toggle {
    display: none;
  }

  .header__inner {
    gap: 16px;
  }

  .nav {
    display: flex;
    position: static;
    flex: 1;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 26px;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .nav__list {
    flex-direction: row;
    gap: 26px;
  }

  .nav__link {
    position: relative;
    padding: 6px 2px;
    border-bottom: 0;
  }

  .nav__link--active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 2px;
    background-color: var(--link);
    border-radius: 2px;
  }

  .header__cta {
    display: inline-flex;
    width: auto;
    margin: 0;
  }
}

/* Mobile: o script.js move o .header__cta para dentro do menu aberto */
@media (max-width: 899px) {
  .nav .header__cta {
    display: inline-flex;
    width: 100%;
    min-height: 48px;
    margin-top: 16px;
    justify-content: center;
  }
}

/* ===== Hero ===== */
.hero {
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: 44px;
  background: linear-gradient(180deg, var(--bg-tint) 0%, var(--bg-page) 78%);
}

.hero__grid {
  display: grid;
  gap: 34px;
  align-items: center;
}

.hero__eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  padding: 0.35rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--link);
  background-color: var(--bg-tint-strong);
  border-radius: 999px;
}

.hero h1 {
  margin-bottom: 16px;
  font-size: clamp(1.85rem, 5.2vw, 2.9rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-heading);
}

.hero__subtitle {
  margin-bottom: 28px;
  max-width: 62ch;
  font-size: clamp(1rem, 2.2vw, 1.13rem);
  color: var(--text-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__media img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

@media (min-width: 960px) {
  .hero {
    padding-top: calc(var(--header-h) + 72px);
    padding-bottom: 64px;
  }

  .hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 48px;
  }
}

/* ===== Slots de anúncio (padrão visual obrigatório) ===== */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(728px, calc(100% - 40px));
  min-height: 90px;
  margin: 24px 0;
  padding: 0;
  text-align: center;
  overflow: hidden;
  background-color: var(--bg-surface-alt);
  border: 2px dashed var(--border-dashed);
  border-radius: 12px;
}

/* Quando o anúncio é preenchido, remove o placeholder visual (borda/fundo). */
.ad-slot.ads-loaded {
  background-color: transparent;
  border: none;
  padding: 0;
}

.ad-slot__text {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-faint);
}

/* Retangulo lateral / meio do feed: reserva 250px anti-CLS. */
.ad-slot--retangulo {
  width: 100%;
  min-height: 250px;
}

/* Mobile: banners topo/meio/rodapé mais altos para evitar CLS. */
@media (max-width: 768px) {
  .ad-slot:not(.ad-slot--retangulo) {
    min-height: 100px;
  }
}

/* Acessibilidade: label visualmente oculto do filtro de modelo. */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
/* ===== Seções (compartilhado) ===== */
.section {
  padding: 52px 0;
}

@media (min-width: 768px) {
  .section {
    padding: 72px 0;
  }
}

.section__head {
  max-width: 720px;
  margin-bottom: 32px;
}

.section__eyebrow {
  margin-bottom: 10px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent-eyebrow);
}

.section h2 {
  margin-bottom: 10px;
  font-size: clamp(1.5rem, 3.6vw, 2.1rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-heading);
}

.section__title--upper {
  text-transform: uppercase;
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  letter-spacing: 0.02em;
}

.section__lead {
  font-size: 1.03rem;
  color: var(--text-muted);
}

/* ===== O que você encontra aqui ===== */
.features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 600px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  padding: 24px 22px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border-hover);
}

.feature-card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--accent);
  background-color: var(--bg-tint);
  border-radius: 12px;
}

.feature-card__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-heading);
}

.feature-card p {
  flex: 1;
  font-size: 0.93rem;
  color: var(--text-muted);
}

.feature-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.feature-card__link::after {
  content: "→";
  transition: transform 0.18s ease;
}

.feature-card__link:hover::after {
  transform: translateX(3px);
}

/* ===== Simulador de custo por quilômetro ===== */
.sim-card {
  padding: 24px 20px;
  background-color: var(--bg-tint);
  border: 1.5px solid var(--border-tint);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .sim-card {
    padding: 36px;
  }
}

.sim-form {
  display: grid;
  gap: 16px;
}

@media (min-width: 720px) {
  .sim-form {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 20px;
  }

  .form-error,
  .sim-form__submit {
    grid-column: 1 / -1;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.field input {
  width: 100%;
  padding: 0.8rem 0.9rem;
  font-size: 1rem;
  color: var(--text-strong);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--accent-eyebrow);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.field input[aria-invalid="true"] {
  border-color: var(--danger-strong);
}

.form-error {
  padding: 10px 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--danger-text);
  background-color: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-sm);
}

.form-error[hidden] {
  display: none;
}

.sim-form__submit {
  width: 100%;
}

@media (min-width: 720px) {
  .sim-form__submit {
    width: auto;
    min-width: 220px;
    justify-self: start;
  }
}

.sim-result {
  margin-top: 24px;
  padding: 20px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

@media (min-width: 768px) {
  .sim-result {
    padding: 28px;
  }
}

.sim-result__row {
  display: grid;
  gap: 14px;
}

@media (min-width: 600px) {
  .sim-result__row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.sim-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background-color: var(--bg-subtle);
  border-radius: 12px;
}

.sim-stat__label {
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--text-muted);
}

.sim-stat__value {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--accent-strong);
}

.sim-highlight {
  margin-top: 16px;
  padding: 18px 16px;
  text-align: center;
  font-size: clamp(1.05rem, 3vw, 1.4rem);
  font-weight: 700;
  color: var(--text-heading);
  background-color: var(--bg-tint);
  border: 1px solid var(--border-tint);
  border-radius: 12px;
}

.sim-highlight strong {
  font-weight: 800;
  color: var(--link);
}

.sim-note {
  margin-top: 12px;
  text-align: center;
  font-size: 0.83rem;
  color: var(--text-faint);
}

.sim-note a {
  text-decoration: underline;
}
/* ===== Últimos relatos da comunidade ===== */
.posts__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 780px) {
  .posts__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border-hover);
}

.badge {
  align-self: flex-start;
  padding: 0.3rem 0.62rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 999px;
}

.badge--autonomia {
  color: var(--badge-autonomia-text);
  background-color: var(--badge-autonomia-bg);
}

.badge--custo {
  color: var(--badge-custo-text);
  background-color: var(--badge-custo-bg);
}

.badge--carregamento {
  color: var(--badge-carregamento-text);
  background-color: var(--badge-carregamento-bg);
}

.badge--comparativo {
  color: var(--badge-comparativo-text);
  background-color: var(--badge-comparativo-bg);
}

.badge--compra {
  color: var(--badge-autonomia-text);
  background-color: var(--badge-autonomia-bg);
}

.badge--hibrido {
  color: var(--badge-custo-text);
  background-color: var(--badge-custo-bg);
}

/* Categoria criada no banco sem tom próprio (ex.: Resenha EV, Dicas úteis) */
.badge--padrao {
  color: var(--badge-padrao-text);
  background-color: var(--badge-padrao-bg);
}

.post-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-heading);
}

.post-card__link {
  color: inherit;
  text-decoration: none;
}

.post-card__link:hover {
  text-decoration: underline;
}

/* Skeleton de carregamento da home (substituído pelos relatos reais) */
.post-card--skeleton {
  pointer-events: none;
}

.skeleton {
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--bg-subtle) 25%, var(--border-soft) 50%, var(--bg-subtle) 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}

.skeleton--badge {
  width: 110px;
  height: 22px;
  border-radius: 999px;
}

.skeleton--title {
  width: 90%;
  height: 20px;
}

.skeleton--line {
  width: 100%;
  height: 14px;
}

.skeleton--line--short {
  width: 70%;
  height: 14px;
}

.post-card--erro p {
  font-size: 0.94rem;
  color: var(--text-muted);
}

.post-card--erro a {
  text-decoration: underline;
}

@keyframes skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
  }
}

.post-card__excerpt {
  font-size: 0.94rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  font-size: 0.85rem;
  color: var(--text-faint);
  border-top: 1px solid var(--border-soft);
}

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-strong);
  background-color: var(--bg-tint-strong);
  border-radius: 50%;
}

.avatar--anon {
  color: var(--text-muted);
  background-color: var(--bg-subtle);
}

.post-card__author {
  font-weight: 600;
  color: var(--text);
}

/* Card final tracejado da grade */
.post-card--cta {
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--bg-surface-soft);
  border: 2px dashed var(--border-strong);
  box-shadow: none;
}

.post-card--cta:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--accent-mid);
  background-color: var(--bg-tint);
}

.post-card--cta p {
  font-size: 0.94rem;
  color: var(--text-muted);
  max-width: 44ch;
}

@media (min-width: 780px) {
  .post-card--cta {
    grid-column: 1 / -1;
  }
}

/* ===== Rodapé ===== */
.site-footer {
  margin-top: 8px;
  color: #d7e5de;
  background-color: var(--green-900);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  padding-block: 48px 36px;
}

@media (min-width: 700px) {
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer__grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 36px;
  }
}

.footer__title {
  margin-bottom: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--white);
}

.footer__text {
  max-width: 44ch;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #b9cfc5;
}

.footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.footer__links a {
  font-size: 0.9rem;
  color: #b9cfc5;
}

.footer__links a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer__bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer__bottom p {
  font-size: 0.83rem;
  text-align: center;
  color: #9db8ad;
}

/* =========================================================
   Página Comunidade — componentes próprios
   (reutiliza header, hero, badges, ad-slot e rodapé da home)
   ========================================================= */

/* ===== Barra de filtros ===== */
.filter-bar {
  display: grid;
  gap: 14px;
}

@media (min-width: 860px) {
  .filter-bar {
    grid-template-columns: minmax(0, 1fr) 280px 220px;
    align-items: center;
  }
}

.filter-bar__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 0.5rem 0.95rem;
  font-size: 0.87rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, box-shadow 0.18s ease;
}

.chip:hover {
  color: var(--link);
  background-color: var(--bg-tint);
  border-color: var(--accent-mid);
}

.chip[aria-pressed="true"] {
  color: var(--btn-primary-text);
  background-color: var(--btn-primary-bg);
  border-color: var(--btn-primary-bg);
  box-shadow: 0 6px 14px -8px var(--btn-primary-shadow);
}

/* Dropdown de modelo de carro (filtro dinamico DISTINCT do Supabase). */
.filter-bar__model select {
  width: 100%;
  padding: 0.6rem 0.9rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-strong);
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
}
.filter-bar__model select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--accent-mid);
}

.filter-bar__search input {
  width: 100%;
  padding: 0.8rem 0.95rem;
  font-size: 0.95rem;
  color: var(--text-strong);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.filter-bar__search input::placeholder {
  color: var(--text-placeholder);
}

.filter-bar__search input:focus {
  outline: none;
  border-color: var(--accent-eyebrow);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

@media (min-width: 900px) {
  .filter-bar {
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 20px;
  }
}

/* ===== Grade do fórum: sidebar (esq.) + tópicos e anúncio (dir.) =====
   O fórum ocupa a largura disponível e rola naturalmente na página,
   sem barras internas. A regra canônica 280px/24px está no bloco
   .forum-layout (seção COMUNIDADE — LAYOUT DE FÓRUM 2 COLUNAS). */
.community-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr);
  overflow: visible;
}

@media (min-width: 1024px) {
  .community-grid {
    align-items: start;
  }

  /* Sidebar acompanha a rolagem sem criar scroll interno. */
  .community-grid__sidebar {
    grid-column: 1;
    grid-row: 1 / span 2;
    position: sticky;
    top: calc(var(--header-h) + 16px);
    max-height: none;
    overflow: visible;
  }

  .community-grid__feed {
    grid-column: 2;
    grid-row: 1;
  }

  .community-grid__ad {
    grid-column: 2;
    grid-row: 2;
  }
}

/* No mobile a sidebar empilha abaixo da lista; o filtro por categoria
   fica disponível no hub de categorias no topo da página. */

/* ===== Lista de tópicos ultra-compacta: painel contínuo + linhas finas ===== */
.forum-topics {
  display: flex;
  flex-direction: column;
  gap: 0;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
[data-theme="dark"] .forum-topics {
  background-color: #101b16;
  border-color: rgba(255, 255, 255, 0.08);
}
/* Linha dinâmica do fórum: linha fina contínua (10px 16px, sem margem).
   Seletores prefixados com .forum-topics (0,2,0) para vencer o .relato-card genérico. */
.forum-topics .forum-row--topico,
.forum-topics .forum-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  margin-bottom: 0;
  background: transparent;
  background-color: transparent;
  border: 0;
  border-bottom: 1px solid var(--border-soft);
  border-radius: 0;
  box-shadow: none;
  transform: none;
}
[data-theme="dark"] .forum-topics .forum-row--topico,
[data-theme="dark"] .forum-topics .forum-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.forum-topics .forum-row--topico:last-child,
.forum-topics .forum-row:last-child { border-bottom: 0; margin-bottom: 0; }
.forum-topics .forum-row--topico:hover,
.forum-topics .forum-row:hover { background-color: var(--bg-surface-soft); border-color: var(--border-soft); box-shadow: none; transform: none; }
[data-theme="dark"] .forum-topics .forum-row--topico:hover,
[data-theme="dark"] .forum-topics .forum-row:hover { background: rgba(255, 255, 255, 0.03); background-color: rgba(255, 255, 255, 0.03); border-color: rgba(255, 255, 255, 0.07); }
/* Coluna ESQUERDA — conteúdo principal (ocupa o espaço livre). */
.forum-row__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
/* TOPO — título em destaque clicável (0.95rem / 600 / cor clara). */
.forum-row--topico .forum-row__titulo,
.forum-row .forum-row__titulo { margin: 0; font-size: 0.95rem; font-weight: 600; line-height: 1.35; min-width: 0; }
.forum-row--topico .forum-row__titulo a,
.forum-row .forum-row__titulo a { color: var(--text-strong); text-decoration: none; }
.forum-row--topico .forum-row__titulo a:hover,
.forum-row .forum-row__titulo a:hover { color: var(--link); text-decoration: underline; }
[data-theme="dark"] .forum-row--topico .forum-row__titulo a,
[data-theme="dark"] .forum-row .forum-row__titulo a { color: #f1f5f3; }
/* Linha do título + badges compactas lado a lado. */
.forum-row__title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-width: 0; }
/* MEIO — preview 1 linha com ellipsis (0.82rem / #94a3b8 / max 600px). */
.forum-row__resumo {
  margin: 0;
  max-width: 600px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* COLUNA DIREITA — metadados e métricas em linha única, alinhados à direita. */
.forum-row__side { flex: none; display: flex; align-items: center; gap: 8px; padding-top: 2px; font-size: 0.78rem; color: var(--text-faint); white-space: nowrap; }
.forum-row__author { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text-muted); max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.forum-row__avatar { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: none; font-size: 0.6rem; font-weight: 700; color: #fff; background: var(--green-700); border-radius: 50%; }
.forum-row__time { color: var(--text-faint); }
.forum-row__dot { opacity: 0.5; }
/* LINHA INFERIOR antiga vira fileira de tags (mantida p/ compat, mas compacta). */
.forum-row__footer { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 1px; }
.forum-row__meta-left { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.forum-row__byline { font-size: 0.78rem; color: var(--text-faint); white-space: nowrap; }
.forum-row__metrics { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.forum-row__stat { display: inline-flex; align-items: center; gap: 4px; font-size: 0.78rem; color: var(--text-muted); }
@media (max-width: 720px) {
  .forum-topics .forum-row--topico, .forum-topics .forum-row { flex-direction: column; gap: 6px; }
  .forum-row__side { padding-top: 0; }
  .forum-row__resumo { max-width: 100%; }
}
/* Badge veículo + badge categoria compactas (2px 6px / 0.7rem) semi-transparentes. */
.badge-categoria,
.tag-modelo {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  padding: 2px 6px;
  border-radius: 4px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
}
[data-theme="light"] .badge-categoria, :root .badge-categoria { color: var(--green-800); background: var(--green-50); border-color: var(--border-tint); }
[data-theme="light"] .tag-modelo, :root .tag-modelo { color: var(--text-muted); background: var(--bg-subtle); border-color: var(--border); }
.forum-topics + .forum-feed__more { margin-top: 10px; }

/* ===== Skeleton Loader da lista de tópicos (comunidade) =====
   Linhas pulsantes neutras exibidas enquanto o Supabase responde.
   Mesma anatomia da linha do fórum: título, resumo 1 linha e metadados. */
.skeleton-row {
  padding: 12px 16px;
  border-bottom: 1px solid var(--skeleton-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  user-select: none;
}
.skeleton-row:last-child {
  border-bottom: 0;
}
.skeleton-line {
  background: linear-gradient(90deg, var(--skeleton-base) 25%, var(--skeleton-shine) 50%, var(--skeleton-base) 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s infinite ease-in-out;
  border-radius: 4px;
}
.skeleton-title { height: 16px; width: 55%; }
.skeleton-excerpt { height: 12px; width: 80%; opacity: 0.7; }
.skeleton-meta { height: 10px; width: 35%; opacity: 0.5; }

@keyframes skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-line {
    animation: none;
  }
}
.feed__count {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-faint);
}

.feed {
  display: grid;
  gap: 16px;
}

.relato-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 20px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.relato-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border-hover);
}

.relato-card__title {
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-heading);
}

.relato-card__title a {
  color: inherit;
}

.relato-card__title a:hover {
  color: var(--link);
}

.relato-card__excerpt {
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* No fórum, o resumo dinâmico usa 1 linha sutil (classe aplicada pelo JS). */
.relato-card__excerpt--forum {
  font-size: 0.9rem;
  -webkit-line-clamp: 1;
}
/* Galeria de fotos do relato (miniaturas clicaveis, lazy). */
.relato-galeria {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.relato-galeria a {
  display: block;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.relato-galeria img {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: cover;
  background-color: var(--bg-subtle);
}

/* Botao Achei util (PATCH util_count, sem reload). */
.util-btn {
  padding: 0.4rem 0.8rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-strong);
  background-color: var(--bg-tint);
  border: 1.5px solid var(--border-tint);
  border-radius: 999px;
  cursor: pointer;
}
.util-btn:hover { background-color: var(--bg-tint-strong); }
.util-btn[aria-pressed="true"] {
  color: var(--btn-primary-text);
  background-color: var(--btn-primary-bg);
  border-color: var(--btn-primary-bg);
}
.util-btn:disabled { opacity: 0.7; cursor: default; }
.util-btn[data-enviando="true"] { cursor: wait; }
.util-btn + .form-error { margin-top: 8px; }


.relato-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: auto;
  padding-top: 14px;
  font-size: 0.85rem;
  color: var(--text-faint);
  border-top: 1px solid var(--border-soft);
}

.relato-card__model {
  padding: 0.24rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-strong);
  background-color: var(--bg-tint-strong);
  border-radius: 999px;
}

.relato-card__author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
}

.relato-card__stat {
  white-space: nowrap;
}

.avatar--sm {
  width: 26px;
  height: 26px;
  font-size: 0.66rem;
}

.feed__empty {
  padding: 30px 20px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
  background-color: var(--bg-subtle);
  border: 1px dashed var(--border-dashed);
  border-radius: var(--radius);
}

.feed__more {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.relato-card[hidden],
.community-grid__feed .btn[hidden] {
  display: none;
}

/* ===== Sidebar da comunidade ===== */
.sidebar {
  display: grid;
  gap: 20px;
  align-content: start;
}

.side-card {
  padding: 22px 20px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.side-card h2 {
  margin-bottom: 12px;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-heading);
}

/* Contêineres preenchidos pelo JS: lista de categorias e chips de modelo. */
.sidebar__group { display: grid; gap: 4px; }
.sidebar__tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* a) Card verde "Escreva seu relato" */
.side-card--green {
  background: linear-gradient(160deg, var(--green-600) 0%, var(--green-800) 100%);
  border-color: transparent;
  box-shadow: 0 16px 30px -20px rgba(15, 61, 42, 0.8);
}

.side-card--green h2 {
  color: var(--white);
}

.side-card--green p {
  margin-bottom: 16px;
  font-size: 0.93rem;
  line-height: 1.6;
  color: #d6ece1;
}

.btn--light {
  background-color: var(--white);
  color: var(--green-800);
}

.btn--light:hover {
  background-color: var(--green-50);
  transform: translateY(-1px);
}

/* b) Mini-ranking de modelos */
.ranking {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 15px;
}

.ranking__item {
  display: grid;
  gap: 6px;
}

.ranking__row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.ranking__pos {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-strong);
  background-color: var(--bg-tint-strong);
  border-radius: 50%;
}

.ranking__name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  color: var(--text);
}

.ranking__count {
  font-size: 0.78rem;
  color: var(--text-faint);
  white-space: nowrap;
}

.ranking__bar {
  height: 8px;
  background-color: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
}

.ranking__bar span {
  display: block;
  height: 100%;
  background: var(--gradient-accent);
  border-radius: 999px;
}

/* c) Diretrizes da comunidade */
.rules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.rules li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.rules__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  font-size: 1rem;
  background-color: var(--bg-tint);
  border: 1px solid var(--border-tint);
  border-radius: 10px;
}

.rules strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text-strong);
}

.rules p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.side-card__link {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.87rem;
  font-weight: 600;
}

/* ===== Seção inferior: "Ainda não tem um EV?" ===== */
.tools-cta {
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--border);
}

.tools-cta__grid {
  display: grid;
  gap: 18px;
}

@media (min-width: 640px) {
  .tools-cta__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  padding: 24px 22px;
  color: inherit;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tool-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border-hover);
}

.tool-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-heading);
}

.tool-card p {
  flex: 1;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.tool-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--link);
}

.tool-card__link::after {
  content: "→";
  transition: transform 0.18s ease;
}

.tool-card:hover .tool-card__link::after {
  transform: translateX(3px);
}

/* ===== Novos tons de badge (categorias da página Comunidade) ===== */
.badge--compra {
  color: var(--badge-compra-text);
  background-color: var(--badge-compra-bg);
}

.badge--hibrido {
  color: var(--badge-hibrido-text);
  background-color: var(--badge-hibrido-bg);
}


/* =========================================================
   Página Ferramentas — componentes próprios
   (reutiliza header, hero, ad-slot, sim-card e rodapé)
   ========================================================= */

/* ===== Campo select (mesmo visual do input) ===== */
.field select {
  width: 100%;
  padding: 0.8rem 2.3rem 0.8rem 0.9rem;
  font-size: 1rem;
  color: var(--text-strong);
  background-color: var(--bg-surface);
  background-image: var(--select-arrow-img);
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 15px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field select:focus {
  outline: none;
  border-color: var(--accent-eyebrow);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

/* ===== Grade de ferramentas (1 col · 2 · 3 por linha no desktop) ===== */
.tools {
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 640px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== Card de ferramenta ===== */
.tool-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 20px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tool-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border-hover);
}

.tool-tile__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tool-tile h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-heading);
}

.tool-tile__desc {
  flex: 1;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* ===== Badges de status ===== */
.status-badge {
  padding: 0.3rem 0.62rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  border-radius: 999px;
}

.status-badge--ok {
  color: var(--accent);
  background-color: var(--bg-tint-strong);
  border: 1px solid var(--border-tint);
}

.status-badge--soon {
  color: var(--text-muted);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-strong);
}

/* ===== Cards "Em breve" ===== */
.tool-tile--soon {
  background-color: var(--bg-surface-alt);
}

.tool-tile--soon:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
  border-color: var(--border);
}

.tool-tile--soon .feature-card__icon {
  color: var(--text-faint);
  background-color: var(--bg-subtle);
}

.tool-tile--soon h3 {
  color: var(--text);
}

.tool-tile__soon-note {
  margin-top: auto;
  padding: 10px 12px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-faint);
  background-color: var(--bg-subtle);
  border: 1px dashed var(--border-dashed);
  border-radius: 10px;
}

/* ===== Mini-formulários dentro do card ===== */
.tool-form {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

.tool-form .field label {
  font-size: 0.85rem;
}

/* ===== Área de resultado dos mini-formulários ===== */
.tool-result {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
  padding: 14px 16px;
  text-align: center;
  background-color: var(--bg-tint);
  border: 1px solid var(--border-tint);
  border-radius: 12px;
}

.tool-result__label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent-eyebrow);
}

.tool-result__value {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--accent-strong);
}

.tool-result__hint {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-faint);
}

/* ===== Seção "Os dados vêm de onde?" ===== */
.source-card {
  display: grid;
  gap: 24px;
  padding: 28px 22px;
  background: linear-gradient(160deg, var(--bg-tint) 0%, var(--bg-surface) 75%);
  border: 1.5px solid var(--border-tint);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.source-card h2 {
  margin-bottom: 12px;
  font-size: clamp(1.4rem, 3.2vw, 1.9rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-heading);
}

.source-card__text p {
  max-width: 70ch;
  font-size: 0.98rem;
  color: var(--text-muted);
}

.source-card__text p + p {
  margin-top: 12px;
}

.source-card__text a {
  font-weight: 600;
  text-decoration: underline;
}

.source-card__action {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  text-align: center;
}

.source-card__link {
  font-size: 0.9rem;
  font-weight: 600;
}

@media (min-width: 860px) {
  .source-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 40px;
    padding: 36px;
  }

  .source-card__action {
    min-width: 250px;
  }
}

/* ===== Perguntas frequentes (FAQ) — SEO / schema FAQPage =====
   Só variáveis semânticas: herda tema claro/escuro automaticamente. */
.faq__list {
  display: grid;
  gap: 12px;
}

.faq-item {
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.faq-item:hover {
  border-color: var(--border-hover);
}

.faq-item[open] {
  background-color: var(--bg-tint);
  border-color: var(--border-tint);
}

.faq-item__pergunta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-heading);
}

.faq-item__pergunta::-webkit-details-marker {
  display: none;
}

.faq-item__pergunta::marker {
  content: "";
}

.faq-item__pergunta:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -3px;
  border-radius: var(--radius-sm);
}

.faq-item__pergunta::after {
  content: "+";
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1;
  color: var(--accent-strong);
  background-color: var(--bg-tint-strong);
  border: 1px solid var(--border-tint);
  border-radius: 50%;
  transition: transform 0.18s ease;
}

.faq-item[open] .faq-item__pergunta::after {
  transform: rotate(45deg); /* "+" vira "×" */
}

.faq-item__resposta {
  padding: 0 18px 18px;
  font-size: 0.97rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.faq-item__resposta p {
  max-width: 70ch;
}

.faq-item__resposta a {
  font-weight: 600;
  color: var(--link);
  text-decoration: underline;
}

@media (min-width: 860px) {
  .faq-item__pergunta {
    padding: 18px 22px;
    font-size: 1.05rem;
  }

  .faq-item__resposta {
    padding: 0 22px 20px;
  }
}


/* =========================================================
   TEMA ESCURO — "Recarga Noturna"
   Só redeclara as variáveis semânticas definidas em :root.
   Nenhum componente é reescrito: qualquer tela que use
   var(--...) já nasce compatível com este tema.
   ========================================================= */
[data-theme="dark"] {
  color-scheme: dark;

  /* Superfícies — asfalto noturno / verde-petróleo (não é preto puro) */
  --bg-page: #0a1210;
  --bg-surface: #131e1a;
  --bg-surface-alt: #101b17;
  --bg-surface-soft: #0f1916;
  --bg-subtle: #0e1815;
  --bg-tint: #0f211b;
  --bg-tint-strong: #14352a;
  --bg-header: rgba(10, 18, 16, 0.92);
  --bg-nav: #0f1a17;

  /* Texto */
  --text-heading: #eef6f1;
  --text-strong: #e8edeb;
  --text: #c3ccc7;
  --text-muted: #a2ada7;
  --text-faint: #8b968f;
  --text-placeholder: #6e7a74;

  /* Bordas */
  --border-soft: #1b2723;
  --border: #233029;
  --border-strong: #2f3e37;
  --border-dashed: #2f3e37;
  --border-tint: #1e4a38;
  --border-hover: #2e7d5b;

  /* Skeleton Loader (comunidade) — base escura / brilho */
  --skeleton-base: rgba(255, 255, 255, 0.04);
  --skeleton-shine: rgba(255, 255, 255, 0.1);
  --skeleton-border: rgba(255, 255, 255, 0.07);

  /* Verde elétrico neon (contraste alto no escuro) */
  --link: #4ade80;
  --accent: #34d17b;
  --accent-mid: #34d17b;
  --accent-strong: #6ee7b7;
  --accent-eyebrow: #4ade80;

  /* Botões — botão primário neon com texto escuro (brilho de recarga) */
  --btn-primary-bg: #34d17b;
  --btn-primary-bg-hover: #4ade80;
  --btn-primary-text: #06281c;
  --btn-primary-shadow: rgba(52, 209, 123, 0.35);
  --btn-outline-bg: #131e1a;
  --btn-outline-text: #4ade80;
  --btn-outline-border: #2e9368;
  --btn-outline-bg-hover: #0f211b;

  /* Foco e sombras */
  --focus: rgba(52, 209, 123, 0.55);
  --focus-ring: rgba(52, 209, 123, 0.22);
  --shadow-header: 0 10px 24px -16px rgba(0, 0, 0, 0.85);
  --shadow-panel: 0 18px 30px -20px rgba(0, 0, 0, 0.9);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.45), 0 12px 26px -10px rgba(0, 0, 0, 0.65);

  /* Erro em formulários */
  --danger-text: #ff9d94;
  --danger-bg: #2a1416;
  --danger-border: #5c2326;
  --danger-strong: #f87171;

  /* Badges de categoria — mesma identidade cromática, legível no escuro */
  --badge-autonomia-text: #6ee7b7;
  --badge-autonomia-bg: #0d2b21;
  --badge-custo-text: #fbbf6e;
  --badge-custo-bg: #2b1f0d;
  --badge-carregamento-text: #7cc7f5;
  --badge-carregamento-bg: #0d2437;
  --badge-comparativo-text: #c4a9fa;
  --badge-comparativo-bg: #201538;
  --badge-compra-text: #6fd7de;
  --badge-compra-bg: #0b2a2d;
  --badge-hibrido-text: #ff9e7a;
  --badge-hibrido-bg: #2e1610;
  --badge-padrao-text: #cbd5e1;
  --badge-padrao-bg: #1d2733;

  /* Extras */
  --gradient-accent: linear-gradient(90deg, #34d17b, #4ade80);
  --select-arrow-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a2ada7' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* Exclusivos do tema escuro (só no escuro, sem afetar o claro) */
[data-theme="dark"] .hero {
  background:
    radial-gradient(900px 380px at 75% -10%, rgba(52, 209, 123, 0.14), transparent 65%),
    linear-gradient(180deg, var(--bg-tint) 0%, var(--bg-page) 78%);
}

[data-theme="dark"] .logo__mark svg {
  filter: drop-shadow(0 0 6px rgba(52, 209, 123, 0.45));
}

/* =========================================================
   Botão de tema (topo do header) — claro ↔ escuro
   ========================================================= */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1;
  color: var(--text);
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease,
    transform 0.18s ease, box-shadow 0.18s ease;
}

.theme-toggle:hover {
  color: var(--link);
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}

/* Ícone emoji (🌙/☀️ — o texto é alternado pelo script.js conforme o tema) */
.theme-toggle__icon {
  flex: none;
  font-size: 1rem;
  line-height: 1;
}

[data-theme="dark"] .theme-toggle {
  border-color: var(--border-tint);
  box-shadow: 0 0 16px -8px rgba(52, 209, 123, 0.7);
}

/* No mobile o espaço é curto: só ícone (o nome fica no aria-label) */
@media (max-width: 479px) {
  .theme-toggle {
    width: 44px;
    padding: 0;
  }

  .theme-toggle__label {
    display: none;
  }
}

/* Empurra tema + hambúrguer para a direita no header mobile */
@media (max-width: 899px) {
  .theme-toggle {
    margin-left: auto;
  }
}

/* =========================================================
   Modal "Enviar Post" — mobile first, acessível (ESC/foco)
   Identidade: verde-escuro #1a5c3f, fundo claro, cantos arredondados
   ========================================================= */
body.modal-open { overflow: hidden; }

.modal[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: end center;
  padding: 0;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 25, 19, 0.62);
}

.modal__dialog {
  position: relative;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--bg-surface);
  border-radius: 20px 20px 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  box-shadow: var(--shadow-panel);
  padding: 22px 20px 26px;
}

.modal__head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal__eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-eyebrow);
  margin-bottom: 6px;
}

.modal__head h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-heading);
}

.modal__subtitle {
  margin-top: 6px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.modal__close {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-strong);
  font-size: 1rem;
  cursor: pointer;
}

.modal__close:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.modal__form { display: grid; gap: 14px; }
.modal__grid { display: grid; gap: 14px; }

.modal__form .field select,
.modal__form .field textarea,
.modal__form .field input {
  width: 100%;
  padding: 0.8rem 0.9rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-strong);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.modal__form .field select {
  appearance: none;
  padding-right: 2.4rem;
  background-image: var(--select-arrow-img, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b655f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"));
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 1rem;
}

.modal__form .field textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.6;
}

.modal__form .field select:focus,
.modal__form .field textarea:focus,
.modal__form .field input:focus {
  outline: none;
  border-color: var(--accent-eyebrow);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.modal__form [aria-invalid="true"] { border-color: var(--danger-strong); }

.field__hint {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.field__count {
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--text-faint);
  white-space: nowrap;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-tint);
  border: 1px solid var(--border-tint);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.check input {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 2px;
  accent-color: var(--green-700);
}

.sucesso-card {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--green-50);
  border: 1.5px solid var(--green-700);
  color: var(--green-900);
}

.sucesso-card[hidden] { display: none; }

.sucesso-card__titulo {
  font-weight: 800;
  margin-bottom: 4px;
}

.modal__actions {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.modal__actions .btn:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

@media (min-width: 640px) {
  .modal { place-items: center; padding: 24px; }
  .modal__dialog {
    max-width: 640px;
    max-height: 88vh;
    border-radius: var(--radius-lg);
    border-bottom: 1px solid var(--border);
    padding: 28px;
  }
  .modal__grid { grid-template-columns: 1fr 1fr; }
  .modal__actions {
    grid-template-columns: auto 1fr;
    justify-content: end;
  }
  .modal__actions .btn--primary { min-width: 240px; }
}

[data-theme="dark"] .sucesso-card {
  background: #0f211b;
  border-color: #2e9368;
  color: #d6f3e4;
}

[data-theme="dark"] .check input { accent-color: #34d17b; }

/* =========================================================
   Página Enviar Relato — card central, upload, preview
   Mobile first · identidade #1a5c3f · cantos arredondados
   ========================================================= */
.relato-hero {
  padding-top: 8px;
  padding-bottom: 0;
}
.relato-hero__inner { text-align: center; max-width: 640px; margin: 0 auto; }
.relato-hero__inner .eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 0.35rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--link);
  background-color: var(--bg-tint-strong);
  border-radius: 999px;
}
.relato-hero__inner .lead {
  margin-top: 12px;
  font-size: clamp(1rem, 2.2vw, 1.1rem);
  line-height: 1.6;
  color: var(--text-muted);
}
.relato-hero__inner h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-heading);
}
.relato-section { padding-top: 16px; }
.relato-wrap { max-width: 960px; margin: 0 auto; }
/* Painel dev flutuante — carga FIPE (só enviar-relato) */
.painel-dev {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 120;
  max-width: min(360px, calc(100vw - 32px));
}
.painel-dev__box {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}
.painel-dev__toggle {
  cursor: pointer;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-heading);
  list-style: none;
}
.painel-dev__toggle::-webkit-details-marker { display: none; }
.painel-dev__body {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}
.painel-dev__desc { font-size: 0.82rem; color: var(--text-muted); }
.painel-dev__desc code { font-size: 0.78rem; }
.painel-dev__btn { width: 100%; min-height: 44px; font-size: 0.88rem; }
.painel-dev__status { font-size: 0.82rem; color: var(--text-muted); }
.painel-dev__preview {
  max-height: 220px;
  overflow: auto;
  display: grid;
  gap: 6px;
  padding: 10px;
  font-size: 0.78rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.painel-dev__preview h4 { margin: 4px 0 2px; font-size: 0.8rem; color: var(--text-heading); }
.painel-dev__preview ul { margin: 0 0 6px 18px; padding: 0; color: var(--text); }
.painel-dev__preview li { margin-bottom: 2px; }
.relato-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
  padding: 22px 18px;
}
/* Formulário integrado à página: sem borda, sombra ou fundo de card isolado */
.relato-card--form {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 4px 0 0;
}
/* Sem efeito de hover/elevação (mantém o bloco estático) */
.relato-card--form:hover {
  transform: none;
  box-shadow: none;
  border-color: transparent;
}
/* Botões do formulário: sem "lift" no hover (só troca de cor) */
.relato-card--form .btn:hover,
.relato-card--form .btn:active {
  transform: none;
}
/* Anti-vazamento horizontal: grid não estoura com textos longos dos selects */
.relato-card--form,
.relato-card--form form,
.relato-card--form .field {
  min-width: 0;
  max-width: 100%;
}
.relato-card--form input,
.relato-card--form select,
.relato-card--form textarea {
  max-width: 100%;
  min-width: 0;
}
/* Combobox pesquisável (busca dentro do próprio select) */
.combo { position: relative; min-width: 0; }
.combo__native {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}
.combo__box { position: relative; }
.combo__input { padding-right: 40px; cursor: text; }
.combo__toggle {
  position: absolute; right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  border: 0; background: transparent;
  color: var(--text-faint); font-size: 0.9rem;
  cursor: pointer; border-radius: 8px;
}
.combo__toggle:hover { color: var(--text-heading); background: var(--bg-subtle); }
.combo--disabled .combo__input { opacity: 0.55; cursor: not-allowed; }
.combo--disabled .combo__toggle { opacity: 0.4; pointer-events: none; }
.combo__list {
  position: absolute; z-index: 60;
  left: 0; right: 0; top: calc(100% + 6px);
  margin: 0; padding: 6px; list-style: none;
  max-height: 240px; overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-panel);
}
.combo__item {
  padding: 9px 10px; border-radius: 8px;
  font-size: 0.92rem; color: var(--text-strong);
  cursor: pointer; line-height: 1.35;
}
.combo__item:hover, .combo__item--ativo { background: var(--bg-tint); }
.combo__item--sel { font-weight: 700; color: var(--link); }
.combo__empty { padding: 10px; font-size: 0.85rem; color: var(--text-faint); }
/* Toolbar do Quill: quebra em linhas, sem barra de rolagem */
.relato-card--form .ql-toolbar.ql-snow {
  max-width: 100%;
  overflow: visible;
  white-space: normal;
}
.relato-card--form .ql-toolbar.ql-snow .ql-formats {
  margin-right: 10px;
  margin-bottom: 4px;
  vertical-align: middle;
}
.relato-card--form .ql-snow .ql-picker-options {
  max-width: calc(100vw - 48px);
}
.relato-card h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-heading);
}
.relato-card__hint { margin: 6px 0 18px; font-size: 0.92rem; color: var(--text-muted); }
.relato-card form { display: grid; gap: 16px; }
.form-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) {
  .form-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.relato-card .field input,
.relato-card .field select,
.relato-card .field textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-strong);
  background: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
.relato-card .field textarea { min-height: 180px; resize: vertical; line-height: 1.6; }
.relato-card .field input:focus,
.relato-card .field select:focus,
.relato-card .field textarea:focus {
  outline: none;
  border-color: var(--accent-eyebrow);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.relato-card [aria-invalid="true"] { border-color: var(--danger-strong); }
.field__opt { font-weight: 500; font-size: 0.82rem; color: var(--text-faint); }
.upload-box {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 88px;
  padding: 16px;
  border: 2px dashed var(--border-tint);
  border-radius: var(--radius);
  background: var(--bg-tint);
  cursor: pointer;
}
.upload-box__icon { font-size: 1.8rem; }
.upload-box__text { display: grid; gap: 2px; font-size: 0.95rem; color: var(--text-strong); }
.upload-box__text small { font-size: 0.82rem; color: var(--text-faint); }
/* Especificidade acima de ".relato-card .field input { width:100%; ... }":
   sem isso o input oculto vira 100% do viewport e cria barra de rolagem
   horizontal na página (position: absolute sem containing block posicionado). */
.relato-card .field input.upload-input,
.upload-input {
  position: absolute;
  width: 1px; height: 1px;
  min-height: 0;
  padding: 0;
  border: none;
  opacity: 0; overflow: hidden;
}
.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.preview-grid:empty { display: none; }
.preview-item {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-subtle);
}
.preview-item img { width: 100%; height: 96px; object-fit: cover; display: block; }
.preview-item figcaption { font-size: 0.72rem; text-align: center; padding: 4px; color: var(--text-faint); }
.preview-remove {
  position: absolute;
  top: 6px; right: 6px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(10, 25, 19, 0.8);
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
}
.btn--lg { min-height: 56px; font-size: 1.05rem; }
.relato-sucesso { text-align: center; padding: 12px 4px; }
.relato-sucesso[hidden] { display: none; }
.relato-sucesso__emoji { font-size: 3rem; }
.relato-sucesso h3 { font-size: 1.4rem; color: var(--text-heading); margin: 8px 0; }
.relato-sucesso p { color: var(--text-muted); max-width: 52ch; margin: 0 auto 18px; }
.relato-sucesso__actions { display: grid; gap: 10px; }
@media (min-width: 640px) {
  .relato-card { padding: 32px; }
  .relato-card--form { padding: 8px 0 0; }
  .form-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .relato-sucesso__actions { grid-template-columns: 1fr 1fr; }
  .preview-item img { height: 120px; }
}
[data-theme="dark"] .upload-box { background: #0f211b; }

/* ===== Conteúdo rico dos relatos (Quill + DOMPurify) ===== */
.relato-conteudo img { max-width: 100%; height: auto; border-radius: 8px; margin: 12px 0; }
.relato-conteudo h1, .relato-conteudo h2, .relato-conteudo h3 { color: var(--text-heading); line-height: 1.3; margin: 16px 0 8px; }
.relato-conteudo p { margin: 0 0 12px; line-height: 1.65; }
.relato-conteudo ul, .relato-conteudo ol { margin: 0 0 12px 20px; line-height: 1.6; }
.relato-conteudo a { color: var(--link); font-weight: 600; }
/* Vídeos do YouTube embutidos pelo Quill — responsivos 16:9 */
.relato-conteudo iframe:not(.video-yt__frame),
#editor-container iframe,
.relato-conteudo .ql-video {
  width: 100% !important;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto !important;
  border: 0;
  border-radius: 12px;
  margin: 16px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ===== Editor Quill no formulário ===== */
#editor-container {
  min-height: 220px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-strong);
  background: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
#editor-container .ql-editor { min-height: 220px; line-height: 1.6; }
#editor-container .ql-editor.ql-blank::before { color: var(--text-placeholder); font-style: normal; }
.relato-card .ql-toolbar.ql-snow {
  border: 1.5px solid var(--border-strong);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--bg-surface-soft);
}
.relato-card .ql-toolbar.ql-snow .ql-picker-label,
.relato-card .ql-toolbar.ql-snow button { color: var(--text-muted); }
.relato-card .ql-toolbar.ql-snow button:hover { color: var(--accent-strong); }
#editor-container[aria-invalid="true"] { border-color: var(--danger-strong); }

/* Transição suave na troca de tema (desligada em prefers-reduced-motion) */
:where(*) {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}


/* =========================================================
   COMUNIDADE — CARROSSEL DE DESTAQUES
   ========================================================= */
.destaques { padding-top: 24px; }
.carrossel__controles { display: flex; gap: 8px; }
.carrossel__btn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem; line-height: 1;
  color: var(--accent);
  background: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  border-radius: 50%;
  cursor: pointer;
}
.carrossel__btn:hover { background: var(--bg-tint); border-color: var(--accent); }
.carrossel { overflow: hidden; border-radius: var(--radius-lg); margin-top: 8px; }
.carrossel__trilho { display: flex; transition: transform 0.45s ease; will-change: transform; }
.destaque-card {
  flex: 0 0 100%;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 26px 24px;
  background: linear-gradient(135deg, var(--bg-tint) 0%, var(--bg-surface) 70%);
  border: 1.5px solid var(--border-tint);
  border-radius: var(--radius-lg);
}
.destaque-card__titulo { margin: 0; font-size: clamp(1.15rem, 2.6vw, 1.5rem); line-height: 1.3; }
.destaque-card__titulo a { color: var(--text-heading); text-decoration: none; }
.destaque-card__titulo a:hover { color: var(--accent); text-decoration: underline; }
.destaque-card__previa {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@supports not (-webkit-line-clamp: 3) {
  .destaque-card__previa { max-height: 4.4em; overflow: hidden; }
}
.destaque-card__meta { margin: 0; font-size: 0.9rem; color: var(--text-muted); }
.carrossel__dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.carrossel__dot {
  width: 10px; height: 10px;
  padding: 0;
  background: var(--border-strong);
  border: none; border-radius: 50%;
  cursor: pointer;
}
.carrossel__dot.is-ativo { background: var(--accent); transform: scale(1.25); }
@media (prefers-reduced-motion: reduce) { .carrossel__trilho { transition: none; } }

/* =========================================================
   COMUNIDADE — HUB DE CATEGORIAS (lista compacta clicavel)
   ========================================================= */
/* Wrapper da lista: painel unico, limpo e compacto — escala bem com muitas categorias */
.cat-list__wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
/* =========================================================
   COMUNIDADE — LISTA DE TOPICOS (formato forum)
   ========================================================= */
.forum__head-top { margin-bottom: 6px; }
.forum__colunas {
  display: none;
  padding: 10px 18px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.filter-bar--secundaria { margin-bottom: 16px; }
@media (min-width: 768px) {
  .forum__colunas {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px 130px 90px;
    gap: 14px;
  }
}
.relato-card--forum {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}
.relato-card--forum:first-child { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.relato-card--forum:last-child { border-radius: 0 0 var(--radius-sm) var(--radius-sm); border-bottom: none; }
.relato-card--forum:hover { transform: none; box-shadow: none; background: var(--bg-tint); }
.relato-card__title { margin: 0; font-size: 1.05rem; line-height: 1.4; }
.relato-card__title a { color: var(--text-heading); text-decoration: none; }
.relato-card__title a:hover { color: var(--accent); text-decoration: underline; }
.relato-card__excerpt { margin: 0; font-size: 0.9rem; color: var(--text-muted); }
.relato-card__meta--forum {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--text-faint);
}
.relato-card__stat strong { color: var(--text-strong); }
@media (min-width: 768px) {
  .relato-card--forum {
    display: grid;
    grid-template-columns: 1fr 110px 90px;
    gap: 14px;
    align-items: start;
  }
  .relato-card--forum .relato-card__meta--forum { grid-column: 1 / -1; }
}

/* ===== Fallback de vídeo do YouTube no portal (iframe → thumbnail click-to-play) ===== */
.video-yt {
  position: relative;
  display: block;
  aspect-ratio: 16/9;
  background: #0f0f0f;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);

  .video-yt__link {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    background: #0f0f0f;

    .video-yt__thumb {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      border-radius: 12px;
    }

    .video-yt__play {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-size: 2rem;
      cursor: pointer;
      background: rgba(0,0,0,0.45);
      opacity: 1;
      transition: opacity 0.2s ease;
      border-radius: 12px;

      :hover {
        background: rgba(0,0,0,0.6);
      }
    }
  }

  /* Player injetado pelo click-to-play: preenche o container 16:9 */
  .video-yt__frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
    background: #0f0f0f;
  }
}

@media (max-width: 767px) {
  .video-yt__play {
    font-size: 1.4rem;
  }
}
/* =========================================================
   PÁGINA RELATO (relato.html) — breadcrumbs, leitura, respostas
   ========================================================= */
.breadcrumbs {
  padding: 10px 0 4px;
  font-size: 0.85rem;
  color: var(--text-faint);
  overflow-wrap: anywhere;
}
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--text-strong); font-weight: 600; }

/* Título do relato mais próximo do cabeçalho fixo — mais tela para o conteúdo */
#conteudo.pagina-relato { padding-top: calc(var(--header-h) + 4px); }
.relato-leitura { padding-top: 0; }
.relato-leitura__grid { display: grid; gap: 28px; }
@media (min-width: 1024px) {
  /* Coluna de leitura ampla + sidebar fixa (área de comentários acompanha o card) */
  .relato-leitura__grid { max-width: 1240px; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .relato-sidebar { position: sticky; top: calc(var(--header-h) + 16px); }
}
@media (max-width: 640px) {
  /* Mobile: menos margem lateral = mais largura útil para ler */
  .relato-leitura__grid { padding-inline: 14px; }
}
.relato-artigo {
  min-width: 0;
  width: 100%;
  padding: 22px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
@media (min-width: 640px) { .relato-artigo { padding: 32px; } }
.relato-artigo h1 {
  margin: 6px 0 8px;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-heading);
}
.relato-artigo__modelo { margin: 0 0 10px; font-weight: 600; color: var(--text-strong); }
.relato-artigo__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 10px 0;
  font-size: 0.87rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.relato-artigo__autor { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text-strong); }
.relato-artigo__corpo { margin-top: 18px; font-size: 1.02rem; line-height: 1.7; color: var(--text); }
.relato-galeria {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.relato-galeria a { display: block; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.relato-galeria img { width: 100%; height: 160px; object-fit: cover; display: block; }

/* Respostas e discussão */
.comentarios { margin-top: 28px; padding-top: 22px; border-top: 2px solid var(--border); }
.comentarios h2 { font-size: 1.3rem; font-weight: 800; color: var(--text-heading); }
.comentarios__lista { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.comentario {
  padding: 14px 16px;
  background: var(--bg-surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.comentario--resposta { background: var(--bg-surface); border-left: 3px solid var(--accent); }
.comentario__cab { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; }
.comentario__cab strong { color: var(--text-strong); }
.comentario__cab time { color: var(--text-faint); font-size: 0.8rem; margin-left: auto; }
.comentario__nota { font-size: 0.78rem; font-weight: 500; color: var(--text-muted); }
.comentario__nota strong { color: var(--text-strong); font-weight: 700; }
.comentario__texto { margin: 8px 0 0; font-size: 0.95rem; line-height: 1.6; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.comentario__responder {
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--accent-eyebrow);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.comentario__responder:hover { border-color: var(--accent); background: var(--bg-tint); }
.comentario__responder[aria-expanded="true"] { color: #fff; background: var(--accent-eyebrow); border-color: var(--accent-eyebrow); }
.comentario__responder:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.comentario__respostas {
  list-style: none;
  margin: 12px 0 0;
  padding: 0 0 0 12px;
  display: grid;
  gap: 10px;
  border-left: 2px solid var(--border);
}
.comentario__form-resposta {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  background: var(--bg-tint);
  border: 1px solid var(--border-tint);
  border-radius: var(--radius-sm);
}
.comentario__form-titulo { margin: 0; font-size: 0.9rem; color: var(--text-strong); }
.comentario__form-resposta .field { display: grid; gap: 6px; }
.comentario__form-resposta label { font-size: 0.85rem; font-weight: 600; color: var(--text-strong); }
.comentario__form-resposta .form__error { margin: 0; }
.comentario__form-acoes { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.comentario__cancelar {
  padding: 0.6rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-strong);
  background: transparent;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.comentario__cancelar:hover { background: var(--bg-surface-soft); }
.comentario__form-resposta textarea { min-height: 90px; }
.comentarios__form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  padding: 20px 18px;
  background: var(--bg-tint);
  border: 1.5px solid var(--border-tint);
  border-radius: var(--radius);
}
.comentarios__form h3 { margin: 0; font-size: 1.1rem; color: var(--text-heading); }
.comentarios__form .field { display: grid; gap: 6px; }
.comentarios__form label { font-size: 0.87rem; font-weight: 600; color: var(--text-strong); }
.comentarios__form input,
.comentarios__form textarea,
.comentario__form-resposta input,
.comentario__form-resposta textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-strong);
  background: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
.comentarios__form input:focus,
.comentarios__form textarea:focus,
.comentario__form-resposta input:focus,
.comentario__form-resposta textarea:focus {
  outline: none;
  border-color: var(--accent-eyebrow);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.comentarios__form [aria-invalid="true"],
.comentario__form-resposta [aria-invalid="true"] { border-color: var(--danger-strong); }
.comentarios__form textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.comentario__form-resposta textarea { resize: vertical; line-height: 1.6; }
@media (max-width: 640px) {
  .comentario__cab { flex-wrap: wrap; }
}
.form__hint { margin: 0; font-size: 0.85rem; color: var(--text-muted); }
/* Erros com classe form__error (relato.html / relato.js) — caixa vermelha de alerta */
.form__error {
  margin: 0;
  padding: 10px 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--danger-text);
  background-color: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-sm);
}
.form__error[hidden] { display: none; }
.util-btn + .form__error { margin-top: 8px; }
.form__ok {
  margin: 0;
  padding: 10px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green-900);
  background: var(--green-50);
  border: 1px solid var(--border-tint);
  border-radius: var(--radius-sm);
}
.relato-sidebar .card { display: grid; gap: 14px; padding: 20px; }
.relato-sidebar h2 { margin: 0; font-size: 1.1rem; color: var(--text-heading); }
.sidebar__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sidebar__links a {
  display: block;
  padding: 9px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-strong);
  text-decoration: none;
  background: var(--bg-surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.sidebar__links a:hover { border-color: var(--accent); color: var(--accent); background: var(--bg-tint); }

/* =========================================================
   COMUNIDADE — LAYOUT DE FÓRUM 2 COLUNAS (sidebar + tabela)
   ========================================================= */
.forum-hero { padding: 6px 0 0; text-align: center; }
.forum-hero .container { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0; }
.forum-hero h1 { margin: 0 0 2px; font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.2; }
.forum-hero .section__eyebrow { margin: 0; font-size: 0.72rem; }
.forum-hero .section__lead { margin: 2px 0 0; font-size: 0.85rem; }
.forum-secao { padding-top: 0; margin-top: 0; }
.forum-secao .container--forum { padding-top: 0; }
.forum-layout {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
}

/* Fórum amplo: ocupa a largura disponível, página rola naturalmente. */
.container--forum { max-width: 1280px; }
.forum-container { min-width: 0; }

/* Desktop: grid 260px + conteúdo amplo com fluidez total. */
@media (min-width: 1024px) {
  .forum-layout {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }
  .forum-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 16px);
  }
  .forum-layout .forum-chips { display: none; }
}
/* Mobile first: sidebar oculta, filtros viram carrossel horizontal no topo. */
@media (max-width: 1023px) {
  .forum-layout .forum-sidebar { display: none; }
}

/* Desktop (>= 1000px): sidebar fixa de 272px + painel flexível; chips mobile saem. */

.forum-sidebar {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 16px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.side-block { min-width: 0; }
.side-block__titulo {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}
.side-list { display: grid; gap: 4px; }

/* Item vertical de categoria: ícone + nome + contador. */
.side-cat {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.side-cat__icone { font-size: 0.85rem; text-align: center; flex-shrink: 0; }
.side-cat__nome {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
/* Nome longo quebra em 2 linhas em vez de cortar com "..." */
@supports (display: grid) {
  .forum-sidebar .side-cat__nome {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}
.side-cat__count {
  min-width: 24px;
  padding: 1px 7px;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-faint);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.side-cat:hover { background: var(--bg-subtle); color: var(--text-strong); }
.side-cat:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
/* Item selecionado: verde suave (.active/.is-ativa), filtro em tempo real sem reload. */
.side-cat.active,
.side-cat.is-ativa,
.side-cat[aria-pressed="true"] {
  color: var(--green-900);
  background: var(--green-50);
  border-color: var(--border-tint);
}
.side-cat.active .side-cat__count,
.side-cat.is-ativa .side-cat__count,
.side-cat[aria-pressed="true"] .side-cat__count {
  color: var(--green-800);
  background: var(--white);
  border-color: var(--border-tint);
}
/* Highlight verde do item ativo (verde-escuro #1a5c3f no tema claro). */
.side-cat.is-ativa {
  color: var(--btn-primary-text);
  background: var(--btn-primary-bg);
  border-color: var(--btn-primary-bg);
  box-shadow: 0 6px 14px -8px var(--btn-primary-shadow);
}
.side-cat.is-ativa .side-cat__count {
  color: inherit;
  background: rgba(0, 0, 0, 0.14);
  border-color: transparent;
}

/* Chips de modelo (etiquetas) na sidebar e no carrossel mobile. */
.side-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.side-chips__vazio { margin: 0; font-size: 0.78rem; color: var(--text-faint); }
.side-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-width: 0;
  padding: 0.28rem 0.6rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.side-chip__label,
.side-chip__nome {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-chip__count { font-size: 0.68rem; font-weight: 700; color: var(--text-faint); flex-shrink: 0; }
.side-chip:hover { color: var(--link); background: var(--bg-tint); border-color: var(--accent-mid); }
.side-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.side-chip[aria-pressed="true"] {
  color: var(--btn-primary-text);
  background: var(--btn-primary-bg);
  border-color: var(--btn-primary-bg);
}
.side-chip[aria-pressed="true"] .side-chip__count { color: inherit; opacity: 0.8; }

/* --- Barra superior compacta e unificada do fórum --- */
.forum-header-bar {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.forum-header-bar__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.forum-crumbs { margin: 0; font-size: 0.8rem; color: var(--text-faint); }
.forum-crumbs a { color: inherit; text-decoration: none; }
.forum-crumbs a:hover { color: var(--accent); text-decoration: underline; }
.forum-count { margin: 0; font-size: 0.78rem; color: var(--text-faint); white-space: nowrap; }
.forum-header-bar__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.select-modelo-compacto {
  flex: 0 1 210px;
  min-width: 150px;
  padding: 0.45rem 2rem 0.45rem 0.7rem;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-strong);
  background-color: var(--bg-surface);
  background-image: var(--select-arrow-img);
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 13px;
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  appearance: none;
  cursor: pointer;
}
.select-modelo-compacto:focus { outline: none; border-color: var(--accent-eyebrow); box-shadow: 0 0 0 3px var(--focus-ring); }
.forum-header-bar .forum-tabs { flex: 1 1 auto; display: flex; flex-wrap: nowrap; gap: 4px; padding: 2px; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 999px; }
.forum-header-bar .forum-tab { flex: 1 1 auto; padding: 0.38rem 0.7rem; font-size: 0.8rem; border: 0; border-radius: 999px; background: transparent; white-space: nowrap; box-shadow: none; }
.forum-header-bar .forum-search { flex: 1 1 190px; min-width: 150px; }
.forum-header-bar .forum-search input {
  width: 100%;
  padding: 0.45rem 0.8rem;
  font: inherit;
  font-size: 0.84rem;
  color: var(--text-strong);
  background: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
}
.forum-header-bar .forum-search input:focus { outline: none; border-color: var(--accent-eyebrow); box-shadow: 0 0 0 3px var(--focus-ring); }
.forum-header-bar .btn--sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
@media (max-width: 640px) {
  .forum-header-bar__controls { display: grid; grid-template-columns: 1fr 1fr; }
  .forum-header-bar .forum-tabs { grid-column: 1 / -1; order: 3; overflow-x: auto; }
  .forum-header-bar .forum-search { grid-column: 1 / -1; order: 4; }
  .forum-header-bar .btn--sm { grid-column: 1 / -1; order: 5; }
  .select-modelo-compacto { flex: 1 1 auto; width: 100%; min-width: 0; max-width: none; }
}

/* --- Selects de marca/modelo: estado desabilitado, foco e tema escuro --- */
.select-modelo-compacto:disabled,
.select-modelo-compacto[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  background-color: var(--bg-subtle);
  color: var(--text-faint);
}
.select-modelo-compacto:disabled:hover { border-color: var(--border-strong); }
.select-modelo-compacto option { color: var(--text-strong); background: var(--bg-surface); }
[data-theme="dark"] .select-modelo-compacto {
  background-color: var(--bg-surface-soft);
  border-color: var(--border-strong);
  color: var(--text-heading);
}
[data-theme="dark"] .select-modelo-compacto:hover:not(:disabled) { border-color: var(--border-hover); }
[data-theme="dark"] .select-modelo-compacto:disabled,
[data-theme="dark"] .select-modelo-compacto[disabled] {
  background-color: var(--bg-subtle);
  color: var(--text-faint);
  border-color: var(--border);
}
[data-theme="dark"] .select-modelo-compacto option { background: var(--bg-surface); color: var(--text-heading); }
[data-theme="dark"] .forum-crumbs { color: var(--text-faint); }
@media (max-width: 640px) {
  .forum-header-bar__top { flex-wrap: wrap; gap: 4px 10px; }
  .forum-crumbs { font-size: 0.76rem; }
}

/* --- Painel direito: breadcrumbs, abas de ordenação e CTA --- */
.forum-painel { display: grid; gap: 14px; min-width: 0; }
.forum-painel__crumbs { padding: 0 0 2px; }

.forum-topo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.forum-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.forum-tab {
  padding: 0.45rem 0.95rem;
  font: inherit;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.forum-tab:hover { color: var(--link); background: var(--bg-tint); border-color: var(--accent-mid); }
.forum-tab:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.forum-tab[aria-selected="true"] {
  color: var(--btn-primary-text);
  background: var(--btn-primary-bg);
  border-color: var(--btn-primary-bg);
  box-shadow: 0 6px 14px -8px var(--btn-primary-shadow);
}
.forum-cta { white-space: nowrap; }
@media (max-width: 560px) { .forum-cta { width: 100%; } }

/* Toolbar de busca + modelo dentro da coluna de tópicos (flexível, não o grid de 3 colunas). */
.community-grid__feed .filter-bar--secundaria {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}
.community-grid__feed .filter-bar--secundaria .filter-bar__search { flex: 1 1 220px; min-width: 0; }
.community-grid__feed .filter-bar--secundaria .filter-bar__model { flex: 0 1 260px; }
.community-grid__feed .filter-bar--secundaria .filter-bar__model select { width: 100%; }

/* --- Chips horizontais (mobile) no topo da tabela --- */
/* Chips na horizontal (categorias + modelos) — usados no mobile, onde a
   sidebar empilha abaixo da lista. No desktop (>= 1024px) a sidebar já
   mostra as categorias, então os chips somem. */
.forum-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.forum-chips:empty { display: none; }
@media (min-width: 1024px) {
  .community-grid .forum-chips { display: none; }
}
.forum-chips .side-cat {
  width: auto;
  grid-template-columns: auto auto auto;
  flex: 0 0 auto;
  white-space: nowrap;
  background: var(--bg-surface);
  border-color: var(--border-strong);
}
.forum-chips .side-cat__nome { overflow: visible; text-overflow: clip; }
.forum-chips .side-chip { flex: 0 0 auto; }
/* O bloco acima (.forum-chips .side-cat) tem a MESMA especificidade (0,2,0) de
   .side-cat.is-ativa e vem DEPOIS — por isso zerava o fundo do item ativo e
   deixava o texto escuro sobre fundo escuro no tema escuro. Reaplicado aqui
   para que o estado ativo ganhe dentro dos chips horizontais (mobile). */
.forum-chips .side-cat.active,
.forum-chips .side-cat.is-ativa,
.forum-chips .side-cat[aria-pressed="true"] {
  color: var(--btn-primary-text);
  background: var(--btn-primary-bg);
  border-color: var(--btn-primary-bg);
  box-shadow: 0 6px 14px -8px var(--btn-primary-shadow);
}
.forum-chips .side-cat.active .side-cat__count,
.forum-chips .side-cat.is-ativa .side-cat__count,
.forum-chips .side-cat[aria-pressed="true"] .side-cat__count {
  color: inherit;
  background: rgba(0, 0, 0, 0.14);
  border-color: transparent;
}

/* --- Tabela de tópicos (linhas limpas estilo Discourse) --- */
.forum-tabela {
  display: block;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.forum-tabela[hidden],
.forum__colunas[hidden] { display: none; }

.forum-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding: 14px 18px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-soft);
}
/* Cards de tópico usam o padrão próprio acima (sem zebrado de tabela). */
.forum-row--topico:last-child { border-bottom: 1px solid var(--border); }
.forum-row:not(.forum-row--topico):last-child { border-bottom: none; }
/* Linhas alternadas em cinza-claro (#f4f6f5) — só fora dos cards de tópico. */
.forum-row:not(.forum-row--topico):nth-child(even) { background: var(--bg-subtle); }
.forum-row:not(.forum-row--topico):hover { background: var(--bg-tint); }
.forum-row__topico { flex: 1 0 100%; min-width: 0; }
.forum-row__titulo { margin: 0 0 6px; font-size: 1.02rem; line-height: 1.4; }
.forum-row__titulo a { color: var(--text-heading); text-decoration: none; }
.forum-row__titulo a:hover { color: var(--accent); text-decoration: underline; }
.forum-row__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.tag-modelo {
  padding: 0.18rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.forum-row__autor {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.forum-row__autor-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.forum-row__stats {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-faint);
  white-space: nowrap;
}
.forum-row__stats strong { color: var(--text-strong); }
.forum-row__util { padding: 0.22rem 0.6rem; font-size: 0.78rem; }
.forum-row__atividade { font-size: 0.8rem; color: var(--text-faint); white-space: nowrap; }

/* Desktop (>= 768px): mantém o rodapé em linha única (tags+autor | métricas). */
@media (min-width: 768px) {
  .forum-row--topico { padding: 18px 20px; }
  .forum-row__footer { flex-wrap: nowrap; }
  .forum-row__meta-left { flex: 1 1 auto; }
}
/* Override tardio: o card de tópico prevalece sobre o .forum-row legado
   (mesma especificidade, mas este bloco vem depois no arquivo). */
.forum-row.forum-row--topico {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 6px;
  padding: 16px 20px;
  margin-bottom: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
@media (min-width: 768px) {
  .forum-row.forum-row--topico { padding: 18px 20px; }
}


/* =========================================================
   Lightbox das fotos do relato — modal sobre a própria página
   (abre ao clicar na miniatura da galeria ou na imagem do texto)
   ========================================================= */
.relato-galeria a { cursor: zoom-in; }
.relato-galeria a:hover { border-color: var(--accent); }
.relato-galeria a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.relato-artigo__corpo img { cursor: zoom-in; }

.lightbox[hidden] { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 64px 58px 76px;
  background-color: rgba(8, 20, 15, 0.94);
}

.lightbox__stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  margin: 0;
}

.lightbox__img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 210px);
  max-height: calc(100dvh - 210px);
  object-fit: contain;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
}

.lightbox__legenda {
  max-width: 68ch;
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
}
.lightbox__legenda[hidden] { display: none; }

.lightbox__bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.lightbox__fechar,
.lightbox__nav {
  position: absolute;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background-color: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.lightbox__fechar:hover,
.lightbox__nav:hover { background-color: rgba(255, 255, 255, 0.28); }
.lightbox__fechar:focus-visible,
.lightbox__nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lightbox__fechar[hidden],
.lightbox__nav[hidden] { display: none; }

.lightbox__fechar {
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  font-size: 1.05rem;
  line-height: 1;
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  font-size: 1.7rem;
  line-height: 1;
}
.lightbox__nav--ant { left: 8px; }
.lightbox__nav--prox { right: 8px; }

.lightbox__contador {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 5px 14px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.lightbox__contador[hidden] { display: none; }

@media (min-width: 900px) {
  .lightbox { padding: 72px 96px 84px; }
}

/* =========================================================
   LOGIN OPCIONAL (Google) — header + Status de Identificação
   ========================================================= */
:root {
  /* Estado A — visitante anônimo (aviso amarelo claro) */
  --auth-anon-bg: #fdf6e0;
  --auth-anon-border: #efdc9f;
  --auth-anon-accent: #d9a93a;
  --auth-anon-title: #7a5a10;
  --auth-anon-text: #6a5a2b;
  /* Estado B — conectado com Google (verde claro) */
  --auth-ok-bg: var(--green-50);
  --auth-ok-border: var(--border-tint);
  --auth-ok-accent: var(--green-700);
  --auth-ok-title: var(--green-900);
  --auth-ok-text: var(--text);
  --auth-fixo-bg: var(--bg-subtle);
}

/* Slot do header: botão "Entrar com Google" OU avatar + primeiro nome + Sair */
.header-auth {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.header-auth__btn {
  padding: 0.6rem 0.95rem;
  font-size: 0.88rem;
  white-space: nowrap;
}

.header-auth__btn .google-icon,
.ident-status__btn .google-icon {
  flex: none;
}

.header-auth__user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.header-auth__avatar {
  width: 34px;
  height: 34px;
  font-size: 0.85rem;
  color: #fff;
  background-color: var(--green-700);
  border-radius: 50%;
}

[data-theme="dark"] .header-auth__avatar {
  color: #06281c;
  background-color: var(--accent);
}

.header-auth__nome {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-strong);
}

.header-auth__sair {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: underline;
}

.header-auth__sair:hover {
  color: var(--danger-text);
}

/* Mobile: espaço é curto — só o ícone do Google e/ou avatar + Sair */
@media (max-width: 640px) {
  .header-auth { gap: 8px; }
  .header-auth__label,
  .header-auth__nome { display: none; }
  .header-auth__btn {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
  }
}

/* ===== Caixa de Status de Identificação (Estados A e B) ===== */
.ident-status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  color: var(--text);
}

.ident-status[hidden] { display: none; }

/* ESTADO A — Visitante (Anônimo): visual de aviso (amarelo claro) */
.ident-status--anon {
  color: var(--auth-anon-text);
  background-color: var(--auth-anon-bg);
  border-color: var(--auth-anon-border);
  border-left: 5px solid var(--auth-anon-accent);
}

/* ESTADO B — Conectado com Google: visual de sucesso (verde claro) */
.ident-status--ok {
  color: var(--auth-ok-text);
  background-color: var(--auth-ok-bg);
  border-color: var(--auth-ok-border);
  border-left: 5px solid var(--auth-ok-accent);
}

.ident-status__corpo {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ident-status__titulo {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  color: inherit;
}

.ident-status--anon .ident-status__titulo { color: var(--auth-anon-title); }
.ident-status--ok .ident-status__titulo { color: var(--auth-ok-title); }
.ident-status__titulo strong { font-weight: 800; }

.ident-status__texto,
.ident-status__cta {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
}

.ident-status__btn {
  margin-top: 4px;
  justify-self: start;
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
}

.ident-status__acoes {
  margin: 2px 0 0;
  font-size: 0.82rem;
}

.ident-status__sair {
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: underline;
}

.ident-status__sair:hover { color: var(--danger-text); }

/* Versão enxuta usada nos forms de resposta embutidos */
.ident-status--compacto {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}

.ident-status--compacto .ident-status__titulo { font-size: 0.88rem; }

.ident-status--compacto .ident-status__texto,
.ident-status--compacto .ident-status__cta { font-size: 0.84rem; }

/* ===== Refinamento: #ident-status integrado ao topo do formulário de respostas ===== */
#ident-status {
  margin: 0 0 16px 0;
}
#ident-status .ident-status__corpo {
  gap: 8px;
}
#ident-status .ident-status__titulo {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
#ident-status .ident-status__texto {
  font-size: 0.85rem;
  color: var(--text-muted);
}
#ident-status .ident-status__acoes {
  margin-top: 6px;
  font-size: 0.82rem;
  display: flex;
  gap: 10px;
  align-items: center;
}
#ident-status .ident-status__sair {
  color: var(--text-muted);
  text-decoration: underline;
  font-weight: 600;
}
#ident-status .ident-status__sair:hover { color: var(--danger-text); }

/* ===== #comentarios-vazio — estado inicial sem respostas ===== */
#comentarios-vazio {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  background-color: var(--bg-subtle);
  border: 1px dashed var(--border-dashed);
  border-radius: var(--radius);
  gap: 10px;
  font-size: 0.95rem;
}
#comentarios-vazio::before {
  content: "💬";
  font-size: 2rem;
  line-height: 1;
}

/* Campos preenchidos pela conta Google (somente leitura) */
input[readonly][data-auth-fixo] {
  background-color: var(--auth-fixo-bg);
  border-color: var(--border);
  color: var(--text-muted);
  cursor: default;
}

input[readonly][data-auth-fixo]:focus {
  border-color: var(--border-strong);
  box-shadow: none;
}

/* Tema escuro — só redeclara as variáveis desta seção */
[data-theme="dark"] {
  --auth-anon-bg: #2b2410;
  --auth-anon-border: #57491f;
  --auth-anon-accent: #d9a93a;
  --auth-anon-title: #f5d98f;
  --auth-anon-text: #e6d2a2;
  --auth-ok-bg: #0f211b;
  --auth-ok-border: #1e4a38;
  --auth-ok-accent: #34d17b;
  --auth-ok-title: #6ee7b7;
  --auth-ok-text: var(--text);
  --auth-fixo-bg: #0e1815;
}


/* ===== Fix: textos muito longos sem espaço não podem estourar a página =====
   Cobre título/resumo dos cards (home, comunidade, destaques), corpo do
   relato (Quill/DOMPurify) e comentários. */
.post-card,
.relato-card,
.relato-card--forum,
.destaque-card,
.relato-artigo,
.comentario {
  min-width: 0;
  overflow-wrap: anywhere;
}

.post-card h3,
.post-card__excerpt,
.post-card__link,
.relato-card__title,
.relato-card__title a,
.relato-card__excerpt,
.destaque-card__titulo,
.destaque-card__titulo a,
.destaque-card__previa,
.relato-artigo h1,
.relato-artigo__corpo,
.relato-conteudo,
.relato-conteudo p,
.relato-conteudo li,
.relato-conteudo h1,
.relato-conteudo h2,
.relato-conteudo h3,
.comentario__texto,
.comentario__cab {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Links/URLs longas e código colado quebram em qualquer ponto */
.relato-conteudo a,
.post-card a,
.relato-card a,
.destaque-card a,
.comentario a {
  overflow-wrap: anywhere;
  word-break: break-all;
}

/* Blocos pré-formatados do editor respeitam a largura útil */
.relato-conteudo pre,
.relato-conteudo code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

/* Mídia do corpo nunca empurra a página para a direita */
.relato-conteudo img,
.relato-conteudo video,
.relato-conteudo iframe,
.relato-conteudo table {
  max-width: 100%;
}
.relato-conteudo table {
  display: block;
  overflow-x: auto;
}

/* Coluna principal do fórum precisa poder encolher no grid */
@media (min-width: 768px) {
  .relato-card--forum {
    grid-template-columns: minmax(0, 1fr) 110px 90px;
  }
}

/* Complemento: demais grades/listas que também recebem texto longo */
.relato-card__link,
.forum__lista,
.forum__principal,
.destaque-vitrine,
.destaque-detalhe,
.destaque-texto,
.comentario > div:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.relato-card__link,
.forum__lista a {
  word-break: break-word;
}

@media (min-width: 768px) {
  .forum__colunas {
    /* Mesmas 4 colunas das linhas (.forum-row): tópico, autor, respostas/útil, atividade. */
    grid-template-columns: minmax(0, 1fr) 150px 130px 90px;
  }
  .comentario {
    grid-template-columns: 40px minmax(0, 1fr);
  }
}

@media (min-width: 1024px) {
  .destaque-vitrine {
    grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  }
}
