:root {
  --theme-color: #64a7ff;
  --color-bg: #ffffff;
  --color-text: #1a1b21;
  --font-family: Inter, "PT Sans", system-ui, sans-serif;
  --font-weight: 400;
  --link-color: #64a7ff;
  --link-color-hover: #0657c1;
  --link-underline-color: transparent;
  --link-underline-color-hover: #0657c1;
  --link-underline-thickness: 1px;
  --blockquote-border-color: #64a7ff;
  --blockquote-bg: #eff0f4;
  --blockquote-color: #4a4d5c;
  --blockquote-padding: 1em 1.25em;
  --code-bg: #eff0f4;
  --code-color: #ee5622;
  --codeblock-bg: #eff0f4;
  --codeblock-color: #1a1b21;
  --sidebar-link-color-active: #64a7ff;
  --sidebar-name-color: #1a1b21;
  --content-max-width: 80%;
  -webkit-font-smoothing: antialiased;
}

body {
  color: #000;
}

.sidebar {
  color: #000;
}

.sidebar-nav li.active > a {
  position: relative;
  color: var(--theme-color);
}

.sidebar-nav li.active > a::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  background: var(--theme-color);
}

.markdown-section a {
  font-weight: 600;
  color: var(--link-color);
}

.markdown-section a:hover {
  color: var(--link-color-hover);
}

.markdown-section :not(pre) > code {
  background: var(--code-bg);
  color: var(--code-color);
}

.markdown-section blockquote {
  background: var(--blockquote-bg);
  border-left: 4px solid var(--blockquote-border-color);
  border-radius: 0;
}

.markdown-section th,
.markdown-section td {
  border: 1px solid #eee;
}

.markdown-section th {
  text-align: left;
}

.markdown-section tr:nth-child(2n) {
  background-color: transparent;
}

.markdown-section em {
  color: #7f8c8d;
}

.markdown-section pre[data-lang] {
  background: var(--codeblock-bg);
}

.markdown-section img {
  max-width: 100%;
  height: auto;
  display: block;
}

.portal-video {
  margin: 1.5em 0;
}

.portal-video video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  background: #000;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.portal-video figcaption {
  margin-top: 0.5em;
  font-size: 0.9em;
  opacity: 0.75;
}

/* Tags sit on the heading's line but stay outside the <h1>, so its anchor id and search title are unchanged.
   vertical-align: middle centres the margin box, so Docsify's heading margin-bottom would push the tags low. */
.markdown-section h1:has(+ .portal-tags) {
  display: inline-block;
  margin-right: 24px;
  margin-bottom: 0;
  vertical-align: middle;
}

.markdown-section .portal-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0;
  vertical-align: middle;
  /* middle lands on the cap height; nudge down to the heading's full ink height, descenders included */
  position: relative;
  top: 4px;
}

.portal-tag {
  display: inline-block;
  padding: 4px 12px;
  /* DXtrade brand green (#2BB673, img/trade_logo.svg); text is a darker shade for readable contrast */
  border: 1px solid rgba(43, 182, 115, 0.45);
  border-radius: 999px;
  background: rgba(43, 182, 115, 0.12);
  color: #146b42;
  font-size: 0.8em;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.callout.note {
  --callout-charm-size: 0;
  --callout-padding: 1em;
}