html { min-height: 100%; }
.stage { container-type: size; position: relative; }
#opening { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
#opening img { display: block; width: min(50cqw,177.77778cqh,800px); height: auto; max-height: 100cqh; object-fit: contain; }
@container (max-width:759px) { #opening img { width: min(100cqw,177.77778cqh,800px); } }
.opening-active #book,.opening-active #notice { visibility: hidden; }
.stage .page { background-position: center; background-size: contain; background-repeat: no-repeat; }
.stage .page img:not([src]) { visibility: hidden; }
body {
  min-height: 100vh; height: 100vh; min-height: 100dvh; height: 100dvh;
  display: grid; grid-template-rows: auto minmax(0,1fr) auto;
}
.header-inner { height: 51px; padding: 5px clamp(12px,2vw,36px); gap: clamp(10px,1.4vw,22px); }
.logo img { width: clamp(128px,12vw,195px); }
.nav { font-size: clamp(13px,.85vw,16px); }
.nav-cta { padding: .55em 1em; }
.language select { padding: .4em; width: 108px; }
.reader, .reader:fullscreen {
  height: auto; min-height: 0;
  grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr) 45px;
}
.reader:fullscreen { height: 100dvh; }
.stage { grid-row: 1; min-width: 0; min-height: 0; padding: 6px 16px 2px; }
.controls { grid-row: 2; grid-column: 1; align-self: center; padding: 0; }
.tools { inset: auto auto 5px 16px; height: 35px; padding: 1px 3px; }
.reader button { width: 34px; height: 34px; }
.direct { position: absolute; inset: auto 16px 6px auto; padding: 6px 12px; }
.reader [hidden] { display: none!important; }
.ap2-contact-new-top {
  padding: 7px 2.5vw; align-items: center; gap: 2vw;
  grid-template-columns: minmax(0,.95fr) minmax(0,1.05fr); min-height: 61px;
}
.ap2-contact-new-link { font-size: clamp(14px,1.1vw,21px); line-height: 1.2; padding-bottom: 1px; }
.ap2-contact-new-lead h2 { font-size: clamp(16px,1.3vw,25px); line-height: 1.18; margin: 4px 0 0; }
.ap2-contact-new-direct { display: flex; align-items: center; justify-content: flex-end; gap: clamp(8px,1.4vw,24px); }
.ap2-contact-new-direct a { white-space: nowrap; }
.ap2-contact-new-social { gap: clamp(5px,.55vw,10px); }
.ap2-contact-new-icon img { width: clamp(23px,1.75vw,32px); border-radius: 50%; }
.ap2-contact-new-bottom {
  min-height: 64px; padding: 5px 2.5vw; gap: 1vw; line-height: 1.22;
  font-size: clamp(12px,.78vw,15px); grid-template-columns: .7fr 1.25fr 1.25fr 1.25fr .45fr;
}
.ap2-contact-new-bottom > div { min-width: 0; padding-left: 9px; }
.ap2-contact-new-logo img { max-width: 145px; }
.bp-visit-counter strong { font-size: 1.35em; }
@media (min-width:851px) and (max-width:1100px) {
  .ap2-contact-new-top { grid-template-columns: 1fr auto; }
  .ap2-contact-new-bottom { min-height: 74px; }
}
@media (max-width:850px) {
  .header-inner { height: 46px; padding: 4px 12px; }
  .logo img { width: 120px; }
  .ap2-contact-new-top { grid-template-columns: 1fr auto; min-height: 74px; }
  .ap2-contact-new-direct { display: grid; grid-template-columns: auto auto; gap: 3px 10px; justify-items: start; }
  .ap2-contact-new-social { grid-column: 1/-1; }
  .ap2-contact-new-bottom { min-height: 86px; grid-template-columns: .7fr 1fr 1fr 1.1fr .55fr; }
  .ap2-contact-new-logo { grid-column: auto; }
}
@media (max-width:600px) {
  .reader { grid-template-rows: minmax(0,1fr) 40px; }
  .reader:fullscreen { grid-template-rows: minmax(0,1fr) 40px; }
  .stage { padding: 3px 8px; }
  .tools { left: 8px; bottom: 3px; }
  .controls { justify-self: end; padding-right: 8px; }
  .reader .direct { display: none; } /* The download link is always visible in the footer. */
  .ap2-contact-new-top { padding: 6px 10px; gap: 8px; grid-template-columns: 1fr 1.15fr; min-height: 88px; }
  .ap2-contact-new-lead h2 { font-size: 14px; }
  .ap2-contact-new-link { font-size: 13px; }
  .ap2-contact-new-direct { display: grid; grid-template-columns: 1fr; gap: 4px; }
  .ap2-contact-new-direct .ap2-contact-new-link { white-space: normal; }
  .ap2-contact-new-social { gap: 7px; }
  .ap2-contact-new-icon img { width: 22px; }
  .ap2-contact-new-bottom {
    padding: 5px 10px; gap: 5px 12px; min-height: 113px;
    grid-template-columns: repeat(2,minmax(0,1fr)); align-content: center;
    grid-template-rows: minmax(48px,auto) minmax(60px,auto);
  }
  .ap2-contact-new-bottom > div { padding: 0; border: 0; }
  .ap2-contact-new-logo { display: none; } /* The same logo is visible in the header. */
  .bp-visit-counter { text-align: right; }
}
@media (orientation:landscape) and (max-height:480px) and (min-width:601px) {
  .header-inner { height: 38px; }
  .menu-toggle { height: 30px; }
  .ap2-contact-new-top { min-height: 43px; padding-block: 3px; }
  .ap2-contact-new-lead h2 { font-size: 14px; margin-top: 2px; }
  .ap2-contact-new-direct { display: flex; gap: 7px; }
  .ap2-contact-new-social { gap: 4px; }
  .ap2-contact-new-icon img { width: 20px; }
  .ap2-contact-new-link { font-size: 12px; }
  .ap2-contact-new-bottom { padding-block: 3px; min-height: 74px; }
  .reader { grid-template-rows: minmax(0,1fr) 38px; }
}
@media (max-width:374px) {
  .ap2-contact-new-top { min-height: 98px; }
  .ap2-contact-new-bottom { grid-template-rows: minmax(60px,auto) minmax(60px,auto); }
}


