/* Layout and colors are shared by the generated home and chapter pages. */
:root {
  color-scheme: light;
  --page-bg: #faf8f4;
  --surface: #fffefa;
  --surface-muted: #f1eee7;
  --text: #253446;
  --muted: #626d78;
  --heading: #17364f;
  --accent: #ac4b25;
  --accent-hover: #873b1d;
  --accent-soft: #f8e9df;
  --line: #dedfd9;
  --code-bg: #eeeee8;
  --focus: #bf572e;
  --header-bg: rgba(250, 248, 244, 0.96);
  --shadow: 0 14px 44px rgba(25, 44, 60, 0.07);
  --reading-size: 18px;
  --header-height: 76px;
  --sidebar-width: 258px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page-bg: #141c24;
  --surface: #1b2631;
  --surface-muted: #222e39;
  --text: #dce1e5;
  --muted: #a5afb7;
  --heading: #f0f0e9;
  --accent: #eea477;
  --accent-hover: #ffc39c;
  --accent-soft: #382c27;
  --line: #37424c;
  --code-bg: #202b35;
  --focus: #f4b18a;
  --header-bg: rgba(20, 28, 36, 0.96);
  --shadow: 0 14px 44px rgba(0, 0, 0, 0.18);
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-height) + 24px); }
body { margin: 0; background: var(--page-bg); color: var(--text); line-height: 1.7; -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
button, input { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.42; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
::selection { background: var(--accent-soft); color: var(--heading); }
img { max-width: 100%; height: auto; }

.skip-link { position: fixed; top: 12px; left: 16px; z-index: 100; padding: 8px 16px; background: var(--heading); color: var(--page-bg); transform: translateY(-160%); border-radius: 6px; }
.skip-link:focus { transform: translateY(0); color: var(--page-bg); }
.site-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--header-height); padding: 0 max(28px, calc((100vw - 1440px) / 2)); background: var(--header-bg); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--heading); text-decoration: none; line-height: 1.4; flex-shrink: 0; }
.brand:hover { color: var(--heading); }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 11px; background: var(--heading); color: var(--page-bg); font-family: Georgia, serif; font-size: 26px; font-weight: 700; }
.brand > span:not(.brand-mark) { font-weight: 750; letter-spacing: 0.02em; }
.brand small { display: block; color: var(--muted); font-size: 11px; font-weight: 450; letter-spacing: 0.08em; }
.header-actions { display: flex; align-items: center; gap: 18px; font-size: 13px; }
.header-actions a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.header-actions a:hover { color: var(--accent); }
.header-actions .download-link { color: var(--accent); font-weight: 650; }
.header-actions button { min-height: 36px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font-size: 12px; white-space: nowrap; }
.header-actions button:hover { background: var(--surface-muted); }
#menu-toggle { display: none; }

