:root {
  --bg: #e8dcc1;
  --bg-deep: #bba27b;
  --ink: #141924;
  --muted: #434b59;
  --accent: #a6401f;
  --accent-dark: #64230f;
  --panel: rgba(255, 253, 249, 0.97);
  --panel-border: rgba(20, 25, 36, 0.16);
  --success: #2d6a4f;
  --warning: #b08900;
  --shadow: 0 28px 70px rgba(41, 27, 12, 0.24);
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --surface-border: rgba(20, 25, 36, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.55), transparent 28%),
    radial-gradient(circle at bottom right, rgba(111, 69, 27, 0.12), transparent 32%),
    linear-gradient(135deg, var(--bg) 0%, #d7c09c 48%, var(--bg-deep) 100%);
}

button,
input,
label {
  font: inherit;
}

.page-shell {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.76rem;
  color: var(--muted);
}

h1,
h2,
h3,
.slide-title {
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.status-pill {
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.92);
  border: 1px solid var(--panel-border);
  color: var(--ink);
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(41, 27, 12, 0.12);
}

.stage {
  min-height: 72vh;
}

.panel {
  display: flex;
  flex-direction: column;
  min-height: 72vh;
  padding: 1.5rem;
  border-radius: 28px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.hidden {
  display: none;
}

.panel-meta,
.panel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.panel-meta {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.panel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0;
}

.slide-layout {
  display: grid;
  gap: 1.5rem;
}

.slide-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.95;
  max-width: 12ch;
}

.slide-subtitle {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--muted);
  max-width: 44rem;
  line-height: 1.5;
}

.slide-copy {
  display: grid;
  gap: 1rem;
}

.slide-copy p {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.7;
  max-width: 52rem;
}

.bullet-list {
  margin: 0;
  padding-left: 1.4rem;
  display: grid;
  gap: 0.9rem;
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 52rem;
}

.source-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.8rem;
  line-height: 1.6;
}

.hero-slide {
  grid-template-columns: 1.3fr 0.9fr;
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: 1.1rem;
}

.hero-mark {
  align-self: stretch;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(166, 64, 31, 0.16), rgba(100, 35, 15, 0.22)),
    repeating-linear-gradient(
      -45deg,
      rgba(166, 64, 31, 0.11),
      rgba(166, 64, 31, 0.11) 14px,
      transparent 14px,
      transparent 28px
    );
  display: flex;
  align-items: end;
  justify-content: start;
  padding: 1.4rem;
  color: var(--accent-dark);
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  line-height: 1.3;
  border: 1px solid rgba(100, 35, 15, 0.16);
}

.accent-line {
  width: 92px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding-top: 0.5rem;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.method-card {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  box-shadow: 0 12px 28px rgba(31, 21, 10, 0.08);
}

.method-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
}

.method-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.quiz-options {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.option {
  display: flex;
  gap: 0.85rem;
  align-items: start;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(31, 21, 10, 0.05);
}

.option input {
  margin-top: 0.25rem;
}

.feedback {
  min-height: 1.5rem;
  margin: 1rem 0 0;
  color: var(--muted);
}

.feedback.success {
  color: var(--success);
}

.feedback.error {
  color: var(--accent-dark);
}

.result-score {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin: 0.4rem 0 0;
}

.result-summary {
  max-width: 48rem;
  line-height: 1.7;
}

.result-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.result-columns h3 {
  margin-top: 0;
}

.result-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.75rem;
  line-height: 1.6;
}

.primary-button,
.ghost-button {
  border: none;
  border-radius: 999px;
  padding: 0.9rem 1.25rem;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease, background-color 120ms ease;
  text-align: center;
}

.primary-button {
  background: var(--accent);
  color: #fff8f2;
  box-shadow: 0 12px 28px rgba(100, 35, 15, 0.24);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  border: 1px solid rgba(20, 25, 36, 0.16);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.9);
}

.primary-button:disabled,
.ghost-button:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

.slide-image-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-image {
  max-width: 100%;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 12px 28px rgba(31, 21, 10, 0.08);
}

.slide-layout.has-image {
  grid-template-columns: 1fr 0.9fr;
  align-items: center;
}

.slide-content {
  display: grid;
  gap: 1.5rem;
}

@media (max-width: 980px) {
  .page-shell {
    width: min(100% - 1.5rem, 1000px);
  }

  .hero-slide,
  .slide-layout.has-image,
  .result-columns {
    grid-template-columns: 1fr;
  }

  .hero-mark {
    min-height: 180px;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 1rem, 1000px);
    padding-top: 1rem;
  }

  .topbar,
  .panel-meta,
  .panel-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .panel {
    min-height: auto;
    padding: 1rem;
    border-radius: 22px;
  }

  .panel-body {
    padding: 1.25rem 0;
  }

  .hero-slide,
  .slide-layout.has-image,
  .result-columns,
  .method-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: start;
  }

  .status-pill {
    align-self: start;
  }

  .slide-title {
    max-width: none;
    font-size: clamp(1.8rem, 9vw, 3rem);
  }

  .slide-subtitle,
  .slide-copy p,
  .bullet-list,
  .source-list {
    max-width: none;
  }

  .panel-footer > button,
  .hero-actions > button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: calc(100% - 0.75rem);
    padding-bottom: 1.5rem;
  }

  h1 {
    font-size: 1.8rem;
  }

  .eyebrow,
  .panel-meta {
    font-size: 0.82rem;
  }

  .method-card,
  .option {
    padding: 0.9rem;
  }

  .hero-mark {
    min-height: 140px;
    font-size: 1.05rem;
  }
}
