/* The free collection shares the landing page's paper, ink and type tokens. */
.library-nav { gap: var(--s-300); }
.library-nav .brand { text-decoration: none; }
.library-nav > a:not(.brand) { text-decoration: none; font-size: 14px; line-height: 20px; font-weight: 500; transition: color 300ms var(--ease), background 300ms var(--ease); }
.library-nav-current { color: var(--gold-ink); }
.library-nav-about { color: var(--muted); }
.library-language { border: 1px solid var(--line-strong); border-radius: var(--r-full); padding: var(--s-75) var(--s-100); }
.library-language:hover { background: var(--sunk); }
.library-nav-about:hover { color: var(--ink); }
.collection-head { padding-top: calc(var(--s-900) + var(--s-700)); padding-bottom: var(--s-600); }
.collection-head h1 { max-width: 680px; font-size: 60px; line-height: 1; letter-spacing: -0.04em; }
.collection-head .lead { max-width: 680px; margin-top: var(--s-300); font-size: 18px; line-height: 28px; }
.collection-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-500) var(--s-300); }
.collection-card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r-2xl); box-shadow: 0 4px 16px rgb(32 54 64 / 5%); }
.collection-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; border-radius: inherit; overflow: hidden; }
.collection-link:focus-visible { outline-offset: 4px; }
.gallery-wall { --wall: #cccac3; --floor: #b6a68c; --wall-ink: #31352f; position: relative; isolation: isolate; display: flex; flex-shrink: 0; align-items: center; justify-content: center; height: 320px; padding-bottom: var(--s-400); background: var(--wall); overflow: hidden; }
.gallery-wall::before { content: ''; position: absolute; z-index: -1; inset: 0; box-shadow: inset 0 24px 48px rgb(255 255 255 / 12%), inset 0 -24px 48px rgb(0 0 0 / 7%); }
.gallery-wall::after { content: ''; position: absolute; bottom: 0; inset-inline: 0; height: var(--s-300); background: var(--floor); box-shadow: 0 -2px 4px rgb(0 0 0 / 12%); }
.gallery-frame { position: relative; display: block; width: min(78%, calc(192px * var(--art-ratio))); padding: var(--s-75); background: #373330; border: 2px solid #292722; box-shadow: inset 0 0 0 2px rgb(255 255 255 / 15%), 2px 8px 12px rgb(0 0 0 / 26%); transition: transform 500ms var(--ease); }
.gallery-frame img { display: block; width: 100%; height: auto; object-fit: contain; border: 1px solid rgb(0 0 0 / 24%); }
.frame-gilt { padding: var(--s-100); background: #a98b4f; border-color: #735d35; box-shadow: inset 0 0 0 2px #d3b779, inset 0 0 0 4px #8e733c, 2px 8px 12px rgb(0 0 0 / 28%); }
.frame-walnut { background: #736148; border-color: #4c4335; box-shadow: inset 0 0 0 2px #b8a477, 2px 8px 12px rgb(0 0 0 / 22%); }
.frame-ebony { padding: var(--s-100); background: #2f2e26; border-color: #887444; box-shadow: inset 0 0 0 2px #151c18, inset 0 0 0 4px #514a37, 2px 8px 12px rgb(0 0 0 / 28%); }
.frame-ivory { background: #e8e4da; border-color: #bbb5a6; box-shadow: inset 0 0 0 2px #f8f5ee, 2px 8px 12px rgb(0 0 0 / 18%); }
.frame-paper { padding: var(--s-200); background: #ebe5d5; border: 4px solid #5a5141; }
.frame-mural { width: 88%; padding: 0; background: transparent; border: 0; box-shadow: none; }
.frame-mural img { border: 0; }
.wall-moma { --wall: #c9c9c6; --floor: #c6b095; }
.wall-louvre { --wall: #294b60; --wall-ink: #f0eee6; --floor: #a19784; }
.wall-louvre .gallery-frame::after { content: ''; position: absolute; inset: -12px; border: 2px solid rgb(230 239 239 / 30%); background: rgb(234 242 242 / 3%); box-shadow: 0 4px 12px rgb(0 0 0 / 14%); }
.wall-uffizi { --wall: #d5d3cd; --floor: #a7a399; }
.wall-uffizi::after { height: var(--s-500); box-shadow: 0 -4px 0 #bebbb2; }
.wall-refectory { --wall: #b7ac96; --floor: #928674; }
.wall-mauritshuis { --wall: #3e5f4a; --wall-ink: #f2f0df; --floor: #7e6951; }
.wall-mauritshuis::before { inset: 16px 16px 24px; border: 1px solid rgb(223 226 195 / 12%); box-shadow: inset 0 0 0 4px rgb(34 50 36 / 12%); }
.wall-orsay { --wall: #aeada8; --floor: #918c7d; }
.wall-chicago { --wall: #cfcbc0; --floor: #b19b7a; }
.wall-met { --wall: #b8ad96; --floor: #837965; }
.wall-plaque { position: absolute; right: var(--s-100); bottom: var(--s-700); width: var(--s-200); height: var(--s-100); background: #eeeae0; box-shadow: 1px 1px 2px rgb(0 0 0 / 12%); }
.wall-plaque::before, .wall-plaque::after { content: ''; position: absolute; top: 4px; left: 4px; width: 8px; height: 1px; background: #b5b0a5; }
.wall-plaque::after { top: 8px; width: 4px; }
.collection-link:hover .gallery-frame { transform: translateY(-2px); }
.collection-link:active .gallery-frame { transform: scale(0.98); }
.collection-copy { flex: 1; display: flex; flex-direction: column; align-items: flex-start; padding: var(--s-300); }
.collection-place { color: var(--muted); font-size: 12px; line-height: 16px; letter-spacing: 0.04em; }
.collection-museum { margin-top: var(--s-50); margin-bottom: var(--s-200); font-size: 12px; line-height: 16px; font-weight: 600; color: var(--gold-ink); }
.collection-copy h2 { font-size: 24px; line-height: 32px; letter-spacing: -0.02em; }
.collection-artist { margin-top: var(--s-75); color: var(--muted); font-size: 14px; line-height: 20px; }
.collection-summary { margin-top: var(--s-200); margin-bottom: var(--s-300); font-size: 16px; line-height: 24px; }
.collection-read { margin-top: auto; display: inline-flex; align-items: center; gap: var(--s-100); font-size: 14px; line-height: 20px; font-weight: 600; color: var(--gold-ink); }
.collection-read small { margin-left: var(--s-75); color: var(--muted); font-size: 12px; line-height: 16px; font-weight: 400; }
.collection-read > span { transition: transform 500ms var(--ease); }
.collection-link:hover .collection-read > span { transform: translate(2px, -2px); }
.art-text-cover, .home-text-cover { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: var(--s-100); width: 100%; height: 100%; color: #5B665B; }
.art-text-cover > span, .home-text-cover > span { font-size: 12px; line-height: 16px; letter-spacing: 0.12em; }
.art-text-cover strong { font-size: 48px; line-height: 1; font-weight: 500; }
.art-text-cover small { max-width: 240px; margin-top: var(--s-200); font-size: 12px; line-height: 16px; letter-spacing: 0; }
.home-text-cover strong { font-size: 24px; line-height: 32px; }
.home-text-cover small { font-size: 12px; line-height: 16px; }
.collection-outro { padding-top: var(--s-900); padding-bottom: var(--s-900); text-align: center; }
.collection-outro h2 { font-size: 48px; line-height: 1; letter-spacing: -0.03em; }
.collection-outro > p:not(.eyebrow) { margin: var(--s-300) auto; max-width: 680px; color: var(--muted); }
.collection-outro .btn { gap: var(--s-100); }
.library-editorial { flex-basis: 100%; max-width: 760px; font-size: 12px; line-height: 16px; color: var(--muted); }
.library-home-link { margin-top: var(--s-200); font-size: 16px; line-height: 24px; font-weight: 600; }
.library-home-link a { text-underline-offset: 4px; }
.library-reading .artwork-title { max-width: 1000px; font-size: 48px; line-height: 1; }
.library-reading .artwork-head > .lead { max-width: 760px; font-size: 18px; line-height: 28px; }
.reading-jump { display: inline-flex; margin-top: var(--s-300); color: var(--gold-ink); font-size: 16px; line-height: 24px; font-weight: 600; text-underline-offset: 4px; }
.library-figure { max-width: 1000px; margin-inline: auto; }
.library-figure > img { width: 100%; max-height: 760px; object-fit: contain; padding: var(--s-300); background: var(--sunk); box-shadow: none; }
.library-figure > .art-text-cover { min-height: 320px; padding: var(--s-400); background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-2xl); }
.library-figure figcaption { max-width: 760px; margin-inline: auto; font-size: 12px; line-height: 16px; }
.library-reading .artwork-prose { max-width: 808px; }
.reading-opening { margin-top: var(--s-300); }
.reading-opening p, .library-reading .artwork-part p { font-size: 18px; line-height: 28px; margin-top: var(--s-300); }
.reading-contents { margin-top: var(--s-400); border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--card); }
.reading-contents summary { display: flex; justify-content: space-between; gap: var(--s-100); padding: var(--s-200) var(--s-300); cursor: pointer; font-weight: 600; }
.reading-contents summary::-webkit-details-marker { display: none; }
.reading-contents summary span { transition: transform 300ms var(--ease); }
.reading-contents[open] summary span { transform: rotate(45deg); }
.reading-contents .artwork-toc { margin: 0; border-radius: 0 0 var(--r-xl) var(--r-xl); font-size: 14px; line-height: 20px; }
.library-reading .artwork-part { padding-top: var(--s-600); }
.library-reading .artwork-part h3 { font-size: 24px; line-height: 32px; }
.library-reading .reading-citations { margin-top: var(--s-100); }
.library-reading .artwork-sources { overflow-wrap: anywhere; }
.library-reading .artwork-sources p { font-size: 14px; line-height: 20px; }
.source-title { font-weight: 600; }
.reading-next { padding-top: var(--s-900); padding-bottom: var(--s-600); }
.reading-next-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-300); margin-bottom: var(--s-300); }
.reading-next-head h2 { font-size: 30px; line-height: 36px; }
.reading-next-head > a { color: var(--gold-ink); font-size: 14px; line-height: 20px; text-underline-offset: 4px; }
.reading-next-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-300); }
.reading-next-grid > a { display: flex; flex-direction: column; gap: var(--s-100); padding: var(--s-300); text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); transition: background 300ms var(--ease); }
.reading-next-grid > a:hover { background: var(--sunk); }
.reading-next-grid strong { font-size: 24px; line-height: 32px; font-weight: 600; }
.reading-next-grid span { font-size: 14px; line-height: 20px; color: var(--muted); }
.reading-next-grid span:first-child { color: var(--gold-ink); }
.reading-app { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--s-200); padding-bottom: var(--s-700); color: var(--muted); }
.reading-app a { color: var(--ink); text-underline-offset: 4px; font-weight: 600; }
@media (max-width: 1000px) {
  .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .library-nav { gap: var(--s-200); }
  .library-nav .brand { gap: var(--s-75); font-size: 16px; line-height: 24px; }
  .library-nav-about { display: none; }
  .library-nav > a:not(.brand) { font-size: 12px; line-height: 16px; }
  .library-language { padding: var(--s-75); }
  .collection-head { padding-top: calc(var(--s-900) + var(--s-300)); padding-bottom: var(--s-400); }
  .collection-head h1 { font-size: 36px; line-height: 40px; }
  .collection-head .lead { font-size: 16px; line-height: 24px; }
  .collection-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-600); }
  .gallery-wall { height: 340px; }
  .gallery-frame { width: min(78%, calc(208px * var(--art-ratio))); }
  .frame-mural { width: 88%; }
  .collection-outro { padding-top: var(--s-700); padding-bottom: var(--s-700); }
  .collection-outro h2 { font-size: 36px; line-height: 40px; }
  .library-reading .artwork-title { font-size: 30px; line-height: 36px; }
  .library-reading .artwork-head > .lead { font-size: 16px; line-height: 24px; }
  .library-figure > img { padding: var(--s-100); max-height: 560px; }
  .reading-opening p, .library-reading .artwork-part p { font-size: 16px; line-height: 24px; }
  .reading-next { padding-top: var(--s-700); }
  .reading-next-head { flex-wrap: wrap; gap: var(--s-100); }
  .reading-next-grid { grid-template-columns: 1fr; gap: var(--s-200); }
  .reading-next-grid strong { font-size: 20px; line-height: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-frame, .collection-read > span, .reading-contents summary span { transition: none; }
  .collection-link:hover .gallery-frame, .collection-link:active .gallery-frame, .collection-link:hover .collection-read > span { transform: none; }
}
