.md-content { overflow-wrap: break-word; }
.md-content table { display: block; max-width: 100%; overflow-x: auto; }
.md-content code { overflow-wrap: anywhere; }
.md-content pre code { overflow-wrap: normal; }
.md-content .katex-display,
.md-content mjx-container[display="true"] { overflow-x: auto; overflow-y: hidden; max-width: 100%; }
.md-content .math-display { max-width: 100%; }

.lfbs-pager { flex-wrap: wrap; }
.lfbs-pager-next { margin-left: auto; text-align: right; }

a.lfbs-done-link::after { content: " \2713"; color: #059669; font-weight: 700; text-decoration: none; display: inline-block; margin-left: 0.15rem; }

.lfbs-check { width: 1.05rem; height: 1.05rem; margin-right: 0.45rem; vertical-align: -0.15rem; accent-color: #059669; cursor: pointer; }
li.lfbs-task { list-style: none; margin-left: -1.25rem; }

.lfbs-done-bar { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid #e5e7eb; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.lfbs-done-btn { border: 1px solid #d1d5db; background: #fff; color: #374151; border-radius: 9999px; padding: 0.45rem 1rem; font-weight: 600; font-size: 0.9rem; cursor: pointer; }
.lfbs-done-btn:hover { background: #f3f4f6; }
.lfbs-done-btn[aria-pressed="true"] { background: #059669; border-color: #059669; color: #fff; }
.lfbs-done-note { color: #6b7280; font-size: 0.85rem; }

.lfbs-toc-inline { margin: 0 0 1.5rem; border: 1px solid #e5e7eb; border-radius: 0.5rem; background: #f9fafb; }
.lfbs-toc-inline > summary { padding: 0.6rem 1rem; font-weight: 600; cursor: pointer; color: #374151; }
.lfbs-toc-inline ol, .lfbs-toc-side ol { list-style: none; margin: 0; padding: 0 1rem 0.75rem; }
.lfbs-toc-inline li, .lfbs-toc-side li { margin: 0.2rem 0; line-height: 1.35; }
.lfbs-toc-inline a, .lfbs-toc-side a { color: #4b5563; text-decoration: none; font-size: 0.875rem; }
.lfbs-toc-inline a:hover, .lfbs-toc-side a:hover { color: #111827; text-decoration: underline; }
.lfbs-toc-sub { padding-left: 0.9rem; }
.lfbs-toc-side { display: none; }
@media (min-width: 1440px) {
  .lfbs-toc-side { display: block; position: fixed; top: 2rem; right: 1.5rem; width: 15rem; max-height: calc(100vh - 4rem); overflow-y: auto; background: #fff; border: 1px solid #e5e7eb; border-radius: 0.75rem; padding-top: 0.75rem; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.06); }
  .lfbs-toc-side .lfbs-toc-title { padding: 0 1rem 0.5rem; font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; }
  .lfbs-toc-side a.lfbs-active { color: #111827; font-weight: 600; }
  .lfbs-has-side-toc .lfbs-toc-inline { display: none; }
}

.lfbs-progress-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 0.75rem; padding: 1rem 1.25rem; margin: 0 auto 1.5rem; max-width: 56rem; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05); }
.lfbs-progress-row { display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 0.75rem; align-items: center; margin: 0.75rem 0; font-size: 0.9rem; }
.lfbs-progress-name { font-weight: 600; color: #111827; }
.lfbs-progress-count { color: #6b7280; text-align: right; }
.lfbs-progress-track { grid-column: 1 / -1; grid-row: 2; height: 0.5rem; background: #e5e7eb; border-radius: 9999px; overflow: hidden; }
.lfbs-progress-fill { height: 100%; background: #059669; border-radius: 9999px; }
.lfbs-progress-row .lfbs-continue { grid-column: 1 / -1; }
.lfbs-continue { color: #047857; font-weight: 600; text-decoration: none; }
.lfbs-continue:hover { text-decoration: underline; }
.lfbs-progress-card h2 { font-size: 1rem; font-weight: 600; color: #111827; margin-bottom: 0.4rem; }
