/* Generated by `reedc doc`. Edit the generator, not this file. */

:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #6a6a6a;
  --rule: #d8d8d8;
  --sidebar-bg: #f4f4f2;
  --code-bg: #f6f6f4;
  --link: #17457a;
  --link-hover: #0d2b4e;
  --badge-bg: #e6e8ea;
  --badge-fg: #3a3a3a;
  --warn-bg: #fdf3e3;
  --warn-rule: #d9a441;
  --warn-fg: #6b4a12;
  --sidebar-width: 17rem;

  /* Syntax colours. Chosen for contrast against --code-bg rather than for vividness: a
     reference page is read for a long time, and a saturated palette is tiring. */
  --syn-kw: #8250a8;
  --syn-type: #1b6b6b;
  --syn-num: #a04a00;
  --syn-str: #1a6b2a;
  --syn-comment: #6a737d;
  --syn-punct: #57606a;
  --mark-bg: #fdf0a8;
  --mark-fg: #1a1a1a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181a;
    --fg: #e6e6e6;
    --muted: #9aa0a6;
    --rule: #33383d;
    --sidebar-bg: #1d2023;
    --code-bg: #202427;
    --link: #7db3ea;
    --link-hover: #a8cdf3;
    --badge-bg: #2c3136;
    --badge-fg: #c8ccd0;
    --warn-bg: #2e2617;
    --warn-rule: #b6862f;
    --warn-fg: #e8cf9c;

    --syn-kw: #c39ae8;
    --syn-type: #6fc3c3;
    --syn-num: #e0a06a;
    --syn-str: #86d19a;
    --syn-comment: #8b949e;
    --syn-punct: #9aa0a6;
    --mark-bg: #6b5a1f;
    --mark-fg: #f5f0dd;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

code, pre, .signature, .entry-name {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

/* ---- layout ---------------------------------------------------------- */

.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--rule);
  padding: 1.5rem 1.25rem 3rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar h1 {
  font-size: 1.05rem;
  margin: 0 0 1.25rem;
  line-height: 1.3;
}

.sidebar h2 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 1.5rem 0 0.4rem;
}

.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { margin: 0.15rem 0; }
.sidebar a { display: block; padding: 0.1rem 0; font-size: 0.9rem; }
.sidebar .current > a { font-weight: 600; }
.sidebar ul ul { margin-left: 0.75rem; }
.sidebar ul ul a { font-size: 0.85rem; color: var(--muted); }
.sidebar ul ul a:hover { color: var(--link-hover); }

.content {
  flex: 1 1 auto;
  min-width: 0;
  padding: 2.5rem 3rem 6rem;
  max-width: 60rem;
}

/* A single-column stack once the sidebar would crowd the text. */
@media (max-width: 60rem) {
  .layout { display: block; }
  .sidebar { width: auto; height: auto; position: static; border-right: 0; border-bottom: 1px solid var(--rule); }
  .content { padding: 1.5rem 1.25rem 4rem; }
}

/* ---- headings -------------------------------------------------------- */

h1.page-title { font-size: 1.9rem; margin: 0 0 0.35rem; }
.subtitle { color: var(--muted); margin: 0 0 2rem; font-size: 0.95rem; }
.subtitle code { font-size: 0.9em; }

h2.section-title {
  font-size: 1.3rem;
  margin: 2.75rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--rule);
}

/* ---- summary table --------------------------------------------------- */

table.summary {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem;
  font-size: 0.94rem;
}

table.summary td {
  border-top: 1px solid var(--rule);
  padding: 0.5rem 0.75rem 0.5rem 0;
  vertical-align: top;
}

table.summary td.name { width: 32%; white-space: nowrap; }
table.summary td.name a { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
table.summary td.desc { color: var(--fg); }

/* ---- entries --------------------------------------------------------- */

.entry {
  margin: 0 0 2rem;
  padding-top: 0.5rem;
  /* An anchored jump must not hide the name under a sticky header. */
  scroll-margin-top: 1rem;
}

.entry-header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; }
.entry-name { font-size: 1.05rem; font-weight: 600; margin: 0; }
.entry-name a.anchor { color: var(--muted); font-weight: 400; opacity: 0; }
.entry:hover .entry-name a.anchor { opacity: 1; }

