/* Books: the walkthrough at /books/order/ (assets/books.js) and the pieces of /books/ that come from
 * the plugin (the shelf, the bindings, the papers). The theme's tokens, the prints walkthrough's
 * look: steps at the top, the book beside the choices, a bar at the bottom with the price. */
.hp-books, .hp-books-shelf, .hp-books-bindings, .hp-books-papers { --c-ink: var(--wp--preset--color--ink, #1D1D1F); --c-body: var(--wp--preset--color--body, #3A3A3E); --c-quiet: var(--wp--preset--color--quiet, #6E6E73); --c-line: var(--wp--preset--color--line, #E8E8ED); --c-line-strong: var(--wp--preset--color--line-strong, #D2D2D7); --c-tile: var(--wp--preset--color--tile, #F5F5F7); --c-surface: var(--wp--preset--color--surface, #fff); --c-brand: var(--wp--preset--color--brand-deep, #5B46C7); --c-danger: #B4394C; --track: rgba(29, 29, 31, 0.08); --ease: cubic-bezier(0.2, 0.7, 0.2, 1); }
.hp-books.hp-books { max-width: 75rem; margin: 0 auto; color: var(--c-ink); } /* doubled to outrank the block layout's width rule */
.hp-books *, .hp-books *::before, .hp-books *::after { box-sizing: border-box; }
.hp-books button { font: inherit; color: inherit; }
.hp-books button:focus-visible, .hp-books input:focus-visible, .hp-books textarea:focus-visible, .hp-books label:focus-within { outline: 2px solid var(--c-brand); outline-offset: 2px; }
.hp-books--closed { text-align: center; }
.hp-books__tn { font-variant-numeric: tabular-nums; }

/* The head: the steps, and the phone number. */
.hp-books__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1.5rem; margin-bottom: 1.25rem; }
.hp-books__steps { display: flex; flex-wrap: wrap; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.hp-books__steps li > * { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0 0.75rem 0 0.25rem; background: none; border: 0; border-radius: 999px; font-size: 0.9rem; font-weight: 500; color: var(--c-quiet); cursor: default; }
.hp-books__steps li > button { cursor: pointer; }
.hp-books__steps i { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 999px; background: var(--c-tile); color: var(--c-quiet); font-size: 0.8rem; font-weight: 700; font-style: normal; }
.hp-books__steps .is-on > *, .hp-books__steps .is-done > * { color: var(--c-ink); }
.hp-books__steps .is-on i, .hp-books__steps .is-done i { background: var(--c-ink); color: #fff; }
.hp-books__phone { margin: 0; font-size: 0.9rem; color: var(--c-quiet); }
.hp-books__phone b { font-weight: 500; color: var(--c-ink); }
.hp-books__title h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
.hp-books__title p { color: var(--c-quiet); font-size: 1.05rem; line-height: 1.45; margin: 0.5rem 0 1.5rem; max-width: 42rem; }

/* Controls. */
.hp-books__button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0.8rem 1.4rem; border: 0; border-radius: 999px; background: var(--c-ink); color: #fff !important; font-size: 1rem; font-weight: 500; line-height: 1.2; white-space: nowrap; cursor: pointer; transition: background-color 160ms var(--ease), transform 160ms var(--ease); }
.hp-books__button:hover { background: var(--c-brand); transform: translateY(-1px); }
.hp-books__button:disabled { opacity: 0.5; transform: none; cursor: default; background: var(--c-ink); }
.hp-books__button--ghost { background: var(--c-surface); color: var(--c-ink) !important; box-shadow: inset 0 0 0 1px var(--c-line-strong); }
.hp-books__button--ghost:hover { background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--c-ink); }
/* A text link (Show me, Add a blank page, Undo, Change, Remove, Setting up a book file, Try again) looks
   as it did, and is at least 44px each way to a finger: the padding is the tap target (13px above and
   below; 6px at the sides, so a short word such as Undo is wide enough too), and an equal negative
   margin keeps the line and the words where they were (STYLE.md: tap targets at least 44px). */
.hp-books__link, .hp-books__foot a { position: relative; z-index: 1; display: inline-block; padding: 13px 6px; margin: -13px -6px; border: 0; background: none; line-height: inherit; vertical-align: baseline; }
.hp-books__link { color: var(--c-brand) !important; font-weight: 500; cursor: pointer; }
.hp-books__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hp-books__chip { display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 44px; padding: 0.35rem 1rem; border: 1px solid var(--c-line-strong); border-radius: 999px; background: var(--c-surface); color: var(--c-body); font-size: 0.95rem; font-weight: 500; line-height: 1.2; cursor: pointer; text-align: left; transition: border-color 160ms var(--ease), background-color 160ms var(--ease); }
.hp-books__chip.has-sub { border-radius: 16px; }
.hp-books__chip small { font-size: 0.75rem; font-weight: 400; color: var(--c-quiet); }
.hp-books__chip:hover { border-color: var(--c-ink); }
.hp-books__chip.is-on { background: var(--c-ink); border-color: var(--c-ink); color: #fff; }
.hp-books__chip.is-on small { color: rgba(255, 255, 255, 0.75); }
.hp-books__chip.is-dash { border-style: dashed; }
.hp-books__chip.is-dash.is-on { border-style: solid; }
.hp-books__chip { min-width: 44px; align-items: center; }
.hp-books__chip.has-sub { align-items: flex-start; }
.hp-books__seg { display: flex; width: max-content; max-width: 100%; margin: 0 auto; gap: 4px; padding: 4px; border-radius: 999px; background: var(--track); }
.hp-books__side .hp-books__seg { margin: 0; }
/* A segmented control sits centered over what it controls (STYLE.md). The choices made in two
   levels (the inside paper and the cover: the surface, then the weight; the finish: the kind, then
   which) are one family and sit the same way, centered, whether the first level is a segmented
   control or, for the cover's six surfaces, wrapping chips. */
.hp-books__opt .hp-books__seg { margin: 0 auto; }
.hp-books__opt--center .hp-books__chips { justify-content: center; }
.hp-books__opt--center .hp-books__weight, .hp-books__opt--center .hp-books__sublabel, .hp-books__opt--center .hp-books__hint { text-align: center; }
.hp-books__opt .hp-books__seg + .hp-books__chips, .hp-books__opt .hp-books__chips + .hp-books__chips, .hp-books__opt .hp-books__seg + .hp-books__weight, .hp-books__opt .hp-books__chips + .hp-books__weight { margin-top: 0.75rem; }
/* A group with one weight names it in a quiet line, so the weight is always in view. */
.hp-books__weight { margin: 0; font-size: 0.95rem; font-weight: 500; color: var(--c-body); }
/* "Where the coat goes": a small label over its own control. */
.hp-books__sublabel { margin: 1rem 0 0.4rem; font-size: 0.85rem; font-weight: 500; color: var(--c-quiet); }
.hp-books__seg button { min-height: 44px; padding: 0 1rem; border: 0; border-radius: 999px; background: none; color: var(--c-quiet); font-size: 0.95rem; font-weight: 500; white-space: nowrap; cursor: pointer; }
.hp-books__seg button.is-on { background: var(--c-surface); color: var(--c-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); }
.hp-books__field { display: block; width: 100%; max-width: 22rem; min-height: 48px; margin-top: 0.4rem; padding: 0 0.9rem; border: 1px solid var(--c-line-strong); border-radius: 12px; background: var(--c-surface); font: inherit; font-size: 1rem; color: var(--c-ink); }
textarea.hp-books__field { max-width: none; padding: 0.75rem 0.9rem; min-height: 6rem; resize: vertical; }
.hp-books__label { display: block; margin-top: 0.75rem; font-size: 0.9rem; color: var(--c-quiet); }
.hp-books__hint { margin: 0.5rem 0 0; font-size: 0.9rem; line-height: 1.45; color: var(--c-quiet); }
.hp-books__note, .hp-books__warn { margin: 0.6rem 0 0; font-size: 0.9rem; line-height: 1.45; }
.hp-books__note { color: var(--c-quiet); }
.hp-books__warn { color: var(--c-danger); }
.hp-books__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Step 1: the file. */
.hp-books__input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.hp-books__drop { display: grid; justify-items: center; gap: 0.6rem; padding: 2.25rem 1rem; border: 1.5px dashed var(--c-line-strong); border-radius: 20px; background: var(--c-tile); text-align: center; cursor: pointer; transition: border-color 160ms var(--ease); }
.hp-books__drop.is-over, .hp-books__drop:hover { border-color: var(--c-ink); }
.hp-books__drop.is-small { grid-auto-flow: column; justify-content: start; padding: 0.75rem; margin-top: 0.75rem; }
.hp-books__drop.is-small .hp-books__drop-icon, .hp-books__drop.is-small .hp-books__drop-hint { display: none; }
.hp-books__drop-icon { width: 2.5rem; height: 2.5rem; color: var(--c-quiet); }
.hp-books__drop-hint { font-size: 0.95rem; color: var(--c-quiet); }
.hp-books__file { display: grid; gap: 0.9rem; margin-top: 1rem; padding: 1.25rem; border-radius: 24px; background: var(--c-tile); }
.hp-books__thumbs { display: flex; gap: 0.6rem; align-items: flex-end; overflow: hidden; min-height: 0; }
.hp-books__thumb { display: block; flex: none; height: 84px; background: var(--c-surface); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.07); overflow: hidden; }
.hp-books__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hp-books__file-name { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; }
.hp-books__file-name b { font-weight: 600; overflow-wrap: anywhere; }
.hp-books__file-name span { font-size: 0.9rem; color: var(--c-quiet); }
.hp-books__progress { height: 4px; border-radius: 4px; background: var(--c-line-strong); overflow: hidden; }
.hp-books__progress span { display: block; height: 100%; background: var(--c-ink); transition: width 200ms linear; }
.hp-books__read, .hp-books__checks { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.hp-books__ck { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr); gap: 0.6rem; align-items: start; font-size: 0.95rem; line-height: 1.45; color: var(--c-ink); }
.hp-books__ck i { display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; margin-top: 0.1rem; border-radius: 999px; background: var(--c-ink); color: #fff; font-size: 0.72rem; font-weight: 700; font-style: normal; }
.hp-books__ck.is-warn { color: var(--c-danger); }
.hp-books__ck.is-warn i { background: var(--c-danger); }
.hp-books__ck.is-info { color: var(--c-body); }
.hp-books__ck.is-info i { background: var(--c-quiet); }
.hp-books__file-acts { margin: 0; text-align: right; font-size: 0.95rem; }
.hp-books__q-block { margin-top: 1.75rem; }
.hp-books__q-block h3 { margin: 0 0 0.25rem; font-size: 1.15rem; font-weight: 700; }
.hp-books__q-block h3 span { font-weight: 500; color: var(--c-quiet); }
.hp-books__q-block > p { margin: 0 0 0.75rem; font-size: 0.95rem; color: var(--c-quiet); }
.hp-books__nofile { margin-top: 1.5rem; }
.hp-books__nofile summary { display: inline-flex; min-height: 44px; align-items: center; font-weight: 500; color: var(--c-brand); cursor: pointer; }
.hp-books__foot { margin: 1.25rem 0 0; font-size: 0.95rem; color: var(--c-quiet); }

/* Step 2: the book beside the choices. */
.hp-books__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.hp-books__grid > * { min-width: 0; }
.hp-books__preview { position: sticky; top: 5.5rem; display: grid; gap: 0.85rem; }
.hp-books__opts { display: grid; }
.hp-books__opt { padding: 1.1rem 0; border-top: 1px solid var(--c-line); }
.hp-books__opt:first-child { padding-top: 0; border-top: 0; }
.hp-books__opt-h { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; margin-bottom: 0.75rem; }
.hp-books__opt-h h3, .hp-books__fact h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.hp-books__opt-h span { font-size: 0.85rem; color: var(--c-quiet); text-align: right; }
.hp-books__fact { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.hp-books__fact span { color: var(--c-quiet); text-align: right; }
.hp-books__sub { margin: 0.9rem 0 0.5rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-quiet); }
.hp-books__bindings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.hp-books__bind { display: grid; justify-items: start; gap: 0.3rem; padding: 0.75rem 0.85rem; border: 1px solid var(--c-line-strong); border-radius: 16px; background: var(--c-surface); text-align: left; cursor: pointer; transition: border-color 160ms var(--ease); }
.hp-books__bind:hover { border-color: var(--c-ink); }
.hp-books__bind svg { width: 2rem; height: 2rem; }
.hp-books__bind b { font-size: 0.95rem; font-weight: 600; line-height: 1.2; }
.hp-books__bind small { font-size: 0.75rem; line-height: 1.3; color: var(--c-quiet); }
.hp-books__bind.is-on { background: var(--c-ink); border-color: var(--c-ink); color: #fff; }
.hp-books__bind.is-on small { color: rgba(255, 255, 255, 0.75); }

/* The book itself. */
.hp-books__ground { display: grid; place-items: center; padding: 1.25rem; border-radius: 24px; background: var(--c-tile); overflow: hidden; }
.hp-books__stage { display: grid; place-items: center; width: 100%; }
@media (prefers-reduced-motion: no-preference) { .hp-books__stage > * { animation: hp-books-in 0.3s var(--ease) both; } }
@keyframes hp-books-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hp-books__cap { margin: 0; text-align: center; font-size: 0.95rem; font-weight: 500; }
.hp-books__cap span { display: block; font-size: 0.875rem; font-weight: 400; color: var(--c-quiet); }
.hp-books__pg { position: relative; flex: none; overflow: hidden; background: #fff; }
.hp-books__pg img { position: absolute; max-width: none; }
.hp-books__pgno { position: absolute; inset: auto 0 6% 0; text-align: center; font-size: 0.7rem; color: var(--c-quiet); }
.hp-books__off { position: absolute; inset: 0; background: repeating-linear-gradient(45deg, #EEEEF1 0 6px, #FAFAFB 6px 12px); }
.hp-books__trim { position: absolute; border: 1px dashed rgba(0, 0, 0, 0.75); box-shadow: 0 0 0 999px rgba(255, 255, 255, 0.55); pointer-events: none; }
.hp-books__zone { position: absolute; top: 0; bottom: 0; background: rgba(180, 57, 76, 0.28); box-shadow: inset 0 0 0 1px rgba(180, 57, 76, 0.9); pointer-events: none; }
.hp-books__pg.is-cover.is-gloss::after, .hp-books__pg.is-cover.is-satin::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.3) 42%, rgba(255, 255, 255, 0) 55%); }
.hp-books__pg.is-cover.is-satin::after { opacity: 0.45; }
.hp-books__pg.is-cover.is-matte img { filter: saturate(0.92) brightness(0.985); }
.hp-books.is-black .hp-books__pg:not(.is-cover) img { filter: grayscale(1); }
.hp-books__book { position: relative; display: flex; align-items: stretch; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.12)) drop-shadow(0 14px 24px rgba(0, 0, 0, 0.12)); }
.hp-books__spread:not(.is-open) { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.12)); }
.hp-books__front { position: relative; display: flex; }
.hp-books__front.is-case, .hp-books__flat.is-case { background: #7A2A1A; border-radius: 2px; }
.hp-books__fold { position: absolute; top: 0; bottom: 0; left: 0; width: 3%; background: linear-gradient(90deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0)); pointer-events: none; }
.hp-books__fold.is-hinge { width: 5%; background: linear-gradient(90deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0) 60%); }
.hp-books__spine { position: relative; flex: none; background: #8E8E93; }
.hp-books__spine.is-case { background: #5E1F12; }
.hp-books__spine::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.05) 45%, rgba(0, 0, 0, 0.22)); }
.hp-books__spine.is-flat::after { background: linear-gradient(90deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.04) 50%, rgba(0, 0, 0, 0.12)); }
.hp-books__foldline { position: absolute; top: 0; bottom: 0; left: 50%; border-left: 1px dashed rgba(255, 255, 255, 0.85); mix-blend-mode: difference; pointer-events: none; }
.hp-books__flatwrap { display: grid; justify-items: center; gap: 0.25rem; }
.hp-books__tag { margin: 0.35rem 0 0; font-size: 0.8rem; font-weight: 600; }
.hp-books__piece { position: relative; }
.hp-books__hole { position: absolute; border-radius: 999px; background: var(--c-tile); box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.3); }
.hp-books__loop { position: absolute; z-index: 2; border-radius: 999px; background: #2B2B2F; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.25); pointer-events: none; }
.hp-books__loop--wire { height: 1.5px; background: #8E9199; box-shadow: none; }
.hp-books__hole.is-punched { z-index: 1; border-radius: 999px; background: #E8E8ED; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45); }
.hp-books__hole.is-slot { border-radius: 2px; }
.hp-books__gutter { position: absolute; top: 0; bottom: 0; background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0) 100%); pointer-events: none; }
.hp-books__gutter.is-deep { background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0) 100%); }
.hp-books__staple { position: absolute; width: 2px; background: linear-gradient(90deg, #8E9097, #D5D7DC, #8E9097); border-radius: 1px; }
.hp-books__dims { display: grid; grid-template-columns: 30px auto; grid-template-rows: 30px auto; }
.hp-books__dw, .hp-books__dh { position: relative; }
.hp-books__dw { grid-area: 1 / 2; height: 30px; }
.hp-books__dh { grid-area: 2 / 1; width: 30px; }
.hp-books__dw::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--c-ink); }
.hp-books__dw::after { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 4px); height: 8px; border-left: 1px solid var(--c-ink); border-right: 1px solid var(--c-ink); }
.hp-books__dh::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--c-ink); }
.hp-books__dh::after { content: ""; position: absolute; top: 0; bottom: 0; left: calc(50% - 4px); width: 8px; border-top: 1px solid var(--c-ink); border-bottom: 1px solid var(--c-ink); }
.hp-books__dw b, .hp-books__dh b { position: absolute; left: 50%; top: 50%; z-index: 1; transform: translate(-50%, -50%); padding: 1px 7px; border-radius: 6px; background: var(--c-tile); font-size: 0.75rem; font-weight: 500; white-space: nowrap; }
.hp-books__dh b { transform: translate(-50%, -50%) rotate(-90deg); }
.hp-books__dbody { grid-area: 2 / 2; }
.hp-books__turn { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.6rem 0.9rem; font-size: 0.95rem; font-weight: 500; }
.hp-books__arrow { width: 44px; height: 44px; border: 1px solid var(--c-line-strong); border-radius: 999px; background: var(--c-surface); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.hp-books__arrow:disabled { opacity: 0.4; cursor: default; }
.hp-books__strip { display: flex; gap: 0.4rem; overflow-x: auto; padding: 0.25rem 0.1rem 0.4rem; scrollbar-width: thin; }
.hp-books__strip button { display: flex; flex: none; padding: 4px; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer; }
.hp-books__strip button.is-on { border-color: var(--c-ink); }
.hp-books__strip .hp-books__pg { box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.15); }
.hp-books__gap { display: block; }

