.dx-wrap {
  width: var(--container);
  margin-inline: auto;
  padding-bottom: clamp(56px, 8vw, 112px);
}

.dx-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 680px) 220px;
  column-gap: 40px;
  justify-content: space-between;
  align-items: start;
  padding-top: clamp(30px, 4vw, 52px);
}

.dx-nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.dx-nav-btn {
  display: none;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-button);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--body);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  user-select: none;
}

.dx-nav-btn svg,
.dx-toc-m > summary svg {
  width: 17px;
  height: 17px;
  flex: none;
  transition: transform var(--dur-micro) var(--flow);
}

.dx-nav-toggle:checked ~ .dx-nav-btn svg { transform: rotate(180deg); }
.dx-nav-toggle:focus-visible ~ .dx-nav-btn { outline: 2px solid var(--accent); outline-offset: 2px; }

.dx-side {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  align-content: start;
  gap: 2px;
  padding-right: 8px;
}

.dx-side-sec {
  margin: 26px 0 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.dx-side-sec:first-child { margin-top: 0; }
.dx-side-sec.on { color: var(--ink); }

.dx-side-link {
  display: block;
  padding: 6px 10px;
  margin-inline: -10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 22px;
  text-decoration: none;
  transition: color var(--dur-micro) var(--flow), background var(--dur-micro) var(--flow);
}

.dx-side-link:hover { color: var(--ink); background: var(--line-soft); }

.dx-side-link[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  background: color-mix(in srgb, var(--accent) 13%, transparent);
}

.dx-side-foot {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}

.dx-side-foot a {
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
}

.dx-side-foot a:hover { color: var(--ink); }

.dx-main { min-width: 0; }

.dx-crumb {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 18px;
  color: var(--muted);
}

.dx-crumb a { color: var(--muted); text-decoration: none; }
.dx-crumb a:hover { color: var(--ink); }

.dx-main h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(30px, 3.4vw, 36px);
  font-weight: 600;
  line-height: 44px;
  letter-spacing: -0.028em;
  color: var(--ink);
}

.dx-desc {
  margin: 12px 0 0;
  max-width: 62ch;
  font-size: 19px;
  line-height: 30px;
  color: var(--muted);
}

.dx-body { margin-top: clamp(30px, 4vw, 44px); }

.dx-body h2 {
  scroll-margin-top: 96px;
  margin: clamp(38px, 5vw, 52px) 0 0;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  letter-spacing: -0.024em;
  color: var(--ink);
}

.dx-body h2:first-child { margin-top: 0; }

.dx-body h3 {
  scroll-margin-top: 96px;
  margin: 32px 0 0;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: -0.018em;
  color: var(--ink);
}

.dx-anchor {
  font-family: var(--mono);
  font-size: 0.78em;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  margin-left: 8px;
  opacity: 0;
  transition: opacity var(--dur-micro) var(--flow);
}

.dx-body h2:hover .dx-anchor,
.dx-body h3:hover .dx-anchor,
.dx-anchor:focus-visible { opacity: 1; }
.dx-anchor:hover { color: var(--accent-text); }

.dx-body p {
  margin: 14px 0 0;
  max-width: 68ch;
  font-size: 17px;
  line-height: 27px;
  color: var(--muted);
}

.dx-body ul,
.dx-body ol {
  margin: 16px 0 0;
  padding-left: 22px;
  display: grid;
  gap: 10px;
}

.dx-body li {
  max-width: 68ch;
  font-size: 17px;
  line-height: 27px;
  color: var(--muted);
}

.dx-body li::marker { color: var(--edge); }
.dx-body ol > li::marker { color: var(--muted); font-variant-numeric: tabular-nums; }

.dx-body li > ul,
.dx-body li > ol { margin-top: 10px; }

.dx-body b,
.dx-body strong { color: var(--ink); font-weight: 600; }

.dx-body a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 1px;
}

.dx-body a:hover { color: var(--accent-text); }

.dx-body code {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink);
  background: var(--surface-2);
  border-radius: 5px;
  padding: 1px 5px;
}

.dx-body blockquote {
  margin: 22px 0 0;
  padding: 16px 18px;
  border-radius: var(--radius-tile);
  background: var(--surface-2);
}

.dx-body blockquote p { margin: 0; color: var(--ink); }
.dx-body blockquote p + p { margin-top: 10px; }

