:root {
  --fci-bg: #f5f7fb;
  --fci-bg-soft: #f9fafb;
  --fci-primary: #111827;
  --fci-purple: #181a3b;
  --fci-muted: #6b7280;
  --fci-border: #e5e7eb;
  --fci-radius-lg: 24px;
  --fci-radius-md: 18px;
  --fci-shadow-lg: 0 30px 60px rgba(15, 23, 42, 0.18);
  --fci-shadow-md: 0 18px 40px rgba(15, 23, 42, 0.12);
  --fci-shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.08);
  --fci-ease: cubic-bezier(.19,1,.22,1);
  --fci-maxw: 1120px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  -webkit-font-smoothing: antialiased;
}

/* WRAPPER */
.fci-wrapper {
  background: #ffffff;
  color: var(--fci-primary);
}

/* ================= HERO ================= */

/* gradasi lembut: hijau muda -> biru muda -> warna background section bawah */
.fci-hero {
  padding: 72px 16px 80px;
  background: linear-gradient(
    180deg,
    #d1fae5 0%,
    #ecfeff 35%,
    #f5f7fb 80%
  );
  text-align: center;
}

.fci-hero-inner {
  max-width: 820px;
  margin: 0 auto;
}

.fci-hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  border: 2px solid rgba(15, 23, 42, 0.08);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  background: rgba(255,255,255,0.8);
}

.fci-hero-duration {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--fci-muted);
}

.fci-hero-title {
  margin: 4px 0 12px;
  font-size: clamp(30px, 5vw, 40px);
  line-height: 1.05;
  font-weight: 800;
}

.fci-hero-subtitle {
  margin: 0 auto 22px;
  max-width: 54rem;
  font-size: 16px;
  color: var(--fci-muted);
}

.fci-hero-subtitle strong {
  color: #111827;
}

.fci-hero-footnote {
  margin-top: 12px;
  font-size: 14px;
  color: var(--fci-muted);
}

/* ================= BUTTONS – dipaksa override theme ================= */

.fci-wrapper .fci-btn-primary,
.fci-wrapper .fci-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px !important;
  padding: 12px 24px !important;
  border-width: 0 !important;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .16s var(--fci-ease), box-shadow .16s var(--fci-ease),
              background-color .16s var(--fci-ease), color .16s var(--fci-ease),
              border-color .16s var(--fci-ease);
  line-height: 1.2;
}

/* tombol utama: ungu pekat ala MBTI */
.fci-wrapper .fci-btn-primary {
  background: var(--fci-purple) !important;
  color: #ffffff !important;
  box-shadow: var(--fci-shadow-md) !important;
}

.fci-wrapper .fci-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--fci-shadow-lg) !important;
}

.fci-wrapper .fci-btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--fci-shadow-sm) !important;
}

/* outline untuk secondary di hasil */
.fci-wrapper .fci-btn-outline {
  background: #ffffff !important;
  color: var(--fci-purple) !important;
  border: 2px solid rgba(15, 23, 42, 0.14) !important;
}

.fci-wrapper .fci-btn-outline:hover {
  background: #f9fafb !important;
}

.fci-btn-icon {
  display: inline-flex;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* ================= TEST SHELL ================= */

/* background dibuat nyambung dengan hero (warna sama di bagian atas) */
.fci-test-shell {
  background: linear-gradient(
    180deg,
    #f5f7fb 0%,
    #f5f7fb 40%,
    #ffffff 100%
  );
  padding: 40px 16px 60px;
  margin-top: -12px; /* sedikit overlap biar transisi makin halus */
}

.fci-test-inner {
  max-width: var(--fci-maxw);
  margin: 0 auto;
}

/* top bar total pertanyaan */

.fci-topbar {
  background: #111827;
  border-radius: 32px;
  padding: 18px 20px;
  color: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--fci-shadow-sm);
  margin-bottom: 26px;
}

.fci-top-total {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.fci-top-time {
  margin: 4px 0 0;
  font-size: 13px;
  color: #e5e7eb;
}

.fci-top-step-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.7);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.fci-step-label {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 11px;
  color: #d1d5db;
}

.fci-step-current {
  font-size: 16px;
  font-weight: 800;
}

.fci-step-divider {
  opacity: .5;
}

/* FORM STEPS */

.fci-form {
  margin-top: 10px;
}

.fci-step {
  display: none;
  background: #ffffff;
  border-radius: 28px;
  padding: 26px 22px 26px;
  box-shadow: var(--fci-shadow-sm);
}

.fci-step.is-active {
  display: block;
}

.fci-step-title {
  margin: 0 0 8px;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
}

