/* Dapstrem Help Center - plain and quiet, sized like a classic docs site:
   Inter, 16px / 28px body text, 36px titles, 14px menu, hairline borders, one accent colour.
   Light by default, Dark on request. No shadows-heavy cards, no side bars. */

:root, :root[data-theme="light"], .dh-embed {
	--dh-accent: #ff2d87;
	--dh-accent-soft: rgba(255, 45, 135, .1);
	--dh-bg: #ffffff;
	--dh-text: #525252;
	--dh-strong: #1f1f1f;
	--dh-head: #101828;
	--dh-muted: #6b6b6b;
	--dh-faint: #858585;
	--dh-line: rgba(230, 230, 230, .7);
	--dh-ring: #ededed;
	--dh-card: rgba(0, 0, 0, .035);
	--dh-hover: rgba(0, 0, 0, .04);
	--dh-field: #ffffff;
	--dh-code: #f5f5f5;
	color-scheme: light;
}
:root[data-theme="dark"] {
	--dh-bg: #13161f;
	--dh-text: #a9adb6;
	--dh-strong: #ebecf1;
	--dh-head: #ebecf1;
	--dh-muted: #9c9ea1;
	--dh-faint: #7d7f82;
	--dh-line: rgba(255, 255, 255, .06);
	--dh-ring: rgba(255, 255, 255, .09);
	--dh-card: rgba(255, 255, 255, .035);
	--dh-hover: rgba(255, 255, 255, .05);
	--dh-field: rgba(255, 255, 255, .03);
	--dh-code: rgba(255, 255, 255, .06);
	color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body.dh { margin: 0; background: var(--dh-bg); color: var(--dh-text); font: 400 16px/24px Inter, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, sans-serif; -webkit-font-smoothing: antialiased; }
.dh a { color: inherit; text-decoration: none; }
.dh-ico { flex: none; display: inline-block; vertical-align: middle; }
.dh-skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 6px 12px; border-radius: 8px; background: var(--dh-strong); color: var(--dh-bg); font-size: 14px; }
.dh-skip:focus { left: 8px; }
.dh :focus-visible { outline: 2px solid var(--dh-accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Top bar ---------- */
/* The bar runs edge to edge; its contents line up with the 1488px page (1424px inside its 32px gutters). */
.dh-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 max(32px, calc((100% - 1424px) / 2)); background: var(--dh-bg); border-bottom: 1px solid var(--dh-line); }
.dh-brand { display: flex; align-items: center; flex: none; }
.dh-brand img { display: block; height: 28px; width: auto; }
.dh-brand__name { color: var(--dh-strong); font-size: 16px; font-weight: 600; }
.dh-nav { display: flex; gap: 2px; margin-left: 20px; }
.dh-nav a { padding: 4px 10px; border-radius: 8px; color: var(--dh-muted); font-size: 14px; font-weight: 500; line-height: 24px; }
.dh-nav a:hover { color: var(--dh-strong); background: var(--dh-hover); }
.dh-nav a.is-on { color: var(--dh-strong); }
.dh-top__end { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.dh-icon-btn, .dh-menu-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--dh-muted); cursor: pointer; }
.dh-icon-btn:hover, .dh-menu-btn:hover { color: var(--dh-strong); background: var(--dh-hover); }
.dh-icon-btn .dh-ico, .dh-menu-btn .dh-ico { width: 18px; height: 18px; }
.dh-menu-btn { display: none; margin-left: -8px; }
:root[data-theme="light"] .dh-show-dark, :root[data-theme="dark"] .dh-show-light { display: none; }
.dh-btn { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 8px; color: var(--dh-strong); font-size: 14px; font-weight: 500; line-height: 24px; white-space: nowrap; }
.dh-btn:hover { background: var(--dh-hover); }

