/* The docs' look: the site's colours, from website/public/styles.css, on Zensical's theme, with
   the site's top bar. Change the colours here and there together. */

:root {
  --md-text-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --md-code-font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-md-color-scheme="default"] {
  --cq-bg: oklch(99.5% 0.004 85);
  --cq-raised: oklch(97.8% 0.006 85);
  --cq-ink: oklch(23% 0.02 285);
  --cq-text: oklch(30% 0.02 285);
  --cq-muted: oklch(48% 0.02 285);
  --cq-line: oklch(90.5% 0.012 85);
  --cq-primary: oklch(50% 0.2 285);
  --cq-on-primary: oklch(98.5% 0.01 285);
  --cq-tint: oklch(50% 0.2 285 / 0.07);
  --cq-success: oklch(55% 0.14 155);
  --cq-warning: oklch(64% 0.15 65);
  --cq-danger: oklch(56% 0.2 25);
  --cq-shadow: 0 1px 2px oklch(23% 0.02 285 / 0.05), 0 8px 24px oklch(23% 0.02 285 / 0.06);
}

[data-md-color-scheme="slate"] {
  --md-hue: 285;
  --cq-bg: oklch(17% 0.015 285);
  --cq-raised: oklch(20.5% 0.018 285);
  --cq-ink: oklch(95% 0.008 285);
  --cq-text: oklch(87% 0.01 285);
  --cq-muted: oklch(70% 0.02 285);
  --cq-line: oklch(29% 0.02 285);
  --cq-primary: oklch(75% 0.13 285);
  --cq-on-primary: oklch(18% 0.04 285);
  --cq-tint: oklch(75% 0.13 285 / 0.1);
  --cq-success: oklch(72% 0.14 155);
  --cq-warning: oklch(80% 0.14 75);
  --cq-danger: oklch(70% 0.17 25);
  --cq-shadow: 0 1px 2px oklch(0% 0 0 / 0.3), 0 8px 24px oklch(0% 0 0 / 0.25);
}

[data-md-color-scheme] {
  --md-default-bg-color: var(--cq-bg);
  --md-default-fg-color: var(--cq-ink);
  --md-default-fg-color--light: var(--cq-muted);
  --md-default-fg-color--lighter: color-mix(in srgb, var(--cq-muted) 55%, transparent);
  --md-default-fg-color--lightest: var(--cq-line);
  --md-primary-fg-color: var(--cq-primary);
  --md-primary-fg-color--light: var(--cq-primary);
  --md-primary-fg-color--dark: var(--cq-primary);
  --md-primary-bg-color: var(--cq-on-primary);
  --md-accent-fg-color: var(--cq-primary);
  --md-accent-fg-color--transparent: var(--cq-tint);
  --md-accent-bg-color: var(--cq-on-primary);
  --md-typeset-color: var(--cq-text);
  --md-typeset-a-color: var(--cq-primary);
  --md-code-bg-color: var(--cq-raised);
  --md-code-fg-color: var(--cq-ink);
  --md-typeset-table-color: var(--cq-line);
}

/* The top bar: the wordmark, Docs, search, the code on GitHub, the way back to the site and
   Log in. */