.layout { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); gap: 54px; max-width: 1440px; margin: 0 auto; padding: 36px 28px 72px; align-items: start; }
.sidebar { position: sticky; top: calc(var(--header-height) + 28px); max-height: calc(100vh - var(--header-height) - 56px); max-height: calc(100dvh - var(--header-height) - 56px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; padding: 8px 16px 28px 0; }
.sidebar nav > p, .sidebar nav > h2, .sidebar > h2 { margin: 0 0 16px 12px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; }
.chapter-list { margin: 0; padding: 0; list-style: none; }
.chapter-list li { margin: 0 0 3px; }
.chapter-list a { display: block; padding: 9px 11px; border-left: 2px solid transparent; border-radius: 0 6px 6px 0; color: var(--muted); text-decoration: none; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.chapter-list a:hover { background: var(--surface-muted); color: var(--heading); }
.chapter-list a[aria-current="page"] { border-left-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.chapter-list a span { color: inherit; }
.chapter-list a { display: flex; align-items: baseline; gap: 9px; }
.chapter-list .chapter-number { flex: 0 0 2.2em; font-size: 11px; }
.sidebar-heading { margin: 0 0 14px 12px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; }
.source-note { margin: 20px 0 0 13px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.9; }
.main-content { min-width: 0; padding: 6px 0 0; }
.reader .main-content { width: 100%; max-width: 76ch; margin: 0 auto; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 750; line-height: 1.5; letter-spacing: 0.14em; }
.site-footer { max-width: 1440px; margin: 0 auto; padding: 24px 28px 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.9; }
.site-footer p { margin: 0; }
.site-footer a { color: inherit; }

/* The home page uses the same chapter navigation as the reader. */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 246px); align-items: center; gap: 42px; padding: 16px 0 40px; }
.hero-copy .eyebrow { margin: 0 0 20px; }
.hero h1 { margin: 0 0 24px; color: var(--heading); font-size: clamp(32px, 3.6vw, 51px); font-weight: 760; line-height: 1.3; letter-spacing: -0.035em; text-wrap: balance; }
.hero .lede { max-width: 34em; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.95; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 29px; }
.primary-button, .secondary-button { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 10px 20px; border: 1px solid var(--accent); border-radius: 7px; font-size: 14px; font-weight: 650; line-height: 1.5; text-decoration: none; }
.primary-button { background: var(--accent); color: var(--surface); }
.primary-button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--surface); }
html[data-theme="dark"] .primary-button { color: #1c2630; }
.secondary-button { border-color: var(--line); color: var(--heading); background: transparent; }
.secondary-button:hover { color: var(--accent); border-color: var(--accent); }
.cover { display: block; width: 100%; max-width: 246px; justify-self: end; border-radius: 3px 9px 9px 3px; border: 1px solid rgba(30, 48, 64, 0.12); box-shadow: 0 23px 47px rgba(25, 44, 60, 0.18), 4px 4px 0 var(--surface-muted); }
.book-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 0 0 48px; padding: 25px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.book-stats > div { min-width: 0; }
.book-stats dt { color: var(--heading); font-size: 22px; font-weight: 700; }
.book-stats dd { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.home section h2 { margin: 0 0 12px; color: var(--heading); font-size: 24px; line-height: 1.5; letter-spacing: -0.015em; }
.learning-path { margin-bottom: 48px; }
.learning-path > p, #all-chapters > p { margin: 0 0 22px; color: var(--muted); font-size: 14px; }
.path-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.path-card, .chapter-card { display: block; color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.path-card { padding: 20px 18px; border-top: 3px solid var(--accent); }
.path-card:hover, .chapter-card:hover { color: var(--text); border-color: var(--accent); box-shadow: var(--shadow); }
.path-card h3, .path-card strong { display: block; margin: 0 0 8px; color: var(--heading); font-size: 16px; line-height: 1.6; }
.path-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.85; }
.path-card > span { display: block; color: var(--accent); font-size: 11px; font-weight: 650; }
.chapter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.chapter-card { padding: 17px 18px; }
.chapter-card > span, .chapter-card small { display: block; color: var(--muted); font-size: 11px; }
.chapter-card h3, .chapter-card strong { display: block; margin: 4px 0 6px; color: var(--heading); font-size: 15px; font-weight: 650; line-height: 1.6; }
.chapter-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }

/* Prose sizing changes independently from navigation and controls. */
.reading-topline { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 32px; margin-bottom: 23px; }
.font-controls { display: flex; align-items: center; gap: 5px; }
.font-controls button { min-width: 36px; min-height: 32px; padding: 3px 9px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.font-controls button:not(:disabled):hover { background: var(--surface-muted); border-color: var(--muted); }
.prose { max-width: 72ch; font-size: var(--reading-size); line-height: 1.95; overflow-wrap: break-word; }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--heading); line-height: 1.5; font-weight: 700; scroll-margin-top: calc(var(--header-height) + 24px); }
.prose h1 { margin: 0 0 1em; padding-bottom: 0.75em; border-bottom: 1px solid var(--line); font-size: 1.95em; letter-spacing: -0.03em; text-wrap: balance; }
.prose h2 { margin: 2.3em 0 0.9em; font-size: 1.35em; letter-spacing: -0.015em; }
.prose h3 { margin: 1.85em 0 0.7em; font-size: 1.12em; }
.prose h4 { margin: 1.5em 0 0.6em; font-size: 1em; }
.prose p { margin: 0 0 1.25em; }
.prose strong { color: var(--heading); font-weight: 650; }
.prose a { overflow-wrap: anywhere; }
.prose ul, .prose ol { margin: 0 0 1.3em; padding-left: 1.6em; }
.prose li { margin: 0.4em 0; padding-left: 0.15em; }
.prose li > p { margin: 0.5em 0; }
.prose li::marker { color: var(--muted); }
.prose blockquote { margin: 1.6em 0; padding: 0.9em 1.2em; border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0; background: var(--accent-soft); color: var(--text); font-size: 0.95em; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { margin: 2.5em 0; border: 0; border-top: 1px solid var(--line); }
.prose code, .prose pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-variant-ligatures: none; }
.prose :not(pre) > code { padding: 0.15em 0.33em; border-radius: 4px; background: var(--code-bg); font-size: 0.84em; overflow-wrap: anywhere; }
.prose pre { margin: 1.5em 0; max-width: 100%; padding: 19px 21px; border: 1px solid var(--line); border-radius: 8px; background: var(--code-bg); font-size: 0.78em; line-height: 1.8; white-space: pre; overflow: auto; tab-size: 2; scrollbar-width: thin; }
.prose pre code { padding: 0; color: inherit; background: transparent; font-size: inherit; overflow-wrap: normal; }
.prose div.sourceCode { margin: 1.5em 0; }
.prose div.sourceCode pre { margin: 0; }
.prose code span.kw, .prose code span.cf { color: var(--accent); }
.prose code span.co { color: var(--muted); }
.prose table { display: block; width: max-content; max-width: 100%; margin: 1.6em 0; border-collapse: collapse; font-size: 0.86em; line-height: 1.8; overflow-x: auto; }
.prose th, .prose td { padding: 10px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; min-width: 5em; }
.prose th { color: var(--heading); background: var(--surface-muted); font-weight: 650; }
.prose tr:nth-child(even) td { background: var(--surface); }
.prose figure { margin: 1.8em 0; }
.prose figure img { display: block; margin: 0 auto; }
.prose figcaption { margin-top: 0.7em; color: var(--muted); font-size: 0.8em; text-align: center; }
.prose .footnotes { margin-top: 2.5em; color: var(--muted); font-size: 0.85em; }
.on-this-page { margin: 0 0 2em; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-muted); font-size: 0.78em; }
.on-this-page summary { color: var(--heading); cursor: pointer; font-weight: 650; }
.on-this-page nav { margin-top: 8px; }
.on-this-page ol { margin: 0; padding-left: 1.4em; }
.on-this-page li { margin: 2px 0; }
.on-this-page a { color: var(--muted); }
.on-this-page a:hover { color: var(--accent); }
.chapter-pagination { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 50px; padding-top: 27px; border-top: 1px solid var(--line); }
.chapter-pagination a { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 17px 19px; border: 1px solid var(--line); border-radius: 8px; color: var(--heading); background: var(--surface); text-decoration: none; }
.chapter-pagination a:hover { border-color: var(--accent); }
.chapter-pagination a span { color: var(--muted); font-size: 11px; }
.chapter-pagination a strong { font-size: 14px; font-weight: 600; line-height: 1.7; }
.chapter-pagination .next { grid-column: 2; text-align: right; }
.chapter-pagination .prev { grid-column: 1; }

