/* ============================================================
   Self-Evolving Data — v2 overrides (EN-first, reference-free)
   Loaded ONLY by index-v2.html, after styles.css.
   Goal: English leads the slide, Korean supports it, and the space
   freed by dropping the per-slide reference lists goes into type size.
   ============================================================ */

/* 1 · Per-slide reference lists move to the appendix only.
   The appendix slide keeps its full list. */
.slide:not(.slide--references) .paper-refs {
  display: none !important;
}

/* 2 · Headline: English is the headline, Korean is the subtitle.
   Markup order is <span class="en"> then <span class="ko">. */
h2 .en {
  display: block;
  margin-block-start: 0;
  color: inherit;
  font-size: 1em;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.1;
  text-wrap: balance;
}

h2 .ko {
  display: block;
  margin-block-start: var(--space-2xs);
  color: var(--color-ink-2);
  font-size: 0.56em;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
  word-break: keep-all;
}

/* 3 · Type scale — the reclaimed bottom band pays for ~15% larger text. */
:root {
  --text-xs: 1rem;
  --text-sm: 1.2rem;
  --text-base: 1.3rem;
  --text-md: 1.44rem;
  --text-lg: 1.65rem;
  --text-xl: 1.95rem;
  --text-2xl: 2.24rem;
  --text-3xl: 2.68rem;
  --text-4xl: 3.2rem;
  --text-display-s: 3rem;
  --text-display: 4.9rem;
  --text-stat: 8.4rem;
}

/* 4 · Headline sizes are set in px/rem per slide type in styles.css,
   so lift the common ones proportionally. */
.stage-copy h2,
.quality-head h2,
.autodata-head h2,
.gym-head h2,
.agent-head h2,
.physical-head h2,
.common-head h2,
.org-title h2,
.references-head h2,
.toc-head h2 {
  font-size: clamp(2rem, 2.9vw, 2.9rem);
  line-height: 1.12;
}

/* 5 · Eyebrow / chapter labels grow with the headline. */
.stage-index {
  font-size: 1.02rem;
  letter-spacing: 0.13em;
}

.chapter-tag {
  font-size: 1rem;
}

/* 6 · Card and list copy — the densest text on the deck. */
.card-body strong,
.quality-method li,
.why-env b,
.company-evidence b {
  font-size: 1.06em;
}

.slide-thesis {
  font-size: clamp(1.35rem, 1.9vw, 1.9rem);
  line-height: 1.35;
}

.figure-note,
.paper-figure figcaption,
.method-note {
  font-size: 1.02rem;
}

/* 7 · Keep the slide from feeling top-heavy once the refs are gone. */
.slide {
  padding-block-end: 4.5rem;
}


/* 8 · The band freed by the reference lists was left dangling at the bottom
   of 11 slides (21-45% dead height). Centre the content block so the space
   splits evenly instead of pooling under the last element. */
/* .slide--meta opts out — it distributes its four blocks instead (see 14d). */
.slide:not(.slide--cover):not(.slide--thanks):not(.slide--references):not(.slide--meta) {
  align-content: center;
}

/* 9 · Slide 17 was the one slide that overflowed after the type bump —
   its stacked figure duo plus the law strip exceeds 1080px. Trim only there. */
.slide--physical .figure-duo .paper-figure--band .paper-figure__image img {
  max-height: 13rem;
}
.slide--physical .law-strip {
  padding-block: var(--space-2xs);
}

/* 10 · Slide 21's matrix sat in the top half with the loop strip pinned low.
   Let the table breathe into the space the references used to occupy. */
.slide--common .matrix-row > * {
  padding-block: var(--space-lg);
}

/* 11 · Sparse text-only slides (14 "Agent에게 좋은 데이터란", 6, 22) were
   clustered in the middle with ~230px dead bands above and below. Spend that
   space on reading comfort: wider block rhythm, taller cards, larger body copy. */
.slide--agent-good,
.slide--meta,
.slide--org {
  row-gap: var(--space-2xl);
}

.slide--agent-good .why-env,
.slide--meta .why-env,
.slide--org .why-env {
  gap: var(--space-lg);
}

