/* Light palette: the default, also used when the system asks for light. */
:root {
  color-scheme: light;
  --bg: #f1f5f9;
  --panel: #ffffff;
  --panel-alt: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --accent: #0369a1;
  --accent-text: #f8fafc;
  --danger: #b91c1c;
  --safe: #15803d;
  --safe-text: #f0fdf4;
  --extreme: #b91c1c;
  --severe: #c2410c;
  --moderate: #a16207;
  --moderate-text: #ffffff;
  --minor: #0284c7;
  --border: #cbd5e1;
  --hover: #e2e8f0;
  --shadow: rgb(15 23 42 / 15%);
  --map-ocean: #d3e6f8;
  --map-land: #f8fafc;
  --map-land-stroke: #94a3b8;
  --map-graticule: #bcd8f1;
  --map-graticule-major: #9cbfe0;
  --map-marker-stroke: #ffffff;
  --weather-bg: linear-gradient(135deg, #e0f2fe, #f8fafc);
  --weather-sun: #f59e0b;
  --weather-moon: #64748b;
  --weather-cloud: #94a3b8;
  --weather-rain: #0284c7;
  --weather-snow: #cbd5e1;
  --weather-bolt: #f59e0b;
}

/* Dark palette, used when the system asks for it and light is not pinned. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f172a;
    --panel: #1e293b;
    --panel-alt: #172033;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --accent: #38bdf8;
    --accent-text: #082f49;
    --danger: #f87171;
    --safe: #4ade80;
    --safe-text: #052e16;
    --extreme: #dc2626;
    --severe: #ea580c;
    --moderate: #ca8a04;
    --moderate-text: #1c1917;
    --minor: #0ea5e9;
    --border: #334155;
    --hover: #1e293b;
    --shadow: rgb(2 6 23 / 45%);
    --map-ocean: #0b1e33;
    --map-land: #24344c;
    --map-land-stroke: #3b5171;
    --map-graticule: #1c2b42;
    --map-graticule-major: #2f4363;
    --map-marker-stroke: #0b1220;
    --weather-bg: linear-gradient(135deg, #16273f, #1e293b);
    --weather-sun: #fbbf24;
    --weather-moon: #cbd5e1;
    --weather-cloud: #64748b;
    --weather-rain: #38bdf8;
    --weather-snow: #e2e8f0;
    --weather-bolt: #fbbf24;
  }
}

/* Dark palette pinned with the theme toggle. Keep in sync with the block above. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f172a;
  --panel: #1e293b;
  --panel-alt: #172033;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-text: #082f49;
  --danger: #f87171;
  --safe: #4ade80;
  --safe-text: #052e16;
  --extreme: #dc2626;
  --severe: #ea580c;
  --moderate: #ca8a04;
  --moderate-text: #1c1917;
  --minor: #0ea5e9;
  --border: #334155;
  --hover: #1e293b;
  --shadow: rgb(2 6 23 / 45%);
  --map-ocean: #0b1e33;
  --map-land: #24344c;
  --map-land-stroke: #3b5171;
  --map-graticule: #1c2b42;
  --map-graticule-major: #2f4363;
  --map-marker-stroke: #0b1220;
  --weather-bg: linear-gradient(135deg, #16273f, #1e293b);
  --weather-sun: #fbbf24;
  --weather-moon: #cbd5e1;
  --weather-cloud: #64748b;
  --weather-rain: #38bdf8;
  --weather-snow: #e2e8f0;
  --weather-bolt: #fbbf24;
}

* {
  box-sizing: border-box;
}

html {
  /* Keeps the layout stable when an iPhone or iPad is rotated. */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 1rem 3rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* Keeps content clear of rounded corners, notches and home indicators. */
@supports (padding: max(0px)) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: max(3rem, env(safe-area-inset-bottom));
    padding-left: max(1rem, env(safe-area-inset-left));
  }
}

main,
.site-bar,
.tagline,
.site-footer {
  max-width: 60rem;
  margin: 0 auto;
}

/* The navigation stays within reach while the alert list scrolls. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 -1rem;
  padding: env(safe-area-inset-top, 0px) 1rem 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

@supports (backdrop-filter: blur(10px)) {
  .site-header {
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: blur(10px);
  }
}

.site-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  /* The nav takes the space it needs before the brand gives any up. */
  flex: 0 1 auto;
  min-width: 0;
}

.brand-logo {
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
}

