@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 400 700; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #161616; --fg: #ebebe8; --muted: #8f8f8a; --line: #2b2b2a; --danger: #e5484d;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) { --bg: #f6f6f4; --fg: #1a1a19; --muted: #6c6c67; --line: #dcdcd8; color-scheme: light; }
}
:root[data-theme="light"] { --bg: #f6f6f4; --fg: #1a1a19; --muted: #6c6c67; --line: #dcdcd8; color-scheme: light; }
:root[data-theme="dark"]  { --bg: #161616; --fg: #ebebe8; --muted: #8f8f8a; --line: #2b2b2a; color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.55 "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.ul { text-underline-offset: 4px; }

.prose { max-width: 62ch; }
.prose > * + * { margin-top: 1em; }
.prose h1, .prose h2, .prose h3 { font-weight: 600; line-height: 1.25; margin-top: 1.6em; }
.prose h2 { font-size: 1.35rem; } .prose h3 { font-size: 1.1rem; }
.prose > :first-child { margin-top: 0; }
.prose a { text-underline-offset: 4px; }
.prose ul { list-style: disc; padding-left: 1.4em; } .prose ol { list-style: decimal; padding-left: 1.4em; }
.prose blockquote { margin-left: 0; padding-left: 1em; border-left: 2px solid var(--line); color: var(--muted); }
.prose code { font-family: ui-monospace, monospace; font-size: .9em; background: var(--line); padding: .1em .35em; border-radius: 3px; }
.prose hr { border: 0; border-top: 1px solid var(--line); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .4rem .8rem; font-size: .875rem; text-decoration: none; background: transparent;
  border: 1px solid var(--line); border-radius: 4px; transition: border-color .15s;
}
.btn:hover { border-color: var(--muted); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn-primary:hover { opacity: .85; border-color: var(--fg); }
.btn-danger { color: var(--danger); } .btn-danger:hover { border-color: var(--danger); }
.input { width: 100%; padding: .5rem .75rem; font-size: .875rem; background: transparent; border: 1px solid var(--line); border-radius: 4px; }
.input:focus { border-color: var(--muted); }
.label { display: block; margin-bottom: .25rem; font-size: .875rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
