/* Zenter-themed Aptitude Web App */

:root {
  --bg: #f8fafc;
  --bg-soft: #f1f5f9;
  --surface: #ffffff;
  --surface-tint: #f8fbff;
  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #64748b;
  --ink-4: #94a3b8;
  --border: #e2e8f0;
  --border-soft: #edf2f7;

  --primary: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1e40af;
  --accent: #10b981;
  --accent-dark: #059669;
  --green: #10b981;
  --text-muted: #94a3b8;
  --accent-light: #3b82f6;
  --danger: #ef4444;
  --warning: #f59e0b;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  --gradient-primary: linear-gradient(135deg, #1e40af 0%, #2563eb 55%, #60a5fa 100%);
  --gradient-accent: linear-gradient(135deg, #059669, #10b981);
  --gradient-soft: linear-gradient(180deg, #ffffff, #f8fbff);

  --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(37, 99, 235, 0.14);
}

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

html {
  scroll-behavior: smooth;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.1), transparent 38%),
    radial-gradient(circle at 95% 8%, rgba(16, 185, 129, 0.11), transparent 34%),
    var(--bg);
  line-height: 1.55;
  overflow: hidden;
}

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(100, 116, 139, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 116, 139, 0.22) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.82;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.14), transparent 70%);
  top: -200px;
  left: -200px;
}

.orb-2 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.11), transparent 70%);
  right: -160px;
  bottom: -140px;
}

.orb-3 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08), transparent 70%);
  top: 50%;
  left: 50%;
}

/* Landing */
.landing-body {
  height: 100dvh;
  overflow: hidden;
}

.landing-wrapper {
  --fit-scale: 1;
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 100%;
  width: 100%;
  max-width: 1420px;
  margin: 0 auto;
  padding: 28px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 34px;
  align-items: center;
  transform: scale(var(--fit-scale));
  transform-origin: top center;
}

