/* ============================================================
   QA Skill Check — Design System v3
   Skill: ui-ux-pro-max
   Style: Monochrome Professional Dark
   Palette: Obsidian #09090B · White primary · Zinc grays
   Fonts: Syne (display) · IBM Plex Mono (data) · DM Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;700&family=DM+Sans:opsz,wght@9..40,300;400;500;600&display=swap');

:root {
  /* Backgrounds */
  --bg:        #09090B;
  --bg-1:      #111113;
  --bg-2:      #18181B;
  --bg-3:      #27272A;

  /* Borders */
  --border:    rgba(255,255,255,0.07);
  --border-md: rgba(255,255,255,0.12);
  --border-hi: rgba(255,255,255,0.22);

  /* Text — WCAG AA contrast on --bg */
  --text:      #FAFAFA;   /* 18.6:1 */
  --text-2:    #A1A1AA;   /* 5.8:1  — passes AA */
  --text-3:    #71717A;   /* 4.6:1  — passes AA large */
  --text-inv:  #09090B;

  /* Primary action — white on dark */
  --white:     #FFFFFF;
  --white-dim: rgba(255,255,255,0.06);
  --white-md:  rgba(255,255,255,0.10);

  /* Semantic — muted, not neon */
  --red:       #F87171;
  --red-dim:   rgba(248,113,113,0.10);
  --amber:     #FBB040;
  --amber-dim: rgba(251,176,64,0.10);
  --green:     #4ADE80;
  --green-dim: rgba(74,222,128,0.10);

  /* Radii */
  --radius:    12px;
  --radius-sm: 8px;
  --radius-xs: 5px;

  /* Fonts */
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;

  /* Subtle dot grid */
  --dot-color: rgba(255,255,255,0.035);
  --dot-space: 28px;
}

/* ── Reset ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  background: var(--bg);
  background-image: radial-gradient(var(--dot-color) 1px, transparent 1px);
  background-size: var(--dot-space) var(--dot-space);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Layout ─────────────────────────────────────── */
.container { max-width: 780px; margin: 0 auto; padding: 0 24px; }
.page { min-height: 100vh; display: flex; flex-direction: column; }

/* ── Header ─────────────────────────────────────── */
header {
  border-bottom: 1px solid var(--border);
  background: rgba(9,9,11,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 200;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.logo { text-decoration: none; display: flex; align-items: center; }

.site-logo {
  height: 26px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.85;
  transition: opacity 0.2s;
}
.site-logo:hover { opacity: 1; }

/* ── Cards ──────────────────────────────────────── */
.card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 16px;
}

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

/* ── Forms ──────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group.full { grid-column: 1 / -1; }

label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

label .required { color: var(--red); margin-left: 2px; }

input[type="text"],
input[type="email"],
select,
textarea {
  background: var(--bg-2);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 11px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  /* ui-ux-pro-max: touch-friendly-input — min 44px height */
  min-height: 44px;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717A' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

/* ui-ux-pro-max: focus-states — visible focus ring */
input:focus, select:focus, textarea:focus {
  border-color: var(--border-hi);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
}

input::placeholder, textarea::placeholder { color: var(--text-3); }

textarea {
  resize: vertical;
  min-height: 190px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
}

/* ── Buttons ─────────────────────────────────────── */
/* ui-ux-pro-max: touch-target-size — 44×44pt min */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  padding: 12px 24px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s, transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.2px;
  /* ui-ux-pro-max: cursor-pointer */
  cursor: pointer;
  touch-action: manipulation;
}

/* Primary: white bg, black text — maximum contrast */
.btn-primary {
  background: var(--white);
  color: var(--text-inv);
}

.btn-primary:hover {
  background: #E4E4E7;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(255,255,255,0.08);
}

.btn-primary:active {
  transform: scale(0.98);
  box-shadow: none;
}

/* Ghost: transparent with border */
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border-md);
}

.btn-ghost:hover {
  border-color: var(--border-hi);
  color: var(--text);
  background: var(--white-dim);
}

.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-full { width: 100%; }

/* ui-ux-pro-max: disabled-states */
.btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Progress bar ────────────────────────────────── */
.progress-bar-wrap {
  background: rgba(9,9,11,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 11px 0;
  position: sticky;
  top: 55px;
  z-index: 100;
}

.progress-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.progress-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.progress-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 2px 10px;
  border-radius: 100px;
}

.progress-track {
  height: 1px;
  background: var(--bg-3);
  border-radius: 1px;
  overflow: visible;
}

