/* ============================================================
   ZUNOON — ADA Platform Stylesheet
   Brand: Black / White / Gray | Accent: #D32F2F
   Fonts: Syne (headings) · DM Sans (body)
   ============================================================ */

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

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --black:   #0a0a0a;
  --dark:    #111111;
  --gray-90: #1a1a1a;
  --gray-80: #2b2b2b;
  --gray-60: #555555;
  --gray-40: #888888;
  --gray-20: #cccccc;
  --gray-10: #f0f0f0;
  --white:   #ffffff;
  --red:     #D32F2F;
  --red-dark:#b71c1c;
  --red-soft:#fdecea;

  --nav-h: 64px;
  --radius: 6px;
  --radius-lg: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.12);

  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }

img { display: block; max-width: 100%; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  line-height: 1.2;
  font-weight: 700;
}

/* ── Navigation ─────────────────────────────────────────────── */
#main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--black);
  border-bottom: 1px solid var(--gray-80);
  transition: box-shadow 0.3s;
}

#main-header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.navbar {
  height: var(--nav-h);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-img {
  height: 38px;
  width: auto;
}

.nav-logo::after {
  content: 'Zunoon';
  font-family: var(--font-head);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-40);
  border-left: 1px solid var(--gray-80);
  padding-left: 10px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: var(--gray-20);
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--white);
  background: var(--gray-80);
}

.nav-link.active {
  color: var(--white);
  background: var(--red);
}

/* Hamburger — hidden on desktop */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 16.5px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  letter-spacing: 0.02em;
  text-align: center;
}

.btn:hover  { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--red);
  color: var(--white);
}
.btn-primary:hover { background: var(--red-dark); }

.btn-submit,
.btn-submit-test,
.btn-submit-llm {
  background: var(--black);
  color: var(--white);
  margin-top: 32px;
  padding: 14px 40px;
  font-size: 17px;
}
.btn-submit:hover,
.btn-submit-test:hover,
.btn-submit-llm:hover { background: var(--red); }

.btn-action {
  background: var(--red);
  color: var(--white);
  font-size: 18px;
  padding: 16px 40px;
  border-radius: var(--radius-lg);
}
.btn-action:hover { background: var(--red-dark); }

.btn-record {
  background: var(--red);
  color: var(--white);
  padding: 12px 32px;
}
.btn-record:hover { background: var(--red-dark); }

/* ── Hero / Index ───────────────────────────────────────────── */
#hero-showcase {
  background: var(--black);
  color: var(--white);
  padding: 80px 24px 96px;
  text-align: center;
}

.hero-container {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.hero-logo {
  height: 88px;
  width: auto;
}

.hero-title {
  font-size: clamp(32px, 5.5vw, 54px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
}

.hero-brief {
  font-size: 19px;
  color: var(--gray-20);
  max-width: 580px;
  line-height: 1.75;
}

/* ── Main Content Wrapper ───────────────────────────────────── */
#main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 24px;
}

.container-center {
  display: flex;
  justify-content: center;
}

/* ── Section Header ─────────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: clamp(25px, 3.2vw, 38px);
  color: var(--black);
  margin-bottom: 10px;
}

.section-header p {
  font-size: 18px;
  color: var(--gray-60);
}

/* ── Services Grid ──────────────────────────────────────────── */
#services-section {
  margin-bottom: 80px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--gray-10);
  border: 1px solid #e4e4e4;
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.service-card:hover {
  border-color: var(--red);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.service-icon {
  font-size: 32px;
  color: var(--red);
  margin-bottom: 16px;
  display: block;
}

.service-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--black);
}

.service-card p {
  font-size: 16.5px;
  color: var(--gray-60);
  line-height: 1.6;
}

/* ── Hero CTA Row / Outline Button ─────────────────────────── */
.hero-cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid var(--gray-40);
  padding: 12px 28px;
}
.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.06);
}

/* ── Dataset Section ────────────────────────────────────────── */
#dataset-section {
  margin-bottom: 80px;
  background: var(--dark);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 56px 40px;
}