/* A prepared edition keeps the active spread on screen until both new pages are decoded. */
body { display:block; }
.edition-shell { height:100vh; height:100dvh; display:grid; grid-template-rows:auto minmax(0,1fr) auto; }
.edition-shell.pending { position:fixed; inset:0; visibility:hidden; pointer-events:none; z-index:-1; }
.stage #book:not(.pages-ready) { visibility:hidden; }
.stage #book { transition:none; }
.reader, .reader:fullscreen { grid-template-rows:minmax(0,1fr); }
@media (min-width:851px) {
  .header-inner { height:clamp(60px,8.5dvh,84px); padding-block:5px; }
  .logo img { width:clamp(175px,15vw,292px); }
  .nav { font-size:clamp(14px,1.08vw,21px); gap:clamp(14px,1.7vw,34px); }
  .language select { width:clamp(108px,8vw,150px); font-size:clamp(14px,1.05vw,19px); }
  .ap2-contact-new-top { min-height:clamp(72px,10.3dvh,98px); padding-block:7px; grid-template-columns: minmax(0,.86fr) minmax(0,1.14fr); }
  .ap2-contact-new-lead h2 { font-size:clamp(20px,1.65vw,34px); }
  .ap2-contact-new-link { font-size:clamp(16px,1.3vw,26px); }
  .ap2-contact-new-icon img { width:clamp(28px,2vw,40px); }
  .ap2-contact-new-bottom { min-height:clamp(73px,10dvh,92px); font-size:clamp(13px,.91vw,18px); }
  .ap2-contact-new-logo img { max-width:180px; }
}
@media (min-width:601px) and (max-width:850px) and (min-height:481px) {
  .header-inner { height:54px; }.logo img { width:145px; }
  .ap2-contact-new-top { min-height:80px; }.ap2-contact-new-bottom { min-height:94px; }
}
@media (max-width:600px) {
  .header-inner { height:54px; }.logo img { width:140px; }
  .ap2-contact-new-top { min-height:99px; }
  .ap2-contact-new-bottom { padding-block:8px; }
  .ap2-contact-new-icon img { width:25px; }
}


