/* ==========================================================================
   Portal PCCR da Paraíba · Sistema Visual Institucional Contemporâneo
   Simplicidade, clareza tipográfica, rigor editorial e acessibilidade (WCAG)
   ========================================================================== */

:root {
  /* Identidade institucional Paraíba */
  --pb-navy: #0b3b75;
  --pb-navy-deep: #07264d;
  --pb-navy-hover: #082e5c;
  --pb-link: #0a4f96;
  --pb-tint: #f0f5fb;
  --pb-amber: #c76d18;

  /* Superfícies neutras e respiração visual */
  --bg-page: #ffffff;
  --bg-band: #f6f8fb;
  --bg-subtle: #f1f4f8;
  --bg-hover: #f8fafc;

  /* Hierarquia tipográfica (contraste AA/AAA sobre branco) */
  --ink-1: #0f172a;
  --ink-2: #334155;
  --ink-3: #526071;
  --ink-inverse: #ffffff;

  /* Linhas estruturais sutis */
  --line-subtle: #e2e8f0;
  --line-default: #cbd5e1;
  --line-strong: #94a3b8;

  /* Estados semânticos (sempre acompanhados de texto e indicador visual) */
  --ok-dot: #15803d;
  --ok-bg: #f0fdf4;
  --ok-border: #bbf7d0;
  --ok-ink: #14532d;

  --info-dot: #0a4f96;
  --info-bg: #eff6ff;
  --info-border: #bfdbfe;
  --info-ink: #1e3a8a;

  --warn-dot: #b45309;
  --warn-bg: #fffbeb;
  --warn-border: #fde68a;
  --warn-ink: #78350f;

  --danger-dot: #b91c1c;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --danger-ink: #7f1d1d;

  --neutral-dot: #64748b;
  --neutral-bg: #f8fafc;
  --neutral-border: #e2e8f0;
  --neutral-ink: #334155;

  /* Geometria e ritmo */
  --radius-xs: 7px;
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 12px 36px rgba(15, 23, 42, 0.09);

  --container-max: 1180px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-1);
  background: var(--bg-page);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

:focus-visible {
  outline: 2.5px solid var(--pb-navy);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 1000;
  background: var(--pb-navy-deep);
  color: var(--ink-inverse);
  padding: 10px 16px;
  border-radius: var(--radius-xs);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 28px;
}

a {
  color: var(--pb-link);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  background: var(--bg-subtle);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ==========================================================================
   Cabeçalho Institucional + Navegação Principal
   ========================================================================== */

.institutional-banner {
  background: linear-gradient(90deg, var(--pb-navy-deep) 0%, var(--pb-navy) 50%, var(--pb-navy-deep) 100%);
  color: var(--ink-inverse);
  border-top: 3px solid var(--pb-amber);
  border-bottom: 3px solid var(--pb-amber);
}

.banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 90px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.banner-brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  width: 100%;
  text-decoration: none;
  color: var(--ink-inverse);
  min-width: 0;
}

.banner-brand:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
  border-radius: var(--radius-xs);
}

.banner-inst-group {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.banner-unit-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  text-align: right;
  gap: 1px;
}

.banner-eyebrow {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  line-height: 1.18;
  margin-bottom: 1px;
  white-space: nowrap;
}

.banner-unit-line {
  font-size: 0.67rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.2;
  white-space: nowrap;
}

.banner-gov-logo {
  height: 60px;
  width: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.banner-observatory {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2px 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  min-width: 0;
}

.banner-site-name {
  font-family: var(--font-display);
  font-size: clamp(1.28rem, 2.05vw, 1.62rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.18;
}

.banner-site-subtitle {
  margin-top: 4px;
  font-size: 0.83rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.38;
  text-wrap: balance;
}

.mobile-menu-btn {
  display: none;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-radius: var(--radius-xs);
  min-width: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.subnav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-subtle);
}

.subnav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 54px;
}

.primary-nav {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.primary-nav::-webkit-scrollbar {
  display: none;
}

.nav-btn {
  appearance: none;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ink-3);
  font-family: inherit;
  font-size: 0.89rem;
  font-weight: 500;
  padding: 15px 12px 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.primary-nav .nav-btn:first-child {
  padding-left: 0;
}

.nav-btn:hover {
  color: var(--ink-1);
}

.nav-btn[aria-current="page"] {
  color: var(--pb-navy-deep);
  font-weight: 600;
  border-bottom-color: var(--pb-navy);
}

.nav-count {
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--ink-2);
}

.nav-btn[aria-current="page"] .nav-count {
  background: var(--pb-navy);
  color: #ffffff;
}

.subnav-ref {
  font-size: 0.79rem;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.subnav-ref a {
  color: var(--pb-link);
  font-weight: 600;
  text-decoration: none;
}

.subnav-ref a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mobile-nav-panel {
  border-bottom: 1px solid var(--line-subtle);
  background: var(--bg-page);
  padding: 8px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-panel[hidden] {
  display: none;
}

.mobile-nav-panel .nav-btn {
  border-bottom: none;
  border-left: 3px solid transparent;
  padding: 12px 14px;
  justify-content: space-between;
  border-radius: var(--radius-xs);
}

.mobile-nav-panel .nav-btn[aria-current="page"] {
  background: var(--pb-tint);
  border-left-color: var(--pb-navy);
}

/* ==========================================================================
   Apresentação Inicial (Hero Editorial) + Indicadores + Legenda de Estados
   ========================================================================== */

main {
  flex: 1;
}

.hero-band {
  background: var(--bg-band);
  border-bottom: 1px solid var(--line-subtle);
  padding: 44px 0 32px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(270px, 0.85fr);
  gap: 48px;
  align-items: start;
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.9vw, 2.38rem);
  font-weight: 700;
  letter-spacing: -0.032em;
  line-height: 1.13;
  color: var(--ink-1);
  max-width: 21ch;
}

.hero-lead {
  margin: 14px 0 0;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 55ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-guide {
  background: transparent;
  border: none;
  border-left: 2px solid var(--line-subtle);
  border-radius: 0;
  padding: 2px 0 2px 24px;
}

.hero-guide-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pb-navy);
  margin-bottom: 12px;
}

