/* Shared header. Content below can differ. */
:root { --page-accent: var(--amber); }
body.page-fire { --page-accent: #e35b2a; }
body.page-weather { --page-accent: #7aa2ff; }
body.page-traffic { --page-accent: var(--amber); }
body.page-cameras { --page-accent: #d8c9a3; }
body.page-map { --page-accent: var(--amber); }
body.page-help, body.page-places, body.home-page { --page-accent: var(--amber); }

.safety { border-bottom-color: var(--page-accent); }

/* Tool nav. Desktop: quiet icon tabs, one accent underline on the page you
   are on. Phone: the same links become a fixed bottom tab bar. */
.feature-nav {
  display: flex;
  gap: 0.15rem;
  align-items: center;
}
.feature-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: var(--target);
  padding: 0 0.7rem;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 650;
}
.feature-nav a:hover { background: var(--surface); color: var(--paper); }
.feature-nav a .material-symbols-outlined { font-size: 20px; line-height: 1; }
.feature-nav a[href="map.html"] .material-symbols-outlined { color: var(--amber); }
.feature-nav a[href="fire.html"] .material-symbols-outlined { color: #e35b2a; }
.feature-nav a[href="weather.html"] .material-symbols-outlined { color: #7aa2ff; }
.feature-nav a[href="traffic.html"] .material-symbols-outlined { color: var(--amber); }
.feature-nav a[href="cameras.html"] .material-symbols-outlined { color: #d8c9a3; }
.feature-nav a[aria-current="page"] {
  background: var(--surface-2);
  color: var(--paper);
  box-shadow: inset 0 -2px 0 var(--page-accent);
}
.feature-nav a[aria-current="page"] .material-symbols-outlined { color: var(--page-accent); }

.help-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  padding: 0 0.7rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 650;
}
.help-link:hover, .help-link[aria-current="page"] { color: var(--paper); }

.site-bar {
  align-items: center;
  min-height: var(--target);
}
.site-bar .wordmark {
  flex: 0 0 auto;
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
}
.feature-nav { flex-wrap: nowrap; }
.state-nav { flex: 0 0 auto; }

/* Phone: the header keeps one calm row — wordmark + state switch + Help —
   and the five tools move to a fixed bottom tab bar, in thumb reach for
   someone checking a pass from the passenger seat. */
@media (max-width: 899px) {
  .site-bar { row-gap: 0.55rem; }
  .site-bar .wordmark { order: 1; }
  .state-nav { order: 2; margin-left: auto; }
  .help-link { order: 3; margin-left: 0; }
  .feature-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    background: var(--bg-2);
    border-top: 1px solid var(--line);
    padding: 0.3rem max(0.35rem, env(safe-area-inset-left))
    calc(0.3rem + env(safe-area-inset-bottom)) max(0.35rem, env(safe-area-inset-right));
  }
  .feature-nav a {
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 0.18rem;
    min-height: 3.1rem;
    padding: 0.25rem 0.1rem;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 8px;
  }
  .feature-nav a .material-symbols-outlined { font-size: 22px; }
  .feature-nav a[aria-current="page"] { box-shadow: none; }
  /* Keep page content and footers clear of the fixed bar. */
  body { padding-bottom: calc(4.1rem + env(safe-area-inset-bottom)); }
}
@media (max-width: 420px) {
  .state-nav button, .state-nav a { min-width: 2.8rem; padding: 0 0.55rem; }
}
.site-head .tag { margin: 0.45rem 0 0.15rem; }
/* One headline voice on every desk — the same display face and clamp()
   as the home tagline, so phones and desktops both get a real headline,
   not the small muted caption from app.css. */
.site-head h1.tag {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--paper);
}
.site-head .lede { color: var(--muted); margin: 0.2rem 0 0.7rem; max-width: 42rem; }

.desk-page .site-head { padding-bottom: 0.4rem; }
.desk-page .site-bar { align-items: center; gap: 0.65rem 1rem; flex-wrap: wrap; }
.desk-page h1.tag { margin: 0.35rem 0 0.2rem; }
.desk-page .lede { color: var(--muted); margin: 0 0 0.8rem; max-width: 40rem; }
/* .tools rows: canonical chip system in app.css. */
.desk-grid {
  display: grid;
  grid-template-columns: minmax(16rem, 26rem) 1fr;
  gap: 1.25rem;
}
@media (max-width: 800px) { .desk-grid { grid-template-columns: 1fr; } }
.desk-list h2, .desk-main h2 { margin: 0 0 0.5rem; font-size: 1.2rem; }
.desk-list .count, .desk-main .count { color: var(--faint); font-family: var(--font-clock); font-size: 0.78rem; margin: 0 0 0.6rem; }
.card {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--paper);
  font: inherit;
  padding: 0.7rem 0.8rem;
  margin: 0 0 0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
}
.card:hover, .card[aria-current="true"] { border-color: var(--amber); }
.card strong { display: block; }
.card .meta { display: block; color: var(--muted); font-size: 0.88rem; margin-top: 0.2rem; }
.still-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.7rem;
}
.still-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}
.still-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: #080807; display: block; }
.still-card .pad { padding: 0.55rem 0.7rem 0.7rem; }
.still-card h3 { margin: 0 0 0.15rem; font-size: 1rem; }
.still-card .who { color: var(--faint); font-size: 0.8rem; }
.alert-card {
  border-left: 3px solid #7aa2ff;
  margin: 0 0 0.65rem;
  padding: 0.75rem 0.85rem;
  background: var(--surface);
}
.alert-card h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.alert-card p { margin: 0.25rem 0; color: var(--muted); }
.fire-card { border-left: 3px solid #e35b2a; }
.empty { color: var(--muted); }
