:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --text: #1b211d;
  --muted: #5b665f;
  --line: #dde2dc;
  --mt: #1f8a4c;   /* Meshtastic accent */
  --mc: #2563c9;   /* MeshCore accent */
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101412;
    --surface: #181e1b;
    --text: #e8ede9;
    --muted: #9aa69f;
    --line: #2a332e;
    --mt: #5fd68e;
    --mc: #7fa8f5;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
a { color: var(--mc); }

header { padding: 20px 0 8px; }
.banner { display: block; width: 100%; height: auto; border-radius: 12px; background: #000; }

nav.menu { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
nav.menu a {
  text-decoration: none; color: var(--text); font-size: .93rem;
  border: 1px solid var(--line); background: var(--surface);
  padding: 6px 14px; border-radius: 999px;
}
nav.menu a:hover { border-color: var(--muted); }
nav.menu a[aria-current="page"] { background: var(--text); color: var(--bg); border-color: var(--text); }

h1 { font-size: clamp(2rem, 6vw, 3rem); line-height: 1.1; margin: 30px 0 16px; letter-spacing: -.02em; }
h1 .mc { color: var(--mc); }
h1 .mt { color: var(--mt); }
.lede { font-size: 1.15rem; color: var(--muted); margin: 0; }

section { padding: 34px 0 0; }
h2 { font-size: 1.4rem; margin: 0 0 12px; }
h3 { font-size: 1.1rem; margin: 0 0 6px; }
p { margin: 0 0 14px; }
ul, ol { padding-left: 1.3em; margin: 0; }
li { margin-bottom: 8px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 20px;
}
.card.mt { border-top: 4px solid var(--mt); }
.card.mc { border-top: 4px solid var(--mc); }
.card p:last-child { margin-bottom: 0; }

/* Photo gallery */
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); align-items: start; }
.gallery figure { margin: 0; }
.gallery img { display: block; width: 100%; height: auto; border-radius: 10px; background: var(--line); }
.gallery figcaption { font-size: .88rem; color: var(--muted); margin-top: 6px; }

footer { margin-top: 44px; padding: 24px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }

/* Full-width illustration inside a section */
.illustration { margin: 4px 0 20px; }
.illustration img { display: block; width: 100%; height: auto; border-radius: 12px; }
.illustration figcaption { font-size: .9rem; color: var(--muted); margin-top: 8px; }
