:root {
  --black: #070807;
  --ink: #1b1d1c;
  --paper: #e7e5dd;
  --paper-2: #d2cfc4;
  --surface: rgba(240, 238, 230, 0.86);
  --surface-strong: rgba(244, 242, 235, 0.94);
  --line: #aaa69a;
  --line-dark: #222422;
  --gold: #6b6a63;
  --gold-soft: #aaa89e;
  --red: #b91f16;
  --deep-red: #303331;
  --blue: #2d78b7;
  --green: #74a99b;
  --orange: #d97022;
  --risk: #cf3a26;
  --crisis: #851323;
  --muted: #62615b;
  --shadow-soft: 0 18px 45px rgba(25, 25, 23, 0.075);
  --shadow-subtle: 0 10px 26px rgba(25, 25, 23, 0.055);
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #efeee7 0, #e7e5dd 18.75rem, #d2cfc4 100%);
  background-size: auto;
  font-family: var(--serif);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 20%, rgba(55, 54, 50, 0.035), transparent 18rem),
    radial-gradient(circle at 82% 8%, rgba(25, 25, 23, 0.028), transparent 16rem),
    linear-gradient(90deg, rgba(255,255,255,0.11), rgba(55,54,50,0.018) 50%, rgba(255,255,255,0.08));
  mix-blend-mode: multiply;
  opacity: 0.62;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  box-shadow:
    inset 0 0 0 1px rgba(24, 28, 27, 0.03),
    inset 0 0 80px rgba(55, 54, 50, 0.032);
}

.topbar,
.brand,
.nav,
.main-grid,
.indicator-band,
.lower-grid,
.footer-grid,
.page {
  width: min(1860px, calc(100% - 40px));
  margin: 0 auto;
}

header {
  background:
    linear-gradient(180deg, rgba(245,244,238,0.84), rgba(231,229,221,0.96)),
    var(--paper);
  border-bottom: 2px solid rgba(24, 28, 27, 0.78);
  box-shadow: 0 18px 42px rgba(24, 28, 27, 0.08);
}

.topbar {
  height: 58px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: #1a2325;
  border-bottom: 1px solid rgba(37, 34, 29, 0.24);
  font-size: clamp(0.78rem, 0.95vw, 1.05rem);
}

.dateline,
.region-nav {
  display: flex;
  gap: 18px;
  align-items: center;
  white-space: nowrap;
}

.region-nav {
  justify-content: center;
  font-size: clamp(0.96rem, 1.12vw, 1.22rem);
}

.region-nav [aria-disabled="true"] {
  color: rgba(26, 35, 37, 0.52);
  cursor: default;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  display: inline-block;
}

.phase {
  justify-self: end;
  color: #1a2325;
  border: 1px solid rgba(37, 34, 29, 0.42);
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 700;
  letter-spacing: 0;
  font-family: var(--sans);
  background: rgba(255, 255, 255, 0.42);
}

.brand {
  height: 258px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(245,244,238,0.72), rgba(231,229,221,0.44));
  border-bottom: 2px solid rgba(24, 28, 27, 0.72);
}

.brand > div {
  width: min(1500px, 96vw);
  display: grid;
  justify-items: center;
  gap: 13px;
}

.brand img {
  width: min(1320px, 94vw);
  max-height: 184px;
  object-fit: contain;
  display: block;
  filter: saturate(0.56) sepia(0.03) contrast(1.04) brightness(0.9) drop-shadow(0 7px 10px rgba(24, 28, 27, 0.11));
}

.brand > div::after {
  content: "MONITORAMENTO SISTEMICO DA SOBERANIA POPULAR";
  width: 100%;
  padding-top: 11px;
  border-top: 2px solid rgba(24, 28, 27, 0.76);
  color: #1a2325;
  font: 700 clamp(0.72rem, 1.22vw, 1.24rem) var(--serif);
  letter-spacing: 0.34rem;
  text-align: center;
}

.brand-subtitle {
  color: #b6ada3;
  letter-spacing: 0.42rem;
  font-size: clamp(0.62rem, 0.82vw, 0.86rem);
  margin-top: -8px;
  text-align: center;
}

.nav {
  height: 50px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: stretch;
  color: #1a2325;
  border-bottom: 1px solid rgba(37, 34, 29, 0.34);
}

.nav a {
  display: grid;
  place-items: center;
  border-right: 1px solid rgba(37, 34, 29, 0.18);
  font-size: clamp(0.72rem, 0.82vw, 0.88rem);
  text-transform: uppercase;
  transition: color 160ms ease, background-color 160ms ease;
}