.fci-step-desc {
  margin: 0 0 18px;
  text-align: center;
  font-size: 14px;
  color: var(--fci-muted);
}

/* GRID kartu pertanyaan */

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

@media (max-width: 880px) {
  .fci-grid {
    grid-template-columns: 1fr;
  }
}

/* kartu “soal” */

.fci-q-card {
  background: var(--fci-bg-soft);
  border-radius: var(--fci-radius-md);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  padding: 16px 16px 18px;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: flex-start;
}

@media (max-width: 640px) {
  .fci-q-card {
    grid-template-columns: 56px 1fr;
  }
}

.fci-q-illus {
  width: 64px;
  height: 64px;
  border-radius: 24px;
  background: radial-gradient(circle at top left, #e0f2fe 0, #fef3c7 55%, #fee2e2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.15);
}

.fci-q-body h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}

.fci-q-body p {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--fci-muted);
}

/* input dalam kartu */

.fci-q-body input,
.fci-q-body select {
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--fci-border);
  padding: 9px 14px;
  font-size: 14px;
  outline: none;
  background: #ffffff;
  transition: border-color .12s ease, box-shadow .12s ease, background-color .12s ease;
}

.fci-input-prefix {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid var(--fci-border);
  padding: 6px 10px 6px 12px;
  background: #ffffff;
}

.fci-input-prefix span {
  font-size: 13px;
  color: var(--fci-muted);
}

.fci-input-prefix input {
  border: none;
  padding: 6px 4px 6px 0;
  border-radius: 0;
}

.fci-q-body input:focus,
.fci-q-body select:focus,
.fci-input-prefix:focus-within {
  border-color: #4f46e5;
  box-shadow: 0 0 0 1.5px rgba(79, 70, 229, 0.25);
}

/* error */

.fci-field-error {
  border-color: #ef4444 !important;
  background: #fef2f2 !important;
}

/* NAV */

.fci-nav {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* FEEDBACK */

.fci-feedback {
  margin-top: 12px;
  min-height: 18px;
}

.fci-error {
  margin: 0;
  font-size: 14px;
  color: #b91c1c;
}

.fci-loading {
  margin: 0;
  font-size: 14px;
  color: var(--fci-muted);
}

/* ================= HASIL ================= */

.fci-result-shell {
  padding: 60px 16px 80px;
  background: linear-gradient(
    180deg,
    #f5f7fb 0%,
    #ffffff 60%,
    #ffffff 100%
  );
}

.fci-result-inner {
  max-width: 760px;
  margin: 0 auto;
}

.fci-result-hero {
  text-align: center;
  margin-bottom: 26px;
}

.fci-result-badge {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.fci-result-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 32px);
  font-weight: 800;
}

.fci-result-name {
  margin: 0;
  font-size: 14px;
  color: var(--fci-muted);
}

.fci-result-main {
  background: #ffffff;
  border-radius: var(--fci-radius-lg);
  padding: 24px 22px 24px;
  box-shadow: var(--fci-shadow-md);
}

.fci-result-score {
  border-radius: var(--fci-radius-md);
  border: 3px solid #22c55e;
  padding: 18px 16px 16px;
  text-align: center;
}

.fci-result-label {
  margin: 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--fci-muted);
}

.fci-result-value {
  margin: 4px 0 4px;
  font-size: 42px;
  font-weight: 900;
}

.fci-result-cat {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
}

.fci-result-desc {
  margin: 0;
  font-size: 14px;
  color: var(--fci-muted);
}

