/* Multi-page site layout (used on top of style.css) */
body.site { max-width: none; padding: 0; margin: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--accent); color: #fff; }
.topbar .brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.menu-btn { display: none; background: transparent; border: 1px solid rgba(255,255,255,.6); color: #fff; border-radius: 6px; font-size: 1.1rem; padding: 2px 10px; cursor: pointer; }
.layout { display: flex; align-items: flex-start; }
.sidebar { position: sticky; top: 50px; width: 300px; flex: 0 0 300px; height: calc(100vh - 50px); overflow-y: auto; padding: 14px 10px 40px; border-right: 1px solid var(--line); background: #fafbfc; font-size: .92rem; }
.sidebar a { display: block; color: var(--ink); text-decoration: none; padding: 5px 10px; border-radius: 6px; line-height: 1.45; }
.sidebar a:hover { background: var(--accent-soft); }
.sidebar a.active { background: var(--accent); color: #fff; }
.sidebar .part { font-weight: 700; color: var(--accent); margin: 14px 10px 4px; font-size: .85rem; }
.content { flex: 1 1 auto; min-width: 0; max-width: 880px; margin: 0 auto; padding: 24px 28px 80px; }
.content > h1:first-child { margin-top: .6em; }
details.answer { margin: -0.6em 0 1.8em; }
details.answer summary { cursor: pointer; color: var(--accent); font-weight: 700; padding: .4em .2em; list-style: none; }
details.answer summary::before { content: "▸ "; }
details.answer[open] summary::before { content: "▾ "; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 3em; padding-top: 1em; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; padding: .6em .9em; border: 1px solid var(--line); border-radius: 8px; color: var(--accent); max-width: 48%; }
.pager a:hover { background: var(--accent-soft); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 1.5em 0; }
.card { border: 1px solid var(--line); border-radius: 10px; padding: 1em 1.1em; background: #fff; }
.card h3 { margin-top: 0; }
.card p { text-align: left; }
a.btn { display: inline-block; margin: 4px 6px 4px 0; padding: .35em .8em; border-radius: 6px; background: var(--accent-soft); color: var(--accent); text-decoration: none; font-size: .92rem; }
a.btn:hover { background: var(--accent); color: #fff; }
.hero { padding: 1.2em 0 .4em; }
.hero h1 { border: 0; font-size: 2rem; margin: 0 0 .3em; }
.hero .subtitle { color: var(--muted); font-size: 1.05rem; }
.hero .meta { color: var(--muted); font-size: .9rem; }
.toc-site ol { padding-left: 1.6em; }
.toc-site h3 { margin: 1.2em 0 .3em; }
@media (max-width: 900px) {
  .menu-btn { display: inline-block; }
  .sidebar { position: fixed; top: 48px; left: 0; bottom: 0; height: auto; width: 84%; max-width: 320px; transform: translateX(-105%); transition: transform .2s; z-index: 30; box-shadow: 4px 0 16px rgba(0,0,0,.15); }
  body.nav-open .sidebar { transform: none; }
  .content { padding: 16px 16px 60px; }
}
