/* Catalog pages (esuitemusic.com/catalog, SEO plan Phase 3, 2026-10-28) — layered on site.css tokens (paper, ink, gold accent,
   serif headings). Ported from the 2026-10-27 prototype. */
/* Accessibility (2026-10-29, Mitchell asked): the site's Ash (#8A867E) is 3.4:1 on Paper in light mode — under WCAG AA's 4.5:1 for
   body-size text. Catalog pages use --text-quiet instead: #716D65 (4.9:1) on Paper; Ash stays in dark mode (5.4:1 on Ink). */
:root { --text-quiet: #716D65; }
@media (prefers-color-scheme: dark) { :root { --text-quiet: #8A867E; } }
.site-footer p { color: var(--text-quiet); }   /* the site footer's Ash line failed AA too (axe, 2026-10-29) */
.catalog-main {
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
  padding: calc(64px + clamp(28px, 5vh, 56px)) clamp(16px, 5vw, 40px) clamp(48px, 7vw, 88px);
}
.crumbs { margin: 0 0 20px; font-size: 0.82rem; color: var(--text-quiet); }
.crumbs a { color: var(--text-quiet); text-decoration: none; }
.crumbs a:hover { color: var(--text-primary); text-decoration: underline; }
.catalog-main h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
}
.work-composer a { color: inherit; text-decoration: none; } .work-composer a:hover { text-decoration: underline; }
.work-composer { margin: 10px 0 0; font-family: var(--serif); font-size: clamp(1.15rem, 2.4vw, 1.4rem); color: var(--text-secondary); }
.work-facts { margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.9rem; color: var(--text-quiet); }
.work-facts span + span::before { content: "·"; margin-right: 12px; }
/* Calm layout (2026-10-29, Mitchell: "far too busy … calm, minimalistic aesthetic of the main site"): section names are quiet labels,
   not headlines; the title is the only big type on the page. */
.catalog-main h2 {                                    /* 2026-10-29 (Mitchell): small caps labels barely outranked the content — */
  margin: clamp(56px, 9vh, 88px) 0 0;                 /* a modest serif heading in ink: clearly a heading, still well below the title */
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.2vw, 1.5rem);
  line-height: 1.2;
  color: var(--text-primary);
}
.work-composer + h2 { margin-top: clamp(36px, 6vh, 52px); }   /* the first section (About) sits close to the title */
.section-note { margin: 6px 0 20px; color: var(--text-quiet); font-size: 0.85rem; line-height: 1.5; }

/* Preview pages in one sideways strip (2026-10-29): each page is sized by height so a whole page fits on screen; the next one peeks in
   from the right so it's clear there's more. Scroll snapping stops on a page. */
.page-strip-wrap { position: relative; margin: 0; }
.page-strip {
  display: flex; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding: 4px 4px 14px; scroll-padding-inline: 4px; scrollbar-width: thin;
}
.page-strip > * { flex: 0 0 auto; scroll-snap-align: start; }
.page-strip .loupe-page { height: min(76vh, 860px); width: auto; aspect-ratio: var(--ar, 0.77); margin: 0; max-width: none; }
.page-strip .loupe-page img { height: 100%; width: 100%; object-fit: contain; }
.page-strip .more-pages { align-self: center; width: min(320px, 70vw); margin: 0; }
.strip-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--hairline); background: rgba(250, 249, 246, 0.95);
  font-size: 1.6rem; line-height: 1; color: var(--text-primary); cursor: pointer;
}
.strip-nav.prev { left: -14px; } .strip-nav.next { right: -14px; }
.strip-nav:disabled { opacity: 0; pointer-events: none; }
@media (hover: none) { .strip-nav { display: none; } }
/* Narrow screens: size pages by width instead, so the next page still peeks in from the right */
@media (max-width: 640px) { .page-strip .loupe-page { height: auto; width: 82vw; } }