.nav a:last-child {
  border-right: 0;
}

.nav a.active {
  color: #070706;
  background: rgba(96, 71, 40, 0.075);
  border-bottom: 3px solid #25221d;
}

.nav a:hover {
  color: #070706;
  background: rgba(96, 71, 40, 0.075);
}

.panel {
  border: 1px solid var(--line);
  background: rgba(250, 246, 238, 0.72);
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(270px, 0.95fr) minmax(520px, 1.55fr) minmax(280px, 1fr);
  gap: 24px;
  padding: 22px 0 0;
  align-items: start;
}

.main-grid > aside,
.thermometer,
.map-panel {
  min-width: 0;
}

.section-title {
  margin: 0 0 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  font: 700 0.78rem var(--sans);
  text-transform: uppercase;
  color: #4f4639;
}

.news-list {
  display: grid;
  gap: 12px;
}

.news-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 15px;
  padding: 12px;
  border: 1px solid rgba(185, 170, 147, 0.78);
  background: var(--surface);
  box-shadow: var(--shadow-subtle);
}

.news-thumb {
  min-height: 82px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.08), transparent 42%),
    linear-gradient(145deg, rgba(0,0,0,0.34), rgba(0,0,0,0)),
    radial-gradient(circle at 28% 32%, rgba(184, 194, 196, 0.36), transparent 14%),
    linear-gradient(135deg, #9b8a70, #252a2b);
  border: 1px solid rgba(181, 189, 187, 0.76);
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}

.news-thumb.institutional {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.11), transparent 45%),
    linear-gradient(135deg, #7d827c, #202024);
}

.news-thumb.economy {
  background:
    linear-gradient(145deg, rgba(0,0,0,0.22), transparent 55%),
    linear-gradient(135deg, #384955, #d8cbb6);
}

.tag {
  color: var(--deep-red);
  font: 700 0.66rem var(--sans);
  text-transform: uppercase;
}

.tag.gold {
  color: #a36f00;
}

.tag.green {
  color: #2f765e;
}

.news-item h3,
.mini-card h3,
.editorial h3 {
  margin: 5px 0 6px;
  font-size: clamp(1rem, 1.15vw, 1.28rem);
  line-height: 1.12;
}

.news-item p,
.editorial p,
.mini-card p,
.method-copy p {
  margin: 0;
  line-height: 1.35;
}

.time {
  display: block;
  margin-top: 8px;
  font-size: 0.8rem;
}

.link-row {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  align-items: center;
  margin-top: 12px;
  font: 700 0.76rem var(--sans);
  text-transform: uppercase;
  color: #6d5b3f;
}

.thermometer {
  position: relative;
  text-align: center;
  padding: 19px 28px 16px;
  border: 1px solid rgba(37, 34, 29, 0.5);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,250,240,0.38)),
    var(--surface);
  box-shadow:
    0 14px 34px rgba(40, 32, 23, 0.075),
    inset 0 0 0 1px rgba(255, 250, 240, 0.76);
}

.thermometer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;
  height: 3px;
  background: rgba(57, 68, 66, 0.55);
}

.kicker {
  margin: 2px 0 0;
  text-transform: uppercase;
  font-size: clamp(0.84rem, 1vw, 1.08rem);
}

.status-title {
  margin: 8px 0 6px;
  font-size: clamp(1.72rem, 2.55vw, 3.12rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
  color: #1f1c18;
  text-shadow: 0 1px 0 rgba(255,255,255,0.88), 0 10px 22px rgba(0,0,0,0.08);
}

.lead {
  max-width: 720px;
  margin: 0 auto 8px;
  font-size: clamp(0.95rem, 1.04vw, 1.1rem);
  line-height: 1.36;
}

.gauge-wrap {
  position: relative;
  width: min(690px, 100%);
  margin: 0 auto;
  aspect-ratio: 2 / 1.05;
}

.gauge {
  width: 100%;
  height: 100%;
}

.needle {
  position: absolute;
  left: 50%;
  bottom: 24%;
  width: 5px;
  height: 38%;
  background: #070706;
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotate(26deg);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.25);
}

.score {
  position: absolute;
  left: 50%;
  bottom: 9%;
  transform: translateX(-50%);
  font-size: clamp(2.35rem, 3.8vw, 4.05rem);
  line-height: 1;
  white-space: nowrap;
}

.score small {
  font-size: 0.42em;
}

.score-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  font-size: clamp(0.8rem, 0.96vw, 1rem);
  text-transform: uppercase;
  font-family: var(--sans);
  font-weight: 700;
}

