/* What the catalogue's three pages share: booking step 1, the service pages and the products
   page (catalogue plan task 3.2, review T4). Each page's own styles live in its own file.
   Ported from the mockup's pages.css and bk.css (docs/design/home-sections/) with the size rules
   of docs/decisions.md section 1 and the catalogue spec, section 7, difference 8: every sentence
   and table cell at 18 px; the labels of spec SZ1 (the eyebrow, the table column headings) keep
   the mockup's size. Only features on the phone floor of docs/decisions.md section 15
   (iOS 15.4, Chrome 108). Tokens from site.css. */

/* the eyebrow over a heading (pages.css:4), a label of SZ1 */
.eyebrow { margin: 0; font: 700 15px/1.3 var(--body); color: var(--moss); }

/* the line drawings (pages.css:34-37, bk.css:21-24) and their soft glow (pages.css:85-87) */
.ico .d { fill: none; stroke: var(--moss); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ico .t { stroke-width: 2; }
.ico .am { fill: var(--amber); opacity: .7; }
.ico .dot { fill: var(--moss); }
.pg-arch { width: min(280px, 72vw); aspect-ratio: 4 / 3.4; display: grid; place-items: center;
  background: radial-gradient(closest-side, #DCE7D0, rgba(220, 231, 208, 0)); }
.pg-arch svg { width: 72%; height: auto; }
/* the service page's draw-in starts undrawn (spec SZ3, review T3): with JavaScript (site.js
   marks <html class="js"> before pages.js runs) and without a wish for reduced motion, the head
   drawing's lines (pathLength="1" in the SVG) start hidden and pages.js draws them in; without
   JavaScript and under reduced motion the drawing shows drawn */
@media (prefers-reduced-motion: no-preference) {
  .js .pg-arch .ico .d { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
}

/* the page head of a service page and the products page: the heading, the lead and, when there
   is one, the drawing or photo beside them (pages.css:9-12, :82-84, :94-97); text-wrap: balance
   is an extra without replacement (floor.md), the heading wrapping as usual without it */
.pg-head { display: grid; gap: 10px; max-width: 44rem; margin-bottom: 28px; }
.pg-head.has-arch { max-width: none; }
.pg-head-txt { display: grid; gap: 10px; max-width: 44rem; }
/* a long name breaks rather than widening the page (administration spec R2: a 120-character service
   name the editor allows), overflow-wrap: anywhere being on the floor (floor.md) */
.pg-head h1 { margin: 0; font: 500 clamp(36px, 9vw, 60px)/1.06 var(--display); text-wrap: balance; overflow-wrap: anywhere; }
/* the lead under the heading: a service's description, the products page's shared lead; a long
   word or address breaks (spec R2, plan 3.2: the shared texts' pages) */
.pg-lead { margin: 0; font-size: 19.5px; line-height: 1.55; color: #3F4D42; overflow-wrap: anywhere; }

/* the photo frame of each slot: a product card's art (pages.css:42-43, :92, :103-104), the
   thumbnail beside a product's name (pages.css:31, :106), the products page's head photo
   (pages.css:107-108, :110) */
.pg-card-art { position: relative; display: grid; place-items: center; height: 150px;
  background: radial-gradient(ellipse 60% 85% at 50% 70%, #DCE7D0, rgba(220, 231, 208, 0)); }
.pg-card-art svg { width: 140px; height: 105px; }
.pg-card-art.has-img { height: 230px; padding: 16px 16px 0; }
.pg-card-art .pg-pimg { position: absolute; inset: 16px 16px 0; width: calc(100% - 32px); height: calc(100% - 16px); object-fit: contain; object-position: 50% 100%; }
.pg-prods svg { width: 64px; height: 48px; }
.pg-prods .pg-pimg { width: 64px; height: 56px; object-fit: contain; }
.pg-arch.has-img { position: relative; aspect-ratio: auto; height: 300px; }
.pg-arch.has-img img { width: auto; height: 100%; max-width: 100%; object-fit: contain; }

/* a block of a service page or the products page, the frame of the honest note (pages.css:15-17,
   :78); a long word or address in its text breaks rather than widening the page (spec R2, plan
   3.2: the shared texts, such as the note under the prices and the skin test's text) */
.pg-block { display: grid; gap: 12px; padding: 22px 20px; border-radius: 22px; background: var(--paper); border: 1px solid var(--line); }
.pg-block h2 { margin: 0; font: 500 28px/1.15 var(--display); }
.pg-block p { margin: 0; font-size: 18px; line-height: 1.6; overflow-wrap: anywhere; }

/* an information box (administration spec R1, P3): a product's in its card after the facts, a
   service's on its page where the PPD block was, framed with the moss edge that block had
   (pages.css:124); its heading an h3 in a card, an h2 on a service page; text and list at 18 px;
   a link padded to 48 px as in running text (legal.css); a long word or address breaks rather
   than widening the page (spec R2), overflow-wrap: anywhere being on the floor (floor.md) */
.info-box { display: grid; gap: 10px; padding: 16px 18px; border-radius: 16px; background: var(--paper);
  border: 1px solid var(--line); border-left: 4px solid var(--moss); overflow-wrap: anywhere; }
.info-box h2 { margin: 0; font: 500 28px/1.15 var(--display); }
.info-box h3 { margin: 0; font: 700 18px/1.35 var(--body); color: var(--moss); }
.info-box p { margin: 0; font-size: 18px; line-height: 1.55; }
.info-box ul { margin: 0; padding-left: 1.25em; display: grid; gap: 6px; }
.info-box li { font-size: 18px; line-height: 1.5; }
.info-box a { padding: 13px 0; color: var(--ink); text-underline-offset: 4px; }

/* the honest note on colour (pages.css:99-100): the long form as a block, the short form on a
   colour product's card at 18 px, breaking a long word inside the card, which would cut it off
   (spec R2, plan 3.2) */
.pg-honest { background: #F6F3E6; border-left: 4px solid var(--amber); }
.pg-honest-s { margin: 4px 0 0; padding: 10px 12px; border-radius: 12px; background: #F6F3E6; border-left: 3px solid var(--amber); font-size: 18px; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }

/* the option lines: the service page's table (pages.css:19-24) and step 1's fold-out
   (bk.css:78-86), there lines to read rather than buttons until piece 4, at 18 px; the fold-out's
   lines are a list (role="list" in the template, review D6) */
.pg-prices { width: 100%; border-collapse: collapse; font-size: 18px; font-variant-numeric: tabular-nums; }
.pg-prices th { text-align: left; font-weight: 700; padding: 12px 0; overflow-wrap: anywhere; }
.pg-prices td { padding: 12px 0 12px 14px; white-space: nowrap; color: var(--muted); }
.pg-prices td:last-child { color: var(--ink); font-weight: 700; text-align: right; }
.pg-prices tr + tr > * { border-top: 1px dashed var(--line); }
.pg-prices svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-right: 5px; vertical-align: -2px; }
.bk-vars { padding: 0 14px 14px 18px; display: grid; gap: 8px; }
.bk-vlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bk-var { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; min-height: 54px; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--linen); font-size: 18px; font-variant-numeric: tabular-nums; }
.bk-vl { font-weight: 700; overflow-wrap: anywhere; }
.bk-vt { color: var(--muted); }
.bk-vp { font-weight: 700; min-width: 52px; text-align: right; }

@media (min-width: 900px) {
  /* the drawing or photo beside the heading (pages.css:73-76, :93-95) */
  .pg-head.has-arch { grid-template-columns: minmax(0, 1fr) 300px; align-items: end; column-gap: 48px; }
  .pg-head.has-arch .pg-arch { grid-column: 2; grid-row: 1; width: 300px; }
  .pg-block { padding: 26px 28px; }
  .pg-card-art.has-img { height: 280px; }
  .pg-arch.has-img { height: 340px; }
}

/* phones under 390 px: each option line as its name over its time and price, so a long name
   leaves the page as wide as the screen at the same 18 px (review T1); the template keeps its
   table roles, which a grid display may drop in Safari (review D6) */
@media (max-width: 389px) {
  .pg-prices tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; }
  .pg-prices th { grid-column: 1 / -1; padding-bottom: 2px; }
  .pg-prices td { padding: 0 0 12px; }
  .pg-prices tr + tr { border-top: 1px dashed var(--line); }
  .pg-prices tr + tr > * { border-top: 0; }
}
