@charset "UTF-8";

/* The live library uses the same visual language as the selected home model. */
.library-home { background: #f8faff; color: #0a142e; }
.library-home main:focus { outline: none; }
.library-home .library-hero { padding-block: clamp(2.75rem, 5vw, 4.5rem); color: #fff; border-bottom: 1px solid #ffffff1f; }
.library-home .library-hero-inner,
.library-home .library-collection-inner { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: 16px; }
.library-home .library-hero-inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: center; }
.library-home .library-hero .eyebrow { color: #7dd3fc; font: 600 .875rem/1.6 "JetBrains Mono", Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.library-home .small-rule { display: inline-block; width: 26px; height: 2px; margin: 0 10px 4px 0; background: #7dd3fc; }
.library-home .library-hero h1 { margin-top: 18px; color: #fff; font-size: clamp(2.75rem, 6.2vw, 5.2rem); font-weight: 700; line-height: 1.08; letter-spacing: -.05em; overflow-wrap: break-word; }
.library-home .library-hero-inner > div:first-child > p:last-child { max-width: 42rem; margin-top: 23px; color: #cbd5e1; font-size: 1rem; line-height: 1.8; }
.library-home .library-signature { min-width: 0; padding: 24px; border: 1px solid #53658a; border-radius: 24px; background: #0a142eea; box-shadow: 0 18px 42px #00000024; }
.library-home .signature-code { color: #a7c2ff; font: .875rem/1.6 "JetBrains Mono", Consolas, monospace; letter-spacing: .04em; }
.library-home .signature-person { display: flex; align-items: center; gap: 16px; margin-top: 21px; }
.library-home .signature-person img { width: 76px; height: 76px; flex: none; border: 1px solid #8498cb; border-radius: 18px; object-fit: cover; }
.library-home .signature-person > div { min-width: 0; }
.library-home .signature-person strong { display: block; color: #fff; font-size: 1.125rem; font-weight: 700; line-height: 1.4; }
.library-home .signature-person p { margin-top: 6px; color: #becde7; font-size: .875rem; line-height: 1.6; }
.library-home .signature-note { margin-top: 20px; color: #c3d0e8; font-size: 1rem; line-height: 1.7; }
.library-home .signature-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.library-home .signature-tags span { padding: 6px 10px; border: 1px solid #71639a; border-radius: 9px; background: #6e3aff1c; color: #d9caff; font-size: .875rem; line-height: 1.5; }

.library-home .library-collection { padding-block: clamp(2.5rem, 5vw, 4rem); }
.library-home .collection-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.library-home .collection-heading h2 { color: #0a142e; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; line-height: 1.25; letter-spacing: -.03em; }
.library-home #result-count { max-width: 100%; padding: 7px 11px; border: 1px solid #c4d2ef; border-radius: 999px; background: #edf2ff; color: #304b83; font: .875rem/1.6 "JetBrains Mono", Consolas, monospace; overflow-wrap: anywhere; }
.library-home #library-filters { margin-top: 24px; padding: 22px; border: 1px solid #cbd5e1; border-radius: 20px; background: #fff; box-shadow: 0 7px 22px #102e5e08; }
.library-home #library-filters fieldset { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: end; min-width: 0; margin: 0; padding: 0; border: 0; }
.library-home #library-filters label { display: block; margin-bottom: 8px; color: #243858; font-size: .875rem; font-weight: 600; line-height: 1.5; }
.library-home #library-filters input,
.library-home #library-filters select { display: block; width: 100%; min-width: 0; min-height: 50px; height: 50px; padding: 11px 13px; border: 1px solid #64748b; border-radius: 11px; background: #fff; color: #0a142e; font: inherit; font-size: 1rem; line-height: 1.5; }
.library-home #library-filters input::placeholder { color: #64748b; opacity: 1; }
.library-home #library-filters input:disabled,
.library-home #library-filters select:disabled { background: #f1f5f9; color: #64748b; border-color: #a6b3c6; cursor: default; }
.library-home .search-input-wrap { position: relative; min-width: 0; }
.library-home .search-input-wrap svg { position: absolute; top: 16px; left: 14px; width: 18px; height: 18px; fill: none; stroke: #526580; stroke-width: 1.7; pointer-events: none; }
.library-home #library-filters .search-input-wrap input { padding-left: 42px; }
.library-home .reset-filters { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; padding: 12px 16px; border: 1px solid #9db4f2; border-radius: 11px; background: #eef3ff; color: #1644d1; font-size: .875rem; font-weight: 700; line-height: 1.5; }
.library-home .reset-filters:hover { background: #e0e9ff; border-color: #6485e7; }
.library-home fieldset:disabled .reset-filters { opacity: .6; cursor: default; }

.library-home .class-results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 26px; }
.library-home .class-results:empty { display: none; }
.library-home .class-entry { position: relative; display: flex; min-width: 0; flex-direction: column; padding: 24px; border: 1px solid #c7d3e6; border-radius: 20px; background: #fff; box-shadow: 0 7px 20px #12295608; }
.library-home .class-entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; padding-right: 26px; color: #526580; font-size: .875rem; line-height: 1.6; }
.library-home .class-entry-meta span,
.library-home .class-entry-meta time { max-width: 100%; overflow-wrap: anywhere; }
.library-home .class-entry-meta span:first-child { padding: 4px 8px; border: 1px solid #cad7f7; border-radius: 8px; background: #edf2ff; color: #2046b4; font-weight: 600; }
.library-home .class-entry-body { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.library-home .class-entry h3 { margin-top: 18px; color: #0a142e; font-size: 1.5rem; font-weight: 700; line-height: 1.3; letter-spacing: -.025em; overflow-wrap: anywhere; }
.library-home .class-entry h3 a { display: inline-block; min-height: 44px; color: inherit; text-decoration: none; }
.library-home .class-entry h3 a:hover { color: #164bff; text-decoration: underline; text-underline-offset: 4px; }
.library-home .class-entry-description { margin-top: 14px; color: #475569; font-size: 1rem; line-height: 1.8; overflow-wrap: anywhere; }
.library-home .class-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.library-home .class-tags li { max-width: 100%; padding: 4px 8px; border-radius: 8px; background: #f1f4fa; color: #475569; font-size: .875rem; line-height: 1.5; overflow-wrap: anywhere; }
.library-home .class-tags li::before { content: "#"; margin-right: 2px; color: #6e3aff; }
.library-home .class-entry-arrow { position: absolute; top: 23px; right: 22px; color: #6e3aff; font-size: 1.5rem; line-height: 1; }
.library-home .su-row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding-top: 18px; border-top: 1px solid #e0e7f1; }
.library-home .su-row-actions :is(button, a) { min-height: 48px; padding: 10px 14px; border: 1px solid #a8bdf2; border-radius: 11px; background: #eef3ff; color: #1643ce; font-size: .875rem; font-weight: 600; line-height: 1.5; }
.library-home .su-row-actions a { border-color: #164bff; background: #164bff; color: #fff; }
.library-home .su-row-actions button:hover { background: #dfe8ff; }
.library-home .su-row-actions a:hover { border-color: #0f38c9; background: #0f38c9; }

.library-home .library-empty { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 24px; margin-top: 26px; padding: clamp(1.5rem, 4vw, 2.75rem); border: 1px solid #cbd6e8; border-radius: 24px; background: #fff; }
.library-home .empty-index { color: #6689e6; font: 500 clamp(3rem, 7vw, 5rem)/1 "JetBrains Mono", Consolas, monospace; letter-spacing: -.08em; }
.library-home .library-empty .eyebrow { color: #5b36b3; font-size: .875rem; font-weight: 600; line-height: 1.6; }
.library-home .library-empty h3 { margin-top: 13px; color: #0a142e; font-size: clamp(1.875rem, 4vw, 2.75rem); font-weight: 700; line-height: 1.12; letter-spacing: -.04em; }
.library-home .library-empty div > p:not(.eyebrow) { max-width: 43rem; margin-top: 18px; color: #526580; font-size: 1rem; line-height: 1.8; }
.library-home .text-link { display: inline-flex; min-height: 44px; align-items: center; gap: 12px; margin-top: 18px; color: #1644d1; font-size: 1rem; font-weight: 600; text-decoration: none; }
.library-home .text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.library-home .library-message { margin-top: 26px; padding: clamp(1.5rem, 4vw, 2.75rem); border: 1px solid #cad5e8; border-radius: 22px; background: #fff; }
.library-home .library-message h3 { max-width: 46rem; color: #11284e; font-size: 1.5rem; font-weight: 700; line-height: 1.3; letter-spacing: -.025em; }
.library-home .library-message p { max-width: 44rem; margin-top: 14px; color: #526580; font-size: 1rem; line-height: 1.8; }
.library-home .button { display: inline-flex; min-height: 48px; max-width: 100%; align-items: center; justify-content: center; gap: 10px; margin-top: 22px; padding: 12px 19px; border: 1px solid #164bff; border-radius: 12px; background: #164bff; color: #fff; font-size: .9375rem; font-weight: 600; line-height: 1.5; text-decoration: none; }
.library-home .button:hover { border-color: #0f38c9; background: #0f38c9; }
.library-home #library-error { border-color: #e5b2c0; background: #fff4f7; }
.library-home #library-error h3 { color: #8c1936; }
.library-home #library-error p { color: #754153; }
.library-home .catalog-updated { margin-top: 23px; color: #526580; font-size: .875rem; line-height: 1.7; text-align: right; }
.library-home .noscript-note { margin-top: 24px; padding: 18px; border: 1px solid #c4d1e7; border-radius: 13px; background: #fff; color: #344b6d; font-size: 1rem; line-height: 1.75; }
.library-home .noscript-note a { color: #1644d1; text-decoration: underline; }
.library-home .library-footer-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; width: 100%; max-width: 1280px; margin-inline: auto; padding: 22px 16px 30px; color: #526580; font-size: .875rem; line-height: 1.7; }
.library-home .library-footer-note a { display: inline-flex; min-height: 44px; align-items: center; gap: 12px; color: #1644d1; font-weight: 600; }

/* Sharing keeps its behaviour and QR generation, with the same royal-blue controls. */
.library-home .su-dialog { width: min(600px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 24px; border-color: #bdcce6; border-radius: 22px; color: #0a142e; }
.library-home .su-dialog::backdrop { background: #050b1ab8; }
.library-home .su-header h2 { color: #0a142e; font-size: 1.5rem; }
.library-home .su-button { min-height: 48px; border-color: #9fb4e7; border-radius: 11px; color: #1644d1; font-size: .875rem; }
.library-home .su-choice { font-size: .875rem; }
.library-home .su-choice[aria-pressed="true"] { border-color: #164bff; background: #164bff; color: #fff; }
.library-home .su-close { color: #0a142e; font-size: 1.75rem; }
.library-home .su-explanation,
.library-home .su-material,
.library-home .su-link-label,
.library-home .su-note,
.library-home .su-privacy { color: #475569; font-size: .875rem; line-height: 1.7; }
.library-home .su-status { color: #166534; font-size: .875rem; line-height: 1.7; }
.library-home .su-status[data-state="error"] { color: #9f1239; }
.library-home .su-link { border-color: #7b8fac; border-radius: 10px; background: #f5f8ff; color: #163257; font-size: 1rem; }
.library-home .su-login { color: #1644d1; font-size: .875rem; }
.library-home .su-projection { background: #edf2ff; }

@media (min-width: 640px) {
  .library-home .library-hero-inner,
  .library-home .library-collection-inner { padding-inline: 24px; }
  .library-home #library-filters fieldset { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-home .search-field { grid-column: 1 / -1; }
  .library-home .reset-filters { grid-column: 1 / -1; justify-self: end; }
  .library-home .library-empty { grid-template-columns: 120px minmax(0, 1fr); gap: 30px; }
  .library-home .library-footer-note { padding-inline: 24px; }
}
@media (min-width: 768px) {
  .library-home .class-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .library-home .library-hero-inner,
  .library-home .library-collection-inner { padding-inline: 32px; }
  .library-home .library-hero-inner { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 36px; }
  .library-home .library-hero-inner > div:first-child > p:last-child { font-size: 1.125rem; }
  .library-home #library-filters fieldset { grid-template-columns: minmax(0, 1.4fr) minmax(0, .9fr) minmax(0, 1fr) auto; gap: 16px; }
  .library-home .search-field,
  .library-home .reset-filters { grid-column: auto; }
  .library-home .library-footer-note { padding-inline: 32px; }
}
@media (min-width: 1280px) {
  .library-home .class-results { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .library-home .library-signature { padding: 21px; }
  .library-home #library-filters { padding: 18px; }
  .library-home .class-entry { padding: 21px; }
  .library-home .su-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); padding: 18px; border-radius: 18px; }
  .library-home .su-choices { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .library-home .class-entry,
  .library-home .reset-filters,
  .library-home .su-row-actions :is(button, a) { transition: border-color 150ms ease, background-color 150ms ease; }
  .library-home .class-entry:hover { border-color: #7f9be8; }
}
@media (forced-colors: active) {
  .library-home .signature-tags span,
  .library-home .class-entry-meta span:first-child,
  .library-home .class-tags li { border: 1px solid ButtonText; }
}
