/* Charis Wolfe — an alabaster gallery wall. The only colour on the page is the art. */

@font-face {
  font-family: 'Playfair';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/fonts/playfair-latin-opsz-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Playfair';
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
  src: url('/fonts/playfair-latin-opsz-italic.woff2') format('woff2-variations');
}

/* Until Playfair arrives, Georgia stands in at Playfair's width so lines do not re-wrap. */
@font-face {
  font-family: 'Playfair Fallback';
  src: local('Georgia');
  size-adjust: 95%;
}

:root {
  --wall: #f3f1ea;
  --panel: #f8f7f2;
  --ink: #141412;
  --ink-2: #45433d;
  --ink-3: #66635b;
  --line: #dcd8cc;
  --sold: #b3261e;
  --side: 18rem;
  --pad: clamp(1.25rem, 4.2vw, 4.75rem);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font: 'Playfair', 'Playfair Fallback', 'Playfair Display', Georgia, 'Times New Roman', serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font-family: var(--font);
  font-optical-sizing: auto;
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
em { font-style: italic; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--wall); }

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--ink-3); }
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--wall); padding: 0.7rem 1.1rem; text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 1rem; }

/* ── shell ─────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
main { padding: clamp(2.25rem, 5vw, 4.5rem) var(--pad) 0; min-width: 0; display: flex; flex-direction: column; }
main:focus { outline: none; }

/* ── sidebar ───────────────────────────────────────────── */
.side {
  position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto;
  padding: clamp(2.25rem, 5vw, 4.5rem) 2rem 2rem 2.25rem;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  view-transition-name: side;
  scrollbar-width: none;
}
.side-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.wordmark {
  font-size: 1.9rem; line-height: 1.05; letter-spacing: -0.015em; text-decoration: none; font-weight: 400;
  display: inline-block;
}
.wordmark::after {
  content: ''; display: block; height: 1px; background: var(--ink); margin-top: 0.5rem;
  transform: scaleX(0.28); transform-origin: left; transition: transform 0.6s var(--ease);
}
.wordmark:hover::after, .wordmark:focus-visible::after { transform: scaleX(1); }
.menu-btn { display: none; }
.side-body { display: flex; flex-direction: column; flex: 1; }
.side-tag { margin-top: 0.85rem; font-style: italic; color: var(--ink-2); font-size: 1rem; }

.search { position: relative; margin-top: 2rem; }
.search input {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--ink);
  padding: 0.55rem 2rem 0.55rem 0; font-size: 1rem; border-radius: 0; appearance: none; -webkit-appearance: none;
}
.search input::placeholder { color: var(--ink-3); font-style: italic; opacity: 1; }
.search input:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search button {
  position: absolute; right: -0.35rem; top: 50%; transform: translateY(-50%);
  background: none; border: 0; padding: 0.5rem; cursor: pointer; line-height: 0;
  transition: transform 0.35s var(--ease);
}
.search button:hover { transform: translateY(-50%) translateX(3px); }

