:root { color-scheme: light; }
body { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; margin: 0; color: #17202a; background: #f7f9fb; }
header {
  background: #174a6e;
  color: #fff;
  /* Installed on a phone, the window can extend under the status bar and the home indicator. */
  padding: max(0.75rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) 0.75rem
    max(1rem, env(safe-area-inset-left));
}
nav a { color: #eaf2f8; margin-right: 1rem; text-decoration: none; }
nav a[aria-current="page"] { text-decoration: underline; font-weight: 600; }
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
}
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; margin-top: 1.5rem; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 0.4rem 0.5rem; border-bottom: 1px solid #d8dee4; }
.muted { color: #5c6670; }
.error { color: #b42318; }
.notice { color: #1f6f43; }
.status-unknown { color: #6b7280; }
.status-partial { color: #8a5a00; }
ul.plain { list-style: none; padding: 0; }
ul.plain li { padding: 0.4rem 0; border-bottom: 1px solid #d8dee4; }
svg.sparkline { width: 100%; height: 80px; background: #fff; border: 1px solid #d8dee4; border-radius: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.field { margin: 0.75rem 0; display: flex; flex-direction: column; gap: 0.25rem; max-width: 32rem; }
.field label { font-weight: 600; }
.field input, .field select { font: inherit; padding: 0.45rem 0.5rem; border: 1px solid #b6bfc8; border-radius: 6px; }
.chip-group { border: 1px solid #d8dee4; border-radius: 6px; padding: 0.5rem 0.75rem; margin: 0.75rem 0; }
.chip-group legend { font-weight: 600; padding: 0 0.25rem; }
.chip-group input { position: absolute; opacity: 0; }
.chip-group label { display: inline-block; margin: 0.15rem; padding: 0.35rem 0.6rem; border: 1px solid #b6bfc8; border-radius: 999px; cursor: pointer; min-width: 44px; text-align: center; }
.chip-group input:checked + label { background: #174a6e; color: #fff; border-color: #174a6e; }
.chip-group input:focus-visible + label { outline: 2px solid #174a6e; outline-offset: 2px; }
button[type=submit] { font: inherit; padding: 0.5rem 0.9rem; border-radius: 6px; border: 1px solid #174a6e; background: #174a6e; color: #fff; cursor: pointer; }
.item-edit { border: 1px solid #d8dee4; border-radius: 6px; padding: 0.5rem 0.75rem; margin: 0.75rem 0; }
.item-edit button { margin-right: 0.5rem; }
/* A wide table scrolls inside its own focusable box instead of overflowing the page, so
   a row action on a narrow viewport is never left under a neighbouring cell. The wrapper
   is focusable (tabindex) because a scrollable region must be reachable by keyboard. */
.table-scroll { max-width: 100%; overflow-x: auto; }
.table-scroll table { white-space: nowrap; }
.inline-form { display: inline; }
