/* sorn docs: full-page guide reader (header, sidebar, guide, "On this page"). */

body.docs-app { background: #09090b; }
body.docs-app #silk { opacity: .06; }
body.docs-app .glow { display: none; }

/* until the script has built the reader, show the plain sections */
.docs-app:not(.docs-ready) .dshell { display: none; }
.docs-app.docs-ready .dsource { display: none; }
.docs-app:not(.docs-ready) .dsource { max-width: 820px; margin: 0 auto; padding: 100px 24px; }

/* ---------------------------------------------------------------- header */
.dh.topbar { position: sticky; top: 0; left: auto; transform: none; width: 100%; z-index: 60; height: 64px; display: flex; align-items: center; gap: 12px;
  padding: 0 20px; border: 0; border-radius: 0; background: rgba(9, 9, 11, .82); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06); }
.dh.topbar.scrolled { width: 100%; padding: 0 20px; border-radius: 0; box-shadow: 0 1px 0 rgba(255, 255, 255, .06); }
.dh-menu { display: none; width: 38px; height: 38px; border: 0; border-radius: 11px; background: rgba(255, 255, 255, .06); color: #fafafa; cursor: pointer; }
.dh-brand { flex: 0 0 248px; display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: #fafafa; }
.dh-brand img { width: 30px; height: 30px; border-radius: 50%; }
.dh-brand span { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: #d4d4d8; background: rgba(255, 255, 255, .08); }
.dh-search { position: relative; flex: 0 1 520px; margin: 0 auto; min-width: 0; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px 0 14px; border-radius: 12px; background: rgba(255, 255, 255, .055); cursor: text; transition: background .15s ease, box-shadow .15s ease; }
.dh-search:focus-within { background: rgba(255, 255, 255, .075); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .25); }
.dh-search > i { font-size: 13px; color: #71717a; }
.dh-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; color: #fafafa; }
.dh-search input::placeholder { color: #71717a; }
.dh-search input::-webkit-search-cancel-button { display: none; }
.dh-search kbd { font-family: var(--mono); font-size: 11px; color: #a1a1aa; padding: 1px 7px; border-radius: 6px; background: rgba(255, 255, 255, .08); }
.dh-results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); padding: 6px; border-radius: 14px; background: #111113; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 30px 70px -20px rgba(0, 0, 0, .9); max-height: 70vh; overflow-y: auto; }
.dh-results[hidden] { display: none; }
.dh-results a { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; color: #d4d4d8; }
.dh-results a > i { margin-top: 3px; width: 16px; text-align: center; font-size: 13px; color: #a1a1aa; }
.dh-results a b { display: block; font-size: 14px; color: #fafafa; }
.dh-results a small { display: block; font-size: 12.5px; color: #71717a; line-height: 1.45; margin-top: 2px; }
.dh-results a:hover, .dh-results a.on { background: rgba(255, 255, 255, .06); }
.dh-results p { margin: 0; padding: 14px; font-size: 13.5px; color: #71717a; }
.dh-links { display: flex; gap: 2px; }
.dh-links a { padding: 8px 12px; border-radius: 999px; font-size: 14px; font-weight: 500; color: #d4d4d8; }
.dh-links a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.dh .tb-cta { height: 38px; }

/* ---------------------------------------------------------------- layout */
.dshell { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: calc(100vh - 64px); }
.dside { position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto; padding: 18px 14px 14px; display: flex; flex-direction: column; gap: 14px; box-shadow: 1px 0 0 rgba(255, 255, 255, .05); }
.dside::-webkit-scrollbar { width: 6px; }
.dside::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .08); border-radius: 6px; }
.dside nav { display: grid; gap: 4px; }
.ds-home, .ds-items a { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 10px; font-size: 14px; color: #a1a1aa; transition: background .15s ease, color .15s ease; }
.ds-home i, .ds-items a i { width: 16px; text-align: center; font-size: 12.5px; color: #71717a; }
.ds-home:hover, .ds-items a:hover { background: rgba(255, 255, 255, .05); color: #fafafa; }
.ds-home.on, .ds-items a.on { background: rgba(255, 255, 255, .09); color: #fafafa; font-weight: 600; }
.ds-home.on i, .ds-items a.on i { color: #fafafa; }
.ds-group { display: grid; }
.ds-head { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 12px; border: 0; border-radius: 10px; background: transparent; font: 600 14px/1.2 inherit; color: #e4e4e7; cursor: pointer; text-align: left; }
.ds-head:hover { background: rgba(255, 255, 255, .04); }
.ds-head > i:first-child { width: 16px; text-align: center; font-size: 12.5px; color: #a1a1aa; }
.ds-chev { margin-left: auto; font-size: 10px; color: #71717a; transition: transform .2s ease; }
.ds-group:not(.open) .ds-chev { transform: rotate(-90deg); }
.ds-items { display: grid; gap: 2px; padding: 2px 0 6px 14px; }
.ds-group:not(.open) .ds-items { display: none; }
.dside-foot { margin-top: auto; display: grid; gap: 2px; padding-top: 12px; }
.dside-foot a { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 10px; font-size: 13.5px; color: #71717a; }
.dside-foot a i { width: 16px; text-align: center; font-size: 12.5px; }
.dside-foot a:hover { color: #fafafa; background: rgba(255, 255, 255, .04); }
.dside-shade { display: none; }

.dmain { display: grid; grid-template-columns: minmax(0, 860px) 220px; gap: 56px; justify-content: center; padding: 40px 48px 120px; }
.dmain:has(.dtoc[hidden]) { grid-template-columns: minmax(0, 1060px); }
.dtoc { position: sticky; top: 100px; align-self: start; display: grid; gap: 2px; }
.dtoc[hidden] { display: none; }
.dtoc-head { display: flex; align-items: center; justify-content: space-between; padding: 0 10px 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #71717a; }
.dtoc-head em { font-style: normal; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.dtoc a { padding: 6px 10px; border-radius: 9px; font-size: 13.5px; color: #a1a1aa; transition: background .15s ease, color .15s ease; }
.dtoc a:hover { color: #fafafa; }
.dtoc a.on { color: #fafafa; background: rgba(255, 255, 255, .07); font-weight: 600; }

/* ---------------------------------------------------------------- the reading column */
.dv-crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #71717a; margin-bottom: 14px; }
.dv-crumb a { color: #a1a1aa; }
.dv-crumb a:hover { color: #fafafa; }
.dv-crumb i { font-size: 9px; }
.dv-head { margin-bottom: 34px; }
.dv-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px; font-size: 18px; color: #09090b; background: #fafafa; }
.dv-head h1 { margin: 0; font-size: clamp(34px, 4vw, 48px); line-height: 1.08; letter-spacing: -.03em; font-weight: 800; color: #fafafa; }
.dv-head p { margin: 12px 0 0; max-width: 640px; font-size: 17px; line-height: 1.6; color: #a1a1aa; }
.dv-head p code { font-family: var(--mono); font-size: 14px; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); color: #fafafa; }
.dv-group { margin-top: 34px; }
.dv-group h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #71717a; }
.dv-group h2 span { letter-spacing: 0; padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: #a1a1aa; }
.dv-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dv-card { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 14px; row-gap: 4px; align-content: start; padding: 18px; border-radius: 16px; background: rgba(255, 255, 255, .035); transition: background .18s ease; }
.dv-card:hover { background: rgba(255, 255, 255, .065); }
.dv-card-ic { grid-row: span 2; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 14px; color: #e4e4e7; background: rgba(255, 255, 255, .07); }
.dv-card b { font-size: 15.5px; color: #fafafa; padding-right: 22px; }
.dv-card > span:not(.dv-card-ic) { font-size: 13.5px; line-height: 1.55; color: #a1a1aa; }
.dv-go { position: absolute; right: 18px; top: 22px; font-size: 12px; color: #52525b; transition: transform .2s ease, color .2s ease; }
.dv-card:hover .dv-go { color: #fafafa; transform: translateX(3px); }

/* guide content (the original section markup) */
.dv-body { font-size: 15.5px; line-height: 1.7; color: #d4d4d8; }
.dv-body > p, .dv-body > ol, .dv-body > ul { max-width: 720px; }
.dv-body h3 { margin: 44px 0 12px; font-size: 22px; letter-spacing: -.01em; color: #fafafa; scroll-margin-top: 90px; }
.dv-body b { color: #fafafa; }
.dv-body a { color: #fafafa; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .3); text-underline-offset: 3px; }
.dv-body .cmd-grid { margin: 18px 0 8px; }
.dv-body details { padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .035); margin-bottom: 8px; }
.dv-body details summary { cursor: pointer; font-weight: 600; color: #fafafa; }
.dv-body details p { margin: 10px 0 0; }
.dv-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 60px; }
.dv-pager a { display: grid; gap: 4px; padding: 16px 18px; border-radius: 16px; background: rgba(255, 255, 255, .035); transition: background .18s ease; }
.dv-pager a:hover { background: rgba(255, 255, 255, .065); }
.dv-pager .next { text-align: right; }
.dv-pager small { font-size: 12px; color: #71717a; }
.dv-pager b { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: #fafafa; }
.dv-pager .next b { justify-content: flex-end; }

/* ---------------------------------------------------------------- smaller screens */
@media (max-width: 1240px) {
  .dmain { grid-template-columns: minmax(0, 1fr); padding: 34px 36px 100px; }
  .dtoc { display: none; }
}
@media (max-width: 1000px) {
  .dh-brand { flex: none; }
  .dh-links { display: none; }
  .dh-menu { display: grid; place-items: center; }
  .dshell { grid-template-columns: 1fr; }
  .dside { position: fixed; left: 0; top: 64px; bottom: 0; width: 290px; height: auto; z-index: 55; background: #0c0c0e; transform: translateX(-102%); transition: transform .25s ease; box-shadow: 1px 0 0 rgba(255, 255, 255, .06), 30px 0 60px rgba(0, 0, 0, .6); }
  body.dside-open .dside { transform: none; }
  body.dside-open .dside-shade { display: block; position: fixed; inset: 64px 0 0; z-index: 54; background: rgba(0, 0, 0, .5); }
}
@media (max-width: 640px) {
  .dh.topbar { gap: 10px; padding: 0 12px; }
  .dh-brand span, .dh .tb-cta { display: none; }
  .dh-search kbd { display: none; }
  .dmain { padding: 26px 18px 80px; }
  .dv-cards { grid-template-columns: 1fr; }
  .dv-pager { grid-template-columns: 1fr; }
}
.dh-links, .dh-links a, .dh .tb-login, .dh .tb-cta, .dh .tb-acct { flex: none; white-space: nowrap; }
@media (max-width: 1180px) { .dh-links a:nth-child(2) { display: none; } }
@media (max-width: 760px) {
  .dh.topbar { flex-wrap: nowrap; height: 64px; padding: 0 12px; }
  .dh-brand { font-size: 0; gap: 0; }
  .dh-search { flex: 1 1 auto; margin: 0; }
}
