/* Collection directory, style archive and print bench. */
.sw35lib {
    --lib-pad: clamp(20px, 5.1vw, 100px);
    --lib-paper: #f4f2e9;
    --lib-ink: #182923;
    --lib-rule: #c8cec2;
    color: var(--lib-ink);
    font-family: inherit;
    line-height: 1.45;
}
.sw35lib *, .sw35lib *::before, .sw35lib *::after { box-sizing: border-box; }
.sw35lib :is(h1,h2,h3,p) { margin: 0; }
.sw35lib a { color: inherit; text-decoration: none; }
.sw35lib a:focus-visible, .sw35lib button:focus-visible {
    outline: 3px solid #307981; outline-offset: 4px;
}
.sw35lib h1, .sw35lib h2, .sw35lib h3 { color: inherit; }
.sw35lib h1, .sw35lib h2 { text-wrap: balance; }
.sw35lib .sw35lib-button {
    display: inline-flex; align-items: center; justify-content: space-between; gap: 22px;
    min-height: 48px; max-width: 100%; padding: 12px 20px;
    background: var(--lib-ink); border: 1px solid var(--lib-ink); border-radius: 2px;
    color: white; font: inherit; font-size: 16px; font-weight: 600; line-height: 1.35;
    cursor: pointer; text-align: start;
}
.sw35lib .sw35lib-button:hover { background: #315745; color: white; }
.sw35lib .sw35lib-underline {
    display: inline-flex; width: fit-content; align-items: center; gap: 14px;
    min-height: 42px; font-size: 16px; font-weight: 600;
    text-decoration: underline; text-decoration-color: #98a79c; text-underline-offset: 5px;
}
.sw35lib .sw35lib-underline:hover { text-decoration-color: currentColor; }
.sw35lib-hub { background: #f6f5ee; }
.sw35lib-hubhead {
    display: flex; align-items: end; justify-content: space-between; gap: 30px;
    max-width: 2100px; margin-inline: auto;
    padding: clamp(35px,4.2vw,84px) var(--lib-pad) clamp(26px,2.8vw,53px);
}
#primary .sw35lib-hubhead h1 {
    max-width: 17ch; font-size: clamp(44px,6.3vw,110px); line-height: .99;
    font-weight: 520; letter-spacing: -.064em;
}
.sw35lib-hubhead p { flex: 0 1 30ch; font-size: clamp(16px,1.2vw,21px); line-height: 1.5; }
.sw35lib-triptych { display: flex; gap: 2px; background: var(--lib-paper); }
.sw35lib-poster {
    isolation: isolate; position: relative; display: flex; align-items: end; flex: 1 1 0;
    min-width: 0; height: clamp(400px,36vw,690px); overflow: hidden;
    color: #fff; background: #374239; transition: flex-grow .45s ease;
}
.sw35lib-poster img, .sw35lib-archive > img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    max-width: none; z-index: -2; display: block;
}
.sw35lib-poster:nth-child(1) img { object-position: 50% 46%; }
.sw35lib-poster:nth-child(2) img { object-position: 51% 45%; }
.sw35lib-poster:nth-child(3) img { object-position: 51% 48%; }
.sw35lib-poster::after {
    content: ''; z-index: -1; position: absolute; inset: 0;
    background: linear-gradient(0deg,rgba(8,19,17,.85),rgba(8,19,17,.08) 45%,transparent 70%);
}
.sw35lib-poster-label {
    display: flex; justify-content: space-between; align-items: end; gap: 12px;
    width: 100%; padding: clamp(17px,2.1vw,39px); color: #fff;
    font-size: clamp(27px,2.9vw,56px); font-weight: 500; line-height: 1.08;
    letter-spacing: -.04em; overflow-wrap: anywhere;
}
.sw35lib-circle {
    display: inline-grid; flex: none; place-content: center; align-self: flex-end;
    width: clamp(36px,3vw,55px); aspect-ratio: 1; border-radius: 50%;
    border: 1px solid #ffffffa8; color: #fff; font-size: clamp(18px,1.6vw,27px);
    font-weight: 400; letter-spacing: 0;
}
.sw35lib-poster:focus-visible { z-index: 1; outline: 4px solid white; outline-offset: -7px; }
@media (hover:hover) and (min-width:701px) {
    .sw35lib-poster:is(:hover,:focus-visible) { flex-grow: 1.22; }
    .sw35lib-poster:is(:hover,:focus-visible) .sw35lib-circle { background: #fff; color: var(--lib-ink); }
}
.sw35lib-index {
    display: grid; grid-template-columns: 1.2fr 1fr 1fr; align-items: start;
    gap: clamp(24px,4.6vw,88px); max-width: 2100px; margin-inline: auto;
    padding: clamp(46px,6vw,118px) var(--lib-pad);
}
#primary .sw35lib-index-title h2, #primary .sw35lib-services h2 {
    font-size: clamp(30px,3.3vw,60px); letter-spacing: -.055em; line-height: 1.05; font-weight: 500;
}
.sw35lib-index-title .sw35lib-underline { margin-top: 13px; }
.sw35lib-family-list { border-top: 2px solid var(--lib-ink); min-width: 0; }
#primary .sw35lib-family-list h3 { margin: 13px 0 18px; color: #4b5d50; font-weight: 550; font-size: 16px; }
.sw35lib-family-list a {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 14px 0; border-bottom: 1px solid var(--lib-rule); font-size: clamp(18px,1.45vw,26px);
    line-height: 1.3; letter-spacing: -.018em;
}
.sw35lib-family-list a:hover, .sw35lib-services a:hover { text-decoration: underline; text-underline-offset: 4px; }
.sw35lib-services {
    padding: clamp(30px,4vw,70px) var(--lib-pad); background: #dee5dc;
    display: flex; align-items: start; gap: clamp(22px,4vw,80px);
}
#primary .sw35lib-services h2 { flex: 0 1 34%; font-size: clamp(24px,2.4vw,40px); }
.sw35lib-services > div { flex: 1 1 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; }
.sw35lib-services a {
    display: flex; justify-content: space-between; align-items: center; gap: 8px;
    min-height: 46px; padding-block: 8px; border-bottom: 1px solid #aeb9ab; font-size: 16px;
}

