
:root {
  --bg: #fffaf7;
  --card: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #f0d9cf;
  --brand: #d87757;
  --brand-2: #c55d3d;
  --ok: #059669;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f14;
    --card: #121821;
    --ink: #e5e7eb;
    --muted: #9ca3af;
    --line: #2a3340;
    --brand: #e08a6c;
    --brand-2: #d87757;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.top {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--line);
}
.top-inner, .wrap {
  max-width: 1180px; margin: 0 auto; padding: 0 20px;
}
.top-inner {
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink);
  text-decoration: none;
}
.logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; display: grid; place-items: center; font-weight: 800;
}
.nav { display: flex; gap: 8px; flex-wrap: wrap; }
.nav a, .btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 12px; font-weight: 600; font-size: 14px;
}
.ghost { color: var(--ink); }
.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff !important; text-decoration: none !important;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 35%, transparent);
}
.hero { padding: 48px 0 24px; }
.hero h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.15; margin: 0 0 12px; }
.hero h1 span { color: var(--brand); }
.hero p { font-size: 18px; color: var(--muted); max-width: 720px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
.pill {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-size: 13px;
}
.layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; padding: 12px 0 64px; }
.side {
  position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px;
}
.side h2 { font-size: 12px; letter-spacing: .04em; text-transform: none; margin: 14px 8px 6px; color: var(--muted); }
.side a {
  display: block; padding: 8px 10px; border-radius: 10px; color: var(--ink); font-size: 14px;
}
.side a:hover, .side a.active { background: color-mix(in srgb, var(--brand) 12%, transparent); text-decoration: none; }
.doc {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 28px 32px;
  min-width: 0;
}
.doc h1 { margin-top: 0; font-size: 32px; }
.doc h2 { margin-top: 32px; }
.doc pre, .doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.doc pre {
  overflow: auto; background: #111827; color: #e5e7eb; padding: 14px 16px; border-radius: 12px;
}
.doc code { background: color-mix(in srgb, var(--brand) 10%, transparent); padding: 1px 5px; border-radius: 6px; }
.doc pre code { background: none; padding: 0; color: inherit; }
.doc .custom-block { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: color-mix(in srgb, var(--brand) 7%, var(--card)); }
.doc img, .doc video { max-width: 100%; height: auto; }
.doc table { display: block; overflow-x: auto; border-collapse: collapse; width: 100%; }
.doc th, .doc td { border: 1px solid var(--line); padding: 8px 10px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.card {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; color: var(--ink); text-decoration: none;
}
.card:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-1px); }
.card b { display: block; margin-bottom: 6px; }
.card span { color: var(--muted); font-size: 13px; }
.foot { border-top: 1px solid var(--line); padding: 28px 0 48px; color: var(--muted); font-size: 13px; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; }
}
