:root {
  color-scheme: light dark;
  --bg: light-dark(#f7f8fc, #14141b);
  --surface: light-dark(#fff, #1d1d27);
  --text: light-dark(#222237, #efeffa);
  --muted: light-dark(#55556b, #babacd);
  --line: light-dark(#d9d9e9, #3b3b51);
  --accent: light-dark(#4b33ad, #c4b4ff);
  font: 100%/1.6 system-ui, sans-serif;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); }
header { background: var(--surface); border-bottom: 1px solid var(--line); }
.bar, main { width: min(100% - 2rem, 56rem); margin-inline: auto; }
.bar, nav, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.bar { min-height: 4rem; justify-content: space-between; padding-block: .6rem; }
a { color: var(--accent); text-underline-offset: .2em; }
.brand { color: var(--text); font-weight: 800; text-decoration: none; }
.brand span { color: var(--accent); }
main { padding-block: clamp(2rem, 7vw, 5rem); }
h1, h2, h3 { line-height: 1.2; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.2rem, 8vw, 4.75rem); margin: .5rem 0 1rem; letter-spacing: -.04em; }
h2 { font-size: 1.5rem; }
.intro { margin-bottom: 3rem; }
.intro p, .meta { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1rem, 4vw, 2rem); margin-block: 1rem; }
.card h2 { margin: 0 0 .5rem; }
.meta { font-size: .9rem; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; }
form { display: grid; gap: 1rem; max-width: 42rem; }
label { display: grid; gap: .4rem; }
input, textarea, button { font: inherit; color: inherit; border: 1px solid var(--line); border-radius: .6rem; background: var(--surface); padding: .5rem .8rem; }
textarea { resize: vertical; }
button { width: fit-content; cursor: pointer; }
button[type="submit"] { background: var(--accent); color: var(--surface); font-weight: 700; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[role="alert"] { color: light-dark(#a12432, #ff9da9); }
details summary { cursor: pointer; }
details form { margin-top: 1rem; }
label:has([type="checkbox"]) { display: flex; align-items: center; }
select { font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: .6rem; padding: .5rem .8rem; }
