/* Assessment — modern wizard UI */

/* ─── Page shell ─── */
.page-hero-assessment {
  overflow: hidden;
  padding: clamp(var(--space-10), 7vw, var(--space-16)) 0 clamp(var(--space-10), 6vw, var(--space-12));
  background:
    radial-gradient(ellipse 70% 45% at 100% 0%, rgba(15, 118, 110, 0.07), transparent 55%),
    radial-gradient(ellipse 55% 40% at 0% 100%, rgba(212, 168, 83, 0.06), transparent 50%),
    linear-gradient(165deg, var(--teal-50) 0%, var(--bg) 65%);
}

/* Room below floating header — badges/meta shouldn't sit under nav */
.site-header:not(.scrolled) ~ #main-content > .page-hero-assessment:first-child {
  margin-top: calc(-1 * var(--header-shell-h));
  padding-top: calc(var(--header-shell-h) + clamp(var(--space-12), 8vw, var(--space-16)));
  transition:
    margin-top 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    padding-top 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.scrolled ~ #main-content > .page-hero-assessment:first-child {
  margin-top: calc(-1 * var(--header-h));
  padding-top: calc(var(--header-h) + clamp(var(--space-10), 6vw, var(--space-14)));
  transition:
    margin-top 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    padding-top 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-hero-assessment::before {
  opacity: 0.35;
}

.assessment-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.assessment-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.45;
}

.assessment-hero-orb--1 {
  width: min(380px, 65vw);
  height: min(380px, 65vw);
  top: -120px;
  inset-inline-end: -80px;
  background: radial-gradient(circle, var(--teal-400), transparent 70%);
}

.assessment-hero-orb--2 {
  width: min(280px, 50vw);
  height: min(280px, 50vw);
  bottom: -60px;
  inset-inline-start: -50px;
  background: radial-gradient(circle, var(--gold-400), transparent 70%);
}

.assessment-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 118, 110, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 118, 110, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 20%, #000 15%, transparent 100%);
}

.assessment-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(var(--space-10), 6vw, var(--space-16));
  align-items: center;
  position: relative;
  z-index: 1;
}

.assessment-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
  margin-bottom: var(--space-6);
}

.assessment-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-xs);
}

.page-hero-assessment h1 {
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  line-height: 1.15;
  max-width: 14em;
  margin-top: 0;
  margin-bottom: var(--space-5);
}

.assessment-title-accent {
  display: block;
  margin-top: var(--space-3);
  background: linear-gradient(120deg, var(--teal-700), var(--teal-500) 45%, var(--gold-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-hero-assessment .lead {
  max-width: 36em;
  font-size: clamp(var(--text-base), 2vw, var(--text-lg));
  margin-top: 0;
  margin-bottom: 0;
  line-height: var(--leading-relaxed);
}

.assessment-benefits {
  list-style: none;
  margin: var(--space-8) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-4);
}

.assessment-benefits li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.assessment-benefits li:hover {
  border-color: rgba(15, 118, 110, 0.22);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.assessment-benefit-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
}

.assessment-preview {
  padding: clamp(var(--space-7), 4vw, var(--space-10));
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    var(--shadow-lg),
    0 0 0 1px rgba(15, 118, 110, 0.06);
  backdrop-filter: blur(12px);
  transition: transform var(--transition-slow), box-shadow var(--transition);
}

.assessment-preview:hover {
  transform: translateY(-4px);
  box-shadow:
    0 24px 56px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(15, 118, 110, 0.1);
}

.assessment-preview-label {
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

.preview-score-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.preview-mini {
  text-align: center;
  padding: var(--space-5) var(--space-3);
  background: linear-gradient(180deg, var(--bg-alt), var(--surface));
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.preview-mini:hover {
  border-color: rgba(15, 118, 110, 0.25);
  transform: translateY(-2px);
}

.preview-mini label {
  display: block;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
}

.preview-mini strong {
  display: block;
  font-size: clamp(var(--text-lg), 3vw, var(--text-2xl));
  color: var(--primary);
  margin-top: var(--space-1);
  letter-spacing: -0.02em;
}

.assessment-preview-bar {
  height: 8px;
  background: var(--bg-alt);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.assessment-preview-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal-600), var(--gold-500));
  border-radius: var(--radius-full);
}

.assessment-preview-foot {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--space-2);
  padding-top: var(--space-4);
}

/* ─── Wizard card ─── */
.assessment-section {
  padding-top: clamp(var(--space-6), 4vw, var(--space-10));
  padding-bottom: clamp(var(--space-16), 10vw, var(--space-24));
  margin-top: 0;
  position: relative;
  z-index: 2;
}

.assessment-wizard {
  max-width: min(880px, 100%);
  margin-inline: auto;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-8), 5vw, var(--space-12));
  box-shadow:
    var(--shadow-lg),
    0 0 0 1px rgba(15, 23, 42, 0.04);
  border: 1px solid var(--border);
  position: relative;
}

