/* docs.laterite.dev on the bedrock pairing (#401, tracking #411).
 *
 * This file maps MKDOCS-MATERIAL onto the shared token layer. It does not
 * restate a single colour: every value here resolves to a token defined in the
 * generated stylesheets/tokens.css, which is a copy of web/src/shared/styles/
 * and is regenerated by `npm run sync-docs-tokens`. That is the whole leverage —
 * Material routes its entire theme through ~60 `--md-*` variables, so pointing
 * those at the pairing restyles every page, including the generated catalogue
 * pages — one per AGS4 group — that nobody opens in review.
 *
 * ── THE ONE RULE THIS FILE ENFORCES ──
 * Band colour (`--laterite-*`, and the `--band` each nav section carries)
 * appears ONLY in the left nav's swatches and rules, the table-of-contents rail,
 * and the catalogue's strata cap. It NEVER appears in prose or in an admonition.
 * On a documentation site for a validator, a warm ramp running through body copy
 * is indistinguishable from severity, and "is this orange a warning or a group?"
 * is the one ambiguity that would actually mislead somebody. The sections below
 * are ordered so the band-bearing ones sit together under a single heading, and
 * tests/test_docs_band_containment.py fails if a band token reaches a selector
 * outside them — in this file or in any other stylesheet the site loads.
 *
 * ── UNITS ──
 * Material sets `html { font-size: 125% }`, so 1rem is 20px here and 16px on the
 * other two surfaces. That is left alone on purpose: it means the shared
 * EDITORIAL scale (`--size-h1` … `--size-h3`) lands at reading sizes on this
 * surface while the same tokens stay at instrument sizes in the app. The docs
 * take the editorial scale; they never take the tool scale.
 */

/* ══ 1. Material's vocabulary, pointed at the pairing ═══════════════════════
 *
 * Nothing in this section has a dark twin. Every entry maps one of Material's
 * names onto one of ours, and OUR values are what flip — which is the whole
 * reason the theme toggle keeps working with no JavaScript of our own.
 *
 * THE SELECTOR IS LEAD-BEARING. Material declares its own defaults on
 * `:root,[data-md-color-scheme=default]`, and that second half matches <body>
 * while `:root` matches <html>. For inherited properties the nearer ancestor
 * wins outright — specificity never enters into it — so a mapping written at
 * `:root` alone loses to Material's on every element inside <body>, which is
 * all of them. It looks like it works, too: the chrome and the nav below take
 * their colours directly and render correctly, while the canvas stays #fff and
 * body copy stays Material's black. Matching `[data-md-color-scheme]` puts these
 * on the same element, later in source order, where they win. */