#dataset-section .section-header h2 { color: var(--white); }
#dataset-section .section-header p { color: var(--gray-20); }

.dataset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin-bottom: 40px;
}

.dataset-card {
  background: var(--gray-90);
  border: 1px solid var(--gray-80);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  transition: border-color 0.2s, transform 0.2s;
}
.dataset-card:hover {
  border-color: var(--red);
  transform: translateY(-3px);
}

.dataset-icon {
  font-size: 28px;
  color: var(--red);
  margin-bottom: 14px;
  display: block;
}

.dataset-card h3 {
  font-size: 19px;
  margin-bottom: 8px;
  color: var(--white);
}

.dataset-card p {
  font-size: 15.5px;
  color: var(--gray-20);
  line-height: 1.6;
  margin-bottom: 14px;
}

.dataset-deliverable {
  display: block;
  font-size: 13.5px;
  color: var(--red);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.dataset-cta {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--gray-80);
}

.dataset-cta p {
  font-size: 17px;
  color: var(--gray-20);
  margin-bottom: 20px;
}

/* ── Contact Form ───────────────────────────────────────────── */
#contact-section {
  max-width: 640px;
  margin: 0 auto;
}

#contact-section .section-header {
  text-align: left;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-80);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 17px;
  padding: 11px 14px;
  border: 1.5px solid #ddd;
  border-radius: var(--radius);
  color: var(--dark);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ── Registration Page ──────────────────────────────────────── */
#registration-gateway {
  text-align: center;
  max-width: 560px;
  padding: 80px 24px;
}

#registration-gateway h2 {
  font-size: 32px;
  margin-bottom: 14px;
  color: var(--black);
}

#registration-gateway p {
  font-size: 18px;
  color: var(--gray-60);
  margin-bottom: 36px;
}

.action-box {
  display: flex;
  justify-content: center;
}

/* ── Screening Page ─────────────────────────────────────────── */
#screening-hub {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

#screening-hub h2 {
  font-size: 28px;
  margin-bottom: 12px;
}

#screening-hub > p {
  color: var(--gray-60);
  margin-bottom: 40px;
}

.video-container-placeholder {
  background: var(--black);
  border-radius: var(--radius-lg);
  padding: 60px 32px;
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  border: 2px dashed var(--gray-60);
  position: relative;
  overflow: hidden;
}

/* Live camera preview */
#camera-preview {
  width: 100%;
  max-width: 560px;
  border-radius: var(--radius);
  display: none;
  background: #000;
}

#camera-preview.active { display: block; }

.placeholder-icon {
  font-size: 52px;
  color: var(--red);
  line-height: 1;
}

.video-container-placeholder > p {
  font-size: 16.5px;
  color: var(--gray-40);
}

/* Recording indicator */
#recording-status {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--red);
}

#recording-status.active { display: flex; }

#recording-status::before {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse-dot 1s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* ── Assessment Pages (English Test + LLM) ──────────────────── */
#assessment-container,
#llm-assessment-hub {
  max-width: 820px;
  margin: 0 auto;
}

#assessment-container h2,
#llm-assessment-hub h2 {
  font-size: clamp(23px, 3.2vw, 33px);
  margin-bottom: 10px;
  color: var(--black);
}

#assessment-container > p,
#llm-assessment-hub > p {
  color: var(--gray-60);
  margin-bottom: 40px;
  font-size: 17px;
}

/* Timer bar */
#exam-timer {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--black);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius);
  margin-bottom: 32px;
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 600;
}

#exam-timer .timer-icon { color: var(--red); }

#timer-display {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--white);
  min-width: 70px;
}

#timer-display.warning { color: #ff7043; }
#timer-display.critical { color: var(--red); animation: flash 0.6s infinite; }

@keyframes flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Progress bar */
#progress-bar-wrap {
  background: var(--gray-10);
  border-radius: 99px;
  height: 6px;
  margin-bottom: 32px;
  overflow: hidden;
}

#progress-bar {
  height: 100%;
  background: var(--red);
  border-radius: 99px;
  transition: width 0.4s ease;
  width: 0%;
}

