@import url("/fonts/fonts.css");

:root {
  --ink: #142826;
  --muted: #4a615c;
  --line: #d4ddd8;
  --paper: #f4f1ea;
  --paper-2: #ece7dc;
  --card: #fffcf7;
  --teal: #0b4a46;
  --teal-2: #0f5b55;
  --aqua: #1c8f82;
  --mint: #7ed9cb;
  --accent: #c45c26;
  --accent-2: #a54c1f;
  --good: #1f6b45;
  --caution: #8a5a12;
  --alert: #8b2c1a;
  --shadow: 0 1px 2px rgba(20,40,38,.06), 0 10px 28px rgba(20,40,38,.06);
  --sans: "Source Sans 3", "Segoe UI", "Helvetica Neue", sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --radius: 14px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; }
a { color: var(--teal-2); text-underline-offset: 2px; }
a:hover { color: var(--aqua); }
.wrap { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Header */
header.site {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
header.site .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .7rem 0;
}
.brand {
  display: flex; align-items: center; gap: .75rem;
  text-decoration: none; color: inherit;
}
.brand img.mark { width: 44px; height: 44px; display: block; border-radius: 10px; }
.brand .word { display: flex; flex-direction: column; line-height: 1.15; }
.brand strong {
  font-family: var(--serif); font-weight: 600; font-size: 1.15rem;
  letter-spacing: -.02em; color: var(--teal);
}
.brand span { font-size: .78rem; color: var(--muted); }
nav.site { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .15rem; }
nav.site > a, nav.site .drop > summary {
  display: inline-block; text-decoration: none; color: var(--ink);
  font-size: .95rem; font-weight: 600; padding: .45rem .7rem; border-radius: 8px;
  cursor: pointer; list-style: none;
}
nav.site > a:hover, nav.site .drop > summary:hover { background: var(--paper); color: var(--teal); }
nav.site .drop { position: relative; }
nav.site .drop > summary { list-style: none; }
nav.site .drop > summary::-webkit-details-marker { display: none; }
nav.site .drop[open] > summary { background: var(--paper); }
nav.site .menu {
  position: absolute; right: 0; top: calc(100% + 4px);
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); min-width: 16rem; padding: .4rem;
  display: flex; flex-direction: column; z-index: 50;
}
nav.site .menu a {
  text-decoration: none; color: var(--ink); font-size: .9rem;
  padding: .4rem .65rem; border-radius: 8px;
}
nav.site .menu a:hover { background: var(--paper); color: var(--teal); }
nav.site .menu .label {
  font-size: .7rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); padding: .45rem .65rem .15rem; font-weight: 700;
}
.nav-toggle { display: none; }
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); background: var(--card); border-radius: 8px;
    padding: .4rem .7rem; font: inherit; font-weight: 600; cursor: pointer;
  }
  nav.site {
    display: none; flex-direction: column; align-items: stretch;
    width: 100%; padding: 0 0 1rem; gap: .15rem;
  }
  header.site .bar { flex-wrap: wrap; }
  header.site.is-open nav.site { display: flex; }
  nav.site .drop .menu { position: static; box-shadow: none; border: 0; padding-left: .5rem; }
}

/* Hero + search */
.hero { padding: 3.2rem 0 2.6rem; }
.hero h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.05rem, 4.6vw, 3.15rem);
  line-height: 1.12; letter-spacing: -.03em; margin: 0 0 .7rem;
}
.hero .lede { font-size: 1.18rem; color: var(--muted); max-width: 42rem; margin: 0 0 1.5rem; }
.search-box {
  display: flex; gap: .5rem; max-width: 32rem;
  background: var(--card); padding: .4rem; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow);
}
.search-box input[type="text"] {
  flex: 1; border: 0; background: transparent; font: inherit;
  padding: .7rem .8rem; outline: none; min-width: 0;
}
.search-box button, .btn {
  background: var(--teal); color: #fff; border: 0; border-radius: 9px;
  padding: .7rem 1.15rem; font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none; display: inline-block;
}
.search-box button:hover, .btn:hover { background: var(--teal-2); color: #fff; }
.btn-accent { background: var(--accent); }
.btn-accent:hover { background: var(--accent-2); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--teal); border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--paper); color: var(--teal); }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.hint { margin: .6rem 0 0; color: var(--muted); font-size: .9rem; }
.examples a { margin-right: .85rem; }

