.reurb-portal {
  --reurb-accent: #00a878;
  --reurb-accent-dark: #08745e;
  --reurb-surface: #ffffff;
  --reurb-soft: #f4f8fd;
  --reurb-border: #d9e1ec;
  --reurb-text: #1f2937;
  --reurb-muted: #5f6b7a;
  display: grid;
  gap: 24px;
  min-width: 0;
  padding-bottom: 38px;
  text-align: left;
}

#justificar.reurb-portal,
#justificar.reurb-portal h1,
#justificar.reurb-portal h2,
#justificar.reurb-portal h3,
#justificar.reurb-portal p,
#justificar.reurb-portal li,
#justificar.reurb-portal td {
  text-align: left;
}

.reurb-portal code {
  color: var(--primary-dark);
}

.reurb-kicker {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.reurb-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: stretch;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--reurb-border);
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fbff 0%, #eaf2fc 100%);
}

.reurb-hero > *,
.reurb-section-panel > *,
.reurb-contact > * {
  min-width: 0;
}

.reurb-hero h1,
.reurb-section-heading h2,
.reurb-contact h2 {
  margin: 0;
  color: var(--primary-dark);
  font-weight: 900;
  line-height: 1.08;
}

.reurb-hero h1 {
  max-width: 760px;
  font-size: clamp(1.8rem, 4vw, 3.35rem);
  overflow-wrap: anywhere;
}

.reurb-hero p,
.reurb-section-heading p,
.reurb-info-card p,
.reurb-step-card p,
.reurb-contact p {
  color: var(--reurb-muted);
  line-height: 1.65;
}

.reurb-hero__actions,
.reurb-contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.reurb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.reurb-btn:hover,
.reurb-btn:focus-visible {
  transform: translateY(-1px);
}

.reurb-btn--primary {
  background: var(--primary);
  color: #ffffff;
}

.reurb-btn--primary:hover,
.reurb-btn--primary:focus-visible {
  background: var(--primary-dark);
  color: #ffffff;
}

.reurb-btn--secondary {
  border-color: var(--primary);
  background: #ffffff;
  color: var(--primary);
}

.reurb-btn--secondary:hover,
.reurb-btn--secondary:focus-visible {
  background: #eef5ff;
  color: var(--primary-dark);
}

.reurb-hero__panel {
  display: grid;
  gap: 12px;
}

