/* I-90 Commute — BossBoard Twin light look (Inter, #f2f4f5 canvas, navy
   #12262e, green #12805c), tuned for one-thumb glances at 5 AM. */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap");

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #f2f4f5;
  color: #1b2a33;
  font-size: 17px;
  line-height: 1.45;
}

/* ------------------------------------------------------------- header -- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: #12262e; color: #fff;
  padding-top: env(safe-area-inset-top);
  box-shadow: 0 2px 10px rgba(18, 38, 46, .25);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; max-width: 720px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-badge {
  background: #12805c; color: #fff; font-weight: 900; font-size: 20px;
  padding: 6px 10px; border-radius: 10px; letter-spacing: .5px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 19px; }
.brand-text span { font-size: 13px; opacity: .75; }
.refresh-btn {
  background: #fff; color: #12262e; border: 0; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 15px; padding: 9px 16px; cursor: pointer;
}
.refresh-btn:active { transform: scale(.96); }
.refresh-btn.spinning { opacity: .6; }

main { max-width: 720px; margin: 0 auto; padding: 12px 12px 40px; display: flex; flex-direction: column; gap: 14px; }

/* -------------------------------------------------------------- cards -- */
.card {
  background: #fff; border: 1px solid #dde3e7; border-radius: 14px;
  padding: 16px; box-shadow: 0 1px 3px rgba(27, 42, 51, .05);
}
.card h2 { margin: 0 0 4px; font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: #5a6b76; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.updated { font-size: 13px; color: #71838f; white-space: nowrap; }
.source-line { font-size: 13px; color: #71838f; margin-top: 10px; }
.source-line a { color: #12805c; font-weight: 600; }
.stale-banner {
  background: #fff4d6; border: 1px solid #e8c95a; color: #6b5410;
  border-radius: 10px; padding: 8px 12px; font-weight: 600; font-size: 15px; margin-bottom: 10px;
}
.error-card p { font-size: 17px; }
.big-link { color: #12805c; font-weight: 700; }

/* --------------------------------------------------------------- hero -- */
.hero { border-width: 2px; }
.hero-status {
  font-size: clamp(38px, 11vw, 56px); font-weight: 900; line-height: 1.05;
  letter-spacing: -.01em; margin: 6px 0 2px;
}
.hero-sub { font-size: 20px; font-weight: 700; }
.hero-dirs { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.dir-chip {
  border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 16px;
  background: #eef2f4; border: 1px solid #dde3e7;
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.hero-stat { background: #f7f9fa; border-radius: 10px; padding: 10px 12px; }
.hero-stat .v { font-size: 30px; font-weight: 800; line-height: 1.1; }
.hero-stat .k { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: #5a6b76; font-weight: 600; }
.hero p.cond { font-size: 17px; margin: 10px 0 0; }
.hero .wx { font-size: 17px; margin: 6px 0 0; color: #33454f; }

.sev-0 { border-color: #12805c; background: #f2fbf7; }
.sev-0 .hero-status { color: #0d6a4b; }
.sev-1 { border-color: #d9a514; background: #fffdf2; }
.sev-1 .hero-status { color: #8a6804; }
.sev-2 { border-color: #e07b24; background: #fff8f1; }
.sev-2 .hero-status { color: #b35a08; }
.sev-3 { border-color: #d43a2f; background: #fdf3f2; }
.sev-3 .hero-status { color: #b02a20; }
.sev-4 { border-color: #8f1d14; background: #8f1d14; color: #fff; }
.sev-4 .hero-status { color: #fff; }
.sev-4 .hero-stat { background: rgba(255,255,255,.14); }
.sev-4 .hero-stat .k, .sev-4 .updated, .sev-4 .source-line { color: rgba(255,255,255,.8); }
.sev-4 .dir-chip { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.3); color: #fff; }

/* ------------------------------------------------------------- alerts -- */
.alert-item { border-left: 6px solid #98a7b0; padding: 8px 0 8px 12px; margin-top: 10px; }
.alert-item:first-of-type { margin-top: 4px; }
.alert-item .a-title { font-size: 19px; font-weight: 800; }
.alert-item .a-meta { font-size: 14px; color: #5a6b76; font-weight: 600; }
.alert-item p { margin: 4px 0 0; font-size: 16px; }
.alert-high { border-left-color: #d43a2f; }
.alert-high .a-title { color: #b02a20; }
.alert-mod { border-left-color: #e07b24; }
.alert-low { border-left-color: #98a7b0; }
.calm { font-size: 18px; font-weight: 600; color: #0d6a4b; margin: 4px 0 0; }

/* ------------------------------------------------------------ cameras -- */
.cam-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.cam { display: block; text-decoration: none; color: inherit; border-radius: 12px; overflow: hidden; border: 1px solid #dde3e7; background: #0e1a20; }
.cam img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #0e1a20; }
.cam .cam-label { display: block; padding: 8px 10px; font-size: 14px; font-weight: 700; background: #fff; line-height: 1.25; }
.cam .cam-label small { display: block; font-weight: 600; color: #71838f; }

/* ------------------------------------------------------------ weather -- */
.wx-strip { display: flex; flex-direction: column; }
.wx-point { padding: 12px 0; border-top: 1px solid #edf1f3; }
.wx-point:first-of-type { border-top: 0; padding-top: 4px; }
.wx-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.wx-name { font-size: 20px; font-weight: 800; }
.wx-temp { font-size: 34px; font-weight: 900; line-height: 1; }
.wx-cond { font-size: 17px; font-weight: 600; margin-top: 2px; }
.wx-meta { font-size: 15px; color: #44565f; margin-top: 2px; }
.wx-next { font-size: 14px; color: #5a6b76; margin-top: 6px; }
.wx-next b { color: #33454f; }

/* ---------------------------------------------------------------- gas -- */
.gas-stop { padding: 12px 0; border-top: 1px solid #edf1f3; }
.gas-stop:first-of-type { border-top: 0; padding-top: 4px; }
.gas-name { font-size: 20px; font-weight: 800; }
.gas-exit { font-size: 14px; font-weight: 700; color: #12805c; text-transform: uppercase; letter-spacing: .04em; }
.gas-note { font-size: 15px; color: #44565f; margin-top: 2px; }
.gas-stations { font-size: 15px; margin-top: 4px; }
.gas-btns { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.gas-btn {
  flex: 1; text-align: center; text-decoration: none; font-weight: 700; font-size: 16px;
  padding: 12px 10px; border-radius: 10px; min-width: 140px;
}
.gas-btn.primary { background: #12805c; color: #fff; }
.gas-btn.secondary { background: #eef2f4; color: #12262e; border: 1px solid #dde3e7; }

/* --------------------------------------------------------------- misc -- */
.link-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.link-btn {
  display: block; text-decoration: none; background: #12262e; color: #fff;
  font-weight: 700; font-size: 16px; padding: 14px 12px; border-radius: 10px; text-align: center;
}
.fineprint { font-size: 13px; color: #71838f; margin: 12px 0 0; }
.a2hs {
  display: flex; gap: 10px; align-items: center; justify-content: space-between;
  background: #12262e; color: #fff; border-radius: 12px; padding: 12px 14px; font-size: 15px;
}
.a2hs button { background: none; border: 0; color: #fff; font-size: 18px; cursor: pointer; padding: 4px 8px; }
.pull-hint {
  position: fixed; top: calc(env(safe-area-inset-top) + 64px); left: 50%; transform: translateX(-50%);
  background: #12262e; color: #fff; padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; z-index: 30;
}
.loading { color: #71838f; font-weight: 600; padding: 8px 0; }
