:root {
  --board: #FAF8F3;
  --ink: #2E2D29;
  --cardinal: #8C1515;
  --lagunita: #006CB8;
  --sky: #0098DB;
  --paloverde: #279989;
  --plum: #620059;
  --poppy: #E98300;
  --gray: #9A9A9A;
  --ink-50: rgba(46, 45, 41, 0.5);
  --ink-35: rgba(46, 45, 41, 0.35);
  --ink-15: rgba(46, 45, 41, 0.15);
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  --sans: "Source Sans 3", "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
  --enter: cubic-bezier(.2, .7, .2, 1);
  --move: cubic-bezier(.65, 0, .25, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #E9E6DF;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--serif);
}

#viewport {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
}

#stage {
  position: relative;
  width: 1920px;
  height: 1080px;
  background: var(--board);
  transform-origin: 0 0;
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
}

.slide[data-deck-active] {
  visibility: visible;
  pointer-events: auto;
}

/* ---------- chrome: footer, breadcrumb, question tabs ---------- */

#chrome { position: absolute; inset: 0; pointer-events: none; z-index: 50; }

#footer {
  position: absolute;
  left: 64px;
  right: 64px;
  bottom: 28px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 22px;
  color: var(--ink-50);
}

#footer .logo { height: 48px; display: flex; align-items: center; gap: 16px; }
#footer .logo img { height: 79px; margin: 0 -16px; }
#footer .right { display: flex; gap: 28px; align-items: center; }
#footer .num { min-width: 48px; text-align: right; }

#crumbs {
  position: absolute;
  top: 40px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-50);
  opacity: 0;
  transition: opacity 500ms var(--enter);
}
#crumbs.on { opacity: 1; }

.lc-past h3, .lc-past p { color: var(--gray); }
.lc-past .icon { opacity: 0.35; }
.lc-current h3, .lc-current p { color: var(--cardinal); }

/* ---------- type ---------- */

.statement {
  position: absolute;
  left: 200px;
  right: 200px;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-bottom: 60px;
}
.statement p, .statement h2 { margin: 0; text-wrap: balance; }
.statement .line { font-size: 72px; line-height: 1.18; }
.statement .turn { font-size: 54px; line-height: 1.25; margin-top: 48px; color: var(--ink-50); }
.statement .lead { font-size: 44px; color: var(--ink-50); margin-bottom: 28px; }
.statement .term { font-size: 110px; font-style: italic; color: var(--cardinal); }

.question .line { font-size: 76px; font-style: normal; }
.question .ask {
  font-family: var(--sans);
  font-size: 26px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cardinal);
  margin-bottom: 36px;
}

.header {
  position: absolute;
  left: 140px;
  right: 140px;
  top: 128px;
  font-size: 52px;
  line-height: 1.2;
  text-wrap: balance;
  margin: 0;
  font-weight: 400;
}
.header.center { text-align: center; }

em { font-style: italic; }
.c-cardinal { color: var(--cardinal); }
.c-lagunita { color: var(--lagunita); }
.c-sky { color: var(--sky); }
.c-green { color: var(--paloverde); }
.c-poppy { color: var(--poppy); }
.c-gray { color: var(--gray); }
.c-dim { color: var(--ink-50); }
.sans { font-family: var(--sans); }

.cite {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 92px;
  text-align: center;
  font-family: var(--sans);
  font-size: 22px;
  color: rgba(46, 45, 41, 0.42);
}

.cite a { color: inherit; text-decoration: underline; text-decoration-color: rgba(46, 45, 41, 0.3); text-underline-offset: 3px; pointer-events: auto; }
.cite a:hover { color: var(--lagunita); }

.caption { font-family: var(--sans); font-size: 26px; color: var(--ink-50); }

.stats { position: absolute; font-family: var(--sans); }
.stats dt { font-size: 26px; color: var(--ink-50); margin: 0 0 2px; }
.stats dd { margin: 0 0 30px; font-size: 64px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink); }
.stats dd .unit { font-size: 38px; font-weight: 400; color: var(--ink-50); margin-left: 6px; }
.stats dd.accent { color: var(--cardinal); }
.stats dd.resolved { color: var(--paloverde); }
.stats dd.caution { color: var(--poppy); }

/* ---------- hand-drawn boxes & panels ---------- */

