/* site-2027-papers.css: the 2027 3D layer for paper analysis (body.pa), the predicted papers hub (body.pdp) and books (body.bkp).
   Loads after site-2027.css and the template stylesheets. Only hx-papers pages are affected. */

/* ---------- Paper analysis: hero numbers on a navy stage ---------- */
body.hx-papers.pa .ipa-hero__inner{display:grid;grid-template-columns:minmax(0,1fr) minmax(380px,460px);column-gap:clamp(32px,5vw,72px);align-items:start}
body.hx-papers.pa .ipa-hero__inner>*{grid-column:1;min-width:0}
body.hx-papers.pa .ipa-hero__inner>.pa27-stage{grid-column:2;grid-row:1/span 9;align-self:center;min-height:360px;display:flex;align-items:center;justify-content:center}
body.hx-papers.pa .pa27-stage .hx-obj{width:100%}
body.hx-papers.pa .pa27-panel{background:#fff;color:var(--hx-ink);border-top:3px solid var(--hx-gold);border-radius:4px;padding:8px 22px 14px}
body.hx-papers.pa .pa27-panel .ipa-hero__stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 22px;margin:0;border:0}
body.hx-papers.pa .pa27-panel .ipa-hero__stats>div{margin:0;padding:18px 0 16px;border:0;border-bottom:1px solid var(--hx-line);background:none;color:var(--hx-soft)}
body.hx-papers.pa .pa27-panel .ipa-hero__stats>div:nth-last-child(-n+2){border-bottom:0}
body.hx-papers.pa .pa27-panel .stat-card .num,body.hx-papers.pa .pa27-panel .ipa-hero__stats>div>strong{font-size:clamp(34px,3.6vw,46px);color:var(--hx-ink)}
body.hx-papers.pa .pa27-panel .stat-card .lab{color:var(--hx-soft)}
/* the hub: the screenshot stands on the stage */
body.hx-papers.pa .pa27-shot{background:#fff}
body.hx-papers.pa .pa27-shot [data-tilt]{margin:0!important;max-width:none!important;box-shadow:none!important;border:0!important}
body.hx-papers.pa .pa27-stage:has(.pa27-shot){min-height:0}
body.hx-papers.pa .chart-card,body.hx-papers.pa .subj-card{will-change:auto}
@media (max-width:1023px){
  body.hx-papers.pa .ipa-hero__inner{display:block}
  body.hx-papers.pa .ipa-hero__inner>.pa27-stage{margin:28px 0 0;min-height:0}
}
@media (max-width:680px){
  body.hx-papers.pa .pa27-panel{padding:4px 16px 10px}
  body.hx-papers.pa .pa27-panel .ipa-hero__stats>div{padding:14px 0 12px}
}

/* ---------- Predicted papers hub: the cover picture as a stack of sheets ---------- */
.pdp .bp-hero{overflow-x:clip}
.pdp27 .pdp27-stage{display:flex;justify-content:center;align-items:center;min-height:300px;padding:40px 96px 40px 40px}
.pdp27 .pdp27-stack{width:min(100%,380px);aspect-ratio:1200/630;transform:rotateX(calc(6deg + var(--hx-rx,0deg))) rotateY(calc(-18deg + var(--hx-ry,0deg)))}
.pdp27 .pdp27-stack>div{background:#fff}
.pdp27 .pdp27-stack>div img{border-radius:0;box-shadow:none}
.pdp27 .pdp27-stack>span{background:repeating-linear-gradient(#fff 0 21px,#d5dce8 21px 22px);background-position:0 14px}
.pdp27 .pdp27-stack>*:nth-last-child(2){transform:translate3d(30px,-38px,-90px)}
.pdp27 .pdp27-stack>*:nth-last-child(3){transform:translate3d(60px,-76px,-180px)}
.pdp27 .pdp27-stack>div{box-shadow:0 26px 50px -18px rgba(2,8,22,.62)}
@media (max-width:899px){
  .pdp27 .pdp27-stage{padding:28px 56px 28px 24px}
  .pdp27{max-width:520px}
}
@media (max-width:480px){.pdp27 .pdp27-stage{padding:24px 40px 24px 20px;min-height:200px}}

/* ---------- Books: covers and the shelf stand on a stage ---------- */
.bk27 .bk-hero-grid{align-items:center}
.bk27-stage{display:flex;align-items:center;justify-content:center;min-height:420px;width:100%;box-sizing:border-box}
.bk27-stage .bk27-obj{width:100%;max-width:440px}
.bk27-shelfstage .bk27-obj{max-width:none}
.bk27-stage .bk-covers{width:100%;max-width:440px;margin:0}
.bk27-stage .bk-covers img{box-shadow:0 24px 40px -14px rgba(2,8,22,.7),0 2px 6px rgba(2,8,22,.4)}
.bk27-stage .bk-covers img:first-child:not(:only-child){transform:translateZ(30px)}
.bk27-stage .bk-covers img:last-child:not(:first-child){transform:translateZ(-50px)}
.bk27-stage .bk-covers img:only-child{width:min(66%,320px)}
.bk27-stage .bk-covers:has(img:only-child){aspect-ratio:auto;display:flex;justify-content:center}
.bkp-hero--shelf>.bk>.bk27-shelfstage{grid-column:2;grid-row:1/span 8;align-self:center;min-height:380px}
.bk27-shelfstage .bkp-shelf{width:100%;transform-style:preserve-3d}
.bk27-shelfstage .bkp-shelf img{transform-style:preserve-3d}
.bk27-shelfstage .bkp-shelf img:nth-child(1){transform:translateZ(0)}
.bk27-shelfstage .bkp-shelf img:nth-child(2){transform:translateY(-4%) translateZ(40px)}
.bk27-shelfstage .bkp-shelf img:nth-child(3){transform:translateY(2%) translateZ(-20px)}
.bk27-shelfstage .bkp-shelf img:nth-child(4){transform:translateY(-3%) translateZ(30px)}
.bk27-shelfstage .bkp-shelf img{box-shadow:0 22px 34px -14px rgba(2,8,22,.7)}
@media (max-width:899px){
  .bk27 .bk-hero-grid>.bk27-stage{order:-1;min-height:0;align-self:stretch}
  .bk27-stage .bk-covers{max-width:300px;aspect-ratio:1/.92}
  .bkp-hero--shelf .bk27-shelfstage{order:-1;max-width:none;min-height:0;margin:0 0 22px}
  .bkp-hero--shelf .bk27-shelfstage .bkp-shelf{max-width:none;margin:0;justify-content:center}
}
@media (max-width:480px){.bk27-stage .bk-covers{max-width:250px}}

@media (prefers-reduced-motion:reduce){body.hx-papers .hx-float{animation:none}}

/* hub: the hero text sits left of the stage */
body.hx-papers.pa .pa-main[data-pa-kind="hub"] .ipa-hero__inner{text-align:left}
body.hx-papers.pa .pa-main[data-pa-kind="hub"] .ipa-hero p.lede{margin-left:0;margin-right:0}
body.hx-papers.pa .pa-main[data-pa-kind="hub"] .ipa-hero__inner .pa-trial{align-items:flex-start;text-align:left}
body.hx-papers.pa .pa-main[data-pa-kind="hub"] .ipa-hero__inner .hero-cta-pill{margin-left:0;margin-right:0}

/* ---- QA 12 Nov: crisp numbers on the tilted stats panel (smaller tilt; straightens on hover) ---- */
.hx-obj.pa27-panel{transform:rotateX(calc(2deg + var(--hx-rx,0deg))) rotateY(calc(-4deg + var(--hx-ry,0deg)))}
/* books on phones: the heading comes first, the stage follows the hero text instead of opening the page as a big navy box */
@media (max-width:680px){
  .bk27 .bk-hero-grid>.bk27-stage{order:0;margin-top:26px}
  .bkp-hero--shelf .bk27-shelfstage,.bkp-hero--shelf>.bk>.bk27-shelfstage{order:0;grid-row:auto;grid-column:auto;margin:26px 0 0;min-height:0;padding:30px 18px}
}
