@font-face {
  font-family: Montserrat;
  src: url(/fonts/montserrat-regular.ttf) format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Gill;
  src: url(/fonts/gill_sans_light.otf) format("opentype");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: Gill;
  src: url(/fonts/gill_sans.otf);
}
@font-face {
  font-family: Bembo;
  src: url(/fonts/BemboStd.otf);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: #222;
  background: #faf9f5;
  font:
    18px/1.5 Gill,
    sans-serif;
}
a {
  color: inherit;
}
button {
  font: inherit;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #42abeb;
  outline-offset: 2px;
}
.home {
  height: 100dvh;
  position: relative;
  overflow: hidden;
  background: #252521;
}
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s;
  pointer-events: none;
}
.slide[data-current] {
  opacity: 1;
  pointer-events: auto;
}
.slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-brand {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(430px, 72vw);
  margin: 0;
  pointer-events: none;
}
.home-brand img {
  filter: brightness(0) invert(1);
  width: 100%;
  display: block;
}
.preview-tools[data-layout="gallery"] .preview-home img { width: 105px; }
.preview-actions a { text-decoration: none; }
.preview-index a {
  display: block;
}
.stage {
  position: relative;
  display: grid;
  place-items: center;
  background: #201f1b;
  margin-top: var(--page-header-height);
  height: calc(100dvh - var(--page-header-height));
  overflow: clip;
}
.canvas {
  position: relative;
  flex: none;
  margin: auto;
  width: max(100%, calc((100dvh - var(--page-header-height)) * var(--ratio)));
  line-height: 0;
}
.canvas img {
  width: 100%;
  height: auto;
}
.dot {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 0;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 50%;
}
.dot::after {
  content: "";
  display: block;
  margin: auto;
  width: 11px;
  height: 11px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #fffa;
  box-shadow:
    0 0 2px 1px #24221c,
    0 0 12px 5px #fff9;
  animation: glow 3s ease-in-out infinite alternate;
}
@keyframes glow {
  to {
    box-shadow:
      0 0 2px 1px #24221c,
      0 0 16px 7px #fff6;
  }
}
#detail {
  position: absolute;
  z-index: 2;
  max-width: min(310px, 92vw);
  max-height: calc(100% - 8px);
  overflow-y: auto;
  width: max-content;
  background: rgb(250 249 243 / 52%);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  border-radius: 12px;
  color: #101010;
  padding: 14px 16px 16px 18px;
  box-shadow: 0 3px 25px #0004;
  font-size: 18px;
  line-height: 25px;
}
#detail p {
  margin: 0.4em 0 0;
}
.detail-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.detail-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
#next-detail {
  padding: 0;
  width: 36px;
  height: 32px;
  color: inherit;
  border: 0;
  background: transparent;
  font: 22px/1 sans-serif;
}
@media (hover: hover) {
  #next-detail:hover { color: #383838; }
}
#close {
  flex: none;
  color: inherit;
  width: 26px;
  min-height: 26px;
  padding: 0;
  line-height: inherit;
  background: none;
  border: 0;
}
.paper {
  max-width: 1160px;
  margin: auto;
  padding: clamp(32px, 6vw, 90px) 6vw;
}
.preview-tools ~ .paper {
  padding-top: 110px;
}
h1,
h2,
h3 {
  font-family: Bembo, Georgia, serif;
  font-weight: normal;
  line-height: 1.08;
}
h1 {
  font-size: clamp(38px, 5vw, 72px);
  margin: 0;
}
article.paper > h1 { font-size: clamp(24.32px, 3.2vw, 46.08px); }
.byline {
  margin: 0.6rem 0 2.5rem;
}
.copy {
  columns: 2;
  column-gap: 52px;
  padding-block-end: 20px;
  font:
    21px/1.45 Bembo,
    serif;
}
.copy p:first-child {
  margin-top: 0;
}
.copy h2 {
  break-after: avoid;
}
footer,
details {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #bbb;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(245px, 100%), 1fr));
  gap: 32px;
  margin-top: 32px;
}
.grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.grid a {
  text-decoration: none;
}
.grid h2,
.grid p {
  margin: 8px 0;
}
textarea {
  display: block;
  width: 100%;
  margin: 5px 0 15px;
  padding: 10px;
  font: 16px/1.5 Gill;
}
table {
  border-collapse: collapse;
  width: 100%;
}
td,
th {
  text-align: left;
  padding: 14px 8px;
  border-bottom: 1px solid #ccc;
}
.adminheader {
  padding: 15px 5%;
  display: flex;
  gap: 28px;
  background: #222;
  color: #fff;
}
.adminheader img {
  width: 100px;
  filter: invert(1);
}
@media (max-width: 700px) {
  .copy {
    columns: 1;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
#header-search, .results-search {
  display: flex;
  color: #222;
  background: white;
}
.results-search { max-width: 36rem; margin: 1rem 0; border: 1px solid #d4d1ca; }
:is(#header-search, .results-search) input {
  border: 0;
  color: inherit;
  background: white;
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  font: inherit;
}
.results-search button {
  display: grid;
  place-items: center;
  min-height: 42px;
  width: 44px;
  color: inherit;
  background: white;
  border: 0;
}
.search-results ul { list-style: none; padding: 0; max-width: 42rem; }
.search-results li { padding: 12px 0; border-bottom: 1px solid #d4d1ca; }
.search-results li > a {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.search-results li h2 { text-decoration: underline; }
.search-results li img {
  flex: none;
  width: 96px;
  height: 68px;
  object-fit: cover;
}
.search-results li :is(h2,p) { margin: .2em 0; }

.article-figure {
  margin: 1em 0;
  break-inside: avoid;
}
.article-figure img {
  display: block;
  width: 100%;
  height: auto;
}
.copy .article-figure { container-type: inline-size; }
.copy .article-figure img {
  width: auto;
  max-width: 100%;
  max-height: min(579px, 123.8cqw);
  margin-inline: auto;
  border-radius: 12px;
}
.article-figure figcaption, #artist-image-caption { margin: .45rem 0 0; font: 15px/1.45 Gill, sans-serif; }
.copy .article-figure figcaption { margin-block-start: calc(.45rem + 10px); }
.article-figure figcaption a, #artist-image-caption a { display: block; }
.artist-bio { margin: 0; font: 21px/1.45 Bembo, serif; }
.artist-profile-body {
  display: grid;
  grid-template-columns: 234px minmax(0, 1fr);
  align-items: start;
  gap: 1rem 1.5rem;
}
.artist-profile-body img { display: block; width: min(234px, 100%); height: auto; }
@media (max-width: 580px) {
  .artist-profile-body { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.painting-frame {
  position: absolute;
  inset: 0;
  display: flex;
  overflow: auto;
  scrollbar-width: none;
}
.stage:not(.full-painting) .painting-frame {
  cursor: grab;
  user-select: none;
}
.stage .painting-frame.dragging { cursor: grabbing; }
.painting-frame img { display: block; -webkit-user-drag: none; }
.stage.full-painting .canvas {
  width: min(100%, calc((100dvh - var(--page-header-height)) * var(--ratio)));
}
.painting-controls {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 0;
  display: flex;
  gap: 6px;
}
.painting-controls button {
  height: 39.6px;
  color: white;
  background: #202020eb;
  border: 0;
  border-radius: 0;
}
#zoom {
  padding: 0 14px;
  font-size: 14px;
  font-weight: 300;
}
#toggle-spots {
  position: relative;
  width: 39.6px;
  padding: 0;
}
#toggle-spots::before,
#toggle-spots::after {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
#toggle-spots::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 7px #fff9;
}
#toggle-spots[aria-pressed="true"]::after {
  content: "";
  width: 20px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 1px #202020, 0 -1px #202020;
  transform: translate(-50%, -50%) rotate(-45deg);
}

#drag-hint {
  display: none;
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: 72px;
  height: 58px;
  pointer-events: none;
  --travel-x: 10px;
  --travel-y: 0px;
}
#drag-hint[data-axis] { display: block; }
#drag-hint.obscured { visibility: hidden; }
@media (any-pointer: coarse) {
  #drag-hint[data-axis] { pointer-events: auto; touch-action: none; }
  #drag-hint * { pointer-events: none; }
}
#drag-hint[data-axis="y"] { --travel-x: 0px; --travel-y: 7px; }
#drag-hint[data-axis="y"] .gesture-arrow { transform: rotate(-90deg); transform-origin: 40px 32px; }
.gesture-hand { animation: drag-gesture 1s ease-in-out 3 alternate both; }
@keyframes drag-gesture {
  from { transform: translate(calc(-1 * var(--travel-x)), calc(-1 * var(--travel-y))); }
  to { transform: translate(var(--travel-x), var(--travel-y)); }
}
.paper.editorial {
  max-width: 55rem;
}
.editorial-painting {
  display: block;
  width: 100%;
  height: auto;
}
.editorial-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1rem 2rem;
}
.editorial-notes img {
  display: block;
  max-width: 100%;
  max-height: 12rem;
}
.editorial-table {
  overflow-x: auto;
}
.editorial-variant {
  margin: 1.5rem 0;
}
.editorial pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#zoom { display: inline-flex; align-items: center; gap: 7px; }
#zoom svg { width: 20px; height: 20px; }
#zoom .exit-icon, #zoom[aria-expanded="true"] .expand-icon { display: none; }
#zoom[aria-expanded="true"] .exit-icon { display: inline; }
.viewing-painting { overflow: hidden; }
.stage.full-painting {
  position: fixed; inset: 0; z-index: 1000; width: 100%; height: 100dvh; margin: 0;
}
.stage.full-painting .canvas { width: min(100%, calc(100dvh * var(--ratio))); }
.advertisement {
  box-sizing: border-box; background: white; color: #161616; padding: 14px;
  font: 15px/1.2 "Gill Sans", sans-serif;
}
.advertisement a { color: inherit; display: grid; gap: 8px; text-decoration: none; }
.advertisement a:hover strong { text-decoration: underline; }
.advertisement img { display: block; width: 100%; max-height: 100px; object-fit: contain; }
.advertisement small { display: block; font: 11px/1.3 sans-serif; margin-top: 8px; }
.painting-ad {
  position: absolute; z-index: 4; left: max(0px,env(safe-area-inset-left)); bottom: max(0px,env(safe-area-inset-bottom));
  width: clamp(112px,15vw,156px); padding-top: 30px; max-height: 55%; overflow: auto;
}
.close-ad { position: absolute; right: 0; top: 0; width: 32px; height: 32px; border: 0; background: transparent; color: inherit; font: 22px/1 sans-serif; cursor: pointer; }
.essay-ad { border: 1px solid #ddd; margin: 28px auto; max-width: 360px; text-align: center; }
@media (max-width:580px) { .painting-ad { padding: 28px 9px 8px; font-size: 13px; } .painting-ad img { max-height: 64px; } }
