/* Clarity layer: existing theme tokens and native controls, no external assets. */
.library-home .topbar-inner { justify-content: space-between; }
.library-home .shell { grid-template-columns: minmax(0, 1fr); max-width: 1240px; }
.library-home .sidebar { display: none; }
.library-home .hero { padding: 24px; margin-bottom: 16px; background: linear-gradient(135deg, #1f5f8b 0%, #2a7aa8 100%); }
.library-home .hero h1 { font-size: 1.6rem; }
.library-home .hero-sub { max-width: 65ch; color: #fff; margin-bottom: 16px; }
.home-search-label { display: block; font-weight: 600; margin-bottom: 8px; }
.library-home .hero-search { max-width: 800px; margin-bottom: 8px; }
.library-home .hero-search input { min-width: 0; min-height: 44px; font-size: 1rem; }
.library-home .hero-search button { min-height: 44px; flex-shrink: 0; white-space: nowrap; }
.home-quicklinks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.home-quicklinks a { display: inline-flex; align-items: center; min-height: 44px; }
.library-home .stat-grid { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 16px; }
.library-home .stat-card { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.library-home .stat-value { font-size: 1.25rem; }
.library-home .stat-label { font-size: .9rem; color: var(--ink-2); }
.library-home .stat-hint { flex-basis: 100%; color: var(--ink-2); }
.library-home .panel { margin-bottom: 16px; }
.library-home .cat-cards { gap: 12px; }
.library-home .cat-card, .library-home .topic-card { min-height: 88px; padding: 14px; }
.library-home .cat-hint { color: var(--ink-2); }
.library-home .home-latest .doc-actions a:first-child:not(:last-child) { display: none; }
.library-info > summary { cursor: pointer; min-height: 44px; padding: 12px 16px; font-weight: 600; }
.library-info-content { padding: 0 16px 16px; }
.library-home .library-info .library-local { background: transparent; border: 0; padding: 12px 0 0; box-shadow: none; }
.library-info .muted { color: var(--ink-2); }
.library-reading .category-bar, .library-reading .nav-toggle { display: none; }
.topnav a, .topnav .link-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; white-space: nowrap; }
.topbar .brand { min-height: 44px; }
@media (max-width: 980px) {
  .category-bar { display: none; }
  .library-home .sidebar.open { display: flex; }
  .topbar-inner { height: auto; min-height: var(--header-h); flex-wrap: wrap; gap: 8px 16px; padding-block: 8px; }
  .topnav { flex-wrap: wrap; gap: 8px 12px; min-width: 0; max-width: 100%; }
  .search-form { order: 3; flex-basis: 100%; }
  .nav-toggle { min-height: 44px; }
}
@media (max-width: 700px) {
  .library-home .hero { padding: 20px 16px; }
  .library-home .hero h1 { font-size: 1.4rem; }
  .library-home .shell { padding: 16px 12px 32px; }
  .library-home .cat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-home .cat-card, .library-home .topic-card { min-width: 0; }
  .library-home .hero-search { width: 100%; gap: 8px; }
  .library-home .hero-search button { padding-inline: 12px; }
  .library-home .topnav { width: 100%; }
  .topnav .user-chip { max-width: 120px; }
  .library-reading .topbar-inner { flex-wrap: wrap; gap: 8px; }
  .library-reading .brand { flex: 0 0 44px; }
  .library-reading .brand-mark { width: 36px; height: 36px; }
  .library-reading .brand-text { display: none; }
  .library-reading .topnav { flex: 1 1 0; flex-wrap: nowrap; overflow-x: auto; gap: 12px; }
  .library-reading .topnav > * { flex-shrink: 0; }
  .library-reading .search-form { order: 3; flex-basis: 100%; }
  .library-reading .search-form input { min-width: 0; }
  .library-reading .search-form select { max-width: 100px; }
  .library-info-content { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .library-home *, .library-reading .topbar * { scroll-behavior: auto; transition: none; animation: none; }
}

/* Keep search guidance legible on the blue hero, including keyboard focus. */
.library-home .hero .home-quicklinks a { color: #fff; text-decoration: underline; text-underline-offset: .2em; }
.library-home .hero .home-quicklinks a:hover { color: #fff; text-decoration-thickness: 2px; }
.library-home .hero .home-quicklinks a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 2px; }
/* Reading keeps its internal directory and annotations, without global filters. */
.library-reading .sidebar { display: none; }
.library-reading .shell { grid-template-columns: minmax(0, 1fr); }
