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

:root {
  --green:        #005503;
  --green-mid:    #007a05;
  --green-light:  #00b809;
  --green-faint:  rgba(0, 85, 3, 0.12);
  --bg:           #060d06;
  --bg2:          #0b180b;
  --surface:      rgba(255,255,255,0.04);
  --border:       rgba(255,255,255,0.08);
  --text:         #f0f4f0;
  --muted:        #8a9e8a;
  --radius:       14px;
  --transition:   0.3s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.02em; }

a { color: var(--green-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: #fff; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--green); border-radius: 3px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(6, 13, 6, 0.92); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 40px; height: 68px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo img { height: 28px; width: auto; filter: brightness(0) invert(1); }
.nav-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.875rem; font-weight: 500; color: var(--muted); transition: color var(--transition);
}
.nav-back:hover { color: var(--text); }

/* Page hero */
.page-hero { background: var(--bg2); border-bottom: 1px solid var(--border); padding: 72px 24px 60px; text-align: center; }
.page-hero .tag {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--green-light);
  background: var(--green-faint); border: 1px solid rgba(0,184,9,0.15);
  border-radius: 50px; padding: 5px 16px; margin-bottom: 20px;
}
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
.page-hero p { margin-top: 14px; color: var(--muted); font-size: 0.95rem; }

/* Doc wrap */
.doc-wrap { max-width: 800px; margin: 0 auto; padding: 64px 24px 100px; }

/* TOC */
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 32px; margin-bottom: 56px; }
.toc h3 { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 16px; }
.toc ol { padding-left: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { font-size: 0.875rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-size: 0.7rem; font-weight: 700; color: var(--green-light); opacity: 0.7; }
.toc a:hover { color: var(--text); }

/* Sections */
.doc-section { margin-bottom: 48px; padding-bottom: 48px; border-bottom: 1px solid var(--border); }
.doc-section:last-child { border-bottom: none; }
.doc-section h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 12px; scroll-margin-top: 90px; }
.doc-section h2 .sec-num { font-size: 0.7rem; background: var(--green); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.doc-section p { color: var(--muted); font-size: 0.95rem; margin-bottom: 14px; }
.doc-section ul, .doc-section ol { color: var(--muted); font-size: 0.95rem; padding-left: 20px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 8px; }
.doc-section h3 { font-size: 1rem; font-weight: 600; color: var(--text); margin: 20px 0 10px; }

.highlight-box { background: var(--green-faint); border: 1px solid rgba(0,184,9,0.15); border-radius: var(--radius); padding: 20px 24px; margin: 20px 0; font-size: 0.9rem; color: var(--muted); }
.highlight-box strong { color: var(--green-light); }
.warning-box { background: rgba(255,160,0,0.07); border: 1px solid rgba(255,160,0,0.2); border-radius: var(--radius); padding: 20px 24px; margin: 20px 0; font-size: 0.9rem; color: var(--muted); }
.warning-box strong { color: #ffb74d; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 40px 24px; text-align: center; }
.footer-links { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.footer-links a { font-size: 0.875rem; color: var(--muted); }
.footer-links a:hover { color: var(--text); }
footer p { font-size: 0.8rem; color: var(--muted); }

@media (max-width: 600px) {
  .nav { padding: 0 20px; }
  .toc ol { grid-template-columns: 1fr; }
}
