/* Presentation view */

.view-deck { position: fixed; inset: 0; display: none; flex-direction: column; background: var(--surface); }
body[data-view="deck"] .view-deck { display: flex; }

.deck-stage { flex: 1 1 auto; min-height: 0; padding: 28px 28px 12px; }
.deck {
  position: relative; height: 100%; width: 100%; max-width: 1360px; margin: 0 auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); overflow: hidden;
}
.deck:focus { outline: none; }
.deck:focus-visible { outline: 2px solid var(--brand-mid); outline-offset: 2px; }

.slide {
  position: absolute; inset: 0;
  padding: clamp(28px, 4.2vh, 56px) clamp(32px, 4.4vw, 72px);
  display: flex; flex-direction: column; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .28s ease, transform .28s ease, visibility .28s;
  overflow: auto;
}
.slide.is-active { opacity: 1; visibility: visible; transform: none; }

.slide-eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--brand-mid); margin-bottom: 18px; flex: 0 0 auto;
}
.slide h2 {
  font-size: clamp(26px, 3.1vw, 40px); letter-spacing: -0.025em; line-height: 1.14;
  max-width: 26ch; flex: 0 0 auto;
}
.slide h2.wide { max-width: 32ch; }
.slide-sub {
  margin-top: 16px; font-size: clamp(15px, 1.25vw, 19px); color: var(--ink-2);
  line-height: 1.55; max-width: 62ch; flex: 0 0 auto;
}
.slide-body { margin-top: clamp(20px, 3vh, 36px); flex: 0 1 auto; min-height: 0; }
.slide-note {
  margin-top: 20px; font-size: 13px; color: var(--ink-4); flex: 0 0 auto;
}

/* Title slide */
.slide-title { justify-content: center; }
.slide-title.has-figure {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 3.5vw, 56px); align-items: center; align-content: center;
}
.title-copy { min-width: 0; }
.title-figure {
  margin: 0; align-self: stretch; display: flex; border-radius: var(--r); overflow: hidden;
  background: var(--surface-2); max-height: 100%;
}
.title-figure img { display: block; width: 100%; height: 100%; object-fit: cover; }
.slide-title .kicker {
  font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--brand-mid);
}
.slide-title h1 {
  margin-top: 22px; font-size: clamp(32px, 4.2vw, 56px); letter-spacing: -0.035em; line-height: 1.08; max-width: 20ch;
}
.quotebox {
  margin-top: 32px; padding: 22px 26px; border-left: 3px solid var(--brand);
  background: var(--brand-tint); border-radius: 0 var(--r) var(--r) 0; max-width: 70ch;
}
.quotebox p { font-size: clamp(16px, 1.5vw, 21px); line-height: 1.5; color: var(--ink); }
.titlemeta { margin-top: 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 20px 28px; }
.titlemeta div { min-width: 0; }
.titlemeta dt { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-4); font-weight: 600; }
.titlemeta dd { margin: 5px 0 0; font-size: 15px; color: var(--ink-2); }

/* Coordinate / assumptions */
.coord-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.coord-cell { background: var(--paper); padding: 16px 18px; }
.coord-cell dt { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4); font-weight: 600; }
.coord-cell dd { margin: 6px 0 0; font-size: 15px; color: var(--ink); line-height: 1.4; }

.assume-list { list-style: none; margin-top: 26px; display: grid; gap: 10px; }
.assume-list li { display: flex; gap: 12px; font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.assume-list li::before {
  content: ""; flex: 0 0 auto; width: 7px; height: 7px; margin-top: 8px;
  border: 1px solid var(--brand-mid); border-radius: 1px;
}

/* Process chain */
.chain { display: flex; gap: 6px; margin-top: 8px; }
.chain-step {
  flex: 1 1 0; min-width: 0; padding: 18px 16px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  position: relative;
}
.chain-step.on { background: var(--brand-tint); border-color: var(--brand-mid); }
.chain-num { font-size: 11px; font-weight: 600; letter-spacing: .1em; color: var(--ink-4); }
.chain-step.on .chain-num { color: var(--brand); }
.chain-label { margin-top: 6px; font-size: clamp(14px, 1.15vw, 17px); font-weight: 600; color: var(--ink-3); }
.chain-step.on .chain-label { color: var(--brand-dark); }
.chain-note { margin-top: 8px; font-size: 13px; line-height: 1.4; color: var(--ink-4); }
.chain-step.on .chain-note { color: var(--ink-2); }
.chain-flag {
  position: absolute; top: -1px; left: -1px; right: -1px; height: 3px;
  background: var(--brand); border-radius: var(--r) var(--r) 0 0;
}

/* Evidence figures */
.figs { display: grid; gap: 18px; }
.figs-1 { grid-template-columns: minmax(0, 760px); }
.figs-2 { grid-template-columns: repeat(2, 1fr); }
.figs-3 { grid-template-columns: repeat(3, 1fr); }
.fig { margin: 0; }
.fig img {
  display: block; width: 100%; height: clamp(170px, 38vh, 400px); object-fit: cover;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2);
}
/* A single figure is the evidence, not decoration — show all of it */
.figs-1 .fig img { object-fit: contain; }
.fig figcaption { margin-top: 10px; font-size: 13px; line-height: 1.45; color: var(--ink-3); }

