:root {
  font: 16px/1.5 system-ui, sans-serif;
  color: #172835;
  background: #f0f4f3;
  color-scheme: light;
  --accent: #006451;
  --muted: #50636a;
  --border: #cbd9d5;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.masthead, nav, main { padding-inline: max(1rem, calc((100% - 64rem) / 2)); }
.masthead {
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #172835;
  color: white;
  padding-top: env(safe-area-inset-top);
}
.masthead strong { font-size: 1.3rem; }
.masthead button { background: #304957; color: white; }
nav { display: flex; gap: .5rem; overflow-x: auto; padding-block: .8rem; background: white; }
nav button { white-space: nowrap; }
main { padding-block: 1rem 5rem; }
h1 { margin: .25rem 0 1rem; font-size: clamp(1.7rem, 5vw, 2.4rem); line-height: 1.15; }
h2 { font-size: 1.18rem; margin: 0 0 .45rem; }
p { margin: .25rem 0 .7rem; }
button, input, select, textarea { font: inherit; }
button, input, select, textarea { border-radius: .55rem; }
button { min-height: 44px; padding: .5rem .85rem; border: 0; color: white; background: var(--accent); cursor: pointer; }
button.secondary { background: #e4ede9; color: #172835; }
button.danger { background: #8d2934; }
button[aria-current] { background: var(--accent); color: white; }
button:disabled { opacity: .55; cursor: default; }
label { display: grid; gap: .25rem; font-weight: 600; }
input, select, textarea { width: 100%; padding: .62rem; border: 1px solid var(--border); background: white; color: inherit; min-height: 44px; }
input[type=checkbox] { width: 1.2rem; min-height: 1.2rem; }
:focus-visible { outline: 3px solid #178774; outline-offset: 3px; }
form { display: grid; gap: .8rem; }
.toolbar, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.toolbar { margin-bottom: .85rem; }
.card, .empty, .metric { padding: 1rem; border: 1px solid var(--border); border-radius: .9rem; background: white; margin-bottom: .7rem; overflow-wrap: anywhere; }
.metric { min-width: 9rem; flex: 1; }
.metric strong { display: block; font-size: 1.4rem; }
.muted, small { color: var(--muted); }
.auth { max-width: 26rem; margin: 2rem auto; }
dialog { width: min(94vw, 36rem); max-height: 88vh; overflow: auto; border: 1px solid var(--border); border-radius: 1rem; padding: 1rem; color: inherit; }
dialog::backdrop { background: rgb(23 40 53 / 65%); }
#status:not(:empty) { position: fixed; bottom: max(1rem, env(safe-area-inset-bottom)); inset-inline: max(1rem, calc((100% - 42rem)/2)); background: #172835; color: white; padding: .8rem 1rem; border-radius: .6rem; z-index: 3; }
.background main, .background nav, .background #status, .background dialog { visibility: hidden; }
