*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-padding-block-start: calc(var(--topbar-h) + 1rem);
}

/* A dashboard is mostly interface: Anybody at normal width. Source Serif is for reading text (.prose). */
body {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-ui);
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}

h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 750; line-height: 1.15; text-wrap: balance; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
p { margin: 0; text-wrap: pretty; }

a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: from-font; }
a:hover { text-decoration: underline; }

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--accent); color: var(--on-accent); }

hr { border: 0; border-top: 1px solid var(--rule); margin: 20px 0; }
code, kbd, .mono { font-family: var(--font-mono); font-size: 0.9em; }

.prose, .serif { font-family: var(--font-text); font-size: var(--fs-body); line-height: 1.6; }

.icon { width: 18px; height: 18px; flex-shrink: 0; }
.icon-sm { width: 16px; height: 16px; flex-shrink: 0; }
.icon-lg { width: 22px; height: 22px; flex-shrink: 0; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip-link {
  position: fixed; top: .75rem; left: .75rem; z-index: 100; padding: .75rem 1rem;
  background: var(--ink); color: var(--bg); border-radius: var(--radius); font-weight: 600;
}
.skip-link:not(:focus) { clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; padding: 0; }

.muted { color: var(--muted); }
.subtle { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-caption); }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.text-right { text-align: right; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.stack > * + * { margin-top: var(--stack, 16px); }
.row { display: flex; align-items: center; gap: var(--gap, 12px); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