.rough-layer { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.rough-layer path { fill: none; stroke-linecap: round; stroke-linejoin: round; }

.panel {
  position: absolute;
  padding: 36px 40px;
}
.panel h3 { margin: 0 0 18px; font-size: 40px; font-weight: 600; }
.panel p, .panel li { font-size: 30px; line-height: 1.35; margin: 0 0 10px; }
.panel ul, .panel ol { margin: 0; padding-left: 28px; }
.panel.muted { color: var(--ink-50); }

.card {
  position: absolute;
  padding: 26px 28px;
  text-align: center;
}
.card .icon { height: 74px; margin-bottom: 12px; }
.card h3 { margin: 0 0 8px; font-size: 40px; font-weight: 600; }
.card p { margin: 0; font-size: 27px; font-style: italic; color: var(--ink-50); line-height: 1.3; }
.card p + p { margin-top: 18px; }
.wrap-balance p { text-wrap: balance; }
.card a { color: var(--lagunita); text-decoration: underline; text-decoration-color: rgba(0, 108, 184, 0.35); text-underline-offset: 4px; }
.card p.link-main { font-size: 36px; font-style: normal; font-weight: 600; }
.reveal-box { text-align: left; cursor: pointer; }
.reveal-box h3 { font-size: 34px; }
.reveal-box .front p { font-size: 26px; }
.reveal-box .back { display: none; }
.reveal-box .back p { font-style: normal; color: var(--ink); font-size: 26px; }
.reveal-box.revealed { cursor: default; }
.reveal-box.revealed .front { display: none; }
.reveal-box.revealed .back { display: block; }

.big-number {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* ---------- figures ---------- */

.fig { position: absolute; }
.fig svg, .fig canvas { position: absolute; left: 0; top: 0; overflow: visible; }

.placeholder {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--sans);
  color: var(--ink-50);
  font-size: 26px;
  padding: 30px;
}
.placeholder b { color: var(--ink); font-size: 30px; display: block; margin-bottom: 10px; }
.placeholder video, .placeholder img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }

.pending {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--sans);
  font-size: 26px;
  color: var(--cardinal);
}

/* ---------- controls ---------- */

.slider {
  position: absolute;
  height: 60px;
  cursor: pointer;
  touch-action: none;
}
.slider .track { position: absolute; left: 0; right: 0; top: 29px; height: 2px; background: var(--ink-35); }
.slider .fill { position: absolute; left: 0; top: 28px; height: 4px; background: var(--lagunita); }
.slider .thumb {
  position: absolute;
  top: 14px;
  width: 32px;
  height: 32px;
  margin-left: -16px;
  border-radius: 50%;
  border: 3px solid var(--lagunita);
  background: var(--board);
}
.slider .label {
  position: absolute;
  top: -36px;
  font-family: var(--sans);
  font-size: 26px;
  color: var(--ink);
  transform: translateX(-50%);
  white-space: nowrap;
}

/* ---------- notes overlay ---------- */

#notes {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 38vh;
  overflow: auto;
  background: rgba(30, 30, 28, 0.94);
  color: #f2f0ea;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.45;
  padding: 16px 28px;
  display: none;
  z-index: 100;
}
#notes.on { display: block; }
#notes h4 { margin: 0 0 6px; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; color: #c9b9a8; }
.slide aside.notes { display: none; }

@media print {
  html, body { overflow: visible; background: white; }
  #viewport { position: static; display: block; }
  #stage { transform: none !important; position: relative; overflow: visible; height: auto; }
  .slide { position: relative; visibility: visible; width: 1920px; height: 1080px; page-break-after: always; }
}
.stats.compact dd { font-size: 56px; margin-bottom: 20px; }
.stats.compact dd .unit { font-size: 34px; }

