* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f4efe8;
  --paper: #fffcf8;
  --ink: #1e1a17;
  --muted: #5a524b;
  --line: #ddd2c5;
  --accent: #9c3d58;
  --link: #1d5f8a;
  --max: 52rem;
  --wide: 68rem;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 1.05rem;
}

a { color: var(--link); }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus {
  left: 12px;
  top: 12px;
  background: #fff;
  padding: 8px 12px;
  z-index: 20;
}

header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -0.02em;
}
.brand img { width: 36px; height: 36px; }
.brand span { line-height: 1.15; }
.brand small {
  display: block;
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--muted);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 0.2rem 0.15rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
nav a {
  display: block;
  padding: 0.4rem 0.7rem;
  text-decoration: none;
  color: var(--ink);
  border-radius: 6px;
  font-size: 0.95rem;
}
nav a:hover { background: var(--bg); text-decoration: none; }
nav a.active {
  background: var(--ink);
  color: #fff;
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.2rem 1.25rem 3.5rem;
}

main.wide { max-width: var(--wide); }

h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
}
h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.6rem;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 1.08rem;
  margin: 1.4rem 0 0.4rem;
}
p, ul, ol { margin-bottom: 0.9rem; }
li { margin: 0.25rem 0; }
.lede { font-size: 1.15rem; color: #2b2521; }

.hero {
  display: flex;
  gap: 1.4rem;
  align-items: flex-start;
  margin-bottom: 1.4rem;
}
.hero img { width: 72px; height: 72px; flex-shrink: 0; }

.note {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin: 1.2rem 0;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 0.65rem 1.1rem;
  border-radius: 8px;
  font-weight: 650;
  margin: 0.25rem 0.4rem 0.25rem 0;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; color: #fff; }
.btn.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.home-list { padding-left: 1.15rem; }
.home-list li { margin-bottom: 0.55rem; }

.feature-layout {
  display: grid;
  grid-template-columns: 15.5rem 1fr;
  gap: 2rem;
  align-items: start;
}

.toc {
  position: sticky;
  top: 4.6rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  font-size: 0.92rem;
}
.toc p {
  font-weight: 650;
  margin-bottom: 0.45rem;
}
.toc ol {
  margin: 0;
  padding-left: 1.15rem;
}
.toc a { text-decoration: none; color: var(--ink); }
.toc a:hover { text-decoration: underline; }

article.feature {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.15rem 1.25rem 0.7rem;
  margin-bottom: 1rem;
}
article.feature h2 { margin-top: 0; }
article.feature p:last-child { margin-bottom: 0.6rem; }

.steps { padding-left: 1.2rem; }
.steps li { margin-bottom: 0.5rem; }

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1.3rem 1.25rem 2rem;
  text-align: center;
}
footer a { color: var(--muted); }

@media (max-width: 860px) {
  .feature-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  h1 { font-size: 1.7rem; }
}

@media (max-width: 640px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  nav ul { justify-content: flex-start; }
  body { font-size: 1rem; }
}
