/* =========================================================
   psychology.css — Ruang Asesmen Psikologi Design System
   Single source of truth for all assessment modules.
   ========================================================= */

:root {
  /* Core */
  --ink: #17233F;
  --bg: #F7F9FD;
  --surface: #FFFFFF;
  --border: #E8EBF2;
  --text-primary: #17233F;
  --text-secondary: #718096;
  --text-muted: #9AA4B2;

  /* Accent */
  --purple: #7657F4;
  --pink: #ED4F92;
  --green: #13B88A;
  --blue: #3C8DF5;
  --cyan: #31B7D5;
  --yellow: #F5AA16;

  /* Soft backgrounds */
  --purple-soft: #F0EDFF;
  --pink-soft: #FFF0F6;
  --green-soft: #E8FBF5;
  --blue-soft: #EDF5FF;
  --cyan-soft: #EAFBFE;
  --yellow-soft: #FFF7DF;

  /* Theme (overridden per test via data-test) */
  --primary: var(--purple);
  --primary-soft: var(--purple-soft);

  /* Radius */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Shadow */
  --shadow-card: 0 8px 30px rgba(40,50,90,.07);
  --shadow-hover: 0 14px 40px rgba(40,50,90,.10);
  --shadow-soft: 0 18px 55px rgba(64,77,128,.10);

  /* Container */
  --container: 1180px;
}

/* Theme per test */
body[data-test="belbin"]      { --primary: var(--purple); --primary-soft: var(--purple-soft); }
body[data-test="disc"]        { --primary: var(--pink);   --primary-soft: var(--pink-soft); }
body[data-test="mental"]      { --primary: var(--yellow); --primary-soft: var(--yellow-soft); }
body[data-test="mindset"]     { --primary: var(--blue);   --primary-soft: var(--blue-soft); }
body[data-test="stroop"]      { --primary: var(--cyan);   --primary-soft: var(--cyan-soft); }
body[data-test="ams"]         { --primary: var(--purple); --primary-soft: var(--purple-soft); }
body[data-test="gaya_belajar"]{ --primary: var(--yellow); --primary-soft: var(--yellow-soft); }
body[data-test="love_language"]{ --primary: var(--purple); --primary-soft: var(--purple-soft); }
body[data-test="enneagram"]   { --primary: var(--pink);   --primary-soft: var(--pink-soft); }
body[data-test="dass"]        { --primary: var(--purple); --primary-soft: var(--purple-soft); }
body[data-test="cap"]         { --primary: var(--pink);   --primary-soft: var(--pink-soft); }
body[data-test="bigfive"],
body[data-test="big_five"]    { --primary: var(--blue);   --primary-soft: var(--blue-soft); }
body[data-test="cfit3a"]      { --primary: var(--yellow); --primary-soft: var(--yellow-soft); }
body[data-test="mbti"]        { --primary: var(--purple); --primary-soft: var(--purple-soft); }

/* =========================================================
   BASE
   ========================================================= */
*,*::before,*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  margin: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* =========================================================
   LAYOUT
   ========================================================= */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 640px) { .container { padding: 0 16px; } }

.page-section { padding: 56px 0; }
@media (max-width: 640px) { .page-section { padding: 32px 0; } }

/* =========================================================
   HEADER
   ========================================================= */
