/* The manual in the website's style (site/style.css): its colors, which are the app's (Palette.axaml), its type,
   square corners, and dark code blocks. Keep the tokens in step with site/style.css. */
:root {
  --bg: #ffffff;
  --panel: #f5f7fa;
  --strip: #e8edf3;
  --fg: #2b3645;
  --heading: #1d3557;
  --muted: #5a6b85;
  --line: #d5dce6;
  --line-strong: #c5cfdc;
  --accent: #2f7bd6;
  --accent-hover: #2568b8;
  --accent-soft: #e8f1fc;
  --brand: #0f9a83;
  --warn: #a8661a;
  --code-bg: #101924;
  --code-fg: #d6e2f0;
  --code-line: #223146;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, Ubuntu, sans-serif;
  --r: 2px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c131d;
    --panel: #111a26;
    --strip: #172231;
    --fg: #d3dce8;
    --heading: #eef3f9;
    --muted: #8d9db3;
    --line: #213045;
    --line-strong: #2b3d56;
    --accent: #4a92e6;
    --accent-hover: #67a6ee;
    --accent-soft: #14253b;
    --brand: #21b598;
    --warn: #d99a45;
    --code-bg: #070d15;
    --code-line: #1b2a3d;
  }
}

/* Material's variables from the tokens */
:root, [data-md-color-scheme="default"] {
  --md-default-bg-color: var(--bg);
  --md-default-fg-color: var(--fg);
  --md-default-fg-color--light: var(--muted);
  --md-default-fg-color--lighter: var(--line-strong);
  --md-default-fg-color--lightest: var(--line);
  --md-primary-fg-color: var(--bg);
  --md-primary-fg-color--light: var(--panel);
  --md-primary-fg-color--dark: var(--strip);
  --md-primary-bg-color: var(--heading);
  --md-primary-bg-color--light: var(--muted);
  --md-accent-fg-color: var(--accent-hover);
  --md-accent-fg-color--transparent: var(--accent-soft);
  --md-typeset-color: var(--fg);
  --md-typeset-a-color: var(--accent);
  --md-typeset-table-color: var(--line);
  --md-typeset-table-color--light: var(--panel);
  --md-code-bg-color: var(--strip);
  --md-code-fg-color: var(--heading);
  --md-admonition-bg-color: var(--panel);
  --md-admonition-fg-color: var(--fg);
  --md-footer-bg-color: var(--bg);
  --md-footer-bg-color--dark: var(--panel);
  --md-footer-fg-color: var(--heading);
  --md-footer-fg-color--light: var(--muted);
  --md-footer-fg-color--lighter: var(--muted);
  --md-shadow-z1: none;
  --md-shadow-z2: 0 8px 24px rgba(8, 16, 26, .08);
  --md-shadow-z3: 0 18px 50px rgba(8, 16, 26, .28);
  --md-text-font-family: var(--sans);
  --md-code-font-family: var(--mono);
}
body { font-family: var(--sans); background: var(--bg); }