.update-strip,
.legend {
  display: flex;
  justify-content: center;
  gap: 34px;
  align-items: center;
  border-top: 1px solid rgba(185, 170, 147, 0.82);
  margin-top: 8px;
  padding: 12px 0;
  font-size: 0.88rem;
  text-transform: uppercase;
}

.legend {
  margin-top: 0;
  gap: 22px;
  flex-wrap: wrap;
  border-bottom: 0;
}

.legend span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.swatch {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  display: inline-block;
}

.map-panel {
  padding: 16px;
  border: 1px solid rgba(185, 170, 147, 0.9);
  background: var(--surface);
  box-shadow: var(--shadow-subtle);
}

.main-grid > aside:not(.map-panel),
.map-panel {
  margin-top: 18px;
}

.world-map {
  position: relative;
  min-height: 300px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(45, 120, 183, 0.08), transparent 66%),
    linear-gradient(180deg, rgba(255,255,255,0.5), rgba(255,255,255,0.1));
  border: 1px solid rgba(185, 170, 147, 0.68);
  border-radius: 3px;
  margin-bottom: 12px;
}

.world-map img {
  width: 94%;
  max-height: 330px;
  object-fit: contain;
  opacity: 0.78;
  filter: grayscale(1) contrast(1.12);
}

.map-signal {
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--risk);
  box-shadow: 0 0 0 6px rgba(207, 58, 38, 0.18);
}

.map-signal::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid currentColor;
  border-radius: inherit;
  opacity: 0.45;
  animation: mapPulse 2.8s ease-out infinite;
}

.signal-brazil { left: 35%; top: 63%; color: #d6a10d; background: #d6a10d; }
.signal-north { left: 23%; top: 38%; color: #d6a10d; background: #d6a10d; }
.signal-europe { left: 51%; top: 35%; color: #d6a10d; background: #d6a10d; }
.signal-africa { left: 52%; top: 57%; color: #cf3a26; background: #cf3a26; }
.signal-asia { left: 68%; top: 45%; color: #cf3a26; background: #cf3a26; }
.signal-latam { left: 30%; top: 58%; color: #d97022; background: #d97022; }

@keyframes mapPulse {
  from { transform: scale(0.62); opacity: 0.55; }
  to { transform: scale(1.85); opacity: 0; }
}

.map-button,
.outline-button {
  display: flex;
  justify-content: center;
  gap: 16px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(108, 123, 126, 0.56);
  background: rgba(250, 246, 238, 0.62);
  font: 700 0.78rem var(--sans);
  text-transform: uppercase;
  transition: background-color 160ms ease, color 160ms ease;
}

.map-button:hover,
.outline-button:hover,
.primary-button:hover {
  background: #1f1c18;
  color: #fff9ee;
}

.indicator-band {
  margin-top: 18px;
  border: 1px solid rgba(185, 170, 147, 0.9);
  background: var(--surface);
  box-shadow: var(--shadow-subtle);
}

.band-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px 8px;
}

.indicators {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}

.metric {
  min-height: 174px;
  padding: 16px;
  border-left: 1px solid rgba(185, 170, 147, 0.75);
  display: grid;
  align-content: start;
  gap: 5px;
  background: linear-gradient(180deg, rgba(255,255,255,0.52), rgba(255,255,255,0.16));
}

.metric:first-child {
  border-left: 0;
}

.metric-top {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
}

.icon {
  font: 700 1.7rem var(--sans);
  color: #203b5b;
}

.metric h3 {
  margin: 0;
  font: 700 0.6rem var(--sans);
  text-transform: uppercase;
  color: #5f5347;
}

.metric .value {
  font-size: 1.9rem;
}

.metric .state {
  color: #c87700;
  font: 700 0.78rem var(--sans);
  text-transform: uppercase;
}

.spark {
  width: 100%;
  height: 36px;
  min-height: 36px;
}

.trend {
  font-size: 0.9rem;
}

.lower-grid,
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 24px;
  padding-top: 22px;
}

.reading-scale {
  width: min(1860px, calc(100% - 40px));
  margin: 22px auto 0;
  padding: 20px;
  border: 1px solid rgba(185, 170, 147, 0.9);
  background: var(--surface);
  box-shadow: var(--shadow-subtle);
}

.scale-head {
  display: grid;
  grid-template-columns: minmax(280px, 0.55fr) 1fr;
  gap: 24px;
  align-items: end;
  margin-bottom: 14px;
}

.scale-head h2 {
  margin: 0;
  font-size: clamp(1.15rem, 1.55vw, 1.75rem);
  text-transform: uppercase;
}

.scale-head p {
  margin: 0;
  max-width: 780px;
  line-height: 1.35;
}

.scale-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid rgba(185, 170, 147, 0.8);
  background: rgba(250, 246, 238, 0.56);
}

.scale-card {
  min-height: 188px;
  padding: 18px;
  border-left: 1px solid rgba(185, 170, 147, 0.74);
  display: grid;
  align-content: start;
  gap: 7px;
}

.scale-card:first-child {
  border-left: 0;
}

.scale-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--scale-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--scale-color) 18%, transparent);
}

