/* MexicoDev brand override for the vendored course-book engine.
   Loaded AFTER the engine's style.css (via THEME_CSS in books.json), so the
   unconditional :root tokens here beat both the engine's light defaults and
   its prefers-color-scheme dark block — the books render dark for everyone,
   matching the force-dark main site. Lives outside the vendored book dirs so
   an upstream re-vendor can't clobber it. */

:root {
  color-scheme: dark;
  --bg: #0a0a0a;      /* site --background */
  --fg: #ededed;      /* site --foreground */
  --muted: #9ca3af;
  --surface: #121212; /* site --color-mexico-card */
  --border: #262626;
  /* mexico-green lightened for contrast on near-black; the site's raw
     #006847 fails WCAG contrast as link/text color on #0a0a0a. */
  --accent: #17a86b;
  --note: #38bdf8;    --note-bg: #0c2231;
  --tip: #4ade80;     --tip-bg: #0d241a;
  --warn: #fbbf24;    --warn-bg: #2a2011;
  --keyidea: #a78bfa; --keyidea-bg: #1e1830;
}

/* Force the Shiki dark palette regardless of OS preference (unconditional
   mirror of the engine's media-scoped rule). */
.shiki, .shiki span {
  color: var(--shiki-dark) !important;
  background-color: transparent !important;
}

/* Site typeface first. Inter is not bundled (book pages are offline-
   self-contained and BOOK_CSP only allows font-src 'self' data:), so this
   picks up Inter where installed and falls back to the system stack. */
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
}

/* Replica of the site's fixed nav-bar (glass over near-black, hairline
   bottom border, 64px tall — frontend/app/globals.css .nav-bar). The
   engine's sticky sidebar offsets follow via --topbar-h. */
:root { --topbar-h: 64px; }
.lt-sitenav {
  background: rgba(10, 10, 10, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.lt-sitenav .lt-logo { font-size: 1.05rem; }
.lt-sitenav .lt-nav-link { color: #d1d5db; font-size: 0.875rem; }
.lt-sitenav .lt-nav-link:hover { color: #ffffff; }
.lt-sitenav .lt-lang {
  color: var(--accent);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
}