.side-nav { margin-top: 2.1rem; }
.side-nav + .side-nav { margin-top: 0; }
.side-h {
  font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3);
  margin: 1.6rem 0 0.5rem;
}
.side-nav > .side-h:first-child { margin-top: 0; }
.side-nav + .side-nav > .side-h:first-child { margin-top: 1.6rem; }
.side-nav a {
  position: relative; display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem;
  padding: 0.24rem 0; text-decoration: none; font-size: 1.0625rem;
  transition: padding-left 0.4s var(--ease);
}
.side-nav a::before {
  content: ''; position: absolute; left: 0; top: 50%; width: 0.75rem; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease);
}
.side-nav a:hover, .side-nav a:focus-visible, .side-nav a[aria-current] { padding-left: 1.25rem; }
.side-nav a:hover::before, .side-nav a:focus-visible::before, .side-nav a[aria-current]::before { transform: scaleX(1); }
.side-nav a[aria-current] { font-style: italic; }
.side-nav ul ul { margin: 0.1rem 0 0.4rem 0; padding-left: 1rem; border-left: 1px solid var(--line); }
.side-nav ul ul a { font-size: 0.98rem; color: var(--ink-2); padding: 0.2rem 0; }
.count { font-size: 0.85rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.side-foot { margin-top: auto; padding-top: 2.5rem; font-size: 0.9rem; color: var(--ink-2); }
.side-foot a { display: inline-block; padding: 0.3rem 0 2px; text-decoration: none; background: linear-gradient(currentColor, currentColor) no-repeat left 100% / 100% 1px; transition: background-size 0.4s var(--ease); }
.side-foot a:hover { background-size: 0% 1px; background-position: right 100%; }

/* ── intro / headings ──────────────────────────────────── */
.eyebrow { font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 1rem; }
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { color: var(--ink); }
.intro { max-width: 58rem; }
.intro h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.6rem); line-height: 1.04; letter-spacing: -0.022em; font-weight: 400;
  text-wrap: balance;
}
.intro-home h1 { font-size: clamp(2.5rem, 4.5vw, 4.1rem); line-height: 1.04; }
.intro h1 em { font-weight: 300; line-height: 0; } /* line-height 0: the italic must not change the line's height while its font file loads */
.lede { margin-top: 1.5rem; max-width: 38rem; font-size: clamp(1.1rem, 1.35vw, 1.3rem); line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.intro-links { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.6rem 2.25rem; }

.link {
  display: inline-block; text-decoration: none; padding: 0.3rem 0 3px;
  background: linear-gradient(currentColor, currentColor) no-repeat left 100% / 100% 1px;
  transition: background-size 0.45s var(--ease);
}
.link:hover, .link:focus-visible { background-size: 0% 1px; background-position: right 100%; }
.intro-links .link::after { content: '\2192'; display: inline-block; margin-left: 0.45rem; transition: transform 0.45s var(--ease); }
.intro-links .link:hover::after { transform: translateX(5px); }

/* ── the wall ──────────────────────────────────────────── */
.quick { display: none; }
.wall-bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 2rem; min-height: 1.7rem; margin: clamp(1.25rem, 2.4vw, 2.25rem) 0 1rem; font-size: 0.95rem; color: var(--ink-2); }
.wall-note { margin-left: auto; font-style: italic; color: var(--ink-3); }
.wall { columns: 3 19rem; column-gap: clamp(1.75rem, 3.4vw, 3.75rem); }
.work { break-inside: avoid; margin: 0 0 clamp(2.75rem, 4.4vw, 4.5rem); animation: rise 0.9s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.work[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.work-link { display: block; text-decoration: none; }
.frame {
  display: block; position: relative; background: #e7e3d8; width: calc(var(--s, 1) * 100%);
  box-shadow: 0 1px 1px rgba(20, 20, 18, 0.05), 0 22px 30px -24px rgba(20, 20, 18, 0.5);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.frame img { width: 100%; height: 100%; object-fit: cover; }
.work-link:hover .frame, .work-link:focus-visible .frame {
  transform: translateY(-7px);
  box-shadow: 0 1px 1px rgba(20, 20, 18, 0.05), 0 40px 42px -28px rgba(20, 20, 18, 0.55);
}
.label { display: block; padding-top: 1.1rem; }
.label-title { display: inline; margin: 0; font-weight: 400; font-size: 1.3rem; line-height: 1.25; letter-spacing: -0.01em;
  background: linear-gradient(currentColor, currentColor) no-repeat left 100% / 0% 1px; transition: background-size 0.5s var(--ease); padding-bottom: 1px; }
.work-link:hover .label-title, .work-link:focus-visible .label-title { background-size: 100% 1px; }
.label-title::after { content: '\2192'; display: inline-block; margin-left: 0.4rem; opacity: 0; transform: translateX(-8px); transition: opacity 0.4s var(--ease), transform 0.5s var(--ease); }
.work-link:hover .label-title::after, .work-link:focus-visible .label-title::after { opacity: 1; transform: none; }
.label-meta { display: block; margin-top: 0.3rem; font-size: 0.95rem; color: var(--ink-2); font-style: italic; }
.label-status { display: block; margin-top: 0.3rem; font-size: 0.9rem; color: var(--ink-2); font-variant-numeric: lining-nums; }
.dot { display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; margin-right: 0.5rem; vertical-align: 0.06em; border: 1px solid var(--ink); }
.dot-sold { background: var(--sold); border-color: var(--sold); }
.dot-nfs { background: var(--ink); }
.tag-sample { display: inline-block; margin-top: 0.6rem; font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); border: 1px solid var(--line); padding: 0.15rem 0.5rem; }
.piece-art .tag-sample { margin-top: 1.25rem; }
.wall-empty { padding: 2rem 0 4rem; font-size: 1.1rem; color: var(--ink-2); }

/* ── single piece ──────────────────────────────────────── */
.crumbs { font-size: 0.85rem; color: var(--ink-3); margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: baseline; }
.crumbs li + li::before { content: '/'; margin: 0 0.6rem; color: var(--line); }
.crumbs a { text-decoration: none; display: inline-block; padding: 0.3rem; margin: 0 -0.3rem; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current] { color: var(--ink-2); font-style: italic; }

.piece { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(17rem, 1fr); gap: clamp(2rem, 4.5vw, 5rem); align-items: start; }
.piece-art { display: flex; flex-direction: column; align-items: flex-start; position: sticky; top: clamp(2rem, 5vw, 4.5rem); }
.piece-zoom { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; line-height: 0; transition: transform 0.6s var(--ease); }
.piece-zoom:hover { transform: translateY(-5px); }
.piece-zoom:hover img { box-shadow: 0 1px 1px rgba(20, 20, 18, 0.05), 0 48px 52px -32px rgba(20, 20, 18, 0.6); }
.piece-zoom img { view-transition-name: art; box-shadow: 0 1px 1px rgba(20, 20, 18, 0.05), 0 34px 44px -30px rgba(20, 20, 18, 0.55); transition: box-shadow 0.6s var(--ease); max-height: clamp(22rem, calc(100vh - 11rem), 62rem); width: auto; max-width: 100%; }
.piece-label { position: sticky; top: clamp(2rem, 5vw, 4.5rem); }
.piece-label h1 { font-size: clamp(2rem, 3.4vw, 3.1rem); line-height: 1.08; letter-spacing: -0.02em; font-weight: 400; text-wrap: balance; }
.piece-by { margin-top: 0.6rem; font-style: italic; color: var(--ink-2); font-size: 1.15rem; }
.facts { margin-top: 1.75rem; border-top: 1px solid var(--ink); }
.facts > div { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); padding-top: 0.35rem; }
.facts dd { font-variant-numeric: lining-nums; }
.facts-note { display: block; font-size: 0.92rem; color: var(--ink-2); margin-top: 0.15rem; }
.piece-text { margin-top: 1.5rem; color: var(--ink-2); }
.piece-text p + p { margin-top: 0.9rem; }
.palette { display: flex; align-items: center; gap: 0.4rem; margin-top: 1.5rem; }
.palette-h { font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); margin-right: 0.6rem; }
.palette i { width: 1.6rem; height: 1.6rem; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(20, 20, 18, 0.08); transition: transform 0.4s var(--ease); }
.palette i:hover { transform: scale(1.18); }
.piece-actions { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1.75rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 0.9rem 1.25rem; min-height: 3rem; border: 1px solid var(--ink); border-radius: 0; cursor: pointer;
  text-decoration: none; font-size: 1rem; line-height: 1.2; color: var(--wall);
  background: linear-gradient(var(--ink), var(--ink)) no-repeat left / 100% 100%;
  transition: background-size 0.5s var(--ease), color 0.5s var(--ease);
}
.btn::after { content: '\2192'; transition: transform 0.5s var(--ease); }
.btn:hover, .btn:focus-visible { background-size: 0% 100%; color: var(--ink); }
.btn:hover::after, .btn:focus-visible::after { transform: translateX(5px); }
.btn-quiet { color: var(--ink); background-size: 0% 100%; }
.btn-quiet:hover, .btn-quiet:focus-visible { background-size: 100% 100%; color: var(--wall); }
.btn[disabled] { opacity: 0.55; cursor: progress; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: clamp(3rem, 6vw, 6rem); border-top: 1px solid var(--ink); padding-top: 1.25rem; }
.pager a { text-decoration: none; display: block; }
.pager-next { text-align: right; }
.pager-dir { display: block; font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); }
.pager-title { display: inline-block; font-size: 1.3rem; transition: transform 0.5s var(--ease); }
.pager-prev:hover .pager-title { transform: translateX(-6px); font-style: italic; }
.pager-next:hover .pager-title { transform: translateX(6px); font-style: italic; }
.related { margin-top: clamp(3rem, 6vw, 5.5rem); }
.related h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); font-weight: 400; letter-spacing: -0.015em; margin-bottom: 2rem; }