.scale-card strong {
  font-size: 1.55rem;
  line-height: 1;
}

.scale-card h3 {
  margin: 0;
  font-size: 1.02rem;
  text-transform: uppercase;
}

.scale-card p {
  margin: 0;
  line-height: 1.3;
}

.scale-card.stable {
  --scale-color: #27975c;
}

.scale-card.attention {
  --scale-color: #d6a10d;
}

.scale-card.alert {
  --scale-color: #ee7a19;
}

.scale-card.danger {
  --scale-color: #d62219;
}

.scale-card.collapse {
  --scale-color: #111111;
}

.editorial {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 15px;
  padding: 20px;
  border: 1px solid rgba(185, 170, 147, 0.9);
  background: var(--surface);
  box-shadow: var(--shadow-subtle);
}

.dropcap {
  font-size: 4.2rem;
  line-height: 0.8;
}

.footer-grid {
  grid-template-columns: repeat(5, 1fr);
  padding: 22px 0 26px;
  border-top: 0;
}

.institutional-close {
  width: min(1860px, calc(100% - 40px));
  margin: 0 auto 24px;
  padding: 20px 0 0;
  border-top: 1px solid rgba(37, 34, 29, 0.28);
  text-align: center;
}

.institutional-close p {
  margin: 4px 0;
}

.institutional-close blockquote {
  max-width: 920px;
  margin: 16px auto 0;
  padding: 12px 20px 0;
  border-top: 1px solid var(--line);
  font-size: clamp(1.02rem, 1.2vw, 1.22rem);
  font-style: italic;
}

.mini-card {
  border-left: 0;
  padding: 16px;
  background: rgba(250, 246, 238, 0.56);
  border: 1px solid rgba(185, 170, 147, 0.72);
}

.mini-card:first-child {
  border-left: 0;
  padding-left: 16px;
}

.share {
  display: flex;
  gap: 12px;
  margin: 8px 0;
}

.share a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(142, 128, 104, 0.72);
  border-radius: 50%;
  font-family: var(--sans);
  background: rgba(250, 246, 238, 0.68);
}

.page {
  padding: 38px 0 58px;
}

.page h1 {
  margin: 0 0 10px;
  font-size: clamp(1.72rem, 2.35vw, 3rem);
  text-transform: uppercase;
}

.page-lead {
  max-width: 900px;
  font-size: 1.12rem;
  line-height: 1.45;
}

.archive-page {
  position: relative;
}

.data-status {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.data-status article,
.indicator-intro {
  border: 1px solid rgba(185, 170, 147, 0.86);
  background: var(--surface);
  box-shadow: var(--shadow-subtle);
}

.data-status article {
  min-height: 126px;
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.data-status strong {
  font-size: clamp(1.12rem, 1.55vw, 1.65rem);
  line-height: 1;
  text-transform: uppercase;
}

.data-status p,
.indicator-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.36;
}

.archive-method {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid rgba(185, 170, 147, 0.9);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.62), rgba(255,255,255,0.24)),
    var(--surface);
  box-shadow: var(--shadow-subtle);
}

.archive-method h2 {
  margin: 5px 0 10px;
  font-size: clamp(1.25rem, 1.65vw, 2rem);
  line-height: 1.08;
  text-transform: uppercase;
}

.archive-method p {
  max-width: 1080px;
  margin: 0;
  line-height: 1.45;
}

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

.method-points article {
  min-height: 118px;
  padding: 12px;
  border: 1px solid rgba(95, 75, 52, 0.22);
  background: rgba(250, 246, 238, 0.68);
}

.method-points strong {
  display: block;
  margin-bottom: 7px;
  color: var(--deep-red);
  font-size: 1.35rem;
  line-height: 1;
}

.method-points span {
  display: block;
  font: 700 0.68rem var(--sans);
  text-transform: uppercase;
  color: #4f4639;
}