:root { --reader-rule:3px; }
.header { border-bottom-width:var(--reader-rule); }
.edition-shell {
  --page-ratio:1.777777778;
  --page-width:min(800px,calc((100vw - 32px)/2));
  display:flex; flex-direction:column;
}
.edition-shell > header { flex:none; }
.edition-shell > .reader {
  flex:0 1 auto; height:calc(var(--page-width)/var(--page-ratio) + 2*var(--reader-rule));
  min-height:0;
}
.edition-shell > footer { flex:1 0 auto; display:flex; flex-direction:column; }
.edition-shell > footer .ap2-contact-new-top { flex:1 0 auto; }
.edition-shell > footer .ap2-contact-new-bottom { flex:1 0 auto; }
.stage { padding-block:var(--reader-rule); }
.reader button.cover-hint {
  position:absolute; z-index:2; display:block; width:auto; height:auto;
  margin:0; border:0; border-radius:3px; padding:3px 6px;
  background:rgba(16,27,54,.85); color:white;
  font:500 clamp(10px,.76vw,12px)/1.25 "Segoe UI",Arial,sans-serif; white-space:nowrap;
}
.reader button.cover-hint:focus-visible { outline:2px solid white; outline-offset:1px; }
@media (max-width:791px) { .edition-shell { --page-width:min(800px,calc(100vw - 32px)); } }
@media (max-width:600px) { .edition-shell { --page-width:calc(100vw - 16px); } }

/* Size the contact block to the space below the pages. */
.edition-shell > footer {
  container-type:size;
  flex:1 0 clamp(144px,20dvh,192px);
  display:grid;
  grid-template-rows:minmax(0,1fr) minmax(min-content,clamp(48px,26%,96px));
}
.edition-shell .ap2-contact-new-top {
  min-height:0; padding:clamp(3px,2cqh,12px) 4.4vw;
  grid-template-columns:58fr 42fr; gap:2.5vw; align-items:center;
}
.edition-shell .ap2-contact-new-direct {
  display:grid; grid-template-columns:max-content; justify-content:start;
  justify-items:start; align-content:center; gap:clamp(2px,2.1cqh,12px);
}
.edition-shell .ap2-contact-new-link {
  font-size:clamp(15px,min(14cqh,2.38vw),48px); line-height:1.13;
}
.edition-shell .ap2-contact-new-lead h2 {
  font-size:clamp(18px,min(18cqh,2.8vw),57px);
  margin:clamp(5px,8cqh,42px) 0 0; line-height:1.1;
}
.edition-shell .ap2-contact-new-social { gap:clamp(6px,1.4vw,32px); }
.edition-shell .ap2-contact-new-icon img { width:clamp(22px,min(19cqh,3.6vw),72px); }
.edition-shell .ap2-contact-new-bottom {
  min-height:0; padding:3px 2.6vw; column-gap:1.35vw;
  grid-template-columns:.83fr 1.14fr 1.14fr 1.14fr .55fr;
  font-size:clamp(12px,.87vw,18px);
}
.edition-shell .ap2-contact-new-logo img { width:100%; max-width:300px; max-height:18cqh; object-fit:contain; object-position:left; }
@media (min-width:1100px) {
 .edition-shell .ap2-contact-new-bottom {
   grid-template-columns:minmax(0,.65fr) minmax(max-content,1.23fr) minmax(max-content,1.36fr) minmax(0,1.15fr) minmax(max-content,.41fr);
 }
}
@media(max-width:850px) and (min-width:601px) {
 .edition-shell .ap2-contact-new-bottom { font-size:11px; }
}
@media(max-width:600px) {
 .edition-shell > footer { flex-basis:clamp(215px,30dvh,260px); grid-template-rows:minmax(0,1fr) clamp(100px,30%,155px); }
 .edition-shell .ap2-contact-new-top { grid-template-columns:minmax(0,1fr); align-content:center; gap:clamp(7px,3cqh,22px); padding-inline:5vw; }
 .edition-shell .ap2-contact-new-lead h2 { font-size:clamp(16px,min(6.6cqh,5vw),28px); margin-top:clamp(3px,1.6cqh,12px); }
 .edition-shell .ap2-contact-new-link { font-size:clamp(14px,min(5.4cqh,5vw),24px); }
 .edition-shell .ap2-contact-new-direct { gap:clamp(2px,1.2cqh,9px); }
 .edition-shell .ap2-contact-new-icon img { width:clamp(21px,min(9cqh,8.5vw),38px); }
 .edition-shell .ap2-contact-new-bottom { grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:auto auto; gap:5px 12px; padding:4px 5vw; font-size:clamp(11px,3vw,14px); }
}
@media (orientation:landscape) and (max-height:480px) and (min-width:601px) {
 .edition-shell > footer { flex-basis:128px; grid-template-rows:minmax(0,1fr) 44px; }
}

