/*
 * Public product and department pages (issue #551), loaded after landing.css. One column on a phone; on a wide
 * screen the department grid gets three columns with the ad beside it, and the product's details sit beside the
 * chain prices. Server-rendered, no JavaScript.
 */
:root {
  /* Tokens by role (issue #518): a price that fell is the deal green, the chart's step line the muted ink. */
  --good: var(--deal-text);
  --good-tint: var(--deal-bg);
  --chart-line: var(--muted);
}
article.page.catalogue {
  max-width: 1200px;
  margin-inline: auto;
}
.catalogue h1 {
  font-size: var(--text-display-size);
  line-height: 1.25;
}
.catalogue .meta {
  color: var(--muted);
  font-size: var(--text-button-size);
}
.crumbs ol {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  font-size: var(--text-secondary-size);
  color: var(--muted);
}
.crumbs li + li::before {
  content: '›';
  margin-inline-end: 6px;
}
.crumbs a {
  color: inherit;
}
/* Department index: a plain list of departments. */
.catalogue-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.catalogue-list li {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.catalogue-list a {
  font-weight: var(--text-button-weight);
}
/* Department page: one card per product, 1 to 3 columns, the ad in a side column on a wide screen. */
.product-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.product-card {
  display: grid;
  align-content: start;
  gap: 2px;
  height: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-button);
  text-decoration: none;
}
.product-card b {
  font-size: var(--text-body-size);
}
.product-card .foot {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 2px;
}
.product-card .price {
  white-space: nowrap;
  color: var(--ink);
  font-size: var(--text-row-title-size);
  font-weight: var(--text-title-card-weight);
}
.product-card .unit {
  white-space: nowrap;
  font-size: var(--text-caption-size);
  color: var(--muted);
}
.product-card:hover {
  border-color: var(--brand);
}
.with-side {
  display: grid;
  gap: 24px;
}
/* Product page (owner design 2026-11-08): the cheapest-today card with one chart, then a plain chain list. */
.pv-page h1 {
  margin: 0 0 12px;
  font-size: var(--text-title-page-size);
  line-height: 1.25;
  font-weight: var(--text-title-card-weight);
}
.pv-page .meta {
  margin: -6px 0 12px;
}
.pv-hero {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 16px 16px 12px;
  background: var(--paper);
}
.pv-lbl {
  margin: 0;
  font-size: var(--text-secondary-size);
  color: var(--muted);
}
.pv-big {
  display: flex;
  /* The chain moves under the price when both no longer fit one line (200% text, #1466). */
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin: 2px 0 0;
}
.pv-big b {
  font-size: var(--text-hero-size);
  line-height: 1.1;
  font-weight: var(--text-button-weight);
  color: var(--ink);
}
.pv-big > span {
  font-size: var(--text-row-title-size);
  font-weight: var(--text-button-weight);
  color: var(--good);
}
.pv-sub {
  margin: 4px 0 0;
  font-size: var(--text-secondary-size);
  color: var(--muted);
}
.pv-sub a {
  color: inherit;
}
.pv-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 8px 0 0;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--good-tint);
  color: var(--good);
  font-size: var(--text-secondary-size);
  font-weight: var(--text-button-weight);
}
.pv-delta.pv-up {
  background: var(--warning-bg);
  color: var(--warning-text);
}
.pv-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* The one chart: the cheapest price per day as a step line over a soft area, a blue dot on today. */
.pv-chart {
  position: relative;
  margin-top: 14px;
}
.pv-plot,
.pv-dots {
  display: block;
  width: 100%;
  height: 72px;
}
.pv-dots {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
}
.pv-area {
  fill: var(--canvas);
}
.pv-line {
  stroke: var(--chart-line);
}
.pv-dot {
  fill: var(--brand);
  stroke: var(--paper);
}
.pv-ax {
  display: flex;
  justify-content: space-between;
  margin: 4px 0 0;
  font-size: var(--text-caption-size);
  color: var(--muted);
}
.pv-page .btn.add {
  width: 100%;
  min-height: 52px;
  margin-top: 16px;
  justify-content: center;
  gap: 8px;
}
.pv-page .pv-list {
  margin-top: 28px;
}
.pv-list h2 {
  margin: 0 0 4px;
  font-size: var(--text-title-card-size);
  font-weight: var(--text-title-card-weight);
  color: var(--ink);
}
.pv-list ul,
.pv-deals ul,
.pv-fam ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.pv-list li,
.pv-deals li,
.pv-fam li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-row-title-size);
}
.pv-list li b,
.pv-deals li b,
.pv-fam li .pv-p b {
  font-weight: var(--text-button-weight);
  white-space: nowrap;
}
.pv-list li.pv-best b {
  color: var(--good);
}
.pv-list li .pv-c,
.pv-list li .pv-p,
.pv-deals li .pv-c,
.pv-deals li .pv-p,
.pv-fam li .pv-c,
.pv-fam li .pv-p {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}
.pv-list li .pv-p,
.pv-deals li .pv-p,
.pv-fam li .pv-p {
  align-items: flex-end;
}
.pv-list li small,
.pv-deals li small,
.pv-fam li small {
  font-size: var(--text-secondary-size);
  font-weight: var(--text-secondary-weight);
  color: var(--muted);
}
.pv-list .note {
  margin: 12px 0 0;
  font-size: var(--text-secondary-size);
  color: var(--muted);
}
.pv-flat {
  margin-top: 12px;
  font-size: var(--text-body-size);
  color: var(--muted);
}
.pv-page .pv-deals,
.pv-page .pv-facts,
.pv-page .pv-fam,
.pv-page .pv-similar {
  margin-top: 28px;
}
.pv-deals h2,
.pv-facts h2,
.pv-fam h2,
.pv-similar h2 {
  margin: 0 0 4px;
  font-size: var(--text-title-card-size);
  font-weight: var(--text-title-card-weight);
  color: var(--ink);
}
.pv-facts dl {
  margin: 0;
}
.pv-facts dl div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
}
.pv-facts dt {
  color: var(--muted);
}
.pv-facts dd {
  margin: 0;
  font-weight: var(--text-button-weight);
  text-align: end;
}
.pv-deals li,
.pv-fam li {
  gap: 12px;
}
.pv-fam li.pv-self {
  margin-inline: -8px;
  padding-inline: 8px;
  border-radius: var(--radius-slot);
  background: var(--brand-tint-2);
}
.pv-fam li a {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  color: var(--ink);
  font-weight: var(--text-body-weight);
  text-decoration: none;
}
.pv-deals li .pv-p,
.pv-fam li .pv-p {
  flex-shrink: 0;
  white-space: nowrap;
}
/* The deals past the first five, behind a native toggle (design PUB-8 follow-up): a full tap target, no script. */
.pv-deals summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  font-size: var(--text-row-title-size);
  font-weight: var(--text-button-weight);
  color: var(--brand);
  cursor: pointer;
  list-style: none;
}
.pv-deals summary::-webkit-details-marker {
  display: none;
}
.pv-fam li.pv-self .pv-c > span {
  font-weight: var(--text-button-weight);
}
.pv-similar .product-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pv-grid > .ad-slot {
  margin: 28px 0 0;
}
.amount {
  font-variant-numeric: tabular-nums;
  unicode-bidi: isolate;
}
.catalogue .back,
.department > p:last-child {
  margin-top: 20px;
}
/* The way back to the department is a touch target of its own: 48px high like the other page links. */
.catalogue .back a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
}
/* Department pager: every page of a department is one tap away from its neighbours. */
.pager {
  margin-top: 20px;
}
.pager ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pager a,
.pager span[aria-current] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-slot);
}
.pager span[aria-current] {
  font-weight: var(--text-button-weight);
  border-color: currentColor;
}
.pager .gap {
  align-self: center;
  color: var(--muted);
}
/* The label row grows with the text (1.1875rem, 19px at the default), and the reserved height grows with it (#1503). */
.ad-slot {
  --ad-label-row: 1.1875rem;
  box-sizing: border-box;
  min-height: calc(250px - 19px + var(--ad-label-row));
  margin: 20px 0;
  padding: 12px 15px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--paper);
}
.ad-label {
  margin: 0 0 4px;
  height: 1.1875rem;
  font-size: var(--text-caption-size);
  font-weight: var(--text-title-card-weight);
  line-height: 1.2rem;
  color: var(--muted);
}
/* Design frame AD-7: the app's tokens (--line, --paper, --muted, --canvas). */
.ad-slot ins.adsbygoogle {
  display: block;
  min-height: 200px;
  border-radius: var(--radius-slot);
  background: var(--canvas);
}
/* Department list on a phone: one slim 320 x 50 bar inside the list, the side ad hidden. */
.product-grid > .ad-bar {
  grid-column: 1 / -1;
  min-height: 0;
  margin: 0;
  padding: 8px 12px;
  border-radius: var(--radius-button);
}
.ad-bar ins.adsbygoogle {
  min-height: 0;
  height: 50px;
  max-width: 320px;
  margin-inline: auto;
}
@media (max-width: 1023px) {
  .with-side > aside.ad-slot {
    display: none;
  }
}
@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .product-grid > .ad-bar {
    display: none;
  }
  .with-side {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
  }
  .with-side > .ad-slot {
    margin-top: 0;
    position: sticky;
    top: 16px;
  }
  /* Desktop side ad: 300 x 600 (design v272, frame PUB-6). */
  .with-side > .ad-slot ins.adsbygoogle {
    min-height: 600px;
  }
  .pv-grid {
    display: grid;
    grid-template-columns: 360px minmax(0, 440px);
    gap: 32px;
    align-items: start;
    justify-content: start;
  }
  /* Three columns need 360 + 300 + two gaps + a list of 360 or more inside the gutter: from 1250px; below, the ad sits under the list. */
  /* The article takes the whole width, so its padding is the header's gutter and the crumbs line up with the logo. */
  article.page.catalogue.pv-page {
    max-width: none;
    margin-inline: 0;
  }
  .pv-page .pv-list {
    margin-top: 0;
  }
  .pv-grid > .ad-slot {
    grid-column: 2;
    margin: 28px 0 0;
  }
}
@media (min-width: 1250px) {
  /* The third column exists only when the ad slot is rendered, so a page without ads is not squeezed. */
  .pv-grid.pv-with-ad {
    grid-template-columns: 360px minmax(0, 440px) 300px;
  }
  .pv-grid > .ad-slot {
    grid-column: auto;
    min-height: calc(600px - 19px + var(--ad-label-row));
    margin: 0;
    position: sticky;
    top: 16px;
  }
  .pv-grid > .ad-slot ins.adsbygoogle {
    min-height: 550px;
  }
}
@media (pointer: coarse) {
  .crumbs a {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
  }
}
@media (prefers-contrast: more) {
  :root {
    --good: var(--success);
  }
  .product-card,
  .pv-hero {
    border-color: var(--ink);
  }
}
@media (forced-colors: active) {
  .product-card,
  .pv-hero {
    border: 1px solid CanvasText;
  }
  .pv-line {
    stroke: CanvasText;
  }
  .pv-dot {
    fill: Highlight;
  }
}