.method-points p {
  margin: 7px 0 0;
  font-size: 0.82rem;
  line-height: 1.25;
  color: var(--muted);
}

.data-grid,
.history-grid,
.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.page .data-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.technical-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid rgba(185, 170, 147, 0.9);
  margin-top: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-subtle);
}

.technical-strip article {
  min-height: 104px;
  padding: 16px;
  border-left: 1px solid rgba(185, 170, 147, 0.74);
  display: grid;
  align-content: center;
  gap: 4px;
}

.technical-strip article:first-child {
  border-left: 0;
}

.strip-label {
  font: 700 0.78rem var(--sans);
  text-transform: uppercase;
  color: var(--muted);
}

.technical-strip strong {
  font-size: clamp(1.12rem, 1.55vw, 1.72rem);
  line-height: 0.95;
}

.technical-strip small {
  font-size: 0.86rem;
  text-transform: uppercase;
}

.engine-audit,
.live-flow {
  margin-top: 18px;
  border: 1px solid rgba(185, 170, 147, 0.9);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.58), rgba(255,255,255,0.18)),
    var(--surface);
  box-shadow: var(--shadow-subtle);
}

.engine-audit {
  display: grid;
  grid-template-columns: minmax(280px, 0.64fr) 1fr;
  gap: 18px;
  padding: 18px;
}

.engine-audit > div:first-child {
  display: grid;
  align-content: center;
  gap: 8px;
}

.engine-audit strong {
  font-size: clamp(1.2rem, 1.8vw, 2rem);
  line-height: 1;
}

.engine-audit p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.engine-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.engine-grid article {
  min-height: 98px;
  padding: 13px;
  border: 1px solid rgba(185, 170, 147, 0.78);
  background: rgba(250, 246, 238, 0.58);
  display: grid;
  align-content: center;
  gap: 8px;
}

.engine-grid span,
.flow-chip span,
.flow-chip small {
  font: 700 0.62rem var(--sans);
  text-transform: uppercase;
  color: var(--muted);
}

.engine-grid strong {
  font-size: clamp(1rem, 1.45vw, 1.45rem);
  line-height: 1.05;
}

.live-flow {
  padding: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0.2)),
    #e7e5dd;
  background-size: auto;
}

.flow-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 14px;
}

.flow-head h2 {
  margin: 4px 0 0;
  font-size: clamp(1.2rem, 1.55vw, 1.8rem);
  text-transform: uppercase;
}

.flow-head p {
  margin: 0;
  font: 700 0.72rem var(--sans);
  text-transform: uppercase;
  color: var(--muted);
}

.flow-viewport {
  overflow: hidden;
  border-block: 1px solid rgba(95, 75, 52, 0.26);
  padding: 12px 0;
}

.flow-rail {
  display: flex;
  width: max-content;
  gap: 10px;
  animation: flowDrift 32s linear infinite;
}

.flow-chip {
  width: 210px;
  min-height: 92px;
  padding: 13px;
  border: 1px solid rgba(95, 75, 52, 0.22);
  background: rgba(250, 246, 238, 0.78);
  display: grid;
  align-content: space-between;
  gap: 8px;
}

.flow-chip strong {
  font-size: 1.1rem;
  line-height: 1.05;
}

.pulse-board {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.pulse-row {
  display: grid;
  grid-template-columns: 0.9fr 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(185, 170, 147, 0.78);
  background: rgba(250, 246, 238, 0.6);
}

.pulse-row span,
.pulse-row strong {
  font: 700 0.72rem var(--sans);
  text-transform: uppercase;
}

.pulse-track {
  height: 6px;
  overflow: hidden;
  background: rgba(37, 34, 29, 0.12);
}

.pulse-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--gold), var(--risk));
  animation: pulseWidth 2.8s ease-in-out infinite;
  animation-delay: var(--delay);
}

@keyframes flowDrift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes pulseWidth {
  0%, 100% { opacity: 0.72; transform: scaleX(0.86); transform-origin: left; }
  50% { opacity: 1; transform: scaleX(1); transform-origin: left; }
}

.data-card,
.history-card,
.method-card {
  border: 1px solid rgba(185, 170, 147, 0.86);
  padding: 20px;
  min-height: 180px;
  background: var(--surface);
  box-shadow: var(--shadow-subtle);
}

