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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  accent-color: var(--brand-strong);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd { margin: 0; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -.011em; line-height: 1.25; }
h1 { font-size: 1.6rem; letter-spacing: -.02em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
h4 { font-size: .9rem; }

a { color: var(--brand-strong); text-decoration: none; text-underline-offset: 3px; }
a:hover { color: var(--brand-hover); text-decoration: underline; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg, video { max-width: 100%; display: block; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
code, kbd, .mono { font-family: var(--mono); font-size: .9em; }
small, .small { font-size: .82rem; }
strong, b { font-weight: 600; }
table { border-collapse: collapse; width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: color-mix(in srgb, var(--brand) 20%, white); }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-xs); }

* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }

[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: .6rem; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.stack { display: grid; gap: 1rem; }
.stack--sm { gap: .5rem; }
.stack--lg { gap: 1.5rem; }
.grow { flex: 1 1 auto; min-width: 0; }
.spacer { flex: 1; }

/* Icons (inline Lucide SVG) */
.icon { width: 1.15em; height: 1.15em; flex: none; stroke-width: 1.75; vertical-align: -.2em; }
.icon--sm { width: 1em; height: 1em; }
.icon--lg { width: 1.5em; height: 1.5em; }

/* Turbo progress bar picks the brand colour */
.turbo-progress-bar { background: var(--brand); height: 2px; }

/* Turbo frame loading state */
turbo-frame[busy] { opacity: .62; transition: opacity .15s; }
turbo-frame[aria-busy="true"] { cursor: progress; }

/* People who asked their system for less motion get instant transitions and no animations. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