/* Step 3: the check beside the spreads. */
.hp-books__side { display: grid; gap: 1.6rem; align-content: start; }
.hp-books__side h3 { margin: 0 0 0.65rem; font-size: 1.15rem; font-weight: 700; }
.hp-books__summary { padding: 0.25rem 1rem; border-radius: 18px; background: var(--c-tile); }
.hp-books__row { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) auto; gap: 0.75rem; padding: 0.7rem 0; border-bottom: 1px solid var(--c-line-strong); font-size: 0.95rem; }
.hp-books__row:last-child { border-bottom: 0; }
.hp-books__row > span:first-child { color: var(--c-quiet); }
.hp-books__row > span:nth-child(2) { overflow-wrap: anywhere; }
.hp-books__proofs { display: grid; gap: 0.5rem; margin-top: 0.6rem; }
.hp-books__proof { display: grid; gap: 0.2rem; padding: 0.9rem 1rem; border: 1px solid var(--c-line-strong); border-radius: 16px; background: var(--c-surface); text-align: left; font-size: 0.9rem; color: var(--c-quiet); cursor: pointer; }
.hp-books__proof.is-on { border-color: var(--c-ink); box-shadow: inset 0 0 0 1px var(--c-ink); }
.hp-books__proof-h { display: flex; justify-content: space-between; gap: 1rem; font-size: 1rem; color: var(--c-ink); }
.hp-books__proof-h b { font-weight: 600; }
.hp-books__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.hp-books__labeled .hp-books__field { max-width: none; }

