:root {
  /* chart series (dataviz reference palette, light) */
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948; --s-other: #a8a7a0;
  --bg: #fbfaf7; --surface: #ffffff; --text: #1d2125; --muted: #5d656d; --line: #e3e0d8;
  --accent: #0b6e8a; --accent-soft: #e3f1f5;
  --aqi-0: #2e9d4e; --aqi-1: #d9b400; --aqi-2: #e8792b; --aqi-3: #d33a32; --aqi-4: #8b3fa0; --aqi-5: #7e1d2b;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
    --s5: #d55181; --s6: #0ca30c; --s7: #9085e9; --s8: #e66767; --s-other: #6b6a64;
    --bg: #14171a; --surface: #1c2024; --text: #e8e6e1; --muted: #a2a9b0; --line: #2e3439;
    --accent: #5cc0dc; --accent-soft: #17323b;
  }
}
:root[data-theme="dark"] {
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --s5: #d55181; --s6: #0ca30c; --s7: #9085e9; --s8: #e66767; --s-other: #6b6a64;
  --bg: #14171a; --surface: #1c2024; --text: #e8e6e1; --muted: #a2a9b0; --line: #2e3439;
  --accent: #5cc0dc; --accent-soft: #17323b;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
main { max-width: 960px; margin: 0 auto; padding: 8px 16px 48px; }
h1 { font-size: 2rem; line-height: 1.2; margin: 24px 0 8px; }
h2 { font-size: 1.25rem; margin: 28px 0 8px; }
.lede { color: var(--muted); font-size: 1.1rem; max-width: 40em; }
.note, .updated { color: var(--muted); font-size: .9rem; }
.empty { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }

header.top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.brand { font-weight: 700; font-size: 1.2rem; color: var(--text); text-decoration: none; }
.brand span { color: var(--accent); }
header nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
header nav a { color: var(--text); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
header nav a[aria-current="page"] { border-color: var(--accent); }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; padding: 16px; text-align: center; }

.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.cards a { display: block; height: 100%; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--text); text-decoration: none; }
.cards a:hover { border-color: var(--accent); }
.cards h2 { margin: 0 0 4px; color: var(--accent); }
.cards p { margin: 0; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.chips a { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--text); background: var(--surface); font-size: .9rem; }
.chips a[aria-current="true"] { background: var(--accent-soft); border-color: var(--accent); }

h2.day { font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
ul.events { list-style: none; padding: 0; margin: 0; }
ul.events li { display: grid; grid-template-columns: 5.5em 1fr; gap: 12px; padding: 8px 0; }
ul.events time { color: var(--muted); font-variant-numeric: tabular-nums; }
.kind { display: inline-block; font-size: .75rem; padding: 0 8px; border-radius: 999px; background: var(--accent-soft); color: var(--text); margin-right: 4px; }
ul.events small { color: var(--muted); }

ul.products { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
ul.products a { display: flex; flex-direction: column; gap: 4px; color: var(--text); text-decoration: none; }
ul.products img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
ul.products .title { font-weight: 600; }
ul.products .meta { color: var(--muted); font-size: .9rem; }

.aqi-now { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); border-left-width: 8px; }
.aqi-value { font-size: 3rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.aqi-now.aqi-0 { border-left-color: var(--aqi-0); } .aqi-now.aqi-1 { border-left-color: var(--aqi-1); }
.aqi-now.aqi-2 { border-left-color: var(--aqi-2); } .aqi-now.aqi-3 { border-left-color: var(--aqi-3); }
.aqi-now.aqi-4 { border-left-color: var(--aqi-4); } .aqi-now.aqi-5 { border-left-color: var(--aqi-5); }
.chart { margin: 16px 0; }
.chart svg { width: 100%; height: auto; }
.chart text { fill: var(--muted); font-size: 12px; }
.chart .axis { stroke: var(--line); }
rect.aqi-0 { fill: var(--aqi-0); } rect.aqi-1 { fill: var(--aqi-1); } rect.aqi-2 { fill: var(--aqi-2); }
rect.aqi-3 { fill: var(--aqi-3); } rect.aqi-4 { fill: var(--aqi-4); } rect.aqi-5 { fill: var(--aqi-5); }
figcaption { color: var(--muted); font-size: .85rem; }
table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .95rem; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }
td small { color: var(--muted); }
.services section { margin-bottom: 8px; }
ul.facilities { columns: 2 240px; padding-left: 18px; }
ul.facilities li { break-inside: avoid; margin-bottom: 6px; }
ul.facilities small { color: var(--muted); }
@media (max-width: 480px) { ul.events li { grid-template-columns: 4.5em 1fr; } h1 { font-size: 1.6rem; } }
rect.bar-rev { fill: var(--accent); } rect.bar-exp { fill: var(--muted); }
.key-rev, .key-exp { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 8px; vertical-align: baseline; }
.key-rev { background: var(--accent); } .key-exp { background: var(--muted); }
h3 { font-size: 1.05rem; margin: 24px 0 4px; }
ul.stats { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
ul.stats li { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.stat-label { display: block; color: var(--muted); font-size: .85rem; }
.stat-value { display: block; font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
table.bars th { width: 7em; font-weight: normal; min-width: 7em; }
table.bars td:nth-child(2) { width: 60%; }
.bar { display: inline-block; height: 12px; border-radius: 3px; background: var(--accent); }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.chart.stack rect.seg { stroke: var(--bg); stroke-width: 2px; }
.chart .grid { stroke: var(--line); }
.chart .tick { fill: var(--muted); font-size: 11px; }
.chart .total { fill: var(--text); font-size: 11px; font-weight: 600; }
ul.legend { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .85rem; color: var(--text); }
ul.legend .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }
details summary { cursor: pointer; color: var(--accent); margin: 8px 0; }
.chart-title { font-weight: 600; margin-bottom: 4px; color: var(--text); }
table.bars.wide th { width: 45%; }
table.bars.wide td:nth-child(2) { width: 40%; }
.chart.lines .line { fill: none; stroke-width: 2px; stroke-linejoin: round; }
.chart.lines .end-label { fill: var(--text); font-size: 12px; }
.chart.lines .end-value { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart.lines rect.hit { fill: transparent; }
.chart.lines rect.hit:hover { fill: var(--line); fill-opacity: .5; }
.notice { padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; }
form.stack { display: grid; gap: 8px; max-width: 420px; margin: 16px 0; }
form.stack label { font-weight: 600; font-size: .95rem; }
form.stack input[type="email"], form.stack input:not([type]) { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); }
button, a.button { font: inherit; display: inline-block; padding: 8px 16px; border: 1px solid var(--accent); border-radius: 8px; background: var(--accent); color: var(--bg); text-decoration: none; cursor: pointer; justify-self: start; }
button.danger { background: transparent; color: var(--s8); border-color: var(--s8); }
.or { color: var(--muted); margin: 4px 0; }
.stat-text { display: block; font-size: 1.05rem; font-weight: 600; overflow-wrap: anywhere; }
