:root {
  --bg0: #0f1a17;
  --bg1: #15241f;
  --ink: #e8f2ec;
  --muted: #8aa396;
  --line: rgba(232, 242, 236, 0.12);
  --accent: #c8f54a;
  --accent-2: #3d9b7a;
  --danger: #ff6b4a;
  --panel: rgba(21, 36, 31, 0.72);
  --font-display: "Syne", sans-serif;
  --font-body: "Instrument Sans", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--bg0);
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(200, 245, 74, 0.18), transparent 55%),
    radial-gradient(700px 420px at 90% 10%, rgba(61, 155, 122, 0.28), transparent 50%),
    linear-gradient(165deg, #0c1411 0%, #15241f 45%, #0f1a17 100%);
}

body {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.top {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1.4fr 0.8fr;
  align-items: end;
  margin-bottom: 2.25rem;
  animation: rise 0.7s ease both;
}

.eyebrow {
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--muted);
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.brand span {
  color: var(--accent);
}

.lede {
  margin: 0.85rem 0 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.45;
}

.actions {
  text-align: right;
}

.btn {
  appearance: none;
  border: 0;
  background: var(--accent);
  color: #102018;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.25rem;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:disabled { opacity: 0.55; cursor: wait; transform: none; }

.sync-meta {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.5rem;
  animation: rise 0.8s ease 0.08s both;
}

.kpis article {
  padding: 1rem 1.1rem 1.15rem;
  border-top: 2px solid var(--accent);
  background: linear-gradient(180deg, rgba(200, 245, 74, 0.08), transparent 55%), var(--panel);
  backdrop-filter: blur(8px);
}

.kpis span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.kpis .kpi-link {
  display: inline;
  margin-left: 0.35rem;
  color: var(--accent);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.72rem;
  text-decoration: none;
}

.kpis .kpi-link:hover {
  text-decoration: underline;
}

.kpis strong {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--font-display);
  font-size: 1.85rem;
  letter-spacing: -0.02em;
}

.kpis .kpi-note {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
}

.charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.75rem;
  animation: rise 0.85s ease 0.14s both;
}

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

.hint code {
  font-size: 0.85em;
  color: var(--accent);
}

.panel, .joins {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1rem 1.1rem 1.15rem;
  backdrop-filter: blur(8px);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.chart-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  justify-content: flex-end;
}

.year-picker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.year-picker select {
  appearance: none;
  background: rgba(200, 245, 74, 0.12);
  color: var(--accent);
  border: 1px solid rgba(200, 245, 74, 0.35);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
}

.filter-tabs[hidden],
.year-picker[hidden] {
  display: none !important;
}

.panel-head h2, .joins h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.tabs {
  display: flex;
  gap: 0.25rem;
}

.tabs button {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
}

.tabs button.active {
  background: rgba(200, 245, 74, 0.15);
  color: var(--accent);
  border-color: rgba(200, 245, 74, 0.35);
}

.hint {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.joins {
  animation: rise 0.9s ease 0.2s both;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 0.75rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th, td {
  text-align: left;
  padding: 0.65rem 0.45rem;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

td a {
  color: var(--accent);
  text-decoration: none;
}

td a:hover { text-decoration: underline; }

footer {
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.8rem;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 860px) {
  .top, .charts, .kpis {
    grid-template-columns: 1fr;
  }
  .actions { text-align: left; }
}
