/* Ingress, Reports page: hero, price boxes, report selector, sample, levels table, picture-and-question block, order
   form. Design returns of 27 November 2026 (first pass, Instruction 45; second pass, Instruction 46, folded in here so
   the page loads one Reports stylesheet), applied to the templates built in Instructions 44 to 46. Loaded after ingress.css, ingress-build.css,
   ingress-finish.css and ingress-which.css, on /reports/ only. Existing tokens only, with --accent-rule (ingress.css,
   Instruction 45) for the price box step marks. Treatment B (the picture behind) is not used. The levels table, the
   questions band and the row of seven (Instruction 45 E and G) follow Design's sections in the site's own patterns. */

/* ---------- 1. Hero: the site's photograph hero (Design second pass); the panel lifted clear of the boxes ---------- */
.rp-hero .rp-hero-photo { position: relative; }
.rp-hero .rp-hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rp-hero .rp-marks { position: absolute; inset: 0; width: 100%; height: 100%; }
.rp-marks .rp-ring { fill: none; stroke: var(--accent); stroke-width: 3; vector-effect: non-scaling-stroke; }
.rp-marks .rp-lead-line { stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.rp-marks .rp-mk rect { fill: var(--ink); }
.rp-marks .rp-mk text { fill: var(--paper); font-family: var(--font); font-weight: 500; font-size: 30px; text-anchor: middle; }
.rp-hero .p-hero-panels { bottom: 96px; }                       /* the panel sits above the boxes' overlap */
.rp-hero .p-hero-panel { grid-column: 1 / span 7; padding-top: var(--space-4); padding-bottom: var(--space-4); }
.rp-hero .rp-hero-lead { margin: var(--space-2) 0 0; color: var(--ground); }
.rp-hero .rp-quiet { margin: var(--space-2) 0 0; color: var(--ground-muted); font-size: var(--caption-size); line-height: var(--caption-line); }
.rp-hero .rp-quiet a { color: var(--ground); text-underline-offset: 3px; }

/* ---------- Bands (second pass): no two neighbours share a background ---------- */
.rp-band-paper { background: var(--paper); }
.rp-band-ground { background: var(--ground); }
.rp-band-ink { background: var(--ink); color: var(--ground); }

/* ---------- 2. Price boxes: a ladder of three, name and fee only ---------- */
/* 51: the ground band for the boxes runs only as deep as the boxes and their caption need; the selector follows at once,
   so "For one roof, excluding VAT." and "Which report do you need?" sit 48px apart (24 + 24, the gap between a section's
   parts), not the gap between two bands. */
.rp-prices { padding-bottom: var(--space-3); }
.wk.rp-sel { padding-top: var(--space-3); }
.rp-boxes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); align-items: end; margin: 0; padding: 0; list-style: none; }
.rp-box { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: var(--space-1); width: 100%; padding: var(--space-3); background: var(--paper); border: 1px solid var(--grey-rule); border-top: 4px solid var(--ink); color: var(--ink); text-align: left; text-decoration: none; font: inherit; cursor: pointer; }
.rp-box[data-step="1"] { min-height: 136px; }
.rp-box[data-step="2"] { min-height: 160px; }
.rp-box[data-step="3"] { min-height: 184px; }
.rp-step { display: flex; gap: 4px; position: absolute; top: var(--space-2); left: var(--space-3); }
.rp-step i { display: block; width: 16px; height: 4px; background: var(--accent-rule); }
.rp-name { font-size: var(--body-size); line-height: 24px; font-weight: 500; }
.rp-fee { font-weight: 300; font-size: 32px; line-height: 40px; letter-spacing: -0.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rp-box:hover { border-color: var(--ink); }
.rp-box:hover .rp-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.rp-box:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rp-box.is-selected { background: var(--ink); color: var(--ground); border-color: var(--ink); border-top-color: var(--accent); }
.rp-box.is-selected .rp-step i { background: var(--ground); }
.rp-vat { margin: var(--space-2) 0 0; color: var(--grey-caption); font-size: var(--caption-size); line-height: var(--caption-line); }
.rp-vat a { color: inherit; }
/* 54: the caption in two parts: one line from 768, two lines below. */
.rp-vat > span { display: block; }
@media (min-width: 768px) { .rp-vat > span { display: inline; } }
/* 54: more than one building, in the result card: the line and Get in touch beneath the fee for one roof. */
.rp-multi { margin-top: var(--space-2); }
.rp-multi p { margin: 0 0 var(--space-2) !important; }
.rp-multi .btn { background: var(--paper); }
/* Second pass: the boxes across the hero's lower edge; the ground starts 96px down. */
.rp-prices.rp-over { position: relative; z-index: 2; margin-top: -96px; background: linear-gradient(to bottom, transparent 96px, var(--ground) 96px); }
.rp-over .rp-box { background: var(--paper); }
.rp-over .rp-box[data-step="1"] { border-top-color: var(--ink); }

/* ---------- 3. Selector: the answer panel without the drawing ---------- */
.wk.rp [hidden] { display: none !important; }
.wk.rp-sel .wk-cards.rp-ten { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wk.rp-sel .wk-cards.rp-ten .wk-card { min-height: 60px; }
.wk.rp-sel .rp-follow { margin: var(--space-1) 0 0; padding: var(--space-2) 0 0 var(--space-3); border-left: 2px solid var(--accent); }
.wk.rp-sel .rp-follow legend { font-size: var(--body-size); line-height: 24px; font-weight: 500; margin-bottom: var(--space-2); }
/* Design shows the result card with its hairline only: the shared panel's drawn accent outline is not used here. */
.wk.rp-sel .wk-draw { display: none; }
/* 48: no card before an answer; the answers take the full width (three across from 1,024, two below), and move to the
   left column beside the card once the first answer gives a result (.rp-has-result, set by which.js). */
.wk.rp-sel .wk-result[data-state="empty"] { display: none; }
.wk.rp-sel:not(.rp-has-result) .wk-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) {
  .wk.rp-sel:not(.rp-has-result) .wk-cards.rp-ten { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* Second pass: the selector on paper; its answer cards and the empty card take the ground. */
.wk.rp-sel.rp-band-paper { background: var(--paper); border-bottom: 0; }
/* 51: the telephone button on the selector's heading row: from 768 at the right-hand end, level with the heading; below
   768 under the line at full width. */
.wk.rp-sel .rp-head-call { background: var(--paper); }
@media (min-width: 768px) {
  .wk.rp-sel .wk-head .rp-head-call { grid-column: 9 / -1; grid-row: 1; justify-self: end; align-self: center; }
}
@media (max-width: 767px) {
  .wk.rp-sel .wk-head .rp-head-call { grid-column: 1 / -1; width: 100%; }
}
.wk.rp-sel.rp-band-paper .wk-card { background: var(--ground); }
.wk.rp-sel.rp-band-paper .wk-card:has(input:checked) { background: var(--ink); }
.wk.rp-sel.rp-band-paper .wk-result { background: var(--paper); }
.wk.rp-sel.rp-band-paper .wk-result[data-state="empty"] { background: var(--ground); border-color: var(--ground); }
.wk.rp-sel .wk-result { min-height: 520px; }
.wk.rp-sel .wk-result[data-state="empty"] { min-height: 520px; }
.wk.rp-sel .wk-result[data-state="empty"] .rp-res { width: 100%; }
.rp-card .rp-card-title { margin: 0; font-weight: 300; font-size: var(--heading-size); line-height: var(--heading-line); outline: 0; }
.rp-fee-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--space-3); margin: var(--space-2) 0 0 !important; padding: var(--space-2) 0; border-top: 1px solid var(--grey-rule); border-bottom: 1px solid var(--grey-rule); }
.rp-fee-row .rp-card-fee { font-weight: 500; font-size: var(--title-size); line-height: var(--title-line); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-fee-row .rp-card-fee.rp-sited { white-space: normal; }
.rp-fee-row .rp-turn { color: var(--grey-caption); font-size: var(--body-size); line-height: 24px; }
.rp-card .rp-card-line { margin: var(--space-2) 0 0; }
.rp-also { margin-top: var(--space-3); padding: var(--space-2) var(--space-3); background: var(--ground); }
.rp-also .t-label { margin: 0 0 4px; color: var(--grey-caption); }
.rp-also p { margin: 0; }
.rp-also p + p { margin-top: var(--space-1); }
.rp-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-top: var(--space-3); }
.rp-card-actions .btn-ink { color: var(--ground); }
.rp-card-actions .btn-ground { background: var(--paper); }
.rp-call { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--ink); }
.rp-call > p { margin: 0 0 var(--space-2); }
.rp-call > p b { font-weight: 500; }
.rp-call-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: var(--space-2); align-items: end; }
.rp-call-row .btn-ink { color: var(--ground); }
.rp-call .field input { background: var(--paper); }
.rp-call .consent { margin-top: var(--space-2); }
/* The sent state: the callback's own confirmation in Design's ground block. */
.rp-call .confirm { margin: 0; padding: var(--space-2) var(--space-3); background: var(--ground); }
.rp-call .confirm p { margin: 0; }
.rp-call .confirm .t-title { font-size: var(--body-size); line-height: var(--body-line); font-weight: 500; }

