/* ==========================================================================
   Painel — Posição dos Senadores · Presidência do Senado 2027–2029
   ========================================================================== */

:root {
  --green-950: #012e15;
  --green-900: #01471f;
  --green-700: #02613b;
  --green-600: #057a45;
  --green-100: #dcf3e7;
  --green-ink: #17603d;

  --blue-800: #0a3a8a;
  --blue-700: #0f47a6;
  --blue-100: #dcebfd;
  --blue-ink: #1a4c94;

  --yellow-400: #fdcd2c;
  --yellow-300: #fed64a;
  --yellow-100: #fff3cf;
  --yellow-title: #ffd23f;

  --slate-700: #3f4c5c;
  --slate-500: #5d6b7c;
  --slate-100: #eef1f5;

  --ink: #111a24;
  --text: #1f2a36;
  --muted: #5a6876;
  --line: #e4e9ee;
  --page: #f4f8f9;
  --card: #ffffff;

  --radius-card: 16px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 18px rgba(16, 24, 40, .06);
  --shadow-card-hover: 0 2px 4px rgba(16, 24, 40, .06), 0 16px 32px rgba(16, 24, 40, .11);
  --focus: #1a73e8;

  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-num: "Barlow Condensed", "Figtree", system-ui, sans-serif;
  --gutter: clamp(16px, 2.4vw, 36px);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.45;
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }

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

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

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: #fff; color: var(--ink); padding: 10px 16px; border-radius: 8px;
  font-weight: 700; text-decoration: none; box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  --hero-img: url("../img/congresso-nacional.webp");
  position: relative;
  overflow: hidden;
  color: #fff;
  background-color: var(--green-900);
  background-image:
    linear-gradient(90deg,
      rgba(1, 71, 31, 1) 0%,
      rgba(1, 71, 31, .97) 33%,
      rgba(1, 71, 31, .74) 42%,
      rgba(1, 74, 34, .36) 49%,
      rgba(2, 70, 44, .26) 60%,
      rgba(6, 74, 52, .22) 100%),
    linear-gradient(180deg, rgba(1, 40, 20, 0) 55%, rgba(1, 38, 20, .6) 100%),
    radial-gradient(28% 80% at 51% 80%, rgba(255, 212, 72, .62) 0%, rgba(255, 212, 72, 0) 72%),
    radial-gradient(58% 95% at 82% 95%, rgba(255, 204, 51, .72) 0%, rgba(255, 204, 51, .3) 45%, rgba(255, 204, 51, 0) 76%),
    linear-gradient(180deg, rgba(255, 214, 90, 0) 35%, rgba(255, 214, 90, .2) 72%, rgba(255, 214, 90, 0) 100%),
    var(--hero-img);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 92% auto;
  background-position: 0 0, 0 0, 0 0, 0 0, 0 0, right 41%;
  background-repeat: no-repeat;
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1500px;
  margin: 0 auto;
  padding: 42px var(--gutter) 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px 32px;
}

.hero__title {
  font-weight: 750;
  font-size: clamp(30px, 2.95vw, 46px);
  line-height: 1.09;
  letter-spacing: -.012em;
  text-wrap: balance;
  text-shadow: 0 2px 18px rgba(0, 30, 10, .35);
}

.hero__years {
  display: block;
  margin-top: 6px;
  color: var(--yellow-title);
  font-size: 1.27em;
  line-height: 1;
  letter-spacing: -.01em;
  font-variant-numeric: lining-nums;
}

.hero__lead {
  margin-top: 16px;
  max-width: 41em;
  font-size: clamp(15px, 1.12vw, 17.5px);
  line-height: 1.42;
  color: rgba(255, 255, 255, .95);
  text-wrap: pretty;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.hero__facts li {
  font-size: 13.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .24);
  backdrop-filter: blur(4px);
}
.hero__fact-note { font-weight: 500; opacity: .8; }

.br-wide { display: none; }
@media (min-width: 1240px) { .br-wide { display: inline; } }

.hero__ribbon {
  position: absolute;
  left: 0;
  bottom: 0;
  width: clamp(90px, 9vw, 150px);
  height: clamp(34px, 3.4vw, 56px);
  z-index: 0;
}

/* Cartões de resumo */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 152px);
  gap: 10px;
}

