:root {
  color-scheme: light;
  --ink: #111;
  --text: #222;
  --muted: #555;
  --surface: #fff;
  --background: #f5f5f5;
  --border: #888;
  --accent: #e5e5e5;
  --link: #111;
  font: 100%/1.55 system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #fff;
    --text: #eee;
    --muted: #ccc;
    --surface: #151515;
    --background: #080808;
    --border: #888;
    --accent: #333;
    --link: #fff;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); }
header, main {
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
}
header {
  padding-top: max(0px, env(safe-area-inset-top));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-inner, nav, main { margin: auto; }
.header-inner, nav { max-width: 96rem; }
.header-inner, nav { display: flex; align-items: center; gap: .5rem 1rem; flex-wrap: wrap; }
.header-inner { padding: 1rem 0; justify-content: space-between; }
.brand img { display: block; width: 9rem; height: auto; }
nav { padding-bottom: .75rem; }
a { color: var(--link); text-underline-offset: .2em; }
nav a { padding: .3rem .5rem; margin-left: -.3rem; }
nav a[aria-current] { font-weight: 700; background: var(--background); border-radius: .25rem; }
main {
  max-width: calc(96rem + max(1rem, env(safe-area-inset-left)) + max(1rem, env(safe-area-inset-right)));
  padding-top: 2rem;
  padding-bottom: max(4rem, env(safe-area-inset-bottom));
}
h1, h2 { color: var(--ink); line-height: 1.2; }
h1 { margin: 0 0 1.5rem; font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { margin: 0 0 .75rem; font-size: 1.2rem; overflow-wrap: anywhere; }
.card { padding: 1.2rem; margin: 0 0 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: .7rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.cards .card { margin: 0; }
p { overflow-wrap: anywhere; }
.count { font-size: 2rem; font-weight: 700; margin: 0; }
form { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; }
form + form { margin-top: .75rem; }
form.sign-out { margin: 0; }
label { display: grid; gap: .2rem; font-weight: 600; max-width: 100%; }
label.checkbox { display: flex; align-items: center; align-self: center; }
input, textarea, select, button, .button { font: inherit; color: var(--ink); border: 1px solid var(--border); border-radius: .35rem; padding: .45rem .65rem; max-width: 100%; }
input, textarea, select { background: var(--surface); min-width: 0; }
button, .button { display: inline-block; background: var(--accent); font-weight: 700; cursor: pointer; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.filters { margin-bottom: 1rem; }
dl { display: grid; grid-template-columns: minmax(6rem, max-content) minmax(0, 1fr); gap: .2rem 1rem; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.actions form { margin: 0; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 35rem) {
  main { padding-top: 1.25rem; }
  dl { display: block; }
  dd { margin-bottom: .5rem; }
}
.table-scroll { overflow-x: auto; }
table { width: 100%; table-layout: fixed; border-collapse: collapse; background: var(--surface); }
th, td { padding: .65rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
th, td { overflow-wrap: anywhere; }
th { background: var(--accent); }
@media (min-width: 64rem) {
  .dashboard { display: grid; grid-template-columns: 13rem minmax(0, 1fr); min-height: 100vh; }
  .dashboard header { border-bottom: 0; border-right: 1px solid var(--border); }
  .dashboard nav { display: grid; gap: .25rem; }
  .dashboard nav a { margin: 0; }
  .dashboard main { width: 100%; padding-inline: 2rem; }
}
@media (max-width: 63.999rem) {
  table { min-width: 60rem; }
}
th:nth-child(5), th:nth-child(9) { width: 16%; }
th:nth-child(2), th:nth-child(4), th:nth-child(8) { width: 6%; }
