/* Hero study, begun 5 October 2026. See hero-studies.js for what each hero is and which site it follows.
   Loaded by the shop and by compare/hero-phone-live.html. In the shop: Topic by topic, Centred on a phone; Words beside the fan, Neat stack on a wider screen.
   The phone heroes are drawn at 390px first and checked at 320px; the laptop heroes (at the end) at 1366 by 657.
   Flat fills, crisp hairlines; no mint, no forest block. */
.hero[data-hs]{padding:26px 0 34px;overflow:hidden}
.hs{display:block}
.hs h1{font-size:clamp(34px,10.3vw,41px);line-height:1.07;letter-spacing:-.045em;max-width:none}
.hs h1 em{font-style:normal;color:var(--green)}
.hs-sub{font-size:17px;line-height:1.5;color:var(--muted);margin-top:13px}
.hs .return-link{margin-bottom:14px}
.hs-actions{display:flex;gap:10px;margin-top:20px}
.hs-actions .button{flex:1 1 0;min-height:50px;font-size:16px;padding:10px 8px;white-space:nowrap;gap:8px}
.hs-textlink{display:inline-flex;align-items:center;gap:8px;min-height:44px;margin-top:10px;font-size:16px;font-weight:600;color:var(--green-hover);text-decoration:underline;text-decoration-color:#8cba9f;text-underline-offset:5px}
.hs-textlink .icon{width:18px;height:18px}
/* The word that changes, and anything that changes with it, fades out and back. */
.hs-word{display:block;white-space:nowrap}
.hs-word span{display:inline-block;transition:opacity .26s,transform .26s var(--ease)}
.hs-word span.is-out{opacity:0;transform:translateY(.22em)}

/* Topic by topic, first version: the cover beside its grade, pages and price */
.hs-deck{display:grid;grid-template-columns:55% minmax(0,1fr);gap:40px;align-items:end;margin-top:28px}
.hs-covers{position:relative;aspect-ratio:210/297}
.hs-cover{position:absolute;inset:0;border:1px solid #c4d5c8;border-radius:3px;background:#fff;overflow:hidden;transform-origin:100% 50%;transition:transform .7s var(--ease),opacity .45s}
.hs-cover[data-pos="0"]{z-index:3;box-shadow:3px 4px 0 #e3ebe5}
.hs-cover[data-pos="1"]{z-index:2;transform:translateX(15px) scale(.94)}
.hs-cover[data-pos="2"]{z-index:1;transform:translateX(30px) scale(.88)}
.hs-cover[data-pos="in"]{z-index:0;opacity:0;transform:translateX(40px) scale(.82);transition:none}
.hs-cover[data-pos="out"]{z-index:4;opacity:0;transform:translateX(-46px) rotate(-5deg)}
.hs-label{display:grid;gap:2px;padding-bottom:4px;font-size:15px;line-height:1.4;color:var(--muted);transition:opacity .26s}
.hs-label.is-out{opacity:0}
.hs-label b{font-size:16px;font-weight:650;color:var(--ink);line-height:1.3;margin-bottom:3px}
.hs-label strong{font:600 26px/1.1 var(--serif);letter-spacing:-.03em;color:var(--forest);margin-top:9px;font-variant-numeric:tabular-nums}

/* Free first's arrangement: a fan of covers on top, everything centred under it, two full-width buttons */
.hs-centre{text-align:center}
.hs-fan{position:relative;height:calc(42vw * 1.4142 + 18px);max-height:270px;margin:4px 0 22px;transition:opacity .26s}
.hs-fan.is-out{opacity:0}
.hs-leaf{position:absolute;top:6px;left:50%;width:42%;max-width:172px;border:1px solid #b9c9bd;border-radius:3px;background:#fff;overflow:hidden;transform-origin:50% 100%;text-align:left;transition:transform .7s var(--ease),opacity .45s}
.hs-leaf[data-pos="f"]{z-index:3;transform:translateX(-50%);box-shadow:0 0 0 5px #fff,3px 4px 0 5px #e3ebe5}
.hs-leaf[data-pos="l"]{z-index:1;transform:translateX(-50%) translate(-46%,5%) rotate(-9deg)}
.hs-leaf[data-pos="r"]{z-index:2;transform:translateX(-50%) translate(46%,5%) rotate(9deg)}
.hs-leaf[data-pos="x"]{z-index:0;opacity:0;transform:translateX(-50%) translateY(5%) scale(.92)}
/* Four in the fan, held as a hand of cards: each one shows the start of its title, and the last is in full. */
.hs-four{height:calc(34vw * 1.4142 + 30px);max-height:240px}
.hs-four .hs-leaf{width:34%;max-width:140px;box-shadow:0 0 0 4px #fff;transition:none}
.hs-leaf[data-pos="a"]{z-index:1;transform:translateX(-50%) translate(-62%,8%) rotate(-12deg)}
.hs-leaf[data-pos="b"]{z-index:2;transform:translateX(-50%) translate(-22%,1.5%) rotate(-4deg)}
.hs-leaf[data-pos="c"]{z-index:3;transform:translateX(-50%) translate(20%,1.5%) rotate(4deg)}
.hs-leaf[data-pos="d"]{z-index:4;transform:translateX(-50%) translate(60%,8%) rotate(12deg)}
/* The headline is two set lines, so it is not balanced into three. */
.hs-free h1{text-wrap:nowrap}
.hs-centre .hs-sub{max-width:21em;margin-inline:auto}
.hs-stack{display:grid;gap:10px;margin-top:20px}
.hs-stack .button{width:100%;min-height:52px;font-size:17px}
.hs-small{font-size:15px;color:var(--muted);margin-top:14px}
/* One line that says what the picture or the search is showing. */
.hs-caption{font-size:15px;line-height:1.45;color:var(--muted);min-height:1.45em}
.hs-caption span{display:inline-block;transition:opacity .26s}
.hs-caption span.is-out{opacity:0}
.hs-topic-centred .hs-fan{margin-bottom:12px}
.hs-topic-centred .hs-caption{margin-bottom:16px}

/* Search first */
.hs-searchbar{display:flex;align-items:center;gap:12px;width:100%;min-height:58px;margin-top:20px;padding:0 16px;border:1.5px solid var(--forest);border-radius:12px;background:#fff;color:var(--ink);font-size:18px;text-align:left}
.hs-searchbar .icon{width:22px;height:22px;color:var(--green)}
.hs-typed::after{content:'';display:inline-block;width:2px;height:1.2em;margin-left:2px;vertical-align:-.22em;background:var(--green);animation:hs-caret 1s steps(1) infinite}
@keyframes hs-caret{50%{opacity:0}}
.hs-search-covers .hs-fan{margin-bottom:18px}
.hs-search-covers .hs-caption{margin-top:12px}
.hs-search-covers .hs-textlink{margin-top:4px}

/* Sheet or bundle: the bundle is drawn as the pile of sheets it is, so it is plainly the bigger thing.
   A hero's wrapper carries hs-<its key>, so no part inside a hero is named after a key. */
.hs-paper{border:1px solid #c4d5c8;border-radius:3px;background:#fff;overflow:hidden}
.hs-two{display:grid;grid-template-columns:33% 52%;gap:28px;align-items:end;margin-top:20px}
.hs-one .hs-paper{box-shadow:3px 4px 0 #e3ebe5}
.hs-pile{position:relative;margin:calc(var(--n)*5px) calc(var(--n)*5px) 0 0}
.hs-pile i{position:absolute;inset:0;border:1px solid #c4d5c8;border-radius:3px;background:#fff;transform:translate(calc(var(--i)*5px),calc(var(--i)*-5px))}
.hs-pile .hs-paper{position:relative;border-color:var(--forest)}
.hs-tag{display:grid;gap:1px;margin-top:12px;font-size:16px;line-height:1.3}
.hs-tag b{font-weight:650;color:var(--ink)}
.hs-tag span{font:600 25px/1.15 var(--serif);letter-spacing:-.03em;color:var(--forest);font-variant-numeric:tabular-nums}
.hs-tag s{font:400 15px var(--sans);letter-spacing:0;color:var(--muted);margin-left:4px}
.hs-two+.hs-actions{margin-top:22px}

/* Sheet or bundle in Free first's arrangement */
.hs-duo{display:flex;justify-content:center;align-items:flex-end;gap:9%;margin:8px 0 22px}
.hs-solo{width:31%}.hs-heap{width:41%}
.hs-solo .hs-paper{transform:rotate(-5deg);transform-origin:50% 100%;box-shadow:3px 4px 0 #e3ebe5}
.hs-heap .hs-pile{transform:rotate(3deg);transform-origin:50% 100%}
.hs-duo .hs-tag{margin-top:16px;justify-items:center;white-space:nowrap}

/* Cover flow: the row runs off both sides of the screen */
.hs-shelf{--w:min(40vw,164px);position:relative;height:calc(var(--w)*1.4142 + 18px);margin:4px calc(50% - 50vw) 14px;perspective:640px}
.hs-shelf .hs-paper{position:absolute;top:8px;left:calc(50% - var(--w)/2);width:var(--w);text-align:left;transition:transform .8s var(--ease),opacity .5s}
.hs-paper[data-seat="c"]{z-index:5;box-shadow:3px 4px 0 #e3ebe5}
.hs-paper[data-seat="l1"]{z-index:4;transform:translateX(-94%) rotateY(56deg) scale(.9)}
.hs-paper[data-seat="r1"]{z-index:4;transform:translateX(94%) rotateY(-56deg) scale(.9)}
.hs-paper[data-seat="l2"]{z-index:3;transform:translateX(-136%) rotateY(60deg) scale(.86)}
.hs-paper[data-seat="r2"]{z-index:3;transform:translateX(136%) rotateY(-60deg) scale(.86)}
.hs-paper[data-seat="xl"]{z-index:1;opacity:0;transform:translateX(-180%) rotateY(62deg) scale(.82)}
.hs-paper[data-seat="xr"]{z-index:1;opacity:0;transform:translateX(180%) rotateY(-62deg) scale(.82)}
.hs-paper[data-seat="x"]{z-index:0;opacity:0;transform:translateX(180%) scale(.8);transition:none}
.hs-flow .hs-caption,.hs-rack .hs-caption{margin-bottom:16px}

/* Topic stack: each cover above the front one shows its heading and title, and no more */
.hs-tiers{--w:min(38vw,150px);--step:calc(var(--w)*.35);position:relative;width:var(--w);height:calc(var(--step)*2 + var(--w)*1.4142 + 8px);margin:4px auto 14px}
.hs-tiers .hs-paper{position:absolute;inset:0 0 auto;text-align:left;transition:transform .7s var(--ease),opacity .45s}
.hs-paper[data-tier="2"]{z-index:1}
.hs-paper[data-tier="1"]{z-index:2;transform:translateY(var(--step))}
.hs-paper[data-tier="0"]{z-index:3;transform:translateY(calc(var(--step)*2));box-shadow:3px 4px 0 #e3ebe5}
.hs-paper[data-tier="in"]{z-index:0;opacity:0;transform:translateY(calc(var(--step)*-.6));transition:none}
.hs-paper[data-tier="out"]{z-index:4;opacity:0;transform:translateY(calc(var(--step)*2 + 46px))}

/* Slow wheel: only the top of the wheel shows */
.hs-hub{--r:300px;--w:min(36vw,146px);position:relative;height:calc(var(--w)*1.4142 + 58px);margin:0 calc(50% - 50vw) 16px;overflow:hidden}
.hs-rim{position:absolute;left:50%;top:calc(var(--r) + var(--w)*.7071 + 10px);width:0;height:0;animation:hs-turn 190s linear infinite}
@keyframes hs-turn{to{transform:rotate(-360deg)}}
.hs-spoke{position:absolute;left:0;top:0;transform:rotate(var(--a)) translateY(calc(var(--r)*-1))}
.hs-spoke .hs-paper{width:var(--w);margin:calc(var(--w)*-.7071) 0 0 calc(var(--w)*-.5);text-align:left}

@media(max-width:360px){
 .hs-sub{font-size:16px}
 .hs-actions .button{font-size:14px;padding-inline:6px;gap:6px}
 .hs-actions .button .icon{display:none}
 .hs-deck{gap:34px}
 .hs-label{font-size:14px}.hs-label b{font-size:15px}.hs-label strong{font-size:23px}
 .hs-searchbar{font-size:17px}
 .hs-stack .button{font-size:16px}
 .hs-free h1{font-size:32px}
 .hs-caption{font-size:14px}
 .hs-two{gap:20px}.hs-tag{font-size:15px}.hs-tag span{font-size:22px}.hs-tag s{font-size:14px}
}
@media(prefers-reduced-motion:reduce){.hs-typed::after,.hs-rim{animation:none}.hs-cover,.hs-leaf,.hs-fan,.hs-word span,.hs-label,.hs-caption span,.hs-paper{transition:none}}

/* ---- The laptop, round one (6 October 2026): Topic by topic, three ways. Drawn at 1366 by 657, whole under the header.
   Every rule here sits under .hs-pc, the class a laptop hero's wrapper carries, so the phone heroes are untouched. ---- */
.hero[data-hs^="pc-"]{padding:38px 0 42px}
.hs-pc h1{font-size:clamp(46px,4.5vw,62px);line-height:1.06}
.hs-pc .hs-sub{font-size:19px;line-height:1.5;margin-top:16px;max-width:27em}
.hs-pc .hs-actions{gap:12px;margin-top:26px}
.hs-pc .hs-actions .button{flex:0 0 auto;min-height:54px;padding:0 24px;font-size:17px}
.hs-pc .hs-caption{font-size:16px}
.hs-pc .hs-fan{--w:214px;height:calc(var(--w)*1.4142 + 24px);max-height:none;margin:0}
.hs-pc .hs-leaf{width:var(--w);max-width:none}

/* Words beside the fan */
.hs-pc-beside{display:grid;grid-template-columns:minmax(0,1fr) 520px;gap:40px;align-items:center}
.hs-pc-beside .hs-show{text-align:center}
.hs-pc-beside .hs-caption{margin-top:14px}

/* Other pictures beside the words (round two). Deleted at the owner's word: Centred, five covers. */
/* Neat stack: one large cover facing you, the next two straight behind it */
.hs-pc-beside-stack .hs-covers{width:282px;margin:0 auto;left:-34px}
.hs-pc-beside-stack .hs-cover[data-pos="1"]{transform:translateX(36px) scale(.93)}
.hs-pc-beside-stack .hs-cover[data-pos="2"]{transform:translateX(70px) scale(.86)}
.hs-pc-beside-stack .hs-cover[data-pos="in"]{transform:translateX(96px) scale(.8)}
.hs-pc-beside-stack .hs-cover[data-pos="out"]{transform:translateX(-72px) rotate(-5deg)}
/* Three upright and Hand of five need a wider picture, so their headline is a little smaller. */
.hs-pc-beside-trio,.hs-pc-beside-hand{grid-template-columns:minmax(0,1fr) 600px}
.hs-pc-beside-trio h1,.hs-pc-beside-hand h1{font-size:clamp(44px,4vw,54px)}
/* Three upright: three whole covers side by side, the middle one larger */
.hs-trio{--w:214px;position:relative;height:calc(var(--w)*1.4142 + 16px)}
.hs-trio .hs-paper{position:absolute;top:6px;left:calc(50% - var(--w)/2);width:var(--w);text-align:left;transition:transform .8s var(--ease),opacity .5s}
.hs-paper[data-spot="m"]{z-index:3;box-shadow:3px 4px 0 #e3ebe5}
.hs-paper[data-spot="a"]{z-index:2;transform:translateX(-100%) scale(.78)}
.hs-paper[data-spot="b"]{z-index:2;transform:translateX(100%) scale(.78)}
.hs-paper[data-spot="xa"]{z-index:1;opacity:0;transform:translateX(-178%) scale(.62)}
.hs-paper[data-spot="xb"]{z-index:1;opacity:0;transform:translateX(178%) scale(.62)}
.hs-paper[data-spot="x"]{z-index:0;opacity:0;transform:translateX(178%) scale(.62);transition:none}
/* Hand of five: held as a hand of cards, each turned about one point far below the picture */
.hs-hand{--w:170px;position:relative;height:calc(var(--w)*1.4142 + 62px)}
.hs-hand .hs-paper{position:absolute;top:8px;left:calc(50% - var(--w)/2);width:var(--w);text-align:left;transform-origin:50% 215%;box-shadow:0 0 0 4px #fff;transition:transform .8s var(--ease),opacity .5s}
.hs-paper[data-hold="c"]{z-index:5;box-shadow:0 0 0 4px #fff,3px 4px 0 4px #e3ebe5}
.hs-paper[data-hold="l1"]{z-index:4;transform:rotate(-14deg)}
.hs-paper[data-hold="r1"]{z-index:4;transform:rotate(14deg)}
.hs-paper[data-hold="l2"]{z-index:3;transform:rotate(-28deg)}
.hs-paper[data-hold="r2"]{z-index:3;transform:rotate(28deg)}
.hs-paper[data-hold="x"]{z-index:1;opacity:0;transform:rotate(-40deg)}
.hs-paper[data-hold="xr"]{z-index:1;opacity:0;transform:rotate(40deg);transition:none}

/* Shelf of six: the words and the buttons above, then every cover in one row with its grade and price under it */
.hs-top{display:flex;justify-content:space-between;align-items:flex-end;gap:32px}
.hs-pc-row h1{font-size:clamp(42px,4vw,54px)}
.hs-pc-row .hs-sub{margin-top:12px;max-width:none;min-height:3em}
.hs-pc-row .hs-sub span,.hs-line{transition:opacity .26s}
.hs-pc-row .hs-sub span.is-out,.hs-line.is-out{opacity:0}
.hs-pc-row .hs-actions{margin:0 0 2px}
.hs-line{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:40px;margin-top:32px}
.hs-item .hs-paper{transition:transform .5s var(--ease),box-shadow .5s,border-color .5s}
.hs-item[data-on] .hs-paper{transform:translateY(-12px);border-color:var(--forest);box-shadow:3px 4px 0 #e3ebe5}
.hs-item p{display:grid;gap:1px;margin-top:12px;font-size:15px;line-height:1.35;color:var(--muted)}
.hs-item p b{font-weight:650;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* A narrow window (601 to 1039px). The two-part heroes stack so nothing runs off the side; only Neat stack, the one in the
   shop, is arranged for it: the picture above the words, all centred, as on a phone. */
@media(max-width:1039px){
 .hs-pc-beside-stack{text-align:center}
 .hs-pc-beside-stack .hs-show{order:-1}
 .hs-pc-beside-stack .hs-covers{width:210px;left:-26px}
 .hs-pc-beside-stack .hs-sub{margin-inline:auto}
 .hs-pc-beside-stack .hs-actions{justify-content:center}
 .hs-pc-beside{grid-template-columns:1fr;gap:28px}
 .hs-top{display:block}.hs-pc-row .hs-actions{margin-top:22px}
 .hs-line{gap:16px}.hs-item p{font-size:14px}
 .hs-pc-beside-trio,.hs-pc-beside-hand{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){.hs-item .hs-paper,.hs-line,.hs-pc-row .hs-sub span{transition:none}}
