/* In the two-column cover the text sets the row height. The photograph fills it. */
@media (min-width: 701px) {
  .hero .herogrid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    gap: clamp(1.75rem, 4vw, 4.5rem);
    align-items: stretch;
  }
  .hero .heroimage {
    position: relative;
    min-height: clamp(16rem, 26vw, 28rem);
  }
  .hero .heroimage > img:first-child {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
  }
  .hero .herotext {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-self: stretch;
    min-width: 0;
    padding: 0;
  }
  .hero .herotext h1 {
    text-wrap: balance;
    font-size: clamp(2.5rem, 4vw, 4.6rem);
  }
  .hero .herotext p {
    margin-bottom: 1.15rem;
  }
  .hero .herotext .button {
    margin-top: auto;
  }
}
@media (max-width: 700px) {
  .hero .heroimage > img:first-child {
    position: static;
    width: 100%;
    height: auto;
    aspect-ratio: 1.9;
    object-fit: cover;
  }
}

/* Centre a fitted photograph, then allow the entire zoomed surface to scroll. */
#photo-stage {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  overflow: auto;
  overscroll-behavior: contain;
}
#photo-stage > img {
  flex: none;
  max-width: none;
  max-height: none;
  margin: auto;
  object-fit: contain;
}
#viewer .viewerbar button:disabled { opacity: .55; cursor: default; }
.reading .photo-sequence {list-style:none;padding:0;gap:1.3rem 1rem;grid-template-columns:repeat(2,minmax(0,1fr))}
.photo-sequence:has(>li:only-child){grid-template-columns:minmax(0,1fr)}
.photo-sequence figure {margin:0;display:grid;gap:.45rem}
.photo-sequence a {display:block;cursor:zoom-in}
.photo-sequence figcaption {display:flex;gap:.65rem;align-items:baseline;border-top:1px solid var(--line);padding-top:.45rem;font:italic 1rem/1.35 var(--serif)}
.take-number {font:650 .72rem/1.4 var(--sans);font-variant-numeric:tabular-nums;white-space:nowrap;letter-spacing:.09em;color:#684c1a}
.viewerbar {align-items:center;flex-wrap:wrap}
.viewerbar [data-position]{margin-right:auto;padding-left:.5rem;color:#fff;font-variant-numeric:tabular-nums}
@media(max-width:540px){.reading .photo-sequence{grid-template-columns:minmax(0,1fr)}.viewerbar{gap:.25rem}.viewerbar button{padding:.45rem .65rem}}
.reading .photo-sequence img { aspect-ratio:auto 4/3; }

/* A mounted print, with the existing link forming the outer edge of the paper. */
.hero .heroimage:has(> img) {
  --paper-edge: clamp(7px, 1vw, 15px);
  overflow: visible;
  border-radius: 1px;
  padding: var(--paper-edge);
  background-color: #ecdbb5;
  background-image:
    repeating-linear-gradient(93deg, #8162390c 0 1px, transparent 1px 4px),
    linear-gradient(115deg, #f0dfbd, #f8ecd0 33%, #e6cfa8 68%, #f5e7c9);
  box-shadow: inset 0 0 0 1px #c4aa80, 0 3px 9px #03181c55;
}
.heroimage:has(> img)::before, .heroimage:has(> img)::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 50%;
  pointer-events: none;
  width: calc(var(--paper-edge) * 1.38);
  height: clamp(32px, 18%, 82px);
  background: repeating-linear-gradient(88deg, #ffffff0d 0 1px, transparent 1px 3px), linear-gradient(90deg,#c99c55dc,#d8b475ed 50%,#b88c4eda);
  clip-path: polygon(1% 2%,28% 1%,47% 3%,69% 0,98% 2%,100% 99%,75% 97%,54% 100%,23% 98%,2% 100%);
}
.heroimage:has(> img)::before {left:calc(-.54 * var(--paper-edge));transform:translateY(-50%) rotate(-2deg)}
.heroimage:has(> img)::after {right:calc(-.54 * var(--paper-edge));transform:translateY(-50%) rotate(2deg)}
@media(min-width:701px){
  .hero .heroimage > img:first-child {
    inset: var(--paper-edge);
    width: calc(100% - 2 * var(--paper-edge));
    height: calc(100% - 2 * var(--paper-edge));
  }
}

/* A shared column grid gives every secondary photograph the same format. */
.home-edition {--photo-gap:clamp(1rem,2vw,2rem)}
.home-edition .editorial {grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--photo-gap)}
.home-edition .picks {grid-column:span 2;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto repeat(2,minmax(min-content,1fr));border:0;padding:0}
.home-edition .editorial .sectionhead {min-height:2.5rem;margin:0 0 1rem}
.home-edition .picks .sectionhead {grid-column:1/-1}
.home-edition .editorial .sectionhead h2 {font-size:2rem}
.home-edition .editorial .sectionhead .label:not(:first-child) {display:none}
.home-edition :is(.story,.pick) {display:block;border:0;padding:0}
.home-edition .cards {grid-template-columns:repeat(3,minmax(0,1fr));column-gap:var(--photo-gap)}
.home-edition :is(.pick>img,.story>img,.card .archive-photo img) {
  width:100%;height:auto;min-height:0;max-height:none;aspect-ratio:3/2;object-fit:cover;
}
.home-edition :is(.pick,.story)>img {margin-bottom:.85rem}
.home-edition .pick {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:var(--photo-gap);
  align-items:center;
}
.home-edition .pick>img {margin:0}
.home-edition .pick+.pick {border-top:1px solid var(--line);padding-top:1rem;margin-top:1rem}
@media(min-width:701px) and (max-width:1000px){
  .home-edition .cards {grid-template-columns:repeat(2,minmax(0,1fr))}
  .home-edition .editorial {grid-template-columns:minmax(0,1fr) minmax(0,1.6fr)}
  .home-edition .pick {grid-template-columns:minmax(0,.72fr) minmax(0,1fr)}
  .home-edition .picks {grid-column:auto;grid-template-columns:minmax(0,1fr);row-gap:.8rem}
  .home-edition .picks .sectionhead {margin-bottom:.2rem}
}
@media(max-width:700px){
  .home-edition :is(.editorial,.cards,.picks) {grid-template-columns:minmax(0,1fr)}
  .home-edition .picks {grid-column:auto;grid-template-rows:auto;row-gap:1rem}
  .home-edition .pick {grid-template-columns:minmax(80px,30%) minmax(0,1fr);align-items:start}
  .home-edition .pick+.pick {margin-top:0}
  .home-edition .picks .sectionhead {margin:0}
}

.share-actions { display:inline-flex; gap:.45rem; align-items:center }
.share-actions .share-icon,.share-sheet .share-icon {
  display:inline-grid;place-items:center;width:44px;height:44px;padding:0;
  border:1px solid #b9b6a9;border-radius:50%;background:transparent;color:var(--ink)
}
.share-icon svg {width:20px;height:20px;stroke:currentColor;stroke-width:1.6;fill:none;stroke-linejoin:round;stroke-linecap:round}
.share-actions .share-icon:is(:hover,:focus-visible),.share-sheet .share-icon:hover {background:var(--ink);color:var(--paper)}
.share-sheet {
  position:fixed;inset:0;margin:auto;width:min(460px,calc(100vw - 32px));max-height:90dvh;overflow:auto;
  box-sizing:border-box;background:var(--paper);color:var(--ink);border:1px solid #bfb6a3;border-radius:.7rem;
  box-shadow:0 16px 50px #032d3540;padding:1.2rem;
}
.share-sheet::backdrop {background:#05283380}
.share-sheet header {display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem}
.share-sheet h2,.share-sheet .share-title {margin:0;font:italic 2rem var(--serif)}
.share-sheet>img {width:100%;height:auto}
.share-networks {display:grid;grid-template-columns:1fr 1fr;gap:.55rem;margin:1rem 0}
.share-networks a {display:flex;justify-content:space-between;padding:.6rem .8rem;border:1px solid var(--line);border-radius:.35rem;color:var(--ink)}
.meta .share-networks span {border:0;padding:0}.share-sheet .download-card {font-size:.9rem;text-decoration:underline}
@media print {.share-actions,#share-panel {display:none!important}}

.course-module {display:grid;grid-template-columns:1fr 1fr;margin-block:2.5rem 4rem;border:1px solid #d2c3a4;background:#f1e5cd}
.course-module figure {position:relative;margin:0;min-height:260px;background:#c7b38f}
.course-module figure > img:first-child {position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.course-module figcaption {position:absolute;bottom:.85rem;left:.85rem;color:white;background:#092d34ee;padding:.35rem .65rem;font-size:.78rem}
.course-copy {padding:clamp(1.5rem,3.5vw,4rem)}
.course-copy .label {color:#6e5124}.course-copy h2 {font-size:clamp(2.6rem,4.5vw,4.6rem);margin:.25em 0}
.course-copy>p:not(.label) {max-width:45ch}.course-copy ul {display:flex;flex-wrap:wrap;gap:.3rem 1rem;list-style:none;border-block:1px solid #c9b99a;padding:.75rem 0;margin:1.1rem 0;font-size:.9rem}
@media(max-width:700px){.course-module{grid-template-columns:1fr}.course-module figure{min-height:0;aspect-ratio:2}}
.hero .herotext h1 i.headline-text {display:inline}
@media(hover:hover){
  .hero .herotext h1 a:hover .headline-text {background-size:100% .35em}
}
.hero .herotext h1 a:focus-visible .headline-text {background-size:100% .35em}

.home-recent {border-top:0}
.recent-heading .button {min-height:44px;white-space:nowrap}
@media(max-width:540px){
  .recent-heading {flex-direction:column;align-items:flex-start;gap:.75rem}
  .recent-heading .rule {display:none}
}

.course-module .academy-logo {
  position:absolute;top:0;left:clamp(.8rem,2vw,1.8rem);
  width:clamp(88px,9vw,138px);height:auto;
  background:#092d34;border-bottom:3px solid #d7a95a;
}

.course-copy {min-width:0;container-type:inline-size;padding:0}
.course-heading {
  position:relative;isolation:isolate;overflow:hidden;color:#fff8e9;background:#0a2e45;
  display:flex;align-items:center;min-height:clamp(200px,41cqi,295px);
}
.course-instructor {
  position:absolute;inset:0;width:100%;height:100%;z-index:-1;
  object-fit:cover;object-position:72% center;
}
.course-heading-type {box-sizing:content-box;width:53%;padding:clamp(17px,4cqi,30px) 0 clamp(17px,4cqi,30px) clamp(18px,4.5cqi,34px)}
.course-heading .label {color:#f2cd8a;font-size:clamp(.61rem,1.9cqi,.78rem);letter-spacing:.13em;margin:0}
.course-heading h2 {font-size:clamp(1.8rem,8.1cqi,3.8rem);line-height:1.01;margin:.27em 0 .23em}
.course-heading h2 i {display:block}
.course-author {font:italic clamp(.95rem,2.8cqi,1.25rem)/1.3 var(--serif)}
.course-details {padding:clamp(1.25rem,4.5cqi,2.2rem)}
.course-details>p {max-width:47ch}
@container (max-width:380px){
  .course-heading {min-height:175px}
  .course-heading-type {width:54%;padding-left:14px}
}

.meta.recipe-tools {display:grid;justify-items:start;gap:1.2rem;margin-top:1.35rem}
.recipe-facts {display:flex;flex-wrap:wrap;gap:.85rem 0;margin:0;padding:.85rem 1.15rem;background:#f3ebd9;border-left:3px solid #c89845}
.recipe-facts>div+div {margin-left:1.25rem;padding-left:1.25rem;border-left:1px solid #cebea0}
.recipe-facts dt,.recipe-author small {font:650 .78rem/1.4 var(--sans);color:#674f28}
.recipe-facts dd {margin:.18rem 0 0;font:500 1rem/1.15 var(--sans)}
.recipe-facts dd strong {font:600 clamp(1.7rem,2.2vw,2.15rem)/1.1 var(--serif);font-variant-numeric:lining-nums tabular-nums}
.recipe-bar, .article-bar {
  display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;
  gap:.65rem 1.5rem;padding:.75rem 0;border-bottom:1px solid var(--line);
}
.recipe-bar .recipe-jumps {padding:0;border:0;flex-wrap:wrap}
.recipe-bar .share-actions, .article-bar .share-actions {margin-left:auto;gap:.75rem}
@media print {.recipe-bar{display:none}}
.recipe-sidebar {align-self:start;min-width:0}
.recipe-author {display:flex;align-items:center;gap:1rem;margin-top:1rem;padding:1rem 0;border-block:1px solid var(--line)}
.recipe-author img {display:block;width:68px;height:74px;object-fit:cover}
.recipe-author small,.recipe-author strong {display:block}
.recipe-author strong {margin-top:.15rem;font:italic 500 1.6rem/1.15 var(--serif)}
.recipe-author .arrow-icon {margin-left:auto}
.recipe-author:hover {text-decoration:none}
.recipe-author:is(:hover,:focus-visible) strong {text-decoration:underline;text-underline-offset:.18em}
@media(max-width:400px){.recipe-facts{padding:.75rem .85rem}.recipe-facts>div+div{margin-left:.85rem;padding-left:.85rem}}

.article-bar time {font-weight:600;color:var(--muted)}
.recipe-facts .fact-note {
  flex:0 0 100%;
  min-width:0;
  border:0;
  margin:0;
  padding:0;
}
.recipe-facts .fact-note dd {max-width:50ch;overflow-wrap:break-word;line-height:1.45}

.featured-stage {display:grid;touch-action:pan-y pinch-zoom}
.featured-slide {grid-area:1/1;min-width:0}
.featured-slide[aria-hidden=true] {visibility:hidden;pointer-events:none}
.featured-slide:not(:has(.heroimage)) .herotext {grid-column:1/-1}
.carousel-controls {display:flex;align-items:center;gap:1.25rem;margin-top:clamp(1rem,2.3vw,2rem);padding-top:1rem;border-top:1px solid #f1ead240}
.slide-picker {flex:1;min-width:0;position:relative;display:flex;overflow-x:auto;gap:.5rem;scrollbar-width:thin}
.slide-picker button {flex:1 0 120px;display:flex;align-items:center;gap:.6rem;padding:.35rem .55rem;border:1px solid transparent;background:transparent;color:#f6eedb;text-align:left;border-radius:3px;line-height:1.18}
.slide-picker button img {width:42px;height:40px;object-fit:cover;flex:none}
.slide-picker button span {display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:.84rem}
.slide-picker button[aria-pressed=true] {border-color:#ebbf67;background:#ffffff10}
.slide-picker button:hover,.slide-arrows button:hover {background:#fff3}
.slide-picker button:focus-visible {outline-offset:-3px}
.slide-arrows {display:flex;align-items:center;gap:.65rem}
.slide-arrows button {display:grid;place-items:center;width:44px;height:44px;border-radius:50%;padding:0;border:1px solid #9eaaa8;color:inherit;background:transparent}
.slide-arrows [data-prev-slide] svg {transform:rotate(180deg)}
.slide-arrows span {white-space:nowrap;font-variant-numeric:tabular-nums}
.carousel-fallback {display:flex;flex-wrap:wrap;gap:1rem;padding-block:1rem}
@media(max-width:700px){.carousel-controls{flex-wrap:wrap;gap:.6rem}.slide-picker{flex-basis:100%}.slide-picker button{flex:0 0 144px}.slide-arrows{margin-left:auto}.featured-carousel .herotext{align-self:start}}
@media(prefers-reduced-motion:no-preference){.featured-slide[aria-hidden=false]{animation:slide-appear .2s ease-out}@keyframes slide-appear{from{opacity:.35}to{opacity:1}}}
