/**
 * The rules presentation. Slides are drawn on a fixed 1920×1080 canvas (px
 * below are canvas pixels, like Keynote points) and the whole canvas is
 * scaled to the window, so nothing reflows or gets cut off on a projector.
 * Black like the Keynote deck; the key art appears on title-type slides.
 */
body.present { background: #000; color: #fff; overflow: hidden; height: 100vh; }

.layout { position: fixed; inset: 0; display: grid; }
.stagebox { position: relative; overflow: hidden; min-width: 0; min-height: 0; background: #000; cursor: pointer; }
.canvas { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; transform-origin: 50% 50%; }
.slide { position: relative; width: 100%; height: 100%; overflow: hidden; background: #000; color: #fff; font-family: var(--font); line-height: 1.2; }
.slide a { cursor: pointer; }

/* ---------- presenter view: slides on the left, notes get the rest ----------
   Long notes (body.long-notes) take the wider column; the type then shrinks
   to fit (present.js fitNotes), so the notes never need scrolling. */
.side, .nextbox { display: none; }
body.presenter .layout {
  --slides: 46%;
  grid-template-columns: minmax(0, var(--slides)) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "main side" "next side";
  gap: 1rem 1.5rem; padding: 1.25rem 1.25rem 4.5rem; background: #111;
}
body.presenter.long-notes .layout { --slides: 34%; }
body.presenter #main { grid-area: main; aspect-ratio: 16 / 9; border-radius: 8px; box-shadow: 0 0 0 1px #2a2a2a; }
body.presenter .nextbox { grid-area: next; display: flex; flex-direction: column; gap: 0.5rem; min-height: 0; }
body.presenter .nextbox .stagebox { width: 70%; }
body.presenter .side { grid-area: side; display: flex; flex-direction: column; min-height: 0; gap: 0.8rem; color: #ddd; }
.side-head { display: flex; align-items: center; gap: 1rem; }
.timer { font-size: 2rem; font-weight: 700; color: #fff; }
.side-head .counter { color: #999; }
.side-head select { margin-left: auto; max-width: 16rem; padding: 0.35rem 0.5rem; border-radius: 4px; border: 1px solid #333; background: #1b1b1b; color: #fff; }
.next-label { font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: #999; }
.stagebox.small { aspect-ratio: 16 / 9; flex: none; border-radius: 6px; box-shadow: 0 0 0 1px #2a2a2a; cursor: default; }
.notes { flex: 1; min-height: 0; overflow: auto; font-size: 1.6rem; line-height: 1.45; color: #f2f2f2; padding-right: 0.5rem; }
.notes .none { color: #777; }

/* ---------- live app screens (market, reveal) inside the deck ---------- */
.live-layer { position: absolute; inset: 0; pointer-events: none; }
.live-frame { position: absolute; inset: 0; width: 1920px; height: 1080px; border: 0; background: #000; visibility: hidden; }
.live-frame.on { visibility: visible; }
.live-reveal.on { pointer-events: auto; }     /* its Begin / Results buttons stay clickable */
.s-live-ph { position: relative; width: 100%; height: 100%; }
.s-live-ph img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.s-live-tag { position: absolute; left: 60px; top: 50px; padding: 14px 28px; border-radius: 999px; background: var(--lux-red); color: #fff; font-size: 44px; font-weight: 700; letter-spacing: 0.06em; }

/* ---------- control bar: hidden on the projector until the mouse moves ---------- */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; align-items: center; gap: 0.9rem; padding: 0.75rem 1.25rem;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.85) 40%);
  font-size: 0.8rem; letter-spacing: 0.08em; color: #aaa;
  opacity: 0; transition: opacity 300ms var(--ease);
}
body.awake .bar, body.presenter .bar, .bar:focus-within { opacity: 1; }
.bar button { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; padding: 0.4rem 0.6rem; border-radius: 4px; color: #ddd; letter-spacing: inherit; }
.bar button:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.bar .keys { margin-left: auto; color: #777; white-space: nowrap; }
.progress { display: flex; gap: 3px; flex: 1; max-width: 30rem; }
.progress i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.16); }
.progress i.done { background: rgba(255, 255, 255, 0.45); }
.progress i.now { background: var(--gold); }
.bar button[hidden] { display: none; }
body.presenter .bar .keys, body.presenter #presenterBtn { display: none; }
.counter { white-space: nowrap; }
@media (max-width: 900px) { .bar .keys, .progress { display: none; } }

/* ---------- sections panel ---------- */
.panel { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 1rem; background: rgba(0, 0, 0, 0.6); }
.panel-card { width: min(34rem, 100%); padding: 1.6rem; border-radius: 10px; background: var(--sheet); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); }
.panel-card h2 { font-size: 1.4rem; }
.panel-sub { margin: 0.4rem 0 1rem; color: var(--ink-3); font-size: 0.95rem; }
.sec-row { display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.75rem 0; border-top: 1px solid var(--rule); cursor: pointer; }
.sec-row input { margin-top: 0.3rem; width: 1.1rem; height: 1.1rem; accent-color: var(--ink); }
.sec-row b { display: block; }
.sec-row small { color: var(--ink-3); font-size: 0.85rem; }
.panel-done { margin-top: 1rem; padding: 0.6rem 1.2rem; border-radius: var(--radius); background: var(--ink); color: #fff; font-weight: 700; }

/* =================================================================
   Slide content (canvas pixels)
   ================================================================= */
.s-full { width: 100%; height: 100%; object-fit: contain; }
.s-pad { height: 100%; padding: 50px 110px 60px; display: flex; flex-direction: column; }
.s-title { font-size: 104px; font-weight: 700; line-height: 1.05; text-align: center; margin-bottom: 36px; }
.s-title.s-left { text-align: left; }
.s-sub { font-size: 84px; font-weight: 400; margin-bottom: 24px; }

/* key-art slides: the art fills the frame, darkened behind the words */
.s-art-wrap { position: relative; width: 100%; height: 100%; }
.s-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 35%; }
.s-art-wrap::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.82) 72%); }
.s-art-wrap > :not(.s-art) { position: relative; z-index: 1; }
.s-title-text, .s-scoring { position: absolute !important; right: 120px; top: 50%; transform: translateY(-50%); width: 860px; text-align: right; }
.s-wordmark, .s-scoring-word { font-size: 124px; font-weight: 700; line-height: 0.95; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gold); text-shadow: 0 6px 40px rgba(0, 0, 0, 0.6); }
.s-tagline { margin-top: 30px; font-size: 46px; font-style: italic; font-weight: 300; line-height: 1.2; }
.s-lockup { display: flex; justify-content: flex-end; margin-top: 60px; }
.s-lockup { align-items: center; gap: 34px; }
.s-lockup .lockup { height: 96px; width: auto; color: #fff; }
.s-with { font-size: 44px; font-weight: 300; color: rgba(255, 255, 255, 0.6); }
.s-partner { height: 64px; width: auto; }   /* Stripe's wordmark box has little padding: 64px matches the lockup's visual weight */
.s-reveal-btn { display: inline-block; margin-top: 56px; padding: 22px 44px; border-radius: 999px; background: var(--gold); color: #000; font-size: 40px; font-weight: 700; text-decoration: none; }
.s-story { position: absolute !important; left: 140px; top: 50%; transform: translateY(-50%); }
.s-art-wrap:has(.s-story)::after { background: linear-gradient(270deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.85) 70%); }
.s-story-word { font-size: 96px; font-weight: 700; }
.s-story-year { font-size: 190px; font-weight: 300; font-style: italic; line-height: 1; }

/* agenda: the current item lit, the rest dimmed */
.s-agenda { list-style: disc; padding-left: 60px; margin-top: 40px; font-size: 62px; line-height: 1.55; }
.s-agenda li { color: rgba(255, 255, 255, 0.32); }
.s-agenda li.now { color: #fff; font-weight: 700; }

/* text slides */
.s-points { list-style: none; font-size: 84px; line-height: 1.25; }
.s-points li + li { margin-top: 40px; }
.s-points-center { align-self: center; margin-top: 50px; }
.s-points-wide { font-size: 74px; line-height: 1.2; }
.s-bullets { list-style: disc; padding-left: 60px; font-size: 58px; line-height: 1.28; text-wrap: pretty; }
.s-bullets li + li { margin-top: 30px; }
.s-bullets-sm { font-size: 52px; }
.s-body { font-size: 64px; line-height: 1.35; text-align: center; }
.s-center { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.s-narrow { max-width: 1400px; margin: 0 auto; }
.s-live { font-size: 170px; font-weight: 700; color: var(--lux-red); line-height: 1; }
.s-huge { font-size: 150px; font-weight: 400; line-height: 1.1; }

.s-split { flex: 1; display: grid; grid-template-columns: auto 1fr; gap: 90px; align-items: center; min-height: 0; }
.s-split-text-first { grid-template-columns: 1fr auto; }
.s-split-text-first .s-points { white-space: nowrap; font-size: 86px; }
.s-photo { height: 780px; width: auto; }
.s-globe { width: 720px; height: auto; }
.s-timeline { list-style: disc; padding-left: 50px; font-size: 56px; line-height: 1.25; text-wrap: pretty; }
.s-timeline li + li { margin-top: 44px; }
.s-timeline b { font-weight: 700; margin-right: 0.3em; }

.s-versus { flex: 1; display: grid; grid-template-columns: 1fr 1fr; align-items: center; text-align: center; }
.s-versus > div { display: grid; justify-items: center; gap: 70px; }
.s-logo { height: 300px; width: auto; }
.s-flag { height: 260px; }
.s-big { font-size: 170px; font-weight: 400; line-height: 1; }

.s-trilemma { position: relative; width: 760px; height: 700px; margin: 40px auto 0; }
.s-trilemma svg { position: absolute; left: 60px; top: 40px; width: 640px; height: auto; }
.s-trilemma span { position: absolute; font-size: 54px; }
.t-top { left: 50%; top: -20px; transform: translateX(-50%); }
.t-left { left: -170px; bottom: 60px; }
.t-right { right: -60px; bottom: 60px; }

/* screenshots and press clippings */
.s-shot, .s-news { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; }
.s-shot img { width: 1240px; height: auto; border-radius: 12px; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.14); }
.s-shot-sm img { width: 1120px; }
.s-news img { width: 1150px; height: auto; }
.s-news-wide img { width: 1560px; }
figcaption { font-size: 46px; text-align: center; }
.s-shot-sm figcaption { font-size: 30px; color: var(--mist); letter-spacing: 0.06em; }

.s-breaking { font-size: 40px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--lux-red); font-weight: 700; margin-bottom: 30px; }
.s-cascade { font-size: 76px; line-height: 1.2; max-width: 1500px; margin-top: 30px; }
.s-cascade b { font-weight: 700; }
.s-cascade-sub { font-size: 60px; color: var(--mist); margin-top: 50px; }

/* Europe's Catch-22: a loop with no way out */
.s-loop { position: relative; width: 1100px; height: 640px; margin: 0 auto; }
.s-loop svg { position: absolute; left: 100px; top: 0; width: 900px; height: 640px; }
.s-loop span { position: absolute; font-size: 54px; white-space: nowrap; }
.l-top { left: 50%; top: 50px; transform: translateX(-50%); }
.l-right { right: -40px; top: 430px; }
.l-left { left: -40px; top: 430px; }
.s-geo { font-size: 48px; text-align: center; margin-top: 10px; }

/* Keynote's word colours */
.c-budget, .c-blue { color: #3d8bff; }
.c-award { color: var(--award); }
.c-spacey, .c-red, .c-spacey-text { color: #ff2b2b; }
.c-green { color: #3ddc6b; }
.c-gold { color: var(--gold); }
.c-pink { color: #ff2d9a; }
