:root {
  --bg: #fbfbf8;
  --ink: #111111;
  --muted: #60646b;
  --line: #1f2933;
  --soft: #f3f6f8;
  --paper: #ffffff;
  --accent: #1d4f7a;
  --accent-soft: #e8f1f7;
  --font: Arial, Helvetica, sans-serif;
  --mono: "SFMono-Regular", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  letter-spacing: 0;
}

.deck {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 58px 72px 54px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  z-index: 2;
}

.slide.is-prev {
  transform: translateX(-20px);
}

.kicker {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin: 0 0 12px;
  font-weight: 700;
}

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

h1 {
  font-size: 64px;
  line-height: 1.02;
  margin-bottom: 24px;
  font-weight: 800;
}

h2 {
  font-size: 44px;
  line-height: 1.08;
  margin-bottom: 26px;
  font-weight: 800;
}

h3 {
  font-size: 24px;
  line-height: 1.25;
  margin-bottom: 12px;
}

.lede {
  font-size: 24px;
  line-height: 1.45;
  max-width: 980px;
  color: var(--ink);
}

.muted {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 22px;
}

.g2 {
  grid-template-columns: 1fr 1fr;
}

.g3 {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  border: 2px solid var(--line);
  padding: 22px 24px;
  min-height: 130px;
  background: var(--paper);
  box-shadow: 0 4px 0 rgba(31, 41, 51, 0.08);
}

.card.light {
  background: var(--accent-soft);
}

.card h3,
.card h4 {
  margin: 0 0 10px;
}

.card p,
.card li {
  font-size: 19px;
  line-height: 1.42;
}

.split {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 34px;
  align-items: center;
}

.split-wide {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 34px;
  align-items: center;
}

ul {
  margin: 0;
  padding-left: 22px;
}

li {
  font-size: 24px;
  line-height: 1.45;
  margin: 9px 0;
}

.small-list li {
  font-size: 20px;
  line-height: 1.38;
}

.rule {
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--line), rgba(31, 41, 51, 0.18));
  margin: 24px 0;
}

.flow {
  display: grid;
  grid-template-columns: 1fr 70px 1fr 70px 1fr;
  gap: 12px;
  align-items: center;
}

.flow .box {
  border: 2px solid var(--line);
  background: var(--paper);
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px;
  font-size: 24px;
  font-weight: 700;
}

.arrow {
  font-size: 46px;
  text-align: center;
  color: var(--accent);
}

.figure-frame {
  border: 2px solid var(--line);
  background: #fff;
  padding: 10px;
  width: 100%;
  box-shadow: 0 6px 0 rgba(31, 41, 51, 0.08);
}

.figure-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.figure-crop {
  height: 535px;
  overflow: hidden;
  border: 2px solid var(--line);
  background: #fff;
}

.figure-crop img {
  display: block;
  width: 100%;
  height: auto;
}

.crop-citizen img {
  transform: translateY(-20px);
}

.crop-civil img {
  transform: translateY(-22px);
}

.pearl-top {
  height: 312px;
  overflow: hidden;
}

.pearl-top img {
  transform: translateY(0);
}

.pearl-large {
  height: 465px;
}

.pearl-bottom {
  height: 360px;
  overflow: hidden;
}

.pearl-bottom img {
  transform: translateY(-230px);
}

.sevae-layout {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
}

.sevae-title {
  font-size: 48px;
}

.sevae-figure {
  height: 500px;
  overflow: hidden;
}

.sevae-figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.foundation-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.foundation-strip div {
  border: 2px solid var(--line);
  background: var(--paper);
  padding: 12px 14px;
  min-height: 76px;
  box-shadow: 0 4px 0 rgba(31, 41, 51, 0.08);
}

.foundation-strip strong,
.foundation-strip span {
  display: block;
}