.site-header h1 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* A segmented control: one rounded track holding the four page pills. */
.site-nav {
  display: flex;
  gap: 0.15rem;
  margin-left: auto;
  padding: 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-alt);
  /* Narrow screens scroll the pills sideways instead of wrapping them. */
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  white-space: nowrap;
  transition:
    background-color 0.15s ease-in-out,
    color 0.15s ease-in-out;
}

.site-nav a:hover {
  background: var(--hover);
  color: var(--text);
}

.site-nav a.current {
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}

.button-link {
  padding: 0.5rem 0.9rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
}

.button-link:hover {
  border-color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .site-nav a {
    transition: none;
  }
}

.tagline {
  margin: 1.5rem auto 1.25rem;
}

.tagline,
.note,
.empty,
.status {
  color: var(--muted);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  /* Keeps scrolled-to content clear of the sticky navigation bar. */
  scroll-margin-top: 4.5rem;
}

.panel h2 {
  margin-top: 0;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem;
  align-items: end;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem;
  /* The severity filter is a row of chips, so the fields have unequal heights
     and line up along their labels instead of their bottom edge. */
  align-items: start;
  margin-top: 1rem;
}

.filters .actions {
  /* Keeps the button on the baseline of the single-line selects. */
  margin-top: 1.6rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

input,
select {
  padding: 0.55rem 0.7rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--panel-alt);
  color: var(--text);
  font-size: 1rem;
  min-width: 0;
}

.field .note {
  margin: 0;
}

select:disabled {
  color: var(--muted);
  cursor: not-allowed;
}

input:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button {
  padding: 0.55rem 0.9rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--panel-alt);
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
}

button:hover {
  border-color: var(--accent);
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}

button.danger {
  color: var(--danger);
}

button.link {
  border: none;
  background: none;
  color: var(--accent);
  padding: 0 0.25rem;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
  white-space: nowrap;
  border-radius: 999px;
}

.field .switch {
  align-self: start;
}

.switch-track {
  position: relative;
  flex: none;
  width: 2.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: var(--border);
  transition: background-color 0.15s ease-in-out;
}

.switch-thumb {
  position: absolute;
  top: 50%;
  left: 0.2rem;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--panel);
  transform: translateY(-50%);
  transition: transform 0.15s ease-in-out;
}

.switch[aria-checked="true"] .switch-track {
  background: var(--accent);
}

.switch[aria-checked="true"] .switch-thumb {
  transform: translate(1rem, -50%);
}

@media (prefers-reduced-motion: reduce) {
  .switch-track,
  .switch-thumb {
    transition: none;
  }
}

/* The severity filter: one tappable chip per severity, so several can be
   picked without the ctrl-click a <select multiple> needs. */
.chips {
  border: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.chips > legend {
  padding: 0;
}

/* A wide grid gives the chips a column of their own so they stay on one row. */
@media (min-width: 60rem) {
  .filters .field:has(.chips) {
    grid-column: span 2;
  }
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-alt);
  font-size: 0.9rem;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--accent);
}

.chip input {
  /* The chip itself is the visible control; the box stays for pointer and
     keyboard behaviour but is drawn as the severity dot. */
  appearance: none;
  width: 0.7rem;
  height: 0.7rem;
  min-height: 0;
  padding: 0;
  border-radius: 999px;
  border: none;
  background: var(--minor);
  /* Dim until the severity is picked, so a ticked chip reads at a glance. */
  opacity: 0.35;
}

.chip input:checked {
  opacity: 1;
}

.chip[data-severity="Extreme"] input {
  background: var(--extreme);
}
.chip[data-severity="Severe"] input {
  background: var(--severe);
}
.chip[data-severity="Moderate"] input {
  background: var(--moderate);
}

.chip:has(input:checked) {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  font-weight: 600;
}

.chip:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.chips:disabled .chip {
  color: var(--muted);
  cursor: not-allowed;
}

