:root {
  --bg: #f4f5f2;
  --ink: #1f2723;
  --muted: #5c6660;
  --panel: #ffffff;
  --line: #d5d9d2;
  --accent: #2c6f66;
  --accent-2: #b64f36;
  --accent-3: #4d5f8f;
  --shadow: 0 18px 45px rgba(31, 39, 35, 0.12);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
}

button,
a {
  font: inherit;
}

.deck {
  height: 100vh;
  width: 100vw;
  position: relative;
}

.slide {
  align-content: center;
  display: none;
  gap: 18px;
  height: 100vh;
  inset: 0;
  padding: clamp(40px, 6vw, 84px) clamp(34px, 8vw, 110px) 104px;
  position: absolute;
  width: 100vw;
}

.slide.active {
  display: grid;
}

.slide > * {
  max-width: 1120px;
}


.title-slide {
  background: linear-gradient(90deg, rgba(44, 111, 102, 0.12), transparent 38%), var(--bg);
}

.divider {
  background: #20332f;
  color: #f8f1e4;
}

.kicker {
  color: var(--accent-2);
  font-size: clamp(0.78rem, 1.2vw, 0.98rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.divider .kicker {
  color: #e9a88a;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(3rem, 7.4vw, 7.8rem);
  line-height: 0.95;
  max-width: 1040px;
}

h2 {
  font-size: clamp(2.25rem, 5vw, 5.2rem);
  line-height: 1;
  margin-bottom: 24px;
}

h3 {
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  margin-bottom: 10px;
}

p,
li,
td,
th,
blockquote {
  font-size: clamp(1.05rem, 1.8vw, 1.55rem);
  line-height: 1.35;
}

.small {
  color: var(--muted);
  font-size: clamp(0.96rem, 1.3vw, 1.18rem);
  margin-top: 20px;
}

.lede {
  color: var(--muted);
  font-size: clamp(1.45rem, 2.5vw, 2.25rem);
  max-width: 820px;
}

.title-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 42px;
}

.title-meta span,
.pill-grid span {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  padding: 10px 15px;
}

ul,
ol {
  margin: 0;
  padding-left: 1.25em;
}

li + li {
  margin-top: 10px;
}

.two-column-list {
  columns: 2;
  column-gap: 56px;
  max-width: 980px;
}

.compact li {
  font-size: clamp(0.98rem, 1.55vw, 1.28rem);
}

.comparison-grid,
.quad,
.split,
.before-after {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.comparison-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.comparison-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quad,
.split,
.before-after {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.before-after {
  grid-template-columns: 0.8fr 1.3fr 1.3fr;
}

.comparison-grid > div,
.quad > div,
.split > div,
.before-after > div,
.source-ladder > div,
.flow > div,
.swot > div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.comparison-grid p,
.quad p,
.split p,
.before-after p,
.source-ladder span,
.flow span,
.swot p {
  color: var(--muted);
  font-size: clamp(0.96rem, 1.35vw, 1.22rem);
  margin-bottom: 0;
}

.flow {
  display: grid;
  gap: 12px;
  margin-top: 34px;
}

.flow > div {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 220px 1fr;
}

.flow strong {
  color: var(--accent);
  font-size: clamp(1.05rem, 1.6vw, 1.32rem);
}

.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0;
}

.callout,
blockquote,
.template {
  border-left: 6px solid var(--accent);
  color: var(--ink);
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  font-weight: 700;
  margin: 30px 0 0;
  max-width: 940px;
  padding: 14px 0 14px 22px;
}

blockquote {
  font-weight: 650;
}

.prompt {
  color: var(--accent);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 750;
  max-width: 1000px;
}

.source-ladder,
.swot {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.source-ladder > div {
  display: grid;
  gap: 12px;
  grid-template-columns: 180px 1fr;
}

.source-ladder strong {
  color: var(--accent-3);
}

.swot {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

table {
  background: var(--panel);
  border: 1px solid var(--line);
  border-collapse: collapse;
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: block;
  margin-top: 24px;
  max-width: 1120px;
  overflow: auto;
}

th,
td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-size: clamp(0.82rem, 1.15vw, 1.05rem);
  min-width: 150px;
  padding: 13px 15px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #e9ece6;
  color: var(--ink);
  font-weight: 800;
}

td:first-child,
th:first-child {
  font-weight: 800;
  min-width: 128px;
}

.label {
  color: var(--accent-2);
  display: block;
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.map {
  aspect-ratio: 16 / 8;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), var(--line) calc(50% - 1px), var(--line) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(0deg, transparent calc(50% - 1px), var(--line) calc(50% - 1px), var(--line) calc(50% + 1px), transparent calc(50% + 1px)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-top: 20px;
  max-height: 480px;
  max-width: 920px;
  min-height: 320px;
  position: relative;
}

.axis,
.dot {
  position: absolute;
}

.axis {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  text-transform: uppercase;
}

.x-left {
  bottom: 14px;
  left: 18px;
}

.x-right {
  bottom: 14px;
  right: 18px;
}

.y-top {
  left: 18px;
  top: 14px;
}

.y-bottom {
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
}

.dot {
  align-items: center;
  background: var(--accent-3);
  border-radius: 999px;
  color: white;
  display: flex;
  font-weight: 850;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.dot-a {
  left: 72%;
  top: 20%;
}

.dot-b {
  left: 56%;
  top: 56%;
}

.dot-c {
  left: 22%;
  top: 66%;
}

.dot-loop {
  background: var(--accent-2);
  height: 60px;
  left: 34%;
  top: 38%;
  width: 60px;
}

.template span {
  color: var(--accent);
}

.notes {
  background: #20332f;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  bottom: 88px;
  box-shadow: var(--shadow);
  color: #fff6e8;
  display: none;
  left: clamp(18px, 5vw, 72px);
  max-width: min(820px, calc(100vw - 36px));
  padding: 16px 18px;
  position: fixed;
  z-index: 8;
}

.notes strong {
  color: #e9a88a;
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.notes span {
  display: block;
  font-size: 0.98rem;
  line-height: 1.45;
}

.presenter-preview {
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 12px;
  padding-bottom: 12px;
}

.presenter-preview div {
  min-width: 0;
}

.presenter-preview small {
  color: rgba(255, 246, 232, 0.68);
  display: block;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.presenter-preview b {
  display: block;
  font-size: 0.94rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.show-notes .slide.active .notes {
  display: block;
}

body.controls-collapsed .notes {
  bottom: 76px;
}

.controls {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  bottom: 24px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 10px;
  left: 50%;
  padding: 8px;
  position: fixed;
  transform: translateX(-50%);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  z-index: 5;
}

body.controls-collapsed .controls {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  visibility: hidden;
}

.show-controls {
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  bottom: 18px;
  box-shadow: 0 8px 22px rgba(31, 39, 35, 0.1);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 1.15rem;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  left: 50%;
  line-height: 1;
  opacity: 0;
  padding: 0;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 18px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  visibility: hidden;
  width: 34px;
  z-index: 5;
}

.show-controls:hover,
.show-controls:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

body.controls-collapsed .show-controls {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
  visibility: visible;
}

.icon-button,
.text-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  text-decoration: none;
}

.icon-button {
  font-size: 1.7rem;
  line-height: 1;
  width: 44px;
}

.text-button {
  padding: 0 14px;
}

.icon-button:hover,
.text-button:hover,
.text-button[aria-pressed="true"],
.text-button:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.status {
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  display: grid;
  gap: 2px;
  min-width: 210px;
  padding: 0 14px;
}

.status strong {
  font-size: 0.92rem;
}

.status span {
  color: var(--muted);
  font-size: 0.84rem;
}

.progress {
  background: rgba(31, 39, 35, 0.12);
  bottom: 0;
  height: 6px;
  left: 0;
  position: fixed;
  width: 100vw;
  z-index: 6;
}

.progress span {
  background: var(--accent-2);
  display: block;
  height: 100%;
  transition: width 160ms ease;
  width: 0;
}

dialog {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: var(--ink);
  max-width: min(920px, calc(100vw - 28px));
  padding: 22px;
  width: 920px;
}

dialog::backdrop {
  background: rgba(31, 39, 35, 0.35);
}

.dialog-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dialog-header h2 {
  font-size: 1.45rem;
  margin: 0;
}

.overview-grid {
  display: grid;
  gap: 18px;
  max-height: 70vh;
  overflow: auto;
}

.overview-section h3 {
  border-bottom: 1px solid var(--line);
  color: var(--accent);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
  padding-bottom: 8px;
  text-transform: uppercase;
}

.overview-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.overview-list button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  min-height: 82px;
  padding: 12px;
  text-align: left;
}

.overview-list button[aria-current="true"] {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.overview-list small {
  color: var(--muted);
  display: block;
  font-weight: 800;
  margin-bottom: 6px;
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .deck,
  .slide {
    min-height: 100vh;
  }

  .slide {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    padding: 34px 22px 112px;
  }

  .two-column-list {
    columns: 1;
  }

  .comparison-grid,
  .comparison-grid.three,
  .quad,
  .split,
  .before-after,
  .swot {
    grid-template-columns: 1fr;
  }

  .flow > div,
  .source-ladder > div {
    grid-template-columns: 1fr;
  }


  .controls {
    bottom: 14px;
    max-width: calc(100vw - 18px);
    overflow-x: auto;
  }

  .show-controls {
    bottom: 12px;
  }

  .status {
    min-width: 144px;
  }

  .text-button {
    padding: 0 10px;
  }

  .presenter-preview {
    grid-template-columns: 1fr;
  }

  .map {
    min-height: 260px;
  }
}

@media print {
  @page {
    margin: 0;
    size: landscape;
  }

  body {
    background: white;
    overflow: visible;
  }

  html,
  body,
  .deck {
    height: auto;
    width: auto;
  }

  .deck,
  .slide {
    position: static;
  }

  .slide,
  .slide.active {
    align-content: center;
    background: white !important;
    box-shadow: none;
    color: var(--ink);
    display: grid !important;
    height: 100vh;
    min-height: 100vh;
    page-break-after: always;
    padding: 8vh 8vw;
    width: 100vw;
  }

  .controls,
  .show-controls,
  .progress,
  dialog,
  .notes {
    display: none !important;
  }
}
