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

:root {
  --green:   #39b54a;
  --green-d: #2e9340;
  --ink:     #1e293b;
  --muted:   #64748b;
  --bg:      #f8fafc;
  --white:   #ffffff;
  --border:  #e2e8f0;
  --radius:  8px;
}

html { font-size: 16px; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ─────────────────────────────── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  height: 64px;
}
.site-header a { text-decoration: none; }
.logo-wordmark {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.logo-accent {
  color: var(--green);
}
.site-header img {
  display: block;
  height: 80px;
  width: auto;
}

/* ── Layout ─────────────────────────────── */
.layout {
  display: flex;
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 2rem 1rem;
  gap: 2rem;
}

/* ── Sidebar Nav ─────────────────────────── */
.sidenav {
  width: 240px;
  flex-shrink: 0;
}
.sidenav ul { list-style: none; }
.sidenav li + li { margin-top: 2px; }
.sidenav a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: background 0.15s, color 0.15s;
}
.sidenav a:hover { background: #f1f5f9; color: var(--green); }
.sidenav a.active { background: var(--green); color: var(--white); font-weight: 600; }
.sidenav .nav-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 1rem 0.75rem 0.4rem;
}

/* ── Main Content ────────────────────────── */
main {
  flex: 1;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  min-width: 0;
}
main h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 1rem;
  line-height: 1.25;
}
main h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--ink);
}
main h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--border);
  color: var(--ink);
}
main p { margin-bottom: 0.75rem; }
main a { color: var(--green); }
main a:hover { color: var(--green-d); }
main ul, main ol { margin: 0.5rem 0 1rem 1.5rem; }
main li { margin-bottom: 0.25rem; }
main strong { font-weight: 600; }
main code {
  background: #f1f5f9;
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.875em;
}

/* ── Tables ──────────────────────────────── */
main table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}
main th {
  background: var(--green);
  color: var(--white);
  padding: 0.6rem 0.75rem;
  text-align: left;
  font-weight: 600;
}
main td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
main tr:nth-child(even) td { background: var(--bg); }

/* ── Footer ──────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
}
.site-footer-bottom {
  padding: 0.75rem 2rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}
.site-footer-bottom a { color: var(--muted); }

/* ── Responsive ──────────────────────────── */
@media (max-width: 768px) {
  .layout { flex-direction: column; }
  .sidenav { width: 100%; }
}
