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

body {
  font-family: system-ui, sans-serif;
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  color: #1e293b;
  background: #f8fafc;
}

h1 {
  margin-bottom: 0.25rem;
}

.controls {
  margin: 1rem 0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

button {
  padding: 0.35rem 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  color: #334155;
  transition:
    background 0.15s,
    color 0.15s;
}

button:hover {
  background: #f1f5f9;
}

button.active {
  background: #1e3a8a;
  color: #fff;
  border-color: #1e3a8a;
}

.chart-wrap {
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

a.download {
  display: inline-block;
  margin-top: 1.25rem;
  color: #1e3a8a;
  text-decoration: none;
  font-size: 0.9rem;
}

a.download:hover {
  text-decoration: underline;
}

.hidden {
  display: none;
}

#overlay {
  position: fixed;
  inset: 0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}

#overlay.hidden {
  display: none;
}

#overlay-box {
  background: #fff;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 260px;
}

#overlay-box h2 {
  margin: 0;
}

#unlock-form {
  display: flex;
  gap: 0.5rem;
}

#password-input {
  flex: 1;
  padding: 0.35rem 0.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.9rem;
}

#unlock-error {
  margin: 0;
  color: #dc2626;
  font-size: 0.9rem;
}
