#app {
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.fuzzy-intro {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.fuzzy-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.9fr);
  align-items: center;
  gap: 2rem;
  padding: 2rem clamp(1rem, 4vw, 2.5rem);
  margin-bottom: 2rem;
  border-radius: 1.25rem;
  border: 1px solid var(--glass-line, rgba(0, 0, 0, 0.1));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--green, #1f7a5c) 10%, transparent), color-mix(in srgb, var(--gold, #d6a72f) 8%, transparent)),
    var(--white, #fff);
}

.fuzzy-hero h1 {
  margin: 0.35rem 0 0.75rem;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.15;
}

.fuzzy-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.fuzzy-hero-actions .button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  vertical-align: -3px;
  margin-right: 0.3rem;
}

.fuzzy-hero-meta {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  color: var(--muted, #5b6b66);
}

.fuzzy-hero-illustration {
  display: flex;
  justify-content: center;
}

.fuzzy-hero-illustration svg {
  width: 100%;
  max-width: 320px;
  height: auto;
}

.fuzzy-benefits {
  margin: 1rem 0 2rem;
}

.fuzzy-start-again {
  justify-content: center;
  margin: 0.5rem 0 2.5rem;
}

@media (max-width: 720px) {
  .fuzzy-hero {
    grid-template-columns: 1fr;
    text-align: left;
    padding: 1.5rem;
  }

  .fuzzy-hero-illustration {
    order: -1;
    max-width: 220px;
    margin: 0 auto;
  }
}

.fuzzy-steps {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 1rem 0;
}

.fuzzy-form-section {
  margin-top: 1.5rem;
}

.fuzzy-form-section .form-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.likert-item {
  position: relative;
  border: 1px solid var(--glass-line, rgba(0, 0, 0, 0.12));
  border-left: 4px solid color-mix(in srgb, var(--green, #1f7a5c) 55%, transparent);
  border-radius: 0.9rem;
  padding: 1rem 1.1rem;
  margin: 0 0 0.85rem;
  background: color-mix(in srgb, var(--green, #1f7a5c) 3%, var(--white, #fff));
  transition: border-color 0.18s ease, background 0.18s ease;
}

.likert-item:focus-within {
  border-left-color: var(--gold, #d6a72f);
  background: color-mix(in srgb, var(--gold, #d6a72f) 6%, var(--white, #fff));
}

.likert-item legend {
  font-weight: 700;
  padding: 0 0.25rem 0.25rem;
}

.likert-scale {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.likert-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  padding: 0.5rem 0.4rem;
  border-radius: 0.65rem;
  border: 1px solid var(--glass-line, rgba(0, 0, 0, 0.12));
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.likert-option:hover {
  transform: translateY(-1px);
  border-color: var(--green, #1f7a5c);
}

.likert-option input {
  accent-color: var(--gold, #d6a72f);
}

.likert-option:has(input:checked) {
  background: linear-gradient(135deg, var(--green, #1f7a5c), var(--teal, #1f9d8f));
  border-color: transparent;
  color: #fff;
}

.iq-pattern-seq {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.iq-pattern-shape {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 0.65rem;
  border: 1px solid var(--glass-line, rgba(0, 0, 0, 0.12));
  color: var(--green, #1f7a5c);
}

.iq-pattern-shape.iq-pattern-unknown {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold, #d6a72f);
  border-style: dashed;
}

.iq-pattern-arrow {
  font-size: 1.2rem;
  color: var(--muted, #6b7a76);
}

.iq-pattern-options {
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
}

.iq-pattern-option {
  padding: 0.5rem;
}

.iq-pattern-option svg {
  color: inherit;
}

.mbti-result-head {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.mbti-avatar svg {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}

.mbti-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.mbti-gallery-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-align: center;
  padding: 0.75rem 0.5rem;
  border-radius: 0.85rem;
  border: 1px solid var(--glass-line, rgba(0, 0, 0, 0.1));
  font-size: 0.8rem;
}

.mbti-avatar-gallery svg {
  width: 64px;
  height: 64px;
}

.mbti-history-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.mbti-avatar-mini svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.score-bar {
  position: relative;
  width: 100%;
  min-width: 120px;
  height: 0.6rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink, #123331) 12%, transparent);
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.score-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green, #1f7a5c), var(--teal, #1f9d8f), var(--gold, #d6a72f));
}

.alumni-distribution-bars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.alumni-distribution-row {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr auto auto;
  align-items: center;
  gap: 0.75rem;
}

.alumni-distribution-row .score-bar {
  margin-bottom: 0;
}

.alumni-popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 18, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 200;
}

.alumni-popup-card {
  background: var(--paper, #fff);
  border-radius: 1rem;
  max-width: 720px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 1.25rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.alumni-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 1rem;
}

.alumni-popup-head h3 {
  margin: 0;
}

.alumni-popup-body table {
  width: 100%;
}

.fuzzy-methodology {
  margin-top: 2rem;
}

.fuzzy-methodology ol {
  padding-left: 1.25rem;
  display: grid;
  gap: 0.4rem;
}

#resultsSection {
  margin-top: 2rem;
}

.trace-row td {
  background: color-mix(in srgb, var(--green, #1f7a5c) 4%, var(--white, #fff));
}

.trace-panel {
  padding: 0.75rem 0.25rem;
  font-size: 0.85rem;
}

.trace-panel ul {
  padding-left: 1.1rem;
  margin: 0.35rem 0 0.75rem;
}

.trace-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.35rem 0 0.75rem;
  font-size: 0.8rem;
}

.trace-table th,
.trace-table td {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--glass-line, rgba(0, 0, 0, 0.1));
  text-align: left;
}

#identityGate {
  border: 1px solid color-mix(in srgb, var(--gold, #d6a72f) 40%, var(--glass-line, rgba(0, 0, 0, 0.1)));
}

#historyList {
  display: grid;
  gap: 0.4rem;
}

.history-item {
  padding: 0.5rem 0.75rem;
  border-radius: 0.6rem;
  background: color-mix(in srgb, var(--green, #1f7a5c) 5%, var(--white, #fff));
  border: 1px solid var(--glass-line, rgba(0, 0, 0, 0.1));
  font-size: 0.88rem;
}

#citaCitaAdvice {
  border-left: 4px solid var(--gold, #d6a72f);
}

#citaCitaHint {
  color: var(--green, #1f7a5c);
  font-weight: 600;
}

/* Progress bar sticky di atas form kuis */
.quiz-progress {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 0.6rem 0.75rem 0.4rem;
  margin-bottom: 1rem;
  background: color-mix(in srgb, var(--paper, #fff) 92%, transparent);
  backdrop-filter: blur(6px);
  border-radius: 0.75rem;
}

.quiz-progress-track {
  width: 100%;
  height: 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink, #123331) 10%, transparent);
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green, #1f7a5c), var(--teal, #1f9d8f), var(--gold, #d6a72f));
  transition: width 0.25s ease;
}

#quizProgressLabel {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
}

/* Ikon kategori pada tiap pernyataan kuesioner */
.likert-item legend {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.likert-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 0.1rem;
  fill: none;
  stroke: var(--green, #1f7a5c);
  stroke-width: 1.8;
  opacity: 0.85;
}

/* Animasi masuk halus untuk kartu & item soal saat pertama muncul */
@media (prefers-reduced-motion: no-preference) {
  .likert-item,
  .portal-card,
  .fuzzy-hero-illustration svg {
    animation: fuzzyFadeUp 0.42s ease both;
  }

  .likert-item:nth-child(n) {
    animation-delay: calc(var(--i, 0) * 12ms);
  }

  .likert-option:has(input:checked) {
    animation: fuzzyPop 0.22s ease;
  }
}

@keyframes fuzzyFadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fuzzyPop {
  0% {
    transform: scale(0.94);
  }
  60% {
    transform: scale(1.03);
  }
  100% {
    transform: scale(1);
  }
}

.fuzzy-hero-illustration svg path,
.fuzzy-hero-illustration svg circle {
  animation: fuzzyDrift 6s ease-in-out infinite alternate;
}

@keyframes fuzzyDrift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-3px);
  }
}
