/* corylegendre.com v2 — a magazine article rebuilt as printed
   (Country Woman, Holiday 1999). Loaded after site.css and reader.css,
   which provides "Literata CL" and the lightbox. Sizes are in container
   units so each page scales like paper; under 700px the columns stack. */

.mag-intro { padding-bottom: clamp(28px, 4vw, 44px); }
.mag-intro__title { font-size: clamp(30px, 3vw + 14px, 58px); margin: 0 0 18px; }
.mag-intro .lede { max-width: 760px; }

.mag { display: block; padding: 0 16px clamp(48px, 6vw, 80px); }
.mag__sheet { container-type: inline-size; width: min(100%, 960px); margin: 0 auto clamp(28px, 4vw, 56px); }
.mag__page {
  --green: #1d7a3e; --maroon: #8e1b2c; --ink: #1d1a17; --paper: #fbf9f3;
  position: relative; width: 100%; box-sizing: border-box;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 3.2cqw;
  padding: 5cqw 4.6cqw 4cqw;
  background: var(--paper); color: var(--ink);
  font-family: "Literata CL", "Times New Roman", Times, serif; font-size: 1.5cqw; line-height: 1.36;
  box-shadow: 0 40px 80px -36px rgba(0, 0, 0, 0.95), 0 18px 30px -24px rgba(0, 0, 0, 0.8);
}
.mag__page p { margin: 0; max-width: none; text-align: justify; hyphens: auto; -webkit-hyphens: auto; text-indent: 1.4em; }
.mag__page p.mag__cont, .mag__col > p:first-child { text-indent: 0; }
.mag__page em { font-style: italic; }
.mag__time { font-family: Helvetica, Arial, "Liberation Sans", sans-serif; font-weight: 700; letter-spacing: -0.01em; }
.mag__lead { text-transform: uppercase; letter-spacing: 0.02em; }

/* page 8: banner, headline, dek and the green frame */
.mag__page--1 {
  grid-template-areas: "banner banner photo" "head head photo" "dek dek photo" "c1 c2 c3" "folio folio folio";
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.12fr);
  border-left: 0.5cqw solid var(--green); border-bottom: 0.5cqw solid var(--green);
}
.mag__page--1::before { content: ""; position: absolute; top: 5.9cqw; left: 0; right: 0; height: 0.55cqw; background: var(--green); }
.mag__banner { grid-area: banner; position: relative; z-index: 1; margin: 0 0 3cqw -4.6cqw !important; text-indent: 0 !important; text-align: left !important; }
.mag__banner span {
  display: inline-block; padding: 0.9cqw 4cqw 1cqw 3.6cqw; background: var(--green); color: #fff;
  font-style: italic; font-size: 4.1cqw; line-height: 1; border-radius: 0 3cqw 3cqw 0;
}
.mag__head {
  grid-area: head; margin: 0 0 2.4cqw; font-family: "Literata CL", "Times New Roman", serif; font-weight: 600;
  font-size: 4.55cqw; line-height: 1.06; letter-spacing: -0.045em; color: var(--maroon); text-transform: none; white-space: nowrap;
}
.mag__dek {
  grid-area: dek; margin-bottom: 2.6cqw !important; padding: 1.6cqw 0; border-top: 1px solid #8f8a80; border-bottom: 1px solid #8f8a80;
  font-style: italic; font-size: 2.05cqw; text-align: center !important; text-indent: 0 !important;
}
.mag__a-photo { grid-area: photo; align-self: end; margin-right: -4.6cqw !important; margin-bottom: 1.6cqw !important; }
.mag__c1 { grid-area: c1; } .mag__c2 { grid-area: c2; } .mag__c3 { grid-area: c3; }
.mag__page--1 .mag__c3 { padding-top: 1cqw; }
.mag__folio {
  grid-area: folio; margin-top: 2cqw !important; text-indent: 0 !important; text-align: left !important;
  font-family: Helvetica, Arial, sans-serif; font-weight: 700; font-size: 1.45cqw; letter-spacing: 0.04em;
}
.mag__folio--r { text-align: right !important; }

