/* style.css */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, sans-serif;
  font-size: 15px;
  background: #f5f5f5;
  color: #222;
  min-height: 100vh;
}

/* ── Nav ── */
nav {
  background: #1a1a2e;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 0;
}
nav h1 { color: #fff; font-size: 1rem; font-weight: 600; padding: 1rem 0; flex: 1; }
nav button {
  background: none;
  border: none;
  color: #aaa;
  padding: 1rem 1.2rem;
  cursor: pointer;
  font-size: 0.9rem;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
nav button:hover { color: #fff; }
nav button.active { color: #fff; border-bottom-color: #4fc3f7; }
.nav-sep { width: 1px; background: #333; margin: 0.5rem 0.8rem; align-self: stretch; }
.year-select {
  background: #2a2a4a;
  color: #fff;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  align-self: center;
}
.year-select:focus { border-color: #4fc3f7; }

/* ── Page container ── */
main { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; }

/* ── Section headings ── */
h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; color: #333; }

section { margin-bottom: 2.5rem; }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
thead { background: #1a1a2e; color: #fff; }
th, td { padding: 0.6rem 1rem; text-align: right; font-size: 0.875rem; }
th:first-child, td:first-child { text-align: left; }
tbody tr:nth-child(even) { background: #fafafa; }
tbody tr:hover { background: #e8f4fd; }

/* ── Chart grid ── */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 700px) {
  .charts-grid { grid-template-columns: 1fr; }
}

/* ── Chart container ── */
.chart-wrap {
  background: #fff;
  border-radius: 6px;
  padding: 1.2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.chart-wrap h3 { font-size: 0.85rem; font-weight: 600; color: #555; margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
.chart-wrap canvas { max-height: 280px; }

/* ── Collapsible sections (page 2) ── */
.accordion-item {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.2rem;
  cursor: pointer;
  font-weight: 500;
  user-select: none;
  background: #fff;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 0.9rem;
}
.accordion-header:hover { background: #f0f7ff; }
.accordion-chevron { transition: transform 0.2s; font-size: 0.8rem; color: #888; }
.accordion-chevron.open { transform: rotate(180deg); }
.accordion-body { padding: 1rem 1.2rem 1.2rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.accordion-body img {
  max-width: calc(50% - 0.5rem);
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  object-fit: contain;
  background: #fafafa;
}

/* Hide Alpine x-cloak elements until Alpine initializes */
[x-cloak] { display: none !important; }

@media (max-width: 600px) {
  .accordion-body img { max-width: 100%; }
}