/*
  The new-deck kit's standard slides (engine v2.3, #5900): the title, Thank You, and Questions slides
  every kit deck starts with, styled once here instead of in each deck's talk.css, because per-deck
  copies drift. Loaded after layout.css and before the deck's talk.css (so a deck rule still wins),
  by kit decks only: the classes are kit-* names no delivered deck uses, so no delivered deck's render
  changes. Theme tokens only (--t-*); sizes in the stage unit --u, the smaller of 1vw and 1.7778vh, so a
  slide keeps its proportions on a wide or a tall screen. The compositions are the delivered decks'
  (the 2026-10-28 deck's title, close, and questions slides, which its review settled). The engine
  holds no talk's words (verify-talk-engine check 7), so these comments name no talk.

  The objects these rules expect (scripts/talks/deck-kit/data/objects.json, checked by
  new-deck-v1.mjs --verify):
    title       a group .kit-title-stage holding a qr .follow (any other item fills the right column)
    thanks      a group .kit-thanks-card: a group .kit-who (an image .kit-avatar with the name as its
                credit and the role as its tag; the profile's credit line as the group's credit) and
                a qr .close
    questions   a group .kit-qa: a table .qlist (a header row, then number, question, answer) and a
                qr .links
  A scan code's own SVG carries its white quiet zone, so the codes here draw no card behind it.
*/

.scene-spine.layout-kit-title,
.scene-spine.layout-kit-thanks,
.scene-spine.layout-kit-questions {
  --u: min(1vw, 1.7778vh);
}

/* the caption under or beside a code: an accent first line, then the address in the mono face */
.scene-spine[class*="layout-kit-"] .object-qr > .credit {
  margin: 0;
  padding: 0;
  white-space: pre-line;
  font: 500 clamp(11px, calc(var(--u) * 0.76), 15px) / 1.45 var(--t-mono);
  color: var(--t-text-secondary);
}
/* a caption with a heading line (the title and Thank You codes; the Questions code is an address only) */
.scene-spine[class*="layout-kit-"] .object-qr.follow > .credit::first-line,
.scene-spine[class*="layout-kit-"] .object-qr.close > .credit::first-line {
  font: 800 clamp(14px, calc(var(--u) * 1.1), 22px) / 1.3 var(--t-font);
  color: var(--t-accent);
}
.scene-spine[class*="layout-kit-"] .object-qr > figcaption.credit > a,
.scene-spine[class*="layout-kit-"] .object-qr > figcaption.credit > a:hover {
  color: inherit;
  text-decoration: none;
  border-bottom: 0;
}
.scene-spine[class*="layout-kit-"] .object-qr img {
  padding: 0;
  background: none;
  border-radius: calc(var(--u) * 0.7);
  border: 3px solid var(--t-accent);
  box-shadow:
    0 0 0 6px rgba(var(--t-accent-rgb), 0.16),
    0 18px 40px rgba(var(--t-shadow-rgb), 0.35);
}
/* a code draws no frame, so its figure clips nothing: the engine's .object clip (for a framed object's
   rounded corners) cut the ink of a caption line's first glyph and the code's shadow */
.scene-spine[class*="layout-kit-"] .object-qr {
  overflow: visible;
}

/* ── the title: the talk's name on the left; the links page's code in the slide's bottom-right
   corner beside the stamp, its caption to its left ── */