.hero-guide-steps {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.87rem;
  line-height: 1.54;
  color: var(--ink-2);
}

.hero-guide-steps strong {
  color: var(--ink-1);
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid var(--line-subtle);
}

.kpi-item {
  padding: 2px 24px 2px 0;
  border-right: 1px solid var(--line-subtle);
  margin-right: 24px;
}

.kpi-item:first-child {
  padding-left: 0;
}

.kpi-item:last-child {
  border-right: none;
  margin-right: 0;
  padding-right: 0;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 1.72rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  color: var(--pb-navy-deep);
  line-height: 1.08;
}

.kpi-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-1);
  margin-top: 6px;
}

.kpi-note {
  font-size: 0.8rem;
  color: var(--ink-3);
  margin-top: 3px;
  line-height: 1.42;
}

.states-legend-details {
  margin-top: 24px;
  background: transparent;
  border: none;
  border-top: 1px solid var(--line-subtle);
  border-radius: 0;
}

.states-legend-summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 0 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--pb-navy);
}

.states-legend-summary:hover {
  color: var(--pb-navy-deep);
}

.states-legend-summary::-webkit-details-marker {
  display: none;
}

.states-legend-details[open] .summary-chevron {
  transform: rotate(180deg);
}

.summary-chevron {
  transition: transform 0.16s ease;
  color: var(--ink-3);
}

.states-legend-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 24px;
  padding: 16px 0 4px;
  border-top: none;
}

.state-legend-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.81rem;
  line-height: 1.48;
  color: var(--ink-2);
}

/* ==========================================================================
   Botões Padronizados (3 variantes claras)
   ========================================================================== */

.btn {
  appearance: none;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.2;
  padding: 9px 16px;
  min-height: 40px;
  border-radius: var(--radius-xs);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.btn-sm {
  font-size: 0.82rem;
  padding: 7px 13px;
  min-height: 36px;
}

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

.btn-primary:hover {
  background: var(--pb-navy-hover);
  border-color: var(--pb-navy-hover);
}

.btn-secondary {
  background: var(--bg-page);
  color: var(--ink-1);
  border-color: var(--line-default);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--line-strong);
}

.btn-secondary[aria-pressed="true"] {
  background: var(--pb-tint);
  border-color: var(--pb-navy);
  color: var(--pb-navy-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--bg-subtle);
  color: var(--ink-1);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-tray-primary {
  background: #ffffff;
  color: var(--pb-navy-deep);
  border-color: #ffffff;
}

.btn-tray-primary:hover {
  background: #e2e8f0;
}

.btn-tray-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-tray-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Área Principal: Busca, Filtros e Catálogo
   ========================================================================== */

.workspace {
  padding-top: 38px;
  padding-bottom: 72px;
}

.controls-panel {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line-subtle);
}

.search-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-field {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  font-size: 1.15rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  font-family: inherit;
  font-size: 0.94rem;
  color: var(--ink-1);
  background: var(--bg-page);
  border: 1px solid var(--line-default);
  border-radius: var(--radius-sm);
  padding: 11px 40px 11px 42px;
  min-height: 44px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.search-input:hover {
  border-color: var(--line-strong);
}

.search-input:focus {
  outline: none;
  border-color: var(--pb-navy);
  box-shadow: 0 0 0 3px rgba(11, 59, 117, 0.12);
}

.search-clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: var(--bg-subtle);
  color: var(--ink-2);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-clear-btn[hidden] {
  display: none;
}

.sort-select {
  min-width: 220px;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.filter-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-2);
}

.filter-select {
  width: 100%;
  font-family: inherit;
  font-size: 0.86rem;
  color: var(--ink-1);
  background: var(--bg-page);
  border: 1px solid var(--line-default);
  border-radius: var(--radius-xs);
  padding: 9px 12px;
  min-height: 40px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.filter-select:hover {
  border-color: var(--line-strong);
}

.filter-select:focus {
  outline: none;
  border-color: var(--pb-navy);
  box-shadow: 0 0 0 3px rgba(11, 59, 117, 0.12);
}

.filter-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.filter-logic-note {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-3);
}

.export-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.export-reason {
  font-size: 0.8rem;
  color: var(--warn-ink);
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 24px 0 16px;
}

.results-count {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-1);
}

.active-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--pb-tint);
  border: 1px solid #c7daf2;
  color: var(--pb-navy-deep);
  border-radius: var(--radius-pill);
  padding: 4px 10px 4px 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.filter-chip button {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--pb-navy-deep);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 2px;
  border-radius: 50%;
}

/* ==========================================================================
   Diretório de Carreiras (Grupos + Linhas Editoriais Limpas)
   ========================================================================== */

.plan-group-section {
  margin-bottom: 44px;
}

.plan-group-section:last-child {
  margin-bottom: 0;
}

.plan-group-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--line-subtle);
}

.plan-group-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-1);
}

.plan-group-sub {
  font-size: 0.83rem;
  color: var(--ink-3);
  margin-left: 8px;
  font-weight: 400;
}

.plan-group-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.plan-group-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.plan-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 1fr) auto;
  gap: 14px 28px;
  align-items: start;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 22px 16px;
  margin: 0 -16px;
  transition: background-color 0.15s ease;
}

.plan-row::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 1px;
  background: var(--line-subtle);
  pointer-events: none;
}

.plan-row:hover {
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
}

.plan-identity {
  min-width: 0;
}

.plan-sigla-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.plan-sigla {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--pb-navy-deep);
  background: var(--pb-tint);
  border: 1px solid transparent;
  padding: 2px 8px;
  border-radius: 5px;
  white-space: nowrap;
}

.plan-ambito {
  font-size: 0.8rem;
  color: var(--ink-3);
}

.plan-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.018em;
  color: var(--ink-1);
  line-height: 1.32;
}

