:root {
  color-scheme: light dark;
  --accent: #ff8a38;
  --accent-soft: #fff0e6;
  --purple: #7857d7;
  --background: #faf9fd;
  --surface: #ffffff;
  --text: #222127;
  --muted: #65616f;
  --line: #e5e1ea;
  --code: #f1eef5;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}
a { color: var(--purple); text-underline-offset: 3px; }
.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--background) 92%, transparent);
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 750; text-decoration: none; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; background: linear-gradient(135deg, var(--accent), #ffb15f); color: #241306; }
nav { display: flex; gap: 18px; }
nav a { color: var(--muted); font-size: 14px; font-weight: 650; text-decoration: none; }
nav a:hover { color: var(--accent); }
.document { width: min(900px, calc(100% - 40px)); margin: 46px auto 80px; padding: 48px 56px; border-radius: 24px; background: var(--surface); box-shadow: 0 18px 60px rgb(38 26 58 / 8%); }
.document > h1:first-child { margin-top: 0; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; }
h1, h2, h3, h4 { line-height: 1.28; scroll-margin-top: 86px; }
h2 { margin-top: 2.5em; padding-bottom: .4em; border-bottom: 1px solid var(--line); font-size: 1.55rem; }
h3 { margin-top: 2em; font-size: 1.25rem; }
h4 { margin-top: 1.6em; color: var(--purple); }
p, li { overflow-wrap: anywhere; }
li + li { margin-top: .35em; }
blockquote { margin-left: 0; padding: .5em 1em; border-left: 4px solid var(--accent); background: var(--accent-soft); }
code { padding: .16em .38em; border-radius: 6px; background: var(--code); font-size: .9em; }
pre { overflow-x: auto; padding: 18px; border-radius: 14px; background: #1b1920; color: #f7f3fb; }
pre code { padding: 0; background: transparent; color: inherit; }
table { display: block; overflow-x: auto; width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--code); }
hr { margin: 3em 0; border: 0; border-top: 1px solid var(--line); }
.landing { width: min(1040px, calc(100% - 40px)); margin: 84px auto 100px; }
.landing h1 { max-width: 760px; margin: .2em 0; font-size: clamp(2.5rem, 7vw, 5rem); letter-spacing: -.04em; }
.eyebrow { color: var(--accent); font-size: 13px; font-weight: 800; letter-spacing: .14em; }
.lead { max-width: 650px; color: var(--muted); font-size: 1.2rem; }
.document-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 50px; }
.document-card { display: flex; min-height: 190px; flex-direction: column; gap: 12px; padding: 26px; border-radius: 20px; background: var(--surface); color: var(--muted); text-decoration: none; box-shadow: 0 12px 40px rgb(38 26 58 / 7%); transition: transform .18s ease, box-shadow .18s ease; }
.document-card:hover { transform: translateY(-3px); box-shadow: 0 18px 50px rgb(38 26 58 / 12%); }
.document-card strong { color: var(--text); font-size: 1.2rem; }
footer { padding: 28px 20px 40px; color: var(--muted); text-align: center; font-size: 14px; }

@media (prefers-color-scheme: dark) {
  :root { --accent-soft: #352116; --background: #121217; --surface: #1b1a20; --text: #f4f0f7; --muted: #aaa4b2; --line: #35313c; --code: #29262f; }
  .document { box-shadow: none; }
}

@media (max-width: 720px) {
  .site-header { min-height: 58px; padding: 0 16px; }
  nav { gap: 12px; }
  nav a { font-size: 13px; }
  .document { width: 100%; margin: 0; padding: 32px 20px 60px; border-radius: 0; box-shadow: none; }
  .document-grid { grid-template-columns: 1fr; }
  .document-card { min-height: auto; }
  .landing { margin-top: 56px; }
}