.scene-spine.layout-kit-title .object-group.kit-title-stage {
  display: contents;
}
.scene-spine.layout-kit-title .two {
  /* the engine makes .two a positioning context; the code anchors to the slide's own corner */
  position: static;
}
@media (min-width: 761px) {
  /* the title column takes its words' width, up to the whole row (the delivered titles' rule), so a
     title that fits one line is never wrapped by the engine's 1.1fr/0.9fr spine split (B's L1) */
  .scene-spine.layout-kit-title .two {
    grid-template-columns: fit-content(100%) minmax(0, 1fr);
  }
}
.scene-spine.layout-kit-title
  .object-group.kit-title-stage
  > .object-qr.follow {
  position: absolute;
  right: var(--pad);
  bottom: 24px;
  z-index: 2;
  display: grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 16px;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
html.is-stage
  .scene-spine.layout-kit-title
  .object-group.kit-title-stage
  > .object-qr.follow {
  /* on the stage the corner stays a tap zone; the code is for the room's cameras */
  pointer-events: none;
}
.scene-spine.layout-kit-title
  .object-group.kit-title-stage
  > .object-qr.follow
  img {
  width: clamp(120px, calc(var(--u) * 8.6), 180px);
}
.scene-spine.layout-kit-title
  .object-group.kit-title-stage
  > .object-qr.follow
  > .credit {
  order: -1;
  max-width: clamp(240px, calc(var(--u) * 19.5), 400px);
  text-align: right;
}
.scene-spine.layout-kit-title .statement {
  font-size: clamp(44px, calc(var(--u) * 6.2), 128px);
}
@media (max-width: 760px) {
  html:not(.is-stage)
    .scene-spine.layout-kit-title
    .object-group.kit-title-stage
    > .object-qr.follow {
    position: static;
    grid-auto-flow: row;
    justify-self: start;
    margin-top: 18px;
  }
  html:not(.is-stage)
    .scene-spine.layout-kit-title
    .object-group.kit-title-stage
    > .object-qr.follow
    > .credit {
    order: 0;
    text-align: left;
  }
}

/* ── Thank You: the heading, then the speaker's pill and the credit line under it; the links page's
   large code on the right (L56: at least 240 px at 1920x1080, aiming for 360). On a wide screen the
   groups give way (display: contents) so their parts sit on one grid: the credit line and the code's
   caption share the last row and so one top edge (L8: captions in one row start together). ── */
.scene-spine.layout-kit-thanks .object-group.kit-thanks-card,
.scene-spine.layout-kit-thanks .object-group.kit-who {
  display: contents;
}
/* the pill: the photo, the name (the image's credit), and the role (its tag) */
.scene-spine.layout-kit-thanks .object.kit-avatar {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0.55em 1.3em 0.55em 0.55em;
  border-radius: 999px;
  border: 1px solid var(--t-line-strong);
  background: rgba(var(--t-surface-rgb), 0.72);
  font-size: clamp(15px, calc(var(--u) * 1.25), 26px);
}
.scene-spine.layout-kit-thanks .object.kit-avatar img {
  flex: none;
  width: 3.6em;
  height: 3.6em;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--t-line-strong);
}
.scene-spine.layout-kit-thanks .object.kit-avatar .credit {
  order: 2;
  margin: 0 0 0 0.7em;
  padding: 0;
  white-space: nowrap;
  font: 800 1.6em / 1 var(--t-font-display, var(--t-font));
  letter-spacing: -0.02em;
  color: var(--t-text);
}
.scene-spine.layout-kit-thanks .object.kit-avatar .tag {
  order: 3;
  position: static;
  display: flex;
  align-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  white-space: nowrap;
  font: 600 1em / 1 var(--t-font);
  letter-spacing: 0;
  text-transform: none;
  color: var(--t-accent);
}
.scene-spine.layout-kit-thanks .object.kit-avatar .tag::before {
  /* the small dot between the name and the role */
  content: "";
  flex: none;
  width: 0.3em;
  height: 0.3em;
  margin: 0 0.75em;
  border-radius: 50%;
  background: var(--t-muted);
}
/* the profile's credit line (the speaker group's credit) */
.scene-spine.layout-kit-thanks .object-group.kit-who > figcaption.credit {
  margin: 0;
  padding: 0 0 0 1.3em;
  font: 500 clamp(12px, calc(var(--u) * 0.85), 17px) / 1.3 var(--t-mono);
  color: var(--t-text-secondary);
}
.scene-spine.layout-kit-thanks .object-qr.close {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  gap: calc(var(--u) * 1);
}
.scene-spine.layout-kit-thanks .object-qr.close img {
  width: clamp(240px, calc(var(--u) * 18.75), 400px);
}
@media (min-width: 761px) {
  .scene-spine.layout-kit-thanks .two {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "text   code"
      "who    code"
      "credit caption";
    grid-template-rows: auto auto auto;
    align-content: center;
    column-gap: calc(var(--u) * 6);
    row-gap: calc(var(--u) * 1.4);
  }
  .scene-spine.layout-kit-thanks .text {
    grid-area: text;
    align-self: end;
  }
  .scene-spine.layout-kit-thanks .object.kit-avatar {
    grid-area: who;
    align-self: end;
  }
  .scene-spine.layout-kit-thanks .object-group.kit-who > figcaption.credit {
    grid-area: credit;
    align-self: start;
  }
  .scene-spine.layout-kit-thanks .object-qr.close {
    display: contents;
  }
  .scene-spine.layout-kit-thanks .object-qr.close img {
    grid-area: code;
    align-self: end;
  }
  .scene-spine.layout-kit-thanks .object-qr.close > .credit {
    grid-area: caption;
    align-self: start;
  }
  .scene-spine.layout-kit-thanks .statement {
    font-size: clamp(56px, calc(var(--u) * 7.2), 150px);
  }
}
@media (max-width: 760px) {
  .scene-spine.layout-kit-thanks .object.kit-avatar {
    flex-wrap: wrap;
    row-gap: 0.4em;
    border-radius: 24px;
  }
  .scene-spine.layout-kit-thanks .object.kit-avatar .credit,
  .scene-spine.layout-kit-thanks .object.kit-avatar .tag {
    white-space: normal;
  }
  .scene-spine.layout-kit-thanks .object.kit-avatar .tag {
    flex-basis: 100%;
    padding-left: 0.4em;
  }
  .scene-spine.layout-kit-thanks .object.kit-avatar .tag::before {
    /* the role wraps under the name on a phone; no dot leads its line */
    display: none;
  }
  .scene-spine.layout-kit-thanks .object-group.kit-who > figcaption.credit {
    margin: 0.6em 0 18px;
  }
}