.slide--agent-good .why-env > div,
.slide--meta .why-env > div,
.slide--org .why-env > div {
  padding-block: var(--space-lg);
  gap: var(--space-xs);
}

.slide--agent-good .why-env p,
.slide--meta .why-env p,
.slide--org .why-env p {
  font-size: var(--text-md);
  line-height: 1.6;
}

.slide--agent-good .why-env b,
.slide--meta .why-env b,
.slide--org .why-env b {
  font-size: var(--text-lg);
}

/* Three evidence cards were sitting 2 + 1 in a two-column grid, leaving a hole
   under the right column. Give them a row of their own. */
.slide--agent-good .company-evidence {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-lg);
}

.slide--agent-good .company-evidence a {
  padding-block: var(--space-md);
}

.slide--agent-good .company-evidence small {
  font-size: var(--text-base);
  line-height: 1.5;
}

/* 12 · Slide 22 uses org-list / org-shift rather than why-env, so it kept its
   dead bands. Give the four pillars room and let the closing line breathe. */
.slide--org .org-list {
  gap: var(--space-2xl) var(--space-lg);
}

.slide--org .org-list > * {
  padding-block: var(--space-lg);
}

.slide--org .org-list b {
  font-size: var(--text-2xl);
  line-height: 1.2;
}

.slide--org .org-list span,
.slide--org .org-list small,
.slide--org .org-list p {
  font-size: var(--text-lg);
  line-height: 1.65;
}

.slide--org .org-list > * {
  padding-block: var(--space-2xl);
}

.slide--org .org-shift {
  gap: var(--space-sm);
  font-size: 1.12em;
}

/* 13 · Large emphasis statements now lead in English for the mixed audience;
   the Korean line stays as a small supporting caption underneath. */
.slide-thesis .en,
.toc-manifesto p .en,
.org-shift .en {
  display: block;
  color: inherit;
  font-size: 1em;
  line-height: 1.25;
}

.slide-thesis .ko,
.toc-manifesto p .ko,
.org-shift .ko {
  display: block;
  margin-block-start: var(--space-2xs);
  color: var(--color-muted);
  font-size: 0.42em;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  word-break: keep-all;
}

/* the closing statement is display-sized, so its Korean line needs to be
   proportionally smaller still */
.slide--closing h2 .ko {
  font-size: 0.3em;
  font-weight: 500;
}

/* keep the strike-through/highlight styling working inside the English span */
.org-shift .en s {
  color: var(--color-muted);
}

.closing-sub .en { display: block; }
.closing-sub .ko {
  display: block;
  margin-block-start: var(--space-xs);
  color: var(--color-muted);
  font-size: 0.72em;
  font-weight: 500;
  line-height: 1.5;
  word-break: keep-all;
}


/* ============================================================
   14 · Layout pass — measured slide by slide at 1920x1080.
   Fixes (a) three slides whose content was clipped by the frame,
   (b) the dead bands the reference-strip removal left behind, and
   (c) emphasis captions that rendered at three different sizes.
   ============================================================ */

/* 14a · Slides 12 and 17 ran 77-78px past the 1080px frame, so the
   SAME LAW strip was cut through top and bottom. The 40px row rhythm
   is what costs the most on a five-block slide — 24px buys it back. */
.slide--agent-why,
.slide--physical {
  row-gap: var(--space-md);
}

.slide--agent-why .paper-figure--band .paper-figure__image img {
  max-height: 15.5rem;
}

/* 14b · Slide 24's appendix overflowed by 43px — the AGENTIC AI column
   carries 8 entries against the other columns' 5-7, and its last title
   wraps. Tighten the entry rhythm rather than moving papers between
   topical columns. */
.slide--references {
  row-gap: var(--space-md);
}

.slide--references .reference-columns {
  row-gap: var(--space-md);
}

.slide--references .reference-columns > div {
  gap: 0.375rem;
}

/* 14c · Slide 2: the agenda list sat in a 554px track using only 325px,
   leaving a 229px hole above the manifesto. Let the seven items spread
   across the track they already own. */
.slide--toc .toc-list {
  align-self: stretch;
  align-content: space-between;
}

