:root { --bg: #f4f7fb; --panel: #fff; --text: #14211f; --muted: #60716d; --line: #d9e2df; --blue: #155eef; --teal: #0f766e; --red: #b42318; --warn: #a16207; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.62; }
.wrap { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }
.top { border-bottom: 1px solid var(--line); background: #fff; }
.bar { display: flex; min-height: 70px; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 44px; height: 44px; border: 0; border-radius: 8px; object-fit: contain; }
.nav { display: flex; flex-wrap: wrap; gap: 10px; }
.nav a { padding: 9px 11px; border-radius: 6px; color: var(--text); font-weight: 800; text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { background: #eef4f6; }
main { padding: 34px 0 56px; }
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); align-items: start; gap: 18px; }
.guide-toc { position: sticky; top: 88px; }
.guide-toc > summary { display: none; }
.guide-toc:not([open]) > .side { display: block; }
.side, .content section { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.side { padding: 12px; }
.side a { display: block; padding: 10px; border-radius: 7px; color: #203330; font-weight: 800; text-decoration: none; }
.side a:hover, .side a:focus-visible { background: #eef6f5; color: var(--teal); }
.content { display: grid; gap: 14px; min-width: 0; }
.content section { padding: 22px; scroll-margin-top: 96px; }
h1, h2, h3, p { margin: 0; }
h1 { margin-bottom: 18px; font-size: 32px; }
h2 { margin-bottom: 10px; font-size: 22px; }
p, li { color: var(--muted); }
ul, ol { margin: 10px 0 0; padding-left: 24px; }
li + li { margin-top: 6px; }
.content a { color: var(--blue); font-weight: 750; }
code { padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; background: #eef3f6; }

@media (max-width: 820px) {
  main { padding-top: 22px; }
  .layout { grid-template-columns: 1fr; gap: 14px; }
  .guide-toc { position: sticky; top: 70px; z-index: 5; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 6px 20px rgba(16, 24, 40, .08); }
  .guide-toc > summary { display: flex; min-height: 48px; align-items: center; justify-content: space-between; padding: 11px 14px; cursor: pointer; list-style: none; color: #203330; font-weight: 850; }
  .guide-toc > summary::-webkit-details-marker { display: none; }
  .guide-toc > summary::after { content: "+"; color: var(--blue); font-size: 22px; }
  .guide-toc[open] > summary::after { content: "−"; }
  .guide-toc:not([open]) > .side { display: none; }
  .side { max-height: min(55vh, 420px); overflow-y: auto; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; box-shadow: none !important; }
  .side a { min-height: 42px; }
  .content section { padding: 20px !important; }
}
