/* Dark-mode readability overrides.
   Material's slate scheme ships low-contrast, slightly desaturated grey body
   text; these variables lift it to near-white and give links a vivid violet
   accent so the dark theme reads as cleanly as the light one. */
[data-md-color-scheme="slate"] {
  --md-typeset-color:             hsla(0, 0%, 100%, 0.90);
  --md-default-fg-color:          hsla(0, 0%, 100%, 0.95);
  --md-default-fg-color--light:   hsla(0, 0%, 100%, 0.72);
  --md-default-fg-color--lighter: hsla(0, 0%, 100%, 0.45);

  --md-typeset-a-color:           #b388ff;  /* links */
  --md-accent-fg-color:           #cbb2ff;  /* link hover / interactive accent */
}

/* Global type density. Material scales the whole page (text, headings, spacing,
   admonition padding) off an enlarged root (~125% by default). Nudge it up a
   touch for a more airy read - everything scales proportionally, and readers can
   still zoom on top. */
:root {
  font-size: 130%;
}
/* Vertical rhythm. Loosen the line-height a touch above Material's ~1.6 and add a little
   space between paragraphs so the (enlarged) body reads less dense - airier, not sparse. */
.md-typeset {
  line-height: 1.72;
}
.md-typeset p {
  margin-block: 1.15em;
}
/* Material renders admonition (!!! note) and <details> content smaller than body
   (.64rem vs ~.7rem); the root reduction above made that already-small text hard to
   read. Lift note/details text to body size so density does not cost legibility. */
.md-typeset .admonition,
.md-typeset details {
  font-size: 0.7rem;
}

/* Prose wrapping. Let the browser avoid orphans (a lone word on the last line) rather
   than needing a manual <br> per paragraph, and let a long inline code span wrap at its
   token boundaries instead of jumping whole to the next line - only a single token too
   long for the line ever breaks mid-word. */
.md-typeset p,
.md-typeset li {
  text-wrap: pretty;
}
.md-typeset :not(pre) > code {
  overflow-wrap: break-word;
}

/* Fenced code blocks render narrower than the 120-char code style allows, so long example lines
   overflow into a horizontal scroll. Nudge only the block font down (Material's default is .85em;
   inline code and body text keep their size) so ~15% more characters fit before scrolling. Tune this
   to trade fit against legibility - lower fits wider lines, higher keeps the code larger. */
.md-typeset pre code {
  font-size: 0.8em;
}