.lightbox { border: 0; padding: 0; background: var(--wall); max-width: none; max-height: none; width: 100vw; height: 100dvh; margin: 0; }
.lightbox::backdrop { background: var(--wall); }
.lightbox[open] { display: grid; place-items: center; animation: fade 0.35s var(--ease); }
.lightbox img { max-width: 92vw; max-height: calc(100dvh - 8rem); width: auto; height: auto; box-shadow: 0 40px 60px -40px rgba(20, 20, 18, 0.6); cursor: zoom-out; }
.lightbox-close { position: fixed; top: 0.75rem; right: 1.25rem; min-width: 2.75rem; min-height: 2.75rem; background: none; border: 0; border-bottom: 1px solid var(--ink); padding: 0.4rem 0.25rem; cursor: pointer; font-size: 0.95rem; z-index: 2; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ── prose pages ───────────────────────────────────────── */
.prose { max-width: 40rem; margin-top: clamp(2rem, 4vw, 3rem); font-size: 1.15rem; line-height: 1.7; }
.prose p + p { margin-top: 1.15rem; }
.prose-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.5rem !important; }
.about-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.78fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; max-width: 70rem; }
.about-work { margin-top: clamp(2rem, 4vw, 3rem); }
.about-work figcaption { margin-top: 1rem; font-size: 0.95rem; font-style: italic; color: var(--ink-2); }
.about-work figcaption a { display: inline-block; padding: 0.3rem 0; text-decoration: none; font-style: normal; color: var(--ink); }
.about-work figcaption a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(1.5rem, 3vw, 3rem); margin-top: clamp(2.5rem, 5vw, 4rem); max-width: 68rem; }
.steps li { border-top: 1px solid var(--ink); padding: 1.1rem 0 2.25rem; }
.steps-n { font-size: 0.8rem; letter-spacing: 0.2em; color: var(--ink-3); font-variant-numeric: lining-nums; }
.steps h2 { font-size: 1.35rem; font-weight: 400; line-height: 1.25; margin: 0.5rem 0 0.5rem; }
.steps p { color: var(--ink-2); font-size: 1rem; }