/* ── Questions: the heading, then the numbered questions on the left two-thirds, each with its
   one-line answer (its digit opens the answer page); the links page's code on the right ── */
.scene-spine.layout-kit-questions .object-group.kit-qa {
  display: contents;
}
.scene-spine.layout-kit-questions .object-table.qlist {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  overflow: visible;
  font-size: clamp(14px, calc(var(--u) * 1.45), 30px);
}
.scene-spine.layout-kit-questions .qlist table,
.scene-spine.layout-kit-questions .qlist tbody {
  display: grid;
  width: 100%;
}
.scene-spine.layout-kit-questions .qlist tr:first-child {
  display: none;
}
.scene-spine.layout-kit-questions .qlist tr {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 0.75em;
  align-content: center;
  padding: 0.55em 0;
  border-top: 1px solid var(--t-line);
}
.scene-spine.layout-kit-questions .qlist tr:nth-child(2) {
  border-top: 0;
}
.scene-spine.layout-kit-questions .qlist td {
  padding: 0;
  border: 0;
  white-space: normal;
}
.scene-spine.layout-kit-questions .qlist td:first-child {
  grid-row: 1 / span 2;
  align-self: start;
  display: grid;
  place-items: center;
  width: 1.7em;
  height: 1.7em;
  margin-top: -0.1em;
  border-radius: 50%;
  background: var(--t-accent);
  color: var(--t-accent-deep);
  font: 800 0.82em / 1 var(--t-font);
}
.scene-spine.layout-kit-questions .qlist td:nth-child(2) {
  font: 700 clamp(17px, calc(var(--u) * 1.45), 30px) / 1.22 var(--t-font);
  color: var(--t-text);
}
.scene-spine.layout-kit-questions .qlist td:nth-child(3) {
  margin-top: 0.15em;
  /* an explanation: at least the profile's 18 px floor at 1920x1080 (L9) */
  font: 500 clamp(18px, calc(var(--u) * 1.07), 22px) / 1.3 var(--t-font);
  color: var(--t-text-secondary);
}
.scene-spine.layout-kit-questions .object-qr.links {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  gap: calc(var(--u) * 0.9);
}
.scene-spine.layout-kit-questions .object-qr.links img {
  width: clamp(150px, calc(var(--u) * 15), 290px);
}
/* the address wraps at a hyphen, inside a word only when no break point fits */
.scene-spine.layout-kit-questions .object-qr.links > .credit {
  max-width: clamp(150px, calc(var(--u) * 15), 290px);
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  /* on a phone the code sits alone in its row, so its address takes the row's width, not the code's */
  .scene-spine.layout-kit-questions .object-qr.links > .credit {
    max-width: none;
  }
}
@media (min-width: 761px) {
  .scene-spine.layout-kit-questions .two {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    grid-template-areas:
      "text qr"
      "list qr";
    grid-template-rows: auto auto;
    align-content: center;
    column-gap: calc(var(--u) * 4);
    row-gap: calc(var(--u) * 1.6);
  }
  .scene-spine.layout-kit-questions .text {
    grid-area: text;
  }
  .scene-spine.layout-kit-questions .object-table.qlist {
    grid-area: list;
  }
  .scene-spine.layout-kit-questions .object-qr.links {
    grid-area: qr;
    align-self: center;
    justify-self: center;
  }
}