.slide--toc .toc-list li {
  padding-block: var(--space-sm);
}

/* 14d · Slide 6: a 1fr spacer pinned the footnote to the floor and left a
   433px void in the middle. Spread the four blocks instead, and let the
   three investment cards absorb the height they were starved of. */
.slide--meta {
  grid-template-rows: auto auto auto auto;
  align-content: space-between;
}

.slide--meta .invest-list a {
  padding-block: var(--space-xl);
}

/* 14e · Slide 21: same spacer pattern — the matrix used 413px of a 653px
   track. Let its four rows breathe into the full height. */
.slide--common .common-matrix {
  align-self: stretch;
  align-content: space-between;
}

/* 14f · Slide 23: the closing statement and its supporting paragraph were
   stacked in the left half, leaving the right half of the frame empty.
   Set the statement against the support text instead. */
.slide--closing:not(.slide--thanks) .closing-copy {
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  column-gap: var(--space-3xl);
  align-items: end;
}

.slide--closing:not(.slide--thanks) .closing-copy > p:first-child,
.slide--closing:not(.slide--thanks) .closing-copy h2 {
  grid-column: 1;
}

.slide--closing:not(.slide--thanks) .closing-copy h2 {
  max-width: none;
}

.slide--closing:not(.slide--thanks) .closing-sub {
  grid-column: 2;
  grid-row: 2;
  max-width: none;
  margin-block-start: 0;
  align-self: end;
}

/* 14g · Slide 25: the thank-you block hugged the top-left with a 344px gap
   above the footer rule. Centre it in the space above the rule and stand
   the QR beside the headline rather than under it. */
.slide--thanks {
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: stretch;
}

.slide--thanks .closing-copy {
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--space-3xl);
  align-content: center;
  align-self: center;
}

.slide--thanks .closing-copy > p:first-child,
.slide--thanks .closing-copy h2,
.slide--thanks .closing-sub {
  grid-column: 1;
}

/* Span from the headline row down, not from the eyebrow — spanning the
   eyebrow row inflates it and tears the label off its headline.
   `span 2` rather than `/ -1`: the rows here are implicit, so -1 resolves
   back to line 1 and throws the QR up beside the eyebrow. */
.slide--thanks .closing-qr {
  grid-column: 2;
  grid-row: 2 / span 2;
  align-self: end;
  justify-self: end;
  margin-block-start: 0;
}

/* 14h · The Korean caption under a large emphasis line was resolving to
   12.8px, 13.1px and 15.1px depending on which block it sat in — small
   enough to read as a rendering fault rather than a caption. Keep it far
   below the English line, but hold one consistent floor. */
.slide-thesis .ko,
.toc-manifesto p .ko,
.org-shift .ko {
  font-size: max(0.42em, 1.05rem);
}

/* The closing slide's supporting paragraph sits on a smaller English line, so
   its 0.72em landed at 13.8px — under the floor the other captions share. */
.closing-sub .ko {
  font-size: max(0.72em, 1.05rem);
}

/* Slide 22's Korean caption carried a <strong> that kept the deck-wide
   2.68rem heading size, so half the caption rendered at display size in
   accent red while the other half was 13px grey. */
.org-shift .ko strong,
.org-shift .ko s,
.slide-thesis .ko strong,
.toc-manifesto p .ko strong {
  font-size: 1em;
}


/* 15 · Slide 2 split into a message slide and an agenda slide.
   The message slide gets its own block rather than reusing .toc-manifesto,
   whose two-column baseline grid put the supporting line beside the statement
   and, once collapsed to one column, ahead of it. */
.slide--message {
  align-content: center;
  row-gap: var(--space-3xl);
}

.message-body {
  display: grid;
  gap: var(--space-lg);
  padding-block-start: var(--space-xl);
  border-block-start: var(--rule-heavy) solid var(--color-ink);
}

.message-line {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-display-s);
  font-weight: 700;
  line-height: 1.1;
}

.message-line .en { display: block; color: inherit; }

.message-line .ko {
  display: block;
  margin-block-start: var(--space-xs);
  color: var(--color-muted);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.4;
  word-break: keep-all;
}

