/* =========================================================================
   slide-kit / deck.css
   Architecture: fixed 1920x1080 stage. Every size is a design pixel
   multiplied by --px, so the deck scales to any screen with no reflow.
   CI: casedone, warm paper, deep ink, one green, mono labels, hairlines.
   No shadows, no gradients-as-decoration, no rounded-rect cards.
   ========================================================================= */

/* ---------- 1. tokens ---------------------------------------------------- */

:root {
  /* paper + ink */
  --paper: #F7F4EC;
  --paper-2: #EFEBDD;
  --ink: #16201A;
  --ink-soft: #33413A;
  --muted: #5F6B62;
  --rule: #D8D2C2;
  --rule-strong: #BFB8A4;

  /* green: text-safe, fill-only, wash */
  --green: #1F5C33;        /* 7.25:1 on paper, the only green for words */
  --green-mid: #2E7D46;
  --green-bright: #51B316; /* 2.45:1 on paper, fills, marks, rules. NEVER text on paper */
  --green-wash: #E6EEDF;

  /* the dark band */
  --night: #14201A;
  --night-2: #1B2A22;
  --on-night: #F2EFE6;
  --on-night-muted: #A9B5AC;
  --night-rule: #2C3A31;

  /* type */
  --serif: Newsreader, "Noto Serif Thai", "Iowan Old Style", Georgia, serif;
  --sans: "Public Sans", "IBM Plex Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "IBM Plex Sans Thai", ui-monospace, "SF Mono", Menlo, monospace;

  /* geometry */
  --radius: 3px;
  --ease: cubic-bezier(.2, .6, .2, 1);

  /* body text is nudged up ~18% because slides are read from the room */
  --text-scale: 1.18;

  /* frame, in design px */
  --pad-x: 96;
  --pad-top: 76;
  --pad-bottom: 132;
  --foot-h: 92;
}

/* Thai: taller lines for stacked vowels and tone marks, never tight tracking.
   Apply by putting lang="th" on the element holding Thai text. */
[lang="th"] { letter-spacing: 0 !important; }

/* ---------- 2. reset + deck shell ---------------------------------------- */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-snap-type: y mandatory;
  background: var(--night);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  background: var(--night);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.slide {
  position: relative;
  height: 100vh;
  height: 100svh;
  display: grid;
  place-items: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
}

/* The stage: 16:9, always 1920 design px wide internally. */
.stage {
  --px: calc(100cqw / 1920);
  --fpx: calc(var(--px) * var(--text-scale));

  /* light is the default theme */
  --ground: var(--paper);
  --surface: var(--paper-2);
  --text: var(--ink);
  --text-soft: var(--ink-soft);
  --text-muted: var(--muted);
  --accent: var(--green);
  --accent-fill: var(--green-bright);
  --accent-wash: var(--green-wash);
  --border: var(--rule);
  --border-strong: var(--rule-strong);

  position: relative;
  width: min(100vw, 177.78vh);
  width: min(100vw, 177.78svh);
  aspect-ratio: 16 / 9;
  container-type: inline-size;
  overflow: hidden;
  background: var(--ground);
  color: var(--text);
  /* a long word (URL, Thai compound, {{TOKEN}}) wraps instead of breaking the grid */
  overflow-wrap: break-word;
}

/* dark slide: the practice band. Same layout rules, inverted ground. */
.slide.dark .stage {
  --ground: var(--night);
  --surface: var(--night-2);
  --text: var(--on-night);
  --text-soft: var(--on-night);
  --text-muted: var(--on-night-muted);
  --accent: var(--green-bright);
  --accent-fill: var(--green-bright);
  --accent-soft: color-mix(in srgb, var(--green-bright) 55%, var(--on-night));
  --accent-wash: rgba(81, 179, 22, .14);
  --border: var(--night-rule);
  --border-strong: var(--night-rule);
}

