/* SlimHuys — minimal mobile-first CSS. Geen build-step. */

:root {
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --accent: #0ea5e9;
  --low: #22c55e;     /* goedkoop / groen */
  --mid: #f59e0b;     /* gemiddeld / oranje */
  --high: #ef4444;    /* duur / rood */
  --very-low: #16a34a;
  --very-high: #b91c1c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.06);
  --gap: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --bg-card: #111827;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --border: #1f2937;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* Topbar */

.topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(140%) blur(8px);
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
}

.brand__mark { font-size: 20px; }

.supplier {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.supplier select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 14px;
}

/* Now-card */

.now-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  margin: 24px 0;
  border-left: 6px solid var(--border);
  transition: border-color 200ms ease;
}

.now-card[data-status="low"]       { border-left-color: var(--low); }
.now-card[data-status="very-low"]  { border-left-color: var(--very-low); }
.now-card[data-status="mid"]       { border-left-color: var(--mid); }
.now-card[data-status="high"]      { border-left-color: var(--high); }
.now-card[data-status="very-high"] { border-left-color: var(--very-high); }

.now-card__label {
  margin: 0 0 4px;
  color: var(--text-muted);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.now-card__price {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.now-card__value {
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.now-card__unit {
  font-size: 18px;
  color: var(--text-muted);
}

.now-card__verdict {
  margin: 12px 0 0;
  font-size: 16px;
  font-weight: 500;
}

.now-card__time {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* Cheapest window */

.cheapest, .chart, .appliances {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin: 16px 0;
}

.cheapest h2, .chart h2, .appliances h2 {
  margin: 0 0 12px;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.cheapest__row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.chip {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
}

.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.cheapest__result {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

/* Chart */

.chart__legend {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 4px;
}

.legend-dot--low  { background: var(--low); }
.legend-dot--mid  { background: var(--mid); }
.legend-dot--high { background: var(--high); }

.chart__bars {
  display: grid;
  grid-template-columns: repeat(96, 1fr);
  align-items: end;
  gap: 1px;
  height: 140px;
  background: var(--bg);
  border-radius: 8px;
  padding: 4px;
  overflow: hidden;
}

.bar {
  background: var(--mid);
  border-radius: 1px 1px 0 0;
  min-height: 1px;
  transition: opacity 120ms ease;
}

.bar--very-low  { background: var(--very-low); }
.bar--low       { background: var(--low); }
.bar--mid       { background: var(--mid); }
.bar--high      { background: var(--high); }
.bar--very-high { background: var(--very-high); }
.bar--now {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  z-index: 1;
}

.chart__axis {
  display: flex;
  justify-content: space-between;
  margin: 6px 4px 0;
  color: var(--text-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* Appliances */

.appliances__lead {
  margin: -4px 0 12px;
  font-size: 14px;
  color: var(--text-muted);
}

.appliances__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.appliances__list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 15px;
  gap: 12px;
}

.appliances__list small {
  color: var(--text-muted);
  font-size: 12px;
  margin-left: 4px;
}

.save {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--low);
  text-align: right;
  white-space: nowrap;
}

footer {
  margin: 24px auto 64px;
  font-size: 13px;
  color: var(--text-muted);
}

footer a { color: var(--text-muted); }