/* ---------- Search ---------- */
.dh-search { position: relative; display: flex; align-items: center; }
.dh-search input { width: 100%; margin: 0; border: 0; border-radius: 12px; background: var(--dh-field); color: var(--dh-strong); font: inherit; outline: none; -webkit-appearance: none; appearance: none; box-shadow: 0 0 0 1px var(--dh-ring), 0 1px 1px 0 rgba(0, 0, 0, .02); }
.dh-search input::-webkit-search-cancel-button { display: none; }
.dh-search input::placeholder { color: var(--dh-faint); opacity: 1; }
.dh-search input:focus { box-shadow: 0 0 0 1px var(--dh-accent); }
.dh-search__ico { position: absolute; left: 14px; width: 17px; height: 17px; color: var(--dh-faint); pointer-events: none; }
.dh-search kbd { position: absolute; right: 10px; display: none; }
.dh-search--top { width: 220px; }
.dh-search--top input { height: 34px; padding: 0 10px 0 36px; border-radius: 8px; font-size: 14px; }
.dh-search--top .dh-search__ico { left: 11px; width: 15px; height: 15px; }
.dh-search--hero { margin-top: 28px; }
.dh-search--hero input { height: 48px; padding: 0 14px 0 40px; font-size: 15px; font-weight: 500; }
.dh-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60; max-height: 420px; overflow-y: auto; padding: 6px; border-radius: 12px; background: var(--dh-bg); box-shadow: 0 0 0 1px var(--dh-ring), 0 8px 24px rgba(0, 0, 0, .08); }
.dh-search--top .dh-results { left: auto; width: 380px; max-width: calc(100vw - 24px); }
.dh-results a { display: block; padding: 8px 10px; border-radius: 8px; }
.dh-results a.is-active, .dh-results a:hover { background: var(--dh-hover); }
.dh-results strong { display: block; color: var(--dh-strong); font-size: 14px; font-weight: 500; line-height: 20px; }
.dh-results small { display: block; color: var(--dh-faint); font-size: 13px; line-height: 19px; }
.dh-results em { display: block; color: var(--dh-faint); font-size: 12px; font-style: normal; line-height: 18px; }
.dh-results mark { background: none; color: var(--dh-accent); }
.dh-results__none { padding: 10px; color: var(--dh-faint); font-size: 14px; }
.dh-results__all { display: block; margin-top: 4px; padding: 8px 10px; border-top: 1px solid var(--dh-line); color: var(--dh-muted) !important; font-size: 13px; }
.dh-results__all:hover { color: var(--dh-strong) !important; }

/* ---------- Layout ---------- */
/* Page width: a centred 1488px block - 296px menu, then the text column (716px of text at most). */
.dh-shell { display: grid; grid-template-columns: 296px minmax(0, 1fr); max-width: 1488px; margin: 0 auto; padding: 0 32px; }
.dh-side { position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto; padding: 42px 32px 40px 0; scrollbar-width: thin; scrollbar-color: var(--dh-line) transparent; }
.dh-side__head { display: none; }
.dh-side__group + .dh-side__group { margin-top: 24px; }
.dh-side__topic { display: block; padding: 0 12px 0 16px; color: var(--dh-strong); font-size: 14px; font-weight: 600; line-height: 24px; }
a.dh-side__topic:hover { color: var(--dh-accent); }
.dh-side ul { list-style: none; margin: 4px 0 0; padding: 0; }
.dh-side li + li { margin-top: 2px; }
.dh-side li a { display: block; padding: 6px 12px 6px 16px; border-radius: 12px; color: var(--dh-text); font-size: 14px; line-height: 24px; }
.dh-side li a:hover { background: var(--dh-hover); color: var(--dh-strong); }
.dh-side li a.is-on { background: var(--dh-accent-soft); color: var(--dh-accent); }
.dh-scrim { display: none; }
.dh-main { min-width: 0; max-width: 764px; margin: 0 26px; padding: 44px 24px 96px; }

/* ---------- Home ---------- */
.dh-hero { padding: 0 0 40px; }
.dh-hero h1, .dh-hero h2 { margin: 0; color: var(--dh-strong); font-size: 36px; font-weight: 500; line-height: 1.08; letter-spacing: -.9px; }
.dh-hero p { margin: 12px 0 0; color: var(--dh-text); font-size: 16px; line-height: 24px; }
.dh-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dh-card { display: block; border-radius: 14px; background: var(--dh-card); transition: background .15s; }
.dh-card:hover { background: var(--dh-hover); }
.dh-card__head { display: block; padding: 16px 16px 8px; }
.dh-card__title { color: var(--dh-strong); font-size: 15px; font-weight: 500; line-height: 21px; }
.dh-card:hover .dh-card__title { color: var(--dh-accent); }
.dh-card__meta { display: block; padding: 12px 16px 16px; color: var(--dh-faint); font-size: 13px; line-height: 19.5px; }
.dh-card__meta b { color: var(--dh-text); font-weight: 500; }
.dh-empty { color: var(--dh-faint); }