.psych-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0 24px;
}
.psych-header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.psych-header .logo-icon {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.psych-header .logo-text {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -.02em;
}
.psych-header .logo-sub {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
}
.psych-header .header-meta {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
.section-eyebrow {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--primary);
  margin-bottom: 8px;
}
.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: 1.12;
  color: var(--ink);
}
.section-desc {
  margin-top: 12px;
  max-width: 640px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* =========================================================
   CARD
   ========================================================= */
.psych-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.psych-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.psych-card-body { padding: 24px; }
@media (min-width: 640px) { .psych-card-body { padding: 32px; } }
.psych-card-header { padding: 24px 24px 0; }
@media (min-width: 640px) { .psych-card-header { padding: 32px 32px 0; } }
.psych-card-footer { padding: 16px 24px; border-top: 1px solid var(--border); background: #FAFBFD; }
@media (min-width: 640px) { .psych-card-footer { padding: 16px 32px; } }

/* --- Data diri / info grid --- */
.psych-participant { margin-top: 16px; margin-bottom: 32px; }
.panel-title {
  display: flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 900; color: var(--ink);
  margin: 0 0 18px;
}
.panel-title i { width: 17px; height: 17px; color: var(--primary); flex-shrink: 0; }
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.info-item {
  padding: 12px 14px; border-radius: 12px;
  background: #F8FAFC; border: 1px solid #EDF1F7;
}
.info-item .label {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-muted); margin-bottom: 4px;
}
.info-item .value {
  font-size: 13px; font-weight: 700; color: var(--ink);
  word-break: break-word; line-height: 1.4;
}
@media (max-width: 560px) { .info-grid { grid-template-columns: 1fr 1fr; gap: 10px; } }

/* =========================================================
   BUTTON
   ========================================================= */
.psych-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 900;
  border: none;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
}
.psych-btn:active { transform: scale(.97); }
.psych-btn:disabled { opacity: .45; cursor: not-allowed; }

.psych-btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.psych-btn-primary:hover { filter: brightness(1.08); }

.psych-btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
}
.psych-btn-secondary:hover { background: #f1f4f9; }

.psych-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.psych-btn-ghost:hover { background: var(--primary-soft); color: var(--primary); }

.psych-btn-block { width: 100%; }

/* =========================================================
   BADGE
   ========================================================= */
.psych-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.psych-badge-primary { background: var(--primary-soft); color: var(--primary); }
.psych-badge-success { background: var(--green-soft); color: #0d9668; }
.psych-badge-warning { background: var(--yellow-soft); color: #b97d00; }
.psych-badge-danger  { background: #FEF2F2; color: #DC2626; }
.psych-badge-neutral { background: #f1f3f8; color: #475569; }

/* =========================================================
   FORM
   ========================================================= */
.psych-form-group { margin-bottom: 20px; }
.psych-form-group label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 8px;
}
.psych-form-group label .required { color: #EF4444; }

/* Alias: psych-field + psych-label (used by quiz modules) */
.psych-field { margin-bottom: 16px; }
.psych-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 8px;
}

.psych-input,
.psych-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.psych-input:focus,
.psych-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.psych-input::placeholder { color: var(--text-muted); }

.psych-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}
.psych-checkbox input {
  margin-top: 2px;
  accent-color: var(--primary);
}

/* =========================================================
   PROGRESS
   ========================================================= */
.psych-progress {
  height: 8px;
  border-radius: 999px;
  background: #edf0f5;
  overflow: hidden;
}
.psych-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  transition: width .4s ease;
}

.psych-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 900;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .1em;
}

/* =========================================================
   QUESTION CARD
   ========================================================= */
.psych-question {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  padding: 24px;
}
@media (min-width: 640px) { .psych-question { padding: 36px; } }

.psych-question .q-text {
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 900;
  line-height: 1.3;
  color: var(--ink);
  margin-top: 16px;
}

.psych-question .q-hint {
  margin-top: 12px;
  padding: 10px 14px;
  border-left: 4px solid var(--primary);
  background: var(--primary-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 12px;
  color: var(--text-secondary);
}

/* =========================================================
   OPTION
   ========================================================= */
.psych-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.psych-option:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.psych-option.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.1);
}
.psych-option .opt-num {
  flex-shrink: 0;
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: #f1f4f9;
  font-size: 12px;
  font-weight: 900;
  color: var(--text-secondary);
  transition: all .15s;
}
.psych-option.selected .opt-num {
  background: rgba(255,255,255,.25);
  color: #fff;
}

/* =========================================================
   TIMER
   ========================================================= */
