:root {
  --paper: #f3e8d3;
  --paper-2: #ecdebf;
  --paper-3: #e3d1a6;
  --ink: #2a1e14;
  --ink-2: #4a3826;
  --ink-mute: #7a6a54;
  --gold: #d8a54b;
  --gold-deep: #b37f28;
  --pink: #e45b7a;
  --pink-deep: #c93c5d;
  --radius: 18px;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family: "Inter", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(
      circle at 20% 30%,
      rgba(180, 140, 80, 0.08) 0,
      transparent 40%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(180, 140, 80, 0.06) 0,
      transparent 35%
    ),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 0.16  0 0 0 0 0.11  0 0 0 0 0.07  0 0 0 .05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: multiply;
}
.wrap {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ————— Nav ————— */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(243, 232, 211, 0.78);
  border-bottom: 1px solid rgba(42, 30, 20, 0.08);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 28px;
  padding-right: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
}
.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}
.brand span {
  font-family: "Bricolage Grotesque";
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}
.nav-links a:hover {
  color: var(--ink);
}
.nav-cta {
  background: var(--pink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--ink);
  box-shadow: 0 2px 0 var(--ink);
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 0 var(--ink);
}
@media (max-width: 720px) {
  .nav-links a:not(.nav-cta) {
    display: none;
  }
}

/* ————— Page header ————— */
.page-header {
  padding: 56px 0 24px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(42, 30, 20, 0.06);
  padding: 6px 12px;
  border-radius: 999px;
  font-family: "JetBrains Mono";
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 22px;
}
.page-header h1 {
  font-family: "Bricolage Grotesque";
  font-weight: 800;
  font-size: clamp(38px, 5.5vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.page-header .meta {
  color: var(--ink-mute);
  font-family: "JetBrains Mono";
  font-size: 13px;
}

/* ————— Article body ————— */
article.doc {
  padding: 8px 0 72px;
  font-size: 17px;
}
article.doc h2 {
  font-family: "Bricolage Grotesque";
  font-weight: 800;
  font-size: clamp(24px, 2.6vw, 30px);
  letter-spacing: -0.015em;
  margin: 48px 0 12px;
  line-height: 1.2;
}
article.doc h2:first-of-type {
  margin-top: 20px;
}
article.doc h3 {
  font-family: "Bricolage Grotesque";
  font-weight: 700;
  font-size: 19px;
  margin: 28px 0 6px;
  letter-spacing: -0.01em;
}
article.doc p {
  margin: 0 0 14px;
  color: var(--ink-2);
}
article.doc ul,
article.doc ol {
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--ink-2);
}
article.doc li {
  margin-bottom: 6px;
}
article.doc a {
  color: var(--pink-deep);
  text-decoration: underline;
  text-decoration-color: rgba(201, 60, 93, 0.35);
  text-underline-offset: 2px;
}
article.doc a:hover {
  text-decoration-color: var(--pink-deep);
}
article.doc strong {
  color: var(--ink);
}
article.doc code {
  background: var(--paper-2);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 14px;
  border: 1px solid rgba(42, 30, 20, 0.12);
}
article.doc .callout {
  background: var(--paper-2);
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: 0 3px 0 var(--ink);
  margin: 20px 0 26px;
}
article.doc .callout p:last-child {
  margin-bottom: 0;
}

article.doc .toc {
  background: var(--paper-2);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 16px 22px;
  margin: 24px 0 32px;
  box-shadow: 0 3px 0 var(--ink);
}
article.doc .toc h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-family: "JetBrains Mono";
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  font-weight: 700;
}
article.doc .toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 2;
  column-gap: 28px;
}
article.doc .toc li {
  margin-bottom: 4px;
  break-inside: avoid;
}
article.doc .toc a {
  font-size: 15px;
}
@media (max-width: 600px) {
  article.doc .toc ul {
    columns: 1;
  }
}

/* ————— Footer ————— */
footer {
  padding: 40px 0 60px;
  border-top: 2px solid rgba(42, 30, 20, 0.15);
  margin-top: 40px;
}
.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-mute);
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
}
.foot-links {
  display: flex;
  gap: 20px;
}
.foot-links a {
  color: var(--ink-2);
  text-decoration: none;
}
.foot-links a:hover {
  color: var(--ink);
}