.reader { background:#fff; }
.reader button.cover-hint {
  white-space:pre; text-align:center; background:white; color:#223169;
  border:1px solid #cbd2df; padding:3px 8px; line-height:1.18;
}
.reader button.cover-hint:hover { background:#f2f5fb; }
@media(max-width:791px) {
  .edition-shell.at-cover > .reader { height:calc(var(--page-width)/var(--page-ratio) + 2*var(--reader-rule) + 37px); }
  .edition-shell.at-cover .stage { padding-bottom:calc(var(--reader-rule) + 37px); }
  .edition-shell.at-cover #opening { bottom:37px; }
}

/* An HTML cover carries its own binding as the page turns. */
.stage .page:is(.front-cover,.back-cover).--simple { overflow:visible; }
.stage .page:is(.front-cover,.back-cover)::before {
  content:""; position:absolute; z-index:2; pointer-events:none;
  top:2.5%; bottom:2.5%; left:calc(-1 * var(--overhang));
  width:var(--coil); background-image:url("./spiral.svg");
  background-repeat:no-repeat space; background-size:100% calc(var(--coil)*1.25);
}
.stage .page { --coil:clamp(13px,1.26vw,22px); --overhang:calc(var(--coil)*.38); }
.stage .page.back-cover::before { left:auto; right:calc(-1 * var(--overhang)); transform:scaleX(-1); }
/* Only the fore edge of a closed book shows the stacked leaves. */
.stage #book:not([aria-busy=true]) .page:is(.front-cover,.back-cover).--simple::after {
  content:""; position:absolute; pointer-events:none; top:1.5px; bottom:1px;
  left:100%; width:clamp(4px,.55vw,9px);
  background:repeating-linear-gradient(to right,#b7bbc0 0 1px,#f6f6f4 1px 2.4px);
  clip-path:polygon(0 0,100% 1%,100% 99%,0 100%);
}
.stage #book:not([aria-busy=true]) .page.back-cover.--simple::after {
  left:auto; right:100%; transform:scaleX(-1);
}
.stage .spread-binding { display:none; }
.stage #book.hinge-visible.pages-ready .spread-binding {
  /* PageFlip draws the exposed page at layer 3 and the turning sheet at layer 5. */
  display:block; position:absolute; z-index:4; pointer-events:none;
  top:2.5%; bottom:2.5%; left:50%; transform:translateX(-50%);
  --ring-pitch:clamp(16.25px,1.575vw,27.5px);
  width:calc(var(--ring-pitch)*34/30);
  
}


/* The home page spaces the three contact rows in proportion to their type. */
.edition-shell .ap2-contact-new-direct {
  grid-template-columns:max-content; grid-template-rows:auto auto auto;
  gap:.52em; justify-items:start;
}
.edition-shell .ap2-contact-new-direct > .ap2-contact-new-link {
  display:inline-flex; align-items:center; justify-self:start; width:max-content;
  font:inherit; line-height:1.15; gap:.38em; padding-bottom:.24em;
  border-bottom:1px solid rgba(255,255,255,.62);
}
.edition-shell .ap2-contact-new-direct > .ap2-contact-new-link span { margin:0; font-size:.87em; }
.edition-shell .ap2-contact-new-social {
  grid-column:1; gap:.7em; margin:.25em 0 0; align-items:center;
}
.edition-shell .ap2-contact-new-icon {
  display:grid; place-items:center; overflow:hidden; border-radius:50%; flex:none;
  width:1.52em; height:1.52em;
}
.edition-shell .ap2-contact-new-icon img {
  width:100%; height:100%; object-fit:cover; transform:scale(1.16); border-radius:50%;
}
@media(min-width:601px){
  .edition-shell .ap2-contact-new-top { container-type:size; }
  .edition-shell .ap2-contact-new-direct { font-size:min(17.6cqh,2.35vw); }
  .edition-shell .ap2-contact-new-lead h2 { font-size:clamp(18px,min(25cqh,2.8vw),57px); }
}
@media(max-width:600px){
  .edition-shell .ap2-contact-new-direct { font-size:clamp(13px,min(4.7cqh,4.9vw),22px); }
}
.stage #book.hinge-visible .page:is(.front-cover,.back-cover)::before { content:none; } .spread-binding svg { display:block; width:100%; height:100%; }
.stage #book.hinge-visible.pages-ready .wire-rear { z-index:0; } .stage #book.hinge-visible.pages-ready .wire-tip { z-index:6; }
