:root {
  --bg: #fffaf4;
  --surface: #ffffff;
  --ink: #1d1a17;
  --ink-soft: #5c554e;
  --line: #eadfd3;
  --brand: #fe612e;
  --brand-deep: #bb1b04;
  --link: #b8360f;
  --shot-bg: #f1f1f1;
  --code-bg: #f6eee5;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171412;
    --surface: #211d1a;
    --ink: #f3ece5;
    --ink-soft: #b5aba1;
    --line: #3a332d;
    --link: #ff9a73;
    --shot-bg: #f1f1f1;
    --code-bg: #2c2622;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 Inter, system-ui, -apple-system, sans-serif;
}
a { color: var(--link); text-underline-offset: 2px; }
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--surface);
  position: sticky; top: 0; z-index: 2;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.brand img { border-radius: 7px; }
.store { font-size: 14px; color: var(--ink-soft); }
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); max-width: 1120px; margin: 0 auto; }
.side { padding: 28px 20px; border-right: 1px solid var(--line); position: sticky; top: 57px; align-self: start; max-height: calc(100vh - 57px); overflow-y: auto; }
.nav-section p { margin: 0 0 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.nav-section ul { list-style: none; margin: 0 0 22px; padding: 0; }
.nav-section a { display: block; padding: 5px 10px; margin-left: -10px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 14.5px; }
.nav-section a:hover { background: var(--code-bg); }
.nav-section a[aria-current="page"] { background: var(--code-bg); color: var(--brand-deep); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
@media (prefers-color-scheme: dark) { .nav-section a[aria-current="page"] { color: var(--link); } }
.content { padding: 36px 48px 64px; min-width: 0; }
article { max-width: 720px; }
h1 { font-size: 34px; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 18px; }
h2 { font-size: 21px; line-height: 1.3; margin: 36px 0 10px; }
h3 { font-size: 17px; margin: 28px 0 8px; }
p, ul, ol { margin: 0 0 14px; }
li { margin: 4px 0; }
code { font: 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--code-bg); padding: 2px 6px; border-radius: 5px; }
article img {
  display: block; width: 100%; height: auto; margin: 22px 0 26px;
  background: var(--shot-bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px;
}
table { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 14.5px; display: block; overflow-x: auto; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { font-weight: 600; background: var(--code-bg); }
.hero { margin-bottom: 8px; }
.hero p { font-size: 18px; color: var(--ink-soft); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.card:hover { border-color: var(--brand); }
.card span { font-size: 14px; color: var(--ink-soft); line-height: 1.5; }
.foot { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-soft); max-width: 720px; }
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; border-right: 0; border-top: 1px solid var(--line); padding: 20px 16px; order: 2; }
  .nav-section ul { margin-bottom: 14px; }
  .content { padding: 24px 16px 48px; }
  .top { padding: 12px 16px; }
  h1 { font-size: 28px; }
}