.page .data-card {
  min-height: 178px;
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.indicator-intro {
  margin-top: 22px;
  padding: 16px;
}

.indicator-intro .strip-label {
  display: block;
  margin-bottom: 7px;
}

.data-badge {
  width: fit-content;
  padding: 4px 7px;
  border: 1px solid rgba(37, 34, 29, 0.26);
  color: var(--muted);
  font: 700 0.58rem var(--sans);
  text-transform: uppercase;
}

.archive-page .history-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.archive-page .history-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 14px;
  min-height: 640px;
  padding: 12px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.62), rgba(255,255,255,0.24)),
    #ded1bb;
}

.archive-page .history-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: rgba(37, 34, 29, 0.78);
  pointer-events: none;
}

.archive-page .history-card > * {
  position: relative;
  z-index: 1;
}

.archive-portraits {
  display: grid;
  grid-template-columns: repeat(var(--portrait-count, 1), minmax(0, 1fr));
  gap: 8px;
  min-height: 230px;
}

.archive-portraits figure {
  position: relative;
  margin: 0;
  min-width: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  border: 1px solid rgba(95, 75, 52, 0.26);
  background: #d8cbb6;
}

.archive-portraits figure::before {
  content: attr(data-initials);
  position: absolute;
  inset: 0 0 34px;
  display: grid;
  place-items: center;
  color: rgba(37, 34, 29, 0.42);
  font: 700 2.4rem var(--sans);
  background: linear-gradient(145deg, #dfd4c0, #f1eadc);
}

.archive-portraits img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 228px;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(0.82) contrast(1.08) sepia(0.12);
  display: block;
}

.archive-portraits figure.portrait-missing img {
  display: none;
}

.archive-portraits figcaption {
  position: relative;
  z-index: 2;
  min-height: 34px;
  padding: 6px 7px;
  font: 700 0.62rem var(--sans);
  line-height: 1.15;
  text-transform: uppercase;
  background: rgba(247, 248, 244, 0.9);
}

.archive-copy {
  display: grid;
  align-content: start;
  gap: 8px;
  border-top: 1px solid rgba(95, 75, 52, 0.28);
  padding-top: 12px;
}

.archive-period {
  font: 700 0.72rem var(--sans);
  letter-spacing: 0;
  color: var(--deep-red);
  text-transform: uppercase;
}

.archive-page .history-card h2 {
  margin: 0;
  font-size: clamp(1.02rem, 1.18vw, 1.42rem);
  line-height: 1.05;
}

.archive-page .history-card p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.36;
}

.criteria-list {
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.criteria-list li {
  padding-left: 12px;
  border-left: 3px solid rgba(125, 22, 18, 0.55);
  color: #4f4639;
  font-size: 0.84rem;
  line-height: 1.25;
}

.dimension-list {
  display: grid;
  gap: 7px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(95, 75, 52, 0.18);
}

.dimension-row {
  display: grid;
  grid-template-columns: 72px 1fr 28px;
  gap: 8px;
  align-items: center;
}

.dimension-row span,
.dimension-row strong {
  font: 700 0.6rem var(--sans);
  text-transform: uppercase;
  color: #4f4639;
}

.dimension-row i {
  height: 5px;
  background: rgba(37, 34, 29, 0.12);
  overflow: hidden;
}

.dimension-row b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--deep-red), var(--gold), var(--green));
}

.archive-score {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  border-top: 1px solid rgba(95, 75, 52, 0.22);
  padding-top: 12px;
}

.archive-score span {
  font: 700 0.62rem var(--sans);
  text-transform: uppercase;
  color: var(--muted);
}

.archive-score strong {
  font-size: 2.2rem;
  line-height: 0.9;
}

.archive-score small {
  font-size: 0.34em;
}

.meta-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.meta-list div {
  min-width: 0;
}

.meta-list dt {
  font: 700 0.67rem var(--sans);
  text-transform: uppercase;
  color: var(--muted);
}

.meta-list dd {
  margin: 3px 0 0;
  font-size: 0.95rem;
}

.split-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  gap: 28px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(185, 170, 147, 0.9);
}

.source-table {
  border: 1px solid rgba(185, 170, 147, 0.86);
  background: var(--surface);
  box-shadow: var(--shadow-subtle);
}

.source-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.95fr) 0.6fr 0.35fr minmax(220px, 1.45fr);
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border-top: 1px solid rgba(185, 170, 147, 0.74);
  font-size: 0.94rem;
  line-height: 1.22;
}

.source-row:first-child {
  border-top: 0;
}

.source-head {
  background: #1f1c18;
  color: #fff9ee;
  font: 700 0.76rem var(--sans);
  text-transform: uppercase;
}

.source-row strong {
  color: var(--deep-red);
}

.region-list {
  display: grid;
  gap: 10px;
}