/* ---------- 4. The sample on ink (second pass): page 1 leads; pages 2, 3, 4 and 11 two by two ---------- */
.rp-sample.rp-band-ink { padding: var(--space-8) 0; }
.rp-sample.rp-band-ink .section-head { border-top-color: var(--ground-muted); }
.rp-sample.rp-band-ink .s-title { color: var(--ground); grid-column: 1 / -1; }
.rp-sample.rp-band-ink .section-head .t-body { grid-column: 1 / span 8; margin: 0; color: var(--ground-muted); }
.rp-show { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); margin-top: var(--space-5); }
.rp-show img { display: block; width: 100%; height: auto; border: 0; outline: 1px solid color-mix(in srgb, var(--ground) 18%, transparent); background: var(--ground); }
.rp-show-lead { grid-column: 1 / -1; }
.rp-show-rest { display: contents; margin: 0; padding: 0; list-style: none; }
.rp-show-rest li { margin: 0; }
.rp-show-rest:focus-visible { outline: 2px solid var(--ground); outline-offset: 2px; }
.rp-sample-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.rp-sample.rp-band-ink .rp-sample-foot { margin-top: var(--space-5); }
.rp-sample.rp-band-ink .rp-sample-foot .btn-ink { background: var(--ground); color: var(--ink); border-color: var(--ground); }
/* 53: three samples. The tab list in the site's outlined button style on ink; the selected tab filled. Without script the
   tab list stays hidden and each panel shows its own name above it. */