.fci-result-cta {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 640px) {
  .fci-hero {
    padding-top: 54px;
    padding-bottom: 60px;
  }
  .fci-topbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .fci-step {
    padding: 20px 16px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* ================== BEAUTIFY INPUT CARDS ================== */

/* kartu: lebih bulat, lembut, ada glow sedikit */
.fci-q-card {
  background:
    radial-gradient(circle at top left, #fdf2ff 0, #eef2ff 32%, #ffffff 70%) padding-box,
    #e5e7eb border-box;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  padding: 22px 24px 20px;
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 18px;
  align-items: center;
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.14);
}

@media (max-width: 640px) {
  .fci-q-card {
    grid-template-columns: 64px 1fr;
    padding: 18px 18px 16px;
  }
}

/* ikon emoji kiri: kotak gradient ala iOS */
.fci-q-illus {
  width: 82px;
  height: 82px;
  border-radius: 26px;
  background: conic-gradient(
    from 210deg,
    #fee2e2,
    #fef3c7,
    #dcfce7,
    #e0f2fe,
    #fee2e2
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

@media (max-width: 640px) {
  .fci-q-illus {
    width: 64px;
    height: 64px;
    border-radius: 22px;
    font-size: 30px;
  }
}

/* judul + deskripsi */
.fci-q-body h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.fci-q-body p {
  margin: 0 0 14px;
  font-size: 14px;
  color: #6b7280;
}

/* input & select: pill tinggi, shadow lembut */
.fci-q-body input,
.fci-q-body select {
  width: 100%;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 14px 18px;
  font-size: 15px;
  background: #fbfbff;
  box-shadow:
    0 14px 30px rgba(148, 163, 184, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.9) inset;
  outline: none;
  transition:
    border-color 0.14s ease,
    box-shadow 0.14s ease,
    background-color 0.14s ease,
    transform 0.08s ease;
}

.fci-q-body select {
  padding-right: 42px;
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #4b5563 50%),
    linear-gradient(135deg, #4b5563 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 15px) 50%;
  background-size: 8px 8px, 8px 8px;
  background-repeat: no-repeat;
}

.fci-q-body input::placeholder {
  color: #9ca3af;
}

/* fokus: border ungu dan glow kecil */
.fci-q-body input:focus,
.fci-q-body select:focus,
.fci-input-prefix:focus-within {
  border-color: #4f46e5;
  background: #ffffff;
  box-shadow:
    0 18px 40px rgba(79, 70, 229, 0.34),
    0 0 0 1.5px rgba(79, 70, 229, 0.35);
  transform: translateY(-1px);
}

/* versi prefix (Rp, dll) */
.fci-input-prefix {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 10px 16px;
  background: #fbfbff;
  box-shadow:
    0 14px 30px rgba(148, 163, 184, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.9) inset;
}

.fci-input-prefix span {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
}

.fci-input-prefix input {
  border: none;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

/* error state tetap jalan, tapi lebih halus */
.fci-field-error {
  border-color: #f97373 !important;
  background: #fef2f2 !important;
  box-shadow:
    0 14px 30px rgba(248, 113, 113, 0.4),
    0 0 0 1px rgba(254, 226, 226, 0.9) inset !important;
}
/* ================== INPUT / SELECT PILL STYLE ================== */

.fci-form input[type="text"],
.fci-form input[type="email"],
.fci-form input[type="number"],
.fci-form input[type="tel"],
.fci-form input[type="url"],
.fci-form select,
.fci-form textarea {
  width: 100%;
  border-radius: 999px;                /* pill */
  border: 1px solid #d1d5db;
  padding: 14px 18px;
  font-size: 15px;
  line-height: 1.3;
  background: #fbfbff;
  color: #0f172a;
  box-shadow:
    0 14px 30px rgba(148, 163, 184, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.9) inset;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease,
    transform 0.08s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* placeholder lembut */
.fci-form input::placeholder,
.fci-form textarea::placeholder {
  color: #9ca3af;
}

/* fokus: dark navy + glow lembut */
.fci-form input:focus,
.fci-form select:focus,
.fci-form textarea:focus {
  border-color: #111827;
  background: #ffffff;
  box-shadow:
    0 20px 45px rgba(15, 23, 42, 0.35),
    0 0 0 1.5px rgba(15, 23, 42, 0.7);
  transform: translateY(-1px);
}

/* select: panah custom */
.fci-form select {
  padding-right: 42px;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, #4b5563 50%),
    linear-gradient(135deg, #4b5563 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 15px) 50%;
  background-size: 8px 8px, 8px 8px;
  background-repeat: no-repeat;
}

/* versi dengan prefix (misal "Rp") */
.fci-input-prefix {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 10px 16px 10px 16px;
  background: #fbfbff;
  box-shadow:
    0 14px 30px rgba(148, 163, 184, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.9) inset;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease,
    transform 0.08s ease;
}

.fci-input-prefix span {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
}

.fci-input-prefix input {
  border: none;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

/* fokus di wrapper prefix */
.fci-input-prefix:focus-within {
  border-color: #111827;
  background: #ffffff;
  box-shadow:
    0 20px 45px rgba(15, 23, 42, 0.35),
    0 0 0 1.5px rgba(15, 23, 42, 0.7);
  transform: translateY(-1px);
}

/* error state (kalau JS kamu kasih class ini) */
.fci-form .fci-field-error,
.fci-form input.fci-field-error,
.fci-form select.fci-field-error {
  border-color: #f97373 !important;
  background: #fef2f2 !important;
  box-shadow:
    0 14px 32px rgba(248, 113, 113, 0.45),
    0 0 0 1px rgba(254, 226, 226, 0.9) inset !important;
}