.message-loop {
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.message-loop .en { display: block; }

.message-loop .ko {
  display: block;
  margin-block-start: var(--space-2xs);
  color: var(--color-muted);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0;
}

.message-loop i {
  margin-inline: var(--space-xs);
  color: var(--color-ink-2);
  font-style: normal;
  font-weight: 500;
}

.message-note {
  margin: 0;
  color: var(--color-ink-2);
  font-size: var(--text-xl);
  line-height: 1.5;
  word-break: keep-all;
}

.slide--toc {
  grid-template-rows: auto minmax(0, 1fr);
}

.slide--toc .toc-list li {
  padding-block: var(--space-md);
}


/* ============================================================
   16 · Breathing room. The deck ran 64px side margins on a 1920px
   canvas — 3.3% — so every slide read edge-to-edge. Content is
   unchanged; only the frame around it moves.
   ============================================================ */
.slide {
  padding-inline: 7rem;
  padding-block-end: 5rem;
}

/* The wider frame costs horizontal room, so the two densest text slides need
   one step off their block rhythm to stay inside the frame. */
.slide--trend,
.slide--autodata {
  row-gap: var(--space-md);
}

/* Vertical rhythm: 24px between major blocks was tight for a 1080px frame.
   The dense slides keep their own tighter gap from rules 14a and 16. */
.slide:not(.slide--agent-why):not(.slide--physical):not(.slide--trend):not(.slide--autodata):not(.slide--references) {
  row-gap: var(--space-xl);
}

/* 17 · Slide 9 split: the premise and the static/dynamic framing get their own
   slide, the method tables and the RHO-LOSS figure get the next one. */
.slide--quality-intro {
  align-content: center;
  row-gap: var(--space-2xl);
}

.slide--quality-intro .quality-premise {
  font-size: var(--text-lg);
  line-height: 1.6;
}

.slide--quality-intro .why-env > div {
  padding-block: var(--space-xl);
  gap: var(--space-sm);
}

.slide--quality-intro .why-env p {
  font-size: var(--text-md);
  line-height: 1.65;
}

.slide--quality-intro .why-env b {
  font-size: var(--text-2xl);
}

/* The methods slide left its tables clustered at the top. Let the two method
   blocks and the figure grow into the height they now own. */
.slide--quality:not(.slide--quality-intro) .quality-methods {
  align-self: stretch;
  align-items: stretch;
}

.slide--quality:not(.slide--quality-intro) .quality-method {
  display: grid;
  align-content: start;
  gap: var(--space-md);
  padding-block: var(--space-lg);
}

.slide--quality:not(.slide--quality-intro) .quality-method li {
  padding-block: var(--space-xs);
}

.slide--quality:not(.slide--quality-intro) .paper-figure--col .paper-figure__image img {
  max-height: 20rem;
}

/* Let the methods row take the remaining height rather than sitting start-aligned. */
/* Size the methods row to its content and let the slide centre it, rather than
   stretching the row and tearing each block's innards apart. */
.slide--quality:not(.slide--quality-intro) {
  align-content: center;
}

.slide--quality:not(.slide--quality-intro) .quality-methods {
  align-self: center;
  align-items: start;
}

.slide--autodata {
  row-gap: var(--space-sm);
}

/* 18 · Slide 6's five bottleneck labels lead in English with the Korean kept
   as the small caption the rest of the deck uses. */
.slide--bottleneck .plain-list b {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-xs);
}