/* ── form ──────────────────────────────────────────────── */
.form { max-width: 44rem; margin-top: clamp(2rem, 4vw, 3rem); display: grid; gap: 1.6rem; }
.form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.form legend, .form label { display: block; font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-2); padding: 0; margin-bottom: 0.5rem; }
.form .opt { letter-spacing: 0.04em; text-transform: none; font-style: italic; color: var(--ink-3); font-size: 0.85rem; margin-left: 0.35rem; }
.form input[type='text'], .form input[type='email'], .form input[type='tel'], .form select, .form textarea {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0;
  padding: 0.55rem 0; font-size: 1.0625rem; line-height: 1.5; appearance: none; -webkit-appearance: none;
  transition: box-shadow 0.3s var(--ease);
}
.form textarea { border: 1px solid var(--ink); padding: 0.8rem 0.9rem; resize: vertical; min-height: 9rem; }
.form select { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23141412' stroke-width='1.3'/%3E%3C/svg%3E") no-repeat right 0.2rem center; padding-right: 1.6rem; }
.form input:focus-visible, .form select:focus-visible { outline: none; box-shadow: 0 2px 0 var(--ink); }
.form textarea:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--ink); }
.form input::placeholder { color: var(--ink-3); font-style: italic; opacity: 1; }
.form [aria-invalid='true'] { border-color: var(--sold); box-shadow: 0 1px 0 var(--sold); }
.form [aria-invalid='true']:focus-visible { box-shadow: 0 2px 0 var(--sold); }
.form textarea[aria-invalid='true'], .form textarea[aria-invalid='true']:focus-visible { box-shadow: inset 0 0 0 1px var(--sold); }
.field-error { margin-top: 0.45rem; font-size: 0.92rem; color: var(--sold); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem 2rem; }
.choice-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.pill { position: relative; display: inline-block !important; margin: 0 !important; cursor: pointer; letter-spacing: 0 !important; text-transform: none !important; }
.pill input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pill span {
  display: inline-flex; align-items: center; min-height: 2.9rem; padding: 0.55rem 1.15rem; border: 1px solid var(--ink);
  font-size: 1rem; color: var(--ink);
  background: linear-gradient(var(--ink), var(--ink)) no-repeat left / 0% 100%;
  transition: background-size 0.45s var(--ease), color 0.45s var(--ease);
}
.pill:hover span { background-size: 100% 2px; background-position: left bottom; }
.pill input:checked + span { background-size: 100% 100%; color: var(--wall); }
.pill input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }
.hp { position: absolute; left: -200vw; width: 1px; height: 1px; overflow: hidden; }
.form [hidden] { display: none !important; }
.form-error { color: var(--sold); border-left: 2px solid var(--sold); padding-left: 0.9rem; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.form-actions .muted { font-size: 0.95rem; }

/* ── footer ────────────────────────────────────────────── */
.foot { margin-top: auto; padding: clamp(4rem, 8vw, 7rem) 0 2rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; font-size: 0.85rem; color: var(--ink-3); }
.foot a { text-decoration: none; display: inline-block; padding: 0.3rem 0; }
.foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.foot::before { content: ''; flex-basis: 100%; height: 1px; background: var(--line); margin-bottom: 1.25rem; }

/* ── page transitions ──────────────────────────────────── */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.4s; animation-timing-function: var(--ease); }
::view-transition-group(*) { animation-duration: 0.55s; animation-timing-function: var(--ease); }
/* The sidebar holds still between pages; the clicked work (named "art" by site.js) travels. */
::view-transition-old(side) { display: none; }
::view-transition-new(side) { animation: none; }
::view-transition-group(art) { animation-duration: 0.65s; }

