/* The Library home (tools/build_library.py build_hub; owner, 20 Oct 2026). One kind per section, the same header and
   the same card in every one, a kind and a course filter (code-ia.css, assets/js/code-ia.js) and a search that lists
   its results in place. Tokens only, so light and dark follow site.css; no rules, no pills, 44px targets. */
.lhub .lh-search { position: relative; max-width: 720px; margin-top: 26px; }
.lhub .lh-search .ls-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.lhub .lh-search:focus-within .ls-key { display: none; }
.lhub .lh-filters { margin-top: clamp(24px, 2.6vw, 40px); }
@media (min-width: 561px) { .lhub .lh-filters .pf-opts { flex-wrap: wrap; } }
@media (max-width: 560px) { .lhub .lh-filters .pf-opts { flex-wrap: wrap; } .lhub .lh-filters .pf-b { flex: 1 0 auto; } }

.lh-sec { padding-top: clamp(36px, 3.6vw, 60px); }
.lh-sh { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; margin-bottom: 18px; }
.lh-sh h2 { font-size: clamp(25px, .6vw + 19px, 32px); line-height: 1.1; font-weight: 700; letter-spacing: -.025em; }
.lh-sp { margin-top: 6px; max-width: 62ch; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.lh-all { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; color: var(--teal-text); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; white-space: nowrap; }
.lh-results { padding-top: 4px; }
.lh-none { margin-top: 32px; font-size: 16.5px; color: var(--ink-2); }

/* one, two, then three across; code-ia.js fills a short last row */
.lh-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 640px) { .lh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1024px) { .lh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; } }

.lcard { display: flex; flex-direction: column; min-width: 0; min-height: 44px; padding: 18px 20px 16px; border-radius: 14px; background: var(--paper-0); color: var(--ink); text-decoration: none;
  box-shadow: 0 1px 2px rgba(9, 24, 44, .06), 0 6px 18px rgba(9, 24, 44, .06); transition: background-color .15s cubic-bezier(.22, 1, .36, 1); }
[data-theme="dark"] .lcard { box-shadow: none; }
.lcard:hover { background: color-mix(in srgb, var(--tc, var(--teal)) 9%, var(--paper-0)); }
.lcard:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.lcard-trk { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 650; color: var(--tc-text, var(--ink-3)); }
.lcard-t { margin-top: 10px; font-size: 17.5px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
code.lcard-t { font: 650 16px/1.35 var(--mono); letter-spacing: 0; }
.lcard-d { margin-top: 6px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lcard-f { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: auto; padding-top: 12px; font-size: 13.5px; font-weight: 600; color: var(--ink-3); }
.lcard-lock { display: inline-flex; align-items: center; color: var(--prem-text); }
.lcard-lock .icon, .lcard-done .icon { width: 14px; height: 14px; }
.lcard-done { display: inline-flex; align-items: center; gap: 4px; color: var(--teal-text); }
.lcard-done[hidden] { display: none; }
.lcard.is-wide .lcard-d { -webkit-line-clamp: 2; }
@media (prefers-reduced-motion: reduce) { .lcard { transition: none; } }

/* the fold by screen (build_library.py HUB_FOLD*): before any filter or "Show all", CSS alone decides what shows, so the
   first paint never moves; code-ia.js takes over (hidden attributes) once the learner filters or opens a section */
@media (max-width: 639.98px) { .js .lh-grid > .is-more-sm { display: none; } .lhub .pf-all:not(.fa-sm) { display: none; } }
@media (min-width: 640px) and (max-width: 1023.98px) { .js .lh-grid > .is-more-md { display: none; } .lhub .pf-all:not(.fa-md) { display: none; } }
@media (min-width: 1024px) { .lhub .pf-all:not(.fa-lg) { display: none; } }