:root,
[data-md-color-scheme] {
  /* Type. Material composes its families as `var(--md-text-font, _), <stack>`,
     so these two are the documented hook. `theme.font: false` in mkdocs.yml is
     what removes the Google Fonts <link> that would otherwise define them. */
  --md-text-font: "Public Sans Variable";
  --md-code-font: "IBM Plex Mono";

  /* Chrome is dark in BOTH themes (the direction's docs masthead), so it reads
     off the raw neutral ramp rather than the theme-flipping surface tokens.
     `--stone-900` is the dark theme's `--surface` value, which is what makes the
     masthead look native there rather than pasted on. */
  --chrome: var(--stone-900);
  --chrome-fg: var(--stone-50);
  --chrome-fg-soft: var(--stone-300);
  --chrome-line: var(--stone-700);

  /* Neutrals. Material's four "lightest → light" steps are opacity ramps in
     stock; here they are the pairing's five-step foreground, which is a real
     ramp rather than the same ink at four alphas. */
  --md-default-fg-color: var(--fg);
  --md-default-fg-color--light: var(--fg-muted);
  --md-default-fg-color--lighter: var(--fg-faint);
  --md-default-fg-color--lightest: var(--fg-dim);
  --md-default-bg-color: var(--canvas);
  --md-default-bg-color--light: color-mix(in srgb, var(--canvas) 54%, transparent);
  --md-default-bg-color--lighter: color-mix(in srgb, var(--canvas) 26%, transparent);
  --md-default-bg-color--lightest: color-mix(in srgb, var(--canvas) 7%, transparent);

  /* Reads. `--accent` is maroon on light and sand on dark; both are the token,
     so neither is written here. */
  --md-primary-fg-color: var(--accent);
  --md-primary-fg-color--light: var(--accent-hover);
  --md-primary-fg-color--dark: var(--accent-hover);
  --md-primary-bg-color: var(--chrome-fg);
  --md-primary-bg-color--light: var(--chrome-fg-soft);
  --md-accent-fg-color: var(--accent-hover);
  --md-accent-fg-color--transparent: var(--accent-quiet);
  --md-accent-bg-color: var(--fg-on-cta);
  --md-accent-bg-color--light: var(--fg-on-cta);

  /* Prose sets in the SOFT foreground; headings take the full-strength one.
     Long-form body at full contrast is the halation problem the app's own
     palette pass fixed, and it is worse here because there is more of it. */
  --md-typeset-color: var(--fg-soft);
  --md-typeset-a-color: var(--accent);
  --md-typeset-mark-color: var(--accent-quiet);
  --md-typeset-del-color: color-mix(in srgb, var(--err) 22%, transparent);
  --md-typeset-ins-color: color-mix(in srgb, var(--ok) 22%, transparent);
  --md-typeset-table-color: var(--line);
  --md-typeset-table-color--light: var(--line-subtle);
  --md-typeset-kbd-color: var(--surface-raised);
  --md-typeset-kbd-accent-color: var(--surface);
  --md-typeset-kbd-border-color: var(--line-strong);

  /* Code. Stock Material highlights in blue/green/purple, which is the one place
     a third-party palette stays visible on an otherwise fully themed page.
     Replaced with the pairing's own — but NOT with the band ramp, even though it
     is the obvious warm set to reach for: syntax colour is prose, and band
     colour in prose is the collision this whole file is arranged against. The
     hues here are the accent and the four statuses, which already read as five
     distinguishable inks and flip correctly in dark. */
  --md-code-fg-color: var(--fg);
  --md-code-bg-color: var(--surface-code);
  --md-code-hl-color: var(--accent-quiet);
  --md-code-hl-color--light: color-mix(in srgb, var(--accent) 12%, transparent);
  --md-code-hl-keyword-color: var(--accent);
  --md-code-hl-function-color: var(--info);
  --md-code-hl-string-color: var(--ok);
  --md-code-hl-number-color: var(--warn);
  --md-code-hl-constant-color: var(--accent-hover);
  --md-code-hl-special-color: var(--err);
  --md-code-hl-name-color: var(--fg);
  --md-code-hl-operator-color: var(--fg-muted);
  --md-code-hl-punctuation-color: var(--fg-muted);
  --md-code-hl-comment-color: var(--fg-faint);
  --md-code-hl-generic-color: var(--fg-muted);
  --md-code-hl-variable-color: var(--fg-soft);

  --md-admonition-fg-color: var(--fg-soft);
  --md-admonition-bg-color: var(--surface);

  --md-footer-bg-color: var(--chrome);
  --md-footer-bg-color--dark: var(--stone-950);
  --md-footer-fg-color: var(--chrome-fg);
  --md-footer-fg-color--light: var(--chrome-fg-soft);
  --md-footer-fg-color--lighter: var(--stone-500);

  /* Cards lift by a surface step and a hairline, not by a shadow — the shared
     elevation rule. The one sanctioned shadow on this site is the catalogue
     spotlight's, and it is warm, not neutral. */
  --md-shadow-z1: none;
  --md-shadow-z2: var(--shadow-menu);
  --md-shadow-z3: var(--shadow-dialog);
}

::selection {
  background: var(--selection);
}

/* ══ 2. Layout ══════════════════════════════════════════════════════════════
 * A 46rem content column between a 230px nav and a 190px table of contents —
 * the direction's measurements, converted at this surface's 20px root. */
.md-sidebar--primary {
  width: 11.5rem;
}
.md-sidebar--secondary {
  width: 9.5rem;
}
.md-content {
  /* max-width alone would left-align the column and dump all the slack on the
     TOC side, the same asymmetry catalogue.css fixes for tables. */
  margin-inline: auto;
  max-width: 36.8rem;
  min-width: 0;
}

/* ══ 3. Masthead ════════════════════════════════════════════════════════════ */
.md-header {
  background-color: var(--chrome);
  color: var(--chrome-fg);
  box-shadow: none;
}