@media (min-width: 1600px) {
  .layout { gap: 76px; }
}

@media (max-width: 1100px) {
  :root { --sidebar-width: 220px; }
  .layout { gap: 30px; }
  .hero { grid-template-columns: minmax(0, 1fr) 180px; gap: 24px; }
  .hero h1 { font-size: 34px; }
  .path-grid { grid-template-columns: 1fr; }
  .path-card { padding: 17px 19px; }
}

@media (max-width: 900px) {
  :root { --header-height: 68px; }
  .site-header { gap: 12px; padding: 0 22px; }
  .header-actions { gap: 10px; }
  .header-actions .repo-link { display: none; }
  .layout { display: block; max-width: 840px; padding: 25px 24px 54px; }
  .sidebar { position: static; max-height: none; margin: 0 0 30px; padding: 0 0 22px; border-bottom: 1px solid var(--line); }
  .chapter-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; }
  .chapter-list a { padding: 8px 10px; }
  .nav-enhanced #menu-toggle { display: inline-block; }
  .nav-enhanced .sidebar { display: none; position: fixed; top: var(--header-height); left: 0; right: 0; z-index: 40; max-height: calc(100vh - var(--header-height)); max-height: calc(100dvh - var(--header-height)); margin: 0; padding: 22px 24px 30px; overflow-y: auto; background: var(--surface); box-shadow: var(--shadow); border-bottom: 1px solid var(--line); }
  .nav-enhanced body.nav-open .sidebar { display: block; }
  .nav-enhanced body.nav-open #menu-toggle { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
  .hero { grid-template-columns: minmax(0, 1fr) 210px; padding-top: 14px; gap: 34px; }
  .hero h1 { font-size: 39px; }
  .path-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-footer { padding-left: 24px; padding-right: 24px; }
}

