/* D62 (pilot): the reading-page look. Loaded without holding the first paint (the cover's own rules are inline, ds/d62-crit.css).
   Every rule hangs on html.d62, a class only inc/d62-look.php sets. Colours come from the page's generated custom properties
   (--d62-a accent, --d62-t paper tint, --d62-r rule, --d62-k cover cloth, --d62-g cover glow) and the site's tokens.
   1 margins field  2 the painting carried from the hub  3 colour  4 the opening  5 scene-break emblems  6 paintings settle in
   8 paintings sit better  A living paintings  B the cover (the rest of it)
   Nothing here moves behind reading text. Reduced motion (the system's, or the site's data-rm) holds everything still. */

/* 3 ---- colour from the painting: links, rules, the marks of the reader ---------------------------------------------------- */
html.d62 main.ds-story .read{--l-accent:var(--d62-a,var(--rr-ink))}
html.d62 main.ds-story .read a.lv-ent,html.d62 main.ds-story .read a.lv-xlink,html.d62 main.ds-story .read .ent{text-decoration-color:color-mix(in srgb,var(--d62-a,var(--l-ink)) 52%,transparent)}
html.d62 main.ds-story .read hr{border-top-color:var(--d62-r,var(--l-line))}

/* 4 ---- the opening: a large first letter in the page's colour, the first words in small capitals (English); the first word in
   the display face (Hindi, no dropped letter) ---------------------------------------------------------------------------- */
html.d62[lang^="en"] .read p.d62-open::first-letter{float:left;font-family:var(--l-font-display);font-weight:400;font-size:3.5em;line-height:.82;padding:.06em .05em 0 0;margin:0;color:var(--d62-a,var(--l-accent))}
html.d62[lang^="en"] .read p.d62-open .d62-ow{font-variant-caps:all-small-caps;letter-spacing:.06em;font-size:1.06em}
html.d62:not([lang^="en"]) .read p.d62-open .d62-ow{font-family:var(--l-font-display);font-weight:400;font-size:1.5em;line-height:1;color:var(--d62-a,var(--l-accent));margin-inline-end:.08em}

/* 5 ---- scene breaks: the collection's emblem, drawn in line, at the breaks the page already has (an hr, the gap before each
   later section). No words in any of them. ------------------------------------------------------------------------------- */