/* The mark's outline is maroon and vanishes into near-black, so on dark chrome
   it takes a light plate. The docs masthead is dark in both themes, which is why
   this is unconditional here and `dark:`-only on the apex. */
.md-header .md-logo img,
.md-header .md-logo svg {
  background: var(--stone-50);
  border-radius: var(--radius-md);
  padding: 3px;
  width: 1.4rem;
  height: 1.4rem;
}

/* The navigational lockup: product · section · version. The product name sets in
   the UI FONT — the display face is for the brand lockup on the apex, and here
   "laterite" is a place in a path, not a wordmark. */
.md-header__title--lockup {
  margin-left: 0.4rem;
  font-size: 0.8rem;
}
.md-header__lockup {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  color: inherit;
  text-decoration: none;
}
.md-header__product {
  font-weight: var(--weight-bold);
  letter-spacing: var(--track-tight);
  color: var(--chrome-fg);
}
.md-header__sep {
  color: var(--stone-600);
}
.md-header__section {
  color: var(--chrome-fg-soft);
}
.md-header__version {
  font-family: var(--family-mono);
  font-size: var(--size-micro);
  color: var(--stone-500);
}

/* Search takes a NORMAL LIGHT FILL. A translucent input over dark chrome is the
   stock treatment and it reads as disabled — the one control on the bar you are
   meant to type into should look like the one control you can type into. */
.md-search__form {
  background-color: var(--stone-50);
  border-radius: var(--radius-md);
  box-shadow: none;
}
/* This NEUTRALISES a hover rather than adding one. Material's own
   `.md-search__form:hover` is `#ffffff1f` — a translucent white, which is a
   lightening over its dark chrome and a DARKENING over the light fill above, so
   without this the input goes grey exactly when the pointer reaches it. The
   affordance is the cursor and the focus ring; the fill does not move. */
.md-search__form:hover {
  background-color: var(--stone-50);
}
.md-search__input {
  color: var(--stone-900);
}
.md-search__input::placeholder {
  color: var(--stone-500);
}
.md-search__input ~ .md-search__icon,
.md-search__options > .md-icon {
  color: var(--stone-600);
}
.md-search__output {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.md-search-result__meta {
  background-color: var(--surface-raised);
  color: var(--fg-muted);
}
.md-search-result__article,
.md-search-result__more summary {
  background-color: var(--surface);
}

/* The rust CTA — the same object, in the same colour, on all three surfaces. */
.md-header__cta {
  flex-shrink: 0;
  margin-left: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-md);
  background: var(--cta);
  color: var(--fg-on-cta);
  font-size: var(--size-micro);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--dur-base) var(--ease-out);
}
.md-header__cta:hover {
  background: var(--cta-hover);
}
/* Below the layout breakpoint the bar is drawer-toggle, title, search and repo
   link, and a fifth object pushes the lockup out. The app is one tap away in the
   footer and in the nav; it does not need to be here at 400px. */
@media screen and (max-width: 59.9844em) {
  .md-header__cta {
    display: none;
  }
}

.md-header__source {
  color: var(--chrome-fg-soft);
}

/* ══ 4. Prose ═══════════════════════════════════════════════════════════════ */
body {
  font-family: var(--md-text-font-family);
}

.md-typeset {
  line-height: var(--lh-loose);
}

.md-typeset h1 {
  font-family: var(--family-display);
  font-weight: var(--weight-extrabold);
  font-size: var(--size-h1);
  line-height: var(--lh-tight);
  letter-spacing: var(--track-display);
  /* Headlines follow the accent, so this is maroon on light and sand on dark
     without a second rule. */
  color: var(--accent);
}

.md-typeset h2 {
  font-family: var(--family-display);
  font-weight: var(--weight-bold);
  font-size: var(--size-h2);
  line-height: var(--lh-snug);
  letter-spacing: var(--track-tight);
  color: var(--fg);
  border-bottom: 1px solid var(--line-subtle);
  padding-bottom: 0.25em;
}

.md-typeset h3 {
  font-family: var(--family-display);
  font-weight: var(--weight-bold);
  font-size: var(--size-h3);
  line-height: var(--lh-snug);
  letter-spacing: var(--track-tight);
  color: var(--fg);
}