/* The sample archive reads as a rack with a small, functional model index. */
.sw35lib-archive { position: relative; isolation: isolate; overflow: hidden; background: #1e302a; }
.sw35lib-archive > img { object-position: 54% 48%; }
.sw35lib-archive::before {
    position: absolute; z-index: -1; inset: 0; content: '';
    background: linear-gradient(90deg,rgba(8,23,18,.91),rgba(8,23,18,.69) 30%,rgba(8,23,18,.20) 65%,rgba(8,23,18,.34)),linear-gradient(0deg,#10271a44,transparent 70%);
}
.sw35lib-archive-inner {
    display: grid; grid-template-columns: minmax(0,1fr) minmax(256px,320px); align-items: end;
    gap: clamp(28px,5vw,100px); min-height: clamp(470px,38vw,715px);
    max-width: 2100px; margin-inline: auto; padding: clamp(40px,4.8vw,90px) var(--lib-pad);
}
.sw35lib-archive-copy { color: white; max-width: 950px; }
#primary .sw35lib-archive-copy h1 {
    max-width: 15ch; color: #fff; font-weight: 490; font-size: clamp(56px,6.7vw,122px);
    letter-spacing: -.061em; line-height: .99; overflow-wrap: anywhere;
}
.sw35lib-archive-copy p { margin: clamp(16px,1.7vw,28px) 0; max-width: 46ch; font-size: clamp(17px,1.3vw,22px); line-height: 1.48; }
.sw35lib-archive-copy .sw35lib-button { background: #faf9ec; border-color: #faf9ec; color: #1b3028; }
.sw35lib-archive-copy .sw35lib-button:hover { background: #dee8d9; color: #1b3028; }
.sw35lib-drawer {
    background: #f5f3e9; color: var(--lib-ink); padding: 17px 19px 9px;
    box-shadow: 0 5px 25px #09180f22;
}
#primary .sw35lib-drawer h2 { font-size: 22px; line-height: 1.22; font-weight: 540; letter-spacing: -.035em; padding-bottom: 13px; }
.sw35lib-drawer > a {
    display: grid; grid-template-columns: 49px minmax(0,1fr) auto; gap: 13px; align-items: center;
    padding: 9px 0; border-top: 1px solid #b9c2b8; color: var(--lib-ink);
}
.sw35lib-drawer > a img { width: 49px; height: 54px; display: block; object-fit: contain; background: white; }
.sw35lib-drawer > a > span:not(.sw35lib-arr) { display: grid; gap: 2px; }
.sw35lib-drawer bdi { font: 600 12px/1.3 ui-monospace,monospace; letter-spacing: .055em; }
.sw35lib-drawer > a > span > span { font-size: 16px; line-height: 1.28; }
.sw35lib-drawer > a:hover > span > span { text-decoration: underline; text-underline-offset: 3px; }
.sw35lib-arr { font-size: 19px; }

/* Each catalog swatch opens the same inspector at its own shareable URL. */
#prints .sw-pattern-image > a { display: block; width: 100%; height: 100%; cursor: zoom-in; }
#prints .sw-pattern-image > a:focus-visible { outline: 4px solid #182923; outline-offset: -6px; }

/* Show the selected catalog artwork at a generous, inspectable scale. */
.sw35lib-studio { display: grid; grid-template-columns: minmax(0,1.36fr) minmax(0,1fr); background: #f7f5ed; }
.sw35lib-print-stage {
    isolation: isolate; position: relative; overflow: hidden; background: #d6d6c9;
    padding: clamp(38px,4.6vw,85px); min-height: clamp(480px,36vw,720px);
    display: flex; align-items: stretch;
}
.sw35lib-print-canvas {
    position: relative; width: 100%; overflow: hidden; background: #d0ccbc;
    box-shadow: 4px 9px 15px #29281829,1px 2px 2px #29281830;
}
.sw35lib-print-canvas img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.sw35lib-zoom-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.sw35lib-zoom-input:checked ~ .sw35lib-print-canvas img { transform: scale(1.8); }
.sw35lib-zoom {
    position: absolute; inset-block-start: 13px; inset-inline-end: 17px;
    display: flex; align-items: center; gap: 9px; min-height: 34px; padding: 5px 11px;
    cursor: pointer; font-size: 14px; line-height: 1.4; color: #192b26;
    background: #f8f7ed; border: 1px solid #b3b6a6; border-radius: 2px;
}
.sw35lib-zoom-input:focus-visible ~ .sw35lib-zoom { outline: 3px solid #307981; outline-offset: 3px; }
.sw35lib-zoom-input:checked ~ .sw35lib-zoom { background: #233a31; color: white; border-color: #233a31; }
.sw35lib-zoom-icon { width: 15px; height: 15px; position: relative; display: inline-block; flex: none; }
.sw35lib-zoom-icon::before { content: ''; position: absolute; left: 0; top: 0; width: 11px; height: 11px; border: 1.5px solid; border-radius: 100%; }
.sw35lib-zoom-icon::after { content: ''; position: absolute; left: 9px; top: 9px; width: 6px; border-block-start: 1.5px solid; transform: rotate(45deg); transform-origin: left; }
.sw35lib-fabric-tag {
    position: absolute; bottom: clamp(12px,2.8vw,52px); inset-inline-start: clamp(48px,6.3vw,118px);
    background: #faf8e9; color: #182923; padding: 11px 17px; box-shadow: 1px 3px 3px #1f261d33;
    font: 650 clamp(14px,1.1vw,20px)/1.1 ui-monospace,monospace; letter-spacing: .08em;
}
.sw35lib-inspector {
    display: flex; flex-direction: column; align-items: start; justify-content: center;
    min-width: 0; padding: clamp(36px,4vw,72px) clamp(28px,4.8vw,92px);
}
#primary .sw35lib-inspector h1 {
    font-size: clamp(45px,5.6vw,100px); line-height: 1; letter-spacing: -.065em; font-weight: 510;
    max-width: 14ch; overflow-wrap: anywhere;
}
.sw35lib-print-copy p { font-size: clamp(16px,1.2vw,20px); line-height: 1.5; max-width: 40ch; margin: 18px 0 0; }
.sw35lib-swatches { min-width: 0; border: 0; margin: clamp(25px,2.6vw,45px) 0 0; padding: 0; }
.sw35lib-swatches legend { padding: 0; font-weight: 600; font-size: 16px; }
.sw35lib-swatches > div { display: flex; gap: 9px; flex-wrap: wrap; padding: 6px 1px 0; }
.sw35lib-swatches a {
    display: block; width: clamp(46px,4.1vw,69px); aspect-ratio: 1;
    border: 2px solid transparent; padding: 3px; border-radius: 0;
}
.sw35lib-swatches a[aria-current] { border-color: #283b31; }
.sw35lib-swatches img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sw35lib-swatches a:hover img { outline: 1px solid #617365; outline-offset: 1px; }
.sw35lib-print-caption {
    display: flex; align-items: baseline; gap: 9px 16px; flex-wrap: wrap; margin-top: 11px; color: var(--lib-ink);
}
.sw35lib-print-caption > span { font-size: clamp(18px,1.4vw,25px); font-weight: 550; letter-spacing: -.025em; }
.sw35lib-print-caption bdi { color: #536258; font: 550 13px/1.4 ui-monospace,monospace; letter-spacing: .035em; }
.sw35lib-print-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 23px; margin-top: clamp(20px,2vw,34px); }
.sw35lib-print-actions [hidden] { display: none !important; }
[dir=rtl] .sw35lib-archive::before {
    background: linear-gradient(270deg,rgba(8,23,18,.91),rgba(8,23,18,.69) 30%,rgba(8,23,18,.20) 65%,rgba(8,23,18,.34)),linear-gradient(0deg,#10271a44,transparent 70%);
}
[dir=rtl] #primary .sw35lib :is(h1,h2,h3,.sw35lib-poster-label) { letter-spacing: 0; line-height: 1.23; }
[dir=rtl] .sw35lib :is(.sw35lib-arr,.sw35lib-circle) { transform: scaleX(-1); }
@media (max-width: 980px) {
    .sw35lib-index { grid-template-columns: 1fr 1fr; }
    .sw35lib-index-title { grid-column: 1/-1; display: flex; gap: 24px; align-items: baseline; justify-content: space-between; }
    .sw35lib-index-title .sw35lib-underline { margin-top: 0; }
    .sw35lib-studio { grid-template-columns: 1.05fr 1fr; }
    .sw35lib-print-stage { min-height: 460px; }
}
@media (max-width: 700px) {
    .sw35lib-hubhead { display: grid; gap: 13px; padding-block: 28px 24px; }
    #primary .sw35lib-hubhead h1 { font-size: clamp(40px,8vw,56px); }
    .sw35lib-hubhead p { max-width: 39ch; }
    .sw35lib-triptych { display: grid; }
    .sw35lib-poster { height: clamp(170px,36vw,235px); }
    .sw35lib-poster:nth-child(1) img { object-position: 50% 38%; }
    .sw35lib-poster:nth-child(2) img { object-position: 50% 31%; }
    .sw35lib-poster:nth-child(3) img { object-position: 50% 37%; }
    .sw35lib-poster-label { justify-content: start; align-items: center; gap: 16px; }
    .sw35lib-circle { width: 32px; align-self: center; }
    .sw35lib-index { gap: 27px; }
    .sw35lib-services { display: grid; gap: 20px; }
    .sw35lib-archive-inner { display: block; padding: 0; }
    .sw35lib-archive > img { height: clamp(340px,79vw,480px); object-position: 58% 50%; }
    .sw35lib-archive::before { height: clamp(340px,79vw,480px); }
    .sw35lib-archive-copy {
        display: flex; flex-direction: column; justify-content: flex-end; align-items: start;
        min-height: clamp(340px,79vw,480px); padding: 32px var(--lib-pad);
    }
    #primary .sw35lib-archive-copy h1 { font-size: clamp(42px,9.8vw,63px); }
    .sw35lib-archive-copy p { font-size: 16px; margin: 14px 0 17px; }
    .sw35lib-drawer { padding: 16px var(--lib-pad) 8px; }
    #primary .sw35lib-drawer h2 { font-size: 20px; padding-bottom: 9px; }
    .sw35lib-drawer > a { grid-template-columns: 40px 1fr auto; padding-block: 5px; }
    .sw35lib-drawer > a img { width: 40px; height: 41px; }
    .sw35lib-drawer > a > span:not(.sw35lib-arr) { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
    .sw35lib-studio { display: flex; flex-direction: column; }
    .sw35lib-print-stage { min-height: 0; height: clamp(220px,55vw,350px); padding: 27px 28px; }
    .sw35lib-zoom { inset-block-start: 7px; inset-inline-end: 9px; }
    .sw35lib-fabric-tag { inset-inline-start: 41px; bottom: 13px; padding: 7px 11px; }
    .sw35lib-inspector { padding: 27px var(--lib-pad) 31px; }
    .sw35lib-print-copy p { margin-top: 11px; }
    .sw35lib-swatches { margin-top: 18px; }
    .sw35lib-print-actions { margin-top: 16px; }
}
@media (max-width: 460px) {
    .sw35lib-index, .sw35lib-services > div { grid-template-columns: 1fr; }
    .sw35lib-index-title { display: block; }
    .sw35lib-index-title .sw35lib-underline { margin-top: 7px; }
}
@media (prefers-reduced-motion:reduce) {
    .sw35lib-poster, .sw35lib-print-canvas img { transition: none; }
}