/* header: the site's light chrome, a line under it */
.md-header { background: var(--bg); color: var(--heading); border-bottom: 1px solid var(--line); box-shadow: none; }
.md-header__inner { height: 56px; padding: 0 .8rem; align-items: center; }
.spry-brand {
  display: flex; align-items: center; gap: .55rem; margin-left: .4rem;
  font-weight: 700; font-size: 1.1rem; letter-spacing: -.01em; color: var(--brand);
}
.spry-brand:hover { color: var(--brand); }
.spry-brand img { width: 26px; height: 26px; }
.spry-section {
  margin-left: .9rem; padding-left: .9rem; border-left: 1px solid var(--line-strong);
  font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.spry-section:hover { color: var(--heading); }
.spry-spacer { flex: 1; }
.spry-links { display: flex; height: 56px; }
.spry-links a {
  display: flex; align-items: center; padding: 0 1rem;
  font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.spry-links a:hover { color: var(--heading); }
.md-header .md-icon { color: var(--muted); }

/* search box: a plain field */
.md-search__form { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); height: 2rem; box-shadow: none; }
.md-search__form:hover { background: var(--panel); border-color: var(--line-strong); }
.md-search__input { color: var(--fg); font-size: .8rem; }
.md-search__input::placeholder { color: var(--muted); }
.md-search__icon[for="__search"] { color: var(--muted); }
[data-md-toggle="search"]:checked ~ .md-header .md-search__form { border-radius: var(--r) var(--r) 0 0; background: var(--bg); }
.md-search__output { border-radius: 0 0 var(--r) var(--r); }

/* section tabs: the site's nav links, the current one underlined */
.md-tabs { background: var(--bg); color: var(--muted); border-top: 1px solid var(--line); }
.md-tabs__list { margin-left: .4rem; }
.md-tabs__item { height: 2.4rem; padding: 0; }
.md-tabs__link {
  display: flex; align-items: center; height: 100%; margin: 0; padding: 0 1rem; opacity: 1;
  font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  border-bottom: 2px solid transparent;
}
.md-tabs__link:hover, .md-tabs__link:focus { color: var(--heading); }
.md-tabs__item--active .md-tabs__link { color: var(--heading); border-bottom-color: var(--accent); }

/* side navigation */
.md-nav { font-size: .72rem; }
.md-nav__title { color: var(--heading); }
.md-nav__item--section > .md-nav__link {
  font: 600 .62rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.md-nav__link--active, .md-nav__link--active:hover { color: var(--accent); font-weight: 600; }
.md-nav__link:hover { color: var(--accent-hover); }

/* type: the site's headings */
.md-typeset { font-size: .78rem; line-height: 1.65; }
.md-typeset h1, .md-typeset h2, .md-typeset h3, .md-typeset h4 { color: var(--heading); font-weight: 650; }
.md-typeset h1 { font-size: 2em; letter-spacing: -.025em; margin-bottom: .8em; }
.md-typeset h2 { font-size: 1.3em; letter-spacing: -.01em; padding-bottom: .4em; border-bottom: 1px solid var(--line); margin-top: 2.2em; }
.md-typeset h3 { font-size: 1.05em; }
.md-typeset a { color: var(--accent); }
.md-typeset a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }
.md-typeset dt { color: var(--heading); font-weight: 600; }
.md-typeset dd { margin-left: 1.4em; }

/* code: inline on the strip color; blocks dark, with the accent rule on the left */
.md-typeset code { border-radius: var(--r); }
.md-typeset pre > code {
  background: var(--code-bg); color: var(--code-fg);
  border: 1px solid var(--code-line); border-left: 3px solid var(--accent); border-radius: var(--r);
}
.md-typeset .highlight { --md-code-bg-color: var(--code-bg); --md-code-fg-color: var(--code-fg); }
.md-typeset kbd {
  font-family: var(--mono); background: var(--panel); color: var(--heading);
  border-radius: var(--r); box-shadow: 0 0 0 1px var(--line-strong) inset, 0 1px 0 var(--line-strong);
}

/* tables and notes: square, ruled */
.md-typeset table:not([class]) { border: 1px solid var(--line); border-radius: 0; font-size: .74rem; box-shadow: none; }
.md-typeset table:not([class]) th { background: var(--strip); color: var(--heading); font-weight: 600; }
.md-typeset table:not([class]) td { border-top: 1px solid var(--line); }
.md-typeset .admonition, .md-typeset details {
  border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 0;
  background: var(--panel); box-shadow: none; font-size: .76rem;
}
.md-typeset .admonition > .admonition-title, .md-typeset details > summary { background: transparent; }
/* (every kind: Material's own colors per kind are replaced by the accent, or the warning color) */
.md-typeset .admonition[class], .md-typeset details[class] { border-color: var(--line); border-left-color: var(--accent); }
.md-typeset .admonition[class] > .admonition-title::before, .md-typeset details[class] > summary::before { background-color: var(--accent); }
.md-typeset .admonition[class]:is(.warning, .danger, .bug), .md-typeset details[class]:is(.warning, .danger, .bug) { border-left-color: var(--warn); }
.md-typeset .admonition[class]:is(.warning, .danger, .bug) > .admonition-title::before { background-color: var(--warn); }

/* home: cards as the site's feature grid */
.md-typeset .grid.cards > ul { gap: 1px; background: var(--line); border: 1px solid var(--line); }
.md-typeset .grid.cards > ul > li {
  border: 0; border-radius: 0; background: var(--bg); margin: 0; padding: 1rem 1.1rem;
  box-shadow: inset 0 2px 0 transparent; transition: box-shadow .15s, background .15s;
}
.md-typeset .grid.cards > ul > li:hover { box-shadow: inset 0 2px 0 var(--accent); background: var(--panel); }

/* footer: a line above, as the site's */
.md-footer { border-top: 1px solid var(--line); }
.md-footer-meta { background: var(--bg); border-top: 1px solid var(--line); }
.md-footer__title { color: var(--heading); }
.md-footer__direction { color: var(--muted); }

/* a PropertyManager field or command name as it appears in the app */
.md-typeset .ui { font-weight: 600; }

@media screen and (max-width: 76.1875em) {
  .spry-section, .spry-links { display: none; }
}

/* a screenshot still to take: `!!! screenshot "img/<section>/<name>.png"` with what it shows; replaced by the image
   (`![What it shows](../img/<section>/<name>.png)`) once taken */
:root { --md-admonition-icon--screenshot: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 4h3l2-2h6l2 2h3a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2m8 3a5 5 0 0 0-5 5 5 5 0 0 0 5 5 5 5 0 0 0 5-5 5 5 0 0 0-5-5m0 2a3 3 0 0 1 3 3 3 3 0 0 1-3 3 3 3 0 0 1-3-3 3 3 0 0 1 3-3"/></svg>'); }
.md-typeset .admonition[class].screenshot {
  border: 1px dashed var(--line-strong); border-left: 1px dashed var(--line-strong); background: var(--bg);
  color: var(--muted); padding-bottom: .6rem;
}
.md-typeset .admonition[class].screenshot > .admonition-title { font: 600 .66rem var(--mono); letter-spacing: .04em; color: var(--muted); }
.md-typeset .admonition[class].screenshot > .admonition-title::before {
  background-color: var(--muted);
  -webkit-mask-image: var(--md-admonition-icon--screenshot); mask-image: var(--md-admonition-icon--screenshot);
}
.md-typeset .admonition[class].screenshot > .admonition-title::after { content: "  ·  screenshot to take"; font-weight: 400; }
