:root {
  --page-width: min(1120px, 92vw);
  --bg:          #09090f;
  --surface:     #111117;
  --surface-alt: #18181f;
  --border:      rgba(255,255,255,0.08);
  --border-2:    rgba(255,255,255,0.14);
  --green:       #68a848;
  --green-hi:    #82c25a;
  --green-dim:   rgba(104,168,72,0.12);
  --amber:       #c8a84b;
  --text:        #eeebe3;
  --muted:       #9a9890;
  --font-display: "Sora", "Space Grotesk", sans-serif;
  --font-body:   "Sora", "Space Grotesk", system-ui, sans-serif;
}

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

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  min-height: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar { width: 0; height: 0; display: none; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(ellipse 70% 40% at 10% 0%, rgba(104,168,72,0.055) 0%, transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container {
  width: var(--page-width);
  margin: 0 auto;
  padding: 20px 0 80px;
}

/* ── Header ── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 14px;
  z-index: 24;
  padding: 14px 20px;
  border: 1px solid var(--border-2);
  border-radius: 18px;
  background: rgba(9,9,15,0.88);
  backdrop-filter: blur(18px) saturate(130%);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  margin-bottom: 10px;
}

header .logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

header .logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

header nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  transition: color .2s;
}

header nav a:hover { color: var(--text); }

.nav-cta {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--green);
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  transition: background .2s;
  text-decoration: none !important;
}

.nav-cta:hover { background: var(--green-hi); }

/* ── Main card ── */
main {
  background: var(--surface);
  border-radius: 22px;
  padding: 40px 48px;
  margin: 20px auto 0;
  max-width: 820px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}

/* ── Typography ── */
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--text);
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.0;
  letter-spacing: -0.04em;
  font-weight: 900;
}

h2 {
  margin-top: 40px;
  margin-bottom: 4px;
  font-weight: 700;
  font-size: clamp(20px, 2.5vw, 26px);
  letter-spacing: -0.02em;
}

h3 {
  margin-top: 22px;
  margin-bottom: 0;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
}

p, li {
  color: rgba(238,235,227,0.85);
  line-height: 1.75;
  font-size: 16px;
  margin-top: 10px;
}

ul, ol {
  padding-left: 20px;
  margin: 10px 0 0;
}

ul ul, ol ol, ul ol, ol ul {
  margin-top: 6px;
  margin-bottom: 6px;
  padding-left: 18px;
}

ul ul li, ol ol li { color: var(--muted); }

.list-indent { margin-left: 16px; }

/* ── Meta badge ── */
.meta {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--green-dim);
  border: 1px solid rgba(104,168,72,0.2);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  color: var(--green-hi);
}

.caps {
  font-weight: 400;
  letter-spacing: 0.2px;
  color: var(--text);
}

/* ── Table of contents ── */
.toc {
  margin: 20px 0 32px;
  padding: 20px 24px;
  border-radius: 16px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
}

.toc h2 {
  margin-top: 0;
  font-size: 16px;
}

.toc ol { margin-top: 8px; }

.toc a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 14px;
}

.toc a:hover { color: var(--green-hi); }

/* ── Links ── */
main a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(168,180,199,0.35);
}

main a:hover {
  color: var(--green-hi);
  text-decoration-color: var(--green-hi);
}

strong { color: var(--text); }

/* ── Footer ── */
footer {
  padding: 36px 0 56px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
}

footer .container { padding: 0; }

.foot-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.foot-grid strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.foot-grid p {
  font-size: 14px;
  color: var(--muted);
  margin: 4px 0;
  line-height: 1.5;
}

.foot-grid a:hover { color: var(--green-hi); }

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  transition: color .2s, border-color .2s;
}

.social-link svg { width: 13px; height: 13px; fill: currentColor; }
.social-link:hover { color: var(--text); border-color: var(--border-2); }

.year-margin {
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

@media (max-width: 640px) {
  .container { padding-top: 12px; }

  main {
    padding: 24px 20px;
    border-radius: 16px;
  }

  header {
    top: 8px;
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 10px;
  }

  h1 { font-size: clamp(28px, 9vw, 40px); }
  p, li { font-size: 15px; }

  .foot-grid { flex-direction: column; }
}