.md-typeset h4,
.md-typeset h5,
.md-typeset h6 {
  font-family: var(--family-ui);
  font-weight: var(--weight-semibold);
  color: var(--fg);
}
.md-typeset h5 {
  text-transform: none; /* stock uppercases h5; the micro-caps idiom is the breadcrumb's */
}

.md-typeset strong {
  color: var(--fg);
  font-weight: var(--weight-semibold);
}

.md-typeset a {
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  text-underline-offset: 0.15em;
}
.md-typeset a:hover {
  color: var(--accent-hover);
}

/* Inline code on the code surface with a hairline and a small radius.
   A FENCED BLOCK KEEPS THE HAIRLINE TOO (#434). It used to drop it, on the
   reasoning that "a fenced block is already an object" — but it is only an
   object where its fill reads, and on this surface the fill does not. The app
   sets code on `--surface`; the docs read long-form on `--canvas`, and
   `--surface-code` lands ΔL 0.001 from it, so a light-mode block was invisible.
   Retuning the token cannot fix it: it would have to clear both grounds while
   dodging `--surface-raised` and `--chip`, and the light ladder has no gap that
   size. One global fill cannot serve three surfaces with three page grounds —
   the border can, so form carries it. */
.md-typeset code {
  background-color: var(--surface-code);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-xs);
  padding: 0.05em 0.3em;
}
.md-typeset pre > code,
.md-typeset .highlight code {
  padding: revert;
}
.md-typeset pre > code {
  border-radius: var(--radius-md);
}
/* A line-numbered block is two cells, so the frame goes round the TABLE. The
   code half keeps its own border in the plain case above; here it would draw
   down the middle, against an unbordered linenos column. */
