/* 2026-10-10: measured corrections for the work archive, process and journal.
   Preserve the existing copy, artwork identities, category filters and lightbox. */
html body[data-layout-system][data-layout-system] #MainContent#MainContent#MainContent .portfolio-grid {
  display: block !important;
  column-count: 4;
  column-gap: 24px;
}
html body[data-layout-system][data-layout-system] #MainContent#MainContent#MainContent .portfolio-grid__item {
  width: 100%;
  break-inside: avoid;
  margin: 0 0 32px;
}
html body[data-layout-system][data-layout-system] #MainContent#MainContent#MainContent .portfolio-grid__item :is(a,.portfolio-grid__media) {
  height: auto !important;
  aspect-ratio: auto !important;
  background: transparent !important;
}
html body[data-layout-system][data-layout-system] #MainContent#MainContent#MainContent .portfolio-grid__item img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
}
html body[data-layout-system][data-layout-system] #MainContent#MainContent#MainContent .hw11-stage:first-child .hw11-stage__media img {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: contain !important;
}
html body[data-layout-system][data-layout-system] #MainContent#MainContent#MainContent .news-article__hero-image img {
  max-height: 560px !important;
  object-fit: contain !important;
}
html body[data-layout-system][data-layout-system] #MainContent#MainContent#MainContent .news-article__content figure {
  width: 100% !important;
  max-width: 100% !important;
}
html body[data-layout-system][data-layout-system] #MainContent#MainContent#MainContent .news-article__content figure img {
  max-width: 100% !important;
  margin-inline: auto !important;
  object-fit: contain !important;
}
html body[data-layout-system][data-layout-system] #MainContent#MainContent#MainContent .news-article__content figcaption {
  max-width: 650px !important;
  margin: 12px auto 0 !important;
  font-family: Montserrat, Arial, sans-serif !important;
  font-size: 12px !important;
  line-height: 1.65 !important;
  text-align: center !important;
}
/* Expanded artwork record uses a light panel; its caption must not inherit
   the gallery's pale-on-dark text treatment. */
html body[data-layout-system][data-layout-system] #MainContent#MainContent#MainContent .artwork-record-more__thumb figcaption {
  color: #685e50 !important;
  background: #e8e1d5 !important;
}
@media (max-width: 1000px) {
  html body[data-layout-system][data-layout-system] #MainContent#MainContent#MainContent .portfolio-grid {column-count: 3;column-gap: 20px;}
}
@media (max-width: 768px) {
  /* Simple policy prose uses the same mobile reading gutter as the header. */
  html body[data-layout-system][data-layout-system] #MainContent#MainContent#MainContent .container.prose {
    width: calc(100% - 48px) !important;
    max-width: calc(100% - 48px) !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
  }
}
@media (max-width: 760px) {
  html body[data-layout-system][data-layout-system] #MainContent#MainContent#MainContent .portfolio-grid {column-count: 2;column-gap: 16px;}
  html body[data-layout-system][data-layout-system] #MainContent#MainContent#MainContent .portfolio-grid__item {margin-bottom: 24px;}
  html body[data-layout-system][data-layout-system] #MainContent#MainContent#MainContent .news-article__hero-image img {max-height: 420px !important;}
}
@media (max-width: 480px) {
  html body[data-layout-system][data-layout-system] #MainContent#MainContent#MainContent .portfolio-grid {column-count: 1;}
}

/* Small mobile reading adjustment; preserve the timeline and image gutters. */
@media (max-width: 768px) {
  html body.page-how-it-works[data-layout-system][data-layout-system] #MainContent#MainContent#MainContent .hw11-stage__card {
    padding-inline: 20px !important;
  }
}

/* 2026-10-18: remove image-only backing colors and decorative shadows.
   Keep dimensions, object fit, photo content, captions and section surfaces. */
