/*
 * Planet Detroit — Heat Guide (heatguide.planetdetroit.org)
 * Follows /projects/design-system:
 *   Accent blue #2982C4 (links, informational buttons) · Body text #111111 · Secondary #515151
 *   Dark background #333333 (footer) · Light bg #F0F0F0 · Border #CCCCCC
 *   Dark red #DD3333 — design system reserves red/orange for donate asks; the ONE
 *   exception here is the "call 911" emergency block, where red is the universal safety
 *   convention. Orange #EA5A39 is deliberately not used anywhere on this page.
 *   Headlines: system sans, 700. Body: Georgia, 18px mobile / 20px desktop, line-height 1.6.
 * Mobile-first, no JS needed to read, prints cleanly.
 */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --blue: #2982C4;
  --blue-dark: #1F6BA3;
  --blue-tint: #EAF3FA;
  --red: #DD3333;
  --red-tint: #FDECEC;
  --text: #111111;
  --muted: #515151;
  --dark: #333333;
  --light: #F0F0F0;
  --border: #CCCCCC;
  --white: #FFFFFF;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --serif: Georgia, Garamond, "Times New Roman", serif;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  background: var(--light);
}

/* One centered column, phone-first */
.site-header, main, .site-footer { width: 100%; max-width: 640px; margin: 0 auto; }
main { padding: 0 12px 24px; }

/* ---------- Header ---------- */
.site-header { background: var(--white); padding: 20px 20px 24px; text-align: center; }
.logo { width: 180px; height: auto; display: inline-block; margin-bottom: 14px; }
h1 {
  font-family: var(--sans);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 10px;
}
.lede { color: var(--muted); font-size: 18px; max-width: 34em; margin: 0 auto; }

/* ---------- Sections ---------- */
section {
  background: var(--white);
  border-radius: 6px;
  padding: 22px 20px;
  margin: 12px 0;
  border: 1px solid var(--border);
}
h2 {
  font-family: var(--sans);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 14px;
  color: var(--text);
}
h3 {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  margin: 18px 0 8px;
}
h3:first-of-type { margin-top: 0; }
p { margin-bottom: 12px; }
ul { list-style: none; margin-bottom: 8px; }
li { position: relative; padding: 5px 0 5px 24px; }
li::before {
  content: "";
  position: absolute; left: 4px; top: 16px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--blue);
}
a { color: var(--blue); }
.source, .fine { font-size: 15px; color: var(--muted); }
.source { border-top: 1px solid var(--border); padding-top: 12px; margin: 14px 0 0; }

/* ---------- Emergency block (must be first, must stand out in sunlight) ---------- */
.emergency { border: 3px solid var(--red); background: var(--red-tint); }
.emergency h2 { color: var(--red); }
.emergency li::before { background: var(--red); }
.badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  background: var(--red); color: var(--white);
  padding: 4px 8px; border-radius: 3px;
  margin-bottom: 8px;
}

/* ---------- Buttons: ≥48px tall, full-width on phones ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px;
  width: 100%;
  padding: 12px 18px;
  font-family: var(--sans);
  font-size: 17px; font-weight: 700; line-height: 1.2;
  text-decoration: none; text-align: center;
  border-radius: 6px;
  margin: 8px 0;
  transition: background 0.15s;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover, .btn-primary:focus { background: var(--blue-dark); }
.btn-secondary { background: var(--white); color: var(--blue); border: 2px solid var(--blue); }
.btn-secondary:hover, .btn-secondary:focus { background: var(--blue-tint); }
.btn-911 { background: var(--red); color: var(--white); font-size: 20px; min-height: 56px; margin: 4px 0 16px; }
.btn-911:hover, .btn-911:focus { background: #B82828; }
.domain { font-weight: 400; font-size: 13px; opacity: 0.8; }
.btn-row { display: flex; flex-direction: column; }
@media (min-width: 480px) { .btn-row { flex-direction: row; gap: 10px; } }

.resource { padding: 14px 0; border-top: 1px solid var(--border); }
.resource:first-of-type { border-top: 0; padding-top: 0; }
.resource h3 { margin-top: 0; }
.resource p { font-size: 17px; }

/* ---------- Footer (dark, white logo per logo-usage) ---------- */
.site-footer {
  background: var(--dark); color: var(--white);
  padding: 28px 20px 32px; text-align: center;
  font-family: var(--sans); font-size: 15px; line-height: 1.5;
}
.site-footer p { margin-bottom: 10px; }
.site-footer .fine { color: #CFCFCF; }
.site-footer a { color: var(--white); }
.logo-footer { width: 124px; height: auto; margin-bottom: 14px; }

/* ---------- Desktop ---------- */
@media (min-width: 700px) {
  body { font-size: 20px; }
  .site-header { margin-top: 24px; border-radius: 6px 6px 0 0; }
  main { padding: 0; }
  section { margin: 12px 0; padding: 26px 28px; }
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
  h3 { font-size: 20px; }
  .site-footer { border-radius: 0 0 6px 6px; margin-bottom: 40px; }
}

/* ---------- Print (employers may pin it up) ---------- */
@media print {
  body { background: #fff; font-size: 12pt; color: #000; }
  section, .site-header { border: 0; padding: 8pt 0; margin: 0; page-break-inside: avoid; }
  .emergency { border: 2pt solid #000; padding: 8pt; }
  .btn { display: none; }
  .btn-911 { display: none; }
  a { color: #000; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444; word-break: break-all; }
  .site-footer { background: none; color: #000; }
  .site-footer a { color: #000; }
  .logo-footer { display: none; }
}