@media (max-width: 600px) {
  :root { --header-height: 64px; }
  .site-header { padding: 0 16px; gap: 8px; }
  .brand { gap: 8px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 8px; font-size: 22px; }
  .brand > span:not(.brand-mark) { font-size: 13px; }
  .brand small { font-size: 9px; letter-spacing: 0.03em; }
  .header-actions { gap: 7px; }
  .header-actions .download-link { font-size: 11px; }
  .header-actions button { padding: 5px 8px; min-height: 34px; font-size: 11px; }
  .layout { padding: 22px 19px 42px; }
  .chapter-list { grid-template-columns: 1fr; }
  .nav-enhanced .sidebar { padding: 15px 19px 26px; }
  .chapter-list a { font-size: 14px; padding-top: 10px; padding-bottom: 10px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 31px; padding: 10px 0 33px; }
  .hero h1 { max-width: 12em; font-size: 36px; margin-bottom: 19px; }
  .hero-copy .eyebrow { margin-bottom: 15px; }
  .hero .lede { font-size: 15px; line-height: 1.9; }
  .hero-actions { margin-top: 23px; }
  .cover { width: 180px; justify-self: center; }
  .book-stats { gap: 12px; padding: 19px 0; margin-bottom: 34px; }
  .book-stats dt { font-size: 20px; }
  .book-stats dd { font-size: 11px; }
  .home section h2 { font-size: 22px; }
  .learning-path { margin-bottom: 36px; }
  .path-grid { grid-template-columns: 1fr; gap: 11px; }
  .chapter-grid { grid-template-columns: 1fr; gap: 10px; }
  .chapter-card { padding: 16px 18px; }
  .reading-topline { margin-bottom: 20px; }
  .prose { line-height: 1.95; }
  .prose h1 { font-size: 1.68em; }
  .prose h2 { margin-top: 2em; font-size: 1.24em; }
  .prose pre { margin-left: -4px; margin-right: -4px; padding: 15px 14px; max-width: calc(100% + 8px); font-size: 0.75em; }
  .prose th, .prose td { padding: 9px 11px; }
  .prose blockquote { padding: 0.8em 1em; }
  .chapter-pagination { gap: 10px; margin-top: 36px; padding-top: 23px; }
  .chapter-pagination a { padding: 13px 12px; }
  .chapter-pagination a strong { font-size: 13px; }
  .site-footer { padding: 22px 19px 26px; font-size: 11px; }
}

@media (max-width: 370px) {
  .brand small { display: none; }
  .header-actions .download-link { display: none; }
  .hero h1 { font-size: 32px; }
}

@media (prefers-reduced-motion: no-preference) {
  a, button { transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease; }
  .path-card, .chapter-card { transition: border-color 120ms ease, box-shadow 120ms ease; }
}

@media print {
  :root { --reading-size: 11pt; }
  body { background: white; color: black; }
  .site-header, .sidebar, .reading-topline, .chapter-pagination, .skip-link, .hero-actions { display: none !important; }
  .layout { display: block; max-width: none; padding: 0; }
  .main-content, .reader .main-content, .prose { max-width: none; width: auto; margin: 0; }
  .prose h1, .prose h2, .prose h3 { color: black; break-after: avoid; }
  .prose pre, .prose blockquote, .prose tr { break-inside: avoid; }
  .prose pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  .prose a { color: black; }
  .site-footer { margin-top: 24pt; padding: 12pt 0; color: black; }
}

