:root {
  --bg-top: #f6efe4;
  --bg-bottom: #dce8f2;
  --panel: rgba(255, 252, 247, 0.88);
  --panel-strong: #fffdf9;
  --ink: #1b2230;
  --muted: #5f6674;
  --accent: #b0302f;
  --accent-dark: #7d1f20;
  --gold: #e8c16b;
  --line: rgba(27, 34, 48, 0.12);
  --correct: #2c8b57;
  --wrong: #c74c3c;
  --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;
  inset: auto;
  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(1180px, 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;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  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 {
  margin: 0;
}

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

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

.reflection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.3rem;
}

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

.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-panel,
.reflection-panel {
  position: static;
}

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

.status-card,
.model-answer,
.success-criteria {
  margin-top: 1.2rem;
  padding: 1rem;
  border-radius: 20px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.status-label,
.model-answer-label {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.status-head .button {
  padding: 0.65rem 1rem;
}

.status-value,
.status-message,
.field-label,
.feedback,
.success-criteria li,
.model-answer p {
  margin: 0.5rem 0 0;
}

.activity-headings {
  display: block;
  margin-bottom: 1rem;
}

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

.example-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  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-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0.15rem 0.2rem 0.2rem;
  min-height: 22rem;
}

.match-area {
  padding-top: 0.2rem;
  border-top: 1px solid var(--line);
}

.example-media {
  margin-top: 0.85rem;
}

.example-image {
  display: block;
  width: 100%;
  max-height: 12.5rem;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

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

.icon-chip {
  display: grid;
  place-items: center;
  gap: 0.4rem;
  padding: 0.85rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
}

.icon-chip img {
  width: 3.4rem;
  height: 3.4rem;
  object-fit: contain;
}

.icon-chip span {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.code-preview {
  margin: 0;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(176, 48, 47, 0.14);
  background: #1f2430;
  color: #f7d28f;
  font-family: "Menlo", "Consolas", monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  overflow-x: auto;
}

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

.example-text {
  margin: 0.75rem 0 0;
  font-size: 1rem;
  line-height: 1.5;
}

.field-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
}

.answer-select,
textarea {
  width: 100%;
  margin-top: 0.45rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.answer-select {
  padding: 0.85rem 0.95rem;
}

textarea {
  padding: 0.9rem 1rem;
  resize: vertical;
  min-height: 6rem;
}

.reason-label {
  margin-top: 0.75rem;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button:focus-visible,
.answer-select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(176, 48, 47, 0.2);
  outline-offset: 2px;
}

.button-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(176, 48, 47, 0.22);
}

.button-download {
  width: auto;
  min-width: 13rem;
  padding: 1rem 1.4rem;
  background: linear-gradient(135deg, #1f8f57, #2da86a);
  color: #fff;
  box-shadow: 0 14px 28px rgba(45, 168, 106, 0.24);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  border: 1px solid var(--line);
}

.export-copy {
  margin: 0.65rem 0 1rem;
  color: var(--muted);
  line-height: 1.5;
}

.export-panel {
  text-align: center;
  padding: 0.5rem 0 0;
}

.feedback {
  min-height: 1.4rem;
  font-size: 0.92rem;
  font-weight: 600;
}

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

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

.example-card.correct {
  border-color: rgba(44, 139, 87, 0.3);
  box-shadow: inset 0 0 0 1px rgba(44, 139, 87, 0.15);
}

.example-card.wrong {
  border-color: rgba(199, 76, 60, 0.3);
  box-shadow: inset 0 0 0 1px rgba(199, 76, 60, 0.14);
}

.model-answer[hidden] {
  display: none;
}

@keyframes rise-in {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

  50% {
    transform: translateY(-2px);
  }
}

@media (max-width: 720px) {
  .activity-headings {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .status-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .example-copy {
    min-height: auto;
  }

  .page-shell {
    width: min(100% - 1rem, 100%);
    padding-top: 1rem;
  }

  .hero {
    padding: 1rem;
  }

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

  .example-image {
    max-height: 10.5rem;
  }
}