/* ambient light: faint warmth on paper, one green glow on dark. Never busy. */
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 88% 0%, rgba(31, 92, 51, .05), transparent 62%);
}
.slide.dark .stage::before {
  background:
    radial-gradient(circle at 88% 6%, rgba(81, 179, 22, .10), transparent 40%),
    radial-gradient(circle at 0% 104%, rgba(31, 92, 51, .22), transparent 44%);
}

/* optional structural grid, off by default: .stage.with-grid */
.stage.with-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, var(--border) max(1px, calc(1 * var(--px))), transparent max(1px, calc(1 * var(--px)))),
    linear-gradient(to bottom, var(--border) max(1px, calc(1 * var(--px))), transparent max(1px, calc(1 * var(--px))));
  background-size: calc(96 * var(--px)) calc(96 * var(--px));
  opacity: .45;
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 74%, transparent);
}

/* ---------- 3. frame ----------------------------------------------------- */

.frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: calc(var(--pad-top) * var(--px)) calc(var(--pad-x) * var(--px)) calc(var(--pad-bottom) * var(--px));
  display: flex;
  flex-direction: column;
}

.main {
  flex: 1;
  min-height: 0;
  margin-top: calc(30 * var(--px));
  display: flex;
  flex-direction: column;
  justify-content: safe center;
}

/* ---------- 4. type primitives ------------------------------------------- */

/* No eyebrow, by design: a small label with a dash above a title reads as a
   form field. A slide opens with its claim. The class survives only so the
   checker can name the mistake when an old deck still carries one. */
.eyebrow { display: none; }

/* kicker: a green label above a title, no rule */
.kicker {
  font-family: var(--mono);
  font-size: calc(20 * var(--fpx));
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}

h1.title {
  font-family: var(--serif);
  font-size: calc(66 * var(--px));
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.022em;
  margin-top: calc(22 * var(--px));
  max-width: calc(1560 * var(--px));
  text-wrap: balance;
  color: var(--text);
}

/* Thai titles need air: 1.08 clips tone marks */
h1.title[lang="th"], .title.th { line-height: 1.32; letter-spacing: 0; }

/* the one emphasised phrase in a title, colour only, never a box.
   On dark the full-strength green is neon at 100px, so use the tint. */
.hl { color: var(--accent); }
.slide.dark .hl { color: var(--accent-soft, var(--accent)); }
/* optional second emphasis: a wash swipe under the words */
.hl-mark {
  background-image: linear-gradient(var(--accent-wash), var(--accent-wash));
  background-repeat: no-repeat;
  background-size: 100% 42%;
  background-position: 0 88%;
}

.sub {
  font-size: calc(29 * var(--fpx));
  line-height: 1.5;
  color: var(--text-muted);
  margin-top: calc(20 * var(--px));
  max-width: calc(1450 * var(--px));
  text-wrap: pretty;
}

.lede {
  font-size: calc(26 * var(--fpx));
  line-height: 1.65;
  color: var(--text-soft);
  max-width: calc(1200 * var(--px));
}

/* source line: every slide with a number should have one */
.src {
  margin-top: calc(34 * var(--px));
  font-family: var(--mono);
  font-size: calc(16 * var(--fpx));
  letter-spacing: .04em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ---------- 5. footer ---------------------------------------------------- */

.foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: calc(var(--foot-h) * var(--px));
  padding: 0 calc(var(--pad-x) * var(--px));
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: calc(20 * var(--px));
  font-family: var(--mono);
  font-size: calc(17 * var(--fpx));
  letter-spacing: .04em;
  line-height: 1.3;
  color: var(--text-muted);
  text-transform: uppercase;
}
.foot .mark {
  flex: none;
  width: calc(14 * var(--px));
  height: calc(14 * var(--px));
  background: var(--accent-fill);
}
.foot .fnote { flex: 1; min-width: 0; }
.foot .pg { flex: none; font-variant-numeric: tabular-nums; }

/* ---------- 6. small components ------------------------------------------ */

.rule { height: 1px; background: var(--border); width: 100%; }

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: calc(16 * var(--fpx));
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  padding: calc(6 * var(--px)) calc(10 * var(--px));
}