/* Fieldsets */
.question-fieldset,
.comprehension-fieldset {
  border: 1.5px solid #e4e4e4;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  margin-bottom: 32px;
  background: var(--white);
}

.question-fieldset legend,
.comprehension-fieldset legend {
  font-family: var(--font-head);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  padding: 0 10px;
  background: var(--white);
}

/* Individual question card */
.form-question {
  padding: 18px 0;
  border-bottom: 1px solid var(--gray-10);
}

.form-question:last-child { border-bottom: none; }

.question-text {
  font-size: 17px;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 12px;
  line-height: 1.55;
}

/* Answer options */
.options-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.options-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16.5px;
  color: var(--gray-80);
  cursor: pointer;
  padding: 9px 14px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.options-group label:hover {
  background: var(--gray-10);
  border-color: var(--gray-20);
}

.options-group input[type="radio"] {
  accent-color: var(--red);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}

/* Selected state */
.options-group input[type="radio"]:checked + * {
  color: var(--dark);
}

.options-group label:has(input:checked) {
  background: var(--red-soft);
  border-color: var(--red);
  color: var(--dark);
  font-weight: 500;
}

/* Answer review states (JS adds these) */
.options-group label.correct {
  background: #e8f5e9;
  border-color: #2e7d32;
  color: #1b5e20;
  font-weight: 600;
}

.options-group label.incorrect {
  background: var(--red-soft);
  border-color: var(--red);
  color: var(--red-dark);
  font-weight: 600;
}

/* Reading comprehension */
.dialogue-transcript-box {
  background: var(--gray-10);
  border-left: 4px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 24px;
  margin-bottom: 28px;
}

.dialogue-transcript-box h3 {
  font-size: 17px;
  margin-bottom: 14px;
  color: var(--gray-60);
  font-weight: 600;
}

.dialogue-transcript-box p {
  font-size: 16.5px;
  line-height: 1.7;
  margin-bottom: 8px;
  color: var(--dark);
}

.comprehension-section {
  margin-top: 24px;
}

.comprehension-section h4 {
  font-family: var(--font-head);
  font-size: 15.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-60);
  margin-bottom: 16px;
}

/* Gap fill inputs */
.comprehension-section input[type="text"],
.form-question input[type="text"] {
  font-family: var(--font-body);
  font-size: 16.5px;
  padding: 9px 14px;
  border: 1.5px solid #ddd;
  border-radius: var(--radius);
  width: 100%;
  max-width: 360px;
  outline: none;
  margin-top: 8px;
  transition: border-color 0.2s;
}

.comprehension-section input[type="text"]:focus,
.form-question input[type="text"]:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(211,47,47,0.08);
}

/* ── LLM Assessment ─────────────────────────────────────────── */
.llm-questions-list {
  list-style: none;
  counter-reset: llm-counter;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.llm-questions-list > li {
  counter-increment: llm-counter;
  padding: 22px 0;
  border-bottom: 1px solid var(--gray-10);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.llm-questions-list > li:last-child { border-bottom: none; }

.llm-questions-list > li::before {
  content: counter(llm-counter);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--red);
  background: var(--red-soft);
  border-radius: 4px;
  padding: 2px 8px;
  align-self: flex-start;
}

.q-label {
  font-size: 17px;
  font-weight: 500;
  color: var(--dark);
  line-height: 1.55;
  display: block;
}

.q-label-ar {
  font-size: 16.5px;
  font-weight: 500;
  color: var(--gray-60);
  line-height: 1.8;
  display: block;
  margin-top: 4px;
  margin-bottom: 10px;
  font-family: 'Tahoma', 'Arial', sans-serif;
}

.llm-questions-list input[type="text"],
.llm-questions-list textarea {
  font-family: var(--font-body);
  font-size: 16.5px;
  padding: 10px 14px;
  border: 1.5px solid #ddd;
  border-radius: var(--radius);
  width: 100%;
  outline: none;
  color: var(--dark);
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}

.llm-questions-list input[type="text"]:focus,
.llm-questions-list textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(211,47,47,0.08);
}

