/* Metadata and discovery only. Uses the shared font family, never the shared sheet. */
.lf-meta, .lf-filter, .lf-chip, .features-page { --lf-ink: #141714; --lf-bg: var(--bg, #faf8f6); --lf-line: #545b54; --lf-accent: #135b36; color: var(--lf-ink); font-family: var(--ui); }
:root[data-theme="dark"] :is(.lf-meta,.lf-filter,.lf-chip,.features-page), [data-theme="dark"] :is(.lf-meta,.lf-filter,.lf-chip,.features-page) { --lf-ink: #f8faf5; --lf-bg: var(--bg, #0c1017); --lf-line: #b4beb5; --lf-accent: #b5dfbe; }
.lf-meta { margin: 22px 0; font-size: 18px; line-height: 1.6; background: var(--lf-bg); }
.lf-row { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; overflow-x: auto; padding: 3px 20px 10px 3px; scrollbar-width: thin; }
/* One chip on every page: a lesson badge here and a catalog tag (site/catalog-tags.css) declare the same box, so the two
   stand on the lesson head as one row of pills (tests/py/test_page_cohesion.py holds them equal). */
.lf-chip { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; box-sizing: border-box; min-height: 44px; padding: 0 14px; border: 1px solid var(--dim); border-radius: 999px; background: transparent; font: 600 15px/1.4 var(--ui); white-space: nowrap; }
.lf-chip .lf-star { flex: none; fill: var(--lf-accent); }
/* The keystone badge holds the rest of its sentence in .sr-only, which is absolutely placed: the badge is its containing
   block, so those words stay inside the badge row's scroller and never widen the page (lesson.spec.js P5.7). */
.lf-keystone { position: relative; }
.lf-meta summary { cursor: pointer; min-height: 44px; padding: 10px 0; font: 600 15px/1.6 var(--ui); color: var(--lf-ink); }
.lf-explanation, .lf-path-body { padding: 0 18px 18px; border-left: 2px solid var(--lf-accent); }
.lf-meta p, .lf-meta li { font: 18px/1.6 var(--ui); color: var(--lf-ink); }
.lf-meta a, .features-page a { color: var(--lf-ink); text-decoration: underline; text-underline-offset: 3px; }
.contents [data-time-left] { font: 15px/1.6 var(--ui); color: inherit; }
.lf-meta :focus-visible, .lf-filter :focus-visible, .features-page :focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.lf-filter { margin: 18px 0; font-size: 15px; }
.lf-filter select { font: 15px var(--ui); background: var(--lf-bg); color: var(--lf-ink); border: 1px solid var(--lf-line); min-height: 44px; padding: 8px; max-width: 100%; }
[data-levels][hidden], li.unit[hidden], .lf-filter[hidden] { display: none !important; }
.features-page { max-width: 1100px; margin: 0 auto; background: var(--lf-bg); padding: 28px; font-size: 18px; line-height: 1.6; }
.features-page h1 { font: 700 36px/1.15 var(--ui); max-width: 700px; margin-bottom: 22px; }
.features-page h2 { font: 650 28px/1.25 var(--ui); }
.features-page p { color: var(--lf-ink); font-size: 18px; }
.feature-entry { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; padding: 36px 0; border-top: 1px solid var(--lf-line); align-items: start; }
.feature-entry img { width: 100%; max-width: 390px; height: auto; border: 1px solid var(--lf-line); border-radius: 5px; }
.feature-entry a { display: inline-block; min-height: 44px; padding: 8px 0; font-size: 18px; }
@media(max-width: 700px) { .features-page { padding: 18px; } .feature-entry { grid-template-columns: 1fr; gap: 18px; } .features-page h1 { font-size: 28px; } .features-page h2 { font-size: 22px; } }
@media(forced-colors: active) { .lf-chip, .lf-explanation, .lf-path-body, .lf-filter select { border-color: CanvasText; } }
@media(prefers-reduced-motion: reduce) { .lf-meta *, .features-page * { scroll-behavior: auto; animation: none; transition: none; } }
.lf-about { font: 15px/1.6 var(--ui); margin: 15px 0; }
.lf-about summary { cursor: pointer; min-height: 44px; padding: 10px 0; }
.lf-about a { display: inline-block; min-height: 44px; padding: 10px 0; }
@media(prefers-color-scheme: dark) {
  :root:not([data-theme]) :is(.lf-meta,.lf-filter,.lf-chip,.features-page) { --lf-ink: #f8faf5; --lf-bg: #0c1017; --lf-line: #b4beb5; --lf-accent: #b5dfbe; }
}

.lf-row { mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 14px), transparent); }
@media(forced-colors: active) { .lf-row { mask-image: none; } }

button.lf-chip { cursor: pointer; min-height: 44px; }
.lf-row { align-items: center; }
.lf-about { color: var(--ink); }
.lf-about a { color: inherit; }
.lf-filter label { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.lf-filter select { min-width: 0; }

.lf-about-menu { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.features-page h2 { border: 0; padding-bottom: 0; }

/* Lesson lists (unit and practice pages): the estimate sits under the title, in the title's column, so the row's
   counter, title and "I can explain this" keep their grid cells. A list chip is a label, not a control: compact. */
.lessons li > .lf-chip { grid-column: 2; grid-row: 2; justify-self: start; min-height: 30px; padding: 0 12px; }
.unit-page > .lf-chip, .bench > .lf-chip { min-height: 30px; padding: 0 12px; margin: 4px 0 8px; }
/* The course page's wide bench floats its link and its builds in the left column; the chip joins them there. */
@media (min-width: 600px) { .bench > .lf-chip { float: left; clear: left; } }
