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

:root {
  --bg:        #F7F5F2;
  --surface:   #FFFFFF;
  --border:    #E4E0DA;
  --text:      #1A1816;
  --muted:     #6B6560;
  --faint:     #A09A94;
  --green:     #1A4A3A;
  --green-bg:  #EAF2EE;
  --green-mid: #4A8A72;
  --amber:     #8A5A1A;
  --amber-bg:  #FDF3E3;
  --radius:    10px;
  --mono: 'Courier New', Courier, monospace;
  --sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav ─────────────────────────────── */
.top-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,245,242,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 52px;
}
.nav-brand { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--green); }
.nav-links { display: flex; gap: 1.25rem; font-size: .8rem; color: var(--muted); }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ── Layout ──────────────────────────── */
.page { max-width: 860px; margin: 0 auto; padding: 0 1.5rem 5rem; }

/* ── Hero ────────────────────────────── */
.hero {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}
.hero-label {
  display: inline-block;
  font-size: .7rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--green-mid);
  background: var(--green-bg); padding: .25rem .7rem;
  border-radius: 99px; margin-bottom: 1.25rem;
}
.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 700; line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--text); margin-bottom: .9rem;
}
.hero p {
  font-size: 1.05rem; color: var(--muted);
  max-width: 580px; line-height: 1.75;
}

/* ── Tier chips ──────────────────────── */
.tier-chips {
  display: flex; gap: .5rem; flex-wrap: wrap;
  margin-top: 1.5rem;
}
.chip {
  font-size: .72rem; font-weight: 600;
  padding: .3rem .8rem; border-radius: 99px;
  border: 1.5px solid var(--border);
  color: var(--muted); background: var(--surface);
  text-decoration: none;
}
.chip:hover { border-color: var(--green-mid); color: var(--green); text-decoration: none; }
.chip.active { background: var(--green); color: #fff; border-color: var(--green); }

/* ── TOC ─────────────────────────────── */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 3rem;
}
.toc-title { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: .75rem; }
.toc ol { padding-left: 1.2rem; }
.toc li { margin-bottom: .3rem; font-size: .88rem; }
.toc a { color: var(--muted); }
.toc a:hover { color: var(--green); }

/* ── Sections ────────────────────────── */
.section { margin-bottom: 3.5rem; }

.section-header {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--border);
}
.section-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--green-bg); color: var(--green);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 1rem;
}
.section-header h2 { font-size: 1.2rem; font-weight: 700; }

p { color: var(--muted); line-height: 1.75; }
p + p { margin-top: .75rem; }
.section p { margin-bottom: .75rem; }

ul, ol { padding-left: 1.4rem; color: var(--muted); }
li { margin-bottom: .4rem; line-height: 1.65; }

/* ── Step list ───────────────────────── */
.steps { list-style: none; padding: 0; margin: 1rem 0; }
.steps li {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
}
.steps li:last-child { border-bottom: none; }
.step-n {
  flex-shrink: 0; width: 22px; height: 22px;
  border-radius: 50%; border: 1.5px solid var(--border);
  font-size: .72rem; font-weight: 700; color: var(--faint);
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.steps li.done .step-n { background: var(--green); border-color: var(--green); color: #fff; }
.step-body { font-size: .9rem; color: var(--text); line-height: 1.6; }
.step-body small { color: var(--muted); font-size: .8rem; display: block; margin-top: .2rem; }

/* ── Code ────────────────────────────── */
code {
  font-family: var(--mono);
  font-size: .82em;
  background: var(--border);
  padding: .15em .4em;
  border-radius: 4px;
}
pre {
  background: #1A1816;
  color: #C8C2BB;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1rem 0;
  font-size: .83rem;
  line-height: 1.7;
}
pre code { background: none; padding: 0; font-size: inherit; color: inherit; }

/* ── Callout ─────────────────────────── */
.callout {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-size: .88rem;
  line-height: 1.65;
}
.callout.info  { background: var(--green-bg); border-left: 3px solid var(--green-mid); color: var(--green); }
.callout.warn  { background: var(--amber-bg); border-left: 3px solid var(--amber); color: var(--amber); }
.callout.tip   { background: var(--green-bg); border-left: 3px solid var(--green-mid); color: var(--green); }
.callout strong { font-weight: 700; }

/* ── Tool card ───────────────────────── */
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}
.tool-card-head {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: .75rem;
}
.tool-card-title { font-size: .95rem; font-weight: 600; }
.tool-tag {
  font-size: .65rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: .2rem .55rem;
  border-radius: 99px;
}
.tool-tag.required { background: var(--green-bg); color: var(--green); }
.tool-tag.optional { background: var(--border); color: var(--faint); }
.tool-tag.note     { background: var(--amber-bg); color: var(--amber); }

/* ── Footer ──────────────────────────── */
.page-footer {
  margin-top: 4rem; padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.page-footer p { font-size: .78rem; color: var(--faint); }
.page-footer a { color: var(--green); }
