/* Shared reading corrections; mathematical SVGs retain their renderer dimensions. */
.notes-page { overflow-wrap: anywhere; }
.notes-page main, .notes-page [role="main"], .notes-page .main,
.notes-page .main-content, .notes-page .container { min-width: 0; }
.notes-page table { display: block; max-width: 100%; overflow-x: auto; }
.notes-page .notes-table { overflow-x: auto; margin: 20px 0; }
.notes-page .notes-table table { display: table; min-width: 100%; margin: 0; overflow: visible; }
.notes-page pre, .notes-page .math-block, .notes-page .formula-box,
.notes-page .diagram { max-width: 100%; overflow-x: auto; }
.notes-page pre code.hljs { overflow: visible; padding: 0; background: transparent; }
.notes-page .katex-display { max-width: 100%; overflow-x: auto; overflow-y: hidden; }
.notes-page mjx-container { max-width: 100%; overflow-x: auto; overflow-y: hidden; }
.notes-page mjx-assistive-mml { max-width: 100%; }
.notes-page img { max-width: 100%; height: auto; }
.notes-page :focus-visible { outline: 3px solid #0f766e; outline-offset: 3px; }
.notes-page .hljs-comment, .notes-page .hljs-deletion,
.notes-page .hljs-meta { color: #b7b39e; }
.notes-page .hljs-attr, .notes-page .hljs-keyword,
.notes-page .hljs-name, .notes-page .hljs-selector-tag { color: #ff75a5; }
.notes-page .hljs-literal, .notes-page .hljs-number,
.notes-page .hljs-regexp { color: #c4a4ff; }
.notes-page .roadmap pre code.hljs { color: #fff; background: #23241f; padding: 16px; }
.notes-page .q-answer { display: block; }
.notes-page .q-toggle { display: none; }
.notes-page .q-disclosure { width: 100%; }
.notes-page .q-disclosure summary { cursor: pointer; padding: 10px 0; color: #1e40af; }
.notes-page .q-item:has(.q-disclosure) { flex-wrap: wrap; }
.notes-page .q-item:has(.q-disclosure) > .q-text { flex: 1; min-width: 0; }
.notes-page .math-status { padding: 12px 16px; background: #fef3c7; color: #78350f; }
.course-page .header { flex-wrap: wrap; height: auto; min-height: var(--header-h); padding: 8px 16px; gap: 4px 12px; }
.course-page .header h1 { color: #fff; margin: 0; padding: 0; border: 0; font-size: 1rem; }
.course-page .header .nav-links { min-width: 0; max-width: 100%; overflow-x: auto; white-space: nowrap; }
.course-page .header .nav-links a { flex: 0 0 auto; }
.course-page .main { padding-top: 56px; }
.course-page { --primary: #0f766e; --primary-dark: #115e59; --text-light: #706b65; }
.study-page { --primary: #2563eb; --primary-dark: #1d4ed8; --text-light: #526077; }
.guide-page { --accent: #a45309; --success: #047857; --danger: #b91c1c; --pink: #be185d; --teal: #0f766e; }
.guide-page:has(.main-content), .guide-page:has(.sidebar-outline) { --primary: #0f766e; }
.notes-page .q-tag.alibaba, .notes-page .q-tag.meituan { color: #8a4200; }
.notes-page [id] { scroll-margin-top: calc(var(--header-h, 0px) + 24px); }
@media (max-width: 1024px) {
  .course-page .sidebar { visibility: hidden; }
  .course-page .sidebar.open { visibility: visible; }
  .course-page .sidebar-toggle { top: calc(var(--header-h) + 8px); }
  .course-page:not(.notes-js) .sidebar {
    position: static; transform: none; visibility: visible; width: auto;
    height: auto; margin-top: var(--header-h); max-height: none;
  }
  .course-page:not(.notes-js) .sidebar-toggle { display: none; }
  .course-page:not(.notes-js) .sidebar + .main { margin-top: 0; padding-top: 24px; }
  .guide-page:not(.notes-js) .sidebar {
    position: static; transform: none; display: block; visibility: visible;
    width: auto; height: auto; max-height: none;
  }
  .guide-page:not(.notes-js) .container { display: block; }
  .guide-page:not(.notes-js) .main, .guide-page:not(.notes-js) .main-content { margin-left: 0; }
  .guide-page:not(.notes-js) .menu-btn { display: none; }
}
@media (max-width: 600px) {
  .course-page .header .nav-links { margin-left: 0; width: 100%; }
  .notes-page nav.toc ol { columns: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .notes-page, .notes-page * { scroll-behavior: auto; animation: none; transition: none; }
}
