/* Presentation (deck) entity: slide pages under /notes/<slug>/ that render as decks.
   Loads after base.css; tokens come from base.css. */

html, body { min-height: 100%; }
button, a { font: inherit; }
a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
p, h1, h2, h3, ul, ol, blockquote { margin: 0; }
button { color: inherit; }

.deck { min-height: 100vh; }
.slide {
  display: none;
  min-height: 100vh;
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 64px) clamp(28px, 6vw, 88px) 86px;
  position: relative;
}
.slide.active { display: grid; grid-template-rows: auto 1fr; animation: enter 180ms ease-out; }
@keyframes enter { from { opacity: .2; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.topline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.content { display: flex; flex-direction: column; justify-content: center; gap: clamp(22px, 3vh, 38px); }
.content.centered { align-items: center; padding-block: clamp(36px, 6vh, 80px); text-align: center; }
.content.centered .lede, .content.centered .source { margin-left: auto; margin-right: auto; }
.content.centered .source { margin-top: 0; }
.content.top { justify-content: flex-start; padding-top: clamp(36px, 7vh, 90px); }
.kicker { color: var(--warm); font-size: 13px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, .display { font-family: var(--display); font-weight: 500; letter-spacing: -.02em; }
h1 { max-width: 1040px; font-size: clamp(58px, 7.4vw, 112px); line-height: .92; }
h2 { max-width: 1100px; font-size: clamp(45px, 5.2vw, 78px); line-height: .98; }
.discussion-title { max-width: 1040px; font-size: clamp(58px, 7.4vw, 112px); line-height: .92; }
h3 { font-size: 16px; line-height: 1.3; }
em { color: var(--warm); font-style: italic; }
.lede { max-width: 900px; color: var(--muted); font-size: clamp(19px, 2vw, 28px); line-height: 1.45; }
.big-line { max-width: 1100px; font-family: var(--display); font-size: clamp(36px, 4.7vw, 68px); line-height: 1.04; }
.small { color: var(--muted); font-size: 13px; line-height: 1.5; }
.source { margin-top: auto; padding-top: 18px; color: var(--soft); font-size: 11px; line-height: 1.4; }
.prose { max-width: 1040px; display: grid; gap: 16px; color: var(--muted); font-size: clamp(17px, 1.55vw, 22px); line-height: 1.55; }
.prose strong { color: var(--ink); font-weight: 650; }
.claim { max-width: 1060px; padding: 20px 24px; border-left: 2px solid var(--warm); color: var(--muted); font-size: 17px; line-height: 1.55; }
.claim strong { color: var(--ink); }
.tool-link { display: inline-flex; align-items: baseline; gap: 7px; text-decoration: none; }
.tool-link::after { content: "↗"; color: var(--warm); font-size: 12px; }
.tool-link:hover { color: var(--accent); }
.definition { margin-bottom: 9px; color: var(--ink) !important; font-weight: 550; }
.use { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px !important; }

.motif { display: flex; align-items: center; gap: 8px; color: var(--warm); }
.motif::before, .motif::after { content: ""; width: 42px; height: 1px; background: currentColor; }
.motif span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.grid-2, .grid-3, .metric-grid, .experiment-grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card > .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.card > .metric-grid .metric strong { font-size: clamp(30px, 3vw, 44px); }
.experiment-grid { grid-template-columns: 1fr 120px 1fr; align-items: stretch; }

.card {
  min-width: 0;
  padding: 22px;
  border-top: 1px solid var(--ink);
  background: var(--surface);
}
.card h3 { margin-bottom: 10px; }
.card p, .card li { color: var(--muted); font-size: 15px; line-height: 1.55; }
.card ul { padding-left: 18px; }
.card li + li { margin-top: 6px; }
.card.warm { border-color: var(--warm); }
.card.accent { border-color: var(--accent); }

.metric { padding: 18px 0; border-top: 1px solid var(--line); }
.metric strong { display: block; font-family: var(--display); font-size: clamp(36px, 4vw, 58px); font-weight: 500; line-height: 1; }
.metric span { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.35; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.compare > div { padding: 28px 28px 32px 0; }
.compare > div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.compare .display { margin: 10px 0 14px; font-size: clamp(34px, 4vw, 58px); line-height: 1; }
.compare p:last-child { color: var(--muted); line-height: 1.55; }

.flow { display: grid; grid-template-columns: 1fr 70px 1fr 70px 1fr; align-items: center; gap: 8px; }
.flow-box { min-height: 180px; padding: 24px; border-top: 2px solid var(--ink); background: var(--surface); }
.flow-box strong { display: block; margin-bottom: 10px; font-family: var(--display); font-size: 34px; font-weight: 500; }
.flow-box span { color: var(--muted); font-size: 14px; line-height: 1.5; }
.arrow { color: var(--warm); text-align: center; font-family: var(--display); font-size: 46px; }

.workflow-figure { margin: -4px 0 0; }
.workflow-figure svg { display: block; width: 100%; height: auto; max-height: 178px; overflow: visible; }
.workflow-node rect { transition: fill 160ms ease, stroke-width 160ms ease; }
.workflow-node.hot rect { fill: var(--surface-raised); stroke-width: 2.3; }
.workflow-label { transition: fill 160ms ease, font-weight 160ms ease; }
.workflow-label.hot { fill: var(--warm); font-weight: 700; }
.workflow-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 8px; }
.workflow-details p { padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.45; }
.workflow-details strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 14px; }

.bars { display: grid; gap: 12px; max-width: 1060px; }
.bar { display: grid; grid-template-columns: 150px minmax(0, 1fr) 76px; gap: 14px; align-items: center; }
.bar-name, .bar-value { font-size: 13px; font-weight: 650; }
.bar-value { text-align: right; color: var(--muted); }
.track { display: block; height: 22px; background: var(--track); overflow: hidden; }
.fill { display: block; min-width: 4px; height: 100%; width: var(--w); background: var(--accent); }
.bar.wait .fill { background: var(--warm); }

.loop { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 12px; }
.loop .node { min-height: 130px; padding: 20px; border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; }
.node strong { font-family: var(--display); font-size: 28px; font-weight: 500; }
.node span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.decision { color: var(--warm); font-size: 28px; }

.verse { max-width: 1080px; padding-left: 26px; border-left: 2px solid var(--warm); }
.verse p { font-family: var(--display); font-size: clamp(34px, 4vw, 58px); line-height: 1.12; }
.verse footer { margin-top: 18px; color: var(--muted); font-size: 14px; }

.equal { display: flex; align-items: center; justify-content: center; color: var(--warm); font-family: var(--display); font-size: 58px; }
.arm-title { font-family: var(--display); font-size: 34px; font-weight: 500; }
.arm-model { margin-top: 12px; color: var(--warm); font-size: 14px; font-weight: 650; }
.arm-list { margin-top: 18px; padding-left: 18px; color: var(--muted); font-size: 14px; line-height: 1.55; }

.controls {
  position: fixed;
  z-index: 10;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 22px;
  border-top: 1px solid var(--line);
  background: var(--overlay);
  backdrop-filter: blur(10px);
}
.control-group { display: flex; align-items: center; gap: 10px; }
.controls button { border: 0; background: transparent; cursor: pointer; padding: 4px 8px; font-weight: 650; }
.controls button:hover { color: var(--accent); }
.controls button:disabled { cursor: not-allowed; opacity: .35; }
.back-link { padding-right: 14px; border-right: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 650; text-decoration: none; }
.back-link:hover { color: var(--accent); }
.counter { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.progress { flex: 1; max-width: 220px; height: 2px; background: var(--line); }
.progress span { display: block; width: 0; height: 100%; background: var(--warm); transition: width 160ms ease; }
.hint { color: var(--soft); font-size: 11px; }

.notes {
  display: none;
  position: fixed;
  z-index: 20;
  right: 18px;
  bottom: 66px;
  width: min(480px, calc(100vw - 36px));
  max-height: 42vh;
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--ink);
  background: var(--surface-raised);
  box-shadow: 0 16px 50px var(--shadow);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.notes.visible { display: block; }
.notes::before { content: "Presenter note"; display: block; margin-bottom: 8px; color: var(--ink); font-weight: 650; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }

@media (max-width: 880px) {
  .slide { min-height: auto; padding-bottom: 96px; }
  .slide.active { min-height: 100vh; }
  .grid-2, .grid-3, .metric-grid, .compare, .experiment-grid { grid-template-columns: 1fr; }
  .flow, .loop { grid-template-columns: 1fr; }
  .flow-box { min-height: 0; }
  .arrow, .decision { transform: rotate(90deg); }
  .workflow-details { grid-template-columns: 1fr; gap: 7px; }
  .workflow-details p { padding-top: 7px; }
  .equal { min-height: 70px; }
  .compare > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .bar { grid-template-columns: 92px minmax(0, 1fr) 56px; }
  .hint { display: none; }
  .back-link { max-width: 76px; line-height: 1.2; }
}

@media (prefers-reduced-motion: reduce) {
  .slide.active { animation: none; }
  .progress span { transition: none; }
}

@media print {
  @page { size: landscape; margin: 0; }
  .slide, .slide.active { display: grid; min-height: 100vh; break-after: page; page-break-after: always; }
  .controls, .notes { display: none !important; }
}
