/* Complementos — tema colorido + home */

.gov-tweet-card {
  animation:
    gov-tweet-in 0.55s ease forwards,
    gov-tweet-glow 4s ease-in-out infinite;
  animation-delay: calc(var(--tweet-i, 0) * 0.12s), calc(var(--tweet-i, 0) * 0.35s);
  opacity: 0;
}

@keyframes gov-tweet-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes gov-tweet-glow {
  0%, 100% { box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1); }
  50% { box-shadow: 0 8px 28px rgba(217, 70, 239, 0.15); }
}

.gov-tweet-card .gov-card,
.gov-tweet-card--fizzy .gov-proposal-embed {
  margin: 0;
}

.gov-tweet-card--fizzy .gov-proposal-embed {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.tabular-nums { font-variant-numeric: tabular-nums; }

.gov-pill { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.8rem; padding: 0.4rem 0.8rem; border-radius: 9999px; border: 1px solid transparent; transition: all 0.15s ease; cursor: pointer; background: transparent; }
.gov-pill--idle,
.gov-pill--idle-support { color: #475569; background: #f1f5f9; border-color: #e2e8f0; }
.gov-pill--idle-neutral { color: #475569; background: #f8fafc; border-color: #e2e8f0; }
.gov-pill--idle-disagree { color: #be123c; background: #fff1f2; border-color: #fecdd3; }
.gov-pill--support { color: #0f766e; background: #f0fdfa; border-color: #99f6e4; font-weight: 600; }
.gov-pill--neutral { color: #475569; background: #f8fafc; border-color: #cbd5e1; font-weight: 600; }
.gov-pill--disagree { color: #be123c; background: #fff1f2; border-color: #fecdd3; font-weight: 600; }
.gov-pill--readonly-support { color: #475569; background: #f1f5f9; border-color: #e2e8f0; cursor: default; }
.gov-pill--readonly-neutral { color: #475569; background: #f8fafc; border-color: #e2e8f0; cursor: default; }
.gov-pill--readonly-disagree { color: #be123c; background: #fff1f2; border-color: #fecdd3; cursor: default; }
.gov-pill--idle-going { color: #475569; background: #f1f5f9; border-color: #e2e8f0; }
.gov-pill--idle-maybe { color: #475569; background: #f8fafc; border-color: #e2e8f0; }
.gov-pill--going { color: #0f766e; background: #f0fdfa; border-color: #99f6e4; font-weight: 600; }
.gov-pill--maybe { color: #7c3aed; background: #f5f3ff; border-color: #ddd6fe; font-weight: 600; }
.gov-pill--readonly-going { color: #475569; background: #f1f5f9; border-color: #e2e8f0; cursor: default; }
.gov-pill--readonly-maybe { color: #475569; background: #f8fafc; border-color: #e2e8f0; cursor: default; }
.gov-pill svg { display: block; }

/* Home pública — coluna única alinhada aos cards */
.gov-home-page {
  width: 100%;
  max-width: 64rem;
  margin-inline: auto;
}

.gov-home-section {
  width: 100%;
}

.gov-home-hero {
  width: 100%;
}

.gov-home-hero__title {
  font-size: 1.5rem;
  line-height: 1.2;
}

@media (min-width: 640px) {
  .gov-home-hero__title {
    font-size: 2.4rem;
  }
}

/* Busca */
.gov-home-search-wrap {
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  padding: 1.75rem 1.5rem 1.5rem;
  border-radius: 1.75rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(199, 210, 254, 0.9);
  box-shadow: 0 12px 40px rgba(79, 70, 229, 0.08);
  text-align: left;
}

.gov-home-search-tabs {
  display: flex;
  gap: 0.25rem;
  margin: 0 auto 1.5rem;
  padding: 0.35rem;
  border-radius: 9999px;
  background: #f1f5f9;
  width: 100%;
  justify-content: stretch;
}

.gov-home-search-tab {
  flex: 1;
  text-align: center;
  padding: 0.55rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 800;
  color: #64748b;
  text-decoration: none;
  transition: all 0.15s ease;
}

.gov-home-search-tab--active {
  color: #fff;
  background: linear-gradient(135deg, #4f46e5, #d946ef);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}

.gov-home-search-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gov-home-search-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.gov-home-search-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.gov-home-search-label--inline {
  margin-bottom: 0.35rem;
}

.gov-home-search-input {
  width: 100%;
  padding: 0.9rem 1.1rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 1rem;
  border: 1px solid #c7d2fe;
  background: #fff;
}

.gov-home-search-input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.gov-home-search-actions {
  display: grid;
  grid-template-columns: minmax(5.5rem, 7rem) 1fr;
  gap: 0.75rem;
  align-items: end;
}

@media (min-width: 640px) {
  .gov-home-search-actions {
    grid-template-columns: minmax(6.5rem, 8rem) minmax(9rem, 14rem);
    justify-content: start;
  }

  .gov-home-search-submit {
    max-width: 14rem;
  }
}

.gov-home-search-select {
  width: 100%;
  padding: 0.85rem 0.65rem;
  border-radius: 1rem;
  border: 1px solid #c7d2fe;
  background: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
}

.gov-home-search-submit {
  width: 100%;
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  cursor: pointer;
  font-size: 1rem;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .gov-home-search-actions {
    grid-template-columns: 1fr;
  }
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gov-agenda-chip {
  max-width: 100%;
}

.gov-politician-follow-card {
  min-width: 0;
}

.gov-politician-follow-card .font-bold {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.gov-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #4f46e5, #d946ef);
}

/* Cards clicáveis */
.gov-home-card-slot { min-height: 11rem; }

.gov-home-card-link {
  text-decoration: none;
  color: inherit;
  border-radius: 1.5rem;
  padding: 1.25rem;
  min-height: 11rem;
  display: block;
  border: 2px solid #e2e8f0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: gov-home-card-in 0.6s ease forwards;
  animation-delay: calc(var(--card-i, 0) * 0.08s);
  opacity: 0;
}

.gov-home-card-link:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 40px rgba(79, 70, 229, 0.18);
}

.gov-home-card-link--indigo { background: linear-gradient(145deg, #fff, #eef2ff); border-color: #a5b4fc; }
.gov-home-card-link--emerald { background: linear-gradient(145deg, #fff, #ecfdf5); border-color: #6ee7b7; }
.gov-home-card-link--amber { background: linear-gradient(145deg, #fff, #fffbeb); border-color: #fcd34d; }
.gov-home-card-link--fuchsia { background: linear-gradient(145deg, #fff, #fdf4ff); border-color: #f0abfc; }
.gov-home-card-link--teal { background: linear-gradient(145deg, #fff, #f0fdfa); border-color: #5eead4; }
.gov-home-card-link--purple { background: linear-gradient(145deg, #fff, #f5f3ff); border-color: #c4b5fd; }

@keyframes gov-home-card-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes gov-home-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; box-shadow: 0 0 32px rgba(217, 70, 239, 0.5); }
}

.gov-home-card--blink { animation: gov-home-blink 0.28s ease; }

.gov-home-retweet {
  padding-left: 0.5rem;
  border-left: 3px solid #a5b4fc;
  color: #475569;
}

.gov-retweet-banner {
  padding: 0.5rem 0.75rem;
  background: #eef2ff;
  border-radius: 1rem;
  border-left: 4px solid #4f46e5;
}

/* Unified proposal cards (+10% typography) */
.gov-proposal-card {
  font-size: 110%;
  border-radius: 1.5rem;
  padding: 1.1rem 1.35rem;
  border: 2px solid #e2e8f0;
  background: #fff;
  overflow: visible;
}

.gov-proposal-card__name { font-size: 1.1rem; }
.gov-proposal-card__meta { font-size: 0.9625rem; }
.gov-proposal-card__date { font-size: 0.825rem; }
.gov-proposal-card__body { font-size: 1.2375rem; line-height: 1.65; }
@media (min-width: 640px) {
  .gov-proposal-card__body { font-size: 1.375rem; }
}

.gov-proposal-card--teal { border-color: #99f6e4; background: linear-gradient(145deg, #fff, #ecfdf5); }
.gov-proposal-card--fuchsia { border-color: #f0abfc; background: linear-gradient(145deg, #fff, #fdf4ff); }
.gov-proposal-card--amber { border-color: #fcd34d; background: linear-gradient(145deg, #fff, #fffbeb); }
.gov-proposal-card--indigo { border-color: #a5b4fc; background: linear-gradient(145deg, #fff, #eef2ff); }
.gov-proposal-card--emerald { border-color: #6ee7b7; background: linear-gradient(145deg, #fff, #ecfdf5); }

.gov-proposal-card-link { text-decoration: none; color: inherit; transition: transform 0.15s ease, opacity 0.15s ease; }
.gov-proposal-card-link:hover { opacity: 0.96; transform: scale(1.005); }

/* Share menu (<details>, estilo discreto tipo Basecamp) */
.gov-share {
  position: relative;
  display: inline-flex;
  z-index: 40;
}

.gov-share__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--gov-muted, #64748b);
  transition: color 0.15s ease;
  user-select: none;
}

.gov-share__trigger::-webkit-details-marker { display: none; }
.gov-share__trigger::marker { content: ""; }

.gov-share__trigger:hover { color: var(--gov-ink, #1e293b); }

.gov-share__panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 60;
  min-width: 200px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--gov-border, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.gov-share__title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gov-ink, #1e293b);
  margin: 0 0 0.5rem;
}

.gov-share__links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.gov-share__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  color: var(--gov-ink, #1e293b);
  text-decoration: none;
  transition: background 0.12s ease;
}

.gov-share__link:hover { background: #f8fafc; }

.gov-share__link--button {
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.gov-share__divider {
  border: none;
  border-top: 1px solid #f1f5f9;
  margin: 0.35rem 0;
}

.gov-proposal-read-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  color: #047857;
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
}

.gov-proposal-read-badge__icon {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
}

.gov-proposal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.gov-proposal-tabs__tab {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--gov-muted, #64748b);
  background: #fff;
  border: 1px solid var(--gov-border, #e2e8f0);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.gov-proposal-tabs__tab:hover {
  color: var(--gov-ink, #0f172a);
  border-color: #99f6e4;
}

.gov-proposal-tabs__tab--active {
  color: var(--gov-ink, #0f172a);
  background: linear-gradient(145deg, #ecfdf5, #fff);
  border-color: #2dd4bf;
}

.gov-card--clickable {
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.gov-card--clickable:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Frozen navbar — subscription expired */
.gov-nav--frozen .gov-nav-link--restricted {
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
}

.gov-frozen-banner {
  background: #fef2f2;
  border-bottom: 2px solid #fca5a5;
  color: #991b1b;
  text-align: center;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.gov-frozen-banner a {
  color: #991b1b;
  text-decoration: underline;
}

.gov-frozen-banner a:hover {
  color: #7f1d1d;
}

.gov-chip--rose {
  background: #ffe4e6;
  color: #be123c;
  border: 1px solid #fecdd3;
}

.gov-btn-pix {
  border-color: #34d399 !important;
  color: #065f46 !important;
  background: #ecfdf5 !important;
}

.gov-btn-pix:hover {
  background: #d1fae5 !important;
  border-color: #10b981 !important;
}

.gov-proposal-reactions .gov-pill { font-size: 0.88rem; padding: 0.44rem 0.88rem; }

/* Resumo compacto — home / cards (só ícone + número) */
.gov-reactions-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.gov-reactions-summary__item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.3rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  line-height: 1;
}

.gov-reactions-summary__item--support { color: #475569; background: #f1f5f9; border-color: #e2e8f0; }
.gov-reactions-summary__item--neutral { color: #475569; background: #f8fafc; border-color: #e2e8f0; }
.gov-reactions-summary__item--disagree { color: #be123c; background: #fff1f2; border-color: #fecdd3; }

.gov-home-card-inner .gov-reactions-summary { margin-top: 0.65rem; }

.gov-big-number__label--with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

/* Feed links — Mais ideias (legacy alias) */
.gov-feed-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 1.5rem;
  transition: transform 0.15s ease;
}

.gov-feed-card-link:hover { transform: scale(1.01); }
.gov-feed-card-link--teal .gov-proposal-embed { border: 2px solid #99f6e4; border-radius: 1.5rem; padding: 1rem; background: linear-gradient(145deg, #fff, #ecfdf5); }
.gov-feed-card-link--fuchsia .gov-proposal-embed { border: 2px solid #f0abfc; border-radius: 1.5rem; padding: 1rem; background: linear-gradient(145deg, #fff, #fdf4ff); }
.gov-feed-card-link--amber .gov-proposal-embed { border: 2px solid #fcd34d; border-radius: 1.5rem; padding: 1rem; background: linear-gradient(145deg, #fff, #fffbeb); }
.gov-feed-card-link--indigo .gov-proposal-embed { border: 2px solid #a5b4fc; border-radius: 1.5rem; padding: 1rem; background: linear-gradient(145deg, #fff, #eef2ff); }
.gov-feed-card-link--emerald .gov-proposal-embed { border: 2px solid #6ee7b7; border-radius: 1.5rem; padding: 1rem; background: linear-gradient(145deg, #fff, #ecfdf5); }

/* Stat cards */
.gov-stat-card {
  border-radius: 1.75rem;
  padding: 1.5rem;
  text-align: center;
  border: 2px solid #e2e8f0;
  background: #fff;
}

.gov-stat-card__value {
  display: block;
  font-size: 2.5rem;
  font-weight: 900;
  font-family: var(--font-display, Nunito, sans-serif);
}

.gov-stat-card__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  margin-top: 0.25rem;
  color: #64748b;
}

.gov-stat-card--indigo { background: linear-gradient(145deg, #fff, #eef2ff); border-color: #a5b4fc; }
.gov-stat-card--indigo .gov-stat-card__value { color: #4f46e5; }
.gov-stat-card--emerald { background: linear-gradient(145deg, #fff, #ecfdf5); border-color: #6ee7b7; }
.gov-stat-card--emerald .gov-stat-card__value { color: #059669; }
.gov-stat-card--amber { background: linear-gradient(145deg, #fff, #fffbeb); border-color: #fcd34d; }
.gov-stat-card--amber .gov-stat-card__value { color: #d97706; }

/* Big numbers — página da proposta */
.gov-big-number {
  border-radius: 1.5rem;
  padding: 1.25rem;
  text-align: center;
  border: 2px solid;
}

.gov-big-number__value {
  display: block;
  font-size: 2.5rem;
  font-weight: 900;
  font-family: var(--font-display, Nunito, sans-serif);
}

.gov-big-number__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

.gov-big-number--teal { background: #ecfdf5; border-color: #5eead4; color: #0f766e; }
.gov-big-number--slate { background: #f8fafc; border-color: #cbd5e1; color: #475569; }
.gov-big-number--rose { background: #fff1f2; border-color: #fda4af; color: #be123c; }
.gov-big-number--purple { background: #f5f3ff; border-color: #c4b5fd; color: #6d28d9; }

.gov-cta-politician {
  border-radius: 2rem;
  background: linear-gradient(135deg, #312e81, #4f46e5, #7c3aed);
  color: #fff;
  box-shadow: 0 20px 50px rgba(79, 70, 229, 0.35);
}

.gov-proposal-show .gov-proposal-embed {
  border: none;
  padding: 0;
}

.gov-proposal-show-reactions .gov-proposal-reactions {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  text-align: center;
}

.gov-proposal-show-reactions .gov-proposal-reactions__pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
}

.gov-proposal-show-reactions .gov-pill {
  font-size: 0.925rem;
  padding: 0.5rem 1rem;
}

.gov-proposal-show .gov-big-number__value {
  font-size: 2.75rem;
}

/* Features guide — demos animados */
.gov-features-guide { animation: gov-features-fade-in 0.4s ease; }
@keyframes gov-features-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.gov-features-row { transition: box-shadow 0.2s ease; }
.gov-features-row:hover { box-shadow: 0 12px 40px rgba(79, 70, 229, 0.08); }

.gov-features-mini-card {
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e2e8f0;
}

.gov-features-demo--blink {
  animation: gov-features-blink 0.28s ease;
}
@keyframes gov-features-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; transform: scale(0.99); }
}

/* Trix editor overrides */
trix-editor {
  border: 1px solid var(--gov-border, #e2e8f0);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  min-height: 120px;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--gov-ink, #1e293b);
  background: #fff;
}

trix-editor:focus {
  border-color: var(--color-gov-indigo, #6366f1);
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

trix-toolbar .trix-button-group {
  border-color: var(--gov-border, #e2e8f0);
  border-radius: 0.5rem;
  overflow: hidden;
}

trix-toolbar .trix-button {
  border-bottom: none;
}

.gov-rich-body a { color: var(--color-gov-indigo, #6366f1); text-decoration: underline; }
.gov-rich-body ul, .gov-rich-body ol { padding-left: 1.5rem; margin: 0.5rem 0; }
.gov-rich-body blockquote { border-left: 3px solid var(--gov-border, #e2e8f0); padding-left: 1rem; color: #64748b; margin: 0.5rem 0; }

/* Like button */
.gov-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #94a3b8;
  transition: color 0.15s ease, transform 0.15s ease;
  border-radius: 0.5rem;
}

.gov-like-btn:hover {
  color: #e11d48;
  transform: scale(1.1);
}

.gov-like-btn--active {
  color: #e11d48;
}

.gov-like-btn--readonly {
  cursor: default;
  color: #94a3b8;
}

.gov-like-btn--readonly:hover {
  transform: none;
  color: #94a3b8;
}

.gov-like-icon {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.gov-like-count {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #64748b;
  min-width: 0.75rem;
}

/* ── Post thread (post + replies aninhadas) ── */
.gov-post-thread {
  border-radius: 1rem;
  border: 1px solid var(--gov-border);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  overflow: hidden;
}

.gov-post-thread__main {
  padding: 1.25rem 1.25rem 1rem;
}

.gov-post-thread__replies {
  background: #f8f7ff;
  border-top: 1px solid var(--gov-border);
  padding: 1rem 1.25rem 1.25rem;
}

/* ── Réplica ── */
.gov-reply {
  display: flex;
  gap: 0;
  position: relative;
  padding: 0.75rem 0;
}

.gov-reply + .gov-reply {
  border-top: 1px solid rgba(0,0,0,.05);
}

.gov-reply__thread-line {
  width: 2px;
  min-height: 100%;
  background: var(--gov-purple);
  opacity: 0.2;
  border-radius: 1px;
  flex-shrink: 0;
  margin-right: 0.75rem;
}

.gov-reply__content {
  flex: 1;
  min-width: 0;
}

.gov-reply__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: #6366f1;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Tréplica (aninhada na réplica) ── */
.gov-counter-reply {
  display: flex;
  gap: 0;
  position: relative;
  margin-top: 0.5rem;
  padding: 0.5rem 0 0;
}

.gov-counter-reply__thread-line {
  width: 2px;
  min-height: 100%;
  background: #a78bfa;
  opacity: 0.35;
  border-radius: 1px;
  flex-shrink: 0;
  margin-right: 0.75rem;
}

.gov-counter-reply__content {
  flex: 1;
  min-width: 0;
  background: #ede9fe;
  border-radius: 0.625rem;
  padding: 0.625rem 0.75rem;
}

.gov-counter-reply__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  background: #7c3aed;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Closed debate badge ── */
.gov-closed-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #fde68a;
}

.gov-closed-badge-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.65rem;
  font-weight: 600;
}

/* ── Reply form (dentro da thread) ── */
.gov-reply-form {
  background: #fff;
  border: 1px solid var(--gov-border);
  border-radius: 0.625rem;
  padding: 0.75rem;
}

/* ── Replies list container ── */
.gov-replies-list {
  /* no extra spacing — handled by individual .gov-reply */
}

/* Pinned reply badge */
.gov-pin-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #d97706;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
}

.gov-pin-badge__icon {
  width: 0.75rem;
  height: 0.75rem;
}

/* Avatar small (navbar) */
.gov-avatar-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: var(--gov-purple);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

/* ── Rich editor (Basecamp-style) ── */
.gov-rich-editor {
  border: 1px solid var(--gov-border);
  border-radius: 0.75rem;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.gov-rich-editor:focus-within {
  border-color: var(--gov-purple);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.gov-rich-toolbar {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--gov-border);
}
.gov-rich-toolbar__group {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}
.gov-rich-toolbar__sep {
  width: 1px;
  height: 1.25rem;
  background: #e2e8f0;
  margin: 0 0.375rem;
  flex-shrink: 0;
}
.gov-rich-toolbar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  color: #475569;
  background: transparent;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}
.gov-rich-toolbar__btn:hover {
  background: #e2e8f0;
  color: var(--gov-ink);
}
.gov-rich-toolbar__btn:active {
  background: #cbd5e1;
  transform: scale(0.95);
}

.gov-rich-editor__body {
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--gov-ink);
  outline: none;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.gov-rich-editor__body:empty::before {
  content: attr(data-placeholder);
  color: #94a3b8;
  pointer-events: none;
}

.gov-rich-editor__body blockquote {
  border-left: 3px solid #a78bfa;
  padding-left: 0.75rem;
  color: #64748b;
  margin: 0.5rem 0;
}
.gov-rich-editor__body ul,
.gov-rich-editor__body ol {
  padding-left: 1.5rem;
  margin: 0.25rem 0;
}
.gov-rich-editor__body a {
  color: var(--gov-purple);
  text-decoration: underline;
}

/* Textarea + counter (posts, propostas) — uma caixa só; evita conflito com .gov-input border dupla */
.gov-simple-editor {
  border: 2px solid var(--gov-border, #e2e8f0);
  border-radius: 1rem;
  background: #fff;
  overflow: visible;
}

.gov-simple-editor:focus-within {
  border-color: var(--color-gov-indigo, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.gov-simple-editor__field,
.gov-simple-editor textarea {
  display: block;
  width: 100%;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  resize: vertical;
  min-height: 6rem;
}

.gov-simple-editor__field:focus,
.gov-simple-editor textarea:focus {
  outline: none;
}

.gov-char-field {
  display: block;
}

.gov-char-field textarea {
  display: block;
  width: 100%;
}

/* Character counter */
.gov-rich-counter {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: #64748b;
  padding: 0.25rem 1rem 0.4rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
}

.gov-rich-counter__ring {
  --progress: 0;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  background: conic-gradient(#0ea5e9 calc(var(--progress) * 1%), #e2e8f0 0);
  position: relative;
  flex: 0 0 auto;
}

.gov-rich-counter__ring::after {
  content: "";
  position: absolute;
  inset: 0.2rem;
  border-radius: inherit;
  background: #f8fafc;
}

.gov-rich-counter--warn {
  color: #d97706;
  background: #fffbeb;
}

.gov-rich-counter--warn .gov-rich-counter__ring {
  background: conic-gradient(#f59e0b calc(var(--progress) * 1%), #fde68a 0);
}

.gov-rich-counter--warn .gov-rich-counter__ring::after {
  background: #fffbeb;
}

.gov-rich-counter--over {
  color: #dc2626;
  background: #fef2f2;
  font-weight: 700;
}

.gov-rich-counter--over .gov-rich-counter__ring {
  background: #dc2626;
}

.gov-rich-counter--over .gov-rich-counter__ring::after {
  background: #fef2f2;
}

.gov-char-field__counter {
  border-top: none;
  background: transparent;
  padding: 0.35rem 0 0;
}


/* Notification stack (silent grouped alerts on dashboard) */
.gov-notification-stack {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: linear-gradient(180deg, #faf5ff 0%, #fff 100%);
  padding: 0.875rem 1rem;
}
.gov-notification-stack__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.gov-notification-stack__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: var(--gov-purple);
  flex-shrink: 0;
  animation: gov-notification-pulse 2s ease-in-out infinite;
}
@keyframes gov-notification-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.gov-notification-stack__summary {
  line-height: 1.45;
}
.gov-notification-stack__item {
  padding: 0.125rem 0;
}

/* About page (markdown content) */
.gov-about__body h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gov-ink);
  margin-bottom: 1rem;
}
.gov-about__body h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gov-ink);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
.gov-about__body p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #475569;
  margin-bottom: 0.875rem;
}
.gov-about__body hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 1.5rem 0;
}
.gov-about__body ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}
.gov-about__body li {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #475569;
  margin-bottom: 0.35rem;
}
.gov-about__body strong {
  color: var(--gov-ink);
  font-weight: 600;
}
.gov-about__signature {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
}
.gov-about__signature p {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--gov-ink);
  font-style: italic;
}

/* Legacy compat */
.gov-editor-btn { display: none; }

[contenteditable] blockquote {
  border-left: 3px solid #cbd5e1;
  padding-left: 0.75rem;
  color: #64748b;
  margin: 0.25rem 0;
}

/* Expiring post badge */
.gov-expiry-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #6366f1;
  background: #eef2ff;
  border: 1px solid #a5b4fc;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
}

/* Toast notification */
.gov-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(1rem);
  background: #1e1b4b;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
  pointer-events: none;
}
.gov-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.gov-pagination a {
  text-decoration: none;
}

.gov-map-popup {
  font-size: 0.8125rem;
  line-height: 1.4;
  max-width: 220px;
}

.gov-map-popup a {
  color: #4f46e5;
  font-weight: 600;
}

.gov-leaflet-map.leaflet-container {
  width: 100%;
  min-height: 520px;
  z-index: 0;
  border-radius: 1rem;
  background: #e2e8f0;
}
