:root {
  --bg: #f5f5f0;
  --surface: #ffffff;
  --surface2: #f0efe8;
  --border: #d9d5c8;
  --text: #2c2c2c;
  --text-dim: #6b6860;
  --accent-yellow: #e8b600;
  --accent-red: #cc2229;
  --accent-blue: #2b7de0;
  --accent-green: #2a8c5a;
  --accent-orange: #c47a1a;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--surface2);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.88em;
}

/* ───── Header ───── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.site-header__brand {
  font-weight: 700;
  color: var(--text);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.site-header__brand .accent { color: var(--accent-yellow); }
.site-header nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.site-header nav a {
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 500;
}
.site-header nav a:hover { color: var(--text); text-decoration: none; }
.site-header nav a.cta {
  background: var(--accent-yellow);
  color: #2c2c2c;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 600;
}
.site-header nav a.cta:hover { background: #d4a500; }

/* ───── Container ───── */
.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.page--wide {
  max-width: 1100px;
}

/* ───── Hero ───── */
.hero {
  text-align: left;
  padding: 28px 0 36px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}
.hero h1 {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  line-height: 1.25;
}
.hero .lead {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 780px;
}
.hero .meta {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 16px;
}

/* ───── Sections ───── */
section { margin-bottom: 36px; }
section h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
  padding-left: 12px;
  border-left: 3px solid var(--accent-yellow);
}
section h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 20px 0 8px;
}
section p, section ul, section ol {
  margin-bottom: 12px;
}
section ul, section ol {
  padding-left: 22px;
}
section ul li, section ol li {
  margin-bottom: 6px;
}

/* ───── Cards ───── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin: 14px 0;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}
.card h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.02rem;
}
.card p { font-size: 0.92rem; color: var(--text-dim); margin: 0; }
.card .tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  background: #fdf3d0;
  color: #8a6d00;
  margin-bottom: 8px;
}
.card .tag--blue { background: #e3eefb; color: #1a5299; }
.card .tag--green { background: #dcf2e3; color: #1e5a3a; }
.card .tag--orange { background: #fbe9d2; color: #8a4a0a; }
.card .tag--red { background: #fbdfe0; color: #8a1a1f; }

/* ───── Stepper ───── */
.steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
  margin: 14px 0;
}
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 12px 16px 12px 56px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-yellow);
  color: #2c2c2c;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
}
.steps li strong { color: var(--text); }
.steps li p { margin-top: 4px; color: var(--text-dim); font-size: 0.92rem; }

/* ───── Tables ───── */
.tbl {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin: 14px 0;
  font-size: 0.93rem;
}
.tbl th, .tbl td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.tbl thead th {
  background: var(--surface2);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl td:first-child { white-space: nowrap; font-weight: 500; }

/* ───── Callout ───── */
.callout {
  background: #fdf9e3;
  border: 1px solid #f0e1a0;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 14px 0;
}
.callout strong { color: #8a6d00; }
.callout--info {
  background: #e9f1fc;
  border-color: #c2d8f4;
}
.callout--info strong { color: #1a5299; }
.callout--warn {
  background: #fbe9e0;
  border-color: #f4c6a8;
}
.callout--warn strong { color: #8a4a0a; }

/* ───── Footer ───── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 18px 24px;
  font-size: 0.82rem;
  color: var(--text-dim);
}
.site-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--text); }
.site-footer .right { margin-left: auto; }

/* ───── Misc ───── */
.divider { height: 1px; background: var(--border); margin: 22px 0; }
.kbd {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  font-family: ui-monospace, monospace;
  font-size: 0.82em;
  color: var(--text-dim);
}

/* mobile */
@media (max-width: 640px) {
  .site-header__inner { padding: 10px 16px; flex-wrap: wrap; gap: 10px; }
  .site-header nav { gap: 10px; width: 100%; }
  .page { padding: 28px 16px 60px; }
  .hero h1 { font-size: 1.5rem; }
  .hero .lead { font-size: 0.98rem; }
}
