* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --ink: #18212f;
  --muted: #5d6878;
  --paper: #f6f7f9;
  --panel: #ffffff;
  --line: #d9dee7;
  --accent: #1f7a8c;
  --accent-strong: #0f5f70;
  --good: #2d7d46;
  --warn: #b0641a;
  --wolf: #8f2435;
  --shadow: 0 18px 48px rgba(21, 31, 45, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 56px;
  padding: 10px 28px;
  background: rgba(246, 247, 249, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

nav a,
.footer-actions a,
.button {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 700;
}

nav a {
  padding: 6px 9px;
  border-radius: 6px;
}

nav a:hover,
nav a:focus-visible {
  background: #e6f2f4;
  outline: none;
}

.deck {
  display: grid;
  gap: 28px;
  padding: 28px;
}

.slide {
  width: min(1180px, calc(100vw - 56px));
  min-height: min(664px, calc(100vh - 96px));
  margin: 0 auto;
  padding: clamp(28px, 4vw, 56px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  scroll-margin-top: 78px;
}

.title-slide,
.conclusion {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slide-kicker {
  margin-bottom: 14px;
  color: var(--accent-strong);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
}

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

h1 {
  max-width: 920px;
  margin-bottom: 20px;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 28px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.25;
}

.lead {
  max-width: 860px;
  color: var(--muted);
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  line-height: 1.55;
}

.lead.small {
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
}

ul {
  margin: 0;
  padding-left: 1.1em;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  line-height: 1.65;
}

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

.hero-grid,
.three-col,
.slider-grid,
.system-grid,
.compare-grid,
.two-col {
  display: grid;
  gap: 18px;
}

.hero-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 34px 0;
}

.hero-card,
.metric-box,
.system-node,
.compare-card,
.slider-grid > div,
.two-col > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.hero-card {
  padding: 22px;
}

.metric-value {
  display: block;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 900;
  color: var(--accent-strong);
}

.metric-label {
  color: var(--muted);
  font-weight: 700;
}

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

.two-col > div,
.metric-box,
.slider-grid > div,
.compare-card {
  padding: 22px;
}

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

.metric-box p,
.slider-grid p,
.compare-card p,
.note,
.claim {
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.6;
}

.claim {
  margin-top: 26px;
  padding: 16px 18px;
  border-left: 5px solid var(--accent);
  border-radius: 6px;
  background: #ecf6f8;
  color: var(--ink);
  font-weight: 800;
}

.claim.safe {
  border-color: var(--good);
  background: #edf8f0;
}

.claim.warn {
  border-color: var(--warn);
  background: #fff4e8;
}

.claim.final {
  border-color: var(--ink);
  background: #eef1f5;
}

.note {
  margin-top: 24px;
}

.role-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 10px 0 30px;
}

.role-token {
  padding: 12px 16px;
  border-radius: 999px;
  background: #edf2f6;
  color: var(--ink);
  font-weight: 900;
}

.role-token.wolf {
  background: #fdebf0;
  color: var(--wolf);
}

.flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}

.flow span {
  display: grid;
  place-items: center;
  min-height: 84px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  text-align: center;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 900;
}

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

.system-node {
  min-height: 118px;
  padding: 22px;
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  font-weight: 900;
}

.system-node small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78em;
  font-weight: 700;
}

.system-node.highlight {
  border-color: #99cbd4;
  background: #ecf6f8;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: clamp(0.9rem, 1.35vw, 1.08rem);
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  vertical-align: top;
}

th:first-child,
td:first-child {
  text-align: left;
}

thead th {
  background: #edf2f6;
  color: var(--ink);
  font-weight: 900;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.delta td {
  background: #f4f8f9;
  color: var(--accent-strong);
  font-weight: 900;
}

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

.compare-card.baseline {
  border-color: #e8c9cf;
  background: #fff7f8;
}

.compare-card.scaffold {
  border-color: #b7d7bd;
  background: #f3fbf4;
}

.big-result {
  margin-bottom: 18px;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  font-weight: 900;
}

.demo-links,
.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.button,
.footer-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: #ffffff;
}

.button.primary {
  background: var(--accent);
  color: #ffffff;
}

.status-chip {
  display: inline-block;
  margin-top: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #edf2f6;
  color: var(--ink);
  font-weight: 900;
}

.conclusion-stack {
  display: grid;
  gap: 12px;
  margin: 10px 0 10px;
}

.conclusion-stack p {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 800;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .deck {
    padding: 16px;
  }

  .slide {
    width: calc(100vw - 32px);
    min-height: auto;
    padding: 26px;
  }

  .hero-grid,
  .two-col,
  .three-col,
  .system-grid,
  .slider-grid,
  .compare-grid,
  .flow {
    grid-template-columns: 1fr;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media print {
  .topbar {
    display: none;
  }

  .deck {
    gap: 0;
    padding: 0;
  }

  .slide {
    width: 100vw;
    min-height: 100vh;
    break-after: page;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