/* The bar at the bottom: the price, and the one button. */
.hp-books__bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-top: 2rem; padding: 0.85rem 0 calc(0.85rem + env(safe-area-inset-bottom, 0px)); background: var(--c-surface); border-top: 1px solid var(--c-line); }
.hp-books__sum { flex: 1 1 0; min-width: 0; line-height: 1.3; font-variant-numeric: tabular-nums; }
.hp-books__bar .hp-books__button { flex: none; }
.hp-books__sum strong { font-size: 1.6rem; font-weight: 600; }
.hp-books__sum em { font-style: normal; color: var(--c-quiet); }
.hp-books__sum small { display: block; font-size: 0.875rem; color: var(--c-quiet); }
.hp-books__sum small.hp-books__placeholder { font-size: 0.8rem; font-style: italic; }
.hp-books__q { font-size: 1.2rem; font-weight: 600; }
/* The price on its way from the server (a list read one combination at a time): quiet, where the price will be. */
.hp-books__wait { display: inline-block; color: var(--c-quiet); font-weight: 500; }
@media (prefers-reduced-motion: no-preference) { .hp-books__wait { animation: hp-books-wait 1.1s ease-in-out infinite alternate; } }
@keyframes hp-books-wait { from { opacity: 1; } to { opacity: 0.4; } }
.hp-books__barnote { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.hp-books__alert { flex-basis: 100%; margin: 0; font-size: 0.9rem; color: var(--c-danger); }
.hp-books__done { display: grid; justify-items: center; gap: 0.75rem; padding: 3rem 0 2rem; text-align: center; }
.hp-books__done h2 { margin: 0; font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
.hp-books__done p { margin: 0; max-width: 34rem; color: var(--c-quiet); }
.hp-books__tick { display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 999px; background: var(--c-ink); color: #fff; font-size: 1.8rem; }
.hp-books__cart-thumb { width: 64px; height: auto; }

@media (max-width: 860px) {
  .hp-books__grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .hp-books__preview { position: static; }
  .hp-books__bindings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .hp-books__phone { display: none; }
  .hp-books__ground { padding: 0.85rem 0.6rem; border-radius: 20px; }
  .hp-books__ground.is-wide { padding: 0.5rem; } /* a landscape book is short on a phone: give it every pixel, in every view alike */
  .hp-books__fields { grid-template-columns: minmax(0, 1fr); }
  .hp-books__row { grid-template-columns: 5.25rem minmax(0, 1fr) auto; }
  .hp-books__fact { flex-direction: column; gap: 0.2rem; }
  .hp-books__fact span { text-align: left; }
  .hp-books__sum strong { font-size: 1.35rem; }
  .hp-books__steps li > * { padding-right: 0.5rem; font-size: 0.85rem; }
}
@media (prefers-reduced-motion: reduce) { .hp-books *, .hp-books *::before, .hp-books *::after { transition: none !important; animation: none !important; } }

/* /books/: the shelf of five bindings under the hero, drawn until there are photographs. */
.hp-books-shelf { display: flex; justify-content: center; align-items: flex-end; gap: clamp(0.75rem, 3vw, 2.5rem); margin: clamp(2.5rem, 5vw, 4rem) auto 0; max-width: 60rem; }
.hp-books-shelf__book { display: grid; justify-items: center; gap: 0.9rem; margin: 0; font-size: 0.85rem; font-weight: 500; color: var(--c-quiet); }
.hp-books-shelf__cover { position: relative; display: block; width: clamp(3.4rem, 11vw, 9rem); aspect-ratio: 5.5 / 8.5; background: linear-gradient(150deg, #B8432B, #E58B5E); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.12), 0 14px 26px rgba(0, 0, 0, 0.12); }
.hp-books-shelf__title { position: absolute; left: 12%; top: 9%; width: 55%; height: 10%; border-radius: 2px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 0.9em 0 -0.15em rgba(255, 255, 255, 0.6); }
.hp-books-shelf__plate { position: absolute; left: 30%; top: 42%; width: 52%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #B8432B 0 44%, #F3E6D0 46% 100%); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08); }
.hp-books-shelf__book--perfect .hp-books-shelf__cover { background: linear-gradient(150deg, #2B5561, #7FA9AE); box-shadow: -7px 0 0 #1F3F48, 0 2px 3px rgba(0, 0, 0, 0.12), 0 14px 26px rgba(0, 0, 0, 0.12); }
.hp-books-shelf__book--coil .hp-books-shelf__cover { background: linear-gradient(150deg, #56622D, #9DA65D); }
.hp-books-shelf__book--coil .hp-books-shelf__cover::before, .hp-books-shelf__book--wire .hp-books-shelf__cover::before { content: ""; position: absolute; left: -6px; top: 3%; bottom: 3%; width: 12px; background: repeating-linear-gradient(170deg, transparent 0 5px, #2B2B2F 5px 8px); }
.hp-books-shelf__book--wire .hp-books-shelf__cover { background: linear-gradient(150deg, #4E2440, #95527A); }
.hp-books-shelf__book--wire .hp-books-shelf__cover::before { background: repeating-linear-gradient(180deg, transparent 0 4px, #9A9CA4 4px 5px, transparent 5px 6px, #9A9CA4 6px 7px, transparent 7px 11px); }
.hp-books-shelf__book--hard .hp-books-shelf__cover { background: linear-gradient(150deg, #7A2A1A, #B8432B); box-shadow: -8px 0 0 #5E1F12, 0 0 0 3px #7A2A1A, 0 2px 3px rgba(0, 0, 0, 0.12), 0 14px 26px rgba(0, 0, 0, 0.14); }
.hp-books-shelf__book--saddle .hp-books-shelf__cover::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4%; background: linear-gradient(90deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0)); }
@media (max-width: 600px) { .hp-books-shelf figcaption { display: none; } }

/* /books/: the bindings and the papers, as the theme's tiles. */
.hp-books-bindings, .hp-books-papers { display: grid; gap: var(--wp--preset--spacing--30, 1rem); list-style: none; margin: 0; padding: 0; }
.hp-books-bindings { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.hp-books-papers { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hp-books-papers__weights { margin: 0.6rem 0 0; font-size: 0.85rem; font-weight: 600; color: var(--c-ink); }
.hp-books-bindings__icon { display: block; width: 3rem; height: 3rem; margin-bottom: 0.75rem; color: var(--c-ink); }
.hp-books-bindings__range { margin-top: 0.75rem !important; font-size: 0.9rem; font-weight: 500; color: var(--c-quiet); }
.hp-books-papers__chip { display: block; width: 3.5rem; height: 3.5rem; margin-bottom: 0.75rem; border-radius: 12px; border: 1px solid var(--c-line-strong); background: #fff; }
.hp-books-papers__chip--gloss, .hp-books-papers__chip--coated { background: linear-gradient(135deg, #E9E9EE 0%, #FFFFFF 40%, #F2F2F6 55%, #DCDCE3 100%); }
.hp-books-papers__chip--uncoated, .hp-books-papers__chip--smooth { background: #F7F4EE; }
.hp-books-papers__chip--cover { background: linear-gradient(135deg, #F3F3F5, #FFFFFF 50%, #E7E7EC); box-shadow: inset 0 -6px 0 #E1E1E6; }
.hp-books-papers__chip--self { background: linear-gradient(90deg, #FFFFFF 0 49%, #D2D2D7 49% 51%, #FFFFFF 51%); }
/* The cover tile: one line per surface, its weights after it. */
.hp-books-papers__list { display: grid; gap: 0.3rem; margin: 0.6rem 0 0; padding: 0; list-style: none; font-size: 0.85rem; line-height: 1.4; color: var(--c-body); }
.hp-books-papers__list b { font-weight: 600; color: var(--c-ink); }
@media (max-width: 1100px) { .hp-books-bindings { grid-template-columns: repeat(3, minmax(0, 1fr)); } .hp-books-papers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .hp-books-bindings, .hp-books-papers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .hp-books-bindings, .hp-books-papers { grid-template-columns: minmax(0, 1fr); } }
.hp-books-prices__quoted { margin: 0; padding: 2rem 1.5rem; border-radius: 24px; background: var(--wp--preset--color--tile, #F5F5F7); text-align: center; color: var(--wp--preset--color--body, #3A3A3E); }
/* The local site's made-up prices, said in a line seen at every width (the caption hides on a phone). */
.hp-books-prices__placeholder { margin: 0 0 1.25rem; text-align: center; font-size: 0.875rem; font-style: italic; color: var(--wp--preset--color--quiet, #6E6E73); }
