/* the guide: a documentation layout (sidebar + one page per topic) on top of the site's styles.css */
.wrap.docs { width: min(1320px, 100% - 40px); }
.docs { display: grid; grid-template-columns: 250px minmax(0, 1fr) 210px; gap: 48px; padding-top: 28px; padding-bottom: 80px; align-items: start; }
.dside { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; padding-right: 8px; scrollbar-width: thin; }
.sgroup { margin-bottom: 22px; }
.sgtitle { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: 0.04em; padding: 0 12px 8px; text-transform: lowercase; }
.dside a, .mnavin a { display: block; padding: 7px 12px; border-radius: 10px; font-size: 15px; color: var(--muted); line-height: 1.3; }
.dside a:hover, .mnavin a:hover { background: var(--chip); color: var(--text); }
.dside a.active, .mnavin a.active { background: var(--chip); color: var(--text); font-weight: 650; }

.dmain { max-width: 760px; min-width: 0; }
.crumb { font-size: 14px; color: var(--muted); display: flex; gap: 8px; margin-bottom: 14px; }
.crumb a:hover { color: var(--text); }
.dmain h1 { font-size: clamp(34px, 5vw, 48px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 14px; max-width: none; text-align: left; }
.lede { font-size: 19px; color: var(--muted); line-height: 1.5; margin-bottom: 26px; }
.dmain h2 { font-size: 26px; line-height: 1.2; max-width: none; text-align: left; letter-spacing: -0.02em; font-weight: 750; margin: 46px 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.dmain p { font-size: 17px; line-height: 1.65; margin: 0 0 14px; }
.dmain ul, .dmain ol { margin: 0 0 16px 22px; font-size: 17px; line-height: 1.65; }
.dmain li { margin-bottom: 6px; }
.dmain li::marker { color: var(--muted); }
.dmain a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.dmain a:hover { text-decoration-color: var(--text); }
.dmain strong { font-weight: 650; }

.onpage { border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px; margin: 0 0 28px; background: var(--card); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.onpage summary { cursor: pointer; padding: 10px 0; font-size: 15px; font-weight: 650; color: var(--muted); }
.onpage ul { list-style: none; margin: 0 0 10px; }
.onpage li { margin: 0; }
.onpage a { display: block; padding: 5px 0; font-size: 15.5px; color: var(--text); text-decoration: none; }
.onpage a:hover { text-decoration: underline; }

.dtoc { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; scrollbar-width: thin; }
.dtoctitle { font-size: 13px; font-weight: 700; color: var(--muted); padding: 0 0 10px 14px; }
.dtoc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.dtoc a { display: block; padding: 6px 14px; margin-left: -1px; border-left: 2px solid transparent; font-size: 14.5px; line-height: 1.35; color: var(--muted); }
.dtoc a:hover { color: var(--text); }
.dtoc a.on { color: var(--text); border-left-color: var(--text); font-weight: 650; }
.dmain table { width: 100%; border-collapse: collapse; margin: 6px 0 22px; font-size: 16px; }
.dmain th, .dmain td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.dmain th { font-size: 13px; font-weight: 700; color: var(--muted); background: var(--chip); }
.dmain th:first-child { border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
.dmain th:last-child { border-top-right-radius: 10px; border-bottom-right-radius: 10px; }
.dmain td:first-child { font-weight: 650; white-space: nowrap; }

.note { border: 1px solid var(--line); border-left-width: 4px; border-radius: 14px; padding: 14px 18px; margin: 22px 0; background: var(--card); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.note strong { display: block; font-size: 14px; margin-bottom: 4px; }
.note p { margin: 0; font-size: 16px; line-height: 1.55; }
.note.tip { border-left-color: #34c759; }
.note.important { border-left-color: #ff9f0a; }
.note.info { border-left-color: #0a84ff; }

.pnrow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 56px; }
.pn { display: block; border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; background: var(--card); font-weight: 650; font-size: 17px; text-decoration: none !important; }
.pn span { display: block; font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.pn.next { text-align: right; grid-column: 2; }
.pn:hover { border-color: var(--text); }
.helpline { margin-top: 26px; color: var(--muted); font-size: 15px !important; }

.mnav { display: none; border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px; margin-bottom: 18px; background: var(--card); }
.mnav summary { cursor: pointer; padding: 10px 0; font-weight: 650; font-size: 15px; }
.mnavin { padding-bottom: 10px; }

@media (min-width: 1081px) { .onpage { display: none; } }
@media (max-width: 1080px) {
  .docs { grid-template-columns: 250px minmax(0, 1fr); }
  .dtoc { display: none; }
}
@media (max-width: 860px) {
  .docs { display: block; padding-top: 16px; }
  .dside { display: none; }
  .mnav { display: block; }
  .dmain h2 { font-size: 23px; }
  .pnrow { grid-template-columns: 1fr; }
  .pn.next { grid-column: auto; text-align: left; }
  .dmain table { display: block; overflow-x: auto; }
  .dmain td:first-child { white-space: normal; }
}
