/* Scoped HTML lesson styles; existing Markdown styles remain untouched. */
.html-lessons { max-width: 1100px; margin: auto; padding: 24px; background: white; border: 1px solid var(--border-color); border-radius: 12px; overflow-wrap: anywhere; }
.html-lessons h1, .html-reader h1 { color: var(--text-main); }
.html-filter { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; margin: 24px 0; }
.html-filter label { display: flex; flex-direction: column; flex: 1 1 220px; min-width: 0; }
.html-filter input, .html-filter select { width: 100%; min-width: 0; min-height: 44px; padding: 8px; border: 1px solid var(--border-color); border-radius: 6px; font: inherit; background: white; }
.html-lessons button, .html-pagination a { min-height: 44px; }
.html-page-list { list-style: none; }
.html-page-list li { border-top: 1px solid var(--border-color); padding: 20px 0; }
.html-page-list h2 { font-size: 1.2rem; }
.html-page-list h2 a { display: inline-flex; align-items: center; min-height: 44px; }
.html-page-meta { font-size: .85rem; color: var(--text-muted); margin-top: 8px; }
.html-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; align-items: center; }
.html-reader { min-width: 0; }
.html-reader-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-bottom: 12px; overflow-wrap: anywhere; }
.html-reader-toolbar h1 { font-size: 1.4rem; min-width: 0; }
.html-reader-toolbar a { display: inline-flex; align-items: center; min-height: 44px; }
.html-reader-toolbar button { min-height: 44px; padding: 8px 12px; border: 1px solid var(--border-color); border-radius: 6px; font: inherit; cursor: pointer; background: white; }
.html-reader-toolbar button[aria-pressed="true"] { background: #e0f2fe; color: #075985; }
.html-translation-notice { margin-bottom: 12px; }
.html-lesson-frame { display: block; width: 100%; height: calc(100vh - 200px); height: calc(100dvh - 200px); min-height: 360px; border: 1px solid var(--border-color); background: white; border-radius: 8px; }
/* The fourth navigation item needs a little more room before collapsing. */
@media (min-width: 1101px) and (max-width: 1350px) {
  .header-container { gap: 8px; }
  .header-nav { gap: 0; }
  .header-nav .nav-link { padding-left: 8px; padding-right: 8px; }
  .brand-section { flex: 1; min-width: 0; }
  .brand-logo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 767px) {
  .html-lessons { padding: 16px 12px; }
  .html-filter { flex-direction: column; align-items: stretch; }
  .html-filter label { flex: auto; }
  .html-lesson-frame { min-height: 360px; }
}