.rp-tabs { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-4); }
.rp-tabs[hidden] { display: none; }
.rp-tab { min-height: var(--control-height); padding: 0 var(--space-3); border: 1px solid var(--ground-muted); background: transparent; color: var(--ground); font: inherit; font-size: 16px; line-height: 24px; font-weight: 500; text-align: left; cursor: pointer; }
.rp-tab:hover { border-color: var(--ground); }
.rp-tab[aria-selected="true"] { background: var(--ground); border-color: var(--ground); color: var(--ink); }
.rp-tab:focus-visible { outline: 2px solid var(--ground); outline-offset: 2px; }
.rp-panel + .rp-panel { margin-top: var(--space-7); }
.rp-panel[hidden] { display: none; }
.rp-panel:focus-visible { outline: 2px solid var(--ground); outline-offset: 4px; }
.rp-panel-h { margin: var(--space-5) 0 0; color: var(--ground); font-weight: 300; font-size: var(--title-size); line-height: var(--title-line); }
.rp-tabbed .rp-panel-h { display: none; }
.rp-tabbed .rp-panel + .rp-panel { margin-top: 0; }
@media (min-width: 1024px) {
  /* Heading and caption beside the leading page; the four others two by two beneath it */
  .rp-sample.rp-band-ink > .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: min-content min-content 1fr; column-gap: var(--gutter); }
  .rp-sample.rp-band-ink .rp-show-head { grid-column: 1 / span 4; grid-row: 1; display: block; align-self: start; margin-bottom: 0; }
  .rp-sample.rp-band-ink .rp-show-head .t-body { margin-top: var(--space-2); }
  /* 53: the tabs under the heading and caption, one above another; the open sample beside them. */
  .rp-sample.rp-band-ink .rp-tabs { grid-column: 1 / span 4; grid-row: 2; flex-direction: column; align-items: stretch; }
  .rp-sample.rp-band-ink .rp-panels { grid-column: 5 / span 8; grid-row: 1 / span 3; }
  .rp-sample.rp-band-ink .rp-show { margin-top: 0; }
  .rp-sample.rp-band-ink .rp-panel-h { margin-top: 0; margin-bottom: var(--space-3); }
  .rp-sample.rp-band-ink .rp-sample-foot { margin-top: var(--space-4); }
}