/* ---------- worked-example table ---------- */
.wx-row {
  position: absolute;
  left: 180px;
  width: 1560px;
  display: grid;
  grid-template-columns: 560px 400px 300px 300px;
  align-items: baseline;
  font-size: 32px;
}
.wx-row .f { font-style: italic; color: var(--ink-50); }
.wx-row .v { font-family: var(--sans); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.wx-row.head { font-family: var(--sans); font-size: 24px; color: var(--ink-50); }
.wx-row.head .v { font-weight: 400; }
.wx-row.result .v { color: var(--paloverde); }
.wx-row.late, .wx-row.late .v { color: var(--gray); }

.katex { font-size: 1.05em; }
.wx-row .f .katex { color: rgba(46, 45, 41, 0.72); }
.wx-row > span:first-child { font-family: var(--sans); }

/* ---------- numbered method steps ---------- */
.pc-steps { position: absolute; }
.pc-step { margin-bottom: 22px; }
.pc-step h4 { margin: 0 0 4px; font-family: var(--sans); font-size: 29px; font-weight: 600; }
.pc-step p { margin: 0; font-family: var(--sans); font-size: 24px; line-height: 1.32; color: var(--ink-50); }
.pc-step p .katex { color: var(--ink); }
.pc-step.result h4 { font-size: 36px; }
.pc-step p.eq { margin-top: 4px; text-align: center; }

/* ---------- brahe slide: modules and code ---------- */
.mod-grid { position: absolute; left: 160px; right: 160px; top: 260px; font-family: var(--sans); }
.mod { display: grid; grid-template-columns: 270px 1fr; align-items: baseline; margin-bottom: 18px; }
.mod h4 { margin: 0; font-size: 30px; font-weight: 600; }
.mod p { margin: 0; font-size: 26px; line-height: 1.4; color: var(--ink-50); font-family: "Source Code Pro", ui-monospace, "SF Mono", Menlo, monospace; }
.mod.coming h4, .mod.coming p { color: var(--gray); font-style: italic; }
.code-full { position: absolute; left: 160px; right: 160px; top: 240px; padding: 26px 34px; }
.code-full pre { margin: 0; font-family: "Source Code Pro", ui-monospace, "SF Mono", Menlo, monospace; font-size: 26px; line-height: 1.4; color: var(--ink); white-space: pre; }
.code-full .kw { color: var(--cardinal); font-weight: 600; }
.code-full .fn { color: var(--lagunita); }
.code-full .st { color: var(--paloverde); }
.code-full .nu { color: #C26A00; }
.code-full .cm { color: var(--gray); font-style: italic; }
.code-full.half { right: auto; left: 100px; width: 1000px; padding: 22px 28px; }
.code-full.half pre { font-size: 20px; }

/* ---------- code cards (figs.js codeCard) ---------- */
.code-card { position: absolute; left: 0; top: 0; width: 100%; padding: 22px 20px; }
.code-card pre { margin: 0; font-family: "Source Code Pro", ui-monospace, "SF Mono", Menlo, monospace; font-size: inherit; line-height: 1.25; color: var(--ink); white-space: pre; }
.code-stack { position: absolute; left: 0; top: 0; width: 100%; display: flex; flex-direction: column; gap: 12px; }
.code-stack .code-card { position: relative; padding: 16px 20px; }
.code-out { position: relative; display: flex; align-items: baseline; gap: 22px; padding: 10px 20px 12px; font-family: "Source Code Pro", ui-monospace, "SF Mono", Menlo, monospace; font-size: 22px; line-height: 1.25; }
.code-out .out-label { font-family: var(--sans); font-size: 22px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-50); }
.code-out .out-time { margin-left: auto; font-family: var(--sans); font-weight: 600; color: var(--lagunita); font-variant-numeric: tabular-nums; }
.code-out pre { margin: 0; font: inherit; white-space: pre; color: var(--ink); }
.code-card .ln { position: relative; }
.code-card .ln.blank { height: 0.625em; overflow: hidden; }
.code-card .lnum { display: inline-block; width: 2ch; margin-right: 0.6ch; text-align: right; color: var(--ink-50); font-weight: 400; font-variant-numeric: tabular-nums; user-select: none; }
.code-card .kw { color: var(--plum); font-weight: 400; }
.code-card .bh { color: var(--lagunita); }
.code-card .st { color: rgba(46, 45, 41, 0.62); }
.code-card .nu { color: var(--sky); }
.code-card .cm { color: var(--gray); font-style: italic; }
.code-card .ln.hl, .code-card .ln.hl span { color: var(--cardinal); font-weight: 600; }
.code-card .tok-cardinal, .code-card .tok-cardinal span { color: var(--cardinal); font-weight: 700; }
.code-card .tok-cardinal { text-decoration: underline; text-decoration-color: var(--cardinal); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.code-card .tok-green, .code-card .tok-green span { color: var(--paloverde); font-weight: 700; }
.code-card .tok-green { text-decoration: underline; text-decoration-color: var(--paloverde); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.code-card .ln.hl .lnum { color: var(--ink-50); font-weight: 400; }
.code-card .ln-hl { position: absolute; left: 2.6ch; top: 0; right: 0; display: block; background: var(--board); color: var(--cardinal); font-weight: 600; white-space: pre; }

/* ---------- module map cards (figs.js moduleMap) ---------- */
.card.mod-card { padding: 22px 12px; }
.mod-card .icon { position: relative; height: 92px; margin-bottom: 14px; }
.mod-card h3 { font-size: 30px; line-height: 1.15; text-wrap: balance; }
.mod-card p { font-family: var(--sans); font-size: 22px; text-wrap: balance; }

/* ---------- property cards and tool families ---------- */
.card.prop-card { left: 0; top: 0; width: 100%; height: 100%; padding: 0; display: flex; align-items: center; justify-content: center; }
.prop-card h3 { margin: 0; font-size: 36px; }
.tool-row { padding-top: 14px; }
.tool-row .tool-name { width: 580px; font-size: 32px; font-weight: 600; line-height: 1.15; }
.tool-row .tool-eg { width: 580px; margin-top: 4px; font-family: var(--sans); font-size: 24px; color: var(--ink-50); }

/* ---------- lists inside panels and quote ---------- */
.force-list { position: absolute; margin: 0; padding: 0; list-style: none; font-family: var(--sans); font-size: 30px; line-height: 1.3; }
.force-list li { margin: 0 0 16px; }
.quote { font-size: 64px; line-height: 1.22; font-style: italic; margin: 0; text-wrap: balance; }
.statement .quote-by { font-family: var(--sans); font-size: 26px; color: var(--ink-50); margin-top: 36px; }
.design-panel p { font-family: var(--sans); font-size: 28px; color: var(--ink-50); }
.brahe-point { text-align: center; }
.brahe-point h3 { font-size: 44px; }
.brahe-point p { font-size: 30px; }

/* ---------- project timeline (figs.js timeline) ---------- */
.tl-row { position: absolute; display: flex; align-items: center; }
.tl-year { flex: none; text-align: right; font-family: var(--sans); font-size: 32px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tl-text { position: absolute; right: 0; font-family: var(--sans); font-size: 32px; line-height: 1.25; }
.tl-text b { font-family: var(--serif); font-weight: 600; }
.tl-today { position: absolute; text-align: center; font-family: var(--sans); font-size: 26px; color: var(--ink-50); }

/* ---------- documentation screenshots ---------- */
.doc-zoom { position: absolute; box-sizing: border-box; border: 3px solid var(--ink); border-radius: 6px; background: var(--board); }
.doc-shot { position: absolute; overflow: hidden; }
.doc-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.doc-cap { position: absolute; margin: 0; text-align: center; font-family: var(--sans); font-size: 28px; }
.design-panel h3 + p { margin-top: 6px; }

/* ---------- adopters, roadmap, backup term table ---------- */
.close-panel h3 { font-size: 40px; }
.close-panel li { font-family: var(--sans); font-size: 32px; line-height: 1.35; margin-bottom: 14px; }
.term-row { position: absolute; left: 180px; width: 1560px; display: grid; grid-template-columns: 760px 380px 420px; align-items: baseline; font-size: 32px; }
.term-row .v { font-family: var(--sans); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.term-row .f { color: var(--ink-50); }
.term-row.head { font-family: var(--sans); font-size: 24px; color: var(--ink-50); }
.term-row.head .v { font-weight: 400; }

/* ---------- three levels of the sky-plot answer ---------- */
.level-card { padding: 28px 32px; }
.level-card h3 { margin-bottom: 12px; }
.level-card ul { font-family: var(--sans); }
.level-card li { font-size: 27px; line-height: 1.25; margin-bottom: 8px; }
.level-stats { text-align: center; }
.level-stats dt { font-size: 26px; line-height: 1.2; margin-bottom: 6px; }
.stats.level-stats dd { font-size: 72px; margin-bottom: 8px; }
.level-stats .note { margin: 0; font-size: 24px; line-height: 1.25; color: var(--ink-50); text-wrap: balance; }