/* BEGIN AIAS SHARED READER */
/* Aias Reader 1.0 — vendored into each book; no remote assets required. */
@media screen {
  :root {
    --reader-page: #f7f7f3 !important;
    --reader-surface: #fffefa !important;
    --reader-text: #292e34 !important;
    --reader-muted: #626b74 !important;
    --reader-line: #dedfd9 !important;
    --reader-accent: #28685c !important;
    --reader-soft: #eaf0eb !important;
    --reader-code: #eff0ec !important;
    --reader-keyword: #73579d !important;
    --reader-string: #28685c !important;
    --reader-number: #955028 !important;
    color-scheme: light !important;
  }
  :root[data-theme="dark"], body.dark, body[data-md-color-scheme="slate"] {
    --reader-page: #1c1f24 !important;
    --reader-surface: #22262c !important;
    --reader-text: #d7dce2 !important;
    --reader-muted: #a0a8b3 !important;
    --reader-line: #3b414a !important;
    --reader-accent: #91c5b5 !important;
    --reader-soft: #2b3835 !important;
    --reader-code: #282d34 !important;
    --reader-keyword: #c6afe8 !important;
    --reader-string: #a4c6a0 !important;
    --reader-number: #dfb385 !important;
    color-scheme: dark !important;
  }
  /* Adapt the existing readers without changing their content or navigation. */
  :root, body {
    --bg: var(--reader-page) !important;
    --page-bg: var(--reader-page) !important;
    --paper: var(--reader-surface) !important;
    --surface: var(--reader-surface) !important;
    --panel: var(--reader-surface) !important;
    --surface-muted: var(--reader-code) !important;
    --ink: var(--reader-text) !important;
    --fg: var(--reader-text) !important;
    --text: var(--reader-text) !important;
    --heading: var(--reader-text) !important;
    --muted: var(--reader-muted) !important;
    --line: var(--reader-line) !important;
    --accent: var(--reader-accent) !important;
    --accent-hover: var(--reader-accent) !important;
    --accent-soft: var(--reader-soft) !important;
    --code: var(--reader-code) !important;
    --code-bg: var(--reader-code) !important;
    --focus: var(--reader-accent) !important;
    --header-bg: var(--reader-page) !important;
    --md-default-bg-color: var(--reader-page) !important;
    --md-default-fg-color: var(--reader-text) !important;
    --md-default-fg-color--light: var(--reader-muted) !important;
    --md-default-fg-color--lighter: var(--reader-line) !important;
    --md-primary-fg-color: var(--reader-surface) !important;
    --md-primary-bg-color: var(--reader-text) !important;
    --md-accent-fg-color: var(--reader-accent) !important;
    --md-typeset-color: var(--reader-text) !important;
    --md-typeset-a-color: var(--reader-accent) !important;
    --md-code-bg-color: var(--reader-code) !important;
    --md-code-fg-color: var(--reader-text) !important;
    --md-code-hl-comment-color: var(--reader-muted) !important;
    --md-code-hl-keyword-color: var(--reader-keyword) !important;
    --md-code-hl-string-color: var(--reader-string) !important;
    --md-code-hl-number-color: var(--reader-number) !important;
  }
  html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--reader-line) var(--reader-page); }
  body {
    background: var(--reader-page) !important;
    color: var(--reader-text) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif !important;
    -webkit-font-smoothing: antialiased;
  }
  ::selection { background: var(--reader-accent); color: var(--reader-page); }
  :focus-visible { outline: 2px solid var(--reader-accent); outline-offset: 4px; }
  :is(main, article, .prose, .book-content, #book, .md-typeset, .aias-basic-reader) {
    font-family: inherit;
    font-size: var(--reader-size, var(--body-size, var(--reading-size, var(--size, 18px)))) !important;
    line-height: 1.95;
    overflow-wrap: break-word;
  }
  :is(main, article, .prose, .book-content, #book, .md-typeset, .aias-basic-reader) :is(h1, h2, h3, h4) {
    color: var(--reader-text) !important;
    font-family: inherit;
    line-height: 1.5;
    font-weight: 650;
  }
  :is(main, article, .prose, .book-content, #book, .md-typeset, .aias-basic-reader) p { text-align: start; }
  :is(main, article, .prose, .book-content, #book, .md-typeset, .aias-basic-reader) a {
    color: var(--reader-accent) !important;
    text-decoration-color: var(--reader-accent);
    text-underline-offset: .2em;
    overflow-wrap: anywhere;
  }
  :is(main, article, .prose, .book-content, #book, .md-typeset, .aias-basic-reader) pre {
    background: var(--reader-code) !important;
    color: var(--reader-text) !important;
    border: 1px solid var(--reader-line) !important;
    border-radius: 8px;
    max-width: 100%;
    overflow-x: auto;
    white-space: pre;
    overflow-wrap: normal;
    line-height: 1.75;
    tab-size: 4;
    scrollbar-width: thin;
  }
  :is(main, article, .prose, .book-content, #book, .md-typeset, .aias-basic-reader) code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-variant-ligatures: none;
  }
  :is(main, article, .prose, .book-content, #book, .md-typeset, .aias-basic-reader) :not(pre) > code {
    background: var(--reader-code) !important;
    color: var(--reader-text) !important;
    border-radius: 4px;
    padding: .12em .3em;
  }
  :is(main, article, .prose, .book-content, #book, .md-typeset, .aias-basic-reader) pre code {
    background: transparent !important;
    color: inherit !important;
    padding: 0;
    white-space: pre;
    overflow-wrap: normal;
  }
  :is(main, article, .prose, .book-content, #book, .md-typeset, .aias-basic-reader) pre code span { color: inherit !important; }
  :is(main, article, .prose, .book-content, #book, .md-typeset, .aias-basic-reader) pre code :is(.kw, .cf, .dt, .bu, .fu, .k, .kn, .kd, .kc, .kt) { color: var(--reader-keyword) !important; }
  :is(main, article, .prose, .book-content, #book, .md-typeset, .aias-basic-reader) pre code :is(.st, .ch, .vs, .s, .s1, .s2) { color: var(--reader-string) !important; }
  :is(main, article, .prose, .book-content, #book, .md-typeset, .aias-basic-reader) pre code :is(.dv, .bn, .fl, .mi, .mf) { color: var(--reader-number) !important; }
  :is(main, article, .prose, .book-content, #book, .md-typeset, .aias-basic-reader) pre code :is(.co, .cv, .an, .do, .c, .c1, .cm, .cp) { color: var(--reader-muted) !important; font-style: normal; }
  :is(main, article, .prose, .book-content, #book, .md-typeset, .aias-basic-reader) blockquote {
    background: var(--reader-soft) !important;
    color: var(--reader-text) !important;
    border-left: 3px solid var(--reader-accent) !important;
  }
  :is(main, article, .prose, .book-content, #book, .md-typeset, .aias-basic-reader) :is(th, td) { border-color: var(--reader-line) !important; }
  :is(main, article, .prose, .book-content, #book, .md-typeset, .aias-basic-reader) th { background: var(--reader-code) !important; color: var(--reader-text) !important; }
  :is(main, article, .prose, .book-content, #book, .md-typeset, .aias-basic-reader) :is(img, svg) { max-width: 100%; height: auto; }
  :is(.sidebar, #sidebar, .book-sidebar, .md-sidebar, .mobile-header, .mobile-menu nav) {
    background: var(--reader-surface) !important;
    color: var(--reader-text) !important;
    border-color: var(--reader-line) !important;
  }
  :is(aside, .sidebar, .md-sidebar) a { color: var(--reader-muted); }
  :is(aside, .sidebar, .md-sidebar) a:hover,
  :is(aside, .sidebar, .md-sidebar) a[aria-current] { color: var(--reader-accent) !important; background: var(--reader-soft) !important; }
  :is(.brand-title, .brand-subtitle, .nav-number, .sidebar-brand .eyebrow, .edition) { color: var(--reader-muted) !important; }
  :is(.primary-action, .button-primary, .primary-button, .start, .hero .button) {
    background: var(--reader-accent) !important;
    color: var(--reader-page) !important;
    border-color: var(--reader-accent) !important;
  }
  .contents-list a:hover { background: var(--reader-soft) !important; }
  .aias-basic-reader > #title-block-header { display: none; }
  .aias-basic-reader #TOC:not(:has(a)) { display: none; }
  .aias-basic-reader h1 { font-size: 1.7em; margin-top: 1.4em; }
  .aias-basic-reader blockquote { margin-inline: 0; padding: .5em 1.1em; }
  .aias-reader-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 0; margin: 0 0 16px; font-size: 13px; }
  .aias-reader-tools a { color: var(--reader-muted); }
  .aias-reader-theme {
    color: var(--reader-text) !important;
    background: var(--reader-surface) !important;
    border: 1px solid var(--reader-line) !important;
    border-radius: 6px;
    padding: 7px 11px;
    font: inherit;
    font-size: 12px;
    line-height: 1.5;
    min-height: 34px;
    cursor: pointer;
  }
  @media (max-width: 680px) {
    :is(main, article, .prose, .book-content, #book, .md-typeset, .aias-basic-reader) {
      font-size: var(--reader-size, var(--body-size, var(--reading-size, var(--size, 17px)))) !important;
    }
  }
}
/* END AIAS SHARED READER */
