/* Built by us. The page opens on type and on the shelf where the finished things stand, then lists the six
   products in large names with their statuses. A row opens in place on a wide screen and comes up as the kit's
   sheet on a phone. Dusk is the only accent. */

/* ---------- motion shared with the other pages about things we built (page-built.js adds the classes) ---------- */
.is-rise { opacity: 0; translate: 0 22px; }
.is-rise.is-in { opacity: 1; translate: none; transition: opacity 0.6s var(--out) calc(var(--rise-i, 0) * 60ms), translate 0.7s var(--out) calc(var(--rise-i, 0) * 60ms); }

/* ---------- the top ---------- */
.lab-top { padding-bottom: clamp(28px, 4vw, 64px); }
.lab-head { display: grid; grid-template-columns: minmax(0, 8.6fr) minmax(0, 3.4fr); gap: clamp(24px, 4vw, 72px); align-items: start; }
.lab-head .k-display { font-size: clamp(38px, 5.3vw, 98px); line-height: 0.96; letter-spacing: -0.042em; }
.lab-head > .k-text { padding-top: clamp(26px, 2.6vw, 40px); max-width: 26em; }

/* The shelf. A wide low band on a desk, a taller one on a phone so all six models stay in it. */
.lab-shelf { --sq-r: clamp(18px, 1.6vw, 26px); --ar: 92 / 34; --fy: 0.5; margin-top: clamp(40px, 6.4vw, 104px); }
html:not(.js) .k-mark { display: none; }
.lab-pop-shot { --ar: 16 / 9; --sq-r: 10px; }
@media (prefers-reduced-motion: no-preference) {
  /* The band opens with a wipe from the left. */
  .lab-shelf { animation: lab-wipe 0.8s var(--out) 0.15s both; }
  @keyframes lab-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
  .lab-head .k-display { animation: lab-up 0.7s var(--out) both; }
  @keyframes lab-up { from { opacity: 0; translate: 0 18px; } }
}

/* ---------- the list ---------- */
.lab-list { --cols: minmax(0, 3.6fr) minmax(0, 5.4fr) minmax(0, 2fr) minmax(0, 1.9fr); }
.k-ledger.is-big .k-row.lab-row { align-items: center; padding-block: 0; scroll-margin-top: 84px; }
/* The name, the sentence and the status are one button laid on the row's first three columns. */
.lab-open { display: grid; grid-column: 1 / 4; grid-template-columns: subgrid; align-items: center; width: 100%; padding-block: clamp(18px, 1.9vw, 30px); text-align: left; font: inherit; color: inherit; }
.lab-row.is-plain .lab-open { grid-column: 1 / -1; }
.k-ledger.is-big .lab-open b { font-size: clamp(26px, 2.9vw, 54px); letter-spacing: -0.035em; text-wrap: balance; }
.lab-open small { color: var(--label); }
.k-ledger.is-big .lab-row.is-plain b { font-size: clamp(20px, 1.8vw, 30px); letter-spacing: -0.03em; }
.lab-url { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font: 400 12px/1.3 var(--mono); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.lab-url i { font-style: normal; transition: translate 0.4s var(--out); }
.lab-url:hover i { translate: 4px 0; }
.lab-row:has(> .lab-open:is(:hover, :focus-visible)), .lab-row:has(> .lab-url:hover) { background: var(--raise); margin-inline: -12px; padding-inline: 12px; }

/* An open row: three facts in the page's own words on the left, room for a real screen on the right. */
.lab-more { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 72px); align-items: stretch; margin-top: 0; padding-block: clamp(10px, 1.4vw, 22px) clamp(28px, 3vw, 48px); }
.lab-more[hidden] { display: none; }
.lab-more-words { --gap: clamp(20px, 2.2vw, 34px); justify-items: stretch; align-content: space-between; }
.lab-facts { --cols: 6.5em minmax(0, 1fr); --cols-s: 6.5em minmax(0, 1fr); --raise: var(--white); }
.k-ledger.is-big .lab-facts .k-row b { font-size: inherit; font-weight: 600; letter-spacing: 0; line-height: inherit; }
.k-ledger.is-big .lab-facts .k-row { padding-block: 12px; transition: background-color 0.2s; }
.lab-facts .k-row:hover { background: var(--raise); margin-inline: -12px; padding-inline: 12px; color: var(--ink); }
.lab-close { color: var(--stone); cursor: pointer; }
.lab-shot { --ar: 16 / 10; --sq-r: clamp(16px, 1.5vw, 24px); background: var(--white); }
html:not(.js) :is(.lab-shot, .lab-close) { display: none; }
html:not(.js) .lab-more { grid-template-columns: minmax(0, 1fr); max-width: 44em; }
@media (prefers-reduced-motion: no-preference) {
  .js .lab-more:not([hidden]) { animation: lab-open 0.42s var(--out) both; }
  @keyframes lab-open { from { opacity: 0; translate: 0 -10px; } }
}