.grid-3, .grid-2, .grid-4 {
  display: grid; gap: 1rem;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
}
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.2rem 1.25rem 1.3rem;
  box-shadow: var(--shadow);
}
.card h2, .card h3 { font-family: var(--serif); margin: 0 0 .45rem; letter-spacing: -.02em; font-weight: 600; }
.muted { color: var(--muted); }
.fine { font-size: .88rem; color: var(--muted); }
main { flex: 1; }
main.page { padding: 2.1rem 0 3.6rem; }
main.page h1 {
  font-family: var(--serif); font-size: clamp(1.85rem, 3.5vw, 2.4rem);
  margin: 0 0 .75rem; letter-spacing: -.03em; font-weight: 600;
}
.prose { max-width: 46rem; }
.prose h2 { font-family: var(--serif); margin-top: 2.1rem; font-weight: 600; letter-spacing: -.02em; }
.prose h3 { font-family: var(--serif); margin-top: 1.5rem; font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin: .28rem 0; }
.kicker { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--aqua); margin: 0 0 .35rem; }

footer.site {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 2.2rem;
  font-size: .88rem; color: var(--muted);
  background: var(--paper-2);
}
footer.site .wrap { display: grid; gap: .85rem; }
footer.site nav { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
footer.site nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
footer.site nav a:hover { color: var(--teal); }
.disclosure { max-width: 58rem; }

.pill {
  display: inline-block; border-radius: 999px; padding: .16rem .6rem;
  font-size: .75rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
}
.pill-1 { background: #f3d6d0; color: var(--alert); }
.pill-2 { background: #f6e4c4; color: var(--caution); }
.pill-3 { background: #d7eadf; color: var(--good); }
.pill-na { background: #eceae4; color: var(--muted); }
.pill-soft { background: #dceaf1; color: #1b4e63; }
.pill-mod { background: #e7efd8; color: #3b5420; }
.pill-hard { background: #f6e4c4; color: var(--caution); }
.pill-vhard { background: #f3d6d0; color: var(--alert); }
.pill-good { background: #d7eadf; color: var(--good); }
.pill-moderate { background: #f6e4c4; color: var(--caution); }
.pill-usg { background: #f3d6d0; color: var(--alert); }
.pill-unhealthy, .pill-very, .pill-hazardous { background: #e9c6bf; color: var(--alert); }

.report-head { margin-bottom: 1.4rem; }
.report-head h1 { margin-bottom: .25rem; }
.stat-row { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; font-size: .95rem; color: var(--muted); }
.metric { font-size: 2rem; font-family: var(--serif); letter-spacing: -.03em; margin: .2rem 0; font-weight: 600; }
table.systems, table.plain {
  width: 100%; border-collapse: collapse; font-size: .92rem;
}
table.systems th, table.systems td, table.plain th, table.plain td {
  text-align: left; padding: .55rem .4rem; border-bottom: 1px solid var(--line); vertical-align: top;
}
table.systems th, table.plain th {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
}
.rec { border-left: 3px solid var(--teal); padding: .15rem 0 .15rem 1rem; margin: 1rem 0; }
.cite { font-size: .82rem; color: var(--muted); margin-top: .85rem; }
.na { font-style: italic; color: var(--muted); }
.error { background: #f8e8e4; border: 1px solid #e3b8af; padding: 1rem 1.1rem; border-radius: 10px; }
ul.plain { padding-left: 1.15rem; }
.todo-note {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--caution); background: #f6e4c4;
  border-radius: 999px; padding: .1rem .45rem; margin-left: .35rem; vertical-align: middle;
}
.filter-cta label { display: block; font-size: .85rem; font-weight: 600; margin: 0 0 .25rem; }
.filter-cta select, .filter-cta input {
  font: inherit; padding: .45rem .55rem; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; width: 100%;
}
.filter-cta .fields { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin: .8rem 0; }
@media (max-width: 600px) { .filter-cta .fields { grid-template-columns: 1fr; } }
.live-air .updated { font-size: .82rem; color: var(--muted); }
.guide-list { display: grid; gap: .7rem; }
.guide-list a.card { text-decoration: none; color: inherit; display: block; }
.guide-list a.card:hover { border-color: var(--aqua); }
.crumb { font-size: .88rem; color: var(--muted); margin: 0 0 1rem; }
.crumb a { color: var(--muted); }
.product { margin: 1.3rem 0; padding: 1rem 0; border-top: 1px solid var(--line); }
.product:first-of-type { border-top: 0; }
.note-box {
  background: #eef6f3; border: 1px solid #cfe3dc; border-radius: 12px;
  padding: .9rem 1rem; margin: 1.1rem 0; font-size: .95rem;
}
.split-hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; align-items: center; }
@media (max-width: 800px) { .split-hero { grid-template-columns: 1fr; } }
.trust-row { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin-top: 1.4rem; color: var(--muted); font-size: .88rem; }
.trust-row strong { color: var(--ink); font-weight: 600; }