.reurb-hero__panel div {
  display: grid;
  gap: 2px;
  align-content: center;
  min-height: 96px;
  padding: 16px;
  border: 1px solid rgba(3, 57, 129, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
}

.reurb-hero__panel strong {
  color: var(--primary);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1;
}

.reurb-hero__panel span {
  color: var(--reurb-muted);
  font-weight: 700;
}

.reurb-grid {
  display: grid;
  gap: 18px;
}

.reurb-grid--intro {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.reurb-info-card,
.reurb-section-panel,
.reurb-contact {
  border: 1px solid var(--reurb-border);
  border-radius: 8px;
  background: var(--reurb-surface);
  box-shadow: 0 10px 24px rgba(12, 35, 55, 0.07);
}

.reurb-info-card {
  display: grid;
  gap: 10px;
  padding: clamp(18px, 2.4vw, 24px);
}

.reurb-info-card i {
  color: var(--reurb-accent-dark);
  font-size: 1.75rem;
}

.reurb-info-card h2,
.reurb-step-card h3 {
  margin: 0;
  color: var(--primary-dark);
  font-size: 1.1rem;
  font-weight: 900;
}

.reurb-info-card p,
.reurb-step-card p {
  margin: 0;
}

.reurb-section-panel {
  display: grid;
  gap: 22px;
  padding: clamp(18px, 3vw, 30px);
}

.reurb-section-heading {
  max-width: 850px;
}

.reurb-section-heading h2 {
  font-size: clamp(1.45rem, 2.8vw, 2.15rem);
}

.reurb-steps {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 14px;
  align-items: center;
}

.reurb-step-track {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  transition: height 0.25s ease;
}

.reurb-step-card {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  gap: 14px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid #cfdbea;
  border-radius: 8px;
  background: var(--reurb-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateX(0);
}

.reurb-step-card.is-active {
  opacity: 1;
  pointer-events: auto;
}

.reurb-step-card.is-entering-forward {
  animation: reurb-step-enter-forward 0.5s ease both;
}

.reurb-step-card.is-entering-backward {
  animation: reurb-step-enter-backward 0.5s ease both;
}

.reurb-step-card.is-leaving-forward {
  animation: reurb-step-leave-forward 0.5s ease both;
  z-index: 1;
}

.reurb-step-card.is-leaving-backward {
  animation: reurb-step-leave-backward 0.5s ease both;
  z-index: 1;
}

@keyframes reurb-step-enter-forward {
  from { opacity: 0; transform: translateX(72px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes reurb-step-leave-forward {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-72px); }
}

@keyframes reurb-step-enter-backward {
  from { opacity: 0; transform: translateX(-72px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes reurb-step-leave-backward {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(72px); }
}

.reurb-step-card__number {
  width: max-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e4eefb;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.reurb-step-card i {
  color: var(--reurb-accent-dark);
  font-size: 2rem;
}

.reurb-step-nav {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
}

.reurb-step-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.reurb-step-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.reurb-step-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #b9c7d8;
}

.reurb-step-dots button.is-active {
  width: 26px;
  background: var(--primary);
}

.reurb-macro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 22px;
  align-items: start;
}

.reurb-search {
  position: relative;
  display: block;
  margin: 0 0 14px;
}

.reurb-search i {
  position: absolute;
  top: 50%;
  left: 14px;
  color: #6b7a8c;
  transform: translateY(-50%);
}

.reurb-search input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px 10px 42px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--reurb-text);
}

.reurb-search input:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(7, 106, 222, 0.15);
}

.reurb-macro-cards {
  display: grid;
  gap: 10px;
  max-height: 560px;
  overflow: auto;
  padding-right: 6px;
}

.reurb-macro-card {
  overflow: hidden;
  border: 1px solid var(--reurb-border);
  border-radius: 8px;
  background: #ffffff;
}

.reurb-macro-card.is-hidden {
  display: none;
}

.reurb-macro-card.is-highlighted {
  border-color: var(--reurb-accent);
  box-shadow: 0 0 0 3px rgba(0, 168, 120, 0.14);
}

.reurb-macro-card__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  color: var(--reurb-text);
  text-align: left;
}

.reurb-macro-card__toggle strong,
.reurb-macro-card__toggle small {
  display: block;
}

.reurb-macro-card__toggle strong {
  color: var(--primary-dark);
}

.reurb-macro-card__toggle small {
  margin-top: 4px;
  color: var(--reurb-muted);
  font-weight: 700;
}

.reurb-macro-card__toggle i {
  flex: 0 0 auto;
  transition: transform 0.18s ease;
}

.reurb-macro-card__toggle[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.reurb-macro-card__municipios {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--reurb-muted);
  line-height: 1.6;
}

.reurb-map-panel {
  position: sticky;
  top: 16px;
}

.reurb-map {
  width: 100%;
  min-height: 440px;
  overflow: hidden;
  border: 1px solid var(--reurb-border);
  border-radius: 8px;
  background: #e8eef5;
}

.reurb-map-note {
  margin: 10px 0 0;
  color: var(--reurb-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.reurb-table-wrap {
  max-height: 560px;
  overflow: auto;
  border: 1px solid var(--reurb-border);
  border-radius: 8px;
}

.reurb-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #ffffff;
}

.reurb-table th,
.reurb-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #e7edf5;
  vertical-align: top;
}

.reurb-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.reurb-table td:first-child {
  color: var(--primary-dark);
  font-weight: 800;
}

.reurb-table tbody tr:hover {
  background: #f6faff;
}

.reurb-empty {
  margin: 12px 0 0;
  padding: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: var(--reurb-muted);
  text-align: center;
}

.reurb-doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.reurb-doc-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--reurb-border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--reurb-text);
  text-decoration: none;
}

.reurb-doc-link:hover,
.reurb-doc-link:focus-visible {
  border-color: var(--primary);
  background: #f8fbff;
  color: var(--reurb-text);
}

.reurb-doc-link i {
  color: #d8372f;
  font-size: 1.45rem;
}

.reurb-doc-link small,
.reurb-doc-link strong {
  display: block;
}