.ph { /* honest image placeholder: never fake a photo */
  background:
    repeating-linear-gradient(-45deg, transparent 0 9px, var(--border) 9px 10px),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: calc(16 * var(--fpx));
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  min-height: calc(220 * var(--px));
}

/* ---------- 7. L-COVER --------------------------------------------------- */

.L-cover .frame {
  padding: calc(104 * var(--px)) calc(var(--pad-x) * var(--px)) calc(96 * var(--px));
  justify-content: center;
}
.L-cover .foot { display: none; }

.cover-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) calc(690 * var(--px));
  gap: calc(70 * var(--px));
  align-items: center;
}
.cover-grid.no-art { grid-template-columns: minmax(0, calc(1400 * var(--px))); }

.cover-title {
  font-family: var(--serif);
  font-size: calc(104 * var(--px));
  font-weight: 500;
  line-height: 1.03;
  letter-spacing: -.028em;
  margin-top: calc(26 * var(--px));
  text-wrap: balance;
  color: var(--text);
}
.cover-sub {
  font-size: calc(33 * var(--fpx));
  line-height: 1.45;
  color: var(--text-muted);
  margin-top: calc(38 * var(--px));
  max-width: calc(880 * var(--px));
  text-wrap: pretty;
}
.cover-meta {
  margin-top: calc(52 * var(--px));
  display: flex;
  flex-direction: column;
  gap: calc(10 * var(--px));
  font-family: var(--mono);
  font-size: calc(21 * var(--fpx));
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.cover-meta strong { font-weight: 500; color: var(--text-soft); }
/* Thai display sizes: leading must clear stacked vowels + tone marks */
.cover-title[lang="th"], .divider-title[lang="th"], .close-title[lang="th"],
.statement[lang="th"] { line-height: 1.3; letter-spacing: -.012em; }
.plate h2[lang="th"] { line-height: 1.32; letter-spacing: -.01em; }
.cover-meta .dot { color: var(--accent-fill); }

.cover-art img, .cover-art .ph {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  filter: saturate(.75) contrast(1.03);
}
.cover-art .ph { aspect-ratio: 4 / 5; }

.lockup {
  position: absolute;
  left: calc(var(--pad-x) * var(--px));
  bottom: calc(64 * var(--px));
  display: flex;
  align-items: center;
  gap: calc(12 * var(--px));
  font-family: var(--mono);
  font-size: calc(20 * var(--px));
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.lockup::before {
  content: "";
  width: calc(13 * var(--px));
  height: calc(13 * var(--px));
  background: var(--accent-fill);
}

/* ---------- 8. L-DIVIDER ------------------------------------------------- */

.L-divider .frame {
  padding: calc(104 * var(--px)) calc(var(--pad-x) * var(--px)) calc(104 * var(--px));
  justify-content: space-between;
}
.divider-head { padding-bottom: calc(4 * var(--px)); }
.L-divider .foot { display: none; }

.divider-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: calc(90 * var(--px));
  align-items: end;
}
.divider-title {
  font-family: var(--serif);
  font-size: calc(88 * var(--px));
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -.026em;
  margin-top: calc(26 * var(--px));
  text-wrap: balance;
}
.divider-sub {
  font-size: calc(27 * var(--fpx));
  line-height: 1.55;
  color: var(--text-muted);
  margin-top: calc(24 * var(--px));
  max-width: calc(700 * var(--px));
}
.divider-toc { border-top: 1px solid var(--border); }
.divider-toc li {
  display: flex;
  gap: calc(22 * var(--px));
  padding: calc(15 * var(--px)) 0;
  border-bottom: 1px solid var(--border);
  font-size: calc(23 * var(--fpx));
  line-height: 1.45;
  color: var(--text-soft);
}
.divider-toc .n {
  flex: none;
  font-family: var(--mono);
  font-size: calc(17 * var(--fpx));
  letter-spacing: .08em;
  color: var(--accent);
  padding-top: calc(5 * var(--px));
}

/* ---------- 9. L-STATEMENT ----------------------------------------------- */

.L-statement .frame {
  padding: calc(120 * var(--px)) calc(132 * var(--px)) calc(124 * var(--px));
  justify-content: center;
}
.statement {
  font-family: var(--serif);
  font-size: calc(92 * var(--px));
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.026em;
  max-width: calc(1520 * var(--px));
  text-wrap: balance;
  color: var(--text);
}
.statement.quote { font-style: italic; }
.statement-by {
  margin-top: calc(36 * var(--px));
  display: flex;
  align-items: center;
  gap: calc(18 * var(--px));
  font-family: var(--mono);
  font-size: calc(20 * var(--fpx));
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.statement-by::before {
  content: "";
  width: calc(34 * var(--px));
  height: max(2px, calc(2 * var(--px)));
  background: var(--accent-fill);
}

/* statement + proof numbers: the most useful combination in a deck */
.proof {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: calc(46 * var(--px));
  margin-top: calc(76 * var(--px));
  border-top: 1px solid var(--border);
  padding-top: calc(34 * var(--px));
}
.proof .k {
  font-family: var(--mono);
  font-size: calc(17 * var(--fpx));
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.proof .v {
  font-family: var(--serif);
  font-size: calc(42 * var(--fpx));
  line-height: 1.2;
  letter-spacing: -.01em;
  margin-top: calc(10 * var(--px));
  color: var(--text);
}

/* ---------- 10. L-NUMS --------------------------------------------------- */

.nums {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
}
.nums > div {
  padding: calc(10 * var(--px)) calc(48 * var(--px));
  border-left: 1px solid var(--border);
}
.nums > div:first-child { border-left: 0; padding-left: 0; }

.num-k {
  font-family: var(--mono);
  font-size: calc(19 * var(--fpx));
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.num-big {
  font-family: var(--serif);
  font-size: calc(142 * var(--px));
  font-weight: 500;
  line-height: .94;
  letter-spacing: -.032em;
  margin-top: calc(20 * var(--px));
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.num-big .u {
  font-size: .34em;
  letter-spacing: 0;
  color: var(--text-muted);
  margin-left: .1em;
}
.nums > div.is-key .num-big { color: var(--accent); }
.num-c {
  font-size: calc(23 * var(--fpx));
  line-height: 1.6;
  color: var(--text-soft);
  margin-top: calc(20 * var(--px));
  max-width: calc(400 * var(--px));
}

/* ---------- 11. L-LIST (steps, bullets, sources) ------------------------- */

.list { display: flex; flex-direction: column; }
.list > li {
  display: grid;
  grid-template-columns: calc(84 * var(--px)) minmax(0, 1fr) auto;
  gap: calc(34 * var(--px));
  align-items: start;
  padding: calc(12 * var(--px)) 0;
  border-top: 1px solid var(--border);
}
.list > li:last-child { border-bottom: 1px solid var(--border); }
.list .n {
  font-family: var(--mono);
  font-size: calc(20 * var(--fpx));
  letter-spacing: .1em;
  color: var(--accent);
  padding-top: calc(9 * var(--px));
}
.list h3 {
  font-family: var(--serif);
  font-size: calc(32 * var(--fpx));
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.014em;
  color: var(--text);
}
.list h3[lang="th"] { line-height: 1.42; }
.list p {
  font-size: calc(21 * var(--fpx));
  line-height: 1.46;
  color: var(--text-muted);
  margin-top: calc(5 * var(--px));
  max-width: calc(1180 * var(--px));
}
.list .m {
  font-family: var(--mono);
  font-size: calc(16 * var(--fpx));
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: calc(14 * var(--px));
  white-space: nowrap;
}

/* plain bullets: no numbers, a square mark instead */
.list.is-plain > li { grid-template-columns: minmax(0, 1fr); padding: calc(18 * var(--px)) 0; }
.list.is-plain > li::before {
  content: "";
  width: calc(8 * var(--px));
  height: calc(8 * var(--px));
  background: var(--accent-fill);
  margin-top: calc(14 * var(--px));
}
.list.is-plain > li { display: grid; grid-template-columns: calc(8 * var(--px)) minmax(0, 1fr); gap: calc(24 * var(--px)); }
.list.is-plain h3 { font-size: calc(28 * var(--fpx)); }
.list.is-plain p { font-size: calc(21 * var(--fpx)); }

/* two columns of items: fill row by row, rule each row, close the block */
.list.is-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 calc(64 * var(--px)); }
.list.is-2col > li { border-top: 1px solid var(--border); }
.list.is-2col > li:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }

/* ---------- 12. L-CARDS -------------------------------------------------- */

/* cards fill the height they are given, so a three-up reads as panels
   rather than three small boxes floating in the middle of the slide */
.L-cards .main > .cards { flex: 1; min-height: 0; }

.cards {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: calc(26 * var(--px));
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: calc(32 * var(--px)) calc(30 * var(--px)) calc(28 * var(--px));
  display: flex;
  flex-direction: column;
  min-height: calc(360 * var(--px));
}
.card.is-key { background: var(--accent-wash); border-color: var(--accent); }
.card .n {
  font-family: var(--mono);
  font-size: calc(16 * var(--fpx));
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}
.card h3 {
  font-family: var(--serif);
  font-size: calc(35 * var(--fpx));
  font-weight: 500;
  line-height: 1.24;
  letter-spacing: -.014em;
  margin-top: calc(16 * var(--px));
  color: var(--text);
}
.card h3[lang="th"] { line-height: 1.4; }
.card p {
  font-size: calc(22 * var(--fpx));
  line-height: 1.62;
  color: var(--text-muted);
  margin-top: calc(12 * var(--px));
}
.card .tag { margin-top: auto; align-self: flex-start; border: 0; padding: calc(20 * var(--px)) 0 0; }

/* cards + a figure beside them */
.with-aside {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) calc(440 * var(--px));
  gap: calc(48 * var(--px));
  align-items: center;
}
.aside-fig .ph, .aside-fig img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 0;
}
/* inside a combination the cards give up their tall default */
.with-aside .card { min-height: 0; padding: calc(26 * var(--px)) calc(26 * var(--px)) calc(22 * var(--px)); }
.with-aside .card h3 { font-size: calc(31 * var(--fpx)); }
.with-aside .card p { font-size: calc(21 * var(--fpx)); }
.aside-fig figcaption {
  font-family: var(--mono);
  font-size: calc(15 * var(--fpx));
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: calc(10 * var(--px));
}

/* ---------- 13. L-TABLE -------------------------------------------------- */

.tbl { width: 100%; border-collapse: collapse; font-size: calc(24 * var(--fpx)); }
.tbl th {
  font-family: var(--mono);
  font-size: calc(16 * var(--fpx));
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  padding: 0 calc(22 * var(--px)) calc(16 * var(--px));
  border-bottom: 1px solid var(--border-strong);
}
.tbl td {
  padding: calc(24 * var(--px)) calc(22 * var(--px));
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
  color: var(--text-soft);
  vertical-align: top;
}
.tbl th:first-child, .tbl td:first-child { padding-left: 0; }
.tbl th:last-child, .tbl td:last-child { padding-right: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl td strong { font-weight: 600; color: var(--text); }
.tbl tr.is-key td { background: var(--accent-wash); color: var(--text); }
.tbl tr.is-key td:first-child { font-weight: 600; }
.tbl tr.is-key td.num { color: var(--accent); font-weight: 600; }

/* ---------- 14. L-VERSUS ------------------------------------------------- */

.versus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) calc(110 * var(--px)) minmax(0, 1fr);
  align-items: stretch;
}
.vs-side { padding: calc(6 * var(--px)) 0; }
.vs-side:first-child { padding-right: calc(48 * var(--px)); }
.vs-side:last-child { padding-left: calc(48 * var(--px)); }
.vs-mid { position: relative; display: grid; place-items: center; }
.vs-mid::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 1px;
  background: var(--border);
}
.vs-mid span {
  position: relative;
  padding: calc(16 * var(--px)) 0;
  background: var(--ground);
  font-family: var(--mono);
  font-size: calc(16 * var(--fpx));
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.vs-k {
  font-family: var(--mono);
  font-size: calc(17 * var(--fpx));
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.vs-claim {
  font-family: var(--serif);
  font-size: calc(44 * var(--fpx));
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -.016em;
  margin-top: calc(16 * var(--px));
  color: var(--text);
}
.vs-li {
  margin-top: calc(26 * var(--px));
  display: flex;
  flex-direction: column;
  gap: calc(14 * var(--px));
  font-size: calc(23 * var(--fpx));
  line-height: 1.6;
  color: var(--text-soft);
}
.vs-li li { display: grid; grid-template-columns: calc(9 * var(--px)) minmax(0, 1fr); gap: calc(16 * var(--px)); }
.vs-li li::before {
  content: "";
  width: calc(9 * var(--px));
  height: calc(9 * var(--px));
  margin-top: .58em;
  background: var(--accent-fill);
}
.verdict {
  margin-top: calc(34 * var(--px));
  border-top: 1px solid var(--border-strong);
  padding-top: calc(22 * var(--px));
  display: flex;
  gap: calc(26 * var(--px));
  align-items: baseline;
  font-size: calc(25 * var(--fpx));
  line-height: 1.55;
  color: var(--text);
}
.verdict .k {
  flex: none;
  font-family: var(--mono);
  font-size: calc(16 * var(--fpx));
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- 15. L-IMAGE (full bleed + paper plate) ----------------------- */

.L-image .photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.82) contrast(1.02);
}
.L-image .scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 32, 26, .78), rgba(20, 32, 26, .06) 58%, rgba(20, 32, 26, .34));
}
.L-image .frame {
  justify-content: flex-end;
  padding-bottom: calc(var(--pad-bottom) * var(--px));
}
.L-image .foot { color: rgba(242, 239, 230, .72); border-top-color: rgba(242, 239, 230, .22); }
.L-image .foot .mark { background: var(--green-bright); }