.progress-fill {
  height: 1px;
  background: var(--white);
  border-radius: 1px;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--white);
}

/* ── Timer ───────────────────────────────────────── */
.timer-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 20px 24px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.timer-display {
  font-family: var(--font-mono);
  font-size: 44px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 2px;
  min-width: 120px;
  text-align: center;
  line-height: 1;
  transition: color 0.3s;
  /* ui-ux-pro-max: number-tabular */
  font-variant-numeric: tabular-nums;
}

.timer-display.warning { color: var(--amber); }
.timer-display.danger {
  color: var(--red);
  animation: timer-pulse 1s ease-in-out infinite;
}

/* ui-ux-pro-max: reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .timer-display.danger { animation: none; }
}

@keyframes timer-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}

.timer-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 4px;
}

.timer-ring { width: 60px; height: 60px; }
.timer-ring svg { transform: rotate(-90deg); }
.timer-ring-bg { fill: none; stroke: var(--bg-3); stroke-width: 2.5; }

.timer-ring-progress {
  fill: none;
  stroke: var(--white);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 145;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.3s;
}

.timer-ring-progress.warning { stroke: var(--amber); }
.timer-ring-progress.danger  { stroke: var(--red); }

/* ── Sticky timer strip ──────────────────────────── */
/* Slides in below the progress bar once the main timer scrolls out of view */
.sticky-timer-strip {
  position: sticky;
  top: 99px; /* header 55px + progress bar ~44px */
  z-index: 90;
  background: rgba(9,9,11,0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.22s ease;
}

.sticky-timer-strip.show {
  max-height: 46px;
}

.sticky-timer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
}

.sticky-domain-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55%;
}

.sticky-timer-right {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-shrink: 0;
}

.sticky-timer-display {
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1.5px;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}

.sticky-timer-display.warning { color: var(--amber); }
.sticky-timer-display.danger  {
  color: var(--red);
  animation: timer-pulse 1s ease-in-out infinite;
}

.sticky-timer-unit {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── Domain badge ────────────────────────────────── */
.task-domain-badge {
  display: inline-flex;
  align-items: center;
  background: var(--white-dim);
  color: var(--text-2);
  border: 1px solid var(--border-md);
  border-radius: 100px;
  padding: 3px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}

/* ── Section headers ─────────────────────────────── */
.section-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.section-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.mcq-icon {
  background: var(--white-dim);
  color: var(--text-2);
  border: 1px solid var(--border-md);
}

.task-icon {
  background: var(--amber-dim);
  color: var(--amber);
  border: 1px solid rgba(251,176,64,0.2);
}

.section-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1px;
}

.section-sub { font-size: 13px; color: var(--text-3); }

/* ── MCQ Blocks ──────────────────────────────────── */
.mcq-block {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 10px;
}

.mcq-qnum {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 10px;
}

.mcq-question {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 16px;
  white-space: pre-wrap;
}

.mcq-options { display: flex; flex-direction: column; gap: 7px; }

/* ui-ux-pro-max: touch-target-size, state-clarity */
.mcq-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  min-height: 44px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  /* Override global label styles */
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-2);
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.55;
  user-select: none;
  touch-action: manipulation;
}

.mcq-option input[type="radio"],
.mcq-option input[type="checkbox"] { display: none; }

/* ── Visible checkbox indicator ──────────────────── */
.mcq-checkbox {
  width: 17px;
  height: 17px;
  min-width: 17px;
  border: 1.5px solid var(--border-md);
  border-radius: 4px;
  background: var(--bg-3);
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}

.mcq-option.selected .mcq-checkbox {
  background: var(--white);
  border-color: var(--white);
}

/* Checkmark via CSS */
.mcq-option.selected .mcq-checkbox::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: 2px solid var(--text-inv);
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.mcq-option:hover {
  border-color: var(--border-hi);
  background: var(--bg-3);
  color: var(--text);
}

.mcq-option.selected {
  border-color: var(--white);
  background: var(--white-md);
  color: var(--text);
}

.mcq-option.correct {
  border-color: rgba(74,222,128,0.35);
  background: var(--green-dim);
  color: var(--green);
}

.mcq-option.incorrect {
  border-color: rgba(248,113,113,0.3);
  background: var(--red-dim);
  color: var(--red);
}

.mcq-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: var(--bg-3);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
  transition: background 0.15s, color 0.15s;
}

