:root {
  --bg-top: #f6efe4;
  --bg-bottom: #dce8f2;
  --panel: rgba(255, 252, 247, 0.9);
  --panel-strong: #fffdf9;
  --ink: #1b2230;
  --muted: #5f6674;
  --accent: #b0302f;
  --accent-dark: #7d1f20;
  --gold: #e8c16b;
  --line: rgba(27, 34, 48, 0.12);
  --correct: #2c8b57;
  --warning: #a66a12;
  --shadow: 0 18px 45px rgba(44, 62, 80, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.75), transparent 35%),
    linear-gradient(160deg, var(--bg-top), var(--bg-bottom));
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(8px);
}

body::before {
  width: 18rem;
  height: 18rem;
  top: 4rem;
  right: -3rem;
  background: rgba(176, 48, 47, 0.08);
}

body::after {
  width: 22rem;
  height: 22rem;
  bottom: -6rem;
  left: -5rem;
  background: rgba(232, 193, 107, 0.22);
}

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

.hero {
  padding: 1.25rem 1.5rem 1.75rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}

.floating-point {
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
  animation: drift 3.2s ease-in-out infinite;
}

.floating-point:nth-of-type(2) {
  animation-delay: 1s;
}

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

h1 {
  margin-bottom: 0;
  margin-top: 0.35rem;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 0.96;
}

.intro {
  max-width: 60rem;
  margin: 0.9rem 0 0;
  font-size: 1.08rem;
  line-height: 1.5;
  color: var(--muted);
}

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.panel {
  background: var(--panel);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.instructions-list {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  line-height: 1.55;
}

.section-heading,
.activity-headings,
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.completion-badge,
.level-badge {
  margin: 0;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.completion-badge {
  background: rgba(176, 48, 47, 0.08);
  border: 1px solid rgba(176, 48, 47, 0.18);
  color: var(--accent-dark);
}

.level-badge {
  background: rgba(232, 193, 107, 0.2);
  border: 1px solid rgba(166, 106, 18, 0.18);
  color: #7b5310;
}

.activity-headings {
  margin-bottom: 1rem;
  align-items: end;
}

.activity-headings p,
.example-text,
.field-label,
.feedback {
  margin-bottom: 0;
}

.activity-headings p {
  color: var(--muted);
}

.activity-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.example-card {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.92), rgba(247, 244, 239, 0.92));
  transform: translateY(12px);
  opacity: 0;
  animation: rise-in 520ms ease forwards;
}

.example-card:nth-child(2) {
  animation-delay: 80ms;
}

.example-card:nth-child(3) {
  animation-delay: 160ms;
}

.example-card:nth-child(4) {
  animation-delay: 240ms;
}

.example-card:nth-child(5) {
  animation-delay: 320ms;
}

.example-card:nth-child(6) {
  animation-delay: 400ms;
}

.example-tag {
  margin: 0;
  font-family: "Menlo", "Consolas", monospace;
  font-size: 0.85rem;
  color: var(--accent);
}

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

.comparison-grid-single {
  grid-template-columns: 1fr;
}

.image-panel {
  margin: 0;
  padding: 0.8rem;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
}

.image-panel figcaption {
  margin-bottom: 0.6rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.image-panel-reality figcaption {
  color: #37536f;
}

.image-panel-abstraction figcaption {
  color: var(--accent);
}

.reality-image,
.example-image {
  display: block;
  width: 100%;
  height: 18rem;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(220, 232, 242, 0.4), rgba(255, 255, 255, 0.9));
}

.hint-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hint-chip {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.83rem;
  background: rgba(27, 34, 48, 0.05);
  border: 1px solid rgba(27, 34, 48, 0.08);
  color: var(--muted);
}

.field-label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

textarea {
  width: 100%;
  border: 1px solid rgba(27, 34, 48, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.9rem 1rem;
  font: inherit;
  color: var(--ink);
  resize: vertical;
  min-height: 8.2rem;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

textarea:focus {
  outline: none;
  border-color: rgba(176, 48, 47, 0.4);
  box-shadow: 0 0 0 4px rgba(176, 48, 47, 0.08);
  transform: translateY(-1px);
}

.feedback {
  min-height: 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.feedback.complete {
  color: var(--correct);
}

.feedback.partial {
  color: var(--warning);
}

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

.export-panel {
  display: flex;
  justify-content: flex-end;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.3rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(27, 34, 48, 0.15);
}

.button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.button-download {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
}

@keyframes rise-in {
  from {
    transform: translateY(12px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.6;
  }

  50% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

@media (max-width: 860px) {
  .comparison-grid,
  .response-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .activity-headings,
  .card-header,
  .export-panel {
    align-items: start;
    flex-direction: column;
  }

  .reality-image,
  .example-image {
    height: 14rem;
  }
}

@media print {
  body {
    background: white;
  }

  body::before,
  body::after,
  .export-panel {
    display: none;
  }

  .page-shell {
    width: 100%;
    padding: 0;
  }

  .panel,
  .example-card {
    box-shadow: none;
    backdrop-filter: none;
  }
}
