/* Text cards (cards.js): a card is a slide. It covers the whole window, the office's caption and
   panel included, in the Alchemy Agentic paper look, and it says what the matching slide of the
   live deck says (deck/slides.js). The colors, fonts and sizes are the deck's (deck/deck.css and
   the paper theme in deck/ds/tokens/theme-paper.css), copied here so the brand system's base
   styles do not reach the office itself. A slide there is drawn 1920 wide; here one unit (--u)
   is a hundredth of the slide's width, so a deck size in px is that number divided by 19.2. */

#curtain.card, .b-cards.show {
  position: fixed; inset: 0; z-index: 60; border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  background: hsl(40, 24%, 92%);
}

.text-card {
  --u: min(1vw, 1.7778vh);
  --paper-ink: hsl(28, 22%, 13%);
  --paper-text: hsl(30, 11%, 32%);
  --paper-muted: hsl(30, 8%, 47%);
  --paper-rule: hsl(38, 22%, 86%);
  --paper-teal: hsl(190, 72%, 34%);
  --paper-display: "Newsreader", Georgia, serif;
  --paper-sans: "Hanken Grotesk", system-ui, sans-serif;
  --paper-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  box-sizing: border-box; width: calc(100 * var(--u)); height: calc(56.25 * var(--u)); flex: none;
  display: flex; flex-direction: column; overflow: hidden; text-align: left;
  padding: calc(4.2 * var(--u)) calc(5.8 * var(--u)) 0;
  background: linear-gradient(160deg, hsl(42, 40%, 98%) 0%, hsl(40, 32%, 95%) 70%, hsl(38, 30%, 93%) 100%);
  color: var(--paper-text);
  font: 400 calc(1.8 * var(--u)) / 1.4 var(--paper-sans);
}
.text-card * { box-sizing: border-box; }
.text-card .tc-main { flex: 1; min-height: 0; display: flex; gap: calc(3 * var(--u)); }
.text-card .tc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.text-card .tc-kicker {
  margin: 0 0 calc(1.5 * var(--u)); font: 500 calc(1.15 * var(--u)) / 1 var(--paper-mono);
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--paper-teal);
}
.text-card h2 {
  margin: 0 0 calc(1.8 * var(--u)); padding: 0; max-width: calc(78 * var(--u));
  font: 500 calc(3.2 * var(--u)) / 1.08 var(--paper-display); letter-spacing: -0.02em;
  text-transform: none; text-wrap: balance; color: var(--paper-ink);
}
.text-card h2 em, .text-card .tc-lines em { font-style: italic; color: var(--paper-teal); }
.text-card .tc-lead { margin: 0 0 calc(1.4 * var(--u)); font: 500 calc(2.5 * var(--u)) / 1.2 var(--paper-display); color: var(--paper-ink); max-width: calc(72 * var(--u)); }

/* label and text pairs */
.text-card .tc-rows { display: grid; grid-template-columns: calc(21 * var(--u)) 1fr; margin: 0; border-top: 1px solid var(--paper-rule); font-size: calc(1.8 * var(--u)); }
.text-card .tc-row { display: contents; }
.text-card .tc-row b, .text-card .tc-row span { padding: calc(0.8 * var(--u)) 0; border-bottom: 1px solid var(--paper-rule); min-width: 0; overflow-wrap: anywhere; }
.text-card .tc-row b { font-weight: 600; color: var(--paper-ink); padding-right: calc(1.6 * var(--u)); }
/* six long rows (what was real): a little smaller, so the last line still fits */
.text-card.dense .tc-rows { font-size: calc(1.6 * var(--u)); line-height: 1.34; }
.text-card.dense .tc-row b, .text-card.dense .tc-row span { padding: calc(0.62 * var(--u)) 0; }
.text-card.dense h2 { font-size: calc(2.9 * var(--u)); margin-bottom: calc(1.3 * var(--u)); }

/* sentences, numbered or not */
.text-card .tc-lines { list-style: none; margin: 0; padding: 0; counter-reset: n; border-top: 1px solid var(--paper-rule); }
.text-card .tc-lines li { counter-increment: n; display: flex; gap: calc(1.6 * var(--u)); padding: calc(0.85 * var(--u)) 0; border-bottom: 1px solid var(--paper-rule); min-width: 0; overflow-wrap: anywhere; }
.text-card ol.tc-lines li::before { content: counter(n); flex: none; width: calc(1.9 * var(--u)); font: 500 calc(1.45 * var(--u)) / 1.5 var(--paper-mono); color: var(--paper-teal); }
.text-card .tc-lines.big li { font: 500 calc(3.1 * var(--u)) / 1.15 var(--paper-display); letter-spacing: -0.01em; color: var(--paper-ink); padding: calc(1.5 * var(--u)) 0; align-items: baseline; }
.text-card ol.tc-lines.big li::before { font-size: calc(1.75 * var(--u)); line-height: 1; }

.text-card .tc-foot { margin: auto 0 calc(1.5 * var(--u)); padding-top: calc(1.1 * var(--u)); font-size: calc(1.56 * var(--u)); color: var(--paper-text); }