.radio-opts {
  display: flex;
  gap: 16px;
}

.radio-opts label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16.5px;
  cursor: pointer;
  color: var(--gray-80);
  padding: 8px 16px;
  border: 1.5px solid #ddd;
  border-radius: var(--radius);
  transition: background 0.15s, border-color 0.15s;
}

.radio-opts label:hover {
  background: var(--gray-10);
  border-color: var(--gray-20);
}

.radio-opts label:has(input:checked) {
  background: var(--red-soft);
  border-color: var(--red);
  color: var(--dark);
  font-weight: 500;
}

.radio-opts input[type="radio"] {
  accent-color: var(--red);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* LLM Progress sticky bar */
#llm-progress-bar {
  position: sticky;
  top: var(--nav-h);
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-10);
  padding: 10px 0;
  margin-bottom: 24px;
}

#llm-progress-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}

#llm-progress-label {
  font-size: 15.5px;
  color: var(--gray-60);
  white-space: nowrap;
  font-weight: 500;
}

#llm-bar-track {
  flex: 1;
  height: 5px;
  background: var(--gray-10);
  border-radius: 99px;
  overflow: hidden;
}

#llm-bar-fill {
  height: 100%;
  background: var(--red);
  border-radius: 99px;
  transition: width 0.3s ease;
  width: 0%;
}

/* ── Training Page ──────────────────────────────────────────── */
#training-workspace {
  max-width: 860px;
  margin: 0 auto;
}

#training-workspace h2 {
  font-size: 28px;
  margin-bottom: 10px;
}

#training-workspace > p {
  color: var(--gray-60);
  margin-bottom: 40px;
}

.live-stream-placeholder {
  background: var(--black);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  color: var(--white);
  display: none; /* hidden once sandbox loads */
}

.live-stream-placeholder .fa-solid { font-size: 48px; color: var(--red); }
.live-stream-placeholder > p { color: var(--gray-40); margin-top: 16px; }

/* Annotation Sandbox */
#annotation-sandbox {
  display: none; /* shown by JS */
}

#annotation-sandbox.active { display: block; }

.sandbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--black);
  color: var(--white);
  padding: 14px 20px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  font-family: var(--font-head);
  font-size: 15.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sandbox-badge {
  background: var(--red);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: 0.08em;
}

.sandbox-body {
  border: 1.5px solid #e4e4e4;
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  overflow: hidden;
}

.task-panel {
  padding: 28px;
  border-bottom: 1px solid var(--gray-10);
}

.task-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-40);
  margin-bottom: 8px;
}

.task-text {
  font-size: 17.5px;
  line-height: 1.7;
  color: var(--dark);
  background: var(--gray-10);
  padding: 18px;
  border-radius: var(--radius);
  border-left: 3px solid var(--red);
}

.task-meta {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.task-tag {
  font-size: 14.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--gray-10);
  color: var(--gray-60);
  border: 1px solid #e4e4e4;
}

/* Rating dimensions */
.rating-panel {
  padding: 28px;
}

.rating-panel h4 {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-60);
  margin-bottom: 20px;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.rating-label {
  font-size: 16.5px;
  font-weight: 500;
  color: var(--dark);
  width: 140px;
  flex-shrink: 0;
}

.rating-stars {
  display: flex;
  gap: 6px;
}

.star-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--gray-20);
  transition: color 0.15s, transform 0.1s;
  line-height: 1;
  padding: 0;
}

.star-btn:hover,
.star-btn.selected { color: #f59e0b; }
.star-btn:hover { transform: scale(1.2); }

.flag-btn {
  margin-left: auto;
  background: none;
  border: 1.5px solid #ddd;
  border-radius: var(--radius);
  padding: 6px 14px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--gray-60);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.2s, color 0.2s;
}

.flag-btn:hover,
.flag-btn.flagged {
  border-color: var(--red);
  color: var(--red);
}

/* Notes area */
.notes-panel {
  padding: 0 28px 28px;
}