.md-header {
  background: color-mix(in srgb, var(--cq-bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cq-line);
  box-shadow: none;
  color: var(--cq-ink);
}
.md-header__inner { align-items: center; gap: 0.6rem; }
.md-header__title { flex-grow: 1; min-width: 0; }
.cq-brand { display: inline-flex; align-items: center; gap: 0.45rem; margin-left: 0.6rem;
  color: inherit; font-size: 0.92rem; font-weight: 700; letter-spacing: -0.01em; }
.cq-brand:hover { color: inherit; }
.cq-mark { width: 1.3rem; height: 1.3rem; fill: var(--cq-primary); stroke: var(--cq-primary);
  stroke-width: 2; stroke-linejoin: round; }
.cq-tld { color: var(--cq-muted); font-weight: 500; }
.cq-docs { padding: 0.12rem 0.5rem; border-radius: 999px; background: var(--cq-tint);
  color: var(--cq-primary); font-size: 0.66rem; font-weight: 650; }
.cq-docs:hover { color: var(--cq-primary); }
.cq-github { color: var(--cq-muted); }
.cq-github:hover { color: var(--cq-ink); }
.cq-link { display: none; color: var(--cq-muted); font-size: 0.7rem; font-weight: 500; }
.cq-link:hover { color: var(--cq-ink); }
.cq-login { margin-right: 0.6rem; padding: 0.32rem 0.75rem; border-radius: 0.5rem;
  background: var(--cq-primary); color: var(--cq-on-primary); font-size: 0.68rem; font-weight: 600; }
.cq-login:hover { color: var(--cq-on-primary); filter: brightness(1.08); }
@media screen and (min-width: 45em) { .cq-link { display: inline; margin-left: 0.4rem; } }
@media screen and (max-width: 30em) {
  .cq-login { display: none; }
  .md-header__inner { gap: 0.25rem; }
}
@media screen and (max-width: 76.234375em) { .cq-brand { margin-left: 0; } }
.md-search__form { border-radius: 0.5rem; background: var(--cq-raised);
  box-shadow: inset 0 0 0 1px var(--cq-line); }

/* The side navigation: small group labels, the current page on a tint. */
.md-nav { font-size: 0.7rem; }
.md-nav__link { color: var(--cq-muted); }
.md-nav__link:is(:focus, :hover), .md-nav__link--active { color: var(--cq-primary); }
.md-sidebar--primary .md-nav__link--active { background: var(--cq-tint); border-radius: 0.45rem;
  font-weight: 550; }
.md-sidebar--primary .md-nav__item--section > .md-nav__link {
  margin-top: 1.2em; color: var(--cq-ink); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; }
.md-nav__link .twemoji, .md-nav__link svg { color: inherit; opacity: 0.85; }
.md-sidebar--secondary .md-nav__title { color: var(--cq-ink); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; }

/* Reading: the title, its lead under a rule, and plain sections. */
.md-typeset { font-size: 0.82rem; line-height: 1.7; }
.md-typeset h1 { margin: 0 0 0.35em; color: var(--cq-ink); font-size: 2.05em; font-weight: 700;
  letter-spacing: -0.025em; line-height: 1.2; }
.md-typeset h1 + p { margin-bottom: 1.8em; padding-bottom: 1.6em; border-bottom: 1px solid var(--cq-line);
  color: var(--cq-muted); font-size: 1.12em; line-height: 1.6; }
.md-typeset h2 { margin: 2.2em 0 0.7em; color: var(--cq-ink); font-size: 1.38em; font-weight: 650;
  letter-spacing: -0.015em; }
.md-typeset h3 { margin: 1.8em 0 0.6em; color: var(--cq-ink); font-size: 1.08em; font-weight: 650; }
.md-typeset strong { color: var(--cq-ink); font-weight: 600; }
.md-typeset a { text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);
  text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.md-typeset a:hover { text-decoration-color: currentColor; }
.md-typeset .headerlink { text-decoration: none; }
.md-path { font-size: 0.66rem; }
/* The first crumb is the Quickstart, the docs' first page: a section's name is enough. */
.md-path__item:first-child { display: none; }
.md-path__item:nth-child(2)::before { display: none; }
.md-path__link { color: var(--cq-muted); }

/* Code, inline and in blocks. */
.md-typeset code { padding: 0.1em 0.35em; border-radius: 0.35rem; font-size: 0.86em;
  box-shadow: inset 0 0 0 1px var(--cq-line); }
.md-typeset pre > code { padding: 0.9em 1.1em; box-shadow: none; }
.md-typeset pre { border: 1px solid var(--cq-line); border-radius: 0.65rem; overflow: hidden; }
.md-typeset kbd { border-radius: 0.35rem; }

/* Tables: a quiet frame and a quiet header. */
.md-typeset table:not([class]) { border: 1px solid var(--cq-line); border-radius: 0.65rem;
  box-shadow: none; font-size: 0.78rem; overflow: hidden; }
.md-typeset table:not([class]) th { background: var(--cq-raised); color: var(--cq-ink);
  font-weight: 600; }
.md-typeset table:not([class]) :is(td, th) { padding: 0.75em 1em; border-top-color: var(--cq-line); }
.md-typeset table:not([class]) td:first-child code { white-space: nowrap; }

/* Callouts: a soft frame in the callout's colour, its title on the frame. */
.md-typeset :is(.admonition, details) {
  --cq-box: var(--cq-primary);
  margin: 1.6em 0; padding: 0.2em 1.1em 0.25em; border: 1px solid
    color-mix(in srgb, var(--cq-box) 30%, var(--cq-line));
  border-radius: 0.75rem; background: color-mix(in srgb, var(--cq-box) 5%, var(--cq-bg));
  box-shadow: none; font-size: 0.78rem;
}
.md-typeset :is(.admonition, details):is(.tip, .success) { --cq-box: var(--cq-success); }
.md-typeset :is(.admonition, details):is(.warning, .caution) { --cq-box: var(--cq-warning); }
.md-typeset :is(.admonition, details):is(.danger, .failure) { --cq-box: var(--cq-danger); }
.md-typeset :is(.admonition, details) > :is(.admonition-title, summary) {
  margin: 0 -1.1em; padding: 0.7em 1.1em 0 3em; background: none; border: 0;
  color: var(--cq-ink); font-weight: 600; }
.md-typeset :is(.admonition, details) > :is(.admonition-title, summary)::before {
  left: 1.1em; top: 0.78em; background-color: var(--cq-box); }
.md-typeset details > summary { padding-bottom: 0.7em; }
.md-typeset details[open] > summary { padding-bottom: 0; }
.md-typeset details > summary::after { top: 0.75em; color: var(--cq-muted); }

/* Content tabs, such as one per assistant. */
.md-typeset .tabbed-set { margin: 1.4em 0; border: 1px solid var(--cq-line); border-radius: 0.75rem; }
.md-typeset .tabbed-labels { padding: 0 0.6em; border-bottom: 1px solid var(--cq-line);
  box-shadow: none; }
.md-typeset .tabbed-labels > label { font-size: 0.74rem; font-weight: 550; color: var(--cq-muted); }
.md-typeset .tabbed-content { padding: 0.2em 1.2em 0.4em; }

/* Steps: numbered rings joined by a line. Wrap an ordered list in <div class="steps">. */
.md-typeset .steps > ol { margin-left: 0; padding-left: 0; list-style: none; counter-reset: step; }
.md-typeset .steps > ol > li { position: relative; margin: 0; padding: 0 0 1.1em 2.7em;
  counter-increment: step; }
.md-typeset .steps > ol > li::before { content: counter(step); position: absolute; left: 0; top: 0.1em;
  display: grid; place-items: center; width: 1.65em; height: 1.65em; border-radius: 50%;
  background: var(--cq-tint); color: var(--cq-primary); font-size: 0.9em; font-weight: 700; }
.md-typeset .steps > ol > li:not(:last-child)::after { content: ""; position: absolute;
  left: 0.74em; top: 1.9em; bottom: 0.25em; width: 1px; background: var(--cq-line); }
.md-typeset .steps > ol > li > p:first-child { margin-top: 0; }

/* Cards, such as the next steps at the end of a page. */
.md-typeset .grid.cards > ul > li { border: 1px solid var(--cq-line); border-radius: 0.75rem;
  background: var(--cq-bg); padding: 1em 1.1em; transition: border-color 0.15s; }
.md-typeset .grid.cards > ul > li:hover { border-color: var(--cq-primary); box-shadow: none; }
.md-typeset .grid.cards > ul > li > p:first-child a { text-decoration: none; color: var(--cq-ink);
  font-weight: 600; }
.md-typeset .grid.cards > ul > li > p:last-child { margin-bottom: 0; color: var(--cq-muted); }
.md-typeset .grid.cards .twemoji { color: var(--cq-primary); }

/* Screenshots of the console and of apps: framed like a window. */
.md-typeset img.cq-shot { display: block; margin: 1.6em auto; border: 1px solid var(--cq-line);
  border-radius: 0.75rem; box-shadow: var(--cq-shadow); }
.md-typeset img.cq-phone { max-width: 15rem; }
[data-md-color-scheme="default"] .md-typeset img[src$="#only-dark"],
[data-md-color-scheme="slate"] .md-typeset img[src$="#only-light"] { display: none; }

/* Diagrams: drawn at the text's width, and tall on a phone. See scripts/docs-diagrams.py. */
.md-typeset .cq-diagram img { display: block; width: 100%; max-width: 36rem; height: auto;
  margin: 2em auto; }
@media screen and (max-width: 40em) { .md-typeset .cq-diagram img { max-width: 18rem; } }

/* Lists with an icon in place of a bullet. */
.md-typeset .twemoji { color: var(--cq-primary); }
