/* The product page: everything beyond site.css, in the order the page is read. */

/* The study runs taller on desktop than on the other pages. */
@media (min-width: 56em) {
  .burs { --height-of-the-bench-crop: 46vh; }
}
/* On wide windows the price panel takes the door area four columns wide, so price and sentence sit side by side. */
@media (min-width: 72em) {
  .burs {
    grid-template-areas:
      ". . . . . bench ."
      ". . words words . bench ."
      ". door door door door . .";
  }
}
/* On phones the figure dissolves into the stair: the picture stays on top, the name and the price follow,
   and the caption comes after the price panel on the picture's own left edge. */
@media (max-width: 55.99em) {
  .burs { grid-template-areas: "bench" "words" "door" "note"; }
  .burs > .burb { display: contents; }
  .burs > .burb > img,
  .burs > .burb > .burtr {
    grid-area: bench; align-self: start;
    width: calc(100% - 19vw);
    margin: 0 3vw 0 16vw;
  }
  .burs > .burb > .burn {
    grid-area: note; display: block;
    margin: 0 3vw 0 16vw;
  }
}

/* burtr: the button the script puts round the study so that pressing it opens it large. */
.burtr {
  display: block; width: 100%;
  margin: 0; padding: 0; border: 0; background: none;
  font: inherit; color: inherit; cursor: zoom-in;
}

/* burkd: the kind - what the thing is in plain words, under the h1 in the same panel. */
.burkd { font-size: 1.125rem; margin: 0; }
.burs > .burp .burh { overflow-wrap: break-word; margin-bottom: 0.3em; }

/* burpf: the price panel, its areas asking, price, saying and caveat. */
.burpf {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "asking" "price" "saying" "caveat";
  column-gap: 1.5rem;
}
/* burlp: the words over the price - listed price. */
.burlp { grid-area: asking; margin: 0 0 0.2rem; font-size: var(--size-of-the-small-text); }
/* burpn: the listed price, Barlow Condensed Black, about 120 px on desktop. */
.burpn {
  grid-area: price; margin: 0;
  font-family: var(--face-of-the-headlines); font-weight: 900;
  font-size: clamp(4.5rem, 2rem + 8vw, 7.5rem);
  line-height: 0.9;
}
/* burcl: the say-it line, written as the call itself; the product name in heavy type. */
.burcl { grid-area: saying; align-self: center; margin: 1rem 0 0; font-size: 1.25rem; line-height: 1.4; }
.burcl a { display: inline-block; padding: 0.5rem 0; }
.burcl strong {
  font-family: var(--face-of-the-headlines); font-weight: 900;
  font-size: 1.5em; line-height: 1;
}
/* burno: the note that the price and availability can change. */
.burno { grid-area: caveat; margin: 1rem 0 0; font-size: var(--size-of-the-small-text); }
@media (min-width: 72em) {
  .burpf {
    grid-template-columns: auto minmax(12rem, 1fr);
    grid-template-areas: "asking asking" "price saying" "caveat caveat";
  }
  .burcl { margin-top: 0; }
}

/* burtx: the lead panel's inside, its areas heading, opener and rest; burlh the lead set large; burbd the body paragraphs.
   The two columns share the whole panel: nothing inside is held to a measure, so the text runs to the panel edge. */
.burtx {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "heading" "opener" "rest";
  justify-items: stretch;
  column-gap: 2rem; row-gap: 0.5rem;
}
.burtx h2 { grid-area: heading; font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); }
.burlh { grid-area: opener; font-size: 1.25rem; line-height: 1.5; width: 100%; max-width: none; }
.burbd { grid-area: rest; width: 100%; max-width: none; }
.burbd p { max-width: none; }
@media (min-width: 56em) {
  .burtx {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-areas: "heading heading" "opener rest";
  }
  .burlh { font-size: 1.4rem; }
}