/* ---------- 5. What do you get at each level? (Instruction 45 E) ---------- */
.rp-levels { padding: var(--space-8) 0 var(--space-7); }
.rp-levels .section-head .s-title { grid-column: 1 / -1; }
.lv-table-wrap { overflow-x: auto; }
.lv-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: var(--body-size); line-height: 24px; }
.lv-table th, .lv-table td { padding: var(--space-2) var(--space-2); border-bottom: 1px solid var(--grey-rule); text-align: left; vertical-align: top; }
.lv-table thead td:first-child { width: 34%; }
.lv-table thead th { font-weight: 500; border-bottom: 1px solid var(--ink); vertical-align: bottom; }
.lv-table tbody th { font-weight: 400; padding-left: 0; }
.lv-table .lv-tick { fill: none; stroke: var(--ink); stroke-width: 2; vertical-align: -2px; }
/* 49: the fee row at the size and weight of the other rows (the turnaround row), on one line; the larger fees stay in the column heads. */
.lv-table .lv-fee-row td { white-space: nowrap; font-variant-numeric: tabular-nums; }
.lv-table tfoot td { border-bottom: 0; padding-top: var(--space-3); }
.lv-table tfoot .btn-ink, .lv-stack .btn-ink { color: var(--ground); }
.lv-stack { display: none; margin: 0; padding: 0; list-style: none; }
.lv-card { padding: var(--space-3); background: var(--paper); border-top: 4px solid var(--ink); }
.lv-card + .lv-card { margin-top: var(--space-2); }
.lv-card-name { margin: 0 0 var(--space-2); font-weight: 500; font-size: var(--title-size); line-height: var(--title-line); }
.lv-card-rows { margin: 0 0 var(--space-3); padding: 0 0 0 var(--space-3); }
.lv-card-rows li { margin: 0 0 var(--space-1); font-size: var(--body-size); line-height: 24px; }
.lv-card-fee { margin: 0; font-size: var(--body-size); line-height: 24px; font-variant-numeric: tabular-nums; } /* 49: the card's normal text size */
.lv-card .t-caption { margin: 0 0 var(--space-3); color: var(--grey-caption); }
.lv-card .btn { width: 100%; }
/* 50: two small lines under the table or the cards; the band closes on its normal padding after them. */
/* 54: three short lines; the block is as wide as its longest line needs (one line from 1,024), and where a narrower
   screen wraps one, text-wrap balances it so no line is left with one or two words. */
.lv-notes { margin-top: var(--space-3); width: fit-content; max-width: 100%; }
.lv-notes > p { text-wrap: balance; }
.lv-notes > p { margin: 0; color: var(--grey-caption); }
.lv-notes > p + p { margin-top: var(--space-1); }

/* Second pass: the table on paper, the fee beneath each column's name, even rows on the ground, Order buttons the
   full cell width and wrapping, so "Order a Specification and Budget" is never cut off. */