.foundation-strip strong {
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.foundation-strip span {
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.18;
  color: var(--muted);
}

.method-grid {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 20px;
  align-items: start;
}

.equation-panel {
  border: 2px solid var(--line);
  background: var(--soft);
  color: var(--ink);
  padding: 11px 13px;
  box-shadow: 0 5px 0 rgba(31, 41, 51, 0.08);
}

.eq-line {
  border-bottom: 1px solid rgba(31, 41, 51, 0.42);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.1;
  padding: 5px 0;
  white-space: nowrap;
}

.eq-line:first-child {
  padding-top: 0;
}

.eq-line:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.eq-line span {
  display: inline-block;
  min-width: 72px;
}

.eq-line.strong {
  font-size: 17px;
  background: var(--paper);
  margin: 4px -8px;
  padding: 7px 8px;
  border-left: 4px solid var(--accent);
}

.eq-line b {
  display: inline-block;
  margin-right: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.eq-line sub,
.eq-line sup {
  font-size: 60%;
  line-height: 0;
}

.frac {
  display: inline-grid;
  min-width: 0;
  vertical-align: middle;
  text-align: center;
}

.frac sup {
  display: block;
  border-bottom: 1.5px solid var(--ink);
  padding: 0 5px 3px;
  font-size: 72%;
  line-height: 1.05;
}

.frac em {
  display: block;
  padding-top: 3px;
  font-style: italic;
  font-size: 72%;
  line-height: 1.05;
}

.term-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  margin-top: 9px;
  border-top: 2px solid rgba(31, 41, 51, 0.85);
  padding-top: 9px;
}

.term-legend div {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 6px;
  align-items: baseline;
}

.term-legend strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
}

.term-legend span {
  font-size: 13px;
  line-height: 1.12;
  color: var(--muted);
}

.tech-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.tech-steps div {
  border: 2px solid var(--line);
  background: var(--paper);
  padding: 12px 10px;
  min-height: 76px;
  box-shadow: 0 4px 0 rgba(31, 41, 51, 0.08);
}

.tech-steps strong,
.tech-steps span {
  display: block;
}

.tech-steps strong {
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.tech-steps span {
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.2;
  color: var(--muted);
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.stat {
  border-top: 4px solid var(--line);
  padding-top: 14px;
}

.stat .num {
  display: block;
  font-size: 50px;
  font-weight: 700;
  line-height: 1;
}

.stat .label {
  display: block;
  margin-top: 8px;
  font-size: 18px;
  color: var(--muted);
}

.equation {
  display: inline-block;
  border: 2px solid var(--line);
  padding: 16px 20px;
  font-family: var(--mono);
  font-size: 22px;
  background: var(--soft);
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  border: 2px solid var(--line);
  font-size: 19px;
  line-height: 1.28;
  background: var(--paper);
  box-shadow: 0 5px 0 rgba(31, 41, 51, 0.08);
}

.result-table th,
.result-table td {
  border: 1.5px solid var(--line);
  padding: 14px 16px;
  vertical-align: top;
  text-align: left;
}

.result-table th {
  background: var(--accent-soft);
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.result-table td:first-child {
  font-weight: 700;
}

.footer {
  position: absolute;
  left: 72px;
  right: 72px;
  bottom: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-top: 1px solid rgba(31, 41, 51, 0.18);
  padding-top: 10px;
}

.slide-number::before {
  content: attr(data-current);
}

.slide-number::after {
  content: " / " attr(data-total);
}

.notes {
  display: none !important;
}

.notes-overlay {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 42vh;
  overflow: auto;
  background: #111;
  color: #fff;
  padding: 20px 32px;
  font-size: 18px;
  line-height: 1.55;
  z-index: 50;
  transform: translateY(100%);
  transition: transform 200ms ease;
}

.notes-overlay.open {
  transform: translateY(0);
}

.overview {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.96);
  z-index: 60;
  display: none;
  padding: 40px;
  overflow: auto;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.overview.open {
  display: grid;
}

.overview .thumb {
  border: 2px solid var(--line);
  aspect-ratio: 16/9;
  padding: 14px;
  cursor: pointer;
  background: white;
  position: relative;
}

.overview .n {
  font-weight: 700;
}

.overview .t {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  font-size: 13px;
}

@media (max-width: 900px) {
  .slide {
    padding: 34px 28px;
  }

  h1 {
    font-size: 42px;
  }

  h2 {
    font-size: 34px;
  }

  .split,
  .split-wide,
  .g2,
  .g3,
  .flow,
  .stat-row {
    grid-template-columns: 1fr;
  }

  .arrow {
    display: none;
  }

  li {
    font-size: 20px;
  }
}
