/* The existing editorial tokens are shared by every article. */
.okx-article :is(p, li, td, th, h1, h2, h3, figcaption, a, summary) {
  word-break: keep-all;
  overflow-wrap: break-word;
}
.okx-article :is(h1, h2, h3) {
  text-wrap: balance;
}
.okx-article :is(.keep, .table-item) {
  font-variant-numeric: tabular-nums;
}
.keep {
  white-space: nowrap;
}
.table-item {
  display: block;
}
.table-item + .table-item {
  margin-top: 8px;
}
.okx-article th,
.okx-article td {
  border: 1px solid var(--muted);
}
.okx-article thead th {
  border-bottom: 2px solid var(--ink);
  color: var(--text);
  font-size: 14px;
}
.okx-article table:not(:has(th:nth-child(3))) {
  min-width: 0;
}
.okx-article .sources {
  display: block;
  padding: 0;
  border: 0;
}
.sources details {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.sources summary,
.procedure-detail > summary,
.mobile-directory > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 56px;
  cursor: pointer;
  font-weight: 500;
  padding: 16px 0;
  list-style: none;
}
.sources summary::-webkit-details-marker,
.procedure-detail > summary::-webkit-details-marker,
.mobile-directory > summary::-webkit-details-marker {
  display: none;
}
.sources summary:hover,
.procedure-detail > summary:hover {
  color: var(--green);
}
.sources .source-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
}
.sources details > p {
  padding-bottom: 24px;
}
details[open] > summary > svg {
  transform: rotate(180deg);
}
.guide-hero-actions,
.guide-entry-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}
.button.secondary {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  min-height: 48px;
}
.button.secondary:hover {
  background: var(--soft);
  color: var(--ink);
}
.guided-reading {
  max-width: 1296px;
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.guided-reading > .article-body {
  width: 100%;
  padding-left: 0;
  padding-right: 0;
  min-width: 0;
}
.guide-directory {
  position: sticky;
  top: 104px;
  margin-top: 40px;
  padding-right: 24px;
  border-right: 1px solid var(--line);
  max-height: calc(100dvh - 128px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.guide-directory nav {
  display: grid;
  gap: 4px;
}
.guide-directory strong {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}
.guide-directory a {
  font-size: 13px;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 8px 0;
  text-decoration: none;
  color: var(--muted);
  line-height: 1.7;
}
.guide-directory a:hover,
.guide-directory a[aria-current="location"] {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 5px;
}
.mobile-directory {
  display: none;
}
.guide-answer h2 {
  font-size: 28px;
}
.guide-answer > p {
  margin-top: 24px;
}
.money-route {
  display: grid;
  grid-template-columns: 1fr auto 1.3fr auto 1.2fr;
  gap: 16px;
  align-items: center;
  padding: 24px;
  background: var(--soft);
  margin: 32px 0;
}
.money-route b,
.money-route div > span {
  display: block;
  line-height: 1.8;
}
.money-route b {
  font-weight: 600;
  font-size: 16px;
}
.money-route div > span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}
.walkthrough-step {
  scroll-margin-top: 112px;
}
.walkthrough-step h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 40px 0 20px;
  line-height: 1.65;
}
.walkthrough-step h3:first-child {
  margin-top: 0;
}
.walkthrough-step .chapter {
  color: var(--green);
}
.instruction-list {
  display: grid;
  gap: 16px;
  padding-left: 24px;
  margin: 24px 0;
  font-size: 16px;
  line-height: 1.9;
  max-width: 780px;
}
.instruction-list li {
  padding-left: 8px;
}
.instruction-list li::marker {
  font-weight: 600;
  color: var(--green);
}
.capture-sequence {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin: 32px 0 48px;
  align-items: start;
}
.capture-sequence[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 608px;
}
.capture-sequence[data-count="1"] {
  grid-template-columns: minmax(0, 280px);
}
.flow-capture {
  margin: 0;
  min-width: 0;
}
.capture-zoom {
  position: relative;
  display: block;
  max-width: 280px;
  color: var(--paper);
  background: var(--ink);
  border-radius: 6px;
  overflow: hidden;
}
.capture-zoom img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.zoom-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: 6px;
}
.zoom-hint svg {
  width: 16px;
  height: 16px;
}
.capture-zoom:hover .zoom-hint {
  background: var(--lime);
  color: var(--ink);
}
.flow-capture figcaption {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  line-height: 1.75;
  font-size: 13px;
}
.flow-capture figcaption strong {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.flow-capture figcaption span {
  color: var(--muted);
}
.capture-with-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: start;
  gap: 40px;
  margin: 40px 0;
}
.capture-with-copy h3 {
  margin-top: 0;
}
.capture-with-copy p + p {
  margin-top: 20px;
}
.capture-with-copy td,
.capture-with-copy th {
  padding: 14px 16px;
}
.capture-with-copy table {
  font-size: 14px;
}
.capture-with-copy tbody th {
  width: 45%;
}
.referral-instruction {
  margin: 40px 0;
  padding: 32px;
  background: var(--soft);
  border-left: 2px solid var(--ink);
}
.referral-instruction h3 {
  margin: 0 0 16px;
}
.referral-instruction p + p {
  margin-top: 16px;
}
.referral-instruction .button {
  margin-top: 24px;
}
.step-next {
  margin-top: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  font-weight: 500;
}
.procedure-detail {
  margin: 32px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.procedure-detail > p {
  margin: 16px 0 24px;
  max-width: 780px;
}
.procedure-detail > p + p {
  margin-top: 20px;
}
.capture-dialog {
  padding: 0;
  border: 0;
  border-radius: 6px;
  max-width: min(94vw, 900px);
  max-height: 94dvh;
  background: var(--paper);
  color: var(--text);
  overflow: auto;
}
.capture-dialog::backdrop {
  background: var(--ink);
  opacity: 0.85;
}
.capture-dialog-bar {
  position: sticky;
  top: 0;
  background: var(--paper);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 12px 20px;
  z-index: 1;
  border-bottom: 1px solid var(--line);
}
.capture-dialog-bar p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}
.capture-dialog-bar button {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 44px;
  background: var(--soft);
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.capture-dialog > img {
  display: block;
  width: min(768px, 90vw);
  height: auto;
  margin: auto;
}
.capture-open {
  overflow: hidden;
}
@media (max-width: 1199px) {
  .guided-reading {
    display: block;
    max-width: 1040px;
  }
  .guide-directory {
    display: none;
  }
  .mobile-directory {
    display: block;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--line);
  }
  .mobile-directory nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 24px;
    padding-bottom: 20px;
  }
  .mobile-directory nav a {
    padding: 10px 0;
    font-size: 14px;
    min-height: 44px;
  }
}
@media (max-width: 900px) {
  .capture-sequence {
    gap: 24px;
  }
  .capture-with-copy {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 32px;
  }
}
@media (max-width: 620px) {
  .guided-reading {
    padding-inline: 24px;
  }
  .guided-reading > .article-body {
    padding-top: 24px;
  }
  .guide-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .guide-entry-links {
    display: grid;
    gap: 12px;
  }
  .guide-hero-actions .button,
  .guide-entry-links .button {
    justify-content: space-between;
    width: 100%;
    font-size: 14px;
  }
  .mobile-directory nav {
    grid-template-columns: 1fr;
  }
  .money-route {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 24px;
  }
  .money-route > span {
    transform: rotate(90deg);
    width: 24px;
    text-align: center;
  }
  .capture-sequence,
  .capture-sequence[data-count="2"],
  .capture-sequence[data-count="1"] {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    max-width: none;
  }
  .capture-zoom {
    max-width: 280px;
    margin: auto;
  }
  .flow-capture figcaption {
    max-width: 280px;
    margin: 16px auto 0;
  }
  .capture-with-copy {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  .capture-with-copy > .flow-capture {
    width: 100%;
  }
  .walkthrough-step h3 {
    font-size: 19px;
    margin-top: 32px;
  }
  .walkthrough-step .chapter {
    font-size: 28px;
  }
  .guided-reading .article-body h2:has(.chapter) {
    gap: 16px;
    align-items: baseline;
  }
  .referral-instruction {
    padding: 24px;
  }
  .referral-instruction .button {
    font-size: 14px;
  }
  .sources .source-links {
    grid-template-columns: 1fr;
  }
  .okx-article table:not(:has(th:nth-child(3))) th,
  .okx-article table:not(:has(th:nth-child(3))) td {
    padding: 14px 12px;
  }
  .okx-article table:not(:has(th:nth-child(3))) tbody th {
    width: 42%;
  }
}
@media (max-width: 359px) {
  .guided-reading {
    padding-inline: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .guide-directory a,
  .capture-zoom .zoom-hint {
    transition: none;
  }
}
/* Align the title with the reading column, outside the separated directory. */
article:has(.guided-reading) .article-intro {
  max-width: 1296px;
  padding-left: 296px;
}
.guided-reading .article-body > .guide-answer {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
@media (max-width: 1199px) {
  article:has(.guided-reading) .article-intro {
    max-width: 1040px;
    padding-left: 40px;
  }
}
@media (max-width: 620px) {
  article:has(.guided-reading) .article-intro {
    padding-left: 24px;
  }
}
@media (max-width: 359px) {
  article:has(.guided-reading) .article-intro {
    padding-left: 20px;
  }
}
@media (min-width: 621px) and (max-width: 899px) {
  .capture-sequence {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
