* { box-sizing: border-box; }
:root { color-scheme: light; --red: #b51f32; --ink: #24262b; --muted: #85888f; --line: #e9e9ec; }
body { margin: 0; color: var(--ink); background: #fff; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; line-height: 22px; letter-spacing: 0; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.header { padding-top: env(safe-area-inset-top); border-bottom: 1px solid var(--line); background: #fff; }
.nav { position: relative; display: flex; align-items: center; justify-content: center; min-height: 52px; max-width: 1000px; margin: auto; }
h1 { max-width: calc(100% - 112px); margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; text-align: center; }
.icon-button { display: flex; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 4px; background: transparent; }
.icon-button img { width: 18px; height: 18px; opacity: .6; }
.back { position: absolute; left: 8px; width: 44px; height: 44px; }
.back img { width: 22px; height: 22px; }
.brand-band { background: #fff; }
.brand-inner { display: flex; align-items: center; gap: 18px; max-width: 960px; min-height: 128px; margin: auto; padding: 24px; }
.brand-logo { flex: 0 0 72px; width: 72px; height: 72px; object-fit: contain; }
.brand-inner h2 { margin: 0; font-size: 26px; line-height: 36px; font-weight: 600; }
.catalog-tools { position: sticky; top: 0; z-index: 10; padding-top: env(safe-area-inset-top); border-bottom: 1px solid var(--line); background: #fff; }
.search-area { max-width: 960px; margin: auto; padding: 16px 24px; }
.search { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 4px 4px 12px; border: 1px solid #e5e5e8; border-radius: 6px; background: #f8f8fa; }
.search:focus-within { border-color: var(--red); background: #fff; }
.search-icon { flex: 0 0 18px; width: 18px; height: 18px; opacity: .45; }
.search input { flex: 1; min-width: 0; width: 100%; height: 34px; padding: 0; border: 0; outline: none; color: var(--ink); background: transparent; font-size: 14px; }
.search input::placeholder { color: #999ca4; }
.search input::-webkit-search-cancel-button { display: none; }
.search-submit { display: flex; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; height: 36px; border: 0; border-radius: 4px; background: transparent; }
.search-submit img { width: 18px; height: 18px; opacity: .6; }
.category-nav { display: flex; gap: 24px; max-width: 912px; margin: auto; padding: 0 0 12px; overflow-x: auto; scrollbar-width: thin; }
.category-link { flex: 0 0 auto; color: #555961; text-decoration: none; font-size: 13px; line-height: 24px; border-bottom: 2px solid transparent; }
.category-link:hover, .category-link:focus-visible { color: var(--red); border-color: var(--red); }
main { max-width: 960px; margin: auto; padding: 0 24px calc(32px + env(safe-area-inset-bottom)); }
.list-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; border-bottom: 1px solid var(--line); }
.heading-label { display: flex; align-items: center; gap: 8px; min-width: 0; }
.list-heading h2 { margin: 0; font-size: 14px; line-height: 22px; font-weight: 600; }
.count { color: var(--muted); font-size: 12px; line-height: 20px; }
.sort-label { flex-shrink: 0; color: var(--muted); font-size: 12px; }
.catalog-section { scroll-margin-top: 145px; }
.category-heading { display: flex; align-items: center; gap: 10px; padding: 24px 0 12px; border-bottom: 1px solid var(--line); }
.category-heading::before { content: ''; width: 3px; height: 14px; background: var(--red); }
.category-heading h3 { min-width: 0; margin: 0; font-size: 16px; font-weight: 600; line-height: 24px; overflow-wrap: anywhere; }
.category-count { color: #96999f; font-size: 12px; }
.category-files { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.file-row { display: flex; align-items: center; gap: 16px; min-width: 0; min-height: 100px; padding: 16px 0; border-bottom: 1px solid #eeeeef; color: inherit; text-decoration: none; transition: background .15s; }
.file-row:hover { background: #fafafa; }
.file-type { position: relative; display: flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 62px; border: 1px solid #e3e5e8; border-radius: 2px; color: #68717b; background: #f3f4f6; font-size: 11px; font-weight: 600; overflow: hidden; }
.type-pdf { color: #b42318; background: #fff1f0; border-color: #f5d9d5; }
.type-doc { color: #175cd3; background: #eff4ff; border-color: #d1e0ff; }
.type-sheet { color: #28734a; background: #edf7f0; border-color: #d3eadd; }
.file-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.file-info { flex: 1; min-width: 0; }
.file-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 15px; font-weight: 500; line-height: 24px; overflow-wrap: anywhere; }
.file-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 18px; }
.file-group { display: none; }
.file-arrow { flex: 0 0 16px; width: 16px; height: 16px; opacity: .35; }
.status { padding: 28px 12px 12px; text-align: center; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.load-area { display: flex; justify-content: center; }
.load-more { min-height: 40px; min-width: 120px; padding: 8px 16px; border: 1px solid #e0e2e6; border-radius: 4px; color: #555961; background: #fff; font-size: 13px; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
@media (max-width: 600px) {
  .brand-inner { min-height: 116px; gap: 16px; padding: 20px; }
  .brand-logo { flex-basis: 68px; width: 68px; height: 68px; }
  .brand-inner h2 { font-size: 24px; line-height: 34px; }
  .search-area { padding: 14px 20px; }
  .category-nav { margin: 0 20px; gap: 22px; }
  main { padding-left: 20px; padding-right: 20px; }
  .category-files { grid-template-columns: minmax(0, 1fr); }
  .list-heading { min-height: 54px; }
  .category-heading { padding-top: 22px; }
}
@media (max-width: 350px) {
  .brand-inner { padding: 22px 14px; gap: 10px; }
  .brand-logo { flex-basis: 62px; width: 62px; height: 62px; }
  main { padding-left: 16px; padding-right: 16px; }
  .search-area { padding-left: 16px; padding-right: 16px; }
  .category-nav { margin: 0 16px; }
  .file-row { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { .file-row { transition: none; } }

/* White catalogue layout. */
.hero { position: relative; isolation: isolate; max-width: 1000px; margin: auto; background: #fff; }
.library-banner { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; overflow: hidden; background: #fff; }
.library-banner img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.library-banner::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, .55); pointer-events: none; }
.hero-content { position: relative; max-width: 1000px; margin: auto; padding: 20px 24px 24px; background: #fff; }
.library-banner:not([hidden]) ~ .hero-content { min-height: 240px; display: flex; flex-direction: column; justify-content: flex-end; background: transparent; }
.library-banner:not([hidden]) ~ .hero-content h1,
.library-banner:not([hidden]) ~ .hero-content .list-heading h2,
.library-banner:not([hidden]) ~ .hero-content .count { color: #fff; }
.nav { min-height: 40px; margin: 0; justify-content: flex-start; }
h1 { max-width: 100%; color: var(--ink); font-size: 20px; line-height: 30px; text-align: left; overflow-wrap: anywhere; }
.list-heading { min-height: 52px; border: 0; }
.list-heading h2 { font-size: 16px; line-height: 24px; }
.search-area { max-width: none; margin: 0; padding: 0; }
.search { min-height: 48px; border-color: #dedfe3; background: #fff; }
.search-submit:hover { background: #f5f5f6; }
main { max-width: 1000px; padding-top: 4px; }
.catalog-section { margin-bottom: 24px; background: #fff; }
.category-heading { padding-top: 24px; }
.file-row { background: #fff; }
@media (max-width: 600px) {
  .hero-content { padding: 16px 20px 20px; }
  .library-banner:not([hidden]) ~ .hero-content { min-height: 208px; }
  h1 { font-size: 18px; line-height: 28px; }
}
@media (max-width: 350px) { .hero-content { padding-left: 16px; padding-right: 16px; } }