.plan-sigla-meaning {
  margin: 3px 0 0;
  font-size: 0.81rem;
  color: var(--ink-3);
}

.plan-status-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 11px;
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-2);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-ok { background: var(--ok-dot); }
.dot-info { background: var(--info-dot); }
.dot-warn { background: var(--warn-dot); }
.dot-danger { background: var(--danger-dot); }
.dot-neutral { background: var(--neutral-dot); }

.tag-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--neutral-border);
  background: var(--neutral-bg);
  color: var(--neutral-ink);
  white-space: nowrap;
}

.tag-ok { background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok-ink); }
.tag-info { background: var(--info-bg); border-color: var(--info-border); color: var(--info-ink); }
.tag-warn { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn-ink); }
.tag-danger { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger-ink); }

.plan-remun-col {
  min-width: 0;
}

.plan-remun-type {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  color: var(--ink-3);
  margin-bottom: 5px;
}

.plan-remun-value {
  margin: 0;
  font-size: 0.89rem;
  line-height: 1.54;
  color: var(--ink-1);
  font-variant-numeric: tabular-nums;
}

.plan-source-mini {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--ink-3);
}

.plan-source-mini a {
  color: var(--pb-link);
  text-decoration: none;
  font-weight: 500;
}

.plan-source-mini a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.plan-actions-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 136px;
}

/* Expansão rápida dentro do cartão */
.plan-row > .plan-cargos-details {
  grid-column: 1 / -1;
  border-top: none;
  padding-top: 2px;
  margin-top: 0;
}

.plan-cargos-summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--pb-link);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
}

.plan-cargos-summary:hover {
  color: var(--pb-navy-deep);
}

.plan-cargos-summary::-webkit-details-marker {
  display: none;
}

.plan-cargos-summary::before {
  content: "▸";
  font-size: 0.82rem;
  transition: transform 0.15s ease;
}

.plan-cargos-details[open] > .plan-cargos-summary::before {
  transform: rotate(90deg);
}

.plan-cargos-body {
  margin-top: 12px;
  background: var(--bg-band);
  border: none;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 0.84rem;
}

.plan-cargos-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 20px;
  align-items: start;
}

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

.plan-cargo-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 14px;
  padding: 8px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-subtle);
  border-radius: 0;
}

.plan-cargo-item:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

.plan-cargo-regime {
  color: var(--ink-3);
  font-weight: 400;
  font-size: 0.8rem;
}

.plan-cargo-range {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--pb-navy-deep);
  white-space: nowrap;
}

.plan-cargos-empty {
  margin: 0;
  color: var(--ink-2);
}

.plan-prog-mini {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-subtle);
  color: var(--ink-2);
  line-height: 1.5;
}

.plan-mini-matrix {
  background: var(--bg-page);
  border: none;
  border-radius: var(--radius-xs);
  padding: 12px 14px;
}

.plan-mini-matrix-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pb-navy);
  margin-bottom: 8px;
}

/* ==========================================================================
   Seções Secundárias: Comparar, Direitos, Governança e Glossário
   ========================================================================== */

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-subtle);
}

.section-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.18;
  color: var(--ink-1);
}

.section-header p {
  margin: 8px 0 0;
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 60ch;
}

.section-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.section-subheader {
  margin: 36px 0 16px;
}

.section-subheader h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-1);
}

.section-subheader p {
  margin: 5px 0 0;
  font-size: 0.89rem;
  color: var(--ink-3);
}

/* Comparador Seguro */
.compare-selector-bar {
  background: var(--bg-band);
  border: none;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.compare-picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.compare-select {
  flex: 1 1 280px;
  max-width: 440px;
}

.compare-selected-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.compat-banner {
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 22px;
  border: 1px solid var(--warn-border);
  background: var(--warn-bg);
  color: var(--warn-ink);
}

.compat-banner-ok {
  border-color: var(--ok-border);
  background: var(--ok-bg);
  color: var(--ok-ink);
}

.compat-banner-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.compat-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 4px;
  background: #b45309;
  color: #ffffff;
}

.compat-banner-ok .compat-badge {
  background: var(--ok-dot);
}

.compat-reasons {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 0.86rem;
  line-height: 1.54;
}

.compare-col-head {
  min-width: 230px;
}

.compare-col-head-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 112px;
  gap: 10px;
}

.compare-col-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--ink-1);
  text-transform: none;
  letter-spacing: -0.01em;
  line-height: 1.32;
  margin-top: 5px;
}

.compare-col-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.compare-row-label {
  min-width: 190px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--bg-band);
}

.compare-mobile-cards {
  display: none;
}

/* Tabelas Responsivas */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: none;
  border-top: 1px solid var(--line-subtle);
  border-bottom: 1px solid var(--line-subtle);
  border-radius: 0;
  background: var(--bg-page);
}

.table-scroll-hint {
  display: none;
  font-size: 0.78rem;
  color: var(--ink-3);
  margin-bottom: 6px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 14px 14px;
  border-bottom: 1px solid var(--line-subtle);
  vertical-align: top;
  line-height: 1.52;
}

.data-table thead th {
  background: var(--bg-band);
  border-bottom: 1px solid var(--line-default);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  color: var(--ink-3);
}

.data-table tbody tr:last-child td,
.data-table tbody tr:last-child th {
  border-bottom: none;
}

.data-table a,
.drawer-body a {
  color: var(--pb-link);
  text-decoration: none;
  font-weight: 500;
}

.data-table a:hover,
.drawer-body a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.salary-table th,
.salary-table td {
  padding: 12px 10px;
}

.salary-table td:first-child,
.salary-table th:first-child {
  min-width: 170px;
  padding-left: 2px;
}

.salary-table .col-money {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--pb-navy-deep);
}

.salary-table thead th.col-money {
  color: var(--ink-3);
}

.salary-table .col-regime,
.salary-table .col-source,
.salary-table .col-source a {
  white-space: nowrap;
}