/* the plate: the magazine device, paper card overlapping the photo */
.plate {
  position: relative;
  z-index: 2;
  max-width: calc(1040 * var(--px));
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: calc(38 * var(--px)) calc(40 * var(--px)) calc(40 * var(--px));
}
.plate h2 {
  font-family: var(--serif);
  font-size: calc(54 * var(--px));
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.022em;
  margin-top: calc(16 * var(--px));
  color: var(--ink);
  text-wrap: balance;
}
.plate h2[lang="th"] { line-height: 1.3; }
.plate .sub { color: var(--muted); font-size: calc(25 * var(--fpx)); margin-top: calc(16 * var(--px)); max-width: calc(760 * var(--px)); }
.plate .hl { color: var(--green); }

/* ---------- 16. L-FIGURE (one figure fills the body) --------------------- */

/* The technical-talk slide: a claim on top, then one diagram, chart or
   screenshot that takes every remaining pixel. The hairline sits on the image
   rather than on a wrapper box, so the plate hugs the figure at whatever size
   it lands, a 16:9 diagram, a 4:3 screenshot and a 1:1 drawing all frame
   themselves. `contain`, never `cover`: a diagram that loses its edges is not
   a diagram. Reference the file with <img>; inline SVG cannot size itself. */
.L-figure .main { margin-top: calc(26 * var(--px)); }

