:root {
  --bg: #f6f4ee;
  --surface: #ffffff;
  --ink: #13201a;
  --muted: #56655c;
  --line: #dcd8cc;
  --accent: #2f6b4f;
  --accent-ink: #ffffff;
  --accent-soft: #e3eee7;
  --warn: #8a5a12;
  --radius: 14px;
  --max: 1080px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1512;
    --surface: #152019;
    --ink: #e8efe9;
    --muted: #9aaca1;
    --line: #26352d;
    --accent: #7fc4a0;
    --accent-ink: #0e1512;
    --accent-soft: #1b2e24;
    --warn: #e2b467;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img, svg { max-width: 100%; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10; }

header.top { border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: .01em; font-size: 18px; }
.brand svg { width: 28px; height: 28px; }
nav.links { display: flex; gap: 20px; flex-wrap: wrap; font-size: 15px; }
nav.links a { color: var(--muted); text-decoration: none; }
nav.links a:hover { color: var(--ink); }

.hero { padding: 72px 0 56px; }
.hero .eyebrow { color: var(--accent); font-weight: 600; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 14px; }
.hero h1 { font-size: clamp(34px, 5.2vw, 56px); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 20px; max-width: 18ch; }
.hero p.lead { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 60ch; margin: 0 0 28px; }
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.hero-art { color: var(--accent); opacity: .9; }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { max-width: 320px; } .hero { padding-top: 48px; } }

.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 16px;
  text-decoration: none; border: 1.5px solid var(--accent); cursor: pointer; font-family: inherit;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn:hover { filter: brightness(1.06); text-decoration: none; }

section { padding: 56px 0; border-top: 1px solid var(--line); }
section h2 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -.01em; line-height: 1.2; margin: 0 0 12px; }
section > .wrap > p.intro { color: var(--muted); max-width: 64ch; margin: 0 0 32px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.card .tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 6px; margin-bottom: 10px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: s; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 18px 64px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 20px; top: 18px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; display: grid; place-items: center; font-size: 15px; }
.steps h3 { margin: 0 0 4px; font-size: 17px; }
.steps p { margin: 0; color: var(--muted); font-size: 16px; }

.note { border-left: 3px solid var(--warn); padding: 4px 0 4px 16px; color: var(--muted); max-width: 70ch; font-size: 16px; }
.note strong { color: var(--ink); }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 820px) { .two { grid-template-columns: 1fr; gap: 24px; } }

form.contact { display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
form.contact label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
form.contact .opt { color: var(--muted); font-weight: 400; }
form.contact input, form.contact select, form.contact textarea {
  font: inherit; font-weight: 400; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%;
}
form.contact textarea { min-height: 150px; resize: vertical; }
form.contact .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { form.contact .row { grid-template-columns: 1fr; } }
form.contact .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
form.contact .status { min-height: 1.6em; margin: 0; font-size: 15px; }
form.contact .status.ok { color: var(--accent); }
form.contact .status.err { color: #c0392b; }
form.contact .fine { font-size: 13px; color: var(--muted); margin: 0; }

.contact-side p { color: var(--muted); margin: 0 0 14px; }
.contact-side .mail { font-size: 19px; font-weight: 600; }

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

.uses { color: var(--muted); max-width: 70ch; padding-left: 20px; margin: 0; }
.uses li { margin: 6px 0; }
.uses strong { color: var(--ink); }

.explorer { margin: 0 0 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; outline: none; }
.explorer:focus-visible { box-shadow: 0 0 0 3px var(--accent); }
.explorer-banner { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--warn); padding: 8px 16px; border-bottom: 1px solid var(--line); }
.explorer-stage { position: relative; height: clamp(360px, 58vw, 600px); }
.explorer-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.explorer-stage canvas:active { cursor: grabbing; }
.explorer-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.explorer-labels span { position: absolute; left: 0; top: 0; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; background: color-mix(in srgb, var(--surface) 80%, transparent); padding: 1px 6px; border-radius: 4px; }
.explorer-inspector { position: absolute; right: 12px; top: 12px; max-width: 280px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.explorer-inspector table { border-collapse: collapse; margin-top: 6px; }
.explorer-inspector td { padding: 2px 8px 2px 0; vertical-align: top; }
.explorer-inspector td:first-child { color: var(--muted); }
.explorer-inspector small { color: var(--warn); }
.explorer-fallback { display: none; padding: 24px; color: var(--muted); }
.explorer.no-webgl .explorer-fallback { display: block; }
.explorer.no-webgl .explorer-controls { display: none; }
.explorer-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 14px; }
.explorer-controls button { font: inherit; font-size: 13px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; }
.explorer-controls button:hover { border-color: var(--accent); }
.explorer-controls label { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; }
.explorer-status { color: var(--muted); font-size: 13px; margin-left: auto; }
.explorer figcaption { padding: 12px 16px 16px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 8px; color: var(--ink); font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 22px; height: 3px; border-radius: 2px; }
.sw.frozen { background: #8fa79b; }
.sw.trained { background: #c98d2e; }
.sw.thick { height: 6px; background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.sw.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.sw.ring { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--accent); background: transparent; }
.sw.tile { width: 12px; height: 12px; border-radius: 2px; background: linear-gradient(135deg, var(--accent-soft), var(--accent)); }
@media (max-width: 640px) { .explorer-status { margin-left: 0; width: 100%; } }
nav.links { align-items: center; }
nav.links a.nav-donate { color: var(--accent-ink); background: var(--accent); padding: 5px 14px; border-radius: 999px; font-weight: 600; }
nav.links a.nav-donate:hover { color: var(--accent-ink); filter: brightness(1.08); }