html.d62 main.ds-story{--d62-em:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 24%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%271.3%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M24 4c-3 3.4-4.4 7-4.4 10.4 0 2.2 1.6 4.2 4.4 5.6 2.8-1.4 4.4-3.4 4.4-5.6C28.4 11 27 7.4 24 4zM19.8 12.6c-3.4-1.8-6.6-2-9.8-.8 1 4.2 4.4 7.4 9.2 8.2M28.2 12.6c3.4-1.8 6.6-2 9.8-.8-1 4.2-4.4 7.4-9.2 8.2M14 20.6h20%27/%3E%3C/svg%3E")}
html.d62 main.d62-em-lamp{--d62-em:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 24%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%271.3%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M24 2.6c-2 2.6-3 4.6-3 6.4a3 3 0 0 0 6 0c0-1.8-1-3.8-3-6.4zM12 13.4h24c-.6 4.6-5.4 8-12 8s-11.4-3.4-12-8zM36 14.4c2.6-.2 4.4-1.2 5.4-3%27/%3E%3C/svg%3E")}
html.d62 main.d62-em-bow{--d62-em:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 24%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%271.3%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M14 3c9 2.4 13.6 5.4 13.6 9S23 18.6 14 21M14 3v18M6 12h34M36 8.6l4.4 3.4-4.4 3.4%27/%3E%3C/svg%3E")}
html.d62 main.d62-em-wheel{--d62-em:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 24%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%271.3%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Ccircle cx=%2724%27 cy=%2712%27 r=%279%27/%3E%3Ccircle cx=%2724%27 cy=%2712%27 r=%272.2%27/%3E%3Cpath d=%27M24 3v6.8M24 14.2V21M15 12h6.8M26.2 12H33M17.6 5.6l4.8 4.8M25.6 13.6l4.8 4.8M30.4 5.6l-4.8 4.8M22.4 13.6l-4.8 4.8%27/%3E%3C/svg%3E")}
html.d62 main.d62-em-conch{--d62-em:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 24%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%271.3%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M9 12c5-6.4 12.6-9 19.4-7 5 1.4 8.2 4.4 9.6 7-1.4 2.6-4.6 5.6-9.6 7C21.6 21 14 18.4 9 12zM9 12H4.6M27 5.4c-3.4 1.8-5 4-5 6.6s1.6 4.8 5 6.6M32.6 7.4c-2 1.2-3 2.8-3 4.6s1 3.4 3 4.6%27/%3E%3C/svg%3E")}
html.d62 main.d62-em-flute{--d62-em:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 24%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%271.3%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M6 18.2 40.6 7.6l1.2 3.6L7.2 21.8zM33.6 6.4c1.6-2.6 4-3.8 7.4-3.4-.2 3-1.4 5-3.8 6.2%27/%3E%3Cpath d=%27M15.6 17.2h.01M21.6 15.4h.01M27.6 13.6h.01%27/%3E%3C/svg%3E")}
html.d62 main.d62-em-trident{--d62-em:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 24%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%271.3%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M24 2v20M16.4 3.6c-.6 5.4 1.8 8.6 7.6 9.4 5.8-.8 8.2-4 7.6-9.4M20 16.4h8%27/%3E%3C/svg%3E")}
html.d62 main.d62-em-damaru{--d62-em:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 24%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%271.3%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M13 5h22L27 12l8 7H13l8-7zM21 12h6M10 12.4c-2-.6-3.4.2-4 2.2M38 11.6c2 .6 3.4-.2 4-2.2%27/%3E%3C/svg%3E")}
html.d62 main.d62-em-banyan{--d62-em:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 24%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%271.3%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M24 3.4c-6.6 2.2-9.6 5.4-9.6 9.2 0 3 2.6 5.4 6.2 5.4 1.4 0 2.6-.4 3.4-1.2.8.8 2 1.2 3.4 1.2 3.6 0 6.2-2.4 6.2-5.4 0-3.8-3-7-9.6-9.2zM24 8v14.4%27/%3E%3C/svg%3E")}
html.d62 main.d62-em-flame{--d62-em:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 24%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%271.3%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M24 2.4c-4.4 5-6.6 8.8-6.6 12a6.6 6.6 0 0 0 13.2 0c0-3.2-2.2-7-6.6-12zM24 11c-1.6 2-2.4 3.6-2.4 4.8a2.4 2.4 0 0 0 4.8 0c0-1.2-.8-2.8-2.4-4.8z%27/%3E%3C/svg%3E")}
html.d62 main.d62-em-shri{--d62-em:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 24%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%271.3%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Ccircle cx=%2724%27 cy=%2712%27 r=%279.6%27/%3E%3Cpath d=%27M24 4.2 31 16.4H17zM24 19.8 17 7.6h14z%27/%3E%3Ccircle cx=%2724%27 cy=%2712%27 r=%27.9%27/%3E%3C/svg%3E")}
html.d62 main.ds-story .read hr,
html.d62 main.ds-story .read .padav + .padav::before{display:block;border:0;height:22px;margin:var(--l-s6,40px) auto;max-width:var(--l-measure);background:
    linear-gradient(var(--d62-r,var(--l-line)),var(--d62-r,var(--l-line))) left center/calc(50% - 40px) 1px no-repeat,
    linear-gradient(var(--d62-r,var(--l-line)),var(--d62-r,var(--l-line))) right center/calc(50% - 40px) 1px no-repeat;position:relative}
html.d62 main.ds-story .read .padav + .padav::before{content:'';margin:8px auto 0}
html.d62 main.ds-story .read hr::after,
html.d62 main.ds-story .read .padav + .padav::after{content:'';position:absolute;left:50%;top:0;width:44px;height:22px;margin-left:-22px;background:var(--d62-a,var(--l-accent));opacity:.86;-webkit-mask:var(--d62-em) center/contain no-repeat;mask:var(--d62-em) center/contain no-repeat}
html.d62 main.ds-story .read .padav + .padav{position:relative}
html.d62 main.ds-story .read .padav + .padav::after{top:8px}
html.d62 main.ds-story .read hr{overflow:visible}

/* 8 ---- paintings sit better: a paper-edge shadow by day, a warm soft edge by night --------------------------------------- */
html.d62 .rr-plate--a .mat,html.d62 .rr-stage__frame{border-color:color-mix(in srgb,var(--d62-a,var(--l-ink)) 26%,var(--l-line-strong));
  box-shadow:0 1px 0 rgba(255,255,255,.6) inset,0 1px 1px rgba(60,42,16,.16),0 2px 4px rgba(60,42,16,.12),0 7px 9px -6px rgba(60,42,16,.4)}
html.d62[data-theme="dark"] .rr-plate--a .mat,html.d62[data-theme="dark"] .rr-stage__frame{border-color:color-mix(in srgb,#E8B45A 24%,rgba(240,232,216,.16));
  box-shadow:0 0 0 1px rgba(232,180,90,.07),0 0 12px -2px rgba(232,158,74,.22),0 0 26px -10px rgba(232,150,60,.3)}

/* A ---- living paintings: the canvas stands exactly over the painting, inside the painting's own frame ---------------------- */
html.d62 canvas.d62-gl{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none;opacity:0;transition:opacity .5s ease;z-index:0}
html.d62 canvas.d62-gl.is-on{opacity:1}
html.d62 .rr-stage__frame canvas.d62-gl{z-index:2}
html.d62 .d62-art .mat::after,html.d62 .rr-plate--a .mat::after{z-index:1}

/* 1 ---- the margins field: one fixed canvas, drawn only in the page's side margins on wide screens. The mask ends it well before
   the text column whatever the script draws. ------------------------------------------------------------------------------ */
html.d62 canvas.d62-margins{position:fixed;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:1;opacity:0;transition:opacity .9s ease;
  -webkit-mask-image:linear-gradient(to right,#000 0,#000 calc(var(--d62-mg,0px) - 76px),transparent calc(var(--d62-mg,0px) - 14px),transparent calc(100% - var(--d62-mg,0px) + 14px),#000 calc(100% - var(--d62-mg,0px) + 76px),#000 100%);
  mask-image:linear-gradient(to right,#000 0,#000 calc(var(--d62-mg,0px) - 76px),transparent calc(var(--d62-mg,0px) - 14px),transparent calc(100% - var(--d62-mg,0px) + 14px),#000 calc(100% - var(--d62-mg,0px) + 76px),#000 100%)}
html.d62 canvas.d62-margins.is-on{opacity:1}
html.d62{--d62-mote:color-mix(in srgb,var(--d62-a,#8A5512) 78%,#B8862C)}
html.d62[data-theme="dark"]{--d62-mote:color-mix(in srgb,var(--d62-a,#E8B45A) 40%,#F6EEDC)}
@media (max-width:1339px){html.d62 canvas.d62-margins{display:none}}

/* 2 ---- the painting carried from the hub to the chapter's cover (the browser's own cross-page view transition; where it is not
   known the pages cross-fade as before). D62's script names the pressed plate; the arriving cover is named by the head script. */
@keyframes d62-vt-out{to{opacity:0}}
@keyframes d62-vt-in{from{opacity:0}}
@media (prefers-reduced-motion:no-preference){
  html.d62:not([data-rm="1"]) a.rr-kanda__plate.d62-go picture,
  html.d62.d62-arr:not([data-rm="1"]) .d62-cover .d62-art .mat{view-transition-name:d62-plate}
  html.d62:not([data-rm="1"]) a.rr-kanda__plate.d62-go picture,html.d62:not([data-rm="1"]) a.rr-kanda__plate.d8-go picture{contain:paint}
  /* D8 names the same pair d8-plate from 900px: on a page that carries D62 the one flight is D62's */
  html.d62.d8 a.rr-kanda__plate.d8-go.d62-go picture,html.d62.d8.d8-arr.d62-arr .rr-opener .rr-plate--front .mat{view-transition-name:d62-plate}
  html.d62::view-transition-group(d62-plate){animation-duration:.68s;animation-timing-function:cubic-bezier(.16,1,.3,1)}
  html.d62::view-transition-old(d62-plate),html.d62::view-transition-new(d62-plate){width:100%;height:100%;object-fit:cover;overflow:clip}
  html.d62::view-transition-old(d62-plate){animation:d62-vt-out .3s ease both}
  html.d62::view-transition-new(d62-plate){animation:d62-vt-in .34s ease both}
}

/* 6 ---- paintings settle in once as they are reached: a slow push-in inside the frame and a fade, about a second. The script
   marks only paintings still below the screen (d62-wait); what is on screen at the start is never hidden. ------------------- */
@keyframes d62-push{from{transform:scale(1.045)}to{transform:none}}
@media (prefers-reduced-motion:no-preference){
  html.d62.d62-js:not([data-rm="1"]) .rr-plate--a.d62-wait .mat{opacity:0}
  html.d62.d62-js:not([data-rm="1"]) .rr-plate--a.d62-wait .mat img{transform:scale(1.045)}
  html.d62.d62-js:not([data-rm="1"]) .rr-plate--a.d62-in .mat{opacity:1;transition:opacity .9s ease}
  html.d62.d62-js:not([data-rm="1"]) .rr-plate--a.d62-in .mat img{transform:none;transition:transform 1.25s cubic-bezier(.16,1,.3,1)}
  html.d62.d62-js:not([data-rm="1"]) .rr-stage__frame img.is-on:not(.d62-seen){animation:d62-push 1.25s cubic-bezier(.16,1,.3,1) both}
}
@media print{html.d62 canvas.d62-gl,html.d62 canvas.d62-margins{display:none!important}}
