/* The explorer's notebook page, shared (DESIGN_SYSTEM 9.4; plan docs/superpowers/plans/2026-11-07-shared-pieces-first.md). Home's
   journey and Product's hall write their words on it. The look lives here: the paper, its ruled lines, the tape, the page number.
   Where a page sits, how wide it is, its padding and its tilt stay with the page. Load after components.css, before the page's own.

   <div class="nb-page"> … <span class="nb-pno">p. 1</span></div>    a page on daylight (Home)
   <div class="nb-page nb-night"> …                                   a page laid over the night (Product): a deeper shadow, its
                                                                       ruled lines and its tape a touch stronger

   One page at a time (Product's notebook): each step's page takes nb-one, and the page's script adds .on to the page in view. A
   page not in view is invisible and takes no taps, but it stays in the document: screen readers read it, and Tab reaches its
   controls (with MPStory.keepFocusInView, design/story.js, focusing one brings its step into view). Never visibility:hidden.
   A page that can be taller than the room it has (a fixed page on a short screen) holds its words in nb-scroll, which scrolls
   inside the paper while the tape and the page number stay put; the page sets its own max-height. */
.nb-page{position:relative;background-color:hsl(var(--paper-raised));background-image:repeating-linear-gradient(transparent 0 27px,rgba(131,184,194,.14) 27px 28px);background-position:0 22px;border-radius:3px 3px 12px 12px;box-shadow:0 1px 0 rgba(0,0,0,.04),0 22px 46px rgba(40,40,30,.16)}
.nb-page::before{content:'';position:absolute;top:-11px;left:50%;width:100px;height:24px;transform:translateX(-50%) rotate(2deg);background:rgba(230,184,91,.5);border-radius:2px}
.nb-night{background-image:repeating-linear-gradient(transparent 0 27px,rgba(131,184,194,.16) 27px 28px);box-shadow:0 1px 0 rgba(0,0,0,.04),0 26px 54px rgba(4,2,18,.5)}
.nb-night::before{background:rgba(230,184,91,.55)}
.nb-pno{position:absolute;right:18px;bottom:10px;font-family:var(--font-display);font-style:italic;font-size:13px;color:hsl(var(--ink-soft))}

/* one page at a time: the old page goes before the new one comes, never two at once */
.nb-one{opacity:0;pointer-events:none;transition:opacity .14s ease}
.nb-one.on{opacity:1;pointer-events:auto;transition:opacity .26s ease .14s}

/* words that scroll inside the paper when the page is taller than its room (the page also sets display:flex where :has() is missing) */
.nb-page:has(> .nb-scroll){display:flex;flex-direction:column}
.nb-scroll{min-height:0;overflow-y:auto;padding:6px;margin:-6px} /* the 6px keep a focus ring and an underline at the words' edge inside what scrolls */
@media (max-width:760px){.nb-scroll{padding:14px 6px;margin:-14px -6px}} /* and a quiet link's invisible 44px tap area, on phones */