/* ---------- Topic and search lists ---------- */
.dh-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--dh-line); }
.dh-list li { border-bottom: 1px solid var(--dh-line); }
.dh-list a { display: flex; align-items: center; gap: 12px; padding: 14px 4px; }
.dh-list a > span { flex: 1; min-width: 0; }
.dh-list strong { display: block; color: var(--dh-strong); font-size: 15px; font-weight: 500; line-height: 22px; }
.dh-list small { display: block; margin-top: 2px; color: var(--dh-faint); font-size: 14px; line-height: 20px; }
.dh-list a:hover strong { color: var(--dh-accent); }
.dh-list__go { width: 16px; height: 16px; color: var(--dh-faint); }
.dh--search .dh-search--hero { margin: 0 0 28px; }

/* ---------- Headings ---------- */
.dh-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; color: var(--dh-faint); font-size: 14px; line-height: 20px; }
.dh-crumbs .dh-ico { width: 14px; height: 14px; }
.dh-crumbs a { color: var(--dh-accent); font-weight: 600; }
.dh-eyebrow { display: inline-block; margin-bottom: 10px; color: var(--dh-accent) !important; font-size: 14px; font-weight: 600; line-height: 20px; }
.dh-head { margin-bottom: 32px; }
.dh-head h1 { margin: 0; color: var(--dh-strong); font-size: 36px; font-weight: 600; line-height: 40px; letter-spacing: -.9px; }
.dh-head p { margin: 8px 0 0; color: var(--dh-text); }

/* ---------- Article ---------- */
.dh-article-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.dh-article__title { margin: 0; color: var(--dh-strong); font-size: 36px; font-weight: 600; line-height: 40px; letter-spacing: -.9px; }
.dh-article__meta { margin: 12px 0 0; color: var(--dh-faint); font-size: 14px; line-height: 20px; }
.dh-content { margin: 32px 0 56px; color: var(--dh-text); font-size: 16px; line-height: 28px; overflow-wrap: anywhere; }
.dh-content > :first-child { margin-top: 0; }
.dh-content p { margin: 0 0 20px; }
.dh-content h2, .dh-content h3, .dh-content h4 { position: relative; color: var(--dh-head); font-weight: 600; }
.dh-content h2 { margin: 32px 0 16px; font-size: 24px; line-height: 32px; letter-spacing: -.36px; }
.dh-content h3 { margin: 28px 0 12px; font-size: 20px; line-height: 28px; }
.dh-content h4 { margin: 24px 0 8px; font-size: 16px; line-height: 24px; }
.dh-anchor { margin-left: 8px; color: var(--dh-faint); opacity: 0; }
.dh-anchor .dh-ico { width: 15px; height: 15px; }
.dh-content h2:hover .dh-anchor, .dh-content h3:hover .dh-anchor, .dh-anchor:focus { opacity: 1; }
.dh-content a { color: var(--dh-accent); }
.dh-content a:hover { text-decoration: underline; }
.dh-content strong, .dh-content b { color: var(--dh-strong); font-weight: 600; }
.dh-content ul, .dh-content ol { margin: 0 0 20px; padding-left: 26px; }
.dh-content li { margin: 8px 0; padding-left: 6px; }
.dh-content li::marker { color: var(--dh-faint); }
.dh-content img, .dh-content video { display: block; max-width: 100%; height: auto; border-radius: 8px; }
.dh-content figure { margin: 24px 0; }
.dh-content figcaption { margin-top: 8px; color: var(--dh-faint); font-size: 14px; text-align: center; }
.dh-content hr { margin: 32px 0; border: 0; border-top: 1px solid var(--dh-line); }
.dh-content code { padding: 2px 5px; border-radius: 4px; background: var(--dh-code); color: var(--dh-strong); font-size: 14px; }
.dh-content pre { overflow-x: auto; padding: 14px 16px; border-radius: 8px; background: var(--dh-code); font-size: 14px; line-height: 22px; }
.dh-content pre code { padding: 0; background: none; }
.dh-content table { width: 100%; margin: 0 0 24px; border-collapse: collapse; font-size: 15px; line-height: 24px; }
.dh-content th { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--dh-ring); color: var(--dh-strong); font-weight: 600; text-align: left; }
.dh-content td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--dh-line); vertical-align: top; }
/* Notes: a light tint, nothing more (and never a coloured side bar). */
.dh-note, .dh-tip, .dh-content blockquote { margin: 24px 0; padding: 14px 16px; border-radius: 10px; background: var(--dh-card); font-size: 15px; line-height: 26px; }
.dh-tip { background: var(--dh-accent-soft); }
.dh-content blockquote p:last-child { margin-bottom: 0; }