/* Mechanism list */
.mech { list-style: none; display: grid; gap: 16px; counter-reset: m; max-width: 92ch; }
.mech li { display: flex; gap: 16px; counter-increment: m; }
.mech li::before {
  content: counter(m); flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  background: var(--signal-tint); color: var(--signal); font-size: 13px; font-weight: 600;
  display: grid; place-items: center; margin-top: 2px;
}
.mech p { font-size: clamp(14px, 1.15vw, 17px); line-height: 1.55; color: var(--ink-2); }

/* Artifact table */
.atable { width: 100%; border-collapse: collapse; font-size: clamp(13px, 1.05vw, 15px); }
.atable th {
  text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4);
  font-weight: 600; padding: 0 16px 10px 0; border-bottom: 1px solid var(--line);
}
.atable td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; color: var(--ink-2); line-height: 1.45; }
.atable td:first-child { color: var(--ink); font-weight: 600; width: 20%; }
.atable td:last-child { padding-right: 0; }
.atable .fix { color: var(--ok); }

/* Stat row */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stat { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); border-top: 3px solid var(--signal); }
.stat-v { font-size: clamp(24px, 2.6vw, 34px); font-weight: 600; letter-spacing: -0.03em; color: var(--ink); line-height: 1.1; }
.stat-u { margin-top: 4px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--signal); font-weight: 600; }
.stat-l { margin-top: 12px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }

/* Pillars / target */
.pillars { display: grid; gap: 14px; }
.pillar { display: flex; gap: 18px; align-items: flex-start; padding: 20px 22px; background: var(--ok-tint); border-radius: var(--r); }
.pillar-tag {
  flex: 0 0 auto; min-width: 92px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ok); padding-top: 3px;
}
.pillar p { font-size: clamp(14px, 1.2vw, 17px); line-height: 1.5; color: var(--ink); }

/* Method steps */
.mtable { width: 100%; border-collapse: collapse; font-size: clamp(13px, 1vw, 15px); }
.mtable th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4); font-weight: 600; padding: 0 18px 10px 0; border-bottom: 1px solid var(--line); }
.mtable td { padding: 13px 18px 13px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; line-height: 1.45; color: var(--ink-2); }
.mtable td.step { width: 12%; color: var(--brand); font-weight: 600; }
.mtable td.act { width: 34%; color: var(--ink); font-weight: 500; }
.mtable td:last-child { padding-right: 0; }

/* Product cards */
.prods { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.prod {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  border-left: 3px solid var(--brand); overflow: hidden; display: flex; flex-direction: column;
}
.prod-img { background: var(--surface-2); border-bottom: 1px solid var(--line-soft); }
.prod-img img { display: block; width: 100%; height: 104px; object-fit: contain; padding: 8px 0; }
.prod-body { padding: 16px 18px 18px; }
.prod-role { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4); font-weight: 600; }
.prod h3 { margin-top: 6px; font-size: clamp(17px, 1.5vw, 21px); letter-spacing: -0.015em; }
.prod p { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.prod .why { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); font-size: 14px; color: var(--brand-dark); }