.md-typeset .highlighttable {
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.md-typeset .highlighttable code {
  border: none;
  border-radius: 0;
}
.md-typeset .highlighttable .linenos {
  background-color: var(--surface-raised);
  color: var(--fg-dim);
}

.md-typeset blockquote {
  border-left: 3px solid var(--line-strong);
  color: var(--fg-muted);
}

.md-typeset table:not([class]) {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: var(--size-caption);
}
.md-typeset table:not([class]) th {
  background-color: var(--surface-raised);
  color: var(--fg);
  font-weight: var(--weight-semibold);
}

/* Breadcrumbs in mono uppercase — the "where am I" the fixed masthead lockup no
   longer says. */
.md-path {
  font-family: var(--family-mono);
  font-size: var(--size-micro);
  text-transform: uppercase;
  letter-spacing: var(--track-micro);
  color: var(--fg-faint);
}
.md-path__link {
  color: var(--fg-faint);
}
.md-path__link:hover {
  color: var(--accent);
}

/* ══ 5. Admonitions — SEVERITY, never band ══════════════════════════════════
 *
 * Stock Material gives each type its own hardcoded hex (a blue note, a teal tip,
 * an orange warning). Those are replaced by the pairing's four status tokens,
 * driven off one `--adm` custom property so the three places each type is
 * painted stay in agreement.
 *
 * There is no green here and no band here. The status set already encodes
 * severity down the strata — ochre for warning, oxide for error — and an
 * admonition tinted with a GROUP colour would put the two vocabularies on the
 * same page in the same shape. */
.md-typeset .admonition,
.md-typeset details {
  --adm: var(--info);
  --adm-quiet: var(--info-quiet);
  border-width: 1px;
  border-radius: var(--radius-md);
  background-color: var(--surface);
  font-size: var(--size-caption);
}
/* SPECIFICITY IS THE WHOLE DIFFICULTY HERE, so it is written down rather than
   discovered again. Material paints each of its twelve types at three selectors
   — `.md-typeset .admonition.tip`, `.md-typeset .note>.admonition-title`,
   `…>.admonition-title:before` — so the obvious two-selector rules lose to all
   of them and the page keeps stock blue titles and teal icons under correctly
   coloured borders. That half-themed state is easy to miss, because the border
   is the part you look at. Each rule below is deliberately weighted to tie with
   Material's and win on source order, so ONE rule replaces twelve. */
.md-typeset .admonition[class],
.md-typeset details[class] {
  border-color: var(--adm);
}
.md-typeset .admonition:focus-within,
.md-typeset details:focus-within {
  box-shadow: 0 0 0 3px var(--adm-quiet);
}
.md-typeset :is(.admonition, details) > :is(.admonition-title, summary) {
  background-color: var(--adm-quiet);
  color: var(--fg);
  font-weight: var(--weight-semibold);
}
.md-typeset :is(.admonition, details) > :is(.admonition-title, summary)::before {
  background-color: var(--adm);
}
.md-typeset :is(.admonition, details) > :is(.admonition-title, summary)::after {
  color: var(--adm);
}

/* "Verified" — the single cool note, for the types that mean a machine checked
   something. */
.md-typeset .tip,
.md-typeset .success,
.md-typeset .check,
.md-typeset .done,
.md-typeset .hint,
.md-typeset .important {
  --adm: var(--ok);
  --adm-quiet: var(--ok-quiet);
}
.md-typeset .warning,
.md-typeset .caution,
.md-typeset .attention {
  --adm: var(--warn);
  --adm-quiet: var(--warn-quiet);
}
.md-typeset .danger,
.md-typeset .error,
.md-typeset .failure,
.md-typeset .fail,
.md-typeset .missing,
.md-typeset .bug {
  --adm: var(--err);
  --adm-quiet: var(--err-quiet);
}
/* note / info / abstract / example / quote / question keep the steel default. */

/* ══ 6. Code tabs ═══════════════════════════════════════════════════════════ */
.md-typeset .tabbed-labels > label {
  font-family: var(--family-mono);
  font-size: var(--size-micro);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
  color: var(--fg-muted);
}
.md-typeset .tabbed-labels > label:hover {
  color: var(--accent);
}
.md-typeset .tabbed-set > input:checked + label {
  color: var(--accent);
}
.md-typeset .tabbed-labels::before {
  background: var(--accent);
}

/* ══ 7. Footer ══════════════════════════════════════════════════════════════ */
.md-footer-meta {
  background-color: var(--md-footer-bg-color--dark);
}
.md-copyright,
.md-copyright__highlight {
  color: var(--chrome-fg-soft);
  font-size: var(--size-micro);
}
.md-footer__title {
  font-family: var(--family-display);
  font-weight: var(--weight-bold);
}

/* ══ 8. BAND-BEARING SURFACES ═══════════════════════════════════════════════
 *
 * Everything below this line may use `--laterite-*` / `--band`. Nothing above it
 * may. See the note at the top of this file for why, and
 * tests/test_docs_band_containment.py for the gate that holds it.
 */

/* ── 8a. The strata hairline closing the masthead ──
   Not a border: a border cannot carry a gradient. Exactly two objects on this
   site run the ramp AS a gradient — this hairline and the catalogue's cap — and
   both of them mean "all of the groups". Anywhere a band identifies ONE group it
   is a single solid colour, because a gradient there reads as several. */
.md-header__strata {
  height: 2px;
  background: linear-gradient(
    to right,
    var(--laterite-300),
    var(--laterite-400) 30%,
    var(--laterite-500) 55%,
    var(--laterite-600) 75%,
    var(--laterite-900)
  );
}

/* ── 8b. Band-keyed left navigation ──
 *
 * Each top-level section takes the next band in NAV ORDER, assigned by position
 * rather than by name so a renamed section keeps its place and a new one does
 * not need a rule. The cycle is the canonical seven-band rail ramp (300→900) —
 * the same one the apex's borehole rail runs vertically — so it wraps rather
 * than running out, and every band stays distinct in dark, where the ramp shifts
 * one step lighter (`--laterite-200` is deliberately NOT in the cycle: it does
 * not shift, so in dark it would collide with the shifted 300).
 *
 * `--band` is set on the section's <li>, so everything inside it inherits the
 * one value — which is what lets the active link's rule below name `--band`
 * without knowing which section it is in. */
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(7n + 1) {
  --band: var(--laterite-300);
}
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(7n + 2) {
  --band: var(--laterite-400);
}
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(7n + 3) {
  --band: var(--laterite-500);
}
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(7n + 4) {
  --band: var(--laterite-600);
}
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(7n + 5) {
  --band: var(--laterite-700);
}
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(7n + 6) {
  --band: var(--laterite-800);
}
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(7n + 7) {
  --band: var(--laterite-900);
}

/* The 8px swatch, on the head of each top-level entry, in the micro-caps idiom
   the rest of the chrome uses.
   `> .md-nav__link` is ONE selector reaching all three shapes Material emits for
   a top-level entry, which is why nothing here names them: a plain page is an
   `<a class="md-nav__link">`, a section is a `<label class="md-nav__link">`, and
   a section with an index page (`navigation.indexes`) is a
   `<div class="md-nav__link md-nav__container">` wrapping its own link and a
   toggle. Do NOT add `label.md-nav__title` here — that element is Material's
   drawer header and lives inside the nested `<nav>`, never as a child of the
   `<li>`, so the rule would match nothing and read as though it did. */
.md-nav--primary > .md-nav__list > .md-nav__item > .md-nav__link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--family-ui);
  font-size: var(--size-micro);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
  color: var(--fg-muted);
}
.md-nav--primary > .md-nav__list > .md-nav__item > .md-nav__link::before {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--band);
}

