/*
 * The Lotse design system (docs/brand, tokens.json) on top of mdBook.
 * Light and dark follow the tokens; the other mdBook themes are hidden.
 * Borders, not shadows; signal red only for the active item and the focus
 * ring; Schibsted Grotesk for text, IBM Plex Mono for code.
 */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Schibsted+Grotesk:wght@400;500;600;700;800&display=swap");

/* Tokens, as in docs/brand/tokens.css. */
.light, .rust {
  --surface: #F6F8F9;
  --surface-raised: #FFFFFF;
  --fog: #E3EAEF;
  --line: #D5DEE4;
  --ink: #0F2B3D;
  --ink-muted: #4F6575;
  --elbe: #0F2B3D;
  --on-elbe: #FFFFFF;
  --signal: #C8322B;
  --signal-soft: #FDF0EE;
  --brass: #8A6416;
  --warn: #9A6412;
  --rail: #0F2B3D;
  --rail-ink: #E8EFF3;
  --rail-muted: #9DB0BE;
  --rail-active: #FFFFFF;
  --rail-accent: #F0645A;
  --color-scheme: light;
}
.navy, .coal, .ayu {
  --surface: #0B1720;
  --surface-raised: #12212C;
  --fog: #1A2A36;
  --line: #263744;
  --ink: #E8EFF3;
  --ink-muted: #9DB0BE;
  --elbe: #2E5F80;
  --on-elbe: #E8EFF3;
  --signal: #F0645A;
  --signal-soft: #3A1513;
  --brass: #D9A84A;
  --warn: #E0A84A;
  --rail: #0B1720;
  --rail-ink: #E8EFF3;
  --rail-muted: #9DB0BE;
  --rail-active: #FFFFFF;
  --rail-accent: #F0645A;
  --color-scheme: dark;
}