/* Direitos e Vantagens */
.scope-notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 28px;
  font-size: 0.88rem;
  line-height: 1.58;
  color: var(--info-ink);
}

.scope-notice-badge {
  flex-shrink: 0;
  background: var(--pb-navy);
  color: #ffffff;
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  border-radius: var(--radius-xs);
  margin-top: 2px;
}

.direitos-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.direito-card {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-subtle);
  border-radius: 0;
  padding: 26px 0;
}

.direito-card:first-child {
  padding-top: 6px;
}

.direito-card h3 {
  margin: 10px 0 18px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--ink-1);
}

.direito-fields-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 28px;
}

.direito-field-label {
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  margin-bottom: 4px;
}

.direito-field-value {
  font-size: 0.87rem;
  color: var(--ink-1);
  line-height: 1.52;
}

.laws-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.law-card {
  background: var(--bg-page);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease;
}

.law-card:hover {
  border-color: var(--line-default);
}

.law-card a {
  margin-top: auto;
  padding-top: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
}

.law-card a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Governança e Datas */
.dates-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line-subtle);
}

.date-card {
  background: transparent;
  border: none;
  border-right: 1px solid var(--line-subtle);
  border-radius: 0;
  padding: 2px 22px 2px 0;
  margin-right: 22px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.date-card:last-child {
  border-right: none;
  margin-right: 0;
  padding-right: 0;
}

.date-card-label {
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}

.date-card-value {
  font-family: var(--font-display);
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  color: var(--pb-navy-deep);
}

.date-card-note {
  font-size: 0.8rem;
  color: var(--ink-2);
  line-height: 1.44;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.table-toolbar h3 {
  margin: 0;
}

.segmented-control {
  display: inline-flex;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: var(--radius-xs);
  gap: 2px;
}

.seg-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.seg-btn[aria-pressed="true"] {
  background: var(--bg-page);
  color: var(--pb-navy-deep);
  box-shadow: var(--shadow-sm);
}

/* Glossário */
.glossary-search-bar {
  max-width: 520px;
  margin-bottom: 16px;
}

.glossary-search-bar .search-input {
  padding-left: 14px;
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 36px;
}

.glossary-card {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-subtle);
  border-radius: 0;
  padding: 20px 0;
}

.glossary-cat {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  color: var(--pb-navy);
}

.glossary-term {
  margin: 5px 0 8px;
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink-1);
}

.glossary-def {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-2);
  line-height: 1.58;
}

.siglas-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px 28px;
}

.sigla-item {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-subtle);
  border-radius: 0;
  padding: 11px 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sigla-item strong {
  font-size: 0.86rem;
  color: var(--pb-navy-deep);
}

.sigla-item span {
  font-size: 0.81rem;
  color: var(--ink-2);
  line-height: 1.4;
}

/* ==========================================================================
   Drawer de Ficha Completa (5 Abas + Focus Trap)
   ========================================================================== */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: flex-end;
}

.drawer-backdrop[hidden] {
  display: none;
}

.drawer-panel {
  width: min(820px, 100vw);
  height: 100vh;
  background: var(--bg-page);
  border-left: 1px solid var(--line-subtle);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  outline: none;
}

.drawer-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line-subtle);
  background: var(--bg-band);
  flex-shrink: 0;
}

.drawer-topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.drawer-header {
  padding: 20px 28px 16px;
  background: var(--bg-page);
  flex-shrink: 0;
}

.drawer-sigla-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.drawer-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.22;
  color: var(--ink-1);
}

.drawer-tabs {
  display: flex;
  gap: 6px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line-subtle);
  background: var(--bg-page);
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
}

.drawer-tabs::-webkit-scrollbar {
  display: none;
}

.drawer-tab {
  appearance: none;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ink-3);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 12px 10px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.drawer-tab:first-child {
  padding-left: 0;
}

.drawer-tab:hover {
  color: var(--ink-1);
}

.drawer-tab:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--pb-navy);
  border-radius: 5px 5px 0 0;
}

.drawer-tab[aria-selected="true"] {
  color: var(--pb-navy-deep);
  font-weight: 600;
  border-bottom-color: var(--pb-navy);
}

.drawer-body {
  padding: 28px 28px 48px;
  overflow-y: auto;
  flex: 1;
}

.detail-section {
  margin-bottom: 30px;
}

.detail-section:first-child {
  margin-top: 0;
}

.detail-section h3 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink-1);
}

.info-panel {
  background: var(--bg-band);
  border: none;
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  font-size: 0.88rem;
  line-height: 1.58;
  color: var(--ink-2);
}

.info-panel-warn {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-ink);
}

.info-panel-danger {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-ink);
}

.info-panel-info {
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  color: var(--info-ink);
}

.transparency-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: none;
  border-top: 1px solid var(--line-subtle);
  border-bottom: 1px solid var(--line-subtle);
  border-radius: 0;
  overflow: hidden;
}

.transparency-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-subtle);
  border-right: 1px solid var(--line-subtle);
  background: var(--bg-page);
}

.transparency-item:nth-child(odd) {
  padding-left: 0;
}

.transparency-item:nth-child(2n) {
  border-right: none;
  padding-right: 0;
}

.transparency-item:nth-last-child(-n+2) {
  border-bottom: none;
}

.transparency-label {
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  margin-bottom: 4px;
}

.transparency-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-1);
  line-height: 1.44;
}

.remun-summary-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.remun-summary-row {
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  line-height: 1.54;
}

.remun-summary-key {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-3);
}

.remun-summary-val {
  font-size: 0.88rem;
  color: var(--ink-1);
}

.nature-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

/* Componente Visual de Progressão na Carreira (Matriz 2D e Trilha Linear 1D) */
.prog-board {
  background: var(--bg-page);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: none;
}

.prog-board-header {
  background: var(--pb-navy-deep);
  color: #ffffff;
  padding: 20px 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.prog-board-kicker {
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
  margin-bottom: 5px;
}

.prog-board-header .prog-board-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.28;
  color: #ffffff;
}