/* Stock keeps a sticky "laterite" header at the top of the desktop sidebar. It
   is the drawer's title doing double duty, and with the lockup sitting two
   centimetres above it the product name now appears twice in one glance. Hidden
   at the desktop breakpoint ONLY — on mobile this element is the drawer header
   and carries the close affordance. */
@media screen and (min-width: 76.25em) {
  .md-nav--primary > .md-nav__title {
    display: none;
  }
}

.md-nav__link {
  color: var(--fg-soft);
}
.md-nav__link:hover,
.md-nav__link:focus {
  color: var(--accent);
}

/* The active item: quiet accent fill, a 3px inset rule in ITS SECTION'S band,
   maroon 600 text. `--band` is inherited from the section <li> above. */
.md-nav__item .md-nav__link--active,
.md-nav__item .md-nav__link--active:hover {
  background: var(--accent-quiet);
  box-shadow: inset 3px 0 0 var(--band);
  color: var(--accent);
  font-weight: var(--weight-semibold);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  padding-left: 0.5rem;
}

/* …but ONCE per row. On a section that has its own index page, Material puts
   the link and the collapse toggle side by side inside `.md-nav__container` and
   marks BOTH active, so the rule above paints the row and then paints the little
   chevron beside it again — two fills and two band rules where the design has
   one. The toggle is an affordance, not the current page; it keeps the active
   text colour and gives up the highlight. */
.md-nav__container > label.md-nav__link--active {
  background: none;
  box-shadow: none;
  padding-left: 0;
}

/* ── 8c. The table-of-contents rail ──
 *
 * The hairline dose of the apex's borehole rail: a 6px four-band strip down the
 * TOC's left edge, veiled below the reading position, with a steel probe at it.
 * NO depth readout and no numbers — this is an echo of the instrument, not a
 * second instrument. Positions come from javascripts/rail.js.
 *
 * The veil is `--canvas` at 82%, so it dims the strip toward the page rather
 * than greying it — the layers "uncover" as you descend, which is the whole
 * metaphor. */
.md-sidebar--secondary .md-nav--secondary {
  position: relative;
  padding-left: 0.7rem;
}
.md-rail {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: linear-gradient(
    to bottom,
    var(--laterite-300) 0 25%,
    var(--laterite-400) 25% 50%,
    var(--laterite-500) 50% 75%,
    var(--laterite-700) 75% 100%
  );
}
.md-rail__veil {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: color-mix(in srgb, var(--canvas) 82%, transparent);
}
.md-rail__probe {
  position: absolute;
  left: -3px;
  width: 12px;
  height: 2px;
  background: var(--steel-700);
}
[data-md-color-scheme="slate"] .md-rail__probe {
  background: var(--steel-300);
}
/* The rail exists to run down the table of contents' edge, so it appears and
   disappears exactly with it — and 60em is MATERIAL'S number, not one of ours:
   it is where `.md-sidebar--secondary:not([hidden])` becomes `display: block`.
   Copying the wrong breakpoint here is a silent, specific bug: the earlier
   76.1875em was the layout breakpoint, and between the two the reader got a
   table of contents with no strip beside it, on every window from 960 to
   1219px. Nothing fails when these drift apart, so on a Material bump this is
   the value to re-check.
   (It needs no reduced-motion arm: rail.js SETS the position rather than
   transitioning to it, so the strip never animates in the first place.) */
@media screen and (max-width: 59.9375em) {
  .md-rail {
    display: none;
  }
}
