:root {
  --paper: #f2f0e8;
  --paper-deep: #e6e3d8;
  --ink: #161616;
  --muted: #74736c;
  --line: #c9c6ba;
  --blue: #265dff;
  --orange: #ff6b35;
  --green: #4f8d5c;
  --black: #000;
  --sans: "Space Grotesk", "Trebuchet MS", sans-serif;
  --mono: "DM Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); }
body { margin: 0; min-width: 320px; font-family: var(--sans); background: var(--paper); }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .28; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(to bottom, #000, transparent 72%); }
.shell { position: relative; width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 36px; }
.mono { font-family: var(--mono); }
.eyebrow { margin: 0; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .11em; line-height: 1.3; text-transform: uppercase; }
.skip-link { position: absolute; left: 12px; top: -100px; padding: 10px 14px; color: var(--paper); background: var(--ink); z-index: 2; }
.skip-link:focus { top: 12px; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 62px; border-bottom: 2px solid var(--ink); }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-logo { display: block; width: 148px; height: auto; }
.brand-mark { display: flex; align-items: flex-end; gap: 3px; width: 28px; height: 25px; padding: 3px; background: var(--ink); transform: rotate(-6deg); }
.brand-mark span { display: block; width: 5px; background: var(--orange); }
.brand-mark span:nth-child(1) { height: 8px; }.brand-mark span:nth-child(2) { height: 15px; }.brand-mark span:nth-child(3) { height: 20px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 20px; font-weight: 600; letter-spacing: -.04em; line-height: 1; }
h1 span { color: var(--blue); }
.connection { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; }
.pulse-dot { width: 9px; height: 9px; border: 2px solid var(--orange); border-radius: 50%; }
.pulse-dot.is-live { border-color: var(--green); background: var(--green); box-shadow: 0 0 0 4px rgba(79,141,92,.14); }
.connection .mono { margin-left: 10px; color: var(--muted); }
.hero-grid { display: grid; grid-template-columns: 1fr 260px; gap: 30px; align-items: center; padding: 58px 0 52px; }
.hero-copy h2 { max-width: 620px; margin: 10px 0 18px; font-size: clamp(54px, 9vw, 112px); font-weight: 600; letter-spacing: -.09em; line-height: .82; }
.hero-copy h2 em { color: var(--blue); font-style: normal; }
.lede { max-width: 430px; margin-bottom: 18px; color: #4b4a44; font-size: 16px; line-height: 1.45; }
.coordinates { color: var(--muted); font-size: 10px; letter-spacing: .05em; }
.hero-badge { position: relative; justify-self: end; width: 220px; color: var(--blue); }
.hardware-image { display: block; width: 100%; border: 1px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.badge-label { position: absolute; right: -4px; bottom: 3px; padding: 4px 7px; color: var(--paper); background: var(--ink); font-size: 10px; transform: rotate(-8deg); }
@keyframes orbit { to { transform: rotate(360deg); } }
.metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.metric-card { min-height: 168px; padding: 14px; border: 1px solid var(--ink); background: rgba(255,255,255,.18); box-shadow: 4px 4px 0 var(--ink); }
.metric-card--primary { color: var(--paper); background: var(--blue); }
.metric-card--wide { background: var(--orange); }
.metric-top { display: flex; justify-content: space-between; gap: 8px; font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.metric-index { opacity: .6; }.metric-window { letter-spacing: .02em; }
.metric-value { margin: 42px 0 0; font-family: var(--mono); font-size: clamp(30px, 4vw, 48px); letter-spacing: -.1em; line-height: .8; }
.metric-unit { margin: 12px 0 0; font-family: var(--mono); font-size: 11px; }
.metric-unit span { margin-left: 8px; opacity: .58; text-transform: uppercase; }
.chart-panel { margin-top: 52px; padding: 22px; border: 1px solid var(--ink); background: rgba(255,255,255,.2); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 4px 0 0; font-size: 28px; letter-spacing: -.07em; }
.legend { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; color: var(--muted); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
.legend-swatch { display: inline-block; width: 24px; height: 6px; background: var(--blue); }
.legend-swatch--temp { background: var(--orange); }
.legend-swatch--rh { background: var(--green); }
.legend-swatch--co2 { background: var(--black); }
.band-legend { display: flex; flex-wrap: wrap; flex-basis: 100%; gap: 6px; margin-left: 0; }
.band-chip { padding: 2px 6px; color: var(--ink); font-size: 9px; letter-spacing: .02em; }
.band-chip--yellow { background: #ece1b8; }
.band-chip--orange { background: #e8cbb0; }
.band-chip--red { background: #e4c4c0; }
.band-chip--purple { background: #d5cde0; }
.chart-wrap { display: grid; grid-template-columns: 16px 32px minmax(0, 1fr) 36px 16px 36px 16px 28px 14px; grid-template-rows: minmax(0, 1fr) 20px; grid-template-areas: "pm-name pm plot temp temp-name co2 co2-name rh rh-name" ". . x . . . . . ."; height: 330px; margin-top: 18px; padding: 8px 8px 4px; border: 1px solid var(--line); background: rgba(242,240,232,.58); }
.chart-plot { grid-area: plot; position: relative; min-width: 0; min-height: 0; }
#trend-chart { display: block; width: 100%; height: 100%; }
.chart-axis-name { display: flex; align-items: center; justify-content: center; margin: 6px 0; color: var(--muted); font-family: var(--mono); font-size: 8px; letter-spacing: .08em; line-height: 1.1; text-transform: uppercase; writing-mode: vertical-rl; transform: rotate(180deg); }
.chart-axis-name--pm { grid-area: pm-name; }
.chart-axis-name--temp { grid-area: temp-name; color: var(--orange); }
.chart-axis-name--co2 { grid-area: co2-name; color: var(--black); }
.chart-axis-name--rh { grid-area: rh-name; color: var(--green); }
.chart-y-labels { position: relative; min-height: 0; margin: 6px 0; color: var(--muted); font-size: 9px; line-height: 1; pointer-events: none; }
.chart-y-labels span { position: absolute; left: 0; right: 0; transform: translateY(-50%); }
.chart-y-labels--pm { grid-area: pm; text-align: right; }
.chart-y-labels--temp { grid-area: temp; color: var(--orange); text-align: left; padding-left: 6px; }
.chart-y-labels--co2 { grid-area: co2; color: var(--black); text-align: left; padding-left: 4px; }
.chart-y-labels--rh { grid-area: rh; color: var(--green); text-align: left; padding-left: 4px; }
.chart-x-labels { grid-area: x; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 9px; }
.chart-empty { margin: 8px 0 0; color: var(--muted); font-family: var(--mono); font-size: 11px; text-align: center; }
.chart-empty.is-hidden { visibility: hidden; }
.map-panel { margin-top: 18px; padding: 22px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); }
.map-panel .section-heading { border-color: #44433e; }
.map-panel .eyebrow, .map-location { color: #aaa79c; }
.map-panel h2 { margin: 4px 0 0; font-size: 28px; letter-spacing: -.07em; }
.map-location { margin: 0; font-size: 10px; }
#station-map { height: 310px; margin-top: 18px; border: 1px solid #4a4944; filter: saturate(.7) contrast(1.08); }
.leaflet-control-attribution { font-family: var(--mono); font-size: 9px; }
.station-pin { width: 22px; height: 22px; border: 3px solid var(--paper); border-radius: 50% 50% 50% 0; background: var(--orange); box-shadow: 3px 3px 0 var(--ink); transform: rotate(-45deg); }
.station-pin::after { content: ""; display: block; width: 6px; height: 6px; margin: 5px; border-radius: 50%; background: var(--ink); }
.footer-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 22px; }
.sensor-strip { display: flex; flex-wrap: wrap; gap: 18px; font-family: var(--mono); font-size: 11px; }
.sensor-state { display: inline-flex; align-items: center; gap: 6px; }.sensor-state i { display: inline-block; width: 8px; height: 8px; background: var(--orange); }.sensor-state.is-live i { background: var(--green); }
.footer-note { color: var(--muted); font-size: 9px; text-align: right; }
@media (max-width: 820px) { .shell { width: min(100% - 24px, 600px); padding-top: 16px; }.hero-grid { grid-template-columns: 1fr 130px; gap: 12px; padding: 42px 0 36px; }.hero-badge { width: 130px; }.hero-copy h2 { font-size: clamp(48px, 15vw, 78px); }.metrics { grid-template-columns: repeat(2, 1fr); }.metric-card--wide { grid-column: span 2; min-height: 130px; }.metric-value { margin-top: 30px; }.chart-panel { margin-top: 36px; padding: 14px; }.chart-wrap { height: 250px; padding: 6px 4px 2px; grid-template-columns: 12px 26px minmax(0, 1fr) 28px 12px 32px 12px 24px 12px; }.section-heading { align-items: start; flex-direction: column; gap: 14px; }.footer-bar { align-items: flex-start; flex-direction: column; }.footer-note { text-align: left; }.sensor-strip { flex-wrap: wrap; } }
@media (max-width: 520px) { .topbar { align-items: flex-start; flex-direction: column; gap: 14px; padding-bottom: 14px; }.connection { width: 100%; justify-content: space-between; }.hero-grid { grid-template-columns: 1fr; }.hero-badge { display: none; }.metrics { gap: 8px; }.metric-card { min-height: 142px; padding: 11px; box-shadow: 3px 3px 0 var(--ink); }.metric-value { font-size: 31px; }.metric-unit { font-size: 9px; }.chart-wrap { height: 210px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }

@media (min-width: 821px) {
  body { overflow: hidden; }
  .shell { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); grid-template-rows: 54px 146px 112px minmax(0, 1fr) 28px; column-gap: 18px; row-gap: 10px; height: 100dvh; padding: 14px 0 12px; }
  .topbar, .hero-grid, .metrics, .footer-bar { grid-column: 1 / -1; }
  .hero-grid { align-items: center; padding: 8px 0; }
  .hero-copy h2 { margin: 4px 0 7px; font-size: clamp(40px, 4vw, 50px); }
  .hero-copy .lede { max-width: 390px; margin-bottom: 7px; font-size: 13px; line-height: 1.2; }
  .hero-badge { width: 132px; }
  .metrics { gap: 8px; }
  .metric-card { min-height: 112px; padding: 11px; box-shadow: 3px 3px 0 var(--ink); }
  .metric-value { margin-top: 28px; font-size: 32px; }
  .metric-unit { margin-top: 8px; }
  .chart-panel, .map-panel { min-height: 0; margin-top: 0; }
  .chart-panel { display: flex; flex-direction: column; padding: 16px; }
  .chart-wrap { flex: 1; min-height: 0; height: auto; }
  .map-panel { display: flex; flex-direction: column; padding: 16px; }
  #station-map { flex: 1; min-height: 0; height: auto; margin-top: 14px; }
  .footer-bar { padding-top: 2px; }
}
