:root {
  --night: #080d08;
  --night-2: #121a12;
  --line-dark: #1f4a1f;
  --phosphor: #23ff18;
  --paper: #f3f0e6;
  --paper-2: #e7e2d4;
  --raised: #faf8f2;
  --ink: #161a17;
  --muted: #3c4a41;
  --green: #0b6a28;
  --rule: #d9d3c3;
  --rule-strong: #c4bdaa;
  --sans: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --max: 1080px;
  --measure: 68ch;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }

a {
  color: var(--green);
  text-underline-offset: 0.16em;
}

a:hover { color: #084e1c; }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--raised);
  color: var(--ink);
  padding: 0.4rem 0.7rem;
  z-index: 10;
}

.skip:focus { top: 0.75rem; }

.top {
  background: var(--night);
  color: #e7f3e4;
  border-bottom: 1px solid var(--line-dark);
}

.top-inner,
.footer-inner,
.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.6rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #f4f1e8;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.brand:hover,
.brand:focus-visible {
  color: var(--phosphor); /* #23ff18 — logo accent */
}

.brand img { display: block; border-radius: 6px; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
}

.nav a {
  color: #d7ecd4;
  text-decoration: none;
  font-size: 0.95rem;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
  gap: 2.5rem;
  align-items: center;
  padding: 3.2rem 0 2.4rem;
}

.kicker {
  margin: 0 0 0.6rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 { font-size: clamp(2.3rem, 5vw, 3.55rem); margin: 0 0 0.8rem; }

h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 2.4rem 0 0.7rem; }

h3 { font-size: 1.25rem; margin: 1.6rem 0 0.4rem; }

.lede {
  font-size: 1.15rem;
  max-width: 42rem;
  margin: 0 0 1.3rem;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.button {
  display: inline-block;
  background: var(--night);
  color: #f4f1e8;
  text-decoration: none;
  padding: 0.65rem 1rem;
  border: 1px solid var(--night);
  border-radius: 3px;
  font-weight: 650;
}

.button:hover { background: #142014; color: #fff; }

.button.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}

.button.secondary:hover { background: var(--paper-2); color: var(--ink); }

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin: 0 0 2.5rem;
}

.facts div { background: var(--raised); padding: 0.9rem 1rem; }

.facts strong { display: block; font-family: var(--serif); font-size: 1.05rem; font-weight: 600; }

.facts span { color: var(--muted); font-size: 0.92rem; }

.section { padding-bottom: 0.5rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.cards li {
  background: var(--raised);
  border: 1px solid var(--rule);
  padding: 0.95rem 1rem 1rem;
}

.cards h3 { margin: 0 0 0.3rem; font-size: 1.2rem; }

.cards p { margin: 0; color: var(--ink); }

.steps { list-style: none; margin: 1rem 0 0; padding: 0; counter-reset: step; }

.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--rule);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--mono);
  color: var(--green);
  padding-top: 0.15rem;
}

.steps h3 { margin: 0 0 0.2rem; }

.steps p { margin: 0; }

.table-wrap { overflow-x: auto; margin: 1rem 0; }

table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--rule);
}

th { font-weight: 650; font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.download-grid a.card {
  display: block;
  background: var(--raised);
  border: 1px solid var(--rule);
  padding: 1rem;
  color: inherit;
  text-decoration: none;
}

.download-grid a.card:hover { border-color: var(--green); }

.download-grid strong { display: block; font-family: var(--serif); font-size: 1.2rem; color: var(--ink); }

.download-grid span { display: block; margin-top: 0.25rem; color: var(--muted); font-size: 0.92rem; }

.plain { padding-left: 1.15rem; }

.plain li + li { margin-top: 0.35rem; }

.note {
  border-left: 3px solid var(--green);
  background: var(--paper-2);
  padding: 0.75rem 0.95rem;
  margin: 1rem 0;
}

.note p:first-child { margin-top: 0; }
.note p:last-child { margin-bottom: 0; }

code, kbd {
  font-family: var(--mono);
  font-size: 0.88em;
}

.docs pre {
  overflow-x: auto;
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  background: var(--night);
  color: #cfe3cc;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.45;
}

.docs pre code {
  font-size: inherit;
  color: inherit;
  background: none;
  padding: 0;
}

kbd {
  border: 1px solid var(--rule-strong);
  border-bottom-width: 2px;
  border-radius: 3px;
  padding: 0.02em 0.35em;
  background: var(--raised);
}

.sketch { margin: 0; }

.window {
  background: var(--night);
  color: #cfe3cc;
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(8, 13, 8, 0.18);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.45;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--line-dark);
  color: #8eae8c;
}

.dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #1f4a1f;
}

.window-title { margin-left: 0.4rem; }

.tabs {
  display: flex;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem 0;
}

.tabs span {
  padding: 0.2rem 0.5rem;
  color: #8eae8c;
}

.tabs .on {
  color: var(--phosphor);
  box-shadow: inset 0 -2px 0 var(--phosphor);
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0.7rem 0.85rem 1rem;
}

.side-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.18rem 0;
}

.side-list .rule {
  margin: 0.4rem 0;
  border-top: 1px solid var(--line-dark);
  padding: 0;
}

.side-list b { font-weight: 600; color: #f3f0e6; }

.side-list i { color: #8eae8c; font-style: normal; }

.mark { color: var(--phosphor); }

figcaption {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.docs {
  display: grid;
  grid-template-columns: 14.5rem minmax(0, 1fr);
  gap: 2.2rem;
  padding: 2rem 0 1rem;
}

.docs-nav {
  position: sticky;
  top: 1rem;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.92rem;
}

.docs-nav a { text-decoration: none; color: var(--muted); }

.docs-nav a:hover,
.docs-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
}

.docs article { max-width: var(--measure); }

.docs article > p:first-of-type { font-size: 1.08rem; }

.toc { font-size: 0.95rem; padding-left: 1.1rem; }

.site-footer {
  background: var(--night);
  color: #f7f4ec;
  margin-top: 3.5rem;
  border-top: 1px solid var(--line-dark);
}

.footer-inner { padding: 1.35rem 0 1.5rem; }

.footer-note {
  margin: 0;
  max-width: 46rem;
  margin-inline: auto;
  color: #c5d7c3;
  font-size: 0.92rem;
  line-height: 1.3;
  text-align: center;
}

.footer-note a { color: #f7f4ec; }

.footer-donate {
  margin: 0.15rem 0 0;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.3;
  color: var(--phosphor);
}

.donate-label {
  color: var(--phosphor); /* #23ff18 */
  font-weight: 600;
}

.donate-addr {
  display: inline-block;
  max-width: 100%;
  margin-inline: 0.15rem;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  background: var(--night-2);
  color: var(--phosphor); /* #23ff18 */
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.3;
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
}

.footer-copy {
  margin: 0.3rem 0 0;
  font-size: 1rem;
  line-height: 1.35;
  color: #f7f4ec;
  text-align: center;
}

.footer-copy a { color: #f7f4ec; }

@media (max-width: 860px) {
  .hero,
  .facts,
  .cards,
  .download-grid,
  .docs {
    grid-template-columns: 1fr;
  }

  .docs-nav {
    position: static;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.85rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--rule);
  }

  .docs-nav a { white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