/* pages 9 and 10: a photo band across the top, three columns below */
.mag__page--2, .mag__page--3 { grid-template-areas: "ph1 ph2 ph2" "c1 c2 c3" "folio folio folio"; border-top: 0.55cqw solid var(--green); font-size: 1.62cqw; }
.mag__page--2 .mag__c3 { margin-right: -2.4cqw; }
.mag__page--2 .mag__c3 .mag__photo + .mag__photo { margin-top: 1.4cqw; width: 88%; margin-left: auto; }
.mag__page--2 { border-right: 0.5cqw solid var(--green); }
.mag__page--3 { border-left: 0.5cqw solid var(--green); border-bottom: 0.5cqw solid var(--green); }
.mag__a-ph1 { grid-area: ph1; margin-bottom: 2.6cqw !important; align-self: end; }
.mag__a-ph2 { grid-area: ph2; margin-bottom: 2.6cqw !important; }
/* the top band photos fill their cells edge to edge, cropped like print */
.mag__a-ph1 .mag__open img, .mag__a-ph2 .mag__open img { aspect-ratio: auto; }
.mag__page--2 .mag__a-ph1 { margin-left: -2.2cqw !important; }
.mag__page--2 .mag__a-ph2 { margin-top: -5cqw !important; margin-right: -2.4cqw !important; }
.mag__page--3 .mag__a-ph1 { margin-left: -4.6cqw !important; }
.mag__page--3 .mag__a-ph2 { margin-right: -1cqw !important; }
.mag__page--3 { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr) minmax(0, 1fr); }

.mag__photo { margin: 0; }
.mag__col .mag__photo { margin: 1.8cqw 0; }
.mag__bleed-l { margin-left: -4.6cqw !important; }
.mag__open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.mag__open img { display: block; width: 100%; height: auto; }
.mag__open:focus-visible { outline: 3px solid var(--maroon); outline-offset: 3px; }
.mag__cap {
  margin: 1.4cqw 0 !important; text-indent: 0 !important; text-align: left !important;
  font-family: Helvetica, Arial, "Liberation Sans", sans-serif; font-size: 1.5cqw; line-height: 1.32;
}
.mag__cap b { font-weight: 700; }
.mag__jump { display: block; text-align: right; font-size: 2cqw; line-height: 1; color: var(--maroon); }
.mag__note { margin-top: 0.6cqw !important; text-indent: 0 !important; }
.mag__note b { font-family: Helvetica, Arial, sans-serif; }
.mag__end { font-style: normal; }

/* the original scans */
.mag-orig { padding-bottom: clamp(56px, 7vw, 96px); text-align: center; }
.mag-orig__h { margin: 0 0 18px; font-family: var(--f-voice); font-weight: 300; font-size: 12px; letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--tint); }
.mag-orig__list { list-style: none; margin: 0 auto; padding: 0; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.mag__orig { display: block; padding: 0; border: 1px solid var(--line); background: none; cursor: zoom-in; }
.mag__orig img { display: block; width: 120px; height: auto; opacity: 0.85; transition: opacity 160ms ease; }
.mag__orig:hover img { opacity: 1; }
.mag-orig__credit { margin: 18px auto 0; font-size: 13px; color: var(--muted); }

.lightbox__cap {
  position: absolute; left: 0; right: 0; bottom: 48px; margin: 0; padding: 0 70px; text-align: center;
  font-family: "Literata CL", Georgia, serif; font-style: italic; font-size: 16px; color: var(--ivory);
}

/* phones: one column, normal type sizes */
@media (max-width: 699px) {
  .mag__page { display: block; padding: 22px 18px 20px; font-size: 16.5px; line-height: 1.6; border-width: 4px !important; }
  .mag__page--1::before { display: none; }
  .mag__banner { margin: -22px 0 14px -18px !important; }
  .mag__banner span { font-size: 19px; padding: 8px 18px 9px 16px; border-radius: 0 18px 18px 0; }
  .mag__head { font-size: 27px; margin-bottom: 14px; white-space: normal; }
  .mag__head br { display: none; }
  .mag__dek { font-size: 16px; padding: 10px 0; margin-bottom: 14px !important; }
  .mag__a-photo, .mag__a-ph1, .mag__a-ph2, .mag__bleed-l { margin: 0 0 14px !important; }
  .mag__col .mag__photo { margin: 14px 0; }
  .mag__page p { text-align: left; }
  .mag__cap { font-size: 14px; margin: 12px 0 !important; }
  .mag__jump { display: none; }
  .mag__folio { font-size: 12px; margin-top: 16px !important; }
  .lightbox__cap { padding: 0 60px; bottom: 66px; font-size: 14px; }
}
