/* Faustin docs. Sits on top of site.css and uses the same tokens. */
body.docs .bg { background:
  radial-gradient(1100px 700px at 92% 108%, rgba(255, 133, 188, .12), transparent 60%),
  radial-gradient(900px 600px at 105% -5%, rgba(140, 92, 255, .1), transparent 60%),
  #0d0b14; }
body.docs .bg::after { display: none; }
body.docs .foot { margin-top: 70px; }

/* ---------- landing ---------- */
.doc-home { padding-top: 54px; }
.doc-home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 30px; }
.doc-home-head p { margin-top: 12px; max-width: 560px; font-size: 17px; color: var(--g6-text-muted); }
.dcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 14px; }
.dcard { display: flex; flex-direction: column; overflow: hidden; background: var(--g6-panel-deep); border: 1px solid var(--g6-border); border-radius: var(--g6-r-panel); transition: border-color var(--g6-fast), transform var(--g6-fast); }
.dcard:hover { border-color: var(--g6-pink); transform: translateY(-2px); }
.dcard-art { aspect-ratio: 16 / 8; background: #15121d; display: grid; place-items: center; overflow: hidden; }
.dcard-art img { width: 100%; height: 100%; object-fit: cover; }
.card-ic { font-size: 46px; color: var(--g6-pink); }
.dcard-copy { padding: 16px 18px 18px; display: grid; gap: 6px; }
.dcard-copy b { font-family: var(--g6-font-cond); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; font-size: 25px; line-height: 1.05; color: #fff; }
.dcard-copy span { font-size: 14.5px; color: var(--g6-text-muted); }

/* ---------- search ---------- */
.dsearch { position: relative; display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 10px 0 12px; background: rgba(255, 255, 255, .06); border: 1px solid var(--g6-border); border-radius: 4px; color: var(--g6-text-location); }
.dsearch:focus-within { border-color: var(--g6-pink); }
.dsearch.wide { flex: none; width: 340px; }
.dsearch input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; color: #fff; font: inherit; font-size: 14.5px; }
.dsearch input::placeholder { color: var(--g6-text-location); }
.dsearch input::-webkit-search-cancel-button { display: none; }
.dsearch kbd { flex: none; padding: 2px 6px; border: 1px solid var(--g6-border); border-radius: 3px; font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: var(--g6-text-location); }
.dresults { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: min(460px, calc(100vw - 36px)); max-height: 60vh; overflow: auto; padding: 6px; background: var(--g6-panel-deep); border: 1px solid var(--g6-border); border-radius: 6px; box-shadow: 0 24px 60px rgba(0, 0, 0, .6); }
.dsearch.wide .dresults { left: auto; right: 0; }
.dresults a { display: block; padding: 9px 10px; border-radius: 4px; }
.dresults a b { display: block; color: #fff; font-weight: 500; font-size: 14.5px; }
.dresults a small { display: block; color: var(--g6-pink); font-size: 12px; }
.dresults a span { display: block; margin-top: 2px; font-size: 13px; color: var(--g6-text-muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dresults a:hover, .dresults a.on { background: rgba(255, 255, 255, .09); }
.dresults p { padding: 12px 10px; font-size: 14px; color: var(--g6-text-location); }

/* ---------- three column layout ---------- */
.doc-wrap { max-width: 1400px; margin: 0 auto; padding: 34px 28px 0; display: grid; grid-template-columns: 262px minmax(0, 1fr) 216px; gap: 44px; align-items: start; }
.side, .toc { position: sticky; top: 100px; max-height: calc(100vh - 120px); overflow: auto; scrollbar-width: thin; }
.side { display: grid; gap: 12px; overflow: visible; }
.side nav { max-height: calc(100vh - 250px); overflow: auto; padding-right: 2px; scrollbar-width: thin; }
.side-toggle { display: none; }
.slabel { font-family: var(--g6-font-cond); font-weight: 700; text-transform: uppercase; letter-spacing: 3px; font-size: 13.5px; color: var(--g6-text-location); }

.switch { padding: 0; background: var(--g6-panel-deep); border: 1px solid var(--g6-border); border-radius: 4px; }
.switch[open] { background: var(--g6-panel-deep); border-color: rgba(255, 133, 188, .35); }
.switch summary { padding: 9px 12px; align-items: center; font-size: inherit; text-transform: none; letter-spacing: 0; }
.switch summary::after { content: '\f0dc'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 12px; color: var(--g6-text-location); }
.switch[open] summary::after { content: '\f0dc'; }
.switch summary span { min-width: 0; display: grid; }
.switch summary b { font-family: var(--g6-font-cond); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; font-size: 18px; line-height: 1.1; color: #fff; }
.switch summary small { font-family: var(--g6-font); font-size: 12px; color: var(--g6-text-location); }
.switch-list { display: grid; gap: 2px; padding: 0 6px 6px; }
.switch-list a { padding: 7px 8px; border-radius: 3px; font-size: 14.5px; color: var(--g6-text-muted); }
.switch-list a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.switch-list a.on { color: var(--g6-pink); }

.sgroup { display: grid; gap: 2px; margin-top: 16px; }
.sgroup:first-child { margin-top: 4px; }
.sgroup .slabel { margin-bottom: 4px; padding-left: 10px; }
.sgroup a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-left: 2px solid transparent; font-size: 15px; color: var(--g6-text-muted); transition: color var(--g6-fast), background var(--g6-fast); }
.sgroup a i { width: 16px; text-align: center; font-size: 13px; color: var(--g6-text-location); }
.sgroup a:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.sgroup a.on { color: #fff; background: rgba(255, 133, 188, .12); border-left-color: var(--g6-pink); }
.sgroup a.on i { color: var(--g6-pink); }

.toc { display: grid; gap: 2px; }
.toc .slabel { margin-bottom: 8px; color: var(--g6-pink); }
.toc a { padding: 4px 0 4px 12px; border-left: 1px solid var(--g6-border-soft); font-size: 13.5px; line-height: 1.35; color: var(--g6-text-location); transition: color var(--g6-fast); }
.toc a code { background: none; padding: 0; }
.toc a:hover { color: #fff; }
.toc a.on { color: #fff; border-left-color: var(--g6-pink); }

/* ---------- article ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; color: var(--g6-text-location); }
.crumbs i { font-size: 9px; }
.crumbs a:hover { color: #fff; }
.crumbs b { color: #fff; font-weight: 500; }
.doc h1 { margin-top: 12px; font-family: var(--g6-font-cond); font-weight: 700; text-transform: uppercase; font-size: clamp(42px, 5vw, 60px); line-height: .98; color: #fff; }
.doc-lead { margin-top: 12px; font-size: 18px; color: var(--g6-text-muted); }
.doc-body { margin-top: 12px; font-size: 16px; color: rgba(241, 235, 250, .88); }
.doc-body h2 { margin-top: 44px; font-family: var(--g6-font-cond); font-weight: 700; text-transform: uppercase; letter-spacing: .3px; font-size: 30px; line-height: 1.08; color: #fff; }
.doc-body h2 code { font-size: .78em; }
.doc-body p { margin-top: 12px; }
.doc-body p.small { font-size: 13.5px; color: var(--g6-text-location); }
.doc-body strong { color: #fff; font-weight: 500; }
.doc-body a { color: var(--g6-pink); text-decoration: underline; }
.doc-body a.more { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.doc-body a.more i { font-size: 12px; }
.doc-body ul { margin-top: 12px; list-style: none; display: grid; gap: 7px; }
.doc-body li { position: relative; padding-left: 20px; }
.doc-body li::before { content: ''; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; background: var(--g6-pink); }
.doc-body figure { margin-top: 18px; }
.doc-body figure img { width: 100%; height: auto; border-radius: var(--g6-r-panel); border: 1px solid var(--g6-border); }
.doc-body code { overflow-wrap: anywhere; }

/* numbered steps with a line down the side */
.step { position: relative; padding: 0 0 8px 46px; margin-top: 30px; }
.step::before { content: ''; position: absolute; left: 14px; top: 34px; bottom: -26px; width: 1px; background: var(--g6-border); }
.step:last-of-type::before { display: none; }
.step-n { position: absolute; left: 0; top: 0; width: 29px; height: 29px; display: grid; place-items: center; background: var(--g6-pink); color: #151327; font-family: var(--g6-font-cond); font-weight: 700; font-size: 18px; }
.step h2 { margin-top: 0; font-size: 27px; line-height: 29px; }

/* code */
.codeblock { position: relative; margin-top: 14px; background: #100e17; border: 1px solid var(--g6-border); border-radius: 6px; overflow: hidden; }
.codeblock .lang { position: absolute; top: 12px; right: 48px; font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: var(--g6-text-location); }
.codeblock pre { overflow: auto; padding: 14px 16px; max-height: 620px; scrollbar-width: thin; }
.codeblock code { display: block; width: max-content; min-width: 100%; padding: 0; background: none; font-size: 13.5px; line-height: 1.6; color: #f1ebfa; overflow-wrap: normal; }
.codeblock code .c { color: #8f8a9c; }
.copy { position: absolute; z-index: 1; top: 7px; right: 7px; width: 32px; height: 32px; display: grid; place-items: center; background: #231f2e; border: 1px solid var(--g6-border); border-radius: 4px; color: var(--g6-text-muted); transition: color var(--g6-fast); }
.copy:hover { color: #fff; }
.copy.done { color: var(--g6-pink); }

/* tables */
.table { margin-top: 14px; overflow-x: auto; border: 1px solid var(--g6-border); border-radius: 6px; scrollbar-width: thin; }
.table table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { padding: 10px 14px; text-align: left; white-space: nowrap; background: var(--g6-panel-bar); font-family: var(--g6-font-cond); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 15px; color: #fff; }
.table td { padding: 10px 14px; vertical-align: top; border-top: 1px solid var(--g6-border-soft); }
.table td:first-child { min-width: 170px; }

/* notes */
.note { display: flex; gap: 12px; margin-top: 16px; padding: 12px 14px; font-size: 14.5px; background: rgba(255, 133, 188, .07); border: 1px solid rgba(255, 133, 188, .25); border-radius: 6px; }
.note i { margin-top: 3px; color: var(--g6-pink); }
.note.warn { background: rgba(255, 179, 161, .08); border-color: rgba(255, 179, 161, .3); }
.note.warn i { color: var(--g6-price); }

/* tabs */
.tabs { margin-top: 14px; }
.tab-row { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--g6-border); }
.tab-row button { padding: 7px 14px 6px; border-bottom: 2px solid transparent; margin-bottom: -1px; font-family: var(--g6-font-cond); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 16px; color: var(--g6-text-location); }
.tab-row button:hover { color: #fff; }
.tab-row button[aria-selected="true"] { color: #fff; border-bottom-color: var(--g6-pink); }

/* previous / next */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 52px; }
.pn { padding: 13px 16px; background: var(--g6-panel-deep); border: 1px solid var(--g6-border); border-radius: 6px; transition: border-color var(--g6-fast); }
.pn:hover { border-color: var(--g6-pink); }
.pn.next { text-align: right; grid-column: 2; }
.pn small { display: block; font-size: 12.5px; color: var(--g6-text-location); }
.pn b { display: block; font-family: var(--g6-font-cond); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; font-size: 20px; line-height: 1.15; color: #fff; }

/* ---------- small screens ---------- */
@media (max-width: 1180px) {
  .doc-wrap { grid-template-columns: 240px minmax(0, 1fr); gap: 36px; }
  .toc { display: none; }
}
@media (max-width: 860px) {
  .doc-wrap { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 16px 18px 0; }
  .side-toggle { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; text-align: left; font-size: 14.5px; color: #fff; background: var(--g6-panel-deep); border: 1px solid var(--g6-border); border-radius: 4px; }
  .side-toggle i { color: var(--g6-pink); }
  .side { position: static; display: none; max-height: none; padding: 12px; background: var(--g6-panel-deep); border: 1px solid var(--g6-border); border-radius: 6px; }
  .side.open { display: grid; }
  .side nav { max-height: none; }
  .dsearch kbd { display: none; }
  .doc-home-head { display: block; }
  .dsearch.wide { width: 100%; margin-top: 18px; }
  .dsearch.wide .dresults { left: 0; right: auto; }
  .doc-home { padding-top: 34px; }
}
@media (max-width: 720px) {
  .step { padding-left: 38px; }
  .step::before { left: 12px; }
  .step-n { width: 25px; height: 25px; font-size: 16px; }
  .step h2 { font-size: 24px; line-height: 25px; }
  .doc-body h2 { font-size: 27px; }
  .doc-lead { font-size: 16.5px; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pn.next { grid-column: 1; }
  .top-right .btn.white span { display: none; }
}