.notes-panel textarea {
  font-family: var(--font-body);
  font-size: 16.5px;
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #ddd;
  border-radius: var(--radius);
  outline: none;
  resize: vertical;
  min-height: 72px;
  color: var(--dark);
  transition: border-color 0.2s;
}

.notes-panel textarea:focus { border-color: var(--red); }

/* Sandbox navigation */
.sandbox-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-top: 1px solid var(--gray-10);
  background: var(--gray-10);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.sandbox-counter {
  font-size: 15.5px;
  color: var(--gray-60);
  font-weight: 500;
}

.sandbox-btn {
  font-family: var(--font-body);
  font-size: 16.5px;
  font-weight: 600;
  padding: 9px 22px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.sandbox-btn.prev {
  background: var(--white);
  border: 1.5px solid #ddd;
  color: var(--dark);
}
.sandbox-btn.prev:hover { border-color: var(--gray-60); }

.sandbox-btn.next {
  background: var(--red);
  color: var(--white);
}
.sandbox-btn.next:hover { background: var(--red-dark); }

.sandbox-btn.finish {
  background: var(--black);
  color: var(--white);
}
.sandbox-btn.finish:hover { background: var(--red); }

/* Session summary */
#session-summary {
  display: none;
  padding: 40px 28px;
  border: 1.5px solid #e4e4e4;
  border-radius: var(--radius-lg);
  text-align: center;
  margin-top: 24px;
}

#session-summary.active { display: block; }

#session-summary h3 {
  font-size: 24px;
  margin-bottom: 12px;
  color: var(--black);
}

#session-summary p {
  color: var(--gray-60);
  margin-bottom: 8px;
}

.summary-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 28px 0;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-num {
  font-family: var(--font-head);
  font-size: 40px;
  font-weight: 800;
  color: var(--red);
  line-height: 1;
}

.stat-desc {
  font-size: 15.5px;
  color: var(--gray-60);
}

/* ── Training: persistent progress bar ──────────────────────── */
#training-progress-bar {
  position: sticky;
  top: var(--nav-h);
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-10);
  padding: 10px 0;
  margin-bottom: 24px;
}

#training-progress-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

#training-progress-label {
  font-size: 14.5px;
  color: var(--gray-60);
  white-space: nowrap;
  font-weight: 600;
}

#training-bar-track {
  flex: 1;
  height: 5px;
  background: var(--gray-10);
  border-radius: 99px;
  overflow: hidden;
}

#training-bar-fill {
  height: 100%;
  background: var(--red);
  border-radius: 99px;
  transition: width 0.3s ease;
  width: 0%;
}

/* ── Training: confidence selector ──────────────────────────── */
.confidence-row {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--gray-10);
}

.confidence-label {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--gray-60);
  margin-bottom: 10px;
}

.confidence-opts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.confidence-btn {
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 99px;
  border: 1.5px solid #ddd;
  background: var(--white);
  color: var(--gray-60);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.confidence-btn:hover { border-color: var(--gray-60); }

.confidence-btn.selected {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
}

/* ── Training: feedback / reference comparison panel ────────── */
.feedback-panel {
  padding: 0 28px 28px;
}

#show-feedback-btn {
  width: 100%;
  justify-content: center;
}

.feedback-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--gray-10);
  margin-bottom: 8px;
  font-size: 15px;
  flex-wrap: wrap;
}

.feedback-dim {
  font-weight: 700;
  width: 110px;
  flex-shrink: 0;
  color: var(--dark);
}

.feedback-mine { color: var(--gray-60); }
.feedback-gold { font-weight: 600; }

.feedback-row.match  .feedback-gold { color: #1d8a4e; }
.feedback-row.close  .feedback-gold { color: #b8860b; }
.feedback-row.off    .feedback-gold { color: var(--red); }

.feedback-tip {
  margin-top: 12px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--gray-60);
  background: var(--red-soft);
  border-left: 3px solid var(--red);
  padding: 12px 14px;
  border-radius: var(--radius);
}

/* ── Certificate Page ───────────────────────────────────────── */
#certification-hub {
  max-width: 1100px;
  margin: 0 auto;
}

