/* Markda user guide — builds on style.css */
.guide-top { background: var(--paper); padding: 120px 0 56px; border-bottom: 1px solid var(--line); }
.guide-top .kicker { margin-bottom: 14px; }
.guide-top h1 { margin: 0 0 16px; font-family: var(--jp); font-weight: 300; font-size: clamp(32px, 4.4vw, 46px); color: var(--ink); line-height: 1.3; }
.guide-top p { margin: 0; max-width: 46em; color: var(--muted); font-size: 15.5px; }
.guide-top .meta { margin-top: 18px; font-size: 12.5px; color: var(--faint); }

.guide { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 64px; max-width: 1180px; margin: 0 auto; padding: 56px 40px 120px; }
.toc { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 96px); overflow-y: auto; font-size: 13px; padding-right: 8px; }
.toc .label { font-family: var(--sans); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li a { display: block; padding: 4px 0 4px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); line-height: 1.6; }
.toc li a:hover { color: var(--ink); }
.toc li a.active { color: var(--ink); border-left-color: var(--ink); }

.doc-body { min-width: 0; max-width: 780px; color: var(--text); font-size: 15.5px; line-height: 1.95; }
.doc-body section { scroll-margin-top: 76px; padding-bottom: 28px; }
.doc-body h2 { font-family: var(--jp); font-weight: 400; font-size: 26px; color: var(--ink); margin: 40px 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); line-height: 1.4; }
.doc-body section:first-child h2 { margin-top: 0; }
.doc-body h3 { font-family: var(--jp); font-weight: 500; font-size: 17.5px; color: var(--ink); margin: 34px 0 8px; scroll-margin-top: 76px; }
.doc-body p { margin: 0 0 14px; }
.doc-body ul, .doc-body ol { margin: 0 0 16px; padding-left: 1.4em; }
.doc-body li { margin: 4px 0; }
.doc-body a { color: var(--accent); }
.doc-body a:hover { text-decoration: underline; }
.doc-body strong { color: var(--ink); font-weight: 600; }
.doc-body figure { margin: 22px 0 26px; }
.doc-body figure img { width: 100%; height: auto; border: 1px solid #e2e2e0; border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 14px 36px -18px rgba(0,0,0,.25); background: #fff; }
.doc-body figure.narrow img { max-width: 560px; }
.doc-body figcaption { margin-top: 10px; font-size: 12.5px; color: var(--muted); text-align: center; }
.doc-body pre { margin: 0 0 18px; padding: 14px 16px; background: #f5f5f3; border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; font-family: var(--mono); font-size: 12.8px; line-height: 1.7; color: #333; }
.doc-body pre code { background: none; padding: 0; font-size: inherit; }
.doc-body p code, .doc-body li code { overflow-wrap: anywhere; }
.doc-body .tbl { overflow-x: auto; margin: 0 0 20px; }
.doc-body table { border-collapse: collapse; width: 100%; font-size: 13.8px; line-height: 1.7; }
.doc-body th, .doc-body td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.doc-body th { font-weight: 500; color: var(--ink); background: #fafaf8; border-bottom-color: #e2e2e0; white-space: nowrap; }
.doc-body td code { white-space: nowrap; }
.doc-body td.wrap code { white-space: normal; }
.doc-body .tip { margin: 18px 0 22px; padding: 14px 18px; border-left: 3px solid var(--accent); background: #f3f7fd; border-radius: 0 6px 6px 0; font-size: 14.5px; }
.doc-body .tip.warn { border-left-color: #c98a16; background: #fdf8ec; }
.doc-body .tip p:last-child { margin-bottom: 0; }
.doc-body .tip b { color: var(--ink); }
.doc-body .steps { counter-reset: step; list-style: none; padding: 0; }
.doc-body .steps > li { counter-increment: step; position: relative; padding-left: 40px; margin: 12px 0; }
.doc-body .steps > li::before { content: counter(step); position: absolute; left: 0; top: 2px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid #d9d9d7; display: grid; place-items: center; font-family: var(--sans); font-size: 13px; color: var(--ink); background: #fff; }
.doc-body .icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 24px; padding: 0; list-style: none; }
.doc-body .icons li { margin: 2px 0; }
.back-top { display: inline-block; margin-top: 8px; font-size: 12.5px; color: var(--muted) !important; }

@media (max-width: 960px) {
  .guide { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 32px 16px 88px; }
  .toc { position: static; max-height: none; padding: 16px 18px; border: 1px solid var(--line); border-radius: 8px; background: #fbfbfa; }
  .toc ol { columns: 2; column-gap: 20px; border-left: 0; }
  .toc li a { padding-left: 0; border-left: 0; }
  .guide-top { padding: 96px 0 40px; }
}
@media (max-width: 600px) {
  .toc ol { columns: 1; }
  .doc-body { font-size: 15px; }
  .doc-body h2 { font-size: 22px; }
}
@media print {
  .nav, .toc, footer { display: none !important; }
  .guide { display: block; padding: 0; }
  .guide-top { padding: 24px 0; }
}
.doc-body td:nth-child(2) code { white-space: normal; word-break: break-all; }