/* burld: the ledger - a heading panel, then flat lines; burle is one line, term and detail. */
.burld { display: grid; gap: 0.25rem; }
.burld > .burp { width: fit-content; max-width: 100%; margin-bottom: 0.5rem; }
.burld h2 { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); margin: 0; }
.burld dl { margin: 0; display: grid; gap: 0.25rem; }
.burle {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "term" "detail";
  padding: 0.75rem var(--space-inside-a-panel);
  background: var(--colour-of-the-panels);
}
.burle dt {
  grid-area: term;
  font-family: var(--face-of-the-headlines); font-weight: 900;
  font-size: 1.5rem; line-height: 1.1;
}
.burle dd { grid-area: detail; margin: 0; }
@media (min-width: 56em) {
  .burld[data-burr] { margin-right: 4vw; }
  .burle {
    grid-template-columns: 15rem minmax(0, 1fr);
    grid-template-areas: "term detail";
    align-items: baseline; column-gap: 1.5rem;
  }
}

/* burhd: the hand-off - three text links, each a pale panel on its own stair edge; burhs is one of them. */
.burhd { display: grid; gap: var(--space-between-blocks); justify-items: start; }
.burhd::before {
  content: "";
  width: var(--length-of-the-bar); height: var(--thickness-of-the-bar);
  background: var(--colour-of-the-sunflower);
}
.js .burhd.bure:not(.arrived)::before { background: var(--colour-of-the-dots); }
.burhs {
  margin: 0; max-width: 100%;
  background: var(--colour-of-the-panels);
  font-size: 1.25rem; line-height: 1.3;
}
.burhs a { display: inline-block; padding: 0.75rem var(--space-inside-a-panel); min-height: 2.75rem; }
.burhs:nth-child(2) { margin-left: 4vw; }
.burhs:nth-child(3) { margin-left: 8vw; }
@media (min-width: 56em) {
  .burhs:nth-child(2) { margin-left: 8vw; }
  .burhs:nth-child(3) { margin-left: 16vw; }
}

/* burmo: the leading-on - a heading panel, then three steps of the stair, one under another, each with its own
   left edge and its own width; burmc one linked picture with its caption; burmn the caption; burmp its price. */
.burmo {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "first" "second" "third";
  gap: var(--space-between-blocks);
  align-items: start;
}
.burmo > .burp { grid-area: head; justify-self: start; max-width: 100%; margin-bottom: 0.5rem; }
.burmo h2 { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); margin: 0; }
.burmc { display: block; text-decoration: none; justify-self: start; }
.burmc:hover, .burmc:focus-visible { background-color: transparent; }
.burmc:nth-of-type(1) { grid-area: first; width: 86%; }
.burmc:nth-of-type(2) { grid-area: second; margin-left: 22%; width: 78%; }
.burmc:nth-of-type(3) { grid-area: third; margin-left: 7%; width: 80%; }
.burmc img { width: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.burmc:nth-of-type(2) img { aspect-ratio: 1 / 1; }
.burmc:nth-of-type(3) img { aspect-ratio: 3 / 2; }
.burmn {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.75rem 1rem;
  background: var(--colour-of-the-panels);
  transition: background-color var(--time-of-a-hover) linear;
}
.burmc:hover .burmn, .burmc:focus-visible .burmn { background: var(--colour-of-the-sunflower); }
.burmn h3 { margin: 0; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.burmp { font-family: var(--face-of-the-headlines); font-weight: 900; font-size: 1.75rem; line-height: 1; }
@media (min-width: 56em) {
  .burmc:nth-of-type(1) { width: 54%; }
  .burmc:nth-of-type(2) { margin-left: 42%; width: 40%; }
  .burmc:nth-of-type(3) { margin-left: 16%; width: 62%; }
}

/* burdg: the dialog the script builds - a pale sheet on the left stair; burdf its foot; burdx the close control. */
.burdg {
  margin: 4vh 0 0 6vw; padding: 0; border: 0;
  max-width: 88vw; max-height: 92vh; overflow: auto;
  background: var(--colour-of-the-panels); color: var(--colour-of-the-ink);
}
.burdg::backdrop { background: rgba(20, 35, 15, 0.88); }
.burdg img { width: min(88vw, 70rem); height: auto; max-height: 72vh; object-fit: contain; }
.burdf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding: 0.5rem 0.75rem 0.5rem 1rem; }
.burdf p { margin: 0; flex: 1 1 14rem; font-size: var(--size-of-the-small-text); }
.burdx { background: var(--colour-of-the-page); }
