/* Bytetally — the troubleshooting walkthrough (/en/diagnose/, /zh/diagnose/).
   Layered on seo.css, which owns the tokens. The branches are native <details>
   with a shared name attribute, so browsers that support exclusive accordions
   open one at a time and older ones simply allow several open at once. Either
   way the content is in the HTML and works with JavaScript disabled. */

.dx {
  margin: 22px 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}

.dx-branch + .dx-branch { border-top: 1px solid var(--border-2); }

.dx-branch > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  transition: background .15s ease;
}

.dx-branch > summary::-webkit-details-marker { display: none; }

.dx-branch > summary:hover { background: var(--bg-soft); }

.dx-branch > summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

/* The letter badge doubles as the affordance that these are choices. */
.dx-branch > summary b {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-soft, rgba(15,163,106,.12));
  color: var(--brand, #0FA36A);
  font-size: .84rem;
  font-weight: 700;
}

/* Chevron, rotated when open. Drawn in CSS so there is no icon asset to load. */
.dx-branch > summary::after {
  content: "";
  flex: none;
  margin-left: auto;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--ink-3, #8A857F);
  border-bottom: 2px solid var(--ink-3, #8A857F);
  transform: rotate(45deg);
  transition: transform .18s ease;
}

.dx-branch[open] > summary { background: var(--bg-soft); }
.dx-branch[open] > summary::after { transform: rotate(-135deg); }

.dx-body {
  padding: 2px 18px 18px 56px;
  color: var(--ink-2);
}

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

.dx-body ol {
  margin: 12px 0 0;
  padding-left: 20px;
}

.dx-body li { margin: 10px 0; line-height: 1.62; }

.dx-body li strong { color: var(--ink); }

@media (max-width: 560px) {
  .dx-body { padding-left: 18px; }
  .dx-branch > summary { padding: 14px 15px; gap: 10px; }
}