.fig {
  margin: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fig img, .fig svg {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
}
/* no hairline: for a figure whose own ground is the page, or a diagram that
   should read as the slide rather than as an exhibit on it */
.fig.is-bleed img, .fig.is-bleed svg { border: 0; border-radius: 0; }
.L-figure .src { margin-top: calc(22 * var(--px)); }

/* ---------- 17. L-CLOSE -------------------------------------------------- */

.L-close .frame {
  padding: calc(110 * var(--px)) calc(var(--pad-x) * var(--px)) calc(104 * var(--px));
  justify-content: center;
}
.L-close .foot { display: none; }
.close-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) calc(300 * var(--px));
  gap: calc(90 * var(--px));
  align-items: center;
}
/* no QR supplied: the closing line takes the width instead of a dead column */
.close-grid.no-qr { grid-template-columns: minmax(0, calc(1240 * var(--px))); }

.close-title {
  font-family: var(--serif);
  font-size: calc(92 * var(--px));
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -.026em;
  margin-top: calc(22 * var(--px));
}
.contact { margin-top: calc(46 * var(--px)); display: flex; flex-direction: column; gap: calc(16 * var(--px)); }
.contact a, .contact span {
  font-family: var(--mono);
  font-size: calc(22 * var(--fpx));
  letter-spacing: .04em;
  color: var(--text-soft);
  border-bottom: 1px solid var(--border);
  padding-bottom: calc(9 * var(--px));
  width: fit-content;
}
.qr { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: calc(16 * var(--px)); }
.qr img, .qr .ph { width: 100%; min-height: 0; aspect-ratio: 1; border: 0; }
.qr-cap {
  margin-top: calc(12 * var(--px));
  font-family: var(--mono);
  font-size: calc(14 * var(--fpx));
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

/* ---------- 18. deck chrome (hidden until hover, never in the design) ---- */

.chrome {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 50;
  display: flex;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity .2s var(--ease);
}
body:hover .chrome { opacity: .55; }
.chrome button {
  font: inherit;
  color: var(--on-night);
  background: rgba(20, 32, 26, .82);
  border: 1px solid rgba(242, 239, 230, .22);
  border-radius: 2px;
  padding: 6px 9px;
  cursor: pointer;
}
.chrome button:hover { background: rgba(20, 32, 26, 1); border-color: rgba(242, 239, 230, .5); }

/* index overlay */
.index {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(20, 32, 26, .96);
  color: var(--on-night);
  padding: 48px clamp(24px, 6vw, 96px);
  overflow: auto;
  display: none;
}
body.is-index .index { display: block; }
body.is-index { overflow: hidden; }
.index h2 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--on-night-muted);
  margin-bottom: 24px;
}
.index ol { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 32px; }
.index li { border-top: 1px solid var(--night-rule); }
.index button {
  width: 100%;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  text-align: left;
  font: inherit;
  font-size: 15px;
  color: var(--on-night);
  background: none;
  border: 0;
  padding: 13px 0;
  cursor: pointer;
}
.index button:hover { color: var(--green-bright); }
.index .n { font-family: var(--mono); font-size: 12px; color: var(--on-night-muted); padding-top: 3px; }

/* ---------- 19. motion (subtle, never theatrical) ------------------------ */

/* The entrance animation is opt-in: without JS (or if JS errors) every slide stays
   visible, and a slide that is already the current one never hides. A deck that
   vanishes because a script failed is worse than a deck with no animation. */
@media (prefers-reduced-motion: no-preference) {
  .js .frame > *, .js .foot { transition: opacity .32s var(--ease), transform .32s var(--ease); }
  .js .slide:not(.is-in):not(.is-cur) .frame > *,
  .js .slide:not(.is-in):not(.is-cur) .foot { opacity: 0; transform: translateY(10px); }
}

/* ---------- 19. print / export to PDF ----------------------------------- */

@media print {
  @page { size: 1920px 1080px; margin: 0; }
  html, body { background: #fff; scroll-snap-type: none; }
  .slide { height: auto; display: block; break-after: page; overflow: visible; }
  .stage { width: 1920px; height: 1080px; --px: 1px; }
  .chrome, .index { display: none !important; }
  .slide:not(.is-in) .frame > *, .slide:not(.is-in) .foot { opacity: 1 !important; transform: none !important; }
}