.assessment-wizard::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline: clamp(var(--space-6), 4vw, var(--space-10));
  height: 4px;
  background: linear-gradient(90deg, var(--teal-600), var(--teal-400), var(--gold-500));
  border-radius: 0 0 var(--radius-full) var(--radius-full);
}

/* ─── Progress stepper ─── */
.wizard-progress {
  margin-bottom: clamp(var(--space-8), 5vw, var(--space-10));
  padding-bottom: clamp(var(--space-4), 3vw, var(--space-6));
}

.wizard-progress-head {
  margin-bottom: var(--space-4);
  display: none;
}

.wizard-step-text {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--primary);
  display: none;
}

.progress-labels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.progress-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  transition: color var(--transition);
  padding: 0 var(--space-1);
  line-height: 1.35;
}

.progress-label.active {
  color: var(--primary);
  font-weight: 800;
}

.progress-track {
  position: relative;
}

.progress-bar {
  height: 6px;
  background: var(--bg-alt);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-3);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal-600), var(--teal-400));
  width: 25%;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--radius-full);
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  padding: 0 var(--space-1);
  position: relative;
}

.progress-steps::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 8%;
  right: 8%;
  height: 2px;
  background: var(--border);
  transform: translateY(-50%);
  z-index: 0;
}

.step-dot {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  font-size: var(--text-xs);
  font-weight: 800;
  border: 2px solid var(--border);
  transition: all var(--transition);
}

.step-dot.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light), var(--shadow-sm);
  transform: scale(1.05);
}

.step-dot.done {
  background: var(--teal-100);
  color: var(--primary);
  border-color: var(--teal-400);
}

/* ─── Panels ─── */
.wizard-panel { display: none; }

.wizard-panel.active {
  display: block;
  animation: wizardIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes wizardIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.wizard-panel h2 {
  font-size: clamp(var(--text-xl), 3vw, var(--text-2xl));
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
  margin-top: 0;
}

.wizard-panel h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
}

.panel-desc {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-8);
  line-height: var(--leading-relaxed);
}

/* ─── Form ─── */
.form-grid {
  display: grid;
  gap: var(--space-6);
}

.form-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-group-span {
  grid-column: 1 / -1;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
  color: var(--text-secondary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: var(--text-base);
  background: var(--bg);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.form-group input:hover,
.form-group select:hover {
  border-color: var(--border-strong);
  background: var(--surface);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
  background: var(--surface);
}

.form-group small {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.target-score-guide {
  margin-top: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.target-score-guide-title {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
}

.target-score-guide-text {
  margin: 0 0 var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

.target-score-hint {
  margin: 0 0 var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--primary-light);
  border-radius: calc(var(--radius) - 2px);
  font-size: var(--text-sm);
  color: var(--text-primary);
  line-height: 1.55;
}

.target-score-ref {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.target-score-ref summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-secondary);
}

.target-score-ref-list {
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-2);
}

.target-score-ref-list li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-2) 0;
  border-bottom: 1px dashed var(--border);
}

.target-score-ref-list li:last-child {
  border-bottom: none;
}

.target-score-ref-list strong {
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.form-check {
  padding: var(--space-4) var(--space-5);
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: border-color var(--transition), background var(--transition);
}

.form-check:hover {
  border-color: rgba(15, 118, 110, 0.35);
  background: var(--primary-light);
}

.form-check label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-weight: 500;
  cursor: pointer;
  font-size: var(--text-sm);
  margin: 0;
  color: var(--text);
}