#certification-hub .section-header h2 {
  font-size: 28px;
}

/* ── Certificate Generator Layout ───────────────────────────── */
.cert-generator {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: start;
}

.cert-form-panel {
  background: var(--gray-10);
  border: 1px solid #e4e4e4;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.cert-form-panel .form-group { margin-bottom: 18px; }

.cert-form-panel select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-20);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15.5px;
  background: var(--white);
  color: var(--dark);
}

#generate-cert-btn { width: 100%; margin-top: 4px; }

.input-error { border-color: var(--red) !important; animation: shake 0.3s; }
@keyframes shake {
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.cert-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.cert-actions button {
  width: 100%;
  font-size: 15px;
  padding: 12px 20px;
}

.btn-outline-dark {
  background: var(--white);
  color: var(--black);
  border: 1.5px solid var(--black);
}
.btn-outline-dark:hover { background: var(--black); color: var(--white); }

.cert-preview-panel {
  background: var(--gray-10);
  border: 1px solid #e4e4e4;
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#cert-canvas {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  background: var(--black);
}

@media (max-width: 760px) {
  .cert-generator { grid-template-columns: 1fr; }
  .cert-form-panel { position: static; }
}

.payment-channel p:last-child { margin-bottom: 0; }

.payment-channel strong { color: var(--dark); }

/* ── Result / Score Modal ───────────────────────────────────── */
#score-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

#score-modal.active { display: flex; }

.score-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
  animation: slide-up 0.3s ease;
}

@keyframes slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.score-card h2 {
  font-size: 24px;
  margin-bottom: 8px;
}

.score-big {
  font-family: var(--font-head);
  font-size: 72px;
  font-weight: 800;
  color: var(--red);
  line-height: 1;
  margin: 16px 0 8px;
}

.score-level {
  font-size: 22px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 16px;
  font-family: var(--font-head);
}

.score-desc {
  font-size: 16.5px;
  color: var(--gray-60);
  line-height: 1.6;
  margin-bottom: 28px;
}

.score-card .btn { width: 100%; justify-content: center; }

/* ── Footer ─────────────────────────────────────────────────── */
#main-footer {
  background: var(--black);
  color: var(--gray-40);
  padding: 32px 24px;
  margin-top: 80px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-container p {
  font-size: 16px;
  line-height: 1.6;
}

.footer-container a {
  color: var(--gray-40);
  transition: color 0.2s;
}

.footer-container a:hover { color: var(--red); }

.social-links {
  display: flex;
  gap: 14px;
}

.social-links a {
  font-size: 20px;
  color: var(--gray-40);
  transition: color 0.2s, transform 0.15s;
}

.social-links a:hover {
  color: var(--white);
  transform: translateY(-2px);
}

/* ── Utilities ──────────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    flex-direction: column;
    gap: 2px;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--black);
    border-top: 1px solid var(--gray-80);
    padding: 12px 16px 20px;
    z-index: 999;
  }

  .nav-menu.open { display: flex; }

  .nav-link {
    font-size: 17px;
    padding: 10px 14px;
    width: 100%;
  }

  .nav-hamburger { display: flex; }

  .nav-container { position: relative; }

  #main-content { padding: 40px 16px; }

  .question-fieldset,
  .comprehension-fieldset { padding: 20px 16px; }

  .sandbox-header { flex-direction: column; gap: 8px; align-items: flex-start; }

  .rating-row { flex-direction: column; align-items: flex-start; }
  .rating-label { width: auto; }

  .feedback-dim { width: auto; }
  .confidence-opts { flex-direction: column; }
  .confidence-btn { width: 100%; text-align: center; }
  #training-progress-inner { padding: 0 16px; }

  .summary-stats { gap: 20px; }
  .stat-num { font-size: 32px; }

  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .social-links { justify-content: center; }

  .score-card { padding: 32px 24px; }
  .score-big { font-size: 56px; }
}

@media (max-width: 480px) {
  .services-grid { grid-template-columns: 1fr; }
  .radio-opts { flex-direction: column; gap: 8px; }
  .task-meta { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