html body[data-layout-system][data-layout-system] #MainContent#MainContent#MainContent :is(
  img,
  figure:not(:has(figcaption)),
  .news-card__media,
  .oc16-techniques__media,
  .artwork-hero__media
) {
  background-color: transparent !important;
  box-shadow: none !important;
}
/* The craft page has a scoped inline rule for its technique thumbnails. */
html body[data-layout-system][data-layout-system] #MainContent#MainContent#MainContent#MainContent#MainContent#MainContent .oc16 .oc16-techniques__media {
  background-color: transparent !important;
  box-shadow: none !important;
}

/* 2026-10-19: remove photographed backdrops outside these frame/plaque silhouettes.
   Match the existing object-fit; no resizing, image replacement or script. */
html body img[src*="porlore-woman-porcelain-portrait-09-"] {
  -webkit-mask-image: url("/assets/frame-masks-20261019/woman-09.svg");
  mask-image: url("/assets/frame-masks-20261019/woman-09.svg");
}
html body img[src*="porlore-mother-and-children-porcelain-portrait-03-"] {
  -webkit-mask-image: url("/assets/frame-masks-20261019/mother-children-03.svg");
  mask-image: url("/assets/frame-masks-20261019/mother-children-03.svg");
}
html body img[src*="porlore-framed-f074-"] {
  -webkit-mask-image: url("/assets/frame-masks-20261019/f074.svg");
  mask-image: url("/assets/frame-masks-20261019/f074.svg");
}
html body img[src*="porlore-man-porcelain-portrait-10-"] {
  -webkit-mask-image: url("/assets/frame-masks-20261019/man-10.svg");
  mask-image: url("/assets/frame-masks-20261019/man-10.svg");
}
html body img[src*="porlore-replica-gothic-church-nave-"] {
  -webkit-mask-image: url("/assets/frame-masks-20261019/gothic-nave.svg");
  mask-image: url("/assets/frame-masks-20261019/gothic-nave.svg");
}
html body img[src*="porlore-history-kpm-rembrandt-"] {
  -webkit-mask-image: url("/assets/frame-masks-20261019/kpm-rembrandt.svg");
  mask-image: url("/assets/frame-masks-20261019/kpm-rembrandt.svg");
}
html body img[src*="porlore-history-wang-yeting-spring-river-"] {
  -webkit-mask-image: url("/assets/frame-masks-20261019/spring-river.svg");
  mask-image: url("/assets/frame-masks-20261019/spring-river.svg");
}
html body img[src*="porlore-framed-f107-"] {
  -webkit-mask-image: url("/assets/frame-masks-20261019/f107.svg");
  mask-image: url("/assets/frame-masks-20261019/f107.svg");
}
html body img[src*="porlore-framed-f105-"] {
  -webkit-mask-image: url("/assets/frame-masks-20261019/f105.svg");
  mask-image: url("/assets/frame-masks-20261019/f105.svg");
}
html body img[src*="porlore-framed-f106-"] {
  -webkit-mask-image: url("/assets/frame-masks-20261019/f106.svg");
  mask-image: url("/assets/frame-masks-20261019/f106.svg");
}
html body img[src*="porlore-local-finished-"] {
  -webkit-mask-image: url("/assets/frame-masks-20261019/finished.svg");
  mask-image: url("/assets/frame-masks-20261019/finished.svg");
}
html body img[src*="porlore-family-porcelain-portrait-03-20261010"] {
  -webkit-mask-image: url("/assets/frame-masks-20261019/family-03.svg");
  mask-image: url("/assets/frame-masks-20261019/family-03.svg");
}
html body img[src*="porlore-history-wang-qi-plaque-"] {
  -webkit-mask-image: url("/assets/frame-masks-20261019/wang-qi-plaque.svg");
  mask-image: url("/assets/frame-masks-20261019/wang-qi-plaque.svg");
}
html body img[src*="porlore-ourcraft-finished-work-"] {
  -webkit-mask-image: url("/assets/frame-masks-20261019/craft-finished.svg");
  mask-image: url("/assets/frame-masks-20261019/craft-finished.svg");
}
html body img[src*="porlore-framed-f086-"] {
  -webkit-mask-image: url("/assets/frame-masks-20261019/f086.svg");
  mask-image: url("/assets/frame-masks-20261019/f086.svg");
}
html body img[src*="porlore-framed-f062-"] {
  -webkit-mask-image: url("/assets/frame-masks-20261019/f062.svg");
  mask-image: url("/assets/frame-masks-20261019/f062.svg");
}
html body img[src*="porlore-framed-f090-"] {
  -webkit-mask-image: url("/assets/frame-masks-20261019/f090.svg");
  mask-image: url("/assets/frame-masks-20261019/f090.svg");
}
html body img[src*="porlore-framed-f109-"] {
  -webkit-mask-image: url("/assets/frame-masks-20261019/f109.svg");
  mask-image: url("/assets/frame-masks-20261019/f109.svg");
}
html body img[src*="porlore-framed-newborn-"] {
  -webkit-mask-image: url("/assets/frame-masks-20261019/newborn.svg");
  mask-image: url("/assets/frame-masks-20261019/newborn.svg");
}
html body img[src*="porlore-oval-portrait-original-"] {
  -webkit-mask-image: url("/assets/frame-masks-20261019/oval-original.svg");
  mask-image: url("/assets/frame-masks-20261019/oval-original.svg");
}
html body img[src*="porlore-framed-f108-"] {
  -webkit-mask-image: url("/assets/frame-masks-20261019/f108.svg");
  mask-image: url("/assets/frame-masks-20261019/f108.svg");
}
html body img[src*="porlore-woman-porcelain-portrait-09-"],
html body img[src*="porlore-mother-and-children-porcelain-portrait-03-"],
html body img[src*="porlore-framed-f074-"],
html body img[src*="porlore-man-porcelain-portrait-10-"],
html body img[src*="porlore-replica-gothic-church-nave-"],
html body img[src*="porlore-history-kpm-rembrandt-"],
html body img[src*="porlore-history-wang-yeting-spring-river-"],
html body img[src*="porlore-framed-f107-"],
html body img[src*="porlore-framed-f105-"],
html body img[src*="porlore-framed-f106-"],
html body img[src*="porlore-local-finished-"],
html body img[src*="porlore-family-porcelain-portrait-03-20261010"],
html body img[src*="porlore-history-wang-qi-plaque-"],
html body img[src*="porlore-ourcraft-finished-work-"],
html body img[src*="porlore-framed-f086-"],
html body img[src*="porlore-framed-f062-"],
html body img[src*="porlore-framed-f090-"],
html body img[src*="porlore-framed-f109-"],
html body img[src*="porlore-framed-newborn-"],
html body img[src*="porlore-oval-portrait-original-"],
html body img[src*="porlore-framed-f108-"] {
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* These two existing crops use cover and noncentral vertical positions. */
html body .at15-explore-card img[src*="porlore-local-finished-"] {
  -webkit-mask-size: cover; mask-size: cover;
  -webkit-mask-position: 50% 48%; mask-position: 50% 48%;
}
html body .sv21-hero img[src*="porlore-local-finished-"] {
  -webkit-mask-size: cover; mask-size: cover;
  -webkit-mask-position: 50% 52%; mask-position: 50% 52%;
}

/* Supersede the older hero mask reset for this exact photograph only. */
html body #MainContent#MainContent#MainContent#MainContent#MainContent#MainContent img[src*="porlore-family-porcelain-portrait-03-20261010"] {
  -webkit-mask-image: url("/assets/frame-masks-20261019/family-03.svg") !important;
  mask-image: url("/assets/frame-masks-20261019/family-03.svg") !important;
  -webkit-mask-size: contain !important; mask-size: contain !important;
  -webkit-mask-position: center !important; mask-position: center !important;
  -webkit-mask-repeat: no-repeat !important; mask-repeat: no-repeat !important;
  -webkit-mask-composite: source-over !important; mask-composite: add !important;
}
@media (max-width: 768px) {
  html body .sv21-hero img[src*="porlore-local-finished-"] {
    -webkit-mask-position: 58% 50%; mask-position: 58% 50%;
  }
}
