/* Layered over site.css. Type and the lockup come from the SIMA home page (sima-site tokens.css; the fonts
   are in fonts.css) and are the same everywhere. Only colours differ: site.css's are the look of SIMA's help
   viewer, and head-meta.hbs puts .in-sima on <html> for pages opened from SIMA. Everything under
   html:not(.in-sima) is the home page's colours, light or dark. */
:root {
  --web-sans: "Lato", system-ui, sans-serif;
  --web-heading: "IBM Plex Sans", system-ui, sans-serif;
  --web-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
html:not(.in-sima) {
  --web-navy: #001524;
  --web-navy-deep: #000e17;
  --web-blue: #226da0;
  --web-blue-dark: #003c65;
  --web-blue-pale: #b1cee2;
  --web-green: #14b978;
  --web-line: rgba(255, 255, 255, 0.1);
}

body, .doc .source-toolbox, .doc .conum[data-value] { font-family: var(--web-sans); }
:is(code, kbd, pre, .doc pre) { font-family: var(--web-mono); }
.doc :is(h1, h2, h3, h4, h5, h6) { font-family: var(--web-heading); }
.doc > h1.page { font-weight: 500; letter-spacing: -0.01em; }

/* The home page's lockup instead of the SINTEF badge; kept to the 3.5rem bar */
.navbar-brand > .navbar-item:first-child > :not(.lockup) { display: none; }
.navbar-brand > .navbar-item:first-child > .lockup { display: inline-flex; flex-direction: column; gap: 3px; color: #fff; }
.lockup__name { font-size: 1.25rem; line-height: 1.1; font-weight: 700; letter-spacing: 0.02em; }
.lockup__docs { font-weight: 400; color: #c8dcec; }
.lockup__endorser { display: flex; align-items: center; gap: 5px; font-size: 0.72rem; line-height: 1.2; color: #c8dcec; white-space: nowrap; }
.lockup__endorser img { display: block; }
@media screen and (max-width: 768px) { .lockup__docs { display: none; } }
html:not(.in-sima) :is(.lockup__docs, .lockup__endorser) { color: var(--web-blue-pale); }

html:not(.in-sima) .navbar { background: var(--web-navy-deep); border-bottom: 1px solid var(--web-line); }
html:not(.in-sima) .doc :is(h1, h2, h3, h4, h5, h6) { color: var(--web-navy); }

html:not(.in-sima) .doc a { color: var(--web-blue); }
html:not(.in-sima) .doc a:hover { color: var(--web-blue-dark); }
html:not(.in-sima) .toc .toc-menu a:hover { color: var(--web-blue); }
html:not(.in-sima) .toc .toc-menu a.is-active { border-left-color: var(--web-green); }
html:not(.in-sima) .is-current-page > .nav-link { color: var(--web-blue-dark); font-weight: 700; }

html:not(.in-sima) .doc .admonitionblock.note .icon { background-color: var(--web-blue); }
html:not(.in-sima) .doc .admonitionblock.tip .icon { background-color: var(--web-green); }

html:not(.in-sima) footer.footer { background-color: var(--web-navy); color: var(--web-blue-pale); }
html:not(.in-sima) .footer a { color: #fff; }

/* Dark mode toggle in the header; SIMA's help viewer keeps its own look, so it never shows there */
.theme-toggle { display: none; }
html:not(.in-sima) .theme-toggle {
  display: flex; align-items: center; align-self: center; padding: 0.5rem;
  border: 0; background: none; color: var(--web-blue-pale); cursor: pointer;
}
html:not(.in-sima) .theme-toggle:hover { color: #fff; }
html:not(.in-sima) .theme-toggle svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }
html:not(.in-sima) .theme-toggle .sun, html.dark:not(.in-sima) .theme-toggle .moon { display: none; }
html.dark:not(.in-sima) .theme-toggle .sun { display: block; }

/* Dark mode: the home page's navy, with its blue and green for links and accents */
html.dark:not(.in-sima) {
  color-scheme: dark;
  --dk-bg: #001524;
  --dk-surface: #072235;
  --dk-surface-2: #0c2c44;
  --dk-line: rgba(255, 255, 255, 0.12);
  --dk-text: #dbe6ee;
  --dk-muted: #9fb3c3;
  --dk-link: #6ba2c7;
  --dk-green: #6fcf97;
}
html.dark:not(.in-sima) body { background: var(--dk-bg); color: var(--dk-text); }
html.dark:not(.in-sima) body ::-webkit-scrollbar-thumb { background-color: var(--dk-surface-2); }
html.dark:not(.in-sima) :is(.nav, .nav-panel-explore, .toolbar) { background: var(--dk-surface); color: var(--dk-muted); }
html.dark:not(.in-sima) :is(.nav-menu, .nav-menu a, .nav-menu h3.title, .nav-link, .nav-text) { color: var(--dk-text); }
html.dark:not(.in-sima) .nav-panel-explore .components { background: var(--dk-surface-2); }
html.dark:not(.in-sima) .page-versions .version-menu { background: var(--dk-surface-2); }
html.dark:not(.in-sima) :is(.toc-menu, .toc .toc-menu h3, .toc .toc-menu a.is-active, .toolbar .edit-this-page a) { color: var(--dk-muted); }
html.dark:not(.in-sima) .toc .toc-menu a { border-left-color: var(--dk-line); }
html.dark:not(.in-sima) .sidebar.toc .toc-menu a:focus { background: var(--dk-surface); }
html.dark:not(.in-sima) .is-current-page > .nav-link { color: #fff; }

html.dark:not(.in-sima) .doc { color: var(--dk-text); }
html.dark:not(.in-sima) .doc :is(h1, h2, h3, h4, h5, h6) { color: #fff; }
html.dark:not(.in-sima) .doc h2:not(.discrete) { border-bottom-color: var(--dk-line); }
html.dark:not(.in-sima) .doc h1.sect0 { background: var(--dk-surface-2); }
html.dark:not(.in-sima) :is(.doc a, .toc .toc-menu a:hover) { color: var(--dk-link); }
html.dark:not(.in-sima) .doc a:hover { color: var(--web-blue-pale); }
html.dark:not(.in-sima) .toc .toc-menu a.is-active { border-left-color: var(--dk-green); }
html.dark:not(.in-sima) :is(.doc .colist > table code, .doc p code, .doc thead code) { color: var(--dk-text); background: var(--dk-surface); }
html.dark:not(.in-sima) :is(.doc .listingblock pre:not(.highlight), .doc .literalblock pre, .doc pre.highlight code, .doc pre.highlight) { background: var(--dk-surface); color: var(--dk-text); }
html.dark:not(.in-sima) :is(.doc table.tableblock, .doc table.tableblock > * > tr > *, .doc hr, nav.pagination) { border-color: var(--dk-line); }
html.dark:not(.in-sima) :is(.doc table.stripes-all > tbody > tr, .doc table.stripes-even > tbody > tr:nth-of-type(2n), .doc table.stripes-odd > tbody > tr:nth-of-type(odd), .doc table.stripes-hover > tbody > tr:hover) { background: var(--dk-surface); }
html.dark:not(.in-sima) .doc table.tableblock > tfoot { background: var(--dk-surface-2); }
html.dark:not(.in-sima) .doc .admonitionblock td.content { background: var(--dk-surface); }
html.dark:not(.in-sima) .doc .admonitionblock.tip .icon { background-color: #14b978; }
html.dark:not(.in-sima) #preamble .abstract blockquote { background: var(--dk-surface-2); border-left-color: var(--dk-line); color: var(--dk-text); }
html.dark:not(.in-sima) :is(.doc .quoteblock, .doc .verseblock) { background: var(--dk-surface); border-left-color: var(--dk-muted); color: var(--dk-text); }
html.dark:not(.in-sima) :is(.doc .quoteblock .attribution, nav.pagination span::before, nav.pagination a::before, nav.pagination a::after) { color: var(--dk-muted); }
html.dark:not(.in-sima) :is(.doc .admonitionblock .title, .doc .exampleblock .title, .doc .imageblock .title, .doc .listingblock .title, .doc .literalblock .title, .doc .openblock .title, .doc .tableblock caption, .doc details.result > summary) { color: var(--dk-muted); }
html.dark:not(.in-sima) :is(.doc .exampleblock > .content, .doc details.result > .content) { background: var(--dk-bg); border-color: var(--dk-surface-2); }
html.dark:not(.in-sima) .doc .sidebarblock { background: var(--dk-surface-2); }
html.dark:not(.in-sima) .doc kbd { background: var(--dk-surface); border-color: var(--dk-line); }
/* The UI's icons are dark images */
html.dark:not(.in-sima) :is(.home-link, .nav-toggle, .nav-item-toggle, .page-versions .version-menu-toggle) { filter: invert(1) brightness(0.85); }
/* Screenshots are drawn on white; a frame keeps them from bleeding into the page */
html.dark:not(.in-sima) .doc .imageblock img { background: #fff; border-radius: 2px; }

html.dark:not(.in-sima) #search-input { background: var(--dk-surface); color: var(--dk-text); border-color: var(--dk-line); }
html.dark:not(.in-sima) :is(.search-result-dataset) { background: var(--dk-surface); border-color: var(--dk-line); }
html.dark:not(.in-sima) .search-result-document-title { color: #fff; border-right-color: var(--dk-line); }
html.dark:not(.in-sima) .search-result-document-hit { color: var(--dk-muted); }
html.dark:not(.in-sima) .search-result-highlight { color: var(--web-blue-pale); background: rgba(107, 162, 199, 0.15); }
html.dark:not(.in-sima) :is(.navbar-menu, .navbar-dropdown) { background: var(--dk-bg); border-color: var(--dk-line); }
html.dark:not(.in-sima) :is(.navbar-menu .navbar-link:hover, .navbar-menu a.navbar-item:hover, .navbar-dropdown a.navbar-item:hover) { background: var(--dk-surface); }
html.dark:not(.in-sima) footer.footer { background-color: var(--web-navy-deep); border-top-color: var(--dk-line); }

html.dark:not(.in-sima) :is(.hljs-comment, .hljs-quote, .hljs-meta) { color: #7f93a4; }
html.dark:not(.in-sima) :is(.hljs-keyword, .hljs-selector-tag, .hljs-subst) { color: #c9d6e2; }
html.dark:not(.in-sima) :is(.hljs-doctag, .hljs-string) { color: #e8a87c; }
html.dark:not(.in-sima) :is(.hljs-section, .hljs-selector-id, .hljs-title) { color: #f2918c; }
html.dark:not(.in-sima) :is(.hljs-class .hljs-title, .hljs-type) { color: #8fb6ff; }
html.dark:not(.in-sima) :is(.hljs-link, .hljs-regexp) { color: var(--dk-green); }
html.dark:not(.in-sima) :is(.hljs-bullet, .hljs-symbol) { color: #d99bd4; }
html.dark:not(.in-sima) :is(.hljs-built_in, .hljs-builtin-name) { color: #6fc6dd; }
html.dark:not(.in-sima) .hljs-deletion { background: rgba(255, 90, 90, 0.18); }
html.dark:not(.in-sima) .hljs-addition { background: rgba(90, 255, 140, 0.14); }