.prog-board-sub {
  margin-top: 5px;
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.48;
}

.prog-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.prog-board-scope {
  padding: 14px 22px;
  background: var(--bg-page);
  border-bottom: 1px solid var(--line-subtle);
  font-size: 0.84rem;
  line-height: 1.56;
  color: var(--ink-2);
}

.prog-board-scope strong {
  color: var(--ink-1);
}

.prog-board-note {
  padding: 12px 22px;
  background: var(--pb-tint);
  border-bottom: 1px solid #d7e5f5;
  font-size: 0.81rem;
  line-height: 1.56;
  color: var(--pb-navy-deep);
}

.prog-board-canvas {
  background: var(--bg-band);
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-subtle);
}

.prog-axes-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.prog-axis-pill {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.prog-axis-v {
  background: #e6f4f1;
  border-color: transparent;
  color: #0d4b44;
}

.prog-axis-h {
  background: #e8f1fb;
  border-color: transparent;
  color: #08305e;
}

.prog-axis-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

.prog-axis-v .prog-axis-icon {
  background: #0f766e;
  color: #ffffff;
}

.prog-axis-h .prog-axis-icon {
  background: #0b4f8a;
  color: #ffffff;
}

.prog-axis-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.prog-axis-copy strong {
  font-size: 0.79rem;
  font-weight: 700;
  line-height: 1.25;
}

.prog-axis-copy span {
  font-size: 0.75rem;
  line-height: 1.38;
}

.prog-axis-h-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #e8f1fb;
  border: 1px solid transparent;
  color: #08305e;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  margin-bottom: 16px;
}

.prog-axis-h-banner .prog-axis-icon {
  background: #0b4f8a;
  color: #ffffff;
  width: 22px;
  height: 22px;
  margin-top: 0;
}

.prog-matrix-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0 4px;
}

.prog-matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 6px;
  font-size: 0.8rem;
  text-align: center;
}

.prog-matrix-corner {
  font-size: 0.7rem;
  color: var(--ink-3);
  font-weight: 600;
  padding: 6px 8px;
  background: var(--bg-band);
  border-radius: 6px;
}

.prog-matrix-interactive .prog-sticky-col {
  position: sticky;
  left: 0;
  z-index: 2;
}

.prog-matrix-interactive .prog-matrix-corner {
  min-width: 118px;
  text-align: left;
  vertical-align: middle;
}

.prog-axis-v-tag {
  display: block;
  font-size: 0.69rem;
  font-weight: 700;
  color: #0f625b;
  line-height: 1.3;
}

.prog-axis-h-tag {
  display: block;
  font-size: 0.69rem;
  font-weight: 700;
  color: #0b4f8a;
  line-height: 1.3;
  text-align: right;
}

.prog-matrix-col-head {
  background: #0b4f8a;
  color: #ffffff;
  font-weight: 700;
  padding: 8px 8px;
  border-radius: 7px;
  min-width: 64px;
  letter-spacing: 0.02em;
}

.prog-matrix-row-head {
  background: #0f766e;
  color: #ffffff;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 7px;
  vertical-align: middle;
}

.prog-matrix-interactive .prog-matrix-row-head {
  text-align: left;
  box-shadow: 2px 0 6px -2px rgba(15, 23, 42, 0.09);
}

.prog-class-code {
  display: block;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.15;
}

.prog-class-hint {
  display: block;
  font-size: 0.67rem;
  font-weight: 500;
  line-height: 1.28;
  color: rgba(255, 255, 255, 0.92);
  margin-top: 2px;
  max-width: 114px;
  overflow-wrap: break-word;
}

.prog-matrix-cell {
  background: var(--bg-page);
  border: 1px solid var(--line-subtle);
  border-radius: 5px;
  padding: 6px 8px;
  font-weight: 600;
  color: var(--ink-1);
  white-space: nowrap;
}

.prog-matrix-cell-td {
  padding: 0;
}

.prog-cell-btn {
  width: 100%;
  min-height: 44px;
  padding: 8px 6px;
  background: #ffffff;
  border: 1px solid #d5dfe9;
  border-radius: 7px;
  color: var(--ink-1);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.prog-cell-btn:hover {
  border-color: var(--pb-navy);
  background: #f2f7fd;
}

.prog-cell-btn:focus-visible {
  outline: 2.5px solid var(--pb-navy);
  outline-offset: 2px;
  z-index: 3;
}

.prog-cell-btn.is-selected,
.prog-cell-btn.is-selected:hover,
.prog-cell-btn[aria-pressed="true"],
.prog-cell-btn[aria-pressed="true"]:hover {
  background: var(--pb-navy-deep);
  border-color: var(--pb-navy-deep);
  color: #ffffff;
  box-shadow: none;
}

.prog-cell-btn.is-next-h {
  background: #e8f1fb;
  border: 2px solid #0b4f8a;
  color: #07264d;
  padding-right: 18px;
}

.prog-cell-btn.is-next-h::after {
  content: "→";
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  font-weight: 800;
  color: #0b4f8a;
}

.prog-cell-btn.is-next-v {
  background: #e6f4f1;
  border: 2px dashed #0f766e;
  color: #0b423c;
  padding-right: 18px;
}

.prog-cell-btn.is-next-v::after {
  content: "↑";
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  font-weight: 800;
  color: #0f766e;
}

.prog-matrix-table-compact {
  font-size: 0.72rem;
  border-spacing: 3px;
}

.prog-matrix-table-compact .prog-matrix-col-head,
.prog-matrix-table-compact .prog-matrix-row-head,
.prog-matrix-table-compact .prog-matrix-cell {
  padding: 3px 5px;
  min-width: auto;
  border-radius: 4px;
}

.prog-selection-live {
  margin-top: 14px;
  background: #ffffff;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.83rem;
  line-height: 1.54;
  color: var(--ink-2);
}

.prog-live-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  color: var(--ink-1);
}