.hero-watermark {
  position: absolute;
  top: 50%;
  left: -10%;
  right: -10%;
  transform: translateY(-50%);
  font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  font-size: clamp(56px, 8vw, 130px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(15, 23, 42, 0.08);
  white-space: nowrap;
  pointer-events: none;
  animation: bg-scroll 35s linear infinite;
}

.page-watermark {
  position: fixed;
  top: 48%;
  left: -8%;
  right: -8%;
  transform: translateY(-50%);
  z-index: 0;
  font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  font-size: clamp(48px, 7vw, 118px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(15, 23, 42, 0.08);
  white-space: nowrap;
  pointer-events: none;
  animation: bg-scroll 35s linear infinite;
}

@keyframes bg-scroll {
  from {
    transform: translateY(-50%) translateX(0);
  }

  to {
    transform: translateY(-50%) translateX(-30%);
  }
}

.landing-left,
.landing-right {
  position: relative;
  min-width: 0;
  z-index: 1;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.logo-sm {
  font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.logo-sm span {
  color: var(--primary);
}

.logo-lg {
  font-size: 1.34rem;
}

.brand-icon,
.brand-icon-sm {
  background: var(--gradient-primary);
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.26);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-icon {
  width: 42px;
  height: 42px;
}

.brand-icon-sm {
  width: 30px;
  height: 30px;
}

.brand-name {
  font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(37, 99, 235, 0.2);
  background: rgba(239, 246, 255, 0.95);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 7px 13px;
  margin-bottom: 14px;
}

.hero-heading {
  font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  font-size: clamp(2rem, 4.8vw, 4.3rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
  margin-bottom: 14px;
}

.heading-accent {
  background: linear-gradient(95deg, #1e40af, #2563eb, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 560px;
  color: var(--ink-3);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 18px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.stat-item {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-num {
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  color: var(--primary-dark);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  margin-top: 4px;
  color: var(--ink-4);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.category-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cat-tag,
.cat-chip {
  border: 1px solid;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
}

.cat-tag.quant,
.cat-chip.cat-quantitativeaptitude {
  color: #1d4ed8;
  background: rgba(29, 78, 216, 0.09);
  border-color: rgba(29, 78, 216, 0.25);
}

.cat-tag.logic,
.cat-chip.cat-logicalreasoning {
  color: #4338ca;
  background: rgba(67, 56, 202, 0.09);
  border-color: rgba(67, 56, 202, 0.25);
}

.cat-tag.data,
.cat-chip.cat-datainterpretation {
  color: #0f766e;
  background: rgba(15, 118, 110, 0.09);
  border-color: rgba(15, 118, 110, 0.25);
}

.cat-tag.prog,
.cat-chip.cat-basicprogramminglogic {
  color: #c2410c;
  background: rgba(194, 65, 12, 0.09);
  border-color: rgba(194, 65, 12, 0.25);
}

.form-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 34px;
  background: var(--gradient-soft);
  box-shadow: var(--shadow-lg);
}

.form-header {
  margin-bottom: 20px;
}

.form-header h2 {
  font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  font-size: clamp(1.35rem, 2.1vw, 1.9rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.form-header p {
  margin-top: 8px;
  color: var(--ink-3);
  font-size: 14px;
}

.alert {
  margin-bottom: 16px;
  padding: 10px 12px;
  font-size: 13px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-error {
  border: 1px solid rgba(239, 68, 68, 0.34);
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.75);
}

.field-group {
  margin-bottom: 14px;
}

.field-group label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.required {
  color: var(--danger);
}

.optional {
  color: var(--ink-4);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.field-group input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
  padding: 11px 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field-group input::placeholder {
  color: var(--ink-4);
}

.field-group input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.consent-box {
  margin: 20px 0;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  color: var(--ink-3);
  font-size: 13px;
}

.checkbox-label input {
  display: none;
}

.checkmark {
  width: 19px;
  min-width: 19px;
  height: 19px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-label input:checked + .checkmark {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-label input:checked + .checkmark::after {
  content: '✓';
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.btn-start {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 13px 14px;
  color: #fff;
  background: var(--gradient-primary);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.btn-start:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.34);
}

.btn-start:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.form-footer {
  margin-top: 16px;
}

.rules-list {
  display: grid;
  gap: 6px;
}

.rule-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-4);
  font-size: 12px;
}

/* Test */
.test-body {
  height: 100dvh;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.94), rgba(241, 245, 249, 0.9));
}

.test-header {
  position: sticky;
  top: 0;
  z-index: 200;
  min-height: 64px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark-sm {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.brand-subtitle {
  font-size: 10px;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-weight: 700;
  white-space: nowrap;
}

.candidate-badge {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(37, 99, 235, 0.18);
  background: rgba(239, 246, 255, 0.92);
  color: var(--primary-dark);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
}

.candidate-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-center {
  flex: 1;
  max-width: 420px;
  min-width: 0;
}

.progress-container {
  height: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 5px;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: var(--gradient-primary);
  border-radius: var(--radius-pill);
  transition: width 0.35s ease;
}

.progress-label {
  text-align: center;
  color: var(--ink-4);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.timer-display {
  border-radius: 11px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-2);
}

.timer-display.warning {
  border-color: rgba(245, 158, 11, 0.46);
  color: #b45309;
}

.timer-display.critical {
  border-color: rgba(239, 68, 68, 0.46);
  color: #b91c1c;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

.test-layout {
  display: flex;
  height: calc(100dvh - 64px);
  overflow: hidden;
}

.question-nav {
  width: 270px;
  min-width: 270px;
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  padding: 20px;
  overflow-y: auto;
}

.nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.nav-header h3 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
}

.nav-close {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-4);
  font-size: 16px;
}

.nav-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  color: var(--ink-4);
  font-size: 11px;
}

.nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.nav-dot.answered {
  background: var(--accent);
}

.nav-dot.current {
  background: var(--primary);
}

.nav-dot.unanswered {
  background: #fff;
  border: 1px solid var(--border);
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.nav-btn {
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-btn.unanswered {
  background: #fff;
}

.nav-btn.answered {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-dark);
}

.nav-btn.current {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.nav-btn:hover {
  border-color: rgba(37, 99, 235, 0.48);
  color: var(--primary);
}

.test-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.question-card {
  display: none;
  width: 100%;
  max-width: 780px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--gradient-soft);
  box-shadow: var(--shadow-md);
  padding: 34px;
  margin-bottom: 18px;
  animation: fadeIn 0.3s ease;
}

.question-card.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.question-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.meta-category {
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border: 1px solid;
}

.meta-difficulty {
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
}

.diff-easy {
  color: var(--accent-dark);
  background: rgba(16, 185, 129, 0.14);
}

.diff-medium {
  color: #b45309;
  background: rgba(245, 158, 11, 0.14);
}

.diff-hard {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.13);
}

.meta-num {
  margin-left: auto;
  color: var(--ink-4);
  font-size: 11px;
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-weight: 700;
}

.question-text {
  font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1.45;
  margin-bottom: 20px;
}

.options-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.option-label {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 13px 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.option-label:hover {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(239, 246, 255, 0.58);
}

.option-label.selected {
  border-color: var(--primary-light);
  background: rgba(239, 246, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

.option-label input {
  display: none;
}

.option-marker {
  width: 30px;
  min-width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.option-label.selected .option-marker {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.option-text {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.5;
  flex: 1;
}

.option-check {
  opacity: 0;
  color: var(--primary);
  transition: opacity 0.2s;
}

.option-label.selected .option-check {
  opacity: 1;
}

.question-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.btn-nav {
  border-radius: 10px;
  border: 1px solid;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s, background-color 0.18s;
}

.btn-nav:hover {
  transform: translateY(-1px);
}

.btn-prev {
  border-color: var(--border);
  background: #fff;
  color: var(--ink-3);
}

.btn-prev:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-next {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-dark);
}

.btn-submit {
  border: none;
  color: #fff;
  background: var(--gradient-accent);
}

.btn-clear {
  border: none;
  background: none;
  color: var(--ink-4);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 10px;
}

.btn-clear:hover {
  color: #b91c1c;
}

.nav-toggle-btn {
  width: 100%;
  max-width: 780px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink-3);
  padding: 11px;
  font-size: 13px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.nav-toggle-btn:hover {
  border-color: rgba(37, 99, 235, 0.45);
  color: var(--primary);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  width: min(92%, 460px);
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow-lg);
  padding: 30px;
  text-align: center;
  transform: translateY(8px) scale(0.98);
  transition: transform 0.22s ease;
}

.modal-overlay.open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-icon {
  font-size: 34px;
  margin-bottom: 12px;
}

.modal-card h3 {
  font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  font-size: 1.3rem;
  margin-bottom: 14px;
}

.modal-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 14px;
}

.modal-stat-val {
  font-size: 1.6rem;
  line-height: 1;
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-weight: 700;
}

.modal-stat-label {
  margin-top: 4px;
  font-size: 10px;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.modal-warning {
  color: var(--ink-3);
  font-size: 13px;
  margin-bottom: 18px;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.btn-modal-cancel,
.btn-modal-confirm {
  flex: 1;
  padding: 10px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn-modal-cancel {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink-3);
}

.btn-modal-confirm {
  border: none;
  color: #fff;
  background: var(--gradient-primary);
}

/* Result */
.result-body {
  height: 100dvh;
  overflow: hidden;
}

.result-wrapper {
  --fit-scale: 1;
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px 18px 40px;
  transform: scale(var(--fit-scale));
  transform-origin: top center;
}

.result-header {
  margin-bottom: 14px;
}

.result-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.score-hero {
  padding: 38px 24px;
  border-radius: 24px;
  border: 1px solid var(--border);
  text-align: center;
  margin-bottom: 18px;
  box-shadow: var(--shadow-md);
  background: #fff;
}

.grade-excellent {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.09), #ffffff 70%);
}

.grade-good {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.09), #ffffff 70%);
}

.grade-average {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.1), #ffffff 70%);
}

.grade-poor {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.09), #ffffff 70%);
}

.score-emoji {
  font-size: 30px;
  margin-bottom: 8px;
}

.score-circle-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 10px;
}

.score-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-number {
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--ink);
}

.score-grade {
  font-size: 10px;
  color: var(--ink-4);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.score-message {
  color: var(--ink-3);
  font-size: 1rem;
}

.score-candidate {
  margin-top: 6px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}

.result-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.stat-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  font-size: 20px;
  margin-bottom: 6px;
}

.stat-value {
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--ink);
}

.stat-correct .stat-value {
  color: #0f766e;
}

.stat-wrong .stat-value {
  color: #b91c1c;
}

.stat-skip .stat-value {
  color: var(--ink-4);
}

.stat-time .stat-value {
  color: var(--primary-dark);
  font-size: 1.15rem;
}

.result-section {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.section-title {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-subtitle {
  color: var(--ink-4);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-key {
  color: var(--ink-4);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.info-val {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 700;
}

.breakdown-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
}

.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.breakdown-table thead th {
  padding: 10px 12px;
  text-align: left;
  color: var(--ink-4);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  background: #fbfdff;
  border-bottom: 1px solid var(--border-soft);
}

.breakdown-row {
  cursor: pointer;
  transition: background-color 0.15s;
}

.breakdown-row:hover {
  background: rgba(241, 245, 249, 0.8);
}

.breakdown-row td {
  padding: 10px 12px;
  font-size: 12px;
  border-bottom: 1px solid var(--border-soft);
}

.breakdown-row.correct {
  border-left: 3px solid #10b981;
}

.breakdown-row.wrong {
  border-left: 3px solid #ef4444;
}

.breakdown-row.skipped {
  border-left: 3px solid var(--border);
}

.td-num {
  color: var(--ink-4);
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-weight: 700;
}

.td-question {
  color: var(--ink-2);
  max-width: 300px;
}

.td-answer {
  color: var(--ink-3);
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-weight: 700;
}

.td-correct {
  color: #0f766e;
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-weight: 700;
}

.skipped-dash {
  color: var(--ink-4);
}

.status-badge {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.status-badge.correct {
  background: rgba(16, 185, 129, 0.15);
  color: #0f766e;
}

.status-badge.wrong {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

.status-badge.skip {
  background: rgba(148, 163, 184, 0.2);
  color: var(--ink-4);
}

.detail-row {
  display: none;
}

.detail-row.open {
  display: table-row;
}

.detail-row td {
  padding: 0;
}

.detail-content {
  padding: 14px 16px;
  background: #f8fafc;
  border-top: 1px solid var(--border-soft);
}

.detail-q {
  color: var(--ink-2);
  font-size: 13px;
  margin-bottom: 10px;
  line-height: 1.5;
}

.detail-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.detail-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink-2);
  font-size: 12px;
  padding: 8px 10px;
}

.detail-opt.opt-correct {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.09);
  color: #0f766e;
}

.detail-opt.opt-wrong {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
  text-decoration: line-through;
}

.opt-key {
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 700;
  border-radius: 6px;
  background: #e2e8f0;
  color: #334155;
  padding: 2px 7px;
}

.result-footer {
  text-align: center;
  margin-top: 20px;
  color: var(--ink-3);
  font-size: 14px;
}

.btn-retake {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  border: 1px solid rgba(37, 99, 235, 0.3);
  background: rgba(239, 246, 255, 0.9);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 20px;
  transition: all 0.2s;
}

.btn-retake:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
}

.result-cta {
  margin-top: 14px;
  border-radius: 22px;
  background: #0f172a;
  color: #fff;
  padding: 34px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.result-cta::before {
  content: '';
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.22);
  filter: blur(50px);
  top: -170px;
  right: -120px;
}

.result-cta::after {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.14);
  filter: blur(56px);
  bottom: -180px;
  left: -90px;
}

.result-cta h3 {
  position: relative;
  z-index: 1;
  font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.result-cta p {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.75);
  max-width: 640px;
  margin: 0 auto 18px;
}

.result-cta-actions {
  position: relative;
  z-index: 1;
}

.btn-retake-dark {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-retake-dark:hover {
  border-color: rgba(255, 255, 255, 0.42);
}

/* Responsive */
@media (max-width: 1024px) {
  .landing-wrapper {
    grid-template-columns: 1fr;
    max-width: 620px;
    gap: 26px;
    padding-top: 24px;
  }

  .question-nav {
    position: fixed;
    left: -290px;
    top: 64px;
    bottom: 0;
    z-index: 250;
    box-shadow: var(--shadow-lg);
    transition: left 0.3s;
  }

  .question-nav.open {
    left: 0;
  }

  .nav-close,
  .nav-toggle-btn {
    display: block;
  }

  .nav-toggle-btn {
    display: flex;
  }

  .result-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-watermark {
    left: -24%;
    right: -24%;
    top: 44%;
  }

  .page-watermark {
    left: -24%;
    right: -24%;
  }
}

@media (max-width: 640px) {
  .landing-wrapper {
    padding: 18px 14px 28px;
  }

  .form-card {
    padding: 22px;
  }

  .field-row,
  .detail-opts,
  .info-row {
    grid-template-columns: 1fr;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .test-header {
    padding: 8px;
    gap: 8px;
  }

  .candidate-badge {
    display: none;
  }

  .brand-mark-sm span {
    display: none;
  }

  .brand-mark-sm .brand-subtitle {
    display: none;
  }

  .test-main {
    padding: 14px;
  }

  .question-card {
    padding: 20px 16px;
  }

  .question-footer {
    flex-wrap: wrap;
  }

  .result-stats-grid {
    grid-template-columns: 1fr;
  }

  .result-wrapper {
    padding: 18px 12px 30px;
  }

  .hero-watermark {
    display: none;
  }

  .page-watermark {
    display: none;
  }

  .result-cta {
    padding: 24px 14px;
    border-radius: 16px;
  }
}