/* "Refresh alerts" with the freshness of what is on screen beside it. */
.refresh {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.refresh .status {
  margin: 0;
  font-size: 0.85rem;
}

/* Keyboard users land on this before the navigation, and it stays out of the
   way until it is focused. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  padding: 0.6rem 0.9rem;
  border-radius: 0 0 0.5rem 0;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

.error {
  color: var(--danger);
  margin: 0.75rem 0 0;
}

.locations,
.people-list,
.alert-list,
.sources,
.legend,
.suggestions {
  list-style: none;
  margin: 0;
  padding: 0;
}

.combobox {
  position: relative;
}

.suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10;
  margin-top: 0.25rem;
  max-height: 15rem;
  overflow-y: auto;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 12px 24px var(--shadow);
}

.suggestion {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.suggestion:last-child {
  border-bottom: none;
}

.suggestion:hover,
.suggestion.is-active {
  background: var(--hover);
}

.suggestion.is-active {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.suggestion-region {
  color: var(--muted);
  font-size: 0.85rem;
}

.hint {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.sources li {
  margin-bottom: 0.5rem;
}

.location {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-top: 1rem;
  background: var(--panel-alt);
  scroll-margin-top: 4.5rem;
}

.location[data-selected] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.location-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.location-header h3 {
  margin: 0;
}

/* ------------------------------------------------- collapsible location */

.location-details > summary {
  cursor: pointer;
  /* A flex summary drops the default marker, so the chevron below replaces it. */
  list-style: none;
  border-radius: 0.5rem;
}

.location-details > summary::-webkit-details-marker {
  display: none;
}

.location-details > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.location-heading {
  flex: 1 1 auto;
  min-width: 0;
}

.location-chevron {
  flex: 0 0 auto;
  width: 0.6rem;
  height: 0.6rem;
  margin-top: 0.45rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.15s ease-in-out;
}

.location-details[open] > summary .location-chevron {
  transform: rotate(45deg);
}

.location-body {
  margin-top: 0.75rem;
}

.location[data-worldwide] {
  border-style: dashed;
}

@media (prefers-reduced-motion: reduce) {
  .location-chevron {
    transition: none;
  }
}

.place {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
}

.coords {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* --------------------------------------------------------- weather card */

.weather {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 0.75rem 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--weather-bg);
}

.weather[data-rough="true"] {
  border-color: var(--severe);
}

.weather-figure {
  display: flex;
}

.weather-icon {
  width: 3.5rem;
  height: 3.5rem;
}

.weather-sun {
  fill: var(--weather-sun);
}

.weather-ray {
  stroke: var(--weather-sun);
  stroke-width: 3;
  stroke-linecap: round;
}

.weather-moon {
  fill: var(--weather-moon);
}

.weather-cloud {
  fill: var(--weather-cloud);
}

.weather-drop {
  stroke: var(--weather-rain);
  stroke-width: 3;
  stroke-linecap: round;
}

.weather-snow {
  fill: var(--weather-snow);
}

.weather-fog {
  stroke: var(--weather-cloud);
  stroke-width: 3;
  stroke-linecap: round;
}

.weather-bolt {
  fill: var(--weather-bolt);
}

.weather-main p {
  margin: 0;
}

.weather-temp {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.1;
}

.weather-condition {
  font-size: 0.95rem;
}

.weather-observed,
.weather-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.weather-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
  gap: 0.35rem 0.75rem;
  margin: 0;
  font-size: 0.85rem;
}

.weather-metrics > div {
  min-width: 0;
}