.region-card {
  display: grid;
  grid-template-columns: 1fr 84px;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(185, 170, 147, 0.86);
  padding: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-subtle);
}

.region-card h3 {
  margin: 0 0 5px;
  font-size: 1.1rem;
  text-transform: uppercase;
}

.region-card p {
  margin: 0;
  line-height: 1.3;
}

.region-score {
  min-height: 74px;
  display: grid;
  place-items: center;
  text-align: center;
  border-left: 4px solid var(--region-color);
  background: linear-gradient(90deg, color-mix(in srgb, var(--region-color) 16%, transparent), transparent);
}

.region-score strong {
  font-size: 2rem;
  line-height: 1;
}

.region-score span {
  font: 700 0.72rem var(--sans);
  text-transform: uppercase;
  color: var(--region-color);
}

.data-card h2,
.history-card h2,
.method-card h2 {
  margin: 0 0 10px;
  text-transform: uppercase;
  font-size: 1rem;
}

.page .data-card h2 {
  margin-bottom: 0;
  font: 700 0.78rem var(--sans);
  color: var(--muted);
}

.big-number {
  font-size: 1.72rem;
  line-height: 1;
}

.page .data-card .big-number {
  font-size: clamp(1.18rem, 1.35vw, 1.52rem);
}

.page .data-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.28;
}

.bar {
  height: 7px;
  background: #d5dad5;
  margin-top: 16px;
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--gold), var(--risk));
}

.form-box {
  max-width: 720px;
  border: 1px solid rgba(185, 170, 147, 0.86);
  padding: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.signup-page {
  padding-top: 30px;
}

.signup-hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 0.72fr);
  gap: 28px;
  align-items: stretch;
}

.signup-copy {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  padding: clamp(28px, 4vw, 56px);
  color: #fff9ee;
  background:
    linear-gradient(135deg, rgba(5, 6, 7, 0.94), rgba(37, 34, 29, 0.88)),
    url("assets/masthead-clima-democratico.png") center / cover;
  border: 1px solid rgba(185, 170, 147, 0.34);
  box-shadow: 0 30px 70px rgba(37, 34, 29, 0.18);
  display: grid;
  align-content: end;
}

.signup-copy::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.48)),
    linear-gradient(90deg, rgba(184, 194, 196, 0.16), transparent 45%);
  pointer-events: none;
}

.signup-copy > * {
  position: relative;
}

.signup-eyebrow {
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(185, 170, 147, 0.46);
  color: #d8e1df;
  background: rgba(255,255,255,0.06);
  font: 700 0.72rem var(--sans);
  text-transform: uppercase;
}

.signup-copy h1 {
  margin-bottom: 12px;
  color: #fffaf0;
  text-shadow: 0 18px 42px rgba(0,0,0,0.45);
}

.signup-copy .page-lead {
  max-width: 760px;
  margin-bottom: 28px;
  color: rgba(245, 247, 244, 0.86);
  font-size: clamp(1.08rem, 1.32vw, 1.32rem);
}

.signup-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.signup-points article {
  min-height: 132px;
  padding: 16px;
  border: 1px solid rgba(185, 170, 147, 0.3);
  background: rgba(255,255,255,0.075);
  backdrop-filter: blur(8px);
}

.signup-points strong {
  display: block;
  margin-bottom: 8px;
  color: #d8e1df;
  font: 700 0.76rem var(--sans);
  text-transform: uppercase;
}

.signup-points span {
  color: rgba(245, 247, 244, 0.78);
  line-height: 1.35;
}

.signup-form {
  max-width: none;
  padding: clamp(24px, 3vw, 38px);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,252,246,0.72)),
    var(--paper);
}

.form-head {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(185, 170, 147, 0.9);
}

.form-head span {
  display: block;
  color: var(--deep-red);
  font: 700 0.76rem var(--sans);
  text-transform: uppercase;
}

.form-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label {
  display: block;
  margin-bottom: 16px;
  color: #4f4639;
  font: 700 0.74rem var(--sans);
  text-transform: uppercase;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 13px 14px;
  border: 1px solid rgba(156, 140, 113, 0.72);
  border-radius: 3px;
  background: rgba(250, 246, 238, 0.86);
  color: var(--ink);
  font: 1rem var(--serif);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(111, 127, 134, 0.22);
  border-color: var(--gold);
  background: #fffaf0;
}

button {
  cursor: pointer;
}