.badge {
  background: var(--badge-bg);
  color: var(--badge-fg);
  border-radius: 3px;
  padding: 0.08rem 0.4rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge.deprecated { background: var(--warn-rule); color: #1a1a1a; }

pre.signature {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.6rem 0.8rem;
  margin: 0.6rem 0 0.8rem;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.45;
}

.doc { margin: 0 0 0.8rem; }
.doc p { margin: 0 0 0.6rem; }
.doc code { background: var(--code-bg); border-radius: 3px; padding: 0.05em 0.3em; font-size: 0.9em; }
.doc pre { background: var(--code-bg); border: 1px solid var(--rule); border-radius: 4px; padding: 0.6rem 0.8rem; overflow-x: auto; }
.doc pre code { background: none; padding: 0; }
/* A fenced block's language class. Reed fences are token-highlighted by the generator,
   so this only needs to set the block's own text colour; the `tok-*` rules below do the
   rest. A fence in another language keeps this styling and stays monochrome, which is
   honest -- this generator knows one language. */
.doc pre code[class^="language-"] { color: var(--fg); }

.undocumented { color: var(--muted); font-style: italic; margin: 0 0 0.8rem; }

.deprecation {
  background: var(--warn-bg);
  border-left: 3px solid var(--warn-rule);
  color: var(--warn-fg);
  padding: 0.55rem 0.8rem;
  margin: 0 0 0.8rem;
  border-radius: 0 3px 3px 0;
  font-size: 0.94rem;
}

dl.tags { margin: 0 0 0.8rem; font-size: 0.94rem; }
dl.tags dt { font-weight: 600; color: var(--muted); margin-top: 0.5rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
dl.tags dd { margin: 0.2rem 0 0; }
dl.tags .param-name { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 600; }

.source-link { color: var(--muted); font-size: 0.82rem; }

/* ---- index ----------------------------------------------------------- */

.index-list { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 2.5rem; }
.index-list li { break-inside: avoid; margin: 0.2rem 0; font-size: 0.94rem; }
.index-list .where { color: var(--muted); font-size: 0.85em; }
@media (max-width: 40rem) { .index-list { columns: 1; } }

/* ---- syntax highlighting ---------------------------------------------- */

/* Emitted by docgen::highlight, from the compiler's own lexer. A token kind with no rule
   here simply inherits the surrounding colour, so an unstyled class is a missing rule
   rather than a broken page. */
.tok-kw      { color: var(--syn-kw); font-weight: 600; }
.tok-type    { color: var(--syn-type); }
.tok-num     { color: var(--syn-num); }
.tok-str     { color: var(--syn-str); }
.tok-comment { color: var(--syn-comment); font-style: italic; }
.tok-punct   { color: var(--syn-punct); }

/* An identifier deliberately has no colour: in a signature almost every token is one, and
   colouring them all leaves nothing for the eye to pick out. */
.tok-ident   { color: inherit; }

/* ---- source view ------------------------------------------------------ */

details.source { margin: 0 0 0.9rem; }

details.source > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0;
  /* The default triangle is inconsistent across browsers; one is drawn below instead. */
  list-style: none;
  user-select: none;
}
details.source > summary::-webkit-details-marker { display: none; }
details.source > summary::before {
  content: "\25B8";
  display: inline-block;
  width: 1em;
  transition: transform 0.12s ease;
}
details.source[open] > summary::before { transform: rotate(90deg); }
details.source > summary:hover { color: var(--link); }

pre.source-code {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.6rem 0.8rem;
  margin: 0.4rem 0 0;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.5;
  /* Source is pre-formatted by definition: wrapping it would misrepresent the file. */
  white-space: pre;
}

/* ---- search ----------------------------------------------------------- */

.search { position: relative; margin: 0 0 1.25rem; }

#reed-search {
  width: 100%;
  padding: 0.4rem 0.55rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
}
#reed-search:focus {
  outline: 2px solid var(--link);
  outline-offset: -1px;
  border-color: var(--link);
}
/* Safari draws its own clear button on type=search; keep the box from jumping. */
#reed-search::-webkit-search-decoration { -webkit-appearance: none; }

#reed-search-results {
  list-style: none;
  margin: 0.3rem 0 0;
  padding: 0.25rem 0;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
  /* Overlays the nav below rather than pushing it down, so the sidebar does not reflow
     on every keystroke. */
  position: absolute;
  left: 0;
  right: 0;
  z-index: 10;
  max-height: 60vh;
  overflow-y: auto;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
}
#reed-search-results[hidden] { display: none; }
#reed-search-results li {
  padding: 0.2rem 0.55rem;
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
}
#reed-search-results li:hover { background: var(--sidebar-bg); }
#reed-search-results a {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* A long qualified name must not push the module label out of the row. */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#reed-search-results .where { color: var(--muted); font-size: 0.8em; flex: none; }
#reed-search-results .no-results { color: var(--muted); font-style: italic; }
#reed-search-results mark { background: var(--mark-bg); color: var(--mark-fg); border-radius: 2px; }

footer.site-footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
}
