html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at top right, rgba(255, 127, 232, 0.08), transparent 28%),
    radial-gradient(circle at left 20%, rgba(128, 82, 254, 0.06), transparent 26%),
    var(--page-bg);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-shell {
  padding-bottom: 80px;
}

.site-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 24px 96px;
}

.site-nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
}

.site-nav-links a {
  color: rgba(255, 255, 255, 0.74);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.site-nav-links a:hover {
  color: white;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  gap: 24px;
  align-items: start;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.hero-copy p {
  max-width: 62ch;
  font-size: 17px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.8);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.light-outline {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border-color: rgba(255, 255, 255, 0.16);
}

.light-outline:hover {
  color: white;
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.12);
}

.hero-note {
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.52);
}

.hero-panel {
  padding: 22px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(8px);
}

.hero-panel h3 {
  margin-bottom: 14px;
  font-size: 18px;
  letter-spacing: var(--tight);
  font-weight: 700;
  color: white;
}

.hero-panel ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  margin-bottom: 18px;
}

.hero-panel li {
  display: flex;
  gap: 10px;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.hero-panel li::before {
  content: "•";
  color: var(--color-pink);
  font-weight: 700;
}

.hero-panel-action {
  display: inline-flex;
}

.site-main > section + section {
  margin-top: 18px;
}

.helper-actions {
  margin-top: 12px;
}

.napkin-helper label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-light-purple);
}

.napkin-helper {
  margin-top: 14px;
  padding: 18px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 248, 234, 0.95), rgba(255, 251, 244, 0.98)),
    white;
  border: 1px solid rgba(216, 196, 162, 0.45);
}

.helper-title {
  margin-bottom: 14px;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: var(--tight);
}

.napkin-shell {
  padding: 22px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 248, 234, 0.95), rgba(255, 251, 244, 0.98)),
    white;
  border: 1px solid rgba(216, 196, 162, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.napkin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.napkin-step,
.napkin-stepper {
  min-width: 0;
}

.napkin-label {
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8d6d4d;
}

.napkin-panel {
  height: 100%;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.98), rgba(255, 248, 237, 0.96));
  border-color: rgba(210, 191, 162, 0.55);
  box-shadow: 0 10px 26px rgba(35, 27, 59, 0.04);
}

.napkin-middle-step .napkin-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
}

.game-actions {
  margin-top: 16px;
}

.middle-conversation {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.middle-work-panel textarea {
  margin-top: 10px;
}

.leo-panel h3 {
  font-size: 22px;
  letter-spacing: var(--tight);
}

.leo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.leo-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-pink);
  box-shadow: 0 0 0 6px rgba(255, 127, 232, 0.14);
}

.leo-chat {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.leo-bubble {
  max-width: 70ch;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.65;
}

.leo-bubble.leo {
  color: var(--color-dark);
  background: rgba(114, 255, 255, 0.12);
  border: 1px solid rgba(114, 255, 255, 0.32);
}

.leo-bubble.student {
  justify-self: end;
  color: white;
  background: var(--color-purple);
}

.stack-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.stack-item {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(199, 193, 217, 0.48);
  background: white;
}

.stack-item h3 {
  margin-bottom: 8px;
  font-size: 16px;
  letter-spacing: var(--tight);
  font-weight: 700;
}

.stack-item p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--color-light-purple);
}

.tint-amber {
  background:
    radial-gradient(circle at top right, rgba(232, 146, 42, 0.08), transparent 28%),
    rgba(255, 253, 249, 0.96);
  border-color: var(--tint-amber-border);
}

.cracker-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 16px;
  align-items: start;
  margin-top: 24px;
}

.cracker-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-light-purple);
}

.field,
.field-grid {
  margin-bottom: 16px;
}

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

.input,
.textarea,
.select {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid rgba(199, 193, 217, 0.9);
  border-radius: 12px;
  color: var(--color-dark);
  background: rgba(255, 255, 255, 0.92);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.6;
}

.short-textarea {
  min-height: 120px;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--color-purple);
  box-shadow: 0 0 0 4px rgba(72, 55, 120, 0.08);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.microcopy {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--color-light-purple);
}

.result-shell {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.result-title {
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: var(--tight);
  font-weight: 800;
}

.result-copy {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-light-purple);
}

.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.generating-card {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.loading-dots {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}

.loading-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-purple);
  animation: pulse 1.1s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.mini-card {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(199, 193, 217, 0.54);
  background: rgba(244, 242, 249, 0.72);
}

.mini-card p,
.mini-card li {
  font-size: 13px;
  line-height: 1.65;
  color: var(--color-dark);
}

.impact-card {
  background:
    linear-gradient(135deg, rgba(72, 55, 120, 0.05), rgba(114, 255, 255, 0.1)),
    rgba(244, 242, 249, 0.72);
}

.impact-score-shell {
  margin-bottom: 10px;
}

.impact-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.impact-high {
  color: #8f1e18;
  background: rgba(232, 68, 58, 0.14);
  border: 1px solid rgba(232, 68, 58, 0.2);
}

.impact-medium {
  color: #935000;
  background: rgba(232, 146, 42, 0.14);
  border: 1px solid rgba(232, 146, 42, 0.2);
}

.impact-low {
  color: #0b7e38;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.mini-card ul,
.detail-list {
  padding-left: 18px;
}

.report-section {
  margin-top: 18px;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-dark);
  background: rgba(114, 255, 255, 0.16);
  border: 1px solid rgba(72, 55, 120, 0.1);
}

.coverage-card {
  margin-top: 12px;
  background: var(--tint-amber-bg);
  border-color: var(--tint-amber-border);
}

.detail-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 2px;
}

.detail-list li,
#human-list li,
#build-list li {
  color: var(--color-dark);
  line-height: 1.6;
}

.diagnostic-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(72, 55, 120, 0.06), rgba(114, 255, 255, 0.12));
}

.diagnostic-preview-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 248, 255, 0.98)),
    white;
}

.diagnostic-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.diagnostic-preview-grid .mini-card {
  min-height: 100%;
}

.diagnostic-preview-intro .detail-list {
  margin-top: 14px;
}

.diagnostic-preview-path p,
.diagnostic-preview-outcome p {
  color: var(--color-light-purple);
}

.diagnostic-steps {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.diagnostic-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.diagnostic-step strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.diagnostic-step p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.diagnostic-step-no {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 127, 232, 0.14);
  color: var(--color-purple);
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.diagnostic-preview-outcome {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

@keyframes pulse {
  0%, 80%, 100% {
    transform: scale(0.75);
    opacity: 0.5;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 920px) {
  .site-main {
    padding: 18px 18px 80px;
  }

  .napkin-grid,
  .hero-grid,
  .cracker-layout,
  .diagnostic-preview-grid,
  .two-column,
  .stack-row,
  .field-grid,
  .mini-grid,
  .diagnostic-preview-grid {
    grid-template-columns: 1fr;
  }

  .result-header,
  .diagnostic-prompt {
    flex-direction: column;
    align-items: flex-start;
  }
}
