:root {
  --bg: #080a0d;
  --surface: #0d1117;
  --surface-2: #111720;
  --line: #202a37;
  --text: #eff4fb;
  --muted: #98a4b4;
  --blue: #77b9f0;
  --danger: #ff597b;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font: 15px/1.75 var(--font); }
body::before { content: ""; pointer-events: none; position: fixed; inset: 0; z-index: -1; opacity: .24; background-image: radial-gradient(#46515f 0.65px, transparent .65px); background-size: 5px 5px; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue); }
button, input { font: inherit; }
.skip { position: fixed; z-index: 100; left: 16px; top: -60px; background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: 5px; }
.skip:focus { top: 16px; }

.family-shell { position: relative; z-index: 10; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 96%, transparent); backdrop-filter: blur(24px); }
.utility { min-height: 31px; border-bottom: 1px solid var(--line); font: 11px/1 var(--mono); color: var(--muted); }
.utility-wrap, .header-wrap { width: min(100%, 2040px); margin: 0 auto; padding-inline: clamp(20px, 5vw, 110px); }
.utility-wrap { display: flex; min-height: 31px; justify-content: space-between; align-items: stretch; gap: 24px; }
.product-switch, .social-links { display: flex; align-items: stretch; gap: 0; white-space: nowrap; }
.product-switch a { position: relative; display: flex; align-items: center; gap: 6px; padding: 0 18px 0 0; margin-right: 18px; color: var(--muted); }
.product-switch a span { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.product-switch a small { font: inherit; color: #748092; }
.product-switch a[aria-current="page"] { color: var(--text); }
.product-switch a[aria-current="page"]::after { content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--blue); }
.social-links { gap: 22px; }
.social-links a { display: flex; align-items: center; font-size: 10px; }
.header-wrap { height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; min-width: 0; gap: 10px; }
.brand img { width: 235px; height: auto; display: block; }
.logo-light { display: none !important; }
.brand > span { border-left: 1px solid var(--line); color: var(--muted); font: 13px var(--mono); padding-left: 16px; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.search-trigger { display: inline-flex; align-items: center; gap: 11px; min-width: 260px; border: 1px solid #334155; border-radius: 10px; padding: 10px 12px; color: var(--muted); background: #080c11; text-align: left; cursor: pointer; }
.search-trigger:first-letter { font-size: 22px; color: var(--text); }
kbd { margin-left: auto; border-radius: 5px; padding: 2px 6px; background: #1b2430; color: #c8d2df; font: 11px var(--mono); }
.theme-toggle { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 16px; padding: 7px; }
.language-pop { position: relative; }
.language-pop > summary { display: flex; align-items: center; gap: 6px; padding: 7px; color: var(--muted); cursor: pointer; font: 12px var(--mono); }
.language-pop > summary strong { color: var(--text); font-weight: 500; }
.language-panel { position: absolute; z-index: 30; top: calc(100% + 12px); right: 0; width: 226px; padding: 8px; border: 1px solid #344253; border-radius: 9px; background: #0b1017; box-shadow: 0 20px 52px #0009; }
.language-panel p { margin: 5px 8px 8px; color: var(--muted); font: 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.language-panel a { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px; border-radius: 5px; color: var(--text); font-size: 13px; }
.language-panel a:hover, .language-panel a[aria-current="page"] { color: var(--text); background: #18212d; }
.language-panel a small { color: var(--muted); font: 10px var(--mono); }

.wiki-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr) 250px; min-height: calc(100vh - 112px); }
.sidebar { border-right: 1px solid var(--line); padding: 27px 24px 44px clamp(20px, 3vw, 54px); }
details summary { cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }
.wallet-root > summary { display: flex; justify-content: space-between; gap: 12px; padding: 0 0 11px; font-size: 15px; font-weight: 700; }
.wallet-root { border-left: 1px solid #3b4759; padding-left: 13px; }
.wiki-group { margin: 1px 0; }
.wiki-group > summary { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; font-size: 14px; font-weight: 650; }
.wiki-group > summary > span { color: var(--muted); font-size: 19px; transition: transform .16s ease; }
.wiki-group[open] > summary > span { transform: rotate(90deg); }
.wiki-group ul { list-style: none; margin: 0 0 8px; padding: 0 0 0 12px; border-left: 1px solid #2a3442; }
.wiki-group li { margin: 0; }
.wiki-group li a { display: block; padding: 4px 0; color: var(--muted); font-size: 13px; line-height: 1.35; }
.wiki-group li a[aria-current="page"] { color: var(--text); }

.article { min-width: 0; padding: 58px clamp(40px, 6vw, 110px) 92px; max-width: 1010px; }
.article-head { max-width: 760px; margin-bottom: 41px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.eyebrow, .data-label { margin: 0 0 12px; color: #7f9ab7; font: 10px/1.3 var(--mono); letter-spacing: .11em; text-transform: uppercase; }
.article-head h1 { margin: 0; font-size: clamp(38px, 4vw, 60px); letter-spacing: -.055em; line-height: 1.06; font-weight: 600; }
.article-head > p:last-child { max-width: 690px; margin: 19px 0 0; color: var(--muted); font-size: 17px; line-height: 1.6; }
.prose { max-width: 760px; color: #d9e1ec; font-size: 16px; }
.prose p { margin: 0 0 21px; }
.prose h2, .prose h3 { position: relative; margin: 54px 0 18px; padding-top: 9px; color: var(--text); letter-spacing: -.035em; line-height: 1.18; }
.prose h2 { font-size: 29px; border-top: 1px solid var(--line); }
.prose h3 { font-size: 21px; }
.prose h2:first-child { margin-top: 0; }
.anchor { opacity: 0; margin-left: 8px; color: var(--blue); font: 14px var(--mono); vertical-align: middle; }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; }
.prose a { color: #9ecdf5; text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); }
.prose code { padding: 2px 5px; border-radius: 4px; color: #e5edf5; background: #17202b; font: .88em var(--mono); }
.prose pre { overflow: auto; margin: 26px 0; padding: 18px; border: 1px solid #263241; border-radius: 8px; background: #0c1118; }
.prose pre code { padding: 0; background: none; white-space: pre; }
.prose ul, .prose ol { margin: 0 0 22px; padding-left: 22px; }
.prose li { padding-left: 3px; margin: 8px 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 42px 0; }
.table-scroll { max-width: 100%; overflow: auto; margin: 25px 0; border: 1px solid #263241; border-radius: 8px; }
table { width: 100%; min-width: 600px; border-collapse: collapse; text-align: left; font-size: 13px; }
th { color: #cbd6e2; background: #121923; font: 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
th, td { padding: 13px 14px; border-bottom: 1px solid #263241; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.admonition { margin: 28px 0; padding: 16px 18px; border: 1px solid #344153; border-left: 3px solid var(--blue); border-radius: 8px; background: #0e141d; }
.admonition > strong { display: block; margin-bottom: 7px; color: var(--text); }
.admonition p:last-child { margin-bottom: 0; }
.admonition.danger { border-left-color: var(--danger); }
.admonition.caution { border-left-color: #e6b45e; }

.data-card { margin: 30px 0; border: 1px solid #2b3848; border-radius: 9px; overflow: hidden; background: linear-gradient(135deg, #101721, #0d1219); }
.data-card > header, .data-card > .data-label, .data-card > .data-body, .data-card > .data-links { margin: 0; padding: 14px 16px; }
.data-card > header { display: flex; justify-content: space-between; border-bottom: 1px solid #2b3848; }
.data-card > .data-label { border-bottom: 1px solid #2b3848; }
.data-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.data-grid > div { min-height: 108px; padding: 17px; border-right: 1px solid #2b3848; }
.data-grid > div:last-child { border-right: 0; }
.data-grid dt { margin-bottom: 7px; color: var(--muted); font: 10px var(--mono); text-transform: uppercase; }
.data-grid dd { margin: 0 0 5px; color: var(--text); }
.data-grid dd:last-child { color: var(--muted); font-size: 13px; }
.data-links { padding-left: 34px !important; }
.data-links li { margin: 8px 0; }
.data-note { margin: 0 !important; padding: 0 16px 16px; color: var(--muted); font-size: 13px; }
.badge { display: inline-block; padding: 2px 6px; border: 1px solid #445264; border-radius: 99px; color: var(--muted); font: 10px var(--mono); }

.toc { align-self: start; position: sticky; top: 20px; margin-top: 72px; padding: 0 30px 0 26px; border-left: 1px solid var(--line); }
.toc p { margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); color: var(--text); font-weight: 650; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 7px 0; }
.toc li.depth-3 { padding-left: 12px; }
.toc a { color: var(--muted); font-size: 13px; line-height: 1.35; }

.footer { border-top: 1px solid var(--line); background: #090d12; }
.footer > div { width: min(100%, 2040px); margin: 0 auto; padding: 34px clamp(20px, 5vw, 110px) 28px; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.footer-brand img { width: 194px; height: auto; }
.footer-brand span { border-left: 1px solid var(--line); padding-left: 11px; color: var(--muted); font: 12px var(--mono); }
.footer nav { display: flex; gap: 28px; margin: 26px 0 31px; }
.footer nav a, .footer-meta { color: var(--muted); font-size: 13px; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 18px; padding-top: 18px; border-top: 1px solid var(--line); font: 11px var(--mono); }

.search-dialog { width: min(720px, calc(100vw - 30px)); border: 1px solid #344253; border-radius: 12px; padding: 0; color: var(--text); background: #0b1017; box-shadow: 0 30px 90px #000b; }
.search-dialog::backdrop { background: #020508b8; backdrop-filter: blur(3px); }
.search-dialog form { padding: 18px; }
.search-dialog label { display: block; color: var(--muted); font: 11px var(--mono); text-transform: uppercase; }
.search-dialog input { width: 100%; margin-top: 8px; padding: 13px; border: 1px solid #364456; border-radius: 8px; background: #0b1118; color: var(--text); }
.search-close { float: right; border: 0; background: transparent; color: var(--muted); font-size: 23px; cursor: pointer; }
[data-search-results] { max-height: 55vh; overflow: auto; margin-top: 12px; }
.search-result { display: block; padding: 12px; border-top: 1px solid #263241; }
.search-result strong { display: block; color: var(--text); }
.search-result span { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.4; }

html[data-theme="light"] { --bg: #f7f9fc; --surface: #ffffff; --surface-2: #eef2f6; --line: #d6dee8; --text: #111924; --muted: #59687a; --blue: #237bc2; --danger: #c51e50; }
html[data-theme="light"] body::before { opacity: .14; }
html[data-theme="light"] .family-shell, html[data-theme="light"] .footer { background: #f9fbfe; }
html[data-theme="light"] .search-trigger, html[data-theme="light"] .search-dialog, html[data-theme="light"] .prose pre { background: #fff; }
html[data-theme="light"] .logo-dark { display: none !important; }
html[data-theme="light"] .logo-light { display: block !important; }
html[data-theme="light"] .language-panel { background: #fff; box-shadow: 0 20px 52px #2234; }
html[dir="rtl"] .language-panel { right: auto; left: 0; }
html[dir="rtl"] .wallet-root { border-left: 0; border-right: 1px solid #3b4759; padding-left: 0; padding-right: 13px; }
html[dir="rtl"] .wiki-group ul { border-left: 0; border-right: 1px solid #2a3442; padding-left: 0; padding-right: 12px; }
html[dir="rtl"] .sidebar { border-right: 0; border-left: 1px solid var(--line); }
html[dir="rtl"] .toc { border-left: 0; border-right: 1px solid var(--line); }
html[dir="rtl"] .toc li.depth-3 { padding-left: 0; padding-right: 12px; }

@media (max-width: 1180px) {
  .wiki-layout { grid-template-columns: 260px minmax(0, 1fr); }
  .toc { display: none; }
  .sidebar { padding-left: 24px; }
}
@media (max-width: 900px) {
  .utility-wrap { overflow: auto; }
  .social-links { display: none; }
  .header-wrap { height: 68px; }
  .brand img { width: 190px; }
  .search-trigger { min-width: auto; padding: 8px 10px; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .wiki-layout { display: block; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding: 19px 25px; }
  .wallet-root { max-width: none; }
  .wiki-group { display: inline-block; vertical-align: top; width: min(48%, 280px); margin-right: 14px; }
  .article { padding: 42px 25px 66px; }
}
@media (max-width: 560px) {
  .product-switch a { padding-right: 10px; margin-right: 10px; font-size: 10px; }
  .product-switch a small { display: none; }
  .header-actions { gap: 6px; }
  .brand > span { padding-left: 8px; font-size: 10px; }
  .brand img { width: 155px; }
  .article-head h1 { font-size: 37px; }
  .article-head > p:last-child { font-size: 15px; }
  .prose { font-size: 15px; }
  .prose h2 { font-size: 26px; }
  .data-grid { grid-template-columns: 1fr; }
  .data-grid > div { min-height: auto; border-right: 0; border-bottom: 1px solid #2b3848; }
  .data-grid > div:last-child { border-bottom: 0; }
  .wiki-group { display: block; width: 100%; margin-right: 0; }
  .footer nav { flex-wrap: wrap; gap: 12px 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

/* QuiNVarium Wallet screens under the steps: two per row, iPhone 17 proportions, the screen's own corner radius */
.qs-screens{display:flex;flex-wrap:wrap;gap:28px;margin:22px 0 34px}
.qs-screens figure{margin:0;width:min(248px,calc(50% - 14px))}
.qs-screens img{display:block;width:100%;height:auto;aspect-ratio:1206/2622;border-radius:13.6%/6.3%;border:1px solid var(--line);background:#0b0c0e;box-shadow:0 16px 40px rgba(0,0,0,.28)}
.qs-screens figcaption{display:flex;gap:10px;align-items:baseline;margin-top:12px;font-size:14px;line-height:1.35;color:var(--muted)}
.qs-screens figcaption b{font:500 12px/1 var(--mono);color:var(--blue)}
.prose ol+.qs-screens{margin-top:18px}
@media(max-width:560px){.qs-screens{gap:14px}.qs-screens figure{width:calc(50% - 7px)}.qs-screens figcaption{font-size:13px}}
