/* Base: fonts, reset, typography, focus. ------------------------------------- */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/lib/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("/lib/fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/lib/fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("/lib/fonts/inter-700.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-display: swap; src: url("/lib/fonts/jakarta-600.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-display: swap; src: url("/lib/fonts/jakarta-700.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 800; font-display: swap; src: url("/lib/fonts/jakarta-800.woff2") format("woff2"); }

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

html { -webkit-text-size-adjust: 100%; background: var(--page); }

body {
    margin: 0;
    font-family: var(--font-ui);
    font-size: var(--fs-base);
    line-height: 1.5;
    color: var(--ink);
    background: var(--page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "cv11", "ss01";
}

h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--font-display);
    color: var(--ink);
    line-height: 1.2;
    letter-spacing: -0.015em;
    text-wrap: balance;
}
h1 { font-size: var(--fs-xl); font-weight: 800; }
h2 { font-size: var(--fs-md); font-weight: 700; }
h3 { font-size: var(--fs-base); font-weight: 700; }
h4 { font-size: var(--fs-sm); font-weight: 700; }

p { margin: 0 0 .75em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-ink); text-decoration: none; }
a:hover { color: var(--accent); }

img, svg, video, iframe { max-width: 100%; }
img { display: block; height: auto; }
hr { border: 0; border-top: 1px solid var(--line-soft); margin: var(--s-5) 0; }
code, kbd { font-family: var(--font-mono); font-size: .9em; }
[hidden] { display: none !important; }

table, .num, .tnum { font-variant-numeric: tabular-nums; }

::selection { background: var(--violet-edge); color: var(--ink); }

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

* { scrollbar-width: thin; scrollbar-color: rgba(27, 24, 52, .18) transparent; }

/* Utilities. Few, and only where a dozen rules would otherwise repeat them. */
.muted { color: var(--ink-3); }
.subtle { color: var(--ink-4); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mono { font-family: var(--font-mono); }
.right { text-align: right; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.row { display: flex; align-items: center; gap: var(--s-2); }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.row--top { align-items: flex-start; }
.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.stack--sm { gap: var(--s-2); }
.stack--lg { gap: var(--s-6); }
.grow { flex: 1 1 auto; min-width: 0; }
.spacer { flex: 1; }

.grid { display: grid; gap: var(--s-4); }
.grid-2 { display: grid; gap: var(--s-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: var(--s-4); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: var(--s-4); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-main { display: grid; gap: var(--s-5); grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }

@media (max-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