.slide--bottleneck .plain-list b .en {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.slide--bottleneck .plain-list b .ko {
  color: var(--color-muted);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0;
}

/* 19 · Slide 9: set the header off from the body with the same rule the
   message slide uses, so the title block reads as its own band. */
.slide--quality-intro .quality-premise {
  padding-block-start: var(--space-xl);
  border-block-start: var(--rule-heavy) solid var(--color-ink);
}

/* 20 · Slide 11 split: the Autodata case slide carries only the role flow and
   its closing line, so let the flow take the height it now owns. */
.slide--autodata-case {
  align-content: center;
  row-gap: var(--space-2xl);
}

.slide--autodata-case .autodata-flow {
  align-self: center;
  gap: var(--space-lg);
}

.slide--autodata-case .role {
  padding-block: var(--space-xl);
}

/* 21 · Slide 14 split: the "why" slide is now head + contrast + law strip, so
   the two contrast columns take the height the figure used to occupy. */
.slide--agent-why:not(.slide--agent-env) .env-diff__col {
  padding-block: var(--space-xl);
}

.slide--agent-why:not(.slide--agent-env) .env-diff__col p {
  font-size: var(--text-md);
  line-height: 1.7;
}

.slide--agent-why:not(.slide--agent-env) .env-diff__col b {
  font-size: var(--text-2xl);
}

.slide--agent-env .paper-figure--band .paper-figure__image img {
  max-height: 19rem;
}

/* 22 · Slide "하나의 공통 구조": the DOMAIN column ate 1.15fr and the four data
   columns were left-clustered with the row text sitting small at the top.
   Even the tracks out and lift the type. */
.slide--common .matrix-row {
  grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr));
  column-gap: var(--space-lg);
}

.slide--common .matrix-row > * {
  align-content: center;
  padding-inline: 0;
}

.slide--common .matrix-row b {
  font-size: var(--text-xl);
}

.slide--common .matrix-row span {
  font-size: var(--text-md);
}

.slide--common .matrix-row--head span {
  font-size: var(--text-base);
}

.slide--common .common-loop {
  font-size: var(--text-lg);
  gap: var(--space-sm);
}

/* 23 · Closing slide: the accent red ran through the headline, its Korean and
   the whole supporting paragraph. Keep it on the statement only. */
.slide--closing:not(.slide--thanks) .closing-sub,
.slide--closing:not(.slide--thanks) .closing-sub .en {
  color: var(--color-ink);
}

.slide--closing:not(.slide--thanks) h2 .ko {
  color: var(--color-ink-2);
}

/* 24 · The Autodata case slide needs to out-specify rule 8's centring chain. */
.slide.slide--autodata-case:not(.slide--cover) {
  align-content: center;
  row-gap: var(--space-2xl);
}

.slide--autodata-case {
  align-content: center !important;
  grid-template-rows: none !important;
}

/* 21 · Slide 03 (Agenda): 목차를 1열로 — 제목 블록과 큰 여백으로 분리하고,
   7개 항목이 남은 높이를 고르게 나눠 갖는다. */
.slide--toc {
  gap: var(--space-2xl);
}

.toc-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.slide--toc .toc-list li {
  padding-block: var(--space-sm);
}

/* 22 · Slide 11: AUTODATA 단독 그림이 넓게 비어 보였다 — 만드는 시스템/고르는 시스템
   두 사례를 나란히 두고, 반폭에서는 설명을 그림 위로 쌓는다. */
.autodata-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}

.autodata-pair .paper-figure__image--annotated {
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  gap: var(--space-sm);
  padding-block: var(--space-sm);
}

.slide--autodata .autodata-pair .paper-figure__image {
  min-height: 0;
}

.autodata-pair .figure-note {
  font-size: var(--text-base);
}

/* The Autodata figure belongs beside the role flow on the case slide. */
.slide--autodata-case .paper-figure--inline .paper-figure__image {
  min-height: 0;
}

.slide--autodata-case .paper-figure--inline .paper-figure__image img {
  max-height: 17rem;
}

.slide--autodata-case .paper-figure--inline .paper-figure__image img {
  max-height: 14.5rem;
}

.slide--autodata-case .role {
  padding-block: var(--space-lg);
}

/* 22a · pair에 사례가 하나만 남으면(12쪽과의 중복 정리) 전폭으로 펴고
   설명-그림을 다시 좌우로 눕힌다. */
.autodata-pair > .paper-figure:only-child {
  grid-column: 1 / -1;
}

.autodata-pair > .paper-figure:only-child .paper-figure__image--annotated {
  grid-template-columns: minmax(0, 0.45fr) minmax(0, 1fr);
  gap: var(--space-md);
}

.slide--autodata .autodata-pair > .paper-figure:only-child .paper-figure__image {
  min-height: 17rem;
}
