:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, sans-serif;
  background: #111310;
  color: #f1ede2;
  --surface: #1a1d18;
  --line: #343b31;
  --muted: #b1b6a6;
  --accent: #e0ef9e;
  --error: #f4b39f;
  line-height: 1.55;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
a { color: var(--accent); text-underline-offset: 4px; }
a:hover { color: #f5ffd5; }
a, button, input, textarea, select, summary { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--accent); }
.top {
  padding: .65rem max(1rem, calc((100vw - 1400px)/2));
  display: flex; align-items: center; gap: 1.6rem; justify-content: space-between;
  border-bottom: 1px solid var(--line); background: #161914;
}
.brand { display: inline-flex; color: #faf5e9; align-items: center; gap: .7rem; text-decoration: none; white-space: nowrap; font-weight: 650; }
.brand b { color: var(--muted); font-weight: 500; }
.mark { display: grid; place-items: center; width: 2.45rem; height: 2.45rem; border-radius: .65rem; background: var(--accent); color: #171b0d; font-weight: 850; letter-spacing: -.05em; }
nav { display: flex; gap: .15rem; align-items: center; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; padding: .5rem .6rem; border-radius: .45rem; font-size: .9rem; }
nav [aria-current] { color: var(--accent); background: #2a3422; }
main { width: min(1280px, calc(100% - 2.5rem)); margin: 2.65rem auto 4rem; }
h1, h2, h3, p { margin: 0 0 .7rem; }
h1 { font-size: clamp(1.85rem, 4vw, 3rem); letter-spacing: -.055em; line-height: 1.1; }
h2 { font-size: 1.3rem; letter-spacing: -.025em; line-height: 1.25; }
h3 { font-size: 1.05rem; }
small, .muted { color: var(--muted); }
.page-head, .section-head, .row, .inline { display: flex; align-items: center; gap: .7rem 1.15rem; }
.page-head, .section-head, .row { justify-content: space-between; }
.page-head { margin: 0 0 1.4rem; flex-wrap: wrap; }
.page-head h1, .section-head h2, .section-head h3, .row p { margin: 0; }
.page-head h1 + p { margin-top: .4rem; }
.section-head a { white-space: nowrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1rem, 2.4vw, 1.65rem); min-width: 0; }
.hero {
  background: radial-gradient(ellipse at 9% 106%, #343f23, transparent 73%), linear-gradient(154deg, #262c22, #1b2119);
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem;
  padding: clamp(1.45rem, 4.4vw, 3.5rem);
}
.hero h2 { font-size: clamp(2.1rem, 5.5vw, 4.5rem); max-width: 16ch; line-height: .99; letter-spacing: -.075em; margin: .45rem 0 1rem; }
.hero h2 span, .eyebrow { color: var(--accent); }
.eyebrow { font-size: .73rem; letter-spacing: .13em; text-transform: uppercase; font-weight: 750; }
.generate { max-width: 365px; }
.generate p { color: var(--muted); font-size: .9rem; }
.generate .primary { width: 100%; }
.generate .primary span { padding-left: .5rem; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin: .85rem 0; }
.stats p { font-size: .9rem; color: var(--muted); }
.stats strong { font-size: clamp(1.65rem, 4.2vw, 2.6rem); line-height: 1; font-weight: 660; display: block; }
.stats small { font-size: .95rem; }
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.align-start { align-items: start; }
.row { text-decoration: none; border-bottom: 1px solid var(--line); padding: .8rem 0; }
.row:last-child { border-bottom: 0; }
.row small { display: block; font-size: .82rem; }
.wrap { flex-wrap: wrap; }
.pill { background: #2e3827; border: 1px solid #454c36; color: var(--accent); border-radius: 2rem; padding: .23rem .65rem; font-size: .8rem; line-height: 1.2; }
.stack > * { display: block; }
.stack > * + * { margin-top: .7rem; }
.stack p { margin-bottom: .7rem; }
.stack label { color: var(--muted); }
.stack label:not(.check) { display: block; }
.stack label:not(.check) input:not([type=checkbox]), .stack label textarea, .stack label select { display: block; margin-top: .25rem; }
.stack p > label { display: block; }
.stack .check { display: flex; align-items: start; gap: .55rem; font-size: .9rem; }
input[type=checkbox] { accent-color: var(--accent); margin-top: .32rem; flex: none; }
input:not([type=checkbox]), select, textarea { width: 100%; border: 1px solid #50574a; border-radius: .45rem; padding: .55rem; font: inherit; color: inherit; background: #121511; }
textarea { resize: vertical; }
.filter select { width: auto; max-width: 45vw; }
button, .button { font: inherit; display: inline-block; border: 1px solid #56604e; background: #252d22; color: #f3f2e7; border-radius: .52rem; padding: .51rem .85rem; cursor: pointer; text-decoration: none; text-align: center; }
button:hover, .button:hover { background: #37422f; }
.primary { background: var(--accent); border-color: var(--accent); color: #1b2211; font-weight: 750; }
.primary:hover { background: #f0f8c9; color: #182010; }
.quiet { color: var(--muted); background: transparent; border-color: var(--line); font-size: .82rem; }
.small { padding: .26rem .55rem; font-size: .84rem; }
.notice { padding: .7rem 1rem; border: 1px solid var(--line); background: var(--surface); border-radius: .6rem; }
.notice.error, .errorlist { color: var(--error); border-color: #895b4c; }
.running, .ready-banner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .55rem; margin-bottom: .8rem; }
details { border-top: 1px solid var(--line); padding: .78rem 0 .28rem; margin-top: .45rem; }
summary { cursor: pointer; color: var(--accent); }
details > :nth-child(2) { margin-top: .75rem; }
.split-top, .copy-block, .variant + .variant { border-top: 1px solid var(--line); padding-top: .8rem; margin-top: .85rem; }
pre { font: inherit; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; margin: .45rem 0; }
dd { overflow-wrap: anywhere; color: var(--muted); margin: .1rem 0 .3rem 1rem; }
audio, video, .preview { width: 100%; display: block; border-radius: .45rem; }
video { max-height: 530px; background: #0e100e; }
.login { width: min(100%, 405px); margin: 12vh auto 0; }
.login .mark { margin-bottom: 1.1rem; }
.login p label, .helptext { display: block; }
.login button { width: 100%; }
.helptext { font-size: .85rem; color: var(--muted); }
.fields > * { flex: 1; min-width: 0; }
@media (max-width: 1050px) {
  .top { align-items: stretch; flex-wrap: wrap; gap: .3rem; }
  .top nav { order: 3; width: 100%; }
}
@media (max-width: 660px) {
  main { width: calc(100% - 1.2rem); margin: 1.3rem auto 3rem; }
  .top { padding: .55rem .7rem; }
  nav { gap: .06rem; }
  nav a { font-size: .84rem; padding: .36rem .44rem; }
  .columns, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .columns { grid-template-columns: 1fr; }
  .sections, .filter { width: 100%; }
  .hero { align-items: stretch; }
  .hero h2 { letter-spacing: -.056em; }
  .generate { width: 100%; max-width: none; }
  .section-head { flex-wrap: wrap; }
  .filter select { flex: 1; min-width: 0; max-width: none; }
}