.psych-timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 900;
  box-shadow: var(--shadow-card);
}
.psych-timer.warning { border-color: #F59E0B; color: #B45309; }
.psych-timer.danger  { border-color: #EF4444; color: #DC2626; background: #FEF2F2; }

/* =========================================================
   NAVIGATION (prev/next)
   ========================================================= */
.psych-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  gap: 12px;
}
.psych-nav .spacer { flex: 1; }

/* =========================================================
   RESULTS
   ========================================================= */
.psych-score-hero {
  border-radius: var(--radius-xl);
  background: var(--ink);
  color: #fff;
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.psych-score-hero::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: var(--primary);
  opacity: .12;
}
.psych-score-hero .score-value {
  font-size: clamp(48px, 8vw, 72px);
  font-weight: 900;
  letter-spacing: -.06em;
  line-height: 1;
}
.psych-score-hero .score-label {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: rgba(255,255,255,.85);
}
.psych-score-hero .psych-badge {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
}
.psych-score-hero .score-value {
  color: #fff;
}

.psych-score-bar { margin-bottom: 16px; }
.psych-score-bar .bar-head {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 6px;
}
.psych-score-bar .bar-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  overflow: hidden;
}
.psych-score-bar .bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width .6s ease;
}

/* =========================================================
   RADAR CHART (SVG-based)
   ========================================================= */
.psych-radar {
  display: flex;
  justify-content: center;
  padding: 24px 0;
  overflow: visible;
}
.psych-radar svg { max-width: 440px; width: 100%; overflow: visible; }

/* =========================================================
   RESULT HERO with background image
   ========================================================= */
.psych-score-hero.hero-with-bg {
  background-size: cover;
  background-position: center;
  position: relative;
  color: #fff;
}
.psych-score-hero.hero-with-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(23,35,63,.72), rgba(23,35,63,.42));
  z-index: 0;
}
.psych-score-hero.hero-with-bg > * {
  position: relative;
  z-index: 1;
}

/* =========================================================
   INTERPRETATION
   ========================================================= */
.psych-interpretation {
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  background: var(--primary-soft);
  border: 1px solid var(--border);
  margin-top: 24px;
}
.psych-interpretation h4 {
  font-size: 14px;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 8px;
}
.psych-interpretation p {
  font-size: 13px;
  line-height: 1.7;
  color: #374151;
  margin: 0;
}

/* =========================================================
   SUCCESS SCREEN
   ========================================================= */
.psych-success {
  text-align: center;
  padding: 48px 24px;
}
.psych-success .check-icon {
  width: 80px; height: 80px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-size: 36px;
}
.psych-success h2 {
  font-size: 28px;
  font-weight: 900;
  color: var(--ink);
}
.psych-success p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* =========================================================
   FOOTER
   ========================================================= */
.psych-footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

