/* The documentation pages, site/pointe/docs/ (written by tools/build_docs.py from docs/). Loaded after style.css (fonts,
   colour tokens, base elements) and pages.css (the header, footer and `pg-` patterns). Everything here has a `dx-` name,
   so a change to the other pages cannot move these. The Markdown's own elements are styled inside .dx-doc only. */

.dx-wrap { max-width: 1320px; }
.dx-grid { display: grid; grid-template-columns: 228px minmax(0, 1fr) 208px; gap: 48px; align-items: start; padding-top: 32px; }

/* The left nav and the outline: sticky columns on wide screens, folded boxes at the top on narrow ones */
.dx-side, .dx-toc { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; font-size: 14px; line-height: 20px; }
.dx-fold > summary { display: none; }
.dx-nav-h { margin: 18px 0 6px; font-size: 11px; line-height: 16px; font-weight: 600; text-transform: uppercase;
            letter-spacing: .12em; color: var(--dim); }
.dx-nav-h:first-of-type { margin-top: 0; }
.dx-side ul, .dx-toc ul { margin: 0; padding: 0; list-style: none; }
.dx-side a, .dx-toc a { display: block; padding: 4px 0 4px 12px; border-left: 1px solid var(--line); color: var(--muted);
                        text-decoration: none; }
.dx-side a:hover, .dx-toc a:hover { color: var(--text); border-left-color: var(--line-strong); }
.dx-side a[aria-current] { color: var(--text); font-weight: 500; border-left: 2px solid var(--orange); padding-left: 11px; }
.dx-toc .dx-l3 a { padding-left: 24px; font-size: 13px; }
.dx-toc > details > summary + ul::before { content: none; }
.dx-toc { border-left: 0; }
.dx-toc details::before { content: "On this page"; display: block; margin-bottom: 6px; font-size: 11px; line-height: 16px;
                          font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); }

/* The document */
.dx-main { min-width: 0; padding-bottom: 8px; }
.dx-doc { max-width: 760px; color: var(--body); }
.dx-doc > * + * { margin-top: 16px; }
.dx-doc h1 { font-family: var(--font-display); font-weight: 300; font-size: clamp(32px, 3.4vw, 46px); line-height: 1.1;
             letter-spacing: -.02em; color: var(--text); margin-bottom: 8px; }
.dx-doc h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(24px, 2.2vw, 30px); line-height: 1.18;
             letter-spacing: -.015em; color: var(--text); margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); }
.dx-doc h3 { font-family: var(--font-display); font-weight: 400; font-size: 20px; line-height: 26px; letter-spacing: -.01em;
             color: var(--text); margin-top: 32px; }
.dx-doc h4 { font-size: 15px; font-weight: 600; color: var(--text); margin-top: 24px; }
.dx-doc h2, .dx-doc h3, .dx-doc h4 { scroll-margin-top: 16px; }
.dx-doc h1 + p { font-size: 18px; line-height: 28px; }
.dx-doc a { color: var(--text); }
.dx-doc a:hover { color: var(--accent); }
.dx-doc ul, .dx-doc ol { padding-left: 22px; }
.dx-doc ul { list-style: disc; }
.dx-doc ol { list-style: decimal; }
.dx-doc li + li { margin-top: 6px; }
.dx-doc li > ul, .dx-doc li > ol { margin-top: 6px; }
.dx-doc li > p + * { margin-top: 8px; }
.dx-doc li::marker { color: var(--dim); }
.dx-doc blockquote { margin: 16px 0 0; padding: 4px 0 4px 18px; border-left: 2px solid var(--orange); }
.dx-doc blockquote > * + * { margin-top: 12px; }
.dx-doc hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.dx-doc img { max-width: 100%; height: auto; }
.dx-doc picture, .dx-doc p > img:only-child { display: block; }
.dx-doc figure { margin: 24px 0 0; }

.dx-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dx-doc table { border-collapse: collapse; font-size: 14px; line-height: 21px; min-width: 100%; }
.dx-doc th, .dx-doc td { text-align: left; vertical-align: top; padding: 9px 16px 9px 0; border-bottom: 1px solid var(--line); }
.dx-doc th { color: var(--text); font-weight: 600; border-bottom-color: var(--line-strong); white-space: nowrap; }
.dx-doc td:first-child { color: var(--text); }
.dx-doc td code, .dx-doc th code { white-space: nowrap; }

.dx-code { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; background: #0C0906;
            border: 1px solid var(--line); border-radius: 12px; }
.dx-code pre { color: #F7F2F0; padding: 16px 18px; overflow-x: auto; }
.dx-code code { display: block; white-space: pre; font-size: 13px; line-height: 21px; background: none; padding: 0; color: inherit; }
.dx-copy { margin: 8px 8px 0 0; min-height: 32px; padding: 0 10px; border-radius: 8px; cursor: pointer;
           font: 500 12.5px/1 var(--font-sans); color: #F7F2F0; background: rgba(255, 255, 255, .08);
           border: 1px solid rgba(255, 255, 255, .18); }
.dx-copy:hover { background: rgba(255, 255, 255, .16); }

.dx-source { margin-top: 48px; }
.dx-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.dx-pager a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line-strong);
              border-radius: 12px; text-decoration: none; color: var(--text); font-weight: 500; }
.dx-pager a:hover { border-color: var(--accent); }
.dx-next { text-align: right; align-items: flex-end; }

@media (max-width: 1080px) {
  .dx-grid { grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
  .dx-toc { grid-column: 2; grid-row: 1; position: static; max-height: none; }
  .dx-main { grid-column: 2; grid-row: 2; }
  .dx-side { grid-row: 1 / span 2; }
  .dx-toc details::before { content: none; }
  .dx-fold > summary { cursor: pointer; font-weight: 500; color: var(--text); padding: 10px 14px; min-height: 44px;
                       display: flex; align-items: center; }
  .dx-toc details { border: 1px solid var(--line-strong); border-radius: 12px; }
  .dx-toc details[open] { padding-bottom: 8px; }
  .dx-toc details > ul { padding: 0 14px; }
  .dx-side .dx-fold > summary { display: none; }
}
@media (max-width: 880px) {
  .dx-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 12px; }
  .dx-side, .dx-toc, .dx-main { grid-column: 1; grid-row: auto; position: static; max-height: none; }
  .dx-toc { order: 1; }
  .dx-main { order: 2; }
  .dx-side details { border: 1px solid var(--line-strong); border-radius: 12px; }
  .dx-side .dx-fold > summary { display: flex; }
  .dx-side details[open] { padding: 0 14px 12px; }
  .dx-side details[open] > summary { margin: 0 -14px; }
  .dx-side a, .dx-toc a { padding-top: 9px; padding-bottom: 9px; }
  .dx-main { margin-top: 12px; }
  .dx-doc h2 { margin-top: 36px; }
  .dx-pager { grid-template-columns: 1fr; }
}
.dx-fold > summary { list-style: none; }
.dx-fold > summary::-webkit-details-marker { display: none; }
.dx-fold > summary::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 1.5px solid var(--muted);
                            border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translateY(-2px); }
.dx-fold[open] > summary::after { transform: rotate(-135deg) translate(-2px, 0); }
