:root {
  --bg: #f7f2e8;
  --bg-alt: #efe7d8;
  --card: #fffdf8;
  --ink: #2b2420;
  --muted: #6b5f55;
  --line: #d9cdb8;
  --red: #b5432e;
  --red-ink: #ffffff;
  --blue: #2e5c86;
  --gold: #b8892a;
  --green: #4f7a4a;
  --warn-bg: #fbefd6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 6px 24px rgba(60, 40, 20, .07);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1916;
    --bg-alt: #26211d;
    --card: #2a2420;
    --ink: #f1e9dd;
    --muted: #b3a595;
    --line: #463d35;
    --red: #e0745c;
    --red-ink: #1d1916;
    --blue: #86b1d9;
    --gold: #d9ad55;
    --green: #8fbf87;
    --warn-bg: #3a2f1e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 "Instrument Sans", system-ui, sans-serif;
}
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; line-height: 1.15; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 .5em; }
h3 { font-size: 1.2rem; margin: 0 0 .4em; }
a { color: var(--blue); }
code, kbd { font: .88em ui-monospace, "SF Mono", Consolas, monospace; background: var(--bg-alt); padding: .1em .35em; border-radius: 5px; }
pre { background: var(--bg-alt); padding: 14px 16px; border-radius: 10px; overflow-x: auto; }
pre code { background: none; padding: 0; }
img { max-width: 100%; height: auto; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* A dashed "stitch" line, used as a separator and on cards. */
.stitch { border: 0; border-top: 2px dashed var(--line); margin: 0; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 2px dashed var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-family: "Fraunces", serif; font-weight: 600; font-size: 1.25rem; color: var(--ink); text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--bg-alt); }
.lang { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 8px; padding: 7px 10px; font: inherit; font-weight: 600; cursor: pointer; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-size: 1rem; font-family: inherit; }
.btn-primary { background: var(--red); color: var(--red-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--card); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-donate { background: var(--gold); color: #1d1916; padding: 8px 16px; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Hero */
.hero { padding: 64px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1fr; gap: 36px; }
.eyebrow { display: inline-block; font-weight: 600; color: var(--red); text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin-bottom: 10px; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 42em; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.shot { border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); display: block; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.badge { font-size: .85rem; padding: 4px 10px; border-radius: 999px; border: 1px dashed var(--line); color: var(--muted); }

/* Sections */
section { padding: 56px 0; }
section.alt { background: var(--bg-alt); }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); position: relative; }
.card::after { content: ""; position: absolute; inset: 7px; border: 1.5px dashed var(--line); border-radius: 9px; pointer-events: none; }
.card > * { position: relative; z-index: 1; }
.card ul { margin: 0; padding-left: 1.1em; }
.card li { margin: .3em 0; }
.card .icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 12px; color: #fff; }
.c-red { background: var(--red); } .c-blue { background: var(--blue); } .c-gold { background: var(--gold); } .c-green { background: var(--green); }
.icon svg { width: 22px; height: 22px; }

.note { background: var(--warn-bg); border-left: 4px solid var(--gold); padding: 14px 18px; border-radius: 8px; margin: 20px 0; }

/* Downloads */
.dl { display: flex; flex-direction: column; gap: 12px; }
.dl .meta { color: var(--muted); font-size: .92rem; }
.dl .btn { align-self: flex-start; }
details { background: var(--card); border-radius: 10px; padding: 14px 18px; margin: 10px 0; border: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; }

/* Form */
form.report { display: grid; gap: 18px; max-width: 760px; }
label { font-weight: 600; display: block; margin-bottom: 6px; }
.hint { font-weight: 400; color: var(--muted); font-size: .9rem; }
input[type=text], select, textarea { width: 100%; font: inherit; padding: 11px 13px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: transparent; }
textarea { min-height: 110px; resize: vertical; }
.row2 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.hp { position: absolute; left: -9999px; }
.result { padding: 16px 18px; border-radius: 10px; display: none; }
.result.ok { display: block; background: color-mix(in srgb, var(--green) 18%, var(--card)); }
.result.err { display: block; background: color-mix(in srgb, var(--red) 15%, var(--card)); }

/* Steps (how bug reports are handled) */
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; padding-left: 48px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; border: 2px dashed var(--red); color: var(--red); display: grid; place-items: center; font-weight: 700; }

/* Donate band */
.donate-band { text-align: center; }
.donate-band p { max-width: 40em; margin: 0 auto 20px; color: var(--muted); }

footer { padding: 32px 0 48px; color: var(--muted); font-size: .92rem; border-top: 2px dashed var(--line); }
footer .wrap { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
footer a { color: var(--muted); }

@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr 1.15fr; align-items: center; }
}
@media (max-width: 640px) {
  .nav a { padding: 6px 8px; }
  .hero { padding-top: 36px; }
}
