/* Site-specific style overrides for 生活在远方 · Wiki.
 *
 * WHY THIS FILE EXISTS
 * MkDocs Material sizes the header logo at 1.2rem, while the header row itself
 * is 2.4rem tall (its height is set by .md-header__title, not by the logo).
 * So by default the logo occupies only HALF the available row height -- you do
 * not need to grow the header to get a bigger logo, you just stop wasting the
 * space that is already there.
 *
 * SECOND CONCERN: FONTS (added 2026-09-20)
 * The theme's default webfonts (Roboto / Roboto Mono) have no CJK glyphs and
 * cost an external request, so `theme.font: false` is set in mkdocs.yml and the
 * *system* stacks live in the "Fonts" section at the end of this file.
 *
 * TUNING
 * Change --llmwiki-logo-size below. Anything <= 2.4rem changes nothing but the
 * logo itself. To go TALLER than the row, see the commented block at the end.
 *
 * Reference (Material 9.7.7; html font-size is 125%/137.5%/150% => 1rem is
 * 20px to 24px depending on viewport):
 *   header row  2.4rem  ->  48px .. 57.6px
 *   logo        1.2rem  ->  24px .. 28.8px   (before this override)
 */

:root {
  /* Matches the header row height, so the mark fills it edge to edge. */
  --llmwiki-logo-size: 2.4rem;
}

/* Header: fill the existing row instead of using half of it. */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: var(--llmwiki-logo-size);
  width: auto;
}

/* Drawer (mobile nav) title: keep the mark a little larger than in the header,
 * mirroring Material's own 2.4rem-vs-1.2rem relationship. */
.md-nav__title .md-nav__button.md-logo img,
.md-nav__title .md-nav__button.md-logo svg {
  height: calc(var(--llmwiki-logo-size) * 1.25);
  width: auto;
}

/* ---------------------------------------------------------------------------
 * ONLY if you want a mark TALLER than the 2.4rem row.
 *
 * This grows the header itself, which costs vertical space on every page (the
 * header is position:sticky, so it always overlays content). Uncomment and set
 * both values to the same height.
 *
 * .md-header__title {
 *   height: 3.6rem;
 *   line-height: 3.6rem;
 * }
 * .md-header__button.md-logo img,
 * .md-header__button.md-logo svg {
 *   height: 3.6rem;
 * }
 * ------------------------------------------------------------------------ */

/* ---------------------------------------------------------------------------
 * FONTS -- system stacks only; nothing is downloaded.
 *
 * WHY: `mkdocs.yml` sets `theme.font: false`, which removes the theme's default
 * Roboto / Roboto Mono requests. Roboto carries **no CJK glyphs**, so every
 * Chinese visitor downloaded a font that could not render the page and then
 * fell back to whatever the OS picked; the request is also render-blocking and
 * cross-origin.
 *
 * WHAT THIS ADDS OVER `font: false` ALONE
 * The theme's own tail is `-apple-system, BlinkMacSystemFont, Helvetica, Arial,
 * sans-serif` -- safe, but with **no CJK faces**, so Chinese still lands on the
 * OS default (historically SimSun, a serif, on Windows). Naming the CJK faces
 * explicitly makes the result consistent across devices.
 *
 * HOW IT COMPOSES (Material 9.7.7):
 *   --md-text-font-family: var(--md-text-font,_), -apple-system, ..., sans-serif
 *   --md-code-font-family: var(--md-code-font,_), SFMono-Regular, Consolas, ...
 * Both variables are the HEAD of a longer list, so Latin resolves in the system
 * UI font and CJK falls through to the Chinese faces below.
 *
 * VERIFY AFTER A BUILD: no fonts.googleapis.com / fonts.gstatic.com link, and no
 * inline `<style>:root{--md-text-font:...}</style>` block in the generated HTML.
 *
 * TUNING: reorder or trim freely -- every name is a system font or ships with
 * the OS. Prefer adding faces over removing the CJK ones.
 * ------------------------------------------------------------------------ */

:root {
  --md-text-font:
    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC",
    "Noto Sans SC", "Source Han Sans SC", "WenQuanYi Micro Hei", sans-serif;
  --md-code-font:
    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;
}
