/* Shared project reading views. */
.editorial-project-view {
  --editorial-inset: clamp(24px, 5vw, 62px);
  --fiber: url("assets/paper-fibers.webp");
  position: relative;
  color: var(--ink);
}
.editorial-project-view .project-heading h1 {
  margin: 0;
  font: 400 clamp(32px, 4.4vw, 54px)/1.08 var(--display-font);
  letter-spacing: -.07em;
}
.editorial-project-view .sheet-number {
  position: absolute;
  bottom: 22px;
  color: var(--muted);
  font: 10px/1.3 var(--font);
  font-variant-numeric: tabular-nums;
}
.editorial-project-view a:focus-visible { outline: 1px solid var(--blue); outline-offset: 6px; }

.editorial-project-view .detail-nav,
.editorial-project-view .detail-end {
  display: flex;
  margin-block: 12px;
  color: var(--muted);
  font: 12px/1.45 var(--font);
}
.editorial-project-view .detail-end { justify-content: flex-end; }
.editorial-project-view :is(.detail-nav, .detail-end) a:hover { color: var(--red); }
.editorial-project-view .spread {
  position: relative;
  display: grid;
  min-height: min(620px, 76vh);
  grid-template-columns: 1fr 1fr;
  background: linear-gradient(90deg, var(--paper) 0%, #9284660b 48.3%, #897d6530 49.8%, #a49a8113 50.2%, #fff4 51.5%, #d0c6b113 100%), var(--fiber), var(--paper);
  box-shadow: 0 1px 2px #352b1f12, 0 9px 27px -22px #42372850;
}
.editorial-project-view .spread > :is(.left-page, .right-page) {
  min-width: 0;
  padding: var(--editorial-inset) var(--editorial-inset) calc(var(--editorial-inset) + 18px);
}
.editorial-project-view .left-page { position: relative; }
.editorial-project-view .right-page {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-content: start;
}
.editorial-project-view .project-heading {
  display: block;
  height: auto;
  min-height: 0;
  max-width: 375px;
  margin: 0;
  padding: 0;
}
.editorial-project-view .project-heading h1 { font-size: clamp(30px, 3.65vw, 48px); }
.editorial-project-view .project-deck {
  max-width: 35ch;
  margin: 14px 0 0;
  color: var(--muted);
  font: 15px/1.44 var(--font);
}
.editorial-project-view .project-copy {
  max-width: 46ch;
  margin-top: clamp(37px, 5.4vw, 72px);
  font: 13px/1.68 var(--font);
}
.editorial-project-view .project-copy p { margin: 0; }
.editorial-project-view .project-copy p + p { margin-top: 14px; }
.editorial-project-view .project-credit {
  margin-top: 24px;
  color: var(--muted);
  font: 11px/1.46 var(--font);
}
.editorial-project-view .project-figure { grid-column: 2 / -1; margin: 15px 0 0; }
.editorial-project-view .project-artwork :is(img, svg),
.editorial-project-view .residence-sketch-frame :is(img, svg) {
  display: block;
  width: 100%;
  height: auto;
}
.editorial-project-view .project-artwork > img {
  max-height: 470px;
  object-fit: cover;
}
.editorial-project-view .project-figure figcaption {
  max-width: 41ch;
  margin-top: 8px;
  color: var(--muted);
  font: 10px/1.45 var(--font);
}
.editorial-project-view .project-note {
  grid-column: 2 / 9;
  max-width: 28ch;
  margin: 36px 0 0;
  color: var(--muted);
  font: 12px/1.56 var(--font);
}
.editorial-project-view .sheet-number { right: var(--editorial-inset); }
.editorial-project-view .spread-growth .project-figure { grid-column: 3 / -1; margin-top: 49px; }
.editorial-project-view .spread-alerts .project-figure { grid-column: 4 / -1; margin-top: 24px; }
.editorial-project-view .spread-alerts .project-note { grid-column: 1 / 7; }
.editorial-project-view .spread-bone .project-figure { grid-column: 1 / 11; margin-top: 40px; }
.editorial-project-view .spread-bone .project-artwork > img { aspect-ratio: 1.12; object-position: 57% 50%; }
.editorial-project-view .spread-bone .project-note { grid-column: 5 / -1; }
.editorial-project-view .spread-residence .project-heading { max-width: 70%; }
.editorial-project-view .spread-residence .project-copy { margin-top: clamp(47px, 7vw, 94px); }
.editorial-project-view .residence-sketch-frame {
  position: absolute;
  top: clamp(45px, 6vw, 78px);
  right: clamp(22px, 4vw, 50px);
  width: min(24%, 144px);
  rotate: -3deg;
}
.editorial-project-view .spread-residence .project-figure { grid-column: 4 / -1; }
.editorial-project-view .spread-residence .project-artwork > img { aspect-ratio: .84; object-position: 50% 51%; }
.editorial-project-view .spread-residence .project-note { grid-column: 1 / 9; margin-top: 22px; }
.editorial-project-view .spread-studies .project-figure { grid-column: 3 / -1; margin-top: 53px; }
.editorial-project-view .spread-studies .project-artwork > img { aspect-ratio: 1.25; }
.editorial-project-view .spread-studies .project-note { grid-column: 1 / 8; margin-top: 25px; }

@media (max-width: 680px) {
  .editorial-project-view .spread {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding: 32px var(--editorial-inset) 56px;
    background: linear-gradient(145deg, var(--paper), #c8bda51c), var(--fiber), var(--paper);
  }
  .editorial-project-view .spread > :is(.left-page, .right-page) { display: contents; }
  .editorial-project-view .spread .project-heading { max-width: none; }
  .editorial-project-view .spread .project-copy { margin-top: 0; font-size: 14px; }
  .editorial-project-view .residence-sketch-frame { display: none; }
  .editorial-project-view .spread .project-figure,
  .editorial-project-view .spread .project-note { margin-top: 0; }
  .editorial-project-view .project-figure { width: min(100%, 440px); }
  .editorial-project-view .project-note { margin-left: 8%; }
  .editorial-project-view :is(.spread-bone, .spread-residence) .project-heading { order: -2; }
  .editorial-project-view :is(.spread-bone, .spread-residence) .project-figure {
    order: -1;
    width: min(86%, 375px);
    margin-left: auto;
  }
}
/* The existing case studies keep their editorial content. */
.editorial-project-view.editorial-legacy {
  --legacy-top: 44px;
  --legacy-bottom: 78px;
  display: grid;
  isolation: isolate;
  align-content: start;
  grid-template:
    "trail trail" var(--legacy-top)
    "heading artwork" auto
    "writing artwork" 1fr
    "bottom bottom" var(--legacy-bottom)
    / minmax(0, 1fr) minmax(0, 1fr);
}
.editorial-project-view.editorial-legacy::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  inset: var(--legacy-top) 0 var(--legacy-bottom);
  background: linear-gradient(90deg, var(--paper) 0%, #9284660b 48.3%, #897d6530 49.8%, #a49a8113 50.2%, #fff4 51.5%, #d0c6b113 100%), var(--fiber), var(--paper);
  box-shadow: 0 1px 2px #352b1f12, 0 9px 27px -22px #42372850;
}
.editorial-project-view.editorial-legacy .page-trail {
  display: flex;
  grid-area: trail;
  margin: 0;
  color: var(--muted);
  font: 12px/1.45 var(--font);
}
.editorial-project-view.editorial-legacy .page-trail a { font-weight: 400; }
.editorial-project-view.editorial-legacy .page-trail > span,
.editorial-project-view.editorial-legacy .detail-heading > .micro { display: none; }
.editorial-project-view.editorial-legacy .detail-heading {
  grid-area: heading;
  min-width: 0;
  margin: 0;
  padding: var(--editorial-inset) var(--editorial-inset) 0;
}
.editorial-project-view.editorial-legacy .detail-heading h1 {
  margin: 0 0 14px;
  font: 400 clamp(29px, 3.65vw, 48px)/1.08 var(--display-font);
  letter-spacing: -.07em;
}
.editorial-project-view.editorial-legacy .detail-deck {
  margin: 0;
  color: var(--muted);
  font: 15px/1.44 var(--font);
  letter-spacing: normal;
}
.editorial-project-view.editorial-legacy .detail-art {
  grid-area: artwork;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: calc(var(--editorial-inset) + 15px) var(--editorial-inset) calc(var(--editorial-inset) + 18px);
}
.editorial-project-view.editorial-legacy .detail-art .muko-visual {
  min-height: 0;
  padding: clamp(12px, 1.9vw, 27px);
}
.editorial-project-view.editorial-legacy .detail-art .workspace-nav { gap: 10px; }
.editorial-project-view.editorial-legacy .detail-art .workspace-body { padding: 19px 1px 10px; }
.editorial-project-view.editorial-legacy .detail-art .alerts-visual { width: 100%; min-height: 0; }
.editorial-project-view.editorial-legacy .detail-art .bone-figure img {
  height: auto;
  max-height: 460px;
  aspect-ratio: 1.08;
  object-fit: cover;
  object-position: 57% 50%;
}
.editorial-project-view.editorial-legacy .detail-writing {
  display: flex;
  flex-direction: column-reverse;
  grid-area: writing;
  min-width: 0;
  justify-content: start;
  gap: 28px;
  padding: clamp(33px, 4.8vw, 61px) var(--editorial-inset) calc(var(--editorial-inset) + 18px);
}
.editorial-project-view.editorial-legacy .detail-writing aside { margin: 0; }
.editorial-project-view.editorial-legacy .detail-writing aside p {
  margin: 0;
  font: 11px/1.46 var(--font);
}
.editorial-project-view.editorial-legacy .writing-section { margin-bottom: 22px; }
.editorial-project-view.editorial-legacy .writing-section h2 { margin: 0 0 6px; }
.editorial-project-view.editorial-legacy .writing-section p { margin: 0; font: 13px/1.68 var(--font); }
.editorial-project-view.editorial-legacy .detail-note { margin: 0; }
.editorial-project-view.editorial-legacy .detail-bottom {
  grid-area: bottom;
  align-items: start;
  padding: 13px 0 0;
  border-top: 0;
  color: var(--muted);
  font: 12px/1.45 var(--font);
}
.editorial-project-view.editorial-legacy .detail-bottom a { font-weight: 400; }
@media (max-width: 820px) {
  .editorial-project-view.editorial-legacy {
    --legacy-top: 39px;
    --legacy-bottom: 65px;
    grid-template:
      "trail" var(--legacy-top)
      "heading" auto
      "artwork" auto
      "writing" 1fr
      "bottom" var(--legacy-bottom)
      / minmax(0, 1fr);
  }
  .editorial-project-view.editorial-legacy::before {
    background: linear-gradient(145deg, var(--paper), #c8bda51c), var(--fiber), var(--paper);
  }
  .editorial-project-view.editorial-legacy .detail-art { padding-block: 30px 0; }
  .editorial-project-view.editorial-legacy .detail-writing { padding-top: 32px; }
}
