
:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1f2937;
  background: #f3f4f6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.container {
  width: min(1100px, calc(100% - 2rem));
  margin: 2rem auto;
}

header,
.controls,
.chart-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

header h1 {
  margin: 0 0 0.5rem;
}

header p,
.muted {
  color: #6b7280;
}

.date-navigation,
.date-form {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.date-navigation {
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.date-form input,
.date-form button {
  font: inherit;
  padding: 0.55rem 0.75rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

button {
  border: 0;
  border-radius: 6px;
  background: #2563eb;
  color: white;
  cursor: pointer;
}

a {
  color: #1d4ed8;
}

.chart-container {
  position: relative;
  width: 100%;
  min-width: 0;
  height: min(55vh, 460px);
  min-height: 280px;
}

#price-chart {
  width: 100%;
  min-width: 0;
}

.notice {
  padding: 0.8rem 1rem;
  border-left: 4px solid #d97706;
  background: #fffbeb;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0;
  margin-top: 1rem;
  list-style: none;
  font-size: 0.9rem;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-dot {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
}

.legend-dot.cheap {
  background: #16a34a;
}

.legend-dot.threshold {
  background: #f59e0b;
}

@media (max-width: 600px) {
  .container {
    width: calc(100% - 1rem);
    margin: 0.5rem auto;
  }

  header,
  .controls,
  .chart-section {
    padding: 1rem;
  }

  .date-form {
    align-items: flex-start;
    flex-direction: column;
  }

  .chart-container {
    height: 350px;
  }
}

/* Tagesnavigation */
.date-navigation a {
  text-decoration: none;
  font-weight: 600;
}

.date-navigation a:hover {
  text-decoration: underline;
}

.date-navigation .today-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.85rem;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
}

.date-navigation .today-link.is-today {
  opacity: 0.65;
}

/* Dezente optische Aufwertung */
header,
.controls,
.chart-section {
  border-color: #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 18px rgb(15 23 42 / 4%);
}

header h1 {
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  letter-spacing: -0.035em;
}

header p {
  line-height: 1.6;
}

.chart-section h2 {
  margin-top: 0;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.date-form input[type="date"] {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.date-form input[type="checkbox"] {
  accent-color: #2563eb;
}

.date-form button {
  padding: 0.6rem 1rem;
  font-weight: 600;
}

.date-form button:hover {
  background: #1d4ed8;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 3px;
}

@media (max-width: 600px) {
  .date-navigation {
    justify-content: flex-start;
    gap: 0.75rem;
  }

  .date-navigation .muted {
    flex-basis: 100%;
  }
}