.rp-levels.rp-band-paper { padding: var(--space-8) 0; }
.rp-table thead th { padding-bottom: var(--space-2); border-bottom: 2px solid var(--ink); }
.rp-table .lv-h-name { display: block; font-weight: 500; font-size: var(--body-size); line-height: 24px; }
.rp-table .lv-h-fee { display: block; margin-top: 4px; font-weight: 300; font-size: var(--title-size); line-height: var(--title-line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rp-table tbody tr:nth-child(even) th, .rp-table tbody tr:nth-child(even) td { background: var(--ground); }
.rp-table tbody th { padding-left: var(--space-2); }
.rp-table tfoot td { padding-left: var(--space-2); padding-right: var(--space-2); }
/* 49: the three buttons read "Order this report", one line, the same height and width (the full width of equal cells). */
.rp-table tfoot .btn { width: 100%; height: var(--control-height); padding: 0 var(--space-1); white-space: nowrap; text-align: center; }
/* 53: "See a sample" under each Order button, the same size in all three; the buttons stay equal. */
.lv-see { display: block; margin-top: var(--space-1); font-size: 16px; line-height: 24px; text-align: center; color: var(--ink); white-space: nowrap; }
.lv-card .lv-see { text-align: left; margin-top: var(--space-2); }
.rp-levels .lv-card { background: var(--ground); }

/* ---------- 5b. Picture-and-question block (second pass): the works pages' ask band; the figure whole on ink ---------- */
/* 50: no picture: a slim call to action on the ink band, the site's normal band padding, nothing reserved for a figure.
   From 1,024 the question and line on the left and the two actions on the right, on one row, vertically centred. */
.rp-ask.ask-band { padding: var(--space-7) 0; }
.rp-ask-row { display: flex; flex-direction: column; gap: var(--space-4); }
.rp-ask-text { display: flex; flex-direction: column; gap: var(--space-2); }
.rp-ask .ask-q { margin: 0; }
.rp-ask-text .t-body { margin: 0; color: var(--ground-muted); }
.rp-ask .ask-actions { margin: 0; }
.rp-ask .ask-actions a { color: var(--ground); }
@media (min-width: 1024px) {
  .rp-ask-row { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-5); }
  .rp-ask-text { flex: 1 1 auto; max-width: 40rem; }
  .rp-ask .ask-actions { flex: 0 0 auto; min-width: 22rem; }
}

/* ---------- 5c. Order form (second pass): the last step of buying ---------- */
.rp-order { padding: var(--space-8) 0; }
.rp-order .form-block { align-items: start; }
.rp-order-intro .s-title { margin: 0; }
.rp-order-line { margin: var(--space-2) 0 0; font-size: var(--title-size); line-height: var(--title-line); }
.rp-order-card { padding: var(--space-4); background: var(--ground); border-top: 4px solid var(--ink); }
.rp-order-card .field input, .rp-order-card .field select { background: var(--paper); }
.rp-order .rp-order-send { color: var(--ground); }

/* ---------- 6. The questions and the row of seven (Instruction 45 G) ---------- */
.rp-prompted { padding-bottom: var(--space-7); }
.rp-prompted h2 { margin: 0; }
.rp-prompted-list { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); margin: 0; padding: 0; list-style: none; font-size: var(--body-size); line-height: var(--body-line); }

