:root {
  /* Dark mode (default) */
  --bg-page: #1a1a1a;
  --bg-chrome: #0f0f0f;
  --bg-card: #242424;
  --border: #2a2a2a;
  --text-primary: #f0f0f0;
  --text-muted: #b0b0b0;
  --text-dim: #8a8a8a;

  /* Forecast accents — set per card via inline style or data-* */
  --accent-sunny:  #d4a574;
  --accent-cloudy: #8a99a8;
  --accent-rainy:  #4a7891;
  --accent-stormy: #6b5b8a;
  --accent-snow:   #a8c5d8;

  /* Chip semantic colors */
  --chip-trusted-bg: #2d4030;
  --chip-trusted-fg: #a8d4a8;
  --chip-trusted-border: #3d5a40;
  --chip-excluded-bg: #402d2d;
  --chip-excluded-fg: #d4a8a8;
  --chip-excluded-border: #5a3d3d;

  /* Agreement dot colors */
  --agree-high: #a8d4a8;
  --agree-med:  #d4c98a;
  --agree-low:  #d97a5a;

  /* Season accent — overridden server-side */
  --accent-season: #7a9b6e;

  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
}

[data-theme="light"] {
  --bg-page: #f7f7f7;
  --bg-chrome: #ffffff;
  --bg-card: #ffffff;
  --border: #e0e0e0;
  --text-primary: #1a1a1a;
  --text-muted: #555555;
  --text-dim: #888888;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-stack);
  font-size: 15px;
  line-height: 1.5;
}

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-chrome);
  border-bottom: 1px solid var(--border);
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 18px 40px;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-season);
  outline-offset: 2px;
}

.chip-strip {
  background: var(--bg-card);
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.chip-strip .label {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-right: 4px;
}
.chip {
  background: var(--chip-trusted-bg);
  color: var(--chip-trusted-fg);
  border: 1px solid var(--chip-trusted-border);
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.chip[aria-pressed="false"] {
  background: var(--chip-excluded-bg);
  color: var(--chip-excluded-fg);
  border-color: var(--chip-excluded-border);
  text-decoration: line-through;
  text-decoration-color: var(--chip-excluded-fg);
}
.chip .info {
  opacity: 0.7;
  font-size: 11px;
  cursor: help;
}

.fc-card {
  background: var(--bg-card);
  border-left: 3px solid var(--accent-rainy);
  padding: 18px 22px;
  margin: 16px 0;
  border-radius: 4px;
}
.fc-card[data-condition="sunny"]  { border-left-color: var(--accent-sunny); }
.fc-card[data-condition="cloudy"] { border-left-color: var(--accent-cloudy); }
.fc-card[data-condition="rainy"]  { border-left-color: var(--accent-rainy); }
.fc-card[data-condition="stormy"] { border-left-color: var(--accent-stormy); }
.fc-card[data-condition="snow"]   { border-left-color: var(--accent-snow); }

.fc-card .label {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.fc-card .temp { font-size: 46px; font-weight: 300; letter-spacing: -1px; }
.fc-card .temp-low { font-size: 14px; color: var(--text-dim); margin-left: 8px; }
.fc-card .condition { font-size: 13px; color: var(--text-muted); }

.agree-row {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.agree-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.agree-dot.high { background: var(--agree-high); }
.agree-dot.medium { background: var(--agree-med); }
.agree-dot.low { background: var(--agree-low); }

.hourly-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0;
  scroll-snap-type: x mandatory;
}
.hourly-cell {
  flex: 0 0 60px;
  text-align: center;
  font-size: 12px;
  scroll-snap-align: start;
  padding: 8px 4px;
  background: var(--bg-card);
  border-radius: 4px;
}

.daily-grid {
  display: grid;
  gap: 8px;
}

.alerts-card {
  border: 1px solid #6b3030;
  background: #2d1010;
  color: #f0d8d8;
  padding: 14px 18px;
  border-radius: 4px;
  margin: 16px 0;
}

.radar-map { height: 360px; border-radius: 4px; overflow: hidden; }
.radar-footer { display: flex; justify-content: flex-end; padding: 8px 0; }
.radar-footer a { color: var(--accent-season); text-decoration: none; font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