/* =========================================================
   UTILITY
   ========================================================= */
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.gap-4 { gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hidden { display: none !important; }
.fade-in { animation: fadeIn .4s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

/* Hero & result illustrations */
.hero-illustration {
  width: 100%;
  max-width: 220px;
  margin: 0 auto 28px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0,0,0,.08);
}
.hero-illustration img {
  width: 100%;
  height: auto;
  display: block;
}
.result-illustration {
  width: 100%;
  max-width: 180px;
  margin: 0 auto 16px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  opacity: .9;
}
.result-illustration img {
  width: 100%;
  height: auto;
  display: block;
}

/* Loading spinner */
.psych-loader {
  display: inline-block;
  width: 20px; height: 20px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Mesh background (used on hero panels) */
.psych-mesh {
  background:
    radial-gradient(circle at 20% 20%, rgba(118,87,244,.15), transparent 24%),
    radial-gradient(circle at 80% 10%, rgba(49,183,213,.12), transparent 26%),
    radial-gradient(circle at 65% 80%, rgba(19,184,138,.10), transparent 25%),
    linear-gradient(135deg, #fdfdff, #eef4ff);
}

/* Alert box */
.psych-alert {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  font-size: 12px;
  line-height: 1.6;
}
.psych-alert-success { background: var(--green-soft); color: #065f46; }
.psych-alert-warning { background: var(--yellow-soft); color: #92400e; }
.psych-alert-danger  { background: #FEF2F2; color: #991B1B; }

/* Data diri split layout */
.psych-data-grid {
  display: grid;
  gap: 24px;
}
@media (min-width: 768px) {
  .psych-data-grid { grid-template-columns: 1fr 1.4fr; }
}

/* Group option (for DISC-style) */
.psych-group-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #f1f3f8;
}
.psych-group-option:last-child { border-bottom: none; }
.psych-group-option .opt-text {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  padding-right: 12px;
}
.psych-group-option .opt-actions { display: flex; gap: 16px; }

/* Radio custom for DISC */
.psych-radio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.psych-radio:hover { border-color: var(--primary); }
.psych-radio.radio-m.checked { background: var(--primary); border-color: var(--primary); color: #fff; }
.psych-radio.radio-l.checked { background: #EF4444; border-color: #EF4444; color: #fff; }

/* Point input (for Belbin) */
.psych-point-input {
  width: 52px;
  height: 40px;
  text-align: center;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 900;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  transition: border-color .15s;
}
.psych-point-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

/* Stroop game */
.stroop-word {
  font-size: clamp(60px, 12vw, 100px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -.03em;
  line-height: 1;
  user-select: none;
}
.stroop-btn {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: var(--radius-lg);
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .12s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.stroop-btn:active { transform: scale(.92); }

/* Float label in hero */
.psych-float-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  font-size: 10px;
  font-weight: 900;
}
.psych-float-chip .chip-icon {
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 14px;
}

/* Donut chart */
.psych-donut { position: relative; display: inline-block; }
.psych-donut svg { transform: rotate(-90deg); }
.psych-donut .donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
}

/* =========================================================
   GUEST MODE — hasil tanpa interpretasi lengkap
   body.psych-guest = pengunjung belum login
   ========================================================= */
body.psych-guest .psych-interpretation,
body.psych-guest #result-interpretation,
body.psych-guest #result-interp {
  position: relative;
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
}
body.psych-guest .psych-guest-cta {
  display: none;
}
body.psych-guest .psych-guest-lock {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  margin-top: 16px;
  padding: 24px 20px;
  border-radius: 20px;
  border: 1px dashed var(--primary, #7657F4);
  background: linear-gradient(135deg, rgba(118,87,244,.06), rgba(237,79,146,.06));
}
body.psych-guest .psych-guest-lock .gl-title {
  font-size: 14px; font-weight: 900; color: var(--ink, #1B2B4B);
}
body.psych-guest .psych-guest-lock .gl-sub {
  font-size: 11.5px; line-height: 1.7; color: var(--text-muted, #6B7A99);
  max-width: 420px;
}
body.psych-guest .psych-guest-lock a {
  text-decoration: none;
}

/* =========================================================
   RICH RESULT — kartu statistik, tabel, diagram, poin kunci
   ========================================================= */
:root {
  --rt-excellent: #13B88A;
  --rt-high:      #3C8DF5;
  --rt-mid:       #F5AA16;
  --rt-low:       #ED4F92;
  --rt-verylow:   #E05353;
}

/* --- Stat strip --- */
.psych-stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}
.psych-stat {
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.psych-stat::before {
  content: "";
  position: absolute; inset: 0 auto 0 0;
  width: 4px;
  background: var(--primary);
}
.psych-stat.tone-excellent::before { background: var(--rt-excellent); }
.psych-stat.tone-high::before      { background: var(--rt-high); }
.psych-stat.tone-mid::before       { background: var(--rt-mid); }
.psych-stat.tone-low::before       { background: var(--rt-low); }
.psych-stat.tone-verylow::before   { background: var(--rt-verylow); }
.psych-stat .stat-kicker {
  font-size: 9.5px; font-weight: 900; letter-spacing: .09em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px;
}
.psych-stat .stat-value {
  font-size: 24px; font-weight: 900; color: var(--ink);
  letter-spacing: -.03em; line-height: 1.1;
}
.psych-stat .stat-value small { font-size: 13px; font-weight: 700; color: var(--text-muted); }
.psych-stat .stat-sub {
  margin-top: 5px; font-size: 11px; font-weight: 600; color: var(--text-secondary);
}

/* --- Section blocks --- */
.psych-sec { margin-top: 24px; }
.psych-sec-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.psych-sec-head .sec-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  display: grid; place-items: center; border-radius: 10px;
  background: var(--primary-soft); color: var(--primary);
}
.psych-sec-head .sec-icon i { width: 16px; height: 16px; }
.psych-sec-head h3 {
  font-size: 15px; font-weight: 900; color: var(--ink);
  letter-spacing: -.02em; margin: 0;
}
.psych-sec-head p {
  margin: 2px 0 0; font-size: 11.5px; color: var(--text-muted);
}

/* --- Narasi --- */
.psych-narrative {
  font-size: 13.5px; line-height: 1.85; color: var(--text-secondary);
  padding: 18px 20px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.psych-narrative b { color: var(--ink); font-weight: 800; }
.psych-narrative p + p { margin-top: 10px; }

/* --- Poin kunci --- */
.psych-points { display: grid; gap: 10px; }
.psych-point {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 16px; border-radius: var(--radius-md);
  background: var(--surface); border: 1px solid var(--border);
  font-size: 12.5px; line-height: 1.65; color: var(--text-secondary);
}
.psych-point .pt-num {
  width: 22px; height: 22px; flex-shrink: 0; border-radius: 7px;
  display: grid; place-items: center; font-size: 10.5px; font-weight: 900;
  background: var(--primary-soft); color: var(--primary);
}
.psych-point b { color: var(--ink); }
.psych-point.tone-excellent .pt-num { background: var(--green-soft); color: var(--rt-excellent); }
.psych-point.tone-high .pt-num      { background: var(--blue-soft);  color: var(--rt-high); }
.psych-point.tone-mid .pt-num       { background: var(--yellow-soft); color: #B77A00; }
.psych-point.tone-low .pt-num       { background: var(--pink-soft);  color: var(--rt-low); }
.psych-point.tone-verylow .pt-num   { background: var(--pink-soft);  color: var(--rt-verylow); }

/* --- Dimension detail cards --- */
.psych-dim-grid { display: grid; gap: 12px; }
.psych-dim {
  padding: 16px 18px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.psych-dim-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 9px;
}
.psych-dim-name { font-size: 13px; font-weight: 800; color: var(--ink); }
.psych-dim-val { font-size: 15px; font-weight: 900; color: var(--ink); letter-spacing: -.02em; }
.psych-dim-val small { font-size: 11px; font-weight: 700; color: var(--text-muted); }
.psych-dim-track {
  height: 9px; border-radius: 999px; background: #EEF1F7; overflow: hidden;
}
.psych-dim-fill {
  height: 100%; border-radius: 999px; width: 0;
  transition: width .9s cubic-bezier(.22,1,.36,1);
}
.psych-dim-note {
  margin-top: 9px; font-size: 11.5px; line-height: 1.65; color: var(--text-secondary);
}
.psych-dim-note b { color: var(--ink); }
.psych-dim-advice {
  margin-top: 7px; padding: 9px 12px; border-radius: 10px;
  background: var(--bg); border-left: 3px solid var(--primary);
  font-size: 11.5px; line-height: 1.6; color: var(--text-secondary);
}

/* --- Tabel --- */
.psych-table-wrap {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--surface); box-shadow: var(--shadow-card);
}
.psych-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.psych-table thead th {
  background: var(--bg); text-align: left; padding: 11px 14px;
  font-size: 9.5px; font-weight: 900; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
/* Header sortable */
.psych-table thead th.sortable {
  cursor: pointer; user-select: none; white-space: nowrap;
  transition: color .15s, background .15s;
}
.psych-table thead th.sortable:hover { color: var(--purple); background: var(--primary-soft); }
.psych-table thead th.sortable .sort-ico {
  display: inline-block; width: 0; height: 0; margin-left: 4px;
  vertical-align: middle; opacity: .35;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-bottom: 5px solid currentColor;
}
.psych-table thead th.sort-asc .sort-ico { opacity: 1; border-bottom: 5px solid var(--purple); }
.psych-table thead th.sort-desc .sort-ico { opacity: 1; border-top: 5px solid var(--purple); border-bottom: none; }
.psych-table td {
  padding: 11px 14px; border-bottom: 1px solid var(--border);
  color: var(--text-secondary); vertical-align: middle;
}
.psych-table tbody tr:last-child td { border-bottom: none; }
.psych-table tbody tr:nth-child(even) { background: #FBFCFE; }
.psych-table td strong { color: var(--ink); font-weight: 800; }
.psych-table td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 800; color: var(--ink); }

.pill {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 900; letter-spacing: .02em;
  background: var(--primary-soft); color: var(--primary); white-space: nowrap;
}
.pill.tone-excellent { background: var(--green-soft); color: #0B8F6B; }
.pill.tone-high      { background: var(--blue-soft);  color: #2A6FC4; }
.pill.tone-mid       { background: var(--yellow-soft);color: #A87200; }
.pill.tone-low       { background: var(--pink-soft);  color: #C43A78; }
.pill.tone-verylow   { background: #FDEAEA;           color: #B03A3A; }

/* --- Bar chart (batang horizontal sederhana) --- */
.psych-bar-list { display: grid; gap: 11px; }
.psych-bar-row { display: flex; align-items: center; gap: 12px; }
.psych-bar-row .bar-name {
  width: 148px; flex-shrink: 0; font-size: 11.5px; font-weight: 700;
  color: var(--ink); text-align: right;
}
.psych-bar-row .bar-track {
  flex: 1; height: 11px; border-radius: 999px; background: #EEF1F7; overflow: hidden;
}
.psych-bar-row .bar-fill {
  height: 100%; border-radius: 999px; width: 0;
  transition: width .9s cubic-bezier(.22,1,.36,1);
}
.psych-bar-row .bar-num {
  width: 52px; flex-shrink: 0; font-size: 11.5px; font-weight: 900;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
@media (max-width: 560px) {
  .psych-bar-row .bar-name { width: 96px; font-size: 10.5px; }
}

/* --- Bar sederhana (dim-bar) dipakai renderer tipe/dimensi/radar --- */
.dim-bar { margin-bottom: 14px; }
.dim-bar:last-child { margin-bottom: 0; }
.dim-bar .bar-label {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px; margin-bottom: 6px;
  font-size: 12px; font-weight: 700; color: var(--ink);
}
.dim-bar .bar-label span:last-child {
  font-size: 11.5px; font-weight: 900; color: var(--text-muted);
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.dim-bar .bar-track {
  height: 10px; border-radius: 999px; background: #EEF1F7; overflow: hidden;
}
.dim-bar .bar-fill {
  height: 100%; border-radius: 999px; width: 0;
  transition: width .9s cubic-bezier(.22,1,.36,1);
}

/* --- Donut + legend --- */
.psych-donut-row {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 18px 20px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.psych-legend { display: grid; gap: 8px; flex: 1; min-width: 180px; }
.psych-legend-item {
  display: flex; align-items: center; gap: 9px;
  font-size: 11.5px; font-weight: 700; color: var(--text-secondary);
}
.psych-legend-item .lg-dot {
  width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0;
}
.psych-legend-item .lg-val { margin-left: auto; font-weight: 900; color: var(--ink); }

/* --- Radar wrapper --- */
.psych-radar-box {
  padding: 12px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-card); text-align: center;
}
.psych-radar-box svg { max-width: 100%; height: auto; }

/* --- Kekuatan / pengembangan --- */
.psych-sg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .psych-sg-grid { grid-template-columns: 1fr; } }
.psych-sg {
  padding: 16px 18px; border-radius: var(--radius-lg);
  border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow-card);
}
.psych-sg.good { border-top: 3px solid var(--rt-excellent); }
.psych-sg.grow { border-top: 3px solid var(--rt-mid); }
.psych-sg h4 {
  font-size: 12px; font-weight: 900; color: var(--ink);
  margin: 0 0 11px; display: flex; align-items: center; gap: 7px;
}
.psych-sg h4 i { width: 15px; height: 15px; }
.psych-sg ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.psych-sg li {
  font-size: 11.5px; line-height: 1.6; color: var(--text-secondary);
  padding-left: 15px; position: relative;
}
.psych-sg li::before {
  content: ""; position: absolute; left: 0; top: 6px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--primary);
}
.psych-sg.good li::before { background: var(--rt-excellent); }
.psych-sg.grow li::before { background: var(--rt-mid); }
.psych-sg li b { color: var(--ink); }

/* --- Rekomendasi --- */
.psych-reco { display: grid; gap: 10px; }
.psych-reco-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--purple-soft), #fff);
  border: 1px solid var(--border);
  font-size: 12.5px; line-height: 1.7; color: var(--text-secondary);
}
.psych-reco-item .reco-icon {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 9px;
  display: grid; place-items: center; background: var(--surface);
  color: var(--primary); box-shadow: 0 2px 8px rgba(118,87,244,.14);
}
.psych-reco-item .reco-icon i { width: 14px; height: 14px; }
.psych-reco-item b { color: var(--ink); }

/* --- Catatan / disclaimer --- */
.psych-note {
  margin-top: 22px; padding: 14px 16px; border-radius: var(--radius-md);
  background: var(--bg); border: 1px dashed var(--border);
  font-size: 11px; line-height: 1.7; color: var(--text-muted);
  display: flex; gap: 10px; align-items: flex-start;
}
.psych-note i { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; }

/* --- Animasi masuk --- */
.psych-reveal { opacity: 0; transform: translateY(10px); }
.psych-reveal.shown {
  opacity: 1; transform: none;
  transition: opacity .5s ease, transform .5s cubic-bezier(.22,1,.36,1);
}

/* ═══════════════ INTERPRETATION LOCK ═══════════════ */
.interpretation-lock {
  margin: 20px 0;
  border: 1px dashed var(--primary, #6242d6);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(98,66,214,.06), rgba(98,66,214,.02));
  padding: 40px 28px;
  text-align: center;
}
.interpretation-lock .lock-inner { max-width: 480px; margin: 0 auto; }
.interpretation-lock .lock-icon {
  width: 64px; height: 64px; margin: 0 auto 16px;
  border-radius: 20px; display: grid; place-items: center;
  background: var(--purple-soft, rgba(98,66,214,.12));
  color: var(--purple, #6242d6);
}
.interpretation-lock h3 { font-size: 18px; font-weight: 900; margin-bottom: 8px; }
.interpretation-lock p { font-size: 13.5px; color: var(--text-secondary, #5a6270); line-height: 1.6; margin-bottom: 20px; }
.lock-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.lock-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 12px; border: none; cursor: pointer;
  background: var(--purple, #6242d6); color: #fff; font-weight: 800; font-size: 13px;
  font-family: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s;
}
.lock-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(98,66,214,.28); }
.lock-cta.ghost { background: #fff; color: var(--purple, #6242d6); border: 1px solid var(--primary, #6242d6); }
.unlock-form {
  max-width: 420px; margin: 16px auto 0;
  display: flex; flex-direction: column; gap: 8px; text-align: left;
}
.unlock-form label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted, #8a92a0); }
.unlock-form input {
  padding: 11px 14px; border: 1px solid var(--border, #e2e6ee); border-radius: 10px;
  font-size: 14px; font-family: inherit; outline: none;
}
.unlock-form input:focus { border-color: var(--primary, #6242d6); }
.unlock-form #unlock-msg { font-size: 12.5px; color: #dc2626; min-height: 16px; margin: 0; }
