/* D62 critical rules: printed inline in the head by inc/d62-look.php (the cover must be in place at the first paint; the rest of the look is ds/d62.css, loaded without holding the paint). Everything hangs on html.d62, which only that pass sets. */
html.d62 .d62-cover .d62-art{margin:0;max-width:none}
html.d62 .d62-cover .d62-art img{display:block;width:100%;object-fit:cover;background:var(--rr-cloth)}
@media (max-width:899px){
  /* the phone cover: one first screen (header above, tab bar below). The band takes what the title leaves (never under 24svh), cut around the painting's focus */
  html.d62 .rr-opener.d62-cover{display:flex;flex-direction:column;min-height:calc(100svh - var(--l-hdr-h) - 62px - env(safe-area-inset-bottom,0px) - var(--d62-strip,0px))}
  html.d62 .rr-opener.d62-cover .rr-opener__in{flex:1 1 auto;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(24svh,1fr) auto;padding-bottom:22px}
  html.d62 .rr-opener.d62-cover .d62-art{grid-row:1;margin:2px calc(-1 * var(--l-gutter)) 0;position:relative;width:auto;min-height:0}
  html.d62 .rr-opener.d62-cover .d62-art .mat{position:absolute;inset:0;height:100%;border:0;border-radius:0;box-shadow:none}
  html.d62 .rr-opener.d62-cover .d62-art picture{display:block;height:100%}
  html.d62 .rr-opener.d62-cover .d62-art img{height:100%;aspect-ratio:auto;object-position:var(--d62-bx,50%) var(--d62-by,30%)}
  /* O116 (11-16, Rajiv): shorter fade, at most 120px (was 220px): solid cloth from the kicker's top (62px above the band's foot), the painting clear above the fade's top; band height and title place unchanged */
  html.d62 .rr-opener.d62-cover .d62-art .mat::after{content:'';position:absolute;inset:auto 0 0 0;height:min(120px,62%);border:0;border-radius:0;background:linear-gradient(to bottom,transparent,color-mix(in srgb,var(--rr-cloth) 56%,transparent) 22%,color-mix(in srgb,var(--rr-cloth) 94%,transparent) 40%,var(--rr-cloth) 48%);pointer-events:none}
  html.d62 .rr-opener.d62-cover .rr-opener__text{grid-row:2;margin-top:-62px;position:relative;z-index:2}
  html.d62 .rr-opener.d62-cover.rr-opener--cap .rr-opener__text{margin-top:18px}
  /* the older chapter frame (O8, 11-12): one first screen whatever the title's length. The painting runs from the band's top
     (behind the crumbs and the tools) down to the frame's own lines and takes what they leave, never under --d62-room; the lines
     stand on the solid foot of its fade. A long opener steps its type down (d62-fit1, d62-fit2, set by the pass from the text's length) */
  html.d62 .ds-band.d62-cover{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(var(--d62-room,15svh),1fr) auto;min-height:calc(100svh - var(--l-hdr-h) - 62px - env(safe-area-inset-bottom,0px) - var(--d62-strip,0px))}
  html.d62 .ds-band.d62-cover>.l-wrap{grid-row:1;grid-column:1}
  html.d62 .ds-band.d62-cover .d62-art{grid-row:1/3;grid-column:1;position:relative;z-index:-1;min-height:0;margin:0 0 -62px}
  html.d62 .ds-band.d62-cover .d62-art .mat{position:absolute;inset:0;display:block}
  html.d62 .ds-band.d62-cover .d62-art picture{display:block;height:100%}
  html.d62 .ds-band.d62-cover .d62-art img{height:100%;object-position:var(--d62-bx,50%) var(--d62-by,30%)}
  html.d62 .ds-band.d62-cover .d62-art .mat::after{content:'';position:absolute;inset:0;background:linear-gradient(to bottom,color-mix(in srgb,var(--rr-cloth) 96%,transparent) 0,color-mix(in srgb,var(--rr-cloth) 88%,transparent) 88px,transparent 160px) top/100% 160px no-repeat,linear-gradient(to bottom,transparent,color-mix(in srgb,var(--rr-cloth) 56%,transparent) 30%,color-mix(in srgb,var(--rr-cloth) 94%,transparent) 55%,var(--rr-cloth) 70%) bottom/100% min(160px,52%) no-repeat;pointer-events:none}
  html.d62 .ds-band.d62-cover .pagehead{grid-row:3;grid-column:1;margin-top:0}
  html.d62 .ds-band.d62-fit1 .ds-band__no{font-size:84px;-webkit-text-stroke-width:3px}
  html.d62 .ds-band.d62-fit1 .pagehead h1{font-size:calc(var(--l-fs-h1) * 1.0)}
  html.d62 .ds-band.d62-fit1 .pagehead .lede{font-size:18px;line-height:1.6}
  html.d62 .ds-band.d62-fit2{--d62-room:10svh}
  html.d62 .ds-band.d62-fit2 :is(.ds-band__of,.ds-band__no){display:inline-block;vertical-align:baseline}
  html.d62 .ds-band.d62-fit2 .ds-band__no{font-size:64px;-webkit-text-stroke-width:2.5px;margin:0 0 4px 12px}
  html.d62 .ds-band.d62-fit2 .pagehead h1{font-size:28px}
  html.d62 .ds-band.d62-fit2 .pagehead .lede{font-size:17px;line-height:1.55;margin-bottom:12px}
}
@media (max-width:899px) and (max-height:760px){
  /* a phone's real first screen under its browser bars (about 660px on a 390 x 844 iPhone): one step further */
  html.d62 .ds-band.d62-cover{--d62-room:10svh}
  html.d62 .ds-band.d62-cover:not(.d62-fit2) .ds-band__no{font-size:84px;-webkit-text-stroke-width:3px}
  html.d62 .ds-band.d62-cover:not(.d62-fit2) .pagehead h1{font-size:calc(var(--l-fs-h1) * 1.0)}
  html.d62 .ds-band.d62-cover:not(.d62-fit2) .pagehead .lede{font-size:18px;line-height:1.6}
  html.d62 .ds-band.d62-fit1 :is(.ds-band__of,.ds-band__no){display:inline-block;vertical-align:baseline}
  html.d62 .ds-band.d62-fit1 .ds-band__no{font-size:64px;-webkit-text-stroke-width:2.5px;margin:0 0 4px 12px}
  html.d62 .ds-band.d62-fit1 .pagehead h1{font-size:28px}
  html.d62 .ds-band.d62-fit1 .pagehead .lede{font-size:17px;line-height:1.55;margin-bottom:12px}
  html.d62 .ds-band.d62-fit2 .pagehead h1{font-size:26px}
  html.d62 .ds-band.d62-fit2 .pagehead .lede{font-size:16.5px}
}
@media (min-width:900px){
  /* the wide cover: the whole first screen. An upright painting stands whole at full height on the right, its edge lost in the cloth; a wide one fills the screen */
  html.d62 .d62-cover{display:flex;flex-direction:column;min-height:calc(100svh - var(--l-hdr-h) - var(--d62-strip,0px));background-image:radial-gradient(72% 88% at 76% 44%,color-mix(in srgb,var(--d62-g,transparent) 44%,transparent),transparent 74%)}
  html.d62 .d62-cover .d62-art{position:absolute;top:0;right:0;bottom:0;height:100%;width:auto;aspect-ratio:var(--d62-ar,.6667);max-width:64%;z-index:-1}
  html.d62 .d62-cover--l .d62-art{left:0;width:100%;max-width:none;aspect-ratio:auto}
  html.d62 .d62-cover .d62-art .mat{display:block;position:absolute;inset:0;border:0;border-radius:0;box-shadow:none;background:none;overflow:hidden;-webkit-mask-image:linear-gradient(to right,transparent 0,rgba(0,0,0,.42) 13%,#000 36%);mask-image:linear-gradient(to right,transparent 0,rgba(0,0,0,.42) 13%,#000 36%)}
  html.d62 .d62-cover--l .d62-art .mat{-webkit-mask-image:linear-gradient(to right,rgba(0,0,0,.05) 0,rgba(0,0,0,.07) 36%,rgba(0,0,0,.66) 58%,#000 76%);mask-image:linear-gradient(to right,rgba(0,0,0,.05) 0,rgba(0,0,0,.07) 36%,rgba(0,0,0,.66) 58%,#000 76%)}
  html.d62 .d62-cover.d62-cover--l .d62-art::before{height:236px;background:linear-gradient(to bottom,color-mix(in srgb,var(--rr-cloth) 97%,transparent),color-mix(in srgb,var(--rr-cloth) 96%,transparent) 50%,transparent)}
  html.d62 .d62-cover .d62-art .mat::after{content:none}
  html.d62 .d62-cover .d62-art::before{content:'';position:absolute;inset:0 0 auto 0;height:150px;z-index:1;pointer-events:none;background:linear-gradient(to bottom,color-mix(in srgb,var(--rr-cloth) 84%,transparent),color-mix(in srgb,var(--rr-cloth) 60%,transparent) 44%,transparent)}
  html.d62 .d62-cover .d62-art picture{display:block;height:100%}
  html.d62 .d62-cover .d62-art img{height:100%;aspect-ratio:auto;object-position:var(--d62-fx,50%) var(--d62-fy,35%)}
  html.d62 .rr-opener.d62-cover .rr-opener__in{flex:1 1 auto;grid-template-columns:minmax(0,1fr);align-content:end;align-items:end;min-height:0;padding:12px 0 clamp(40px,7vh,84px)}
  html.d62 .rr-opener.d62-cover .rr-opener__text{max-width:min(54%,46rem)}
  html.d62 .d62-cover--l .rr-opener__text{max-width:min(44%,40rem)}
  html.d62 .ds-band.d62-cover{padding-bottom:0}
  /* (the frame's title block is the band's own child, beside the wrap that holds the crumbs: it goes to the foot, on the wrap's left edge) */
  html.d62 .ds-band.d62-cover .pagehead{margin:auto auto 0 max(var(--l-gutter),calc((100% - var(--l-wrap,1240px)) / 2));width:min(46%,40rem);padding:28px 0 clamp(40px,7vh,84px)}
  html.d62 .d62-cover .d62-art figcaption{display:block;position:absolute;right:clamp(18px,2.4vw,36px);bottom:16px;left:auto;max-width:min(40ch,78%);margin:0;z-index:2;text-align:right;color:#F6EEDC;text-shadow:0 1px 2px rgba(0,0,0,.55)}
  html.d62 .d62-cover .d62-art::after{content:'';position:absolute;inset:auto 0 0 0;height:130px;z-index:1;pointer-events:none;background:linear-gradient(to top,rgba(14,10,6,.6),rgba(14,10,6,.3) 46%,transparent)}
  html.d62 .d62-cover .rr-opener__no{-webkit-text-stroke-color:color-mix(in srgb,var(--rr-line) 86%,#F6EEDC)}
}