.reurb-doc-link small {
  margin-bottom: 5px;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.reurb-doc-link strong {
  line-height: 1.35;
}

.reurb-contact {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: clamp(20px, 3vw, 30px);
  background: linear-gradient(135deg, #f8fbff, #eef7f3);
}

.reurb-contact p {
  margin-bottom: 0;
}

.reurb-contact > div:first-child {
  flex: 1 1 auto;
}

.reurb-contact__actions {
  display: grid;
  flex: 0 0 220px;
  gap: 12px;
  width: 220px;
  margin-top: 0;
}

.reurb-contact__actions .reurb-btn {
  width: 100%;
}

.reurb-back-to-top {
  position: fixed;
  right: 18px;
  bottom: 84px;
  z-index: 1040;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(5, 35, 75, 0.28);
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.reurb-back-to-top[hidden] {
  display: none;
}

.reurb-back-to-top:hover,
.reurb-back-to-top:focus-visible {
  background: var(--primary-dark);
  color: #ffffff;
  transform: translateY(-2px);
}

.reurb-back-to-top:focus-visible {
  outline: 3px solid rgba(7, 106, 222, 0.24);
  outline-offset: 3px;
}

.reurb-classificacao-content,
.reurb-documentos-content {
  min-width: 0;
}

.reurb-macro-disclosure {
  min-width: 0;
}

.reurb-macro-disclosure__summary {
  display: none;
}

.reurb-macro-disclosure:not([open]) > .macroregioes-lista {
  display: block;
}

.reurb-classificacao-content .macroregioes-card.is-mapa-hover {
  border-color: #f59e0b;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.18);
}

.reurb-classificacao-content .macroregioes-card.is-mapa-hover .macroregioes-toggle {
  background: #fff7ed;
  box-shadow: inset 5px 0 0 #f59e0b;
  color: #92400e;
}

.reurb-classificacao-content .macroregioes-card.is-mapa-hover .macroregioes-toggle-titulo span {
  color: #9a3412;
}

.reurb-documentos-content .credenciamento-destaques {
  margin-bottom: clamp(28px, 4vw, 44px);
}

.reurb-documentos-content .credenciamento-todos {
  margin-bottom: 0;
}

body.tema-escuro .reurb-portal {
  --reurb-surface: #121a26;
  --reurb-soft: #0f1623;
  --reurb-border: #2d3742;
  --reurb-text: #f1f5f9;
  --reurb-muted: #c8d2dd;
}

body.tema-escuro .reurb-hero,
body.tema-escuro .reurb-contact {
  background: #121a26;
}

body.tema-escuro .reurb-hero__panel div,
body.tema-escuro .reurb-macro-card,
body.tema-escuro .reurb-table,
body.tema-escuro .reurb-doc-link,
body.tema-escuro .reurb-search input {
  background: #0f1623;
  border-color: #2d3742;
  color: #f1f5f9;
}

body.tema-escuro .reurb-hero h1,
body.tema-escuro .reurb-section-heading h2,
body.tema-escuro .reurb-contact h2,
body.tema-escuro .reurb-info-card h2,
body.tema-escuro .reurb-step-card h3,
body.tema-escuro .reurb-table td:first-child,
body.tema-escuro .reurb-macro-card__toggle strong {
  color: var(--primary-light);
}

body.tema-escuro .reurb-btn--secondary {
  background: #0f1623;
  color: #f1f5f9;
}

body.tema-escuro .reurb-step-card,
body.tema-escuro .reurb-table th {
  border-color: #2d3742;
  background: #172233;
}

body.tema-escuro .reurb-table th {
  color: #ffffff;
}

body.tema-escuro .reurb-table th,
body.tema-escuro .reurb-table td {
  border-bottom-color: #2d3742;
}

body.tema-escuro .reurb-table tbody tr:hover,
body.tema-escuro .reurb-doc-link:hover,
body.tema-escuro .reurb-doc-link:focus-visible {
  background: #172233;
}

body.tema-escuro .reurb-map {
  border-color: #2d3742;
  background: #0f1623;
}

body.tema-escuro .reurb-classificacao-content .macroregioes-card.is-mapa-hover {
  border-color: #fbbf24;
  box-shadow: 0 10px 24px rgba(251, 191, 36, 0.16);
}

body.tema-escuro .reurb-classificacao-content .macroregioes-card.is-mapa-hover .macroregioes-toggle {
  background: #2a2111;
  box-shadow: inset 5px 0 0 #fbbf24;
  color: #fde68a;
}

body.tema-escuro .reurb-classificacao-content .macroregioes-card.is-mapa-hover .macroregioes-toggle-titulo span {
  color: #fcd34d;
}

body.tema-escuro .reurb-macro-disclosure__summary {
  border-color: #2d3742;
  background: #121a26;
  color: #bfdbfe;
}

@media (min-width: 1081px) {
  .reurb-classificacao-content .macroregioes-accordion {
    max-height: min(65vh, 620px);
    overflow-y: auto;
    padding-right: 6px;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 #eef2f7;
  }

  .reurb-classificacao-content .macroregioes-accordion::-webkit-scrollbar {
    width: 10px;
  }

  .reurb-classificacao-content .macroregioes-accordion::-webkit-scrollbar-track {
    border-radius: 999px;
    background: #eef2f7;
  }

  .reurb-classificacao-content .macroregioes-accordion::-webkit-scrollbar-thumb {
    border: 2px solid #eef2f7;
    border-radius: 999px;
    background: #94a3b8;
  }

  body.tema-escuro .reurb-classificacao-content .macroregioes-accordion {
    scrollbar-color: #526276 #172233;
  }

  body.tema-escuro .reurb-classificacao-content .macroregioes-accordion::-webkit-scrollbar-track {
    background: #172233;
  }

  body.tema-escuro .reurb-classificacao-content .macroregioes-accordion::-webkit-scrollbar-thumb {
    border-color: #172233;
    background: #526276;
  }
}

@media (max-width: 980px) {
  .reurb-hero,
  .reurb-grid--intro,
  .reurb-macro-layout {
    grid-template-columns: 1fr;
  }

  .reurb-map-panel {
    position: static;
  }
}

@media (max-width: 1080px) {
  .reurb-classificacao-content .macroregioes-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .reurb-classificacao-content .reurb-macro-disclosure {
    order: 1;
  }

  .reurb-macro-disclosure__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 54px;
    padding: 14px 16px;
    border: 1px solid var(--reurb-border);
    border-radius: 8px;
    background: var(--reurb-surface);
    color: var(--primary-dark);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 800;
    list-style: none;
  }

  .reurb-macro-disclosure__summary::-webkit-details-marker {
    display: none;
  }

  .reurb-macro-disclosure__summary:focus-visible {
    outline: 3px solid rgba(7, 106, 222, 0.22);
    outline-offset: 2px;
  }

  .reurb-macro-disclosure__summary i {
    flex: 0 0 auto;
    transition: transform 0.2s ease;
  }

  .reurb-macro-disclosure[open] > .reurb-macro-disclosure__summary {
    margin-bottom: 16px;
  }

  .reurb-macro-disclosure[open] > .reurb-macro-disclosure__summary i {
    transform: rotate(180deg);
  }

  .reurb-macro-disclosure:not([open]) > .macroregioes-lista {
    display: none;
  }

  .reurb-classificacao-content .macroregioes-mapa-painel {
    position: static;
    order: 2;
  }
}

@media (max-width: 720px) {
  .reurb-hero,
  .reurb-section-panel,
  .reurb-contact {
    padding-inline: 16px;
  }

  .reurb-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .reurb-step-nav {
    width: 100%;
  }

  .reurb-step-nav[data-reurb-step-prev] {
    grid-column: 1;
    grid-row: 2;
  }

  .reurb-step-nav[data-reurb-step-next] {
    grid-column: 2;
    grid-row: 2;
  }

  .reurb-step-track {
    grid-column: 1 / -1;
    grid-row: 1;
    height: auto;
    min-height: 0;
  }

  .reurb-step-card {
    position: relative;
    inset: auto;
    display: none;
    align-content: start;
    min-height: 0;
    padding: clamp(16px, 5vw, 24px);
    gap: 11px;
    opacity: 1;
  }

  .reurb-step-card.is-active,
  .reurb-step-card.is-entering-forward,
  .reurb-step-card.is-entering-backward {
    display: grid;
  }

  .reurb-step-card.is-leaving-forward,
  .reurb-step-card.is-leaving-backward {
    position: absolute;
    inset: 0;
    display: grid;
    pointer-events: none;
  }

  .reurb-step-card h3 {
    font-size: clamp(0.98rem, 4.7vw, 1.1rem);
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .reurb-step-card p {
    font-size: clamp(0.86rem, 4vw, 1rem);
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  .reurb-step-card i {
    font-size: clamp(1.55rem, 7vw, 1.9rem);
  }

  .reurb-step-card__number {
    padding: 4px 8px;
    font-size: clamp(0.68rem, 3vw, 0.76rem);
  }

  .reurb-map {
    min-height: 340px;
  }

  .reurb-contact {
    align-items: stretch;
    flex-direction: column;
  }

  .reurb-contact__actions,
  .reurb-hero__actions {
    flex-direction: column;
  }

  .reurb-contact__actions {
    flex-basis: auto;
    width: 100%;
  }

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

@media (prefers-reduced-motion: reduce) {
  .reurb-step-card.is-entering-forward,
  .reurb-step-card.is-entering-backward,
  .reurb-step-card.is-leaving-forward,
  .reurb-step-card.is-leaving-backward {
    animation-duration: 0.01ms;
  }
}