.prog-live-pos {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: var(--radius-xs);
  background: var(--pb-navy-deep);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.prog-live-paths {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prog-live-path {
  font-size: 0.82rem;
  color: var(--ink-2);
}

.prog-live-h .prog-live-tag {
  font-weight: 700;
  color: #0b4f8a;
}

.prog-live-v .prog-live-tag {
  font-weight: 700;
  color: #0f625b;
}

.prog-live-note {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line-subtle);
  font-size: 0.76rem;
  color: var(--ink-3);
}

/* Trilha linear 1D (ex.: PGE-PB) */
.prog-linear-track {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.prog-linear-step {
  background: #ffffff;
  border: 1px solid var(--line-subtle);
  border-top: 2px solid #0b4f8a;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: none;
}

.prog-linear-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--pb-navy-deep);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.prog-linear-code {
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--pb-navy-deep);
  margin-top: 2px;
}

.prog-linear-sub {
  font-size: 0.8rem;
  line-height: 1.44;
  color: var(--ink-2);
}

.prog-linear-mini {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.prog-linear-pill {
  background: #e8f1fb;
  border: 1px solid transparent;
  color: #07264d;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.prog-linear-arrow {
  color: #0b4f8a;
  font-weight: 800;
  font-size: 0.82rem;
}

/* Modalidades legais e rodapé do componente */
.prog-modalities-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 18px 22px;
  background: var(--bg-page);
  border-bottom: 1px solid var(--line-subtle);
}

.prog-modalities-single {
  grid-template-columns: 1fr;
}

.prog-mod-card {
  background: var(--bg-page);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  padding: 15px 17px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.prog-mod-horizontal {
  border-top: 2px solid #0b4f8a;
}

.prog-mod-vertical {
  border-top: 2px solid #0f766e;
}

.prog-mod-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--ink-1);
}

.prog-mod-symbol {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.prog-mod-horizontal .prog-mod-symbol {
  background: #e8f1fb;
  color: #0b4f8a;
}

.prog-mod-vertical .prog-mod-symbol {
  background: #e6f4f1;
  color: #0f766e;
}

.prog-mod-rule {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.54;
  color: var(--ink-2);
}

.prog-mod-ref {
  margin-top: auto;
  padding-top: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-3);
}

.prog-board-footer {
  padding: 16px 22px 20px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prog-how-to-read {
  font-size: 0.83rem;
  line-height: 1.56;
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.prog-how-title {
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pb-navy-deep);
  margin-bottom: 3px;
}

.prog-disclaimer {
  margin: 0;
  padding: 11px 14px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  line-height: 1.52;
  color: var(--warn-ink);
}

.prog-source-line {
  font-size: 0.8rem;
  line-height: 1.48;
  color: var(--ink-3);
}

.prog-source-line a {
  color: var(--pb-link);
  font-weight: 600;
}

.prog-source-extras {
  font-size: 0.77rem;
  line-height: 1.52;
  color: var(--ink-3);
}

.prog-source-extras a {
  color: var(--pb-link);
  font-weight: 600;
}

/* Badges de status da estrutura (Parcial / Pendente / Não aplicável) */
.prog-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.prog-status-partial {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  color: #78350f;
}

.prog-status-pending {
  background: rgba(254, 243, 199, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.65);
  color: #fde68a;
}

.prog-status-na {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #e2e8f0;
}

.prog-board-header-pending {
  background: #334155;
}

/* Seletor de cargo ou subgrupo */
.prog-subgroup-bar {
  padding: 14px 22px 16px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--line-subtle);
}

.prog-subgroup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.prog-subgroup-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  color: var(--pb-navy-deep);
}

.prog-subgroup-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-3);
  white-space: nowrap;
  flex-shrink: 0;
}