/* Feedback, previous / next, support */
.dh-feedback { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 20px 0; border-top: 1px solid var(--dh-line); color: var(--dh-muted); font-size: 14px; }
.dh-feedback__btns { display: flex; gap: 6px; }
.dh-feedback button { padding: 3px 12px; border: 0; border-radius: 8px; background: var(--dh-card); color: var(--dh-strong); font: inherit; font-size: 14px; font-weight: 500; line-height: 24px; cursor: pointer; }
.dh-feedback button:hover { background: var(--dh-hover); color: var(--dh-accent); }
.dh-feedback__done { color: var(--dh-muted); }
.dh-feedback.is-done .dh-feedback__btns { display: none; }
.dh-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 20px 0; border-top: 1px solid var(--dh-line); }
.dh-pager a { display: flex; flex-direction: column; gap: 2px; }
.dh-pager small { display: flex; align-items: center; gap: 4px; color: var(--dh-faint); font-size: 13px; line-height: 20px; }
.dh-pager small .dh-ico { width: 13px; height: 13px; }
.dh-pager strong { color: var(--dh-strong); font-size: 15px; font-weight: 500; line-height: 22px; }
.dh-pager a:hover strong { color: var(--dh-accent); }
.dh-pager__next { grid-column: 2; align-items: flex-end; text-align: right; }
.dh-support { margin: 0; padding: 20px 0 0; border-top: 1px solid var(--dh-line); color: var(--dh-muted); font-size: 14px; line-height: 20px; }
.dh-support a { color: var(--dh-accent); font-weight: 500; }
.dh-support a:hover { text-decoration: underline; }

/* On this page (wide screens) */
.dh-toc { display: none; }
.dh-toc__h { display: block; margin-bottom: 8px; color: var(--dh-strong); font-size: 14px; font-weight: 600; line-height: 24px; }
.dh-toc ul { list-style: none; margin: 0; padding: 0; }
.dh-toc a { display: block; padding: 3px 0; color: var(--dh-muted); font-size: 14px; line-height: 20px; }
.dh-toc a:hover, .dh-toc a.is-on { color: var(--dh-strong); }
.dh-toc__l3 a { padding-left: 12px; }

.dh-foot { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--dh-line); color: var(--dh-faint); font-size: 13px; }
.dh-foot a:hover { color: var(--dh-strong); }

/* ---------- Embedded ([dapstrem_help]) ---------- */
.dh-embed { color: var(--dh-text); font-family: Inter, -apple-system, "Segoe UI", Roboto, sans-serif; }

/* ---------- Screen sizes ---------- */
@media (max-width: 1100px) {
	.dh-main { margin: 0 0 0 16px; padding-right: 0; }
}
@media (max-width: 960px) {
	.dh-top { padding: 0 20px; }
	.dh-shell { grid-template-columns: minmax(0, 1fr); padding: 0 20px; }
	.dh-main { margin: 0; padding: 32px 0 64px; }
	.dh-menu-btn { display: inline-grid; }
	.dh-nav { display: none; }
	.dh-side { position: fixed; top: 0; left: 0; bottom: 0; z-index: 80; width: min(300px, 85vw); height: 100vh; padding: 14px 16px 40px; background: var(--dh-bg); border-right: 1px solid var(--dh-line); transform: translateX(-102%); transition: transform .2s ease; }
	.dh-side__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding-left: 16px; color: var(--dh-strong); font-size: 14px; font-weight: 600; }
	body.dh-side-open .dh-side { transform: none; }
	body.dh-side-open .dh-scrim { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .3); }
	.dh-main { padding-top: 40px; }
}
@media (max-width: 640px) {
	.dh-top { gap: 8px; padding: 0 16px; }
	.dh-shell { padding: 0 16px; }
	.dh-search--top { display: none; }
	.dh-brand img { height: 24px; }
	.dh-hero h1, .dh-hero h2, .dh-article__title, .dh-head h1 { font-size: 30px; line-height: 36px; }
	.dh-cards { grid-template-columns: minmax(0, 1fr); }
	.dh-pager { grid-template-columns: minmax(0, 1fr); }
	.dh-pager__next { grid-column: 1; align-items: flex-start; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
	.dh-side, .dh-card { transition: none; }
}