.mcq-option.selected .mcq-marker {
  background: var(--white);
  color: var(--text-inv);
}

/* ── Task Blocks ─────────────────────────────────── */
.task-block {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 12px;
}

.task-block-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.task-block-num {
  background: var(--amber-dim);
  border: 1px solid rgba(251,176,64,0.2);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 10px;
  border-radius: 100px;
  flex-shrink: 0;
}

.task-block-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.scenario-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 2px solid var(--border-hi);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}

.task-question-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin: 14px 0 8px;
}

.task-question-text {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.75;
  white-space: pre-wrap;
  margin-bottom: 14px;
}

.answer-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  display: block;
  margin-bottom: 8px;
}

.answer-textarea {
  min-height: 190px;
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg);
}

.char-count {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  margin-top: 6px;
}

/* ── Auto-submit warning ─────────────────────────── */
.autosubmit-notice {
  background: var(--amber-dim);
  border: 1px solid rgba(251,176,64,0.2);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--amber);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Notices ─────────────────────────────────────── */
.notice {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.6;
  display: flex;
  gap: 10px;
}

.notice-warning { background: var(--amber-dim); border: 1px solid rgba(251,176,64,0.18); color: var(--amber); }
.notice-danger  { background: var(--red-dim);   border: 1px solid rgba(248,113,113,0.18); color: var(--red); }
.notice-info    { background: var(--white-dim);  border: 1px solid var(--border-md); color: var(--text-2); }

/* ── Instructions page ───────────────────────────── */
.rules-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }

.rules-list li { display: flex; gap: 14px; align-items: flex-start; }

.rule-num {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: var(--bg-3);
  border: 1px solid var(--border-md);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.rule-text { font-size: 14px; color: var(--text-2); line-height: 1.65; }
.rule-text strong { color: var(--text); }

.domain-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.domain-item {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-2);
  transition: border-color 0.15s;
}

.domain-item .num {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-3);
  font-size: 11px;
  width: 18px;
  flex-shrink: 0;
}

/* ── Thank you ───────────────────────────────────── */
.thankyou-hero {
  text-align: center;
  padding: 64px 0 36px;
}

.check-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green-dim);
  border: 1px solid rgba(74,222,128,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 24px;
  color: var(--green);
}

.thankyou-hero h1 {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 12px;
}

.thankyou-hero p { color: var(--text-2); font-size: 15px; max-width: 440px; margin: 0 auto; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 24px 0;
}

.summary-stat {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.summary-stat .stat-num {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.summary-stat .stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Task mark badges ────────────────────────────── */
.task-mark-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--amber-dim);
  color: var(--amber);
  border: 1px solid rgba(251,176,64,0.2);
}

.task-mark-badge.high {
  background: var(--green-dim);
  color: var(--green);
  border-color: rgba(74,222,128,0.2);
}

.task-mark-badge.low {
  background: var(--red-dim);
  color: var(--red);
  border-color: rgba(248,113,113,0.18);
}

.domain-total-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--white-md);
  color: var(--text);
  border: 1px solid var(--border-hi);
}

.domain-total-badge.perfect {
  background: var(--green-dim);
  color: var(--green);
  border-color: rgba(74,222,128,0.3);
}

.score-pending {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 4px;
}

.marks-legend {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.marks-legend-item {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.8;
}

.marks-legend-item strong {
  color: var(--text-2);
  display: block;
  margin-bottom: 1px;
}

/* Score breakdown */
.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}

.score-row:last-child { border-bottom: none; }

.score-domain {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.score-badges { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }

.mcq-score-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--white-dim);
  color: var(--text-2);
  border: 1px solid var(--border-md);
}

.mcq-score-badge.perfect {
  background: var(--green-dim);
  color: var(--green);
  border-color: rgba(74,222,128,0.2);
}

.ai-pending {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 4px;
}

/* ── Field-level validation states ──────────────── */
.field-error {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--red);
  letter-spacing: 0.3px;
  min-height: 14px;
  display: block;
  margin-top: -2px;
}

input.input-error,
select.input-error {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px var(--red-dim) !important;
}

input.input-valid,
select.input-valid {
  border-color: rgba(74,222,128,0.45) !important;
  box-shadow: 0 0 0 3px rgba(74,222,128,0.07) !important;
}

/* ── Footer ──────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 18px 0;
  margin-top: auto;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.3px;
}

/* ── Divider ─────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ── Spinner ─────────────────────────────────────── */
.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(9,9,11,0.25);
  border-top-color: var(--text-inv);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  display: inline-block;
}

