/* Ultra Sound sites. Dark only, no shadows, no client-side JS.
   Colours from the Ultra Sound Money design system:
   page #131827 · card #1b2236 · raised #2d344a · line dim #464b6f
   body #b5bddb · muted #8991ad · headings #ffffff */

@font-face{font-family:Inter;font-style:normal;font-weight:200;font-display:swap;src:url(fonts/inter-200.woff2) format("woff2")}
@font-face{font-family:Inter;font-style:normal;font-weight:300;font-display:swap;src:url(fonts/inter-300.woff2) format("woff2")}
@font-face{font-family:Inter;font-style:normal;font-weight:400;font-display:swap;src:url(fonts/inter-400.woff2) format("woff2")}
@font-face{font-family:"Roboto Mono";font-style:normal;font-weight:300;font-display:swap;src:url(fonts/roboto-mono-300.woff2) format("woff2")}
@font-face{font-family:"Roboto Mono";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/roboto-mono-400.woff2) format("woff2")}

:root{color-scheme:dark}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{margin:0;background:#131827;color:#b5bddb;font-family:Inter,system-ui,sans-serif;font-weight:300}
a{color:#b5bddb}
a:hover{color:#ffffff}
.sep{color:#464b6f}
:focus-visible{outline:1px solid #b5bddb;outline-offset:2px;border-radius:2px}

/* ---------- tree ---------- */
.tree{--h:16px;font-family:"Roboto Mono",monospace;font-size:13px;font-weight:300}
.tree.big{--h:22px;font-size:15px}
.tree ul{list-style:none;margin:0 0 0 6px;padding:0}
.tree li{position:relative;padding-left:20px}
.tree li::before{content:"";position:absolute;left:0;top:0;bottom:0;width:1px;background:#464b6f}
.tree li.last::before{bottom:auto;height:var(--h)}
.tree li::after{content:"";position:absolute;left:0;top:var(--h);width:12px;height:1px;background:#464b6f}
.tree li.p::before{background:#b5bddb}
/* Hard stop, no fade: bright down to the tick, dim below it. */
.tree li.pt::before{background:linear-gradient(#b5bddb 0 var(--h),#464b6f var(--h))}
.tree li.pt.last::before{background:#b5bddb}
.tree li.pt::after{background:#b5bddb}
.tree a,.tree .root{display:block;line-height:calc(var(--h) * 2);color:#8991ad;text-decoration:none;white-space:nowrap}
.tree a:hover{color:#ffffff;text-decoration:underline;text-underline-offset:3px}
.tree .anc{color:#ffffff;font-weight:400}
.tree a.cur{display:inline-block;color:#ffffff;font-weight:400;background:#2d344a;border-radius:4px;padding:0 8px;margin-left:-4px}

/* ---------- docs page ---------- */
.b{font-size:16px;line-height:1.65}
.b h1{font-weight:200;font-size:36px;line-height:1.15;color:#ffffff;margin:0 0 24px}
.b h2{font-weight:300;font-size:24px;line-height:1.3;color:#ffffff;margin:48px 0 12px}
.b h3{font-weight:400;font-size:17px;color:#ffffff;margin:32px 0 8px}
.b h4,.b h5,.b h6{font-weight:400;font-size:16px;color:#ffffff;margin:24px 0 8px}
.b h2,.b h3,.b h4{scroll-margin-top:24px}
.b p{margin:0 0 16px}
.b code{font-family:"Roboto Mono",monospace;font-size:14px;color:#ffffff;overflow-wrap:anywhere}
.b pre{margin:8px 0 20px;padding:20px 24px;background:#1b2236;border-radius:8px;overflow-x:auto;font-size:13.5px;line-height:1.6}
.b pre code{font-size:inherit;overflow-wrap:normal}
.b main ul,.b main ol{margin:0 0 16px;padding-left:20px}
.b main li{margin-bottom:6px}
.b main li>ul,.b main li>ol{margin:6px 0 0}
.b main ul.contains-task-list{list-style:none;padding-left:4px}
.b blockquote{margin:0 0 16px;padding:0 0 0 16px;border-left:1px solid #464b6f;color:#8991ad}
.b hr{border:0;border-top:1px solid #2d344a;margin:40px 0}
.b img{max-width:100%;height:auto}
.b strong{font-weight:400;color:#ffffff}

/* tables: the code-block card, mono for figures */
.b .tbl{margin:8px 0 20px;background:#1b2236;border-radius:8px;overflow-x:auto;overflow-wrap:normal}
.b table{border-collapse:collapse;width:100%;font-size:14.5px;line-height:1.5}
.b th,.b td{padding:10px 16px;text-align:left;vertical-align:top}
.b th{font-weight:400;color:#ffffff}
.b tr+tr td,.b thead+tbody tr td{border-top:1px solid #2d344a}
.b td.num{font-family:"Roboto Mono",monospace;font-size:13.5px;white-space:nowrap}

.b header{padding:20px 32px;border-bottom:1px solid #2d344a;font-family:"Roboto Mono",monospace;font-size:14px;color:#ffffff}
.b header a{color:#8991ad;text-decoration:none}
.b header a:hover{color:#ffffff;text-decoration:underline;text-underline-offset:3px}
.b .wrap{display:flex;gap:48px;max-width:1280px;margin:0 auto;padding:40px 32px 80px;box-sizing:border-box}
.b .side{flex:0 0 220px;min-width:0}
.b main{flex:1 1 auto;min-width:0;max-width:720px;overflow-wrap:anywhere}
.b .toc{flex:0 0 180px;position:sticky;top:24px;align-self:flex-start;max-height:calc(100vh - 48px);overflow-y:auto}
.b .toc .root{color:#8991ad}
/* Side columns wrap long names; the first line stays centred on its tick. */
.b .side a,.b .side .root,.b .toc a{white-space:normal;overflow-wrap:anywhere;line-height:18px;padding:7px 0}
.b .side a.cur{padding:7px 8px}

/* phone: the tree folds into a bar under the header */
.b .mnav{display:none;border-bottom:1px solid #2d344a}
.b .mnav summary{list-style:none;display:flex;justify-content:space-between;align-items:center;gap:16px;min-height:48px;padding:0 20px;cursor:pointer;font-family:"Roboto Mono",monospace;font-size:13px;color:#ffffff}
.b .mnav summary::-webkit-details-marker{display:none}
.b .mnav .ind{color:#8991ad}
.b .mnav .ind::after{content:" +"}
.b .mnav[open] .ind::after{content:" \2212"}
.b .mnav .tree{--h:20px;padding:4px 20px 20px}
.b .mnav .tree a{line-height:40px}

@media (max-width:1100px){.b .toc{display:none}}
@media (max-width:760px){
  .b .side{display:none}
  .b .mnav{display:block}
  .b .wrap{padding:28px 20px 64px}
  .b h1{font-size:30px}
  .b h2{font-size:22px;margin-top:40px}
  .b pre,.b .tbl{margin-left:-20px;margin-right:-20px;border-radius:0}
  .b pre{padding:16px 20px}
  .b header{padding:16px 20px}
}

/* ---------- cover page (and 404) ---------- */
.hm{box-sizing:border-box;min-height:100vh;padding:20px 32px 80px}
.hm header{font-family:"Roboto Mono",monospace;font-size:14px;color:#ffffff;max-width:1120px;margin:0 auto}
.hm header a{color:#ffffff;text-decoration:none}
.hm header a:hover{text-decoration:underline;text-underline-offset:3px}
.hm main{max-width:720px;margin:160px auto 0;display:flex;flex-direction:column;gap:40px}
.hm .intro{display:flex;flex-direction:column;gap:12px}
.hm h1{margin:0;font-weight:200;font-size:44px;line-height:1.1;color:#ffffff}
.hm .lead{margin:0;font-size:18px;line-height:1.6;color:#8991ad}
.hm .tree .root{color:#ffffff}
/* rows are 44px; hovering a row lights its branch */
.hm .tree li:hover::before,.hm .tree li:hover::after{background:#b5bddb}
.hm .tree a,.hm .tree .soon{display:flex;gap:24px;align-items:baseline;flex-wrap:wrap;line-height:1.4;min-height:44px;padding:11px 0;box-sizing:border-box;white-space:normal}
.hm .tree .n{color:#ffffff;min-width:200px}
.hm .tree .d{font-family:Inter,system-ui,sans-serif;font-size:15px;color:#8991ad}
.hm .tree a:hover .d{color:#b5bddb}
.hm .tree .soon .n{color:#8991ad}
.hm .tree .soon .d{font-style:italic}
.hm .ct{margin-top:40px;display:grid;grid-template-columns:max-content 1fr;column-gap:24px;font-family:"Roboto Mono",monospace;font-size:13px;line-height:1.4}
.hm .ct .k{color:#8991ad;padding:8px 0}
.hm .ct a{padding:8px 0;text-underline-offset:3px}
@media (max-width:760px){
  .hm main{margin-top:72px}
  .hm h1{font-size:36px}
  .hm .tree .n{min-width:0}
  .hm .tree a,.hm .tree .soon{gap:2px 24px}
  .hm .ct .k,.hm .ct a{padding:12px 0}
}