.form-check input {
  margin-top: 3px;
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.range-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.range-wrap .styled-range {
  flex: 1;
  height: 6px;
  accent-color: var(--primary);
  cursor: pointer;
}

.range-value {
  flex-shrink: 0;
  min-width: 5.5rem;
  text-align: center;
  font-weight: 800;
  font-size: var(--text-sm);
  color: var(--primary);
  padding: 0.35rem 0.65rem;
  background: var(--surface);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}

.range-wrap output {
  font-weight: inherit;
}

/* Skill meters (legacy) */
.skill-sliders { display: flex; flex-direction: column; gap: var(--space-6); }

.skill-row {
  display: grid;
  grid-template-columns: 110px 1fr 40px;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.skill-row label {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--text);
}

.skill-range {
  width: 100%;
  height: 6px;
  accent-color: var(--primary);
  cursor: pointer;
}

.skill-val {
  font-weight: 800;
  font-size: var(--text-lg);
  color: var(--primary);
  text-align: center;
}

.skill-row[data-level="1"] .skill-val { color: var(--error); }
.skill-row[data-level="2"] .skill-val { color: var(--warning); }
.skill-row[data-level="4"] .skill-val,
.skill-row[data-level="5"] .skill-val { color: var(--success); }

/* ─── Navigation ─── */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  margin-top: clamp(var(--space-8), 5vw, var(--space-10));
  padding-top: clamp(var(--space-6), 4vw, var(--space-8));
  border-top: 1px solid var(--border);
}

.wizard-nav .btn-primary {
  margin-inline-start: auto;
}

.review-summary {
  background: linear-gradient(165deg, var(--teal-50), var(--bg-alt));
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  margin: var(--space-4) 0;
  line-height: 1.9;
  border: 1px solid var(--border);
}

/* ─── Results ─── */
.results-panel {
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--teal-600), var(--gold-500)) 1;
  animation: wizardIn 0.5s ease;
}

.results-panel[hidden] { display: none !important; }

.results-panel h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin: var(--space-8) 0 var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}

.results-header h2 {
  color: var(--primary);
  font-size: clamp(var(--text-xl), 3vw, var(--text-2xl));
  font-weight: 800;
  margin-bottom: var(--space-6);
}

.results-panel .table-wrap {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.results-panel .data-table {
  margin: 0;
}

.results-panel .data-table th,
.results-panel .data-table td {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
}

.results-panel .preview-score-row {
  margin-bottom: var(--space-6);
}

#submit-btn.loading {
  opacity: 0.75;
  pointer-events: none;
}

.gap-visual {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
}

.gap-bar {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.gap-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal-600), var(--gold-500));
  border-radius: var(--radius-full);
  transition: width 1s ease;
}

/* ─── Placement MCQ ─── */
.placement-q-progress {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--primary);
  padding: var(--space-3) var(--space-4);
  background: var(--primary-light);
  border-radius: var(--radius-full);
  border: 1px solid rgba(15, 118, 110, 0.12);
}

.placement-q-progress .progress-bar {
  flex: 1;
  margin: 0;
  background: rgba(255, 255, 255, 0.7);
}