.prog-subgroup-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prog-subgroup-btn {
  appearance: none;
  background: #ffffff;
  border: 1px solid var(--line-default);
  border-radius: var(--radius-pill);
  color: var(--ink-1);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.25;
  padding: 7px 14px;
  min-height: 36px;
  cursor: pointer;
  text-align: left;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.prog-subgroup-btn:hover {
  border-color: var(--pb-navy);
  background: #f0f6fc;
}

.prog-subgroup-btn:focus-visible {
  outline: 2.5px solid var(--pb-navy);
  outline-offset: 2px;
}

.prog-subgroup-btn.is-active,
.prog-subgroup-btn[aria-pressed="true"] {
  background: var(--pb-navy-deep);
  border-color: var(--pb-navy-deep);
  color: #ffffff;
  font-weight: 600;
  box-shadow: none;
}

/* Caixa explícita de pendência / ressalva normativa */
.prog-pendencia-box {
  padding: 12px 22px;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  border-left: 3px solid #d97706;
  font-size: 0.81rem;
  line-height: 1.56;
  color: #78350f;
}

.prog-pendencia-box strong {
  color: #78350f;
}

/* Matriz ampla (9 ou 15 colunas) dentro do container rolável */
.prog-matrix-wide .prog-matrix-col-head {
  min-width: 54px;
  padding: 7px 5px;
  font-size: 0.76rem;
}

.prog-matrix-wide .prog-cell-btn {
  min-width: 54px;
  padding: 7px 5px;
  font-size: 0.77rem;
}

/* Trilha linear interativa (botões em <ol>) */
.prog-linear-step-li {
  display: flex;
}

.prog-linear-track-many {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

button.prog-linear-step {
  width: 100%;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  position: relative;
  transition: background 0.14s ease, border-color 0.14s ease;
}

button.prog-linear-step:hover {
  border-color: var(--pb-navy);
  background: #f2f7fd;
}

button.prog-linear-step:focus-visible {
  outline: 2.5px solid var(--pb-navy);
  outline-offset: 2px;
}

button.prog-linear-step.is-selected,
button.prog-linear-step.is-selected:hover,
button.prog-linear-step[aria-pressed="true"],
button.prog-linear-step[aria-pressed="true"]:hover {
  background: var(--pb-navy-deep);
  border-color: var(--pb-navy-deep);
  border-top-color: #60a5fa;
  color: #ffffff;
  box-shadow: none;
}

button.prog-linear-step.is-selected .prog-linear-num {
  background: #ffffff;
  color: var(--pb-navy-deep);
}

button.prog-linear-step.is-selected .prog-linear-code {
  color: #ffffff;
}

button.prog-linear-step.is-selected .prog-linear-sub {
  color: rgba(255, 255, 255, 0.88);
}

button.prog-linear-step.is-next-h {
  background: #e8f1fb;
  border: 2px solid #0b4f8a;
}

/* Escala sequencial por grupos (DPE, MPPB, TJPB, TCE-PB, UEPB Classe C) */
.prog-steps-groups {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prog-step-group {
  background: #ffffff;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
}

.prog-step-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid #f1f5f9;
}

.prog-step-group-head strong {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--pb-navy-deep);
}

.prog-step-group-head span {
  font-size: 0.75rem;
  color: var(--ink-3);
}

.prog-step-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.prog-step-chip {
  appearance: none;
  min-width: 56px;
  min-height: 40px;
  padding: 7px 11px;
  background: #f8fafc;
  border: 1px solid var(--line-default);
  border-radius: 7px;
  color: var(--ink-1);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.prog-step-chip:hover {
  border-color: var(--pb-navy);
  background: #f2f7fd;
}

.prog-step-chip:focus-visible {
  outline: 2.5px solid var(--pb-navy);
  outline-offset: 2px;
}

.prog-step-chip.is-selected,
.prog-step-chip.is-selected:hover,
.prog-step-chip[aria-pressed="true"],
.prog-step-chip[aria-pressed="true"]:hover {
  background: var(--pb-navy-deep);
  border-color: var(--pb-navy-deep);
  color: #ffffff;
  box-shadow: none;
}

.prog-step-chip.is-next-h {
  background: #e8f1fb;
  border: 2px solid #0b4f8a;
  color: #07264d;
  padding-right: 20px;
}

.prog-step-chip.is-next-h::after {
  content: "→";
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  font-weight: 800;
  color: #0b4f8a;
}

.prog-step-chip.is-next-v {
  background: #e6f4f1;
  border: 2px dashed #0f766e;
  color: #0b423c;
  padding-right: 20px;
}

.prog-step-chip.is-next-v::after {
  content: "↑";
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  font-weight: 800;
  color: #0f766e;
}

/* Estados pendentes específicos e norma geral (LC 58/2003) */
.prog-pending-body {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-page);
  border-bottom: 1px solid var(--line-subtle);
}

.prog-pending-block h4 {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--pb-navy-deep);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prog-pending-block p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.58;
  color: var(--ink-2);
}

.prog-pending-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.84rem;
  line-height: 1.54;
  color: var(--ink-2);
}

.prog-pending-synth {
  padding-top: 12px;
  border-top: 1px solid var(--line-subtle);
}

/* Timeline */
.timeline-list {
  margin: 0;
  padding: 0 0 0 18px;
  list-style: none;
  border-left: 2px solid var(--line-default);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline-item {
  position: relative;
  padding-left: 8px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pb-navy);
  border: 2px solid #ffffff;
}

.timeline-date {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.timeline-norma {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-1);
}

.timeline-efeito {
  font-size: 0.84rem;
  color: var(--ink-2);
}

/* Estados vazios, erros, tray e toasts */
.empty-state {
  background: var(--bg-band);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  padding: 44px 24px;
  text-align: center;
}

.empty-state h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.12rem;
}

.empty-state p {
  margin: 0 auto 18px;
  max-width: 52ch;
  color: var(--ink-2);
  font-size: 0.9rem;
}

.error-banner {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-ink);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-weight: 500;
}

.compare-tray {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--pb-navy-deep);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(760px, calc(100vw - 32px));
}

.compare-tray[hidden] {
  display: none;
}

.compare-tray-info {
  font-size: 0.86rem;
  line-height: 1.4;
}

.compare-tray-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.toast-region {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 32px));
}

.toast {
  background: var(--ink-1);
  color: #ffffff;
  font-size: 0.84rem;
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Faixa Inferior (Sobre + Fontes Oficiais) e Rodapé
   ========================================================================== */

.bottom-info-band {
  background: var(--bg-band);
  border-top: 1px solid var(--line-subtle);
  padding: 44px 0;
}

.bottom-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.85fr);
  gap: 44px;
  align-items: start;
}

.catalog-about-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink-1);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-subtle);
}

.catalog-about-summary::-webkit-details-marker {
  display: none;
}

.catalog-about-body {
  padding-top: 16px;
  font-size: 0.88rem;
  color: var(--ink-2);
  line-height: 1.62;
}

.catalog-about-body p {
  margin: 0 0 12px;
}

.version-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 16px 0;
  margin-top: 16px;
  border-top: 1px solid var(--line-subtle);
  border-bottom: 1px solid var(--line-subtle);
}

.version-item-label {
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}

.version-item-value {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--pb-navy-deep);
  margin-top: 3px;
}

.catalog-copyright {
  margin: 14px 0 0 !important;
  font-size: 0.78rem;
  color: var(--ink-3);
}

.useful-links-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink-1);
}

.useful-links-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line-subtle);
}

.useful-link-item a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-subtle);
  border-radius: 0;
  text-decoration: none;
  transition: color 0.15s ease;
}

.useful-link-item a:hover .useful-link-name {
  color: var(--pb-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.useful-link-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--pb-navy-deep);
}

.useful-link-desc {
  font-size: 0.78rem;
  color: var(--ink-3);
  line-height: 1.42;
}