.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 196px;
  padding: 22px 8px 18px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0, 25, 10, .28);
  transition: transform .18s ease, box-shadow .18s ease;
}
.stat:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(0, 25, 10, .34); }
.stat:active { transform: translateY(-1px); }
.stat:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.stat[aria-pressed="true"] { box-shadow: 0 0 0 3px #fff, 0 16px 36px rgba(0, 25, 10, .34); }

.stat__top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.stat__avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  flex: none;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .9);
}

.stat__num {
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 66px;
  line-height: .86;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
  min-width: 1ch;
}

.stat__label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-transform: uppercase;
  line-height: 1.2;
}
.stat__kicker {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .045em;
  opacity: .92;
}
.stat__label strong {
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: .015em;
}

.stat--alcolumbre { background: linear-gradient(180deg, #1049a8 0%, var(--blue-800) 100%); color: #fff; }
.stat--marinho { background: linear-gradient(180deg, #07804a 0%, #025c35 100%); color: #fff; }
.stat--condicional { background: #fff; color: #233040; }
.stat--condicional .stat__kicker { color: var(--slate-500); opacity: 1; }
.stat--sem-posicao { background: linear-gradient(180deg, var(--yellow-300) 0%, var(--yellow-400) 100%); color: #1d1804; }
.stat--sem-posicao .stat__label strong { font-size: 15.5px; line-height: 1.15; }

/* ==========================================================================
   Barra de filtros
   ========================================================================== */

.toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 248, 249, .9);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.toolbar.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 18px rgba(16, 24, 40, .06);
}

.toolbar__inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  flex-wrap: wrap;
}

.filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
}
.filters__label {
  font-weight: 700;
  font-size: 15.5px;
  color: var(--ink);
  margin-right: 4px;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 40px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1.5px solid;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.pill:hover { transform: translateY(-1px); }
.pill span { font-variant-numeric: tabular-nums; }

.pill--todos { background: #e6f2eb; border-color: #93c7a8; color: var(--green-700); }
.pill--alcolumbre { background: #e3effc; border-color: #9dbbe6; color: #133f84; }
.pill--marinho { background: #e0f4ea; border-color: #94cdb0; color: #0f5a36; }
.pill--condicional { background: var(--slate-100); border-color: #c3ccd6; color: #344150; }
.pill--sem-posicao { background: var(--yellow-100); border-color: #f0cf60; color: #3d3000; }

.pill--todos[aria-pressed="true"] { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.pill--alcolumbre[aria-pressed="true"] { background: var(--blue-700); border-color: var(--blue-700); color: #fff; }
.pill--marinho[aria-pressed="true"] { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.pill--condicional[aria-pressed="true"] { background: var(--slate-700); border-color: var(--slate-700); color: #fff; }
.pill--sem-posicao[aria-pressed="true"] { background: var(--yellow-400); border-color: #e2b200; color: #1d1804; }

.search {
  position: relative;
  width: 350px;
  max-width: 100%;
}
.search__icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #4d5b68;
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 42px;
  padding: 0 36px 0 42px;
  border: 1.5px solid #d3dce3;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: 500 15px var(--font);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search input::placeholder { color: #66737f; font-weight: 400; }
.search input:focus { outline: none; border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(2, 97, 59, .18); }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search__kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 22px;
  padding: 1px 6px;
  border: 1px solid #d3dce3;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #f7f9fa;
  color: #66737f;
  font: 600 12px var(--font);
  text-align: center;
  pointer-events: none;
}
.search input:focus ~ .search__kbd,
.search input:not(:placeholder-shown) ~ .search__kbd { display: none; }

.toolbar__side {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Filtro por partido — menu (telas menores) */
.party-select { display: none; }
.party-select select {
  appearance: none;
  -webkit-appearance: none;
  height: 42px;
  max-width: 220px;
  padding: 0 36px 0 14px;
  border: 1.5px solid #d3dce3;
  border-radius: 8px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%234d5b68' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 13px center;
  color: var(--text);
  font: 600 15px var(--font);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.party-select select:focus { outline: none; border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(2, 97, 59, .18); }
.party-select.is-active select { border-color: var(--green-700); color: var(--green-700); background-color: #e6f2eb; }

/* Filtro por partido — botões (telas largas) */
.parties-filter {
  display: none;
  flex-basis: 100%;
  align-items: center;
  gap: 8px;
}
.parties-filter__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #d3dce3;
  border-radius: 999px;
  background: #fff;
  color: #2b3744;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, opacity .15s ease, transform .15s ease;
}
.chip:hover { border-color: #9fb0bf; transform: translateY(-1px); }
.chip__n {
  font-family: var(--font-num);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  color: var(--green-700);
  font-variant-numeric: tabular-nums;
}
.chip.is-empty { opacity: .45; }
.chip[aria-pressed="true"] { background: var(--green-700); border-color: var(--green-700); color: #fff; opacity: 1; }
.chip[aria-pressed="true"] .chip__n { color: #c9f0da; }

/* Logotipos dos partidos (acompanham o tamanho do texto) */
.party-logo {
  display: inline-block;
  width: auto;
  height: 1.2em;
  max-width: 4.2em;
  object-fit: contain;
  vertical-align: -0.26em;
  margin-right: 0.32em;
}
.party-name { white-space: nowrap; }
.card__meta .party-logo { height: 20px; max-width: 72px; margin-right: 0; vertical-align: -5px; }
.card__meta .party-logo--larga { height: 16px; vertical-align: -3px; }
.chip .party-logo { height: 17px; max-width: 52px; margin-right: 1px; vertical-align: middle; }
.chip--logo .party-logo { margin-right: 2px; }
.chip[aria-pressed="true"] .party-logo {
  box-sizing: content-box;
  padding: 1px 3px;
  border-radius: 4px;
  background: #fff;
}
.party-select { position: relative; }
.party-select__logo {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 40px;
  height: 20px;
  object-fit: contain;
  object-position: left center;
  transform: translateY(-50%);
  pointer-events: none;
}
.party-select__logo[hidden] { display: none; }
.party-select.has-logo select { padding-left: 58px; }
.signal-logos {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  min-width: 0;
}
.signal-logos:empty { display: none; }
.signal-logos .party-logo { height: 18px; max-width: 48px; margin: 2px 0 0; vertical-align: baseline; }
.parties .party-logo { height: 18px; max-width: 52px; vertical-align: -4px; margin-right: 2px; }
.modal__meta .party-logo { height: 20px; max-width: 64px; vertical-align: -5px; margin-right: 6px; }
.credits__title { margin-top: 14px; color: #fff; font-weight: 600; font-size: 13px; }

@media (min-width: 1500px) {
  .parties-filter { display: flex; }
}
@media (max-width: 1499px) {
  .party-select { display: block; }
}

/* ==========================================================================
   Grade de senadores
   ========================================================================== */

.content {
  max-width: 1500px;
  margin: 0 auto;
  padding: 4px var(--gutter) 64px;
}

.results {
  font-size: 14px;
  color: var(--muted);
  margin: 2px 0 14px;
  min-height: 20px;
}
.results strong { color: var(--text); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(208px, 1fr));
  gap: 16px;
}
.grid:focus { outline: none; }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: center;
  background: var(--card);
  border: 1px solid #edf1f4;
  border-radius: var(--radius-card);
  padding: 12px 12px 14px;
  box-shadow: var(--shadow-card);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
.card:has(.card__open:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.card[hidden] { display: none; }

.card__photo {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: 11px;
  overflow: hidden;
  background: #e8edf1;
}
.card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
  pointer-events: none;
}

.badge {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 1;
  max-width: calc(100% - 16px);
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .01em;
  color: #fff;
  background: rgba(13, 22, 32, .7);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
  backdrop-filter: blur(4px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.badge--alcolumbre { background: var(--blue-700); }
.badge--marinho { background: var(--green-600); }
.badge--alerta { background: #a64b00; }

.card__name {
  margin-top: 12px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  text-wrap: balance;
}
.card__open {
  all: unset;
  cursor: pointer;
}
.card__open::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: var(--radius-card);
}

.card__meta {
  margin-top: 3px;
  font-size: 14px;
  color: var(--muted);
}

.card__foot { margin-top: auto; }

.card__rule {
  height: 1px;
  margin: 10px 0 8px;
  border: 0;
  background: var(--line);
}

.card__label {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #4a5966;
}

/* Etiqueta de apoio (card e modal) */
.support {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 8px 12px;
  border-radius: 12px;
  text-align: left;
}
.support__avatar,
.support__icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex: none;
}
.support__avatar {
  object-fit: cover;
  box-shadow: 0 0 0 2px var(--ring, #fff);
}
.support__icon {
  display: grid;
  place-items: center;
  background: #fff;
}
.support__name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
}

.support--alcolumbre { background: var(--blue-100); color: var(--blue-ink); --ring: #0d2f6e; }
.support--marinho { background: var(--green-100); color: var(--green-ink); --ring: #0d4a2b; }
.support--condicional { background: var(--slate-100); color: #2f3b4a; }
.support--condicional .support__icon { color: var(--slate-500); }
.support--condicional .support__name { font-size: 15px; }
.support--sem-posicao { background: var(--yellow-100); color: #2a2205; }
.support--sem-posicao .support__icon { color: #b3bbc4; }
.support--sem-posicao .support__name { flex: 1; text-align: center; padding-right: 8px; }

/* Estado vazio */
.empty {
  margin: 8px auto 0;
  max-width: 460px;
  padding: 40px 24px;
  text-align: center;
  background: #fff;
  border: 1px dashed #cdd6dd;
  border-radius: var(--radius-card);
}
.empty__title { font-size: 18px; font-weight: 700; color: var(--ink); }
.empty__text { margin-top: 6px; color: var(--muted); }
.empty__reset {
  margin-top: 16px;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  background: var(--green-700);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

/* ==========================================================================
   Metodologia
   ========================================================================== */

.method { margin-top: 56px; }
.method__title {
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.01em;
}
.method__grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.method__card,
.method__block {
  background: #fff;
  border: 1px solid #edf1f4;
  border-radius: 14px;
  padding: 18px 20px 20px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.method__card h3,
.method__block h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.method__card p {
  margin-top: 8px;
  font-size: 14.5px;
  line-height: 1.55;
  color: #3d4a57;
  text-wrap: pretty;
}
.method__row {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.method__tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--slate-100);
  color: var(--slate-500);
  font-size: 12px;
  font-weight: 600;
  vertical-align: 2px;
}

.parties {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.parties li {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 8px;
  background: #f3f6f8;
  border: 1px solid #e3e9ee;
  font-size: 14px;
  font-weight: 600;
  color: #2b3744;
}
.parties b {
  font-family: var(--font-num);
  font-size: 17px;
  font-weight: 700;
  color: var(--green-700);
  font-variant-numeric: tabular-nums;
}

.signals { margin-top: 10px; display: grid; gap: 8px; }
.signals li {
  display: flex;
  gap: 10px;
  font-size: 14.5px;
  line-height: 1.5;
  color: #3d4a57;
}
.dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  flex: none;
}
.dot--alcolumbre { background: var(--blue-700); }
.dot--marinho { background: var(--green-600); }

/* ==========================================================================
   Rodapé
   ========================================================================== */

.footer {
  background: var(--green-950);
  color: rgba(255, 255, 255, .82);
  font-size: 14px;
  line-height: 1.6;
}
.footer__inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 28px var(--gutter) 34px;
  display: grid;
  gap: 10px;
}
.footer strong { color: #fff; }
.footer a { color: #fff; text-underline-offset: 2px; }
.footer a:hover { color: var(--yellow-title); }

.credits summary {
  cursor: pointer;
  width: fit-content;
  color: #fff;
  font-weight: 600;
}
.credits__list {
  margin-top: 12px;
  columns: 3 280px;
  column-gap: 28px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .72);
}
.credits__list li { break-inside: avoid; margin-bottom: 4px; }
.credits__list b { color: rgba(255, 255, 255, .92); font-weight: 600; }

/* ==========================================================================
   Modal de detalhes
   ========================================================================== */

.modal {
  width: min(820px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 20, 10, .35);
  overflow: hidden;
}
.modal::backdrop {
  background: rgba(3, 18, 10, .58);
  backdrop-filter: blur(3px);
}
.modal[open] { animation: modal-in .2s ease-out; }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.modal__panel {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  max-height: calc(100dvh - 32px);
}
.modal__media {
  position: relative;
  background: #eef2f5;
}
.modal[data-categoria="alcolumbre"] .modal__media { background: var(--blue-100); }
.modal[data-categoria="marinho"] .modal__media { background: var(--green-100); }
.modal[data-categoria="condicional"] .modal__media { background: var(--slate-100); }
.modal[data-categoria="sem-posicao"] .modal__media { background: var(--yellow-100); }
.modal__photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.modal__body {
  padding: 26px 28px 22px;
  overflow-y: auto;
}
.modal__meta {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .02em;
}
.modal__name {
  margin-top: 2px;
  padding-right: 40px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -.01em;
}
.modal .support { margin-top: 14px; max-width: 340px; }

.modal__facts { margin-top: 18px; }
.modal__facts dt {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.modal__facts dd {
  margin: 4px 0 16px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--text);
  text-wrap: pretty;
}
.modal__facts dd.is-context { color: #4a5764; font-size: 14.5px; }
.modal__quote {
  margin: 0;
  padding: 10px 14px;
  border-left: 4px solid currentColor;
  border-radius: 0 10px 10px 0;
  background: #f6f8fa;
  font-size: 16.5px;
  font-weight: 600;
  font-style: italic;
  line-height: 1.45;
}
.modal__quote--alcolumbre { color: var(--blue-ink); background: #eef5fe; }
.modal__quote--marinho { color: var(--green-ink); background: #edf8f2; }
.modal__quote--condicional { color: #2f3b4a; }

.modal__credit {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}
.modal__credit a { color: inherit; }

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f1f4f6;
  color: var(--ink);
  cursor: pointer;
  transition: background-color .15s ease;
}
.modal__close:hover { background: #e3e8ec; }

body.modal-aberto { overflow: hidden; }

/* ==========================================================================
   Responsivo
   ========================================================================== */

@media (max-width: 1535px) {
  .pill { padding: 0 17px; }
  .filters { gap: 10px; }
}

/* larguras médias: título à esquerda, cartões em 2 × 2 */
@media (max-width: 1439px) {
  .hero {
    background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, cover;
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 50% 38%;
  }
  .stats { grid-template-columns: repeat(2, 176px); }
  .stat { min-height: 150px; padding: 16px 10px 14px; gap: 10px; }
  .stat__num { font-size: 58px; }
  .stat__avatar { width: 52px; height: 52px; }
}

/* telas estreitas: título em cima, cartões embaixo */
@media (max-width: 1099px) {
  .hero__inner { grid-template-columns: 1fr; padding-top: 34px; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 760px; }
  .filters { gap: 8px 10px; }
  .pill { padding: 0 16px; }
}

@media (max-width: 860px) {
  .hero { --hero-img: url("../img/congresso-nacional-1200.webp"); }
  .toolbar__inner { padding-top: 12px; padding-bottom: 12px; }
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: calc(100% + 2 * var(--gutter));
    margin: 0 calc(-1 * var(--gutter));
    padding: 2px var(--gutter) 4px;
    scrollbar-width: none;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filters__label { display: none; }
  .pill { height: 38px; padding: 0 16px; font-size: 14.5px; }
  .toolbar__side { width: 100%; gap: 8px; }
  .search { flex: 1 1 auto; width: auto; min-width: 0; }
  .search__kbd { display: none; }
  .party-select select { max-width: 150px; padding-left: 12px; font-size: 14.5px; }
  .modal__panel { grid-template-columns: 1fr; overflow-y: auto; }
  .modal__photo { aspect-ratio: 3 / 2; }
  .modal__body { overflow: visible; padding: 20px 20px 18px; }
}

@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { min-height: 156px; padding: 16px 8px 14px; gap: 10px; }
  .stat__avatar { width: 50px; height: 50px; }
  .stat__num { font-size: 56px; }
  .stat__kicker { font-size: 11.5px; }
  .stat__label strong { font-size: 14px; }
  .hero__facts li { font-size: 12.5px; }
}

@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { padding: 8px 8px 10px; border-radius: 14px; }
  .card__photo { border-radius: 9px; }
  .card__name { margin-top: 9px; font-size: 15px; }
  .card__meta { font-size: 12.5px; }
  .card__label { font-size: 12.5px; margin-bottom: 6px; }
  .support { gap: 8px; min-height: 52px; padding: 6px 8px; border-radius: 10px; }
  .support__avatar, .support__icon { width: 34px; height: 34px; }
  .support__icon svg { width: 20px; height: 20px; }
  .support__name, .support--condicional .support__name { font-size: 13.5px; }
  .badge { font-size: 10.5px; padding: 3px 7px; left: 6px; top: 6px; }
  .modal__name { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
