/* pagehawk.com staged hero: the 1,000-page stack opens as one reader, the search types, the counter runs to
   p. 388 and the clause lights. Transplanted from the lab concepts (A: Perry's sightline, B: Perry rides the
   scrollbar, C: a gold page-edge tab, no character). Every class is phs-* so nothing touches the live kit. */
.k-stage.phs-hero{background:radial-gradient(800px 520px at 76% 58%,rgba(200,168,114,.16),transparent 65%),linear-gradient(170deg,#181B20,#0E0F11)}
.phs-show{position:relative;width:100%;align-self:end}
.phs-stage{position:relative;aspect-ratio:16/12.5;width:100%}
/* the stack: eight edges of one tall pile, then one reader */
.phs-stack{position:absolute;left:8%;top:30%;width:44%;height:58%}
.phs-stack i{position:absolute;left:0;right:0;height:100%;border-radius:10px;background:#F6F1E7;box-shadow:0 1px 0 rgba(0,0,0,.25);transition:transform .7s cubic-bezier(.2,.8,.2,1),opacity .5s}
.phs-stack i:nth-child(2){transform:translate(6px,-6px)}.phs-stack i:nth-child(3){transform:translate(12px,-12px)}.phs-stack i:nth-child(4){transform:translate(18px,-18px)}
.phs-stack i:nth-child(5){transform:translate(24px,-24px)}.phs-stack i:nth-child(6){transform:translate(30px,-30px)}.phs-stack i:nth-child(7){transform:translate(36px,-36px)}
.phs-stack i:nth-child(8){transform:translate(42px,-42px);background:#fff repeating-linear-gradient(#fff 0 22px,#E6DECC 22px 29px) content-box;padding:28px 26px}
.phs-stack b{position:absolute;left:0;right:0;top:calc(100% + 18px);text-align:center;font:600 13px/1 var(--k-text);color:#CFC8B8;letter-spacing:.02em;transition:opacity .4s}
.phs-stage.is-open .phs-stack i{transform:translate(110%,-8%) scale(.96);opacity:0}
.phs-stage.is-open .phs-stack b{opacity:0}
.phs-reader{position:absolute;left:30%;top:6%;width:68%;height:84%;border-radius:16px;background:#1E2126;box-shadow:0 40px 90px -40px rgba(0,0,0,.8),0 0 0 1px rgba(246,241,231,.1);
  opacity:0;transform:scale(.94) translateY(10px);transition:opacity .45s ease .15s,transform .6s cubic-bezier(.2,.8,.2,1) .1s;overflow:hidden;font-family:var(--k-text)}
.phs-stage.is-open .phs-reader{opacity:1;transform:none}
.phs-bar{display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid rgba(246,241,231,.08)}
.phs-dots{display:flex;gap:6px}.phs-dots i{width:10px;height:10px;border-radius:50%;background:#3a3d44}
.phs-search{flex:1;display:flex;align-items:center;gap:8px;min-height:34px;padding:0 12px;border-radius:10px;background:#272A30;color:#F6F1E7;font-size:14px;min-width:0}
.phs-search svg{width:14px;height:14px;flex:none;stroke:#CFC8B8;fill:none;stroke-width:2}
.phs-typed::after{content:"";display:inline-block;width:2px;height:1.05em;margin-left:2px;vertical-align:-2px;background:#F6F1E7;animation:phsBlink 1s steps(1) infinite}
@keyframes phsBlink{50%{opacity:0}}
.phs-body{position:absolute;left:0;right:0;top:59px;bottom:0;display:grid;grid-template-columns:38% 1fr}
.phs-hits{padding:12px;display:flex;flex-direction:column;gap:8px;border-right:1px solid rgba(246,241,231,.08)}
.phs-hit{border-radius:10px;padding:10px;background:#23262B;color:#CFC8B8;font-size:12.5px;line-height:1.35;opacity:0;transform:translateY(6px);transition:opacity .3s,transform .3s}
.phs-hit b{display:block;color:#F6F1E7;font-weight:600;font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (min-width:1300px){.phs-body{grid-template-columns:41% 1fr}.phs-hits{padding:12px 10px}.phs-hit{padding:10px 9px}.phs-v-c .phs-body{grid-template-columns:44% 1fr}}
.phs-hit.top{box-shadow:inset 0 0 0 1px rgba(231,205,147,.6)}
.phs-reader.has-hits .phs-hit{opacity:1;transform:none}.phs-reader.has-hits .phs-hit:nth-child(2){transition-delay:.12s}.phs-reader.has-hits .phs-hit:nth-child(3){transition-delay:.24s}
.phs-page{position:relative;margin:14px;border-radius:6px;background:#F6F1E7;padding:16px 18px;overflow:hidden}
.phs-ln{height:7px;border-radius:4px;background:#D9D1BF;margin:0 0 9px}
.phs-ln.tx{height:auto;background:none;font:500 12px/1.45 Georgia,"Iowan Old Style",serif;color:#3A342A;position:relative;z-index:0;padding:3px 6px;margin:0 -6px 8px}
.phs-ln.tx b{color:#1E1A14;font-weight:700}
.phs-ln.tx::after{content:"";position:absolute;inset:0;border-radius:4px;z-index:-1;background:rgba(200,168,114,.55);transform:scaleX(0);transform-origin:left;transition:transform .45s ease}
.phs-reader.has-mark .phs-ln.tx::after{transform:none}
/* the clause keeps a gold anchor once found */
.phs-ln.tx::before{content:"";position:absolute;left:-1px;top:50%;width:7px;height:7px;margin-top:-3.5px;border-radius:50%;background:#A9863F;box-shadow:0 0 0 3px rgba(200,168,114,.3);opacity:0;transform:scale(.4);transition:opacity .3s .2s,transform .3s .2s}
.phs-reader.has-mark .phs-ln.tx::before{opacity:1;transform:none}
.phs-ln.tx{padding-left:14px}
.phs-pg{position:absolute;right:12px;bottom:10px;font:600 12px/1 var(--k-text);color:#7A5A00}
.phs-thumb{position:absolute;right:6px;top:70px;width:5px;height:16%;border-radius:3px;background:rgba(246,241,231,.35);transition:top 1.1s cubic-bezier(.6,0,.2,1)}
.phs-reader.is-deep .phs-thumb{top:46%}
.phs-perch{position:absolute;width:15%;aspect-ratio:445/700;left:22%;top:-1%;transition:left .9s cubic-bezier(.3,.7,.3,1),top .9s cubic-bezier(.3,.7,.3,1)}
.phs-stage.is-open .phs-perch{left:80%;top:-13%}
.phs-perch svg{width:100%;height:100%}
/* the caption hangs from the reader's bottom-left corner (reader: left 30%, bottom at 90% of a 16:12.5 stage) */
.phs-cap{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:calc(10px - 7.8125%);padding-left:30%;position:relative;z-index:2}  /* above the stage it overlaps, so its replay button takes clicks (round 2 check) */
.phs-cap small{transition:opacity .3s}
/* while the stack is still closed its own label sits there; the caption takes over when the reader opens */
.k-js .phs-stage:not(.is-open) + .phs-cap small{opacity:0}
@media (min-width:1001px){#top.phs-hero .hero__in{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}
.phs-cap small{font-size:.8125rem;color:#A39C8E}
.phs-cap .p-replay{--line-2:rgba(244,239,228,.28);--ink:#F4EFE4;--accent:#E2C998}
.phs-cap .p-replay:focus-visible{outline:3px solid #E7CD93;outline-offset:3px}

/* B: Perry rides the reader's scrollbar to the page, then the page's own scroll rail */
.phs-v-b .phs-thumb{right:9px;width:7px;border-radius:4px;background:linear-gradient(#E7CD93,#A9863F);opacity:0;transition:top 1.1s cubic-bezier(.6,0,.2,1),opacity .3s}
.phs-v-b.is-open .phs-thumb{opacity:1}
.phs-rider{position:absolute;right:3px;bottom:calc(100% - 4px);width:50px;aspect-ratio:445/700;transform-origin:60% 100%;filter:drop-shadow(0 0 1px rgba(30,26,20,.75)) drop-shadow(0 4px 8px rgba(0,0,0,.4))}
.phs-rider svg,.phs-rail .phs-rider svg{display:block;width:100%;height:auto}
.phs-rail{position:fixed;right:12px;top:110px;bottom:calc(56px + var(--k-consent-h,0px) + var(--k-nudge-h,0px));width:3px;border-radius:2px;background:rgba(200,168,114,.28);z-index:40;pointer-events:none;opacity:0;transition:opacity .4s;display:none}
.phs-rail.on{opacity:1}
.phs-rail__thumb{position:absolute;left:-1px;top:0;width:5px;height:44px;border-radius:3px;background:linear-gradient(#E7CD93,#A9863F);will-change:transform}
.phs-rail .phs-rider{right:-7px;bottom:calc(100% - 2px);width:34px;filter:drop-shadow(0 0 1px rgba(30,26,20,.6)) drop-shadow(0 2px 5px rgba(30,26,20,.35))}
@media (min-width:1100px){.phs-rail{display:block}html:not(.ph-norail) .ph-buddy-b{display:none}html.ph-norail .phs-rail{display:none}}

/* C: no character; the document's page edges carry a gold tab that runs to the page */
.phs-v-c .phs-body{right:30px}
.phs-v-c .phs-thumb{right:0;top:59px;bottom:0;height:auto;width:30px;border-radius:0;background:repeating-linear-gradient(#EDE6D6 0 1px,#CFC6B2 1px 3px);box-shadow:inset 1px 0 0 rgba(0,0,0,.25);opacity:.9;transition:none}
.phs-v-c .phs-reader.is-deep .phs-thumb{top:59px}
.phs-v-c .phs-pg{display:none}
.phs-tab{position:absolute;right:0;top:0;width:58px;height:28px;border-radius:6px 0 0 6px;background:#C8A872;color:#1E1A14;font:700 12.5px/28px var(--k-text);text-align:center;box-shadow:0 4px 10px rgba(0,0,0,.35);transform:translateY(0);transition:transform 1.1s cubic-bezier(.6,0,.2,1)}
.phs-reader.is-deep .phs-tab{transform:translateY(calc(var(--edge,300px) * .388))}

/* D: by the PageHawk rules. Still and silent: the approved poses (idle, scan, found) crossfade in place, no companion */
.phs-perch.phs-d,.phs-stage.is-open .phs-perch.phs-d{left:80%;top:-13%}
/* he appears with the reader, never over empty ground */
.phs-perch.phs-d{opacity:0;transition:opacity .22s ease}
.phs-stage.is-open .phs-perch.phs-d{opacity:1}
.phs-d .pose{position:absolute;inset:0;opacity:0;transition:opacity .22s ease;color:#C8A872}
.phs-d .pose.is-on{opacity:1}.phs-d .pose svg{width:100%;height:100%;display:block}

/* the companion (A, and B below 1100px): Perry perched silent, rising above the kit's strip and nudge */
.ph-buddy{--cr-buddy-w:62px;--cr-focus:#E7CD93;--cr-nudge-h:calc(var(--k-consent-h,0px) + var(--k-nudge-h,0px))}
.ph-buddy .cr-buddy__btn svg{filter:drop-shadow(0 2px 5px rgba(30,26,20,.35))}
/* light theme: the companion, phone seat and rail rider sit on paper, so Perry takes the live deep gold (3:1 floor) */
:root[data-theme="light"] .ph-buddy .cr-svg path,:root[data-theme="light"] .phs-rail .phs-rider path{fill:#8D6608}

/* one column (tablet and phone): the stage sits under the copy, kept to a readable size */
@media (max-width:1000px){.phs-show{max-width:620px;margin-top:clamp(48px,10vw,72px)}}
/* 1099px and narrower (lab rule), extended here to 1299px where the hero's two columns leave the reader too narrow
   for a file column: the files become a pill strip with a right-edge fade and the counter moves to the top */
@media (max-width:1299px){.phs-body{grid-template-columns:1fr;grid-template-rows:auto 1fr}
  .phs-page{padding-top:32px}.phs-pg{top:11px;bottom:auto}
  .phs-hits{-webkit-mask-image:linear-gradient(90deg,#000 80%,transparent);mask-image:linear-gradient(90deg,#000 80%,transparent)}
  .phs-hits{display:flex!important;flex-direction:row;gap:6px;padding:8px 10px;border-right:0;border-bottom:1px solid rgba(246,241,231,.08);overflow:hidden}
  /* only whole pills: one that does not fit wraps to a hidden second row, never cut mid-word (review round 1) */
  .phs-hits{flex-wrap:wrap;row-gap:14px;height:39px;align-content:flex-start;-webkit-mask-image:none;mask-image:none}
  .phs-hit{flex:none;padding:5px 10px;border-radius:999px;font-size:0;line-height:1;white-space:nowrap}
  .phs-hit b{display:inline;font-size:11.5px;margin:0}.phs-hit b::after{content:" \00b7  " attr(data-n);color:#CFC8B8;font-weight:500}
  .phs-v-b .phs-pg{left:18px;right:auto}}
@media (max-width:700px){
  .phs-show{margin-top:44px}
  .phs-stage{aspect-ratio:1/1.08}
  .phs-stack{left:6%;width:58%}.phs-reader{left:0;width:100%}
  .phs-v-b .phs-rider{width:42px}
  .phs-cap{padding-left:0;margin-top:calc(10px - 10.8%)}
  /* the phone seat: Perry perches at the left end of the kit's bottom bar, beside its two buttons, only while the bar shows */
  .ph-buddy{--cr-buddy-w-phone:30px;bottom:calc(14px + env(safe-area-inset-bottom,0px));left:14px}
  html:has(.ph-buddy) .k-bar{padding-left:56px}
  html:not(:has(.k-bar.is-on)) .ph-buddy,html.k-asking .ph-buddy,html.consent-up .ph-buddy{opacity:0;visibility:hidden}
}
@media (prefers-reduced-motion:reduce){
  .phs-perch.phs-d{transition:none!important}
  .phs-stack i,.phs-stack b,.phs-reader,.phs-hit,.phs-thumb,.phs-perch,.phs-ln.tx::after,.phs-ln.tx::before,.phs-tab,.phs-rail,.phs-d .pose{transition:none!important}
  .phs-typed::after{animation:none}
  .phs-cap small{transition:none}
}
