@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;800&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg: #f2f7f5;
  --surface: #ffffff;
  --surface-strong: #eef6f2;
  --ink: #10241d;
  --muted: #4f6860;
  --primary: #0d6a52;
  --primary-strong: #084e3d;
  --accent: #d26b2c;
  --accent-soft: #f7d8c3;
  --border: #c9ddd4;
  --shadow: 0 16px 38px rgba(8, 66, 52, 0.12);
  --radius-lg: 24px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 10%, rgba(27, 161, 119, 0.18), transparent 28%),
    radial-gradient(circle at 88% 16%, rgba(210, 107, 44, 0.14), transparent 31%),
    linear-gradient(180deg, #f8fcfa 0%, #eef6f2 56%, #eaf2ef 100%),
    var(--bg);
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: auto -14vw -220px auto;
  width: min(44vw, 560px);
  height: min(44vw, 560px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 106, 82, 0.2), rgba(13, 106, 82, 0));
  pointer-events: none;
  z-index: -1;
}

.page-header {
  padding: 30px 24px 10px;
  max-width: 1220px;
  margin: 0 auto;
}

h1 {
  margin: 0;
  font-family: 'Archivo', sans-serif;
  font-size: clamp(2rem, 3vw, 3.1rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.title-single-line {
  white-space: nowrap;
  font-size: clamp(1.6rem, 2.75vw, 3.05rem);
}

h2 {
  margin: 0;
  font-size: 1.35rem;
  font-family: 'Archivo', sans-serif;
  letter-spacing: -0.015em;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--primary);
  font-weight: 700;
}

.lede {
  max-width: 62ch;
  color: var(--muted);
  margin: 12px 0 0;
  font-size: 1rem;
  line-height: 1.55;
}

.brand-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}

nav {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}

a.nav-link {
  text-decoration: none;
  color: var(--primary-strong);
  font-weight: 600;
  padding: 10px 15px;
  border: 1px solid rgba(13, 106, 82, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(5px);
  transition: transform 160ms ease, box-shadow 200ms ease, background-color 200ms ease;
}

a.nav-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(13, 106, 82, 0.16);
}

a.nav-link.is-active {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #f3fffb;
  border-color: transparent;
}

main {
  padding: 14px 24px 30px;
  display: grid;
  gap: 18px;
  max-width: 1220px;
  margin: 0 auto;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: card-in 420ms ease both;
}

.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(13, 106, 82, 0.74), rgba(210, 107, 44, 0.74));
  opacity: 0.5;
}

.hero-grid,
.insight-grid,
.chart-grid,
.stats-grid {
  display: grid;
  gap: 16px;
}

.small {
  color: var(--muted);
  margin-top: 4px;
}

.plot {
  width: 100%;
  min-height: 460px;
}

.plot-short {
  min-height: 420px;
}

input,
select {
  padding: 10px 12px;
  border-radius: 13px;
  border: 1px solid #c4d9d0;
  background: #fff;
  color: var(--ink);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 106, 82, 0.16);
}

.filters {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #dbe8e2;
  border-radius: 18px;
  background: linear-gradient(180deg, #fafffd, #f2f8f5);
}

.filters label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.filters input,
.filters select {
  width: 100%;
}

.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 6px;
}

.toggle-wrap input[type='checkbox'] {
  width: auto;
  transform: translateY(1px);
}

.hero-grid {
  grid-template-columns: minmax(320px, 1.25fr) minmax(280px, 1fr);
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(235, 248, 241, 0.86));
  border: 1px solid rgba(163, 203, 186, 0.48);
}

.stat-label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.stat-value {
  font-size: 1.38rem;
  line-height: 1.05;
}

.stat-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.card-spotlight {
  background:
    linear-gradient(135deg, rgba(10, 77, 59, 0.97), rgba(13, 106, 82, 0.92)),
    var(--primary);
  color: #f7f2e7;
}

.card-spotlight .small,
.card-spotlight .section-kicker,
.card-spotlight .lede,
.card-spotlight p {
  color: rgba(247, 242, 231, 0.86);
}

.card-spotlight h2 {
  margin-bottom: 10px;
  font-size: 1.75rem;
  max-width: 20ch;
}

.stats-shell {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(241, 251, 246, 0.94));
}

.card-chart {
  padding-bottom: 8px;
}

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

.comparativos-grid {
  grid-template-columns: 1.35fr 0.85fr;
}

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

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

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

.list-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f7fcfa);
  border: 1px solid #d4e5de;
}

.list-card.compact {
  grid-template-columns: 1fr auto;
}

.rank-badge {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(180deg, #f9e1cf, #f4cfae);
  color: #8d4719;
  font-weight: 700;
}

.list-main {
  display: grid;
  gap: 2px;
}

.list-side {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.delta {
  font-weight: 700;
  font-size: 0.92rem;
}

.delta.up { color: #2d7f50; }
.delta.down { color: #a15040; }
.delta.flat { color: #82754d; }

.text-block {
  display: grid;
  gap: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.text-block p {
  margin: 0;
}

.table-shell {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid #e7ece5;
  vertical-align: top;
}

th {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.small-inline {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
}

.warning-card {
  background: linear-gradient(180deg, rgba(255, 249, 242, 0.98), rgba(250, 237, 223, 0.96));
}

.empty-state {
  color: var(--muted);
  margin: 0;
}

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

@media (max-width: 680px) {
  .page-header, main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-grid,
  .insight-grid,
  .comparativos-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: none;
  }

  .title-single-line {
    white-space: normal;
    line-height: 1.02;
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .insight-grid,
  .comparativos-grid,
  .two-col {
    grid-template-columns: 1fr;
  }
}