/* ---------- widths ---------- */
@media (max-width: 1279px) {
  /* 47: the panel keeps Design's seven columns down to 1,024 (Design widened it to nine below 1,280), so it never
     covers the fourth marker: at nine columns it ran over the ring at 1,024. Below 1,024 it sits under the photograph. */
  .rp-hero .p-hero-panel { grid-column: 1 / span 7; }
  .rp-table .lv-h-fee { font-size: 20px; line-height: 28px; }
  .rp-box { padding-left: var(--space-2); padding-right: var(--space-2); }
  .rp-step { left: var(--space-2); }
  .rp-fee { font-size: 24px; line-height: 32px; letter-spacing: -0.015em; }
}
@media (max-width: 1023px) {
  /* Below 1,024 the panel sits under the photograph (site pattern); the boxes follow it, no overlap */
  .rp-hero .p-hero-panels { bottom: auto; }
  .rp-hero .p-hero-panel { grid-column: 1 / -1; }
  .rp-prices.rp-over { margin-top: 0; padding-top: var(--space-4); background: var(--ground); }
  .rp-order-card { padding: var(--space-3); }
  .rp-fee { font-size: 22px; line-height: 28px; }
  .wk.rp-sel .wk-result, .wk.rp-sel .wk-result[data-state="empty"] { min-height: 0; }
}
@media (max-width: 767px) {
  .rp-boxes { grid-template-columns: 1fr; align-items: stretch; gap: var(--space-1); }
  .rp-box[data-step] { min-height: 0; flex-direction: row; justify-content: space-between; align-items: baseline; padding: var(--space-3) var(--space-3) var(--space-2); }
  .rp-step { top: 10px; }
  .rp-name { padding-top: var(--space-1); }
  .rp-fee { font-size: 22px; line-height: 28px; white-space: nowrap; }
  /* The table gives way to three stacked cards, each with only the rows that level includes. */
}
@media (max-width: 639px) {
  .rp-hero .p-hero-panel { padding-top: var(--space-4); padding-bottom: var(--space-5); }
  .rp-show { grid-template-columns: 1fr; gap: var(--space-2); }
  /* Phone: page 1 full width, the other four as a swipe row beneath it */
  .rp-show-rest { display: flex; gap: var(--space-2); margin: 0 calc(-1 * var(--margin)); padding: 0 var(--margin) var(--space-1); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--margin); }
  .rp-show-rest li { flex: 0 0 82vw; scroll-snap-align: start; }
  .rp-sample.rp-band-ink .rp-sample-foot .btn { width: 100%; }
  .rp-order-line { font-size: var(--body-size); line-height: var(--body-line); }
  .rp-order-card { margin: 0 calc(-1 * var(--margin)); padding: var(--space-3) var(--margin); }
  .rp-box[data-step] { flex-direction: column; align-items: flex-start; gap: 2px; }
  .rp-fee { font-size: 26px; line-height: 32px; }
  /* The answers stay two across on a phone, compact, so the question is one short block, not a long list. */
  .wk.rp-sel .wk-cards.rp-ten { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-1); }
  .wk.rp-sel .wk-cards.rp-ten .wk-card { min-height: 64px; padding: var(--space-1) var(--space-2); font-size: 15px; line-height: 20px; }
  .rp-card .rp-card-title { font-size: var(--heading-size); line-height: var(--heading-line); }
  .rp-card-actions { flex-direction: column; align-items: stretch; }
  .rp-card-actions .btn { width: 100%; }
  .rp-call-row { grid-template-columns: 1fr; }
}

/* 49: below this width the three-column table cannot sit comfortably (nothing touching, the button text on one line in
   equal cells), so the stacked cards phones already get take its place. Width chosen by the sweep in the Worker suite. */
@media (max-width: 899px) {
  .lv-table-wrap { display: none; }
  .lv-stack { display: block; }
}

/* ---------- 7. The sample pages open large (Instruction 49) ---------- */
.rp-page { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; font: inherit; color: inherit; }
.rp-page:focus-visible { outline: 2px solid var(--ground); outline-offset: 3px; }
.rp-page img { pointer-events: none; }
.rp-viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--ink); color: var(--ground); }
.rp-viewer::backdrop { background: var(--ink); }
.rp-viewer[open] { display: flex; flex-direction: column; }
.rp-viewer-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-1) var(--space-2); padding: var(--space-2) var(--margin); }
.rp-viewer-count { margin: 0; font-size: var(--body-size); line-height: 24px; color: var(--ground); }
.rp-viewer-ctrls { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.rp-viewer-ctrls .btn { height: 40px; padding: 0 var(--space-2); background: var(--ground); color: var(--ink); border-color: var(--ground); }
.rp-viewer-ctrls .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rp-viewer-stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 var(--space-2) var(--space-2); touch-action: pan-x pan-y pinch-zoom; }
/* The page whole, as large as the window allows: never cropped, so SAMPLE stays in view. */
.rp-viewer-img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; background: var(--ground); }
.rp-viewer-img[hidden] { display: none; }
@media (max-width: 639px) {
  .rp-viewer-bar { padding: var(--space-1) var(--margin); }
  .rp-viewer-ctrls { width: 100%; }
  .rp-viewer-ctrls .btn { flex: 1 1 0; padding: 0 var(--space-1); font-size: 15px; }
  .rp-viewer-stage { padding: 0 0 var(--space-1); align-items: center; }
}
