* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { background: var(--sa-color-bg-subtle); }
a, button, input, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--sa-color-border-brand); outline-offset: 4px; }
button, input { font: inherit; }
button { cursor: pointer; }
.skip-link { position: absolute; top: -70px; left: 24px; padding: 12px; background: var(--sa-color-bg-surface); z-index: 10; }
.skip-link:focus { top: 8px; }
.masthead { max-width: 1280px; padding: 30px 48px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--sa-color-border-default); }
.brand { display: flex; align-items: center; gap: 24px; text-decoration: none; font-size: 13px; color: var(--sa-color-text-subtle); }
.brand img { width: 160px; height: auto; }
.brand span { border-left: 1px solid var(--sa-color-border-strong); padding-left: 24px; }
.collection-date { font-size: 12px; color: var(--sa-color-text-subtle); white-space: nowrap; }
.collection-date time { margin-left: 8px; font-variant-numeric: tabular-nums; }
.layout { max-width: 1280px; margin: auto; padding: 52px 48px 32px; display: grid; grid-template-columns: 208px minmax(0,1fr); gap: 64px; align-items: start; }
.shelf-nav { position: sticky; top: 32px; }
.nav-label { font-size: 12px; color: var(--sa-color-text-subtle); margin: 8px 12px 20px; }
.filters { display: grid; gap: 8px; }
.filter { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; min-height: 48px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--sa-color-text-muted); text-align: left; font-size: 14px; }
.filter span { font-size: 12px; font-variant-numeric: tabular-nums; }
.filter:hover { background: var(--sa-color-bg-muted); }
.filter.active { background: var(--sa-color-bg-brand); color: var(--sa-color-text-inverse); font-weight: 700; }
.shelf-note { padding: 32px 16px; margin-top: 32px; border-top: 1px solid var(--sa-color-border-default); color: var(--sa-color-text-subtle); font-size: 12px; }
.shelf-note svg { width: 112px; fill: none; stroke: var(--sa-color-text-brand); stroke-width: 1.5; margin-bottom: 16px; }
.intro { margin-bottom: 32px; }
.eyebrow { color: var(--sa-color-text-brand); font-size: 12px; font-weight: 700; letter-spacing: .12em; margin: 0 0 12px; }
.intro h1 { font-size: clamp(28px,3.1vw,42px); letter-spacing: -.035em; line-height: 1.45; margin: 0 0 16px; }
.intro-copy { font-size: 14px; line-height: 1.9; color: var(--sa-color-text-muted); margin: 0; }
.mobile-break { display: none; }
.search-area label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.search-box { display: flex; align-items: center; gap: 12px; background: var(--sa-color-bg-surface); border: 1px solid var(--sa-color-border-strong); border-radius: 8px; padding: 0 16px; }
.search-box:focus-within { border-color: var(--sa-color-border-brand); box-shadow: 0 0 0 2px var(--sa-color-bg-brandSubtle); }
.search-box svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: var(--sa-color-text-subtle); stroke-width: 1.5; }
.search-box input { min-width: 0; width: 100%; height: 56px; padding: 8px 0; border: 0; outline: none; background: transparent; color: var(--sa-color-text-default); font-size: 15px; }
.search-box input::placeholder { color: var(--sa-color-text-subtle); }
.search-box button { flex-shrink: 0; min-height: 40px; border: 0; background: transparent; color: var(--sa-color-text-link); font-size: 12px; }
.list-heading { display: flex; justify-content: space-between; align-items: center; margin: 28px 0 12px; font-size: 12px; color: var(--sa-color-text-subtle); }
.list-heading p { margin: 0; color: var(--sa-color-text-muted); font-weight: 700; }
#documents { display: grid; gap: 12px; }
.document { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 20px; padding: 24px; background: var(--sa-color-bg-surface); border: 1px solid var(--sa-color-border-default); border-radius: 10px; }
.book-mark { margin-top: 5px; width: 42px; height: 52px; padding: 6px; border-radius: 4px; background: var(--sa-color-bg-brandSubtle); color: var(--sa-color-text-brand); }
.book-mark svg { fill: none; stroke: currentColor; stroke-width: 1.35; }
.document-meta { display: flex; gap: 12px; align-items: center; font-size: 11px; color: var(--sa-color-text-subtle); margin-bottom: 7px; }
.document-meta span:first-child { color: var(--sa-color-text-brand); font-weight: 700; }
.document h2 { margin: 0 0 7px; font-size: 19px; line-height: 1.6; letter-spacing: 0; }
.document-title { color: var(--sa-color-text-default); text-decoration: none; }
.document-title:hover { color: var(--sa-color-text-link); text-decoration: underline; }
.document-title span { color: var(--sa-color-text-brand); font-size: 16px; white-space: nowrap; }
.description { font-size: 13px; color: var(--sa-color-text-muted); line-height: 1.8; margin: 0 0 12px; }
.reading-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.read-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 14px; border: 1px solid var(--sa-color-border-default); border-radius: 6px; color: var(--sa-color-text-muted); font-size: 12px; line-height: 20px; text-decoration: none; }
.read-link:hover { background: var(--sa-color-bg-muted); }
.read-link-published { border-color: var(--sa-color-border-link); background: var(--sa-color-bg-brandSubtle); color: var(--sa-color-text-link); font-weight: 700; }
.read-link-published:hover { border-color: var(--sa-color-border-brand); background: var(--sa-color-bg-brandSubtle); }
.folder { font-family: var(--sa-font-family-mono); font-size: 11px; color: var(--sa-color-text-subtle); overflow-wrap: anywhere; }
.source-note { font-size: 11px; color: var(--sa-color-text-subtle); margin: 8px 0 0; }
details { border-top: 1px solid var(--sa-color-border-default); margin-top: 16px; }
summary { cursor: pointer; padding-top: 12px; font-size: 12px; color: var(--sa-color-text-link); min-height: 32px; }
.chapters { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 8px; font-size: 13px; }
.empty-state { padding: 40px 24px; border: 1px solid var(--sa-color-border-default); border-radius: 10px; background: var(--sa-color-bg-surface); }
.empty-state h2 { margin-top: 0; font-size: 20px; }
.empty-state p { font-size: 14px; }
.library-footer { padding: 28px 0; font-size: 11px; color: var(--sa-color-text-subtle); }
@media(max-width: 900px) {
  .masthead { padding: 24px; }
  .layout { padding: 36px 24px; grid-template-columns: 160px minmax(0,1fr); gap: 28px; }
  .document { padding: 20px; gap: 14px; }
  .desktop-break { display: none; }
}
@media(max-width: 640px) {
  .masthead { padding: 20px; }
  .brand { gap: 12px; }
  .brand img { width: 140px; }
  .brand span { padding-left: 12px; font-size: 11px; }
  .collection-date { display: none; }
  .layout { display: flex; flex-direction: column; padding: 24px 20px; gap: 28px; }
  .shelf-nav { position: static; width: 100%; }
  .nav-label { margin: 0 0 12px; }
  .filters { display: flex; flex-wrap: wrap; gap: 6px; }
  .filter { min-height: 40px; padding: 8px 12px; font-size: 12px; gap: 10px; background: var(--sa-color-bg-surface); border-color: var(--sa-color-border-default); }
  .shelf-note { display: none; }
  .library { width: 100%; min-width: 0; }
  .mobile-break { display: inline; }
  .intro h1 { font-size: 32px; }
  .intro-copy { font-size: 13px; }
  .document { grid-template-columns: minmax(0,1fr); padding: 20px; }
  .book-mark { display: none; }
  .document h2 { font-size: 18px; }
  .search-box input { font-size: 13px; }
}
@media(prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