/* ── smaller screens ───────────────────────────────────── */
@media (min-width: 1280px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1060px) {
  .about-split { grid-template-columns: 1fr; }
  .about-work { max-width: 28rem; margin-top: 0; }
  .piece-art { position: static; }
  .piece { grid-template-columns: 1fr; }
  .piece-label { position: static; max-width: 40rem; }
  .piece-zoom img { max-height: 78vh; }
}

@media (max-width: 860px) {
  .shell { display: block; }
  .side {
    position: sticky; top: 0; z-index: 20; height: auto; max-height: 100dvh; overflow: visible;
    padding: 0; border-right: 0; border-bottom: 1px solid var(--line); background: var(--wall); display: block;
  }
  .side-top { align-items: center; padding: 0.85rem var(--pad); }
  .wordmark { font-size: 1.5rem; }
  .wordmark::after { display: none; }
  .menu-btn {
    display: inline-flex; align-items: center; gap: 0.7rem; background: none; border: 0; padding: 0.6rem 0; min-height: 2.75rem; cursor: pointer;
    font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase;
  }
  .menu-btn-icon { position: relative; width: 1.5rem; height: 0.6rem; }
  .menu-btn-icon::before, .menu-btn-icon::after { content: ''; position: absolute; left: 0; right: 0; height: 1px; background: var(--ink); transition: transform 0.45s var(--ease); }
  .menu-btn-icon::before { top: 0; }
  .menu-btn-icon::after { bottom: 0; }
  .menu-btn[aria-expanded='true'] .menu-btn-icon::before { transform: translateY(0.28rem) rotate(20deg); }
  .menu-btn[aria-expanded='true'] .menu-btn-icon::after { transform: translateY(-0.28rem) rotate(-20deg); }
  .side-body { display: none; padding: 0.25rem var(--pad) 2.5rem; max-height: calc(100dvh - 4.5rem); overflow-y: auto; }
  .side[data-open] .side-body { display: block; animation: drop 0.45s var(--ease); }
  @keyframes drop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
  .side-tag { margin-top: 0; }
  .side-nav a { padding: 0.55rem 0; font-size: 1.2rem; }
  .side-nav ul ul a { font-size: 1.05rem; padding: 0.45rem 0; }
  .side-foot { padding-top: 2rem; }
  main { padding-top: 2.25rem; }
  .wall { columns: 2 16rem; }
  .work .frame { width: calc(max(var(--s, 1), 0.64) * 100%); }
  .quick { display: block; margin: 1.5rem calc(var(--pad) * -1) 0; border-block: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
  .quick::-webkit-scrollbar { display: none; }
  .quick ul { display: flex; gap: 1.75rem; padding: 0 var(--pad); width: max-content; }
  .quick a { display: inline-flex; align-items: center; justify-content: center; min-width: 1.75rem; min-height: 3rem; white-space: nowrap; text-decoration: none; font-size: 1.05rem; }
  .quick a[aria-current] { font-style: italic; text-decoration: underline; text-underline-offset: 7px; text-decoration-thickness: 1px; }
  .quick { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
  .quick ul { padding-right: 3.5rem; }
  .wall-note { margin-left: 0; }
  /* On a phone, how to buy comes straight after the title, before the catalogue details. */
  .piece-label { display: flex; flex-direction: column; }
  .piece-actions { order: 1; margin-top: 1.5rem; }
  .facts, .piece-text, .palette { order: 2; }
  .pager-title { font-size: 1.1rem; }
  .grid2 { grid-template-columns: 1fr; }
  .facts > div { grid-template-columns: 5rem 1fr; }
}

@media (max-width: 600px) {
  .steps { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  .side, .foot, .pager, .piece-actions, .skip { display: none !important; }
  .shell { display: block; }
}