.dx-body .table-scroll { margin-top: 20px; overflow-x: auto; }

.dx-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 24px;
}

.dx-body th,
.dx-body td {
  padding: 11px 14px 11px 0;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  vertical-align: top;
}

.dx-body th {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--line);
  white-space: nowrap;
}

.dx-toc {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 2px;
}

.dx-toc-h {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.dx-toc a {
  display: block;
  padding: 5px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 22px;
  text-decoration: none;
}

.dx-toc a:hover { color: var(--ink); }
.dx-toc a[aria-current="true"] { color: var(--ink); font-weight: 600; }

.dx-toc-m { display: none; }

.dx-toc-m > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  cursor: pointer;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-button);
  background: var(--surface);
  font-family: var(--body);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

.dx-toc-m > summary::-webkit-details-marker { display: none; }
.dx-toc-m[open] > summary svg { transform: rotate(180deg); }

.dx-toc-m .dx-toc-m-in {
  display: grid;
  gap: 2px;
  padding: 12px 16px 4px;
}

.dx-toc-m a {
  color: var(--muted);
  font-size: 15px;
  line-height: 24px;
  text-decoration: none;
}

.dx-pn {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: clamp(48px, 6vw, 68px);
  padding-top: clamp(28px, 4vw, 38px);
  border-top: 1px solid var(--line);
}

.dx-pn a {
  display: grid;
  gap: 5px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-tile);
  background: var(--surface);
  text-decoration: none;
  transition: border-color var(--dur-micro) var(--flow);
}

.dx-pn a:hover { border-color: var(--edge); }
.dx-pn a.next { grid-column: 2; text-align: right; }

.dx-pn .k {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.dx-pn .t {
  font-size: 16px;
  line-height: 23px;
  font-weight: 600;
  color: var(--ink);
}

.dx-rel { margin-top: clamp(36px, 5vw, 48px); }

.dx-rel h2 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: -0.018em;
  color: var(--ink);
}

.dx-rel ul { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.dx-rel li { font-size: 16px; line-height: 24px; color: var(--muted); }
.dx-rel li::marker { color: var(--edge); }

.dx-rel a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 1px;
}

.dx-help {
  margin-top: clamp(36px, 5vw, 48px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  max-width: 68ch;
  font-size: 15px;
  line-height: 24px;
  color: var(--muted);
}

.dx-help a { color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 1.5px solid var(--accent); }
.dx-help b { color: var(--ink); font-weight: 600; }

.dx-hero { padding: clamp(44px, 7vw, 76px) 0 0; max-width: 720px; }
.dx-hero h1 { margin: 0; font-size: var(--h1-page); letter-spacing: var(--h1-track); line-height: var(--h1-lh); }
.dx-hero p { margin: 18px 0 0; max-width: 58ch; font-size: 1.05rem; line-height: 1.6; color: var(--muted); }

.dx-index {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  margin-top: 8px;
}

.dx-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 22px 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.dx-card h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  line-height: 27px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.dx-card > p { margin: 0; font-size: 15px; line-height: 23px; color: var(--muted); }
.dx-card ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }

.dx-card li a {
  color: var(--muted);
  font-size: 15px;
  line-height: 22px;
  text-decoration: none;
}

.dx-card li a:hover { color: var(--ink); }

@media (max-width: 1179px) {
  .dx-shell { grid-template-columns: 260px minmax(0, 1fr); }
  .dx-toc { display: none; }
  .dx-toc-m { display: block; margin-top: 26px; }
}

@media (max-width: 859px) {
  .dx-shell { grid-template-columns: 1fr; row-gap: 20px; padding-top: 22px; }
  .dx-nav-btn { display: flex; }
  .dx-side {
    display: none;
    position: static;
    max-height: none;
    overflow: visible;
    padding: 18px 0 4px;
    border-bottom: 1px solid var(--line);
  }
  .dx-nav-toggle:checked ~ .dx-side { display: grid; }
  .dx-side-sec { margin-top: 20px; }
  .dx-main h1 { line-height: 1.16; }
  .dx-desc { font-size: 17px; line-height: 27px; }
  .dx-pn { grid-template-columns: 1fr; }
  .dx-pn a.next { grid-column: 1; text-align: left; }
}