/* mdBook's own variables, from the tokens. */
.light, .rust, .navy, .coal, .ayu {
  --bg: var(--surface);
  --fg: var(--ink);
  --sidebar-bg: var(--rail);
  --sidebar-fg: var(--rail-ink);
  --sidebar-non-existant: var(--rail-muted);
  --sidebar-active: var(--rail-active);
  --sidebar-spacer: rgba(255, 255, 255, 0.12);
  --scrollbar: var(--ink-muted);
  --icons: var(--ink-muted);
  --icons-hover: var(--ink);
  --links: var(--ink);
  --inline-code-color: var(--ink);
  --theme-popup-bg: var(--surface-raised);
  --theme-popup-border: var(--line);
  --theme-hover: var(--fog);
  --quote-bg: var(--fog);
  --quote-border: var(--line);
  --warning-border: var(--warn);
  --table-border-color: var(--line);
  --table-header-bg: var(--fog);
  --table-alternate-bg: var(--surface);
  --searchbar-border-color: var(--line);
  --searchbar-bg: var(--surface-raised);
  --searchbar-fg: var(--ink);
  --searchbar-shadow-color: transparent;
  --searchresults-header-fg: var(--ink-muted);
  --searchresults-border-color: var(--line);
  --searchresults-li-bg: var(--surface-raised);
  --search-mark-bg: var(--signal-soft);
  --content-max-width: 820px;
  --mono-font: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

/* Two themes: light and dark. */
#mdbook-theme-list li:has(#mdbook-theme-rust),
#mdbook-theme-list li:has(#mdbook-theme-coal),
#mdbook-theme-list li:has(#mdbook-theme-ayu) { display: none; }

html, body, button, input, select, textarea {
  font-family: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
}
body { font-size: 16px; line-height: 1.5; }
.content table, code, pre { font-variant-numeric: tabular-nums; }
code, pre, .hljs, kbd, samp { font-family: var(--mono-font); }
:not(pre) > code { font-size: 0.875em; font-weight: 500; background: var(--fog); border-radius: 4px; padding: 0.1em 0.35em; }

/* Headings: heavy, slightly tight. */
.content h1, .content h2, .content h3, .content h4 { font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.content h1 { font-weight: 800; font-size: 35px; letter-spacing: -0.02em; margin-top: 0; }
.content h2 { margin-top: 2.2em; padding-top: 0.6em; border-top: 1px solid var(--line); font-size: 24px; }
.content h1 + h2 { border-top: 0; padding-top: 0; }
.content a.header, .content a.header:link, .content a.header:visited { color: inherit; text-decoration: none; }

/* Links: ink, underlined in signal. */
.content a:link, .content a:visited {
  color: var(--links);
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.content a:hover { text-decoration-thickness: 2.5px; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 2px; }

/* The menu bar: raised, with a hairline. */
#mdbook-menu-bar { background: var(--surface-raised); border-block-end: 1px solid var(--line); }
#mdbook-menu-bar.bordered { border-block-end-color: var(--line); }
.menu-title { font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.icon-button { color: var(--icons); }
.icon-button:hover { color: var(--icons-hover); }
.theme-popup { border-radius: 8px; box-shadow: none; border: 1px solid var(--line); }

/* The rail: Elbe navy with the wordmark, as in the console. */
.sidebar { border-inline-end: 1px solid rgba(255, 255, 255, 0.06); }
.sidebar .sidebar-scrollbox::before {
  content: "";
  display: block;
  height: 36px;
  margin: 4px 0 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 194 64%22 width=%22194%22 height=%2264%22 role=%22img%22 aria-label=%22Lotse%22%3E%3Ctitle%3ELotse%3C/title%3E%3Cg transform=%22translate%280 0%29 scale%281.0%29%22%3E%3Cpath d=%22M14 0H32V64H14A14 14 0 0 1 0 50V14A14 14 0 0 1 14 0Z%22 fill=%22%230F2B3D%22%3E%3C/path%3E%3Cpath d=%22M32 0H50A14 14 0 0 1 64 14V50A14 14 0 0 1 50 64H32Z%22 fill=%22%23C8322B%22%3E%3C/path%3E%3Cg fill=%22%23FFFFFF%22 stroke=%22%23FFFFFF%22%3E%3Cpath d=%22M20 18C27 18 27 32 33 32M20 46C27 46 27 32 33 32M20 32H33%22 fill=%22none%22 stroke-width=%224%22 stroke-linecap=%22round%22%3E%3C/path%3E%3C/g%3E%3Cg fill=%22%23FFFFFF%22%3E%3Crect x=%228%22 y=%2214.5%22 width=%2214%22 height=%227%22 rx=%223.5%22%3E%3C/rect%3E%3Crect x=%228%22 y=%2228.5%22 width=%2214%22 height=%227%22 rx=%223.5%22%3E%3C/rect%3E%3Crect x=%228%22 y=%2242.5%22 width=%2214%22 height=%227%22 rx=%223.5%22%3E%3C/rect%3E%3Crect x=%2231%22 y=%2227.5%22 width=%2225%22 height=%229%22 rx=%224.5%22%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3Cg fill=%22%23E8EFF3%22 transform=%22translate%2880 47%29%22%3E%3Cpath transform=%22translate%280.00 0%29 scale%280.02083 -0.02083%29%22 d=%22M142.16009521484375 0V1440H450.95953369140625V261.1195068359375H1144.6396484375V0Z%22%3E%3C/path%3E%3Cpath transform=%22translate%2823.86 0%29 scale%280.02083 -0.02083%29%22 d=%22M625.08065933365 -26.239990234375Q461.9614285305814 -26.239990234375 337.47569975981844 45.66343369952377Q212.98997098905545 117.56685763342254 143.23503676405898 245.28342881671128Q73.4801025390625 373 73.4801025390625 540.2799987792969Q73.4801025390625 707.5599975585938 143.2248289353189 835.0974259460603Q212.96955533157526 962.6348543335268 337.4370670541251 1034.437422283951Q461.90457877667495 1106.239990234375 624.9999389648438 1106.239990234375Q788.7598876953125 1106.239990234375 913.1598510742188 1034.4599914550781Q1037.559814453125 962.6799926757812 1107.5997924804688 835.1961852612139Q1177.6397705078125 707.7123778466465 1177.6397705078125 540.0761901440263Q1177.6397705078125 372.44000244140625 1107.7127201649364 244.9025740539397Q1037.7856698220605 117.36514566647315 912.9927799793896 45.56257771604908Q788.1998901367188 -26.239990234375 625.08065933365 -26.239990234375ZM625.6295014375485 193.2796630859375Q737.1201171875 193.2796630859375 801.5402221679688 286.50164046377506Q865.9603271484375 379.7236178416126 865.9603271484375 540Q865.9603271484375 700.6001586914062 801.4706572538578 793.6602478027344Q736.980987359278 886.7203369140625 625.4903716093265 886.7203369140625Q513.999755859375 886.7203369140625 449.57965087890625 793.6602478027344Q385.1595458984375 700.6001586914062 385.1595458984375 540Q385.1595458984375 379.27984619140625 449.6492157930173 286.2797546386719Q514.138885687597 193.2796630859375 625.6295014375485 193.2796630859375Z%22%3E%3C/path%3E%3Cpath transform=%22translate%2849.06 0%29 scale%280.02083 -0.02083%29%22 d=%22M448.31976318359375 0Q327.760009765625 0 263.52008056640625 58.459930419921875Q199.2801513671875 116.91986083984375 199.2801513671875 226.71966552734375V861.600341796875H44.88006591796875V1080H199.2801513671875V1292.0000610351562L497.1995849609375 1363.8399047851562V1080H696.6396484375V861.600341796875H497.1995849609375V273.95965576171875Q497.1995849609375 240.6236572265625 506.6995849609375 229.51165771484375Q516.1995849609375 218.399658203125 547.1995849609375 218.399658203125H712.1995849609375V0Z%22%3E%3C/path%3E%3Cpath transform=%22translate%2864.42 0%29 scale%280.02083 -0.02083%29%22 d=%22M563.9198608398438 -26.239990234375Q441.8798828125 -26.239990234375 333.7799377441406 9.180023193359375Q225.67999267578125 44.60003662109375 152.0400390625 119.74005126953125Q78.40008544921875 194.88006591796875 57.9600830078125 315.320068359375L329.71966552734375 368.91998291015625Q339.0396728515625 277.75982666015625 394.6597595214844 231.43975830078125Q450.27984619140625 185.11968994140625 552.5198974609375 185.11968994140625Q651.5199584960938 185.11968994140625 699.7600402832031 224.47976684570312Q748.0001220703125 263.83984375 748.0001220703125 317.27996826171875Q748.0001220703125 363.76007080078125 710.3000793457031 398.04010009765625Q672.6000366210938 432.32012939453125 581.4800415039062 445.96014404296875L482.95989990234375 462.00018310546875Q425.47991943359375 470.88018798828125 359.7999572753906 486.64019775390625Q294.1199951171875 502.40020751953125 235.94003295898438 533.8402099609375Q177.76007080078125 565.2802124023438 141.10009765625 620.9201965332031Q104.44012451171875 676.5601806640625 104.44012451171875 765.0801391601562Q104.44012451171875 872.2001342773438 161.6201171875 948.3800964355469Q218.80010986328125 1024.56005859375 320.6600646972656 1065.4000244140625Q422.52001953125 1106.239990234375 554.2799072265625 1106.239990234375Q675.3198852539062 1106.239990234375 775.31982421875 1070.7999877929688Q875.3197631835938 1035.3599853515625 942.4797058105469 966.6799926757812Q1009.6396484375 898 1029.879638671875 796.8400268554688L758.0800170898438 740.8001098632812Q751.0800170898438 782.2001953125 731.4599914550781 818.240234375Q711.8399658203125 854.2802734375 672.0199279785156 876.540283203125Q632.1998901367188 898.80029296875 563.599853515625 898.80029296875Q486.83978271484375 898.80029296875 441.3996887207031 868.76025390625Q395.9595947265625 838.72021484375 395.9595947265625 787.1600952148438Q395.9595947265625 749.320068359375 421.5395812988281 725.0400390625Q447.11956787109375 700.760009765625 491.49957275390625 686.1399841308594Q535.8795776367188 671.5199584960938 591.9996337890625 661.5599365234375L704.2797241210938 642.5198974609375Q789.959716796875 628.8798828125 867.3996887207031 594.5398864746094Q944.8396606445312 560.1998901367188 993.7196350097656 496.159912109375Q1042.599609375 432.11993408203125 1042.599609375 327.8399658203125Q1042.599609375 213 980.1396484375 133.82000732421875Q917.6796875 54.6400146484375 809.4597473144531 14.20001220703125Q701.2398071289062 -26.239990234375 563.9198608398438 -26.239990234375Z%22%3E%3C/path%3E%3Cpath transform=%22translate%2886.80 0%29 scale%280.02083 -0.02083%29%22 d=%22M632.9198608398438 -26.239990234375Q474.43988037109375 -26.239990234375 347.93994140625 43.040008544921875Q221.44000244140625 112.32000732421875 147.56005859375 239.66000366210938Q73.68011474609375 367 73.68011474609375 541.239990234375Q73.68011474609375 714.239990234375 146.16006469726562 840.9599914550781Q218.6400146484375 967.6799926757812 344.4799499511719 1036.9599914550781Q470.31988525390625 1106.239990234375 630.9598388671875 1106.239990234375Q720.31982421875 1106.239990234375 811.8598022460938 1079.0199890136719Q903.3997802734375 1051.7999877929688 980.2197570800781 983.1799926757812Q1057.0397338867188 914.5599975585938 1103.8997192382812 792.3000183105469Q1150.7597045898438 670.0400390625 1150.7597045898438 480.40008544921875H265.1197509765625V649.9999389648438H885.480224609375L853.7201538085938 597.0798950195312Q845.920166015625 704.9200439453125 814.1601257324219 771.0401306152344Q782.4000854492188 837.1602172851562 733.1400146484375 867.26025390625Q683.8799438476562 897.3602905273438 622.9198608398438 897.3602905273438Q543.5997924804688 897.3602905273438 490.8397216796875 852.3402709960938Q438.07965087890625 807.3202514648438 411.7196044921875 726.8801879882812Q385.35955810546875 646.4401245117188 385.35955810546875 539.6799926757812Q385.35955810546875 379.6798095703125 445.7396545410156 286.7597351074219Q506.1197509765625 193.83966064453125 630.6798706054688 193.83966064453125Q712.239990234375 193.83966064453125 770.7800598144531 235.67971801757812Q829.3201293945312 277.519775390625 860.400146484375 363.599853515625L1130.1196899414062 294.71990966796875Q1091.6796875 183.3599853515625 1014.9197387695312 112.3800048828125Q938.1597900390625 41.4000244140625 838.579833984375 7.58001708984375Q738.9998779296875 -26.239990234375 632.9198608398438 -26.239990234375Z%22%3E%3C/path%3E%3C/g%3E%3C/svg%3E") no-repeat left center / contain;
}
.sidebar .part-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rail-muted);
  margin-top: 1.4em;
}
.chapter li a { border-radius: 4px; }
.chapter li.chapter-item { margin-block-start: 0.45em; }
.chapter li a.active { font-weight: 700; color: var(--rail-active); box-shadow: -3px 0 0 var(--rail-accent); padding-inline-start: 0.5em; margin-inline-start: -0.5em; }
.chapter li a:hover { color: var(--rail-active); }
.sidebar .sidebar-resize-handle .sidebar-resize-indicator { background-color: rgba(255, 255, 255, 0.2); }

/* Tables: label header on fog, hairlines. */
.content table { border-collapse: collapse; border: 1px solid var(--line); width: auto; max-width: 100%; }
.content table thead th {
  background: var(--fog);
  text-align: start;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border: 0;
  border-block-end: 1px solid var(--line);
}
.content table td, .content table th { border: 0; border-block-end: 1px solid var(--line); padding: 8px 12px; vertical-align: top; }
.content table tbody tr:nth-child(2n) { background: transparent; }
.content table tbody tr:last-child td { border-block-end: 0; }

/* Code blocks: raised, hairline, restrained corners. */
pre { border: 1px solid var(--line); border-radius: 8px; background: var(--surface-raised); box-shadow: none; }
pre > .hljs, .hljs { background: var(--surface-raised); color: var(--ink); font-size: 0.875em; }
pre > .buttons button { color: var(--icons); background: var(--surface-raised); border: 1px solid var(--line); border-radius: 4px; }

/* Quotes and notes: fog with a navy bar. */
blockquote { margin: 1.2em 0; padding: 0.4em 1em; background: var(--quote-bg); border: 0; border-inline-start: 3px solid var(--elbe); border-radius: 0 8px 8px 0; color: var(--ink); }

/* Screenshots: a hairline frame, not a shadow. */
.content img { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-raised); }
.content p > img:only-child { display: block; margin: 1.2em 0; }

/* Search. */
#mdbook-searchbar { border-radius: 8px; }
mark { background: var(--signal-soft); color: var(--ink); border-radius: 2px; }

/* Previous and next. */
.nav-chapters { color: var(--ink-muted); }
.nav-chapters:hover { color: var(--ink); }