/*
 * Monthly price report (issue #666, designer frames RPT-1 to RPT-5): the question, two tiles, one table of chains,
 * the moves of the month and the ad. One column on a phone; on a wide screen the tiles and the moves sit in a left
 * column, the table in the middle and the ad pinned on the side. Server-rendered, no JavaScript.
 */
.rp h1 {
  margin: 0 0 12px;
  font-size: var(--text-title-page-size);
  line-height: 1.25;
  font-weight: var(--text-title-card-weight);
  text-wrap: balance;
}
.rp-kpi {
  display: grid;
  /* Two tiles side by side; at a large text size, when one no longer fits half the row, they stack (#1466). */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
  gap: 10px;
}
.rp-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 14px 14px 12px;
  background: var(--paper);
}
.rp-tile p {
  margin: 0;
}
.rp-tile .l {
  font-size: var(--text-secondary-size);
  color: var(--muted);
}
.rp-tile .v {
  margin-top: 2px;
  font-size: var(--text-display-size);
  line-height: 1.15;
  font-weight: var(--text-button-weight);
  color: var(--ink);
}
.rp-tile .w {
  margin-top: 2px;
  font-size: var(--text-body-size);
  font-weight: var(--text-button-weight);
  color: var(--ink);
}
.rp-tile .w.good {
  color: var(--good);
}
.rp-sub {
  text-wrap: balance;
  margin: 10px 0 0;
  font-size: var(--text-secondary-size);
  color: var(--muted);
}
.rp-sub a {
  color: inherit;
}
.rp-sec {
  margin-top: 28px;
}
.rp-sec h2 {
  margin: 0 0 4px;
  font-size: var(--text-title-card-size);
  font-weight: var(--text-title-card-weight);
  color: var(--ink);
}
.rp-sec table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-row-title-size);
}
.rp-sec caption {
  text-align: start;
  margin: 0 0 4px;
  font-size: var(--text-title-card-size);
  font-weight: var(--text-title-card-weight);
  color: var(--ink);
}
.rp-sec th,
.rp-sec td {
  height: 52px;
  border-bottom: 1px solid var(--line);
  padding: 0;
  text-align: start;
  font-weight: var(--text-secondary-weight);
}
.rp-sec td.n {
  width: 96px;
  text-align: end;
  font-weight: var(--text-button-weight);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rp-sec tr.best th,
.rp-sec tr.best td.n {
  color: var(--good);
}
.rp-sec tr.miss th,
.rp-sec tr.miss td.n {
  color: var(--muted);
  font-weight: var(--text-body-weight);
}
/* The last row's cell holds words, not an amount. It stays on one line while the table has room; in a table narrower
   than 19 of its own em (320px at 400% zoom, any phone at 200% text) it wraps rather than widen the page (#1466). */
.rp-sec {
  container-type: inline-size;
}
@container (max-width: 19em) {
  .rp-sec tr.miss td.n {
    white-space: normal;
  }
}
.rp-sec th {
  /* A long chain or region name breaks inside the cell rather than widening the table at a large text size (#1466). */
  overflow-wrap: anywhere;
}
.rp-sec th .rg {
  display: block;
  font-size: var(--text-secondary-size);
  font-weight: var(--text-secondary-weight);
  color: var(--muted);
}
.rp-sec th:has(.rg),
.rp-sec tr:has(.rg) td {
  height: 60px;
}
.rp-quiet {
  text-wrap: balance;
  margin: 12px 0 0;
  font-size: var(--text-body-size);
  color: var(--muted);
}
.rp-mv ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.rp-mv li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  border-bottom: 1px solid var(--line);
}
.rp-mv li b {
  display: block;
  font-size: var(--text-row-title-size);
  font-weight: var(--text-body-weight);
  color: var(--ink);
}
.rp-mv li span.m {
  display: block;
  font-size: var(--text-secondary-size);
  color: var(--muted);
}
.rp-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: var(--text-secondary-size);
  font-weight: var(--text-button-weight);
  font-variant-numeric: tabular-nums;
}
.rp-pill.up {
  background: var(--warning-bg);
  color: var(--warning-text);
}
.rp-pill.down {
  background: var(--good-tint);
  color: var(--good);
}
.rp .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.rp details {
  margin-top: 12px;
  border-bottom: 1px solid var(--line);
}
.rp summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  font-size: var(--text-row-title-size);
  font-weight: var(--text-button-weight);
  color: var(--brand);
  cursor: pointer;
  list-style: none;
}
.rp summary::-webkit-details-marker {
  display: none;
}
.rp details ul {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 16px;
  font-size: var(--text-button-size);
  color: var(--neutral-text);
}
.rp details li {
  line-height: 2;
}
.rp .ad-slot {
  margin: 28px 0 0;
}
/* The unit stays inside its card: a responsive unit sets its own width and margin before it fills or collapses. */
.rp .ad-slot ins.adsbygoogle {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100%;
  margin-inline: 0 !important;
}
.rp-idx > ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.rp-idx > ul li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: var(--text-row-title-size);
}
.rp-idx > ul li a span {
  color: var(--muted);
  font-size: var(--text-button-size);
}
.rp-idx > ul li a b {
  font-weight: var(--text-button-weight);
}
@media (min-width: 1024px) {
  .rp-grid {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    grid-template-areas:
      'head main'
      'moves main';
    grid-template-rows: auto 1fr;
    column-gap: 40px;
    align-items: start;
  }
  .rp-head {
    grid-area: head;
  }
  .rp-main {
    grid-area: main;
    margin-top: 0;
  }
  .rp-mv {
    grid-area: moves;
  }
}
/* The ad's column comes only where the table keeps room for a chain's name and range on one line each (as .pv-grid);
   below, the ad sits under the moves in the first column. */
