:root {
  --bg: #f3efe7;
  --bg-strong: #e3d8c6;
  --surface: rgba(255, 251, 245, 0.82);
  --surface-strong: rgba(255, 248, 238, 0.94);
  --text: #1f2a2a;
  --muted: #5e6867;
  --accent: #9c6b3d;
  --accent-soft: rgba(156, 107, 61, 0.12);
  --warning: #8b3f2f;
  --border: rgba(31, 42, 42, 0.1);
  --shadow: 0 24px 60px rgba(48, 41, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top left, rgba(156, 107, 61, 0.22), transparent 30%),
    radial-gradient(circle at bottom right, rgba(94, 104, 103, 0.18), transparent 28%),
    linear-gradient(135deg, #f8f4ed 0%, var(--bg) 52%, #e9e2d5 100%);
  color: var(--text);
  font-family: "Manrope", sans-serif;
}

.app-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 32px;
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(14px);
}

.sidebar h1,
.slide h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  line-height: 0.95;
}

.sidebar h1 {
  font-size: clamp(2.9rem, 3vw, 4rem);
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.sidebar-text,
.sidebar-meta span,
.slide p,
.slide li {
  color: var(--muted);
}

.sidebar-meta {
  display: grid;
  gap: 12px;
}

.sidebar-meta p {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-meta strong {
  font-size: 1.05rem;
  color: var(--text);
}

.presentation {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  gap: 20px;
}

.deck {
  position: relative;
  min-height: calc(100vh - 126px);
}

.slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: stretch;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.985);
  transition:
    opacity 320ms ease,
    transform 320ms ease;
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.slide-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  min-height: 100%;
  padding: min(6vw, 68px);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 34px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.slide.cover .slide-content {
  background:
    linear-gradient(145deg, rgba(255, 249, 240, 0.95), rgba(243, 235, 221, 0.82)),
    var(--surface-strong);
}

.slide.warning .slide-content {
  background:
    linear-gradient(160deg, rgba(139, 63, 47, 0.12), rgba(255, 251, 245, 0.92)),
    var(--surface);
}

.slide h2 {
  font-size: clamp(2.6rem, 4vw, 5rem);
  max-width: 10ch;
}

.slide p,
.slide li {
  margin: 0;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.65;
  max-width: 70ch;
}

.lead {
  font-size: clamp(1.15rem, 1.7vw, 1.45rem) !important;
  color: var(--text) !important;
  max-width: 36ch !important;
}

.hero-card,
.info-card,
.highlight-stat,
.question-grid span {
  border: 1px solid var(--border);
  background: var(--surface-strong);
  box-shadow: 0 16px 40px rgba(48, 41, 31, 0.08);
}

.hero-card {
  width: fit-content;
  min-width: 240px;
  padding: 18px 22px;
  border-radius: 22px;
}

.hero-card p,
.hero-card strong {
  display: block;
}

.hero-card strong {
  margin-top: 8px;
  color: var(--text);
  font-size: 1.15rem;
}

.highlight-stat {
  display: grid;
  gap: 8px;
  width: min(560px, 100%);
  padding: 28px;
  border-radius: 28px;
}

.highlight-stat strong {
  font-size: clamp(3rem, 5vw, 5.2rem);
  line-height: 0.9;
  color: var(--accent);
}

.highlight-stat span {
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--text);
}

.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.info-card {
  padding: 22px;
  border-radius: 24px;
}

.info-card h3 {
  margin: 0 0 10px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
  font-weight: 600;
}

.info-card p {
  font-size: 0.98rem;
}

ul {
  display: grid;
  gap: 12px;
  padding-left: 22px;
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 860px;
}

.question-grid span {
  padding: 18px 14px;
  border-radius: 18px;
  text-align: center;
  font-weight: 700;
  color: var(--text);
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 4px;
}

.controls button {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #26413b, #3a5b53);
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease;
}

.controls button:hover {
  transform: translateY(-1px);
}

.controls button:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

.progress {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  color: var(--muted);
}

.progress-bar {
  position: relative;
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(31, 42, 42, 0.1);
  overflow: hidden;
}

.progress-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #d5a471);
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    gap: 28px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 28px 22px;
  }

  .presentation {
    padding: 18px;
  }

  .deck {
    min-height: calc(100vh - 268px);
  }

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

@media (max-width: 640px) {
  .slide-content {
    padding: 28px 22px;
    border-radius: 24px;
  }

  .slide h2 {
    max-width: none;
  }

  .controls {
    flex-wrap: wrap;
  }

  .controls button,
  .progress {
    width: 100%;
  }

  .progress {
    order: -1;
  }

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