.site-footer {
  background: var(--pb-navy-deep);
  color: rgba(255, 255, 255, 0.84);
  padding: 24px 0;
  font-size: 0.82rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand-title {
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.03em;
}

.footer-meta {
  color: rgba(255, 255, 255, 0.76);
}

/* ==========================================================================
   Responsividade (Tablet e Celular)
   ========================================================================== */

@media (max-width: 1024px) {
  .primary-nav {
    gap: 4px;
  }

  .nav-btn {
    font-size: 0.85rem;
    padding: 15px 9px 13px;
  }

  .subnav-ref {
    font-size: 0.75rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-guide {
    border-left: none;
    border-top: 1px solid var(--line-subtle);
    padding: 20px 0 0;
  }

  .kpi-item {
    padding-right: 16px;
    margin-right: 16px;
  }

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

  .plan-row {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.85fr);
    padding: 20px 12px;
    margin: 0 -12px;
  }

  .plan-row::after {
    left: 12px;
    right: 12px;
  }

  .plan-actions-col {
    grid-column: 1 / -1;
    flex-direction: row;
  }

  .dates-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
  }

  .date-card {
    border-right: none;
    margin-right: 0;
    padding: 0;
  }

  .states-legend-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .direito-fields-grid,
  .laws-grid,
  .siglas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .subnav-ref {
    display: none;
  }

  .banner-brand {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 12px;
  }

  .banner-inst-group {
    width: 100%;
    justify-content: center;
    padding-right: 0;
    padding-bottom: 12px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }

  .banner-observatory {
    padding: 0 12px;
    border-right: none;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .subnav-bar {
    display: none;
  }

  .banner-inner {
    position: relative;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: auto;
    padding-top: 12px;
    padding-bottom: 16px;
  }

  .mobile-menu-btn {
    display: inline-flex;
    position: absolute;
    top: 14px;
    right: 16px;
  }

  .banner-inst-group {
    justify-content: flex-start;
    padding-right: 56px;
    padding-bottom: 10px;
    gap: 10px;
  }

  .banner-gov-logo {
    height: 46px;
  }

  .banner-unit-copy {
    align-items: flex-end;
    text-align: right;
  }

  .banner-eyebrow {
    font-size: 0.64rem;
    line-height: 1.16;
  }

  .banner-unit-line {
    font-size: 0.58rem;
    line-height: 1.18;
    white-space: nowrap;
  }

  .banner-observatory {
    padding: 0 4px;
  }

  .banner-site-name {
    font-size: 1.15rem;
  }

  .banner-site-subtitle {
    font-size: 0.78rem;
    margin-top: 4px;
  }

  .hero-band {
    padding: 28px 0 22px;
  }

  .workspace {
    padding-top: 26px;
    padding-bottom: 84px;
  }

  .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 16px;
  }

  .kpi-item {
    border-right: none;
    margin-right: 0;
    padding-right: 0;
  }

  .search-row {
    flex-direction: column;
    align-items: stretch;
  }

  .sort-select {
    min-width: 0;
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }

  .plan-row {
    grid-template-columns: 1fr;
    padding: 18px 0;
    margin: 0;
  }

  .plan-row::after {
    left: 0;
    right: 0;
  }

  .plan-row:hover {
    border-radius: 0;
  }

  .plan-cargos-split,
  .bottom-info-grid,
  .version-strip,
  .glossary-grid,
  .siglas-grid,
  .laws-grid,
  .direito-fields-grid,
  .dates-grid,
  .states-legend-grid,
  .transparency-grid,
  .prog-axes-bar,
  .prog-modalities-grid,
  .prog-linear-track {
    grid-template-columns: 1fr;
  }

  .transparency-item {
    border-right: none;
    padding: 12px 0;
  }

  .transparency-item:nth-child(odd),
  .transparency-item:nth-child(2n) {
    padding-left: 0;
    padding-right: 0;
  }

  .transparency-item:nth-last-child(2) {
    border-bottom: 1px solid var(--line-subtle);
  }

  .prog-board-header,
  .prog-board-scope,
  .prog-board-note,
  .prog-board-canvas,
  .prog-modalities-grid,
  .prog-board-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .prog-matrix-interactive .prog-matrix-corner {
    min-width: 84px;
    padding: 5px 6px;
  }

  .prog-class-hint {
    font-size: 0.61rem;
    max-width: 80px;
  }

  .prog-matrix-col-head {
    min-width: 56px;
    padding: 7px 5px;
    font-size: 0.78rem;
  }

  .prog-cell-btn {
    min-height: 42px;
    padding: 6px 4px;
    font-size: 0.78rem;
  }

  .prog-cell-btn.is-next-h,
  .prog-cell-btn.is-next-v {
    padding-right: 15px;
  }

  .prog-subgroup-bar,
  .prog-pendencia-box,
  .prog-pending-body {
    padding-left: 14px;
    padding-right: 14px;
  }

  .prog-subgroup-btn {
    font-size: 0.76rem;
    padding: 7px 11px;
  }

  .prog-linear-track-many {
    grid-template-columns: 1fr;
  }

  .prog-step-chip {
    min-width: 50px;
    min-height: 38px;
    padding: 6px 9px;
    font-size: 0.77rem;
  }

  .remun-summary-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .drawer-topbar,
  .drawer-header,
  .drawer-tabs {
    padding-left: 16px;
    padding-right: 16px;
  }

  .drawer-body {
    padding: 20px 16px 40px;
  }

  .compare-desktop-table {
    display: none;
  }

  .compare-mobile-cards {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--line-subtle);
  }

  .compare-mobile-card {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--line-subtle);
    border-radius: 0;
    padding: 18px 0;
  }

  .compare-mobile-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--line-subtle);
  }

  .compare-mobile-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .compare-mobile-row-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-3);
    margin-bottom: 2px;
  }

  .compare-mobile-row-val {
    font-size: 0.86rem;
    color: var(--ink-1);
    line-height: 1.48;
    overflow-wrap: anywhere;
  }

  .tag-inline {
    white-space: normal;
    line-height: 1.35;
  }

  .table-scroll-hint {
    display: block;
  }

  .compare-tray {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    bottom: 12px;
  }

  .compare-tray-actions {
    justify-content: flex-end;
  }
}

/* Preferência de redução de movimento (WCAG) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