/* Five or more options: three compact columns instead of one clipped row */
.prods.many { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.prods.many .prod-body { padding: 12px 14px 14px; }
.prods.many .prod-img img { height: 66px; padding: 6px 0; }
.prods.many .prod h3 { font-size: clamp(15px, 1.25vw, 18px); }
.prods.many .prod p { margin-top: 6px; font-size: 12.5px; line-height: 1.42; }
.prods.many .prod .why { margin-top: 8px; padding-top: 8px; font-size: 12.5px; }

/* Proof */
.proofs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.proof { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.proof h3 { font-size: clamp(16px, 1.4vw, 20px); color: var(--brand-dark); letter-spacing: -0.015em; }
.proof p { margin-top: 10px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.proof .cite { margin-top: 12px; font-size: 12px; color: var(--ink-4); }

/* Simple two-column list */
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 32px; }
.tick { list-style: none; display: grid; gap: 12px; }
.tick li { display: flex; gap: 12px; font-size: clamp(14px, 1.1vw, 16px); line-height: 1.5; color: var(--ink-2); }
.tick li strong { color: var(--ink); font-weight: 600; }
.tick li::before {
  content: ""; flex: 0 0 auto; width: 8px; height: 8px; margin-top: 8px; background: var(--brand); border-radius: 1px;
}

/* Next steps */
.steps-num { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 32px; counter-reset: s; }
.steps-num li { counter-increment: s; display: flex; gap: 16px; }
.steps-num li::before {
  content: counter(s); flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 14px; font-weight: 600; display: grid; place-items: center;
}
.steps-num h3 { font-size: clamp(15px, 1.3vw, 18px); }
.steps-num p { margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }

/* Deck bar */
.deck-bar { flex: 0 0 auto; background: var(--paper); border-top: 1px solid var(--line); }
.deck-bar-in {
  max-width: 1360px; margin: 0 auto; padding: 12px 28px;
  display: flex; align-items: center; gap: 20px;
}
.deck-nav { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.deck-count { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 52px; text-align: center; }
.deck-title { flex: 1 1 auto; min-width: 0; font-size: 14px; color: var(--ink-3); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-cta { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.deck-progress { height: 2px; background: var(--surface-2); }
.deck-progress span { display: block; height: 100%; background: var(--brand); transition: width .28s ease; }

.deck-keys { font-size: 12px; color: var(--ink-4); margin-left: 8px; white-space: nowrap; }

/* Overview */
.overview { position: fixed; inset: 0; z-index: 60; background: rgba(12,25,39,.55); display: grid; place-items: center; padding: 32px; }
.overview-in { width: min(640px, 100%); max-height: 80vh; overflow: auto; background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.overview-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--paper); }
.overview-head h2 { font-size: 18px; }
.overview-list { list-style: none; padding: 10px 0 14px; counter-reset: o; }
.overview-list li { counter-increment: o; }
.overview-list button {
  width: 100%; text-align: left; font: inherit; font-size: 15px; background: none; border: none; cursor: pointer;
  padding: 11px 26px; color: var(--ink-2); display: flex; gap: 16px;
}
.overview-list button::before { content: counter(o); color: var(--ink-4); font-variant-numeric: tabular-nums; min-width: 18px; }
.overview-list button:hover { background: var(--surface); color: var(--ink); }
.overview-list li.on button { color: var(--brand); font-weight: 600; }

@media (max-width: 900px) {
  .deck-stage { padding: 12px 12px 8px; }
  .stats, .proofs, .cols2, .steps-num, .prods.many { grid-template-columns: 1fr; }
  .chain { flex-wrap: wrap; }
  .chain-step { flex: 1 1 30%; }
  .deck-title, .deck-keys { display: none; }
  .deck-bar-in { padding: 10px 14px; }
}


/* ── Answer mode (knowledge-graph slides) ── */
.conf { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; }
.conf-high { background: var(--ok-tint); color: var(--ok); }
.conf-medium { background: var(--brand-tint); color: var(--brand-dark); }
.conf-low, .conf-none { background: var(--signal-tint); color: var(--signal); }
.answer-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 32px; margin-top: 24px; align-items: start; }
.answer-side { padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); font-size: 14px; color: var(--ink-2); }
.answer-side p { margin: 0; }
.answer-side .btn { margin-top: 12px; }
.side-k { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4); font-weight: 600; margin-top: 14px !important; margin-bottom: 3px !important; }
.answer-side .side-k:first-child { margin-top: 0 !important; }
.quote-sm { margin-top: 22px; padding: 12px 18px; }
.quote-sm p { font-size: 14px; color: var(--ink-2); }
.diag-material { padding: 14px 18px; background: var(--sky); border-left: 3px solid var(--brand-mid); border-radius: 0 var(--r) var(--r) 0; margin-bottom: 18px; max-width: 100ch; }
.diag-k { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-dark); font-weight: 600; }
.diag-material p { margin-top: 6px; font-size: clamp(13px, 1.1vw, 15px); line-height: 1.5; color: var(--ink-2); }
.diag-pains { display: grid; gap: 12px; margin-top: 18px; }
.cons { margin-top: 20px; }
.cons-k { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4); font-weight: 600; margin-bottom: 10px; }
.cons-list { grid-template-columns: 1fr 1fr; display: grid; gap: 8px 28px; }
.cons-list li { font-size: 13.5px; }
.cons-list em { color: var(--ink-4); font-style: normal; }
.trace td.num, .trace th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.trace td:first-child { width: 26%; color: var(--brand-dark); }
.src-list { list-style: none; display: grid; gap: 6px; }
.src-list a { font-size: 13px; border-bottom: none; }
.steps-1col { grid-template-columns: 1fr; gap: 12px; max-width: 100ch; }
.steps-1col p { font-size: clamp(13px, 1.15vw, 16px); margin-top: 0; }
@media (max-width: 900px) { .answer-two, .cons-list { grid-template-columns: 1fr; } }