.placement-q-card {
  padding: clamp(var(--space-5), 3vw, var(--space-6));
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.placement-q-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.placement-audio {
  margin-bottom: var(--space-4);
  padding: var(--space-4);
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.placement-audio-hint {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.placement-audio audio {
  width: 100%;
  height: 40px;
}

.placement-passage {
  padding: var(--space-4) var(--space-5);
  background: var(--surface);
  border-radius: var(--radius);
  border-inline-start: 4px solid var(--primary);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

.placement-q-text {
  font-weight: 600;
  font-size: var(--text-base);
  margin-bottom: var(--space-5);
  line-height: var(--leading-relaxed);
}

.placement-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.placement-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  font-size: var(--text-sm);
}

.placement-option:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateX(2px);
}

body.rtl .placement-option:hover {
  transform: translateX(-2px);
}

.placement-option.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.placement-option input {
  margin-top: 3px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.placement-image {
  margin-bottom: var(--space-4);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.placement-image img {
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: cover;
  display: block;
}

.placement-image figcaption {
  font-size: var(--text-xs);
  color: var(--text-muted);
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
}

.placement-coach {
  margin-bottom: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(135deg, var(--teal-50), var(--gold-100));
  border-radius: var(--radius);
  border-inline-start: 4px solid var(--gold-500);
}

.placement-coach-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: var(--space-2);
}

.placement-coach p {
  font-size: var(--text-sm);
  margin: 0;
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
}

.consultant-card {
  padding: var(--space-6);
  background: linear-gradient(165deg, var(--teal-50), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
}

.consultant-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: var(--space-3);
}

.consultant-card p {
  margin: 0;
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
}

.weekly-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.weekly-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.weekly-num {
  flex-shrink: 0;
  width: 56px;
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--primary);
  text-align: center;
}

.weekly-body strong {
  display: block;
  font-size: var(--text-sm);
  margin-bottom: var(--space-1);
}

.weekly-meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ─── Live speaking ─── */
.speaking-live-card {
  padding: clamp(var(--space-5), 3vw, var(--space-6));
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
}

.speaking-prompt-box {
  margin-bottom: var(--space-5);
}

.speaking-prompt-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.speaking-transcript-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.speaking-prompt {
  font-weight: 600;
  line-height: var(--leading-relaxed);
  margin: var(--space-3) 0 0;
  font-size: var(--text-base);
}

.speaking-controls {
  text-align: center;
  margin-bottom: var(--space-5);
  padding: var(--space-5);
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.speaking-timer-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.speaking-timer {
  font-size: clamp(var(--text-xl), 4vw, var(--text-3xl));
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.speaking-meter {
  display: flex;
  gap: 6px;
  height: 24px;
  align-items: flex-end;
}

.speaking-meter span {
  width: 6px;
  height: 8px;
  background: var(--border);
  border-radius: 3px;
  transition: height 0.15s ease, background 0.15s ease;
}

.speaking-meter.active span {
  background: var(--primary);
  animation: speakPulse 0.6s ease-in-out infinite alternate;
}

.speaking-meter.active span:nth-child(2) { animation-delay: 0.15s; }
.speaking-meter.active span:nth-child(3) { animation-delay: 0.3s; }

@keyframes speakPulse {
  from { height: 8px; }
  to { height: 22px; }
}

.speaking-prep {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.speaking-status {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.speaking-btns {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
}

.speaking-transcript-box label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.speaking-transcript {
  min-height: 72px;
  padding: var(--space-4);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
}

.speaking-transcript.live {
  border-color: var(--primary);
  border-style: solid;
}

.speaking-transcript.final {
  border-color: var(--gold-500);
  background: linear-gradient(165deg, var(--surface), var(--teal-50));
}

.speaking-scores {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-3);
  margin: var(--space-5) 0;
}

.speaking-score-pill {
  padding: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--text-xs);
}

.speaking-score-pill span {
  display: block;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.speaking-score-pill strong {
  font-size: var(--text-lg);
  color: var(--primary);
}

.speaking-score-bar {
  height: 4px;
  background: var(--bg-alt);
  border-radius: var(--radius-full);
  margin-top: var(--space-2);
  overflow: hidden;
}

.speaking-score-bar div {
  height: 100%;
  background: linear-gradient(90deg, var(--teal-600), var(--gold-500));
}

.speaking-rating-badge {
  grid-column: 1 / -1;
  text-align: center;
  font-weight: 800;
  font-size: var(--text-lg);
  color: var(--primary);
  padding: var(--space-3);
}

.speaking-alert {
  padding: var(--space-4);
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
}

.speaking-feedback-list {
  margin-top: var(--space-4);
}

.speaking-playback {
  width: 100%;
  margin-top: var(--space-3);
}

/* Journey tracker */
.journey-tracker {
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-8);
}

.journey-tracker-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.journey-tracker-sub {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-2);
}

.journey-tracker-bar {
  flex: 1;
  min-width: 120px;
  max-width: 200px;
  height: 6px;
  background: var(--bg-alt);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.journey-tracker-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

.journey-tracker-steps {
  list-style: none;
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
}

.journey-tracker-step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  border: 1px solid transparent;
}

.journey-step-done { opacity: 0.72; }
.journey-step-done .journey-tracker-num {
  background: var(--primary);
  color: #fff;
}

.journey-step-current {
  background: var(--primary-light);
  border-color: rgba(15, 118, 110, 0.25);
}

.journey-step-current .journey-tracker-num {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.journey-step-upcoming { opacity: 0.55; }

.journey-tracker-num {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--bg-alt);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 0;
}

.journey-tracker-num .icon {
  width: 12px;
  height: 12px;
}

.journey-tracker-body {
  flex: 1;
  min-width: 0;
}

.journey-tracker-body strong {
  display: block;
  font-size: var(--text-sm);
}

.journey-tracker-compact .journey-tracker-steps {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .assessment-hero {
    grid-template-columns: 1fr;
    gap: clamp(var(--space-8), 6vw, var(--space-12));
  }

  .assessment-preview {
    max-width: 520px;
    margin-inline: auto;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .wizard-progress-head {
    display: block;
  }

  .progress-labels {
    display: none;
  }

  .wizard-step-text {
    display: block;
  }

  .step-dot {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 540px) {
  .page-hero-assessment {
    padding-bottom: var(--space-8);
  }

  .assessment-section {
    padding-top: var(--space-6);
  }

  .assessment-benefits {
    gap: var(--space-3);
  }

  .assessment-benefits li {
    padding: var(--space-3) var(--space-4);
  }

  .preview-score-row {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }

  .wizard-nav {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .wizard-nav .btn {
    width: 100%;
    justify-content: center;
  }

  .wizard-nav .btn-primary {
    margin-inline-start: 0;
  }

  .speaking-btns {
    flex-direction: column;
  }

  .speaking-btns .btn {
    width: 100%;
  }

  .results-actions {
    flex-direction: column;
  }

  .results-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .skill-row {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
}

@media (min-width: 768px) {
  .journey-tracker-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header:not(.scrolled) ~ #main-content > .page-hero-assessment:first-child,
  .site-header.scrolled ~ #main-content > .page-hero-assessment:first-child {
    transition: none;
  }

  .assessment-preview:hover,
  .assessment-benefits li:hover {
    transform: none;
  }

  .wizard-panel.active {
    animation: none;
  }

  .assessment-title-accent {
    -webkit-text-fill-color: var(--teal-600);
    color: var(--teal-600);
  }
}

@media print {
  .site-header,
  .site-footer,
  .wizard-progress,
  .wizard-nav,
  .results-actions,
  .result-funnel,
  .assessment-preview,
  .assessment-hero-bg {
    display: none !important;
  }

  .assessment-wizard {
    box-shadow: none;
    border: none;
  }

  .results-panel {
    border: none;
  }
}

/* Result funnel band */
.result-funnel {
  margin-top: var(--space-10);
  padding: clamp(var(--space-6), 5vw, var(--space-8));
  background: linear-gradient(135deg, var(--navy-900) 0%, #134e4a 100%);
  border-radius: var(--radius-xl);
  color: #fff;
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .result-funnel {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.result-funnel-copy h2 {
  margin: var(--space-3) 0 var(--space-2);
  font-size: clamp(var(--text-xl), 3vw, var(--text-2xl));
  color: #fff;
}

.result-funnel-copy p {
  margin: 0;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.78);
  max-width: 520px;
}

.result-funnel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.result-funnel-actions .btn-ghost {
  color: rgba(255, 255, 255, 0.85);
}

/* TOEFL predictor tool */
.predictor-shell {
  padding: clamp(var(--space-6), 5vw, var(--space-8));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.predictor-skills {
  display: grid;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.predictor-skill-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
}

.predictor-skill-head strong {
  color: var(--primary);
  font-size: var(--text-lg);
}

.predictor-skill input[type="range"] {
  width: 100%;
  accent-color: var(--teal-700);
}

.predictor-result {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.predictor-result.is-visible {
  opacity: 1;
  transform: none;
}

.predictor-result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.predictor-total-wrap {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.predictor-total-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 600;
}

.predictor-total {
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.predictor-total-max {
  font-size: var(--text-lg);
  color: var(--text-muted);
}

.predictor-bar-row {
  display: grid;
  grid-template-columns: 88px 1fr 36px;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.predictor-bar-label,
.predictor-bar-value {
  font-size: var(--text-xs);
  font-weight: 600;
}

.predictor-bar-track {
  height: 8px;
  background: var(--bg-alt);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.predictor-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal-600), var(--teal-400));
  border-radius: inherit;
}

.predictor-insight {
  margin: var(--space-4) 0 var(--space-5);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.predictor-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.study-time-fields {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.study-time-fields input[type="number"] {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--primary);
}

.study-time-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.study-time-stat {
  padding: var(--space-4);
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  text-align: center;
}

.study-time-stat span {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.study-time-stat strong {
  font-size: var(--text-2xl);
  color: var(--navy-900);
}

.study-time-stat.highlight strong {
  color: var(--primary);
}

/* AI tools */
.ai-tool-shell {
  padding: clamp(var(--space-6), 5vw, var(--space-8));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.writing-tool-form textarea {
  width: 100%;
  min-height: 180px;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-family: inherit;
  font-size: var(--text-sm);
  line-height: 1.7;
  resize: vertical;
}

.writing-result {
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border);
}

.writing-score-grid {
  display: grid;
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

@media (min-width: 640px) {
  .writing-score-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.writing-score-item {
  padding: var(--space-4);
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
}

.writing-score-item span {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.writing-score-item strong {
  font-size: var(--text-xl);
  color: var(--primary);
}

.writing-score-item .portal-progress-bar {
  margin-top: var(--space-2);
  height: 6px;
}