/* a chapter card: a question and nothing else, so the question is the screen */
.text-card.chapter .tc-body { justify-content: center; padding-bottom: calc(2 * var(--u)); }
.text-card.chapter .tc-kicker { font-size: calc(1.56 * var(--u)); margin-bottom: calc(2.5 * var(--u)); }
.text-card.chapter h2 { font-size: calc(8.4 * var(--u)); line-height: 1.03; max-width: calc(85 * var(--u)); margin: 0; }

/* the closing card: names and addresses, and the kit's code when there is one */
.text-card.close h2 { font-size: calc(3.9 * var(--u)); margin-bottom: calc(1.4 * var(--u)); }
.text-card.close .tc-rows { max-width: calc(66 * var(--u)); font-size: calc(1.85 * var(--u)); }
.text-card.close .tc-row span { font-family: var(--paper-mono); font-size: calc(1.65 * var(--u)); color: var(--paper-teal); }
.text-card .tc-qr { flex: none; align-self: center; margin: 0; text-align: center; }
.text-card .tc-qr img { display: block; width: calc(19 * var(--u)); height: calc(19 * var(--u)); background: #fff; border: 1px solid var(--paper-rule); border-radius: calc(0.8 * var(--u)); padding: calc(0.6 * var(--u)); }
.text-card .tc-qr figcaption { margin-top: calc(0.8 * var(--u)); font: 500 calc(1.05 * var(--u)) / 1 var(--paper-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--paper-muted); }

/* the slide's footer: the brand on the left, the card's place and keys on the right */
.text-card .tc-footer { flex: none; height: calc(3.9 * var(--u)); display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--paper-rule); }
.text-card .tc-lockup { display: inline-flex; align-items: center; gap: calc(0.6 * var(--u)); font: 500 calc(1.25 * var(--u)) / 1 var(--paper-display); color: var(--paper-ink); }
.text-card .tc-lockup img { height: calc(1.9 * var(--u)); width: auto; }
.text-card .tc-count { margin: 0; font: 500 calc(0.83 * var(--u)) / 1 var(--paper-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--paper-muted); }
.text-card .tc-count b { margin-right: calc(1.4 * var(--u)); color: var(--paper-ink); font-weight: 500; }

/* a title card: the talk's name, large, and who is speaking */
.text-card.title .tc-body { justify-content: center; padding-bottom: calc(2 * var(--u)); }
.text-card.title h2 { font-size: calc(6.1 * var(--u)); line-height: 1.04; max-width: calc(82 * var(--u)); }
.text-card .tc-byline p { margin: 0 0 calc(0.4 * var(--u)); font-size: calc(1.7 * var(--u)); color: var(--paper-ink); }
.text-card .tc-byline p + p { font-size: calc(1.35 * var(--u)); color: var(--paper-muted); }

/* a statement: one sentence, and a line or two under it */
.text-card.statement .tc-body { justify-content: center; padding-bottom: calc(2 * var(--u)); }
.text-card.statement h2 { font-size: calc(4.4 * var(--u)); max-width: calc(80 * var(--u)); margin-bottom: calc(2.2 * var(--u)); }
.text-card .tc-para { margin: 0 0 calc(1.4 * var(--u)); font-size: calc(2 * var(--u)); line-height: 1.4; max-width: calc(72 * var(--u)); }

/* a table: a head in small capitals, the last column in the accent */
.text-card .tc-table { border-collapse: collapse; width: 100%; font-size: calc(1.9 * var(--u)); }
.text-card .tc-table th { text-align: left; font: 500 calc(1.05 * var(--u)) / 1 var(--paper-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--paper-muted); padding: 0 calc(1.2 * var(--u)) calc(0.9 * var(--u)) 0; border-bottom: 1px solid hsl(36, 20%, 80%); }
.text-card .tc-table td { padding: calc(1.1 * var(--u)) calc(1.2 * var(--u)) calc(1.1 * var(--u)) 0; border-bottom: 1px solid var(--paper-rule); vertical-align: top; color: var(--paper-ink); }
.text-card .tc-table td:last-child { color: var(--paper-teal); font-weight: 600; white-space: nowrap; }

/* the dot beside a label that says how real a thing is, in the deck's colors */
.text-card .tc-dot { display: inline-block; width: calc(0.62 * var(--u)); height: calc(0.62 * var(--u)); border-radius: 50%; margin-right: calc(0.55 * var(--u)); background: var(--paper-teal); vertical-align: 0.08em; }
.text-card .tc-dot.example { background: hsl(168, 50%, 38%); }
.text-card .tc-dot.public { background: hsl(205, 70%, 48%); }
.text-card .tc-dot.simulated { background: hsl(34, 72%, 44%); }
.text-card .tc-dot.illustrated { background: none; border: 2px dashed var(--paper-muted); }
.text-card .tc-dot.scripted { background: var(--paper-muted); }
.text-card .tc-table th:first-child { width: 37%; }
.text-card .tc-table th:nth-child(2) { width: 33%; }
