
:root {
  --bg: #f5efe4;
  --bg-deep: #e6dac7;
  --card: #fffdf8;
  --ink: #1e1a16;
  --muted: #6c5e51;
  --line: #e2d5c2;
  --accent: #8d5a2b;
  --accent-2: #2b6f73;
  --shadow: 0 24px 60px rgba(40, 26, 14, 0.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(141, 90, 43, 0.14), transparent 30%),
    radial-gradient(circle at top right, rgba(43, 111, 115, 0.10), transparent 28%),
    linear-gradient(180deg, var(--bg), #fbf8f2 35%, #f8f4ec 100%);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  line-height: 1.7;
}

a { color: var(--accent-2); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }

.page-shell { max-width: 1240px; margin: 0 auto; padding: 28px 20px 60px; }
.card {
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(226, 213, 194, 0.92);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 28px;
  margin-bottom: 18px;
  backdrop-filter: blur(10px);
}

.eyebrow, .card-label, .meta-chip {
  font-family: "Avenir Next", "Gill Sans", "Trebuchet MS", "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
}

.eyebrow, .card-label { color: var(--accent); font-weight: 700; }
.hero h1, .feature h2, .article h1, .article h2, .article h3 { font-family: "Avenir Next", "Gill Sans", "Trebuchet MS", "Segoe UI", sans-serif; letter-spacing: -0.03em; line-height: 1.1; }
.hero h1 { margin: 10px 0 0; font-size: clamp(1.65rem, 4vw, 3.1rem); max-width: 12ch; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 68ch; margin: 12px 0 0; }

.breadcrumbs { margin: 16px 2px 10px; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-family: "Avenir Next", "Gill Sans", "Trebuchet MS", "Segoe UI", sans-serif; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 8px; color: #b39f8a; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.article { padding: 30px; min-width: 0; }
.article h1 { margin-top: 0; font-size: clamp(1.55rem, 3vw, 2.35rem); }
.article h2 { margin-top: 2em; font-size: 1.28rem; }
.article h3 { margin-top: 1.6em; font-size: 1.08rem; }
.article p, .article li { font-size: 1.03rem; }
.article ul, .article ol { padding-left: 1.4rem; }
.article li + li { margin-top: 0.35rem; }
.article blockquote {
  margin: 1.3rem 0;
  padding: 0.2rem 1.2rem;
  border-left: 4px solid rgba(141, 90, 43, 0.35);
  background: rgba(141, 90, 43, 0.05);
  border-radius: 0 14px 14px 0;
}
.article pre {
  overflow: auto;
  padding: 16px 18px;
  border-radius: 18px;
  background: #181310;
  color: #f5eee4;
}
.article code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.94em;
}
.article p code, .article li code {
  background: rgba(24, 19, 16, 0.08);
  padding: 0.14em 0.34em;
  border-radius: 6px;
}
.article img { max-width: 100%; height: auto; }

.toc {
  position: sticky;
  top: 16px;
  padding: 18px;
  align-self: start;
}
.toc-list, .answer-list, .link-list { list-style: none; margin: 0; padding: 0; }
.toc-list li + li, .answer-list li + li, .link-list li + li { margin-top: 0.45rem; }
.toc-level-3 { padding-left: 0.8rem; }
.toc-level-4 { padding-left: 1.4rem; }
.toc a, .answer-list a, .link-list a { text-decoration: none; }
.toc a:hover, .answer-list a:hover, .link-list a:hover { text-decoration: underline; }

.feature, .list-card { padding: 24px; }
.feature h2 { margin: 0.2rem 0 0; font-size: 1.35rem; }
.stack { display: grid; gap: 18px; }
.landing-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(43, 111, 115, 0.24);
  background: rgba(43, 111, 115, 0.08);
  color: var(--accent-2);
  text-decoration: none;
  font-family: "Avenir Next", "Gill Sans", "Trebuchet MS", "Segoe UI", sans-serif;
  font-weight: 600;
}
.button.primary {
  background: linear-gradient(135deg, var(--accent), #a76c30);
  border-color: transparent;
  color: #fff9f1;
}

.answer-list { counter-reset: item; }
.answer-list li { counter-increment: item; padding-left: 0.1rem; }
.answer-list li::marker { color: var(--accent); }

@media (max-width: 980px) {
  .hero, .layout, .landing-grid { grid-template-columns: 1fr; }
  .hero-meta { align-items: flex-start; }
  .toc { position: static; }
}

@media (max-width: 640px) {
  .page-shell { padding: 14px 10px 28px; }
  .hero, .article, .feature, .list-card, .toc { border-radius: 20px; }
  .hero, .article { padding: 20px; }
}