/* The picture that follows the pointer down the list: each product's own model, cut from the shelf. */
.lab-float { --sq-r: 16px; --sq-fill: var(--white); --sq-shadow: var(--lift); position: fixed; left: 0; top: 0; z-index: 200; padding: 7px; rotate: -2deg; opacity: 0; visibility: hidden; pointer-events: none; transition: translate 0.28s var(--out), opacity 0.2s, visibility 0s 0.2s; }
.lab-float.is-on { opacity: 1; visibility: visible; transition: translate 0.28s var(--out), opacity 0.2s, visibility 0s; }
.lab-float > i { --sq-r: 10px; display: block; width: clamp(150px, 13vw, 210px); aspect-ratio: 4 / 5; background: var(--table) url("pic/p-shelf.jpg") var(--at, 50% 41.4%) / 526% auto no-repeat; }

/* ---------- narrower ---------- */
@media (max-width: 1099px) {
  .lab-list { --cols: minmax(0, 3.6fr) minmax(0, 5fr) minmax(0, 2.4fr); }
  .lab-open { grid-column: 1 / -1; }
  .lab-url { grid-column: 3 / -1; margin-top: -14px; padding-bottom: 6px; }
}
@media (max-width: 899px) {
  .lab-head { grid-template-columns: minmax(0, 1fr); }
  .lab-head > .k-text { padding-top: 0; max-width: 34em; }
  .lab-more { grid-template-columns: minmax(0, 1fr); }
}

/* A phone. The row is a name and its status. The sentence, the link and the screen are in the sheet a tap raises.
   With script off the sentence stays in the row and the facts sit under it. */
@media (max-width: 699px) {
  .lab-head .k-display { font-size: clamp(30px, 9vw, 44px); line-height: 1; }
  .lab-shelf { --ar: 390 / 216; width: 100vw; margin-inline: calc(var(--m) * -1); -webkit-mask-image: none; mask-image: none; }
  .lab-list { --cols: minmax(0, 1fr) auto; }
  .lab-open { grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; row-gap: 4px; min-height: 60px; padding-block: 14px; }
  .k-ledger.is-big .lab-open b, .k-ledger.is-big .lab-row.is-plain b { font-size: 21px; letter-spacing: -0.03em; }
  .lab-open span { grid-area: 2 / 1 / 3 / -1; }
  .lab-open small { max-width: 14em; }
  .k-ledger.is-big .lab-facts .k-row { grid-template-columns: 6.5em minmax(0, 1fr); }
  .js .lab-row:not(.is-plain) .lab-open span, .js .lab-url { display: none; }
  .lab-url { grid-column: 1 / -1; margin-top: -6px; }
}

@media (prefers-reduced-motion: reduce) {
  .lab-float, .lab-url i, .lab-facts .k-row { transition-duration: 0.01s; }
}