.primary-button {
  border: 1px solid var(--deep-red);
  border-radius: 3px;
  background: linear-gradient(180deg, #394442, #1d2323);
  color: #fff;
  width: 100%;
  min-height: 50px;
  padding: 14px 18px;
  font: 700 0.84rem var(--sans);
  text-transform: uppercase;
  box-shadow: 0 12px 24px rgba(125, 22, 18, 0.18);
}

.form-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.form-status {
  min-height: 22px;
  margin: 12px 0 0;
  color: #2f765e;
  font: 700 0.82rem var(--sans);
  line-height: 1.35;
}

@media (max-width: 1180px) {
  body {
    background:
      linear-gradient(180deg, #efeee7 0, #e7e5dd 22rem, #d2cfc4 100%);
    background-size: auto;
  }

  .topbar {
    grid-template-columns: 1fr;
    height: auto;
    gap: 10px;
    padding: 12px 0;
  }

  .dateline,
  .phase {
    justify-self: center;
  }

  .main-grid,
  .lower-grid {
    grid-template-columns: 1fr;
  }

  .thermometer {
    order: -1;
  }

  .indicators,
  .footer-grid,
  .scale-grid,
  .data-grid,
  .history-grid,
  .method-grid,
  .data-status,
  .method-points,
  .technical-strip,
  .split-panel,
  .signup-hero,
  .engine-audit,
  .pulse-board {
    grid-template-columns: repeat(2, 1fr);
  }

  .signup-hero {
    grid-template-columns: 1fr;
  }

  .archive-page .history-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .engine-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .page .data-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .signup-copy {
    min-height: 460px;
  }

  .source-row {
    grid-template-columns: 1fr 0.55fr 0.32fr;
  }

  .source-row span:last-child {
    grid-column: 1 / -1;
  }

  .scale-head {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .metric:nth-child(odd) {
    border-left: 0;
  }
}

@media (max-width: 740px) {
  .topbar,
  .brand,
  .nav,
  .main-grid,
  .indicator-band,
  .reading-scale,
  .lower-grid,
  .footer-grid,
  .institutional-close,
  .page {
    width: min(100% - 22px, 1860px);
  }

  .brand {
    height: 184px;
  }

  .brand img {
    width: min(96vw, 900px);
    max-height: 122px;
  }

  .brand > div::after {
    letter-spacing: 0.12rem;
    font-size: 0.66rem;
  }

  .brand-subtitle {
    letter-spacing: 0.12rem;
    margin-top: -3px;
    font-size: 0.58rem;
  }

  .nav {
    grid-template-columns: repeat(2, 1fr);
    height: auto;
  }

  .nav a {
    min-height: 46px;
  }

  .main-grid {
    gap: 16px;
  }

  .thermometer {
    padding: 14px 12px;
  }

  .status-title {
    font-size: clamp(1.85rem, 10vw, 2.85rem);
  }

  .lead {
    font-size: 1rem;
  }

  .news-item,
  .editorial,
  .metric-top {
    grid-template-columns: 1fr;
  }

  .news-thumb {
    min-height: 96px;
  }

  .update-strip {
    flex-direction: column;
    gap: 8px;
  }

  .indicators,
  .footer-grid,
  .scale-grid,
  .data-grid,
  .history-grid,
  .method-grid,
  .data-status,
  .method-points,
  .technical-strip,
  .split-panel,
  .engine-audit,
  .engine-grid,
  .pulse-board,
  .signup-hero,
  .signup-points,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .archive-page .history-grid {
    grid-template-columns: 1fr;
  }

  .page .data-grid {
    grid-template-columns: 1fr;
  }

  .archive-page .history-card {
    min-height: auto;
  }

  .flow-head,
  .pulse-row {
    grid-template-columns: 1fr;
  }

  .flow-head {
    display: grid;
    align-items: start;
  }

  .signup-page {
    padding-top: 18px;
  }

  .signup-copy {
    min-height: auto;
    padding: 24px;
  }

  .signup-copy .page-lead {
    font-size: 1rem;
  }

  .signup-points article {
    min-height: auto;
  }

  .metric,
  .mini-card,
  .scale-card {
    border-left: 0;
    border-top: 1px solid rgba(185, 170, 147, 0.74);
  }

  .scale-card:first-child {
    border-top: 0;
  }

  .world-map {
    min-height: 210px;
  }

  .technical-strip article {
    border-left: 0;
    border-top: 1px solid rgba(185, 170, 147, 0.74);
  }

  .technical-strip article:first-child {
    border-top: 0;
  }

  .source-row,
  .region-card,
  .meta-list {
    grid-template-columns: 1fr;
  }

  .source-row span:last-child {
    grid-column: auto;
  }
}