.weather-metrics dt {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.weather-metrics dd {
  margin: 0;
  font-weight: 600;
}

.weather-status {
  grid-column: 1 / -1;
}

.people-summary {
  margin: 0.25rem 0 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.people {
  margin-top: 1rem;
}

.location h4 {
  margin: 0 0 0.5rem;
}

.person {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--border);
  flex-wrap: wrap;
}

.person .contact {
  color: var(--muted);
  font-size: 0.9rem;
}

.person[data-safe="true"] {
  border-bottom-color: var(--safe);
}

.person .safety {
  color: var(--safe);
  font-size: 0.85rem;
  font-weight: 600;
}

button.safe {
  border-color: var(--safe);
  color: var(--safe);
  padding: 0.2rem 0.6rem;
  font-size: 0.85rem;
}

.warn-links[hidden],
.warn-actions[hidden] {
  display: none;
}

.warn-links {
  display: inline-flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.warn-link {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  font-size: 0.85rem;
  text-decoration: none;
}

.warn-link:hover,
.warn-link:focus-visible {
  border-color: var(--accent, currentColor);
  text-decoration: underline;
}

.warn-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.warn-status {
  color: var(--muted);
  font-size: 0.85rem;
}

button.safe:hover {
  background: var(--safe);
  color: var(--safe-text);
}

.safety-summary {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.safety-summary[data-all-safe="true"] {
  color: var(--safe);
}

.person-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.person-form input {
  flex: 1 1 8rem;
}

.alert {
  border: 1px solid var(--border);
  border-left-width: 5px;
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  background: var(--panel);
}

.alert h5 {
  margin: 0.35rem 0;
  font-size: 1rem;
}

.alert p {
  margin: 0.25rem 0;
}

.alert .meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.alert-top {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.severity {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--border);
}

.source {
  color: var(--muted);
  font-size: 0.8rem;
}

.alert[data-severity="Extreme"] {
  border-left-color: var(--extreme);
}
.alert[data-severity="Extreme"] .severity,
.severity[data-severity="Extreme"] {
  background: var(--extreme);
  color: #fff;
}
.alert[data-severity="Severe"] {
  border-left-color: var(--severe);
}
.alert[data-severity="Severe"] .severity,
.severity[data-severity="Severe"] {
  background: var(--severe);
  color: #fff;
}
.alert[data-severity="Moderate"] {
  border-left-color: var(--moderate);
}
.alert[data-severity="Moderate"] .severity,
.severity[data-severity="Moderate"] {
  background: var(--moderate);
  color: var(--moderate-text);
}
.alert[data-severity="Minor"],
.alert[data-severity="Unknown"] {
  border-left-color: var(--minor);
}

.alert a {
  color: var(--accent);
  font-size: 0.9rem;
}

/* ------------------------------------------------------------- world map */

.map {
  margin: 1.25rem 0 0;
}

#world-map {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

.map-ocean {
  fill: var(--map-ocean);
}

.map-land {
  fill: var(--map-land);
  stroke: var(--map-land-stroke);
  stroke-width: 0.6;
}

.map-graticule line {
  stroke: var(--map-graticule);
  stroke-width: 0.5;
}

.map-graticule line[data-major="true"] {
  stroke: var(--map-graticule-major);
}

.map-marker {
  color: var(--minor);
  cursor: pointer;
}

.map-marker[data-severity="None"] {
  color: var(--muted);
}
.map-marker[data-severity="Extreme"] {
  color: var(--extreme);
}
.map-marker[data-severity="Severe"] {
  color: var(--severe);
}
.map-marker[data-severity="Moderate"] {
  color: var(--moderate);
}

.map-marker-dot {
  fill: currentColor;
  stroke: var(--map-marker-stroke);
  stroke-width: 1.5;
}

.map-marker-halo {
  fill: currentColor;
  opacity: 0.22;
}

.map-marker[data-severity="Extreme"] .map-marker-halo {
  animation: marker-pulse 1.8s ease-in-out infinite alternate;
}

.map-marker:hover .map-marker-dot,
.map-marker[data-selected] .map-marker-dot {
  stroke: var(--text);
}

.map-marker[data-selected] .map-marker-halo {
  opacity: 0.45;
}

.map-marker:focus-visible {
  outline: none;
}

.map-marker:focus-visible .map-marker-dot {
  stroke: var(--accent);
  stroke-width: 3;
}

@keyframes marker-pulse {
  from {
    opacity: 0.4;
  }
  to {
    opacity: 0.1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-marker .map-marker-halo {
    animation: none;
  }
}

.map figcaption {
  margin-top: 0.75rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend li::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: var(--minor);
}

.legend li[data-severity="Extreme"]::before {
  background: var(--extreme);
}
.legend li[data-severity="Severe"]::before {
  background: var(--severe);
}
.legend li[data-severity="Moderate"]::before {
  background: var(--moderate);
}
.legend li[data-severity="None"]::before {
  background: var(--muted);
}

.site-footer {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.platforms {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  padding: 0;
  color: var(--muted);
}

.platforms strong {
  color: var(--text);
}

.platforms em {
  font-style: normal;
  color: var(--accent);
}

/* Touch devices: keep every control comfortably tappable. */
@media (pointer: coarse) {
  button,
  input {
    min-height: 2.75rem;
  }

  .chip {
    min-height: 2.75rem;
  }
}

/* Narrow screens: the toggle keeps its switch, and its label its screen
   reader name, but the text no longer competes with the nav for space. */
@media (max-width: 48rem) {
  .theme-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
    clip-path: inset(50%);
  }
}

@media (max-width: 30rem) {
  .site-bar {
    padding: 0.5rem 0;
  }

  .site-header h1 {
    font-size: 1.15rem;
  }

  .site-nav a {
    padding: 0.4rem 0.65rem;
  }

  .panel,
  .location {
    padding: 1rem;
  }

  .actions button,
  .refresh,
  .panel-header > button {
    flex: 1 1 100%;
  }
}

/* Installed app: the install help is no longer needed. */
@media (display-mode: standalone), (display-mode: minimal-ui), (display-mode: fullscreen) {
  body {
    overscroll-behavior-y: contain;
  }

  #install-panel {
    display: none;
  }
}