.loupe-page {
  position: relative;
  margin: 0 auto 18px;
  max-width: 720px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(31, 29, 26, 0.06);
  outline: none;
  touch-action: pan-x pan-y;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;   /* no iOS text-selection/callout fighting the press-and-hold */
}
.loupe-page img { -webkit-user-drag: none; }
.loupe-page:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.loupe-page img, .loupe-page canvas { display: block; width: 100%; height: auto; }
.loupe-page canvas { position: absolute; inset: 0; height: 100%; cursor: zoom-in; }
.loupe-page .page-no { position: absolute; right: 10px; bottom: 8px; font-size: 0.75rem; color: #4A4741; background: rgba(250, 249, 246, 0.85); padding: 2px 8px; border-radius: 999px; }
.more-pages {
  max-width: 720px; margin: 0 auto 18px; padding: 28px 24px; text-align: center;
  border: 1px dashed var(--hairline); border-radius: 10px; color: var(--text-secondary);
}

.editions { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin-top: 14px; }
.editions th { text-align: left; font-weight: 500; font-size: 0.78rem; color: var(--text-quiet); padding: 0 16px 8px 0; }
.editions td { padding: 14px 16px 14px 0; border-top: 1px solid var(--hairline); vertical-align: top; color: var(--text-quiet); }
.editions td:empty { padding: 0; }
.editions td:first-child { color: var(--text-primary); }
.editions a { color: inherit; }
.ed-preview { margin-top: 4px; padding: 0; border: 0; background: none; font: inherit; font-size: 0.75rem; color: var(--text-secondary); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.ed-preview:hover { color: var(--text-primary); }
#preview { scroll-margin-top: 84px; }   /* a row's Preview button scrolls here; clear the fixed header */
.ed-preview[hidden], .tag[hidden] { display: none; }
.tag { display: inline-block; margin-top: 4px; font-size: 0.75rem; color: var(--accent); }
@media (max-width: 640px) {
  .editions thead { display: none; }
  .editions tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
  .editions td { display: block; padding: 2px 0; border: 0; }
  .editions td[data-label]:not(:empty)::before { content: attr(data-label) ": "; }
}
/* About as one compact row of label-over-value facts that wraps only when it must (2026-10-29, Mitchell: the stacked list was
   "too tall for the amount of information it provides") */
.about { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 14px 0 0; font-size: 0.92rem; }
.about > div { min-width: 0; max-width: 100%; }
.about dt { font-size: 0.78rem; color: var(--text-quiet); margin-bottom: 2px; }
.about dd { margin: 0; color: var(--text-secondary); }
/* "More by" is a quiet footnote (Mitchell 2026-10-29: it "feels more prominent than the actual information about the score"):
   small sans links in a light list, lighter than the About block. */
.more-by { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 28px; font-size: 0.85rem; line-height: 1.45; }
.more-by a { text-decoration: none; color: var(--text-quiet); }
.more-by a:hover { text-decoration: underline; }
.rights { margin: clamp(64px, 10vh, 104px) 0 0; font-size: 0.74rem; color: var(--text-quiet); line-height: 1.6; max-width: 640px; }

.loupe-toast { position: sticky; bottom: 16px; max-width: 420px; margin: 0 auto; text-align: center; background: var(--text-primary); color: var(--paper); padding: 9px 16px; border-radius: 999px; font-size: 0.88rem; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.loupe-toast.show { opacity: 1; }

.catalog-index h2 { font-size: 1.3rem; margin-top: 34px; }
.catalog-index ul { list-style: none; padding: 0; margin: 10px 0 0; }
.catalog-index li { padding: 6px 0; border-bottom: 1px solid var(--hairline); }
.catalog-index li a { text-decoration: none; }
.catalog-index li a:hover { text-decoration: underline; }
.catalog-index li small { color: var(--text-quiet); margin-left: 8px; }

@media print {
  .loupe-page canvas, .loupe-toast, .site-header { display: none !important; }
  .loupe-page::after { content: "Preview pages print blurred. Open this score in eSuite to play from it."; display: block; padding: 8px; font-size: 11px; }
}


.az-nav { margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 1.05rem; }
.az-nav a { text-decoration: none; }
.az-nav a:hover { text-decoration: underline; }

/* Share Score fallback page (SEO plan §3.10) */
.link-page .link-cover { display: block; width: min(300px, 70vw); height: auto; margin: 28px 0 0; border: 1px solid var(--hairline); border-radius: 8px; }