.btn-ghost .spinner {
  border-color: rgba(255,255,255,0.15);
  border-top-color: var(--text-2);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Entry animations ────────────────────────────── */
/* ui-ux-pro-max: duration 150–300ms, transform/opacity only */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.delay-1 { animation-delay: 0.06s; }
.delay-2 { animation-delay: 0.12s; }
.delay-3 { animation-delay: 0.18s; }

/* ui-ux-pro-max: reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .animate-in, .animate-in * { animation: none !important; }
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: 1; }
  .domain-list { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .timer-display { font-size: 36px; }
  .card { padding: 18px 20px; }
  .timer-wrap { gap: 20px; }
}

/* ── QA Playground — Split-screen mode ──────────────────── */
/* Applied to <body> when Domain 9 (QA Playground) is active */

body.split-mode { overflow: hidden; }
body.split-mode .page { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
body.split-mode footer { display: none; }

/* Hide the circular main timer; sticky strip handles time display */
body.split-mode .timer-wrap   { display: none !important; }
body.split-mode #autosubmitNotice { display: none !important; }
/* Force sticky timer strip visible in split mode */
body.split-mode .sticky-timer-strip { max-height: 46px !important; }

body.split-mode main {
  flex: 1;
  min-height: 0;
  padding: 0 !important;
  overflow: hidden;
}

body.split-mode main > .container {
  max-width: none;
  padding: 0;
  height: 100%;
  display: flex;
  gap: 0;
}

/* Left panel - scrollable question column */
body.split-mode #assessmentCard {
  flex: 0 0 42%;
  max-width: 42%;
  min-width: 340px;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 0;
  margin: 0;
  padding: 20px 20px 80px;
  border-right: 1px solid var(--border-md);
  box-shadow: none;
  position: relative;
}

/* Sticky submit bar at bottom of left panel */
body.split-mode .split-submit-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  padding: 12px 0 0;
  margin-top: 20px;
}

/* Compact timer shown in split left panel header */
.split-timer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.split-timer-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.split-timer-val {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}
.split-timer-val.warning { color: var(--amber); }
.split-timer-val.danger  { color: var(--red); animation: timer-pulse 1s ease-in-out infinite; }
.split-auto-at {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  text-align: right;
}
.split-auto-at strong { color: var(--text-2); }

/* Right panel - iframe fills all remaining space */
.split-right {
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  background: #f3f4f6;
  position: relative;
}
.split-right iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* App label bar at top of right panel */
.split-app-bar {
  height: 28px;
  background: #1e293b;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  flex-shrink: 0;
}
.split-app-dot { width: 8px; height: 8px; border-radius: 50%; }
.split-right-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.split-right-inner iframe { flex: 1; min-height: 0; }
.split-app-title { font-size: 11px; color: #64748b; font-family: var(--font-mono); margin-left: auto; margin-right: auto; letter-spacing: .5px; }

/* Narrower layout tweaks for left panel */
body.split-mode .section-header { margin-top: 20px; }
body.split-mode .mcq-block { padding: 14px; }
body.split-mode .task-block { padding: 14px; }
body.split-mode .answer-textarea { min-height: 120px; }
body.split-mode .task-domain-badge { font-size: 10px; }
body.split-mode h1#domainTitle { font-size: 18px; }

/* ── Terms Modal ─────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open { display: flex; }

.modal-box {
  background: var(--bg-1);
  border: 1px solid var(--border-md);
  border-radius: var(--radius);
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-header h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text);
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  cursor: pointer;
  color: var(--text-3);
  font-size: 18px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}

.modal-close:hover { background: var(--border); color: var(--text); }

.modal-body {
  padding: 22px 24px 24px;
  overflow-y: auto;
  flex: 1;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-2);
}

.modal-body h3 {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: 22px;
  margin-bottom: 6px;
}

.modal-body h3:first-child { margin-top: 0; }

.modal-body p { margin-bottom: 10px; }
.modal-body p:last-child { margin-bottom: 0; }

.modal-body strong { color: var(--text); font-weight: 600; }

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.modal-updated {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.5px;
}

/* Footer terms link */
.footer-link {
  color: var(--text-3);
  font-size: 12px;
  text-decoration: none;
  transition: color 0.15s;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-mono);
  letter-spacing: 0.3px;
  padding: 0;
}

.footer-link:hover { color: var(--text-2); text-decoration: underline; }
