/* Reset, typography, focus and small utilities. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 14px/20px var(--font); font-feature-settings: "kern";
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a.link, .link { color: var(--brand-text); text-decoration: underline; text-underline-offset: 2px; font-weight: 500; }
a.link:hover { color: var(--brand-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
[hidden] { display: none !important; }
svg { width: 18px; height: 18px; flex: none; }
img { max-width: 100%; }
code, kbd, pre, samp { font-family: var(--mono); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-sm); }
:focus:not(:focus-visible) { outline: none; }

::selection { background: var(--ring); }

/* typography */
.page-title, h1.page-title { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.3px; }
.section-title { font-size: 16px; line-height: 24px; font-weight: 600; margin: 28px 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 18px; }
.help { color: var(--muted); font-size: 13px; line-height: 18px; }
.mono { font-family: var(--mono); font-size: 12.5px; line-height: 18px; word-break: break-all; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 8px 14px; font-weight: 500; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* layout utilities */
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.spread { justify-content: space-between; }
.row.nowrap { flex-wrap: nowrap; }
.stack > * + * { margin-top: 12px; }
.stack.tight > * + * { margin-top: 6px; }
.stack.loose > * + * { margin-top: 20px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid2 > *, .grid3 > *, .grid4 > * { margin-top: 0 !important; }
.sep { height: 1px; background: var(--line); margin: 16px 0; border: 0; }
.grow { flex: 1 1 auto; min-width: 0; }

@media (max-width: 1100px) { .grid3, .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid2, .grid3, .grid4 { grid-template-columns: minmax(0, 1fr); } }

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