@media (min-width: 1250px) {
  .rp-grid.rp-with-ad {
    grid-template-columns: 340px minmax(0, 1fr) 300px;
    grid-template-areas:
      'head main ad'
      'moves main ad';
  }
  .rp-grid > .ad-slot {
    grid-area: ad;
    margin: 0;
    position: sticky;
    top: 16px;
  }
  .rp-grid > .ad-slot ins.adsbygoogle {
    min-height: 600px;
  }
}
@media (forced-colors: active) {
  .rp-tile,
  .rp-pill {
    border: 1px solid CanvasText;
  }
}
@media (prefers-contrast: more) {
  .rp-tile {
    border-color: var(--ink);
  }
}
/* Owner rule AD-0: a slot draws no box, border, label or height until an ad filled it (page-ads.js sets data-filled). The
   default is collapsed, so a blocked script, no JavaScript or a slot still asking show nothing. Last in the file so it wins over
   the page-specific slot sizes above. */
.ad-slot:not([data-filled]) {
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
/* The phone bar is a fixed 50px unit that AdSense sizes from the unit itself, so it keeps its size and is clipped, not shrunk. */
.ad-bar:not([data-filled]) {
  height: 0;
  overflow: hidden;
}
.ad-slot:not([data-filled]) .ad-label {
  display: none;
}
.ad-slot:not([data-filled]) ins.adsbygoogle {
  min-height: 0;
  background: transparent;
}
