:root {
  --paper: #f3f0e8;
  --ink: #19251f;
  --muted: #68736c;
  --line: #d8d5ca;
  --card: #fbfaf6;
  --green: #28725a;
  --green-soft: #dce9df;
  --lime: #91a23c;
  --amber: #d1882c;
  --red: #bd503f;
  --blue: #527b8d;
  --purple: #755d84;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  background:
    radial-gradient(circle at 88% 2%, rgba(145, 162, 60, .10), transparent 24rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: .78rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(209, 136, 44, .12);
}

.header-status.live .status-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(40, 114, 90, .12);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: end;
  padding: 68px 0 42px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .16em;
}

h1,
h2,
p { margin-top: 0; }

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 6.6vw, 5.8rem);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: .96;
}

.lede {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.updated {
  padding-bottom: 4px;
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: .08em;
  text-align: right;
  text-transform: uppercase;
}

.updated strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: .85rem;
  letter-spacing: 0;
  text-transform: none;
}

.summary {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(251, 250, 246, .78);
  box-shadow: 0 20px 60px rgba(25, 37, 31, .05);
  overflow: hidden;
}

.hero-reading {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 34px;
}

.gauge {
  --gauge-color: var(--green);
  display: grid;
  flex: 0 0 146px;
  width: 146px;
  height: 146px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--gauge-color) calc(var(--gauge-value) * 1%), #e3e3da 0);
  position: relative;
}

.gauge::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: inherit;
  background: var(--card);
}

.gauge > div { position: relative; z-index: 1; text-align: center; }
.gauge strong { display: block; font-family: Georgia, serif; font-size: 2.8rem; font-weight: 400; line-height: .9; }
.gauge span { display: block; margin-top: 7px; color: var(--muted); font-size: .68rem; }

.hero-reading h2,
.section-heading h2 {
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -.03em;
}

.hero-reading p:last-child {
  max-width: 330px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.55;
}

.summary-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px;
  border-left: 1px solid var(--line);
}

.summary-stat > span { color: var(--muted); font-size: .72rem; }
.summary-stat strong { margin: 10px 0 5px; font-family: Georgia, serif; font-size: 1.6rem; font-weight: 400; }
.summary-stat small { color: var(--muted); line-height: 1.45; }

.section-block { padding: 66px 0 4px; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.section-heading h2 { margin-bottom: 0; }

.legend,
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: .7rem;
}

.legend span,
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.legend i,
.chart-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.legend .good { background: var(--amber); }
.legend .fair { background: var(--red); }

.room-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.room-card {
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.room-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.room-card h3 { margin: 0; font-family: Georgia, serif; font-size: 1.3rem; font-weight: 400; }

.band {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.band.good { background: #f3e7ce; color: #8b5b1f; }
.band.fair, .band.poor { background: #f1dcd7; color: #913e32; }

.primary-number { margin: 27px 0 24px; }
.primary-number strong { font-family: Georgia, serif; font-size: 3.5rem; font-weight: 400; letter-spacing: -.06em; line-height: .8; }
.primary-number span { margin-left: 5px; color: var(--muted); font-size: .65rem; }

.room-meta {
  display: flex;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .7rem;
}

.room-meta strong { color: var(--ink); font-weight: 600; }

.trend-section { padding-top: 80px; }

.range-switcher { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: rgba(251, 250, 246, .7); }
.range-switcher button { min-width: 44px; padding: 7px 10px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: .72rem; }
.range-switcher button.active { background: var(--ink); color: white; }

.chart-wrap {
  position: relative;
  min-height: 340px;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.chart-y-label { position: absolute; top: 12px; left: 2px; color: var(--muted); font-size: .63rem; letter-spacing: .06em; }
.trend-chart { display: block; width: 100%; height: 320px; overflow: visible; }

.chart-tooltip {
  position: absolute;
  z-index: 3;
  min-width: 150px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(25, 37, 31, .94);
  color: white;
  font-size: .7rem;
  line-height: 1.55;
  pointer-events: none;
}

.chart-legend { justify-content: center; padding-top: 18px; }

.events-list { border-top: 1px solid var(--line); }

.event {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 20px;
  align-items: center;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
  font-size: .83rem;
}

.event-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.event strong { font-weight: 650; }
.event p { margin: 3px 0 0; color: var(--muted); }
.event-value { color: var(--amber); font-family: Georgia, serif; font-size: 1.35rem; }
.empty-state { padding: 26px 0; color: var(--muted); }

footer {
  display: flex;
  justify-content: space-between;
  margin-top: 84px;
  padding: 24px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .68rem;
}

@media (max-width: 900px) {
  .summary { grid-template-columns: 1fr 1fr; }
  .hero-reading { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .summary-stat:first-of-type { border-left: 0; }
  .room-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .site-header, main, footer { width: min(100% - 28px, 1180px); }
  .intro { grid-template-columns: 1fr; gap: 20px; padding-top: 48px; }
  .updated { text-align: left; }
  .summary { grid-template-columns: 1fr; }
  .hero-reading { flex-direction: column; align-items: flex-start; }
  .summary-stat { border-top: 1px solid var(--line); border-left: 0; }
  .room-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .legend { gap: 10px; }
  .event { grid-template-columns: 60px 1fr; padding: 14px 0; }
  .event-value { grid-column: 2; }
  footer { flex-direction: column; gap: 8px; }
}
