/* ============================================================
   مقياس التفكير المتقدم — واجهة الطالبة
   Premium Design System | Arabic RTL | Cairo Font
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&display=swap');

/* ── Design Tokens ── */
:root {
  --ats-text-scale: 1;
  --ats-ink:       #1c2e4a;
  --ats-muted:     #5a6b80;
  --ats-line:      #dde4ed;
  --ats-panel:     rgba(255,255,255,0.97);
  --ats-aqua:      #06b6a8;
  --ats-blue:      #3b6fe8;
  --ats-blue-lt:   #eef3ff;
  --ats-coral:     #ef4444;
  --ats-gold:      #d97706;
  --ats-violet:    #7c3aed;
  --ats-bg:        #f0f5ff;
  --ats-radius:    18px;
  --ats-radius-sm: 10px;
  --ats-radius-lg: 24px;
  --ats-shadow:    0 2px 16px rgba(28,46,74,.08);
  --ats-shadow-lg: 0 8px 40px rgba(28,46,74,.12);
  font-family: Cairo, Tahoma, Arial, sans-serif;
  color-scheme: light;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: calc(16px * var(--ats-text-scale)); }
body {
  min-height: 100vh;
  background: var(--ats-bg);
  color: var(--ats-ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  direction: rtl;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 5% 5%,  rgba(6,182,168,.12) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 97% 3%,  rgba(59,111,232,.10) 0%, transparent 60%),
    radial-gradient(ellipse 80% 60% at 50% 99%, rgba(124,92,219,.07) 0%, transparent 55%),
    linear-gradient(165deg, #f4f8ff 0%, #edf6f4 40%, #fdf6ee 100%);
  z-index: -1;
  pointer-events: none;
}
::selection { background: rgba(6,182,168,.20); }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-thumb { background: var(--ats-line); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--ats-muted); }
:focus-visible { outline: 3px solid rgba(59,111,232,.35); outline-offset: 2px; border-radius: 4px; }

/* ── Shell ── */
.ats-shell {
  width: min(1160px, calc(100% - 20px));
  margin: 0 auto;
  padding: 16px 0 60px;
}

/* ═══════════════════════════════════════
   LANDING PAGE
   ═══════════════════════════════════════ */
.ats-landing {
  display: grid;
  gap: 0;
}

/* Hero Banner */
.ats-hero-banner {
  position: relative;
  background: linear-gradient(135deg, #1c2e4a 0%, #2d4a8a 45%, #1a6b6b 100%);
  border-radius: var(--ats-radius-lg);
  padding: 56px 52px 52px;
  margin-bottom: 32px;
  overflow: hidden;
  color: #fff;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ats-hero-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.ats-hero-banner > * { position: relative; z-index: 1; }
.ats-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,.9);
  width: fit-content;
  margin-bottom: 18px;
  backdrop-filter: blur(8px);
}
.ats-hero-title {
  font-size: clamp(36px, 5vw, 62px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.5px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #ffffff 30%, #a5f3fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ats-hero-desc {
  font-size: 17px;
  line-height: 1.9;
  color: rgba(255,255,255,.80);
  max-width: 600px;
  margin-bottom: 28px;
}
.ats-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: var(--ats-blue);
  border: none;
  border-radius: var(--ats-radius-sm);
  padding: 16px 32px;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
  transition: transform .2s, box-shadow .2s;
  width: fit-content;
}
.ats-hero-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.28); }
.ats-hero-cta::after { content: "←"; }

/* Hero Illustration */
.ats-hero-art {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 45%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.ats-hero-art svg { width: 100%; height: 100%; opacity: .18; }

/* Dimensions Section */
.ats-dimensions-section {
  margin-bottom: 28px;
}
.ats-dimensions-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--ats-muted);
  text-align: center;
  margin-bottom: 14px;
  letter-spacing: .5px;
}
.ats-dimension-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.ats-dimension-pill {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  background: var(--ats-panel);
  border: 1.5px solid var(--ats-line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ats-ink);
  transition: border-color .2s, box-shadow .2s, transform .18s;
  box-shadow: var(--ats-shadow);
}
.ats-dimension-pill:hover {
  border-color: var(--ats-blue);
  box-shadow: 0 4px 16px rgba(59,111,232,.15);
  transform: translateY(-1px);
}
.ats-dimension-pill b { color: var(--ats-blue); font-size: 15px; }

/* Steps */
.ats-steps-section {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 12px;
  margin-bottom: 36px;
}
.ats-step-card {
  background: var(--ats-panel);
  border: 1px solid var(--ats-line);
  border-radius: var(--ats-radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--ats-shadow);
  transition: transform .18s, box-shadow .18s;
}
.ats-step-card:hover { transform: translateY(-2px); box-shadow: var(--ats-shadow-lg); }
.ats-step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  font-size: 20px;
  font-weight: 900;
  color: #fff;
}
.ats-step-card:nth-child(1) .ats-step-num { background: linear-gradient(135deg, var(--ats-blue), #2563eb); }
.ats-step-card:nth-child(2) .ats-step-num { background: linear-gradient(135deg, var(--ats-aqua), #059669); }
.ats-step-card:nth-child(3) .ats-step-num { background: linear-gradient(135deg, var(--ats-violet), #7c3aed); }
.ats-step-card h3 { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.ats-step-card p { font-size: 13px; color: var(--ats-muted); line-height: 1.7; }

/* Form Card */
.ats-form-section {
  background: var(--ats-panel);
  border: 1.5px solid var(--ats-line);
  border-radius: var(--ats-radius-lg);
  padding: 36px 38px;
  box-shadow: var(--ats-shadow-lg);
  max-width: 640px;
  margin: 0 auto 32px;
}
.ats-form-section h3 {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 4px;
}
.ats-form-section > p {
  color: var(--ats-muted);
  font-size: 14px;
  margin-bottom: 22px;
}
.ats-field { display: grid; gap: 8px; margin-bottom: 16px; }
.ats-field label { font-weight: 700; font-size: 14px; color: var(--ats-ink); }
.ats-field input,
.ats-field select {
  width: 100%;
  border: 1.5px solid var(--ats-line);
  border-radius: var(--ats-radius-sm);
  padding: 14px 15px;
  font: inherit;
  font-size: 16px;
  background: #fafcff;
  color: var(--ats-ink);
  transition: border-color .18s, box-shadow .18s;
  direction: rtl;
}
.ats-field input::placeholder { color: #a0aec0; }
.ats-field input:focus,
.ats-field select:focus {
  outline: none;
  border-color: var(--ats-blue);
  box-shadow: 0 0 0 3px rgba(59,111,232,.13);
  background: #fff;
}
.ats-form-hint {
  font-size: 12px;
  color: var(--ats-muted);
  margin-top: -10px;
  margin-bottom: 16px;
}

/* ═══════════════════════════════════════
   TOP BAR
   ═══════════════════════════════════════ */
.ats-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding: 12px 18px;
  background: var(--ats-panel);
  border: 1px solid var(--ats-line);
  border-radius: var(--ats-radius);
  box-shadow: var(--ats-shadow);
}
.ats-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.ats-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ats-blue), var(--ats-aqua));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 4px 14px rgba(59,111,232,.25);
  flex-shrink: 0;
}
.ats-brand h1 { margin: 0; font-size: 20px; font-weight: 800; }
.ats-brand p  { margin: 2px 0 0; color: var(--ats-muted); font-size: 12px; }
.ats-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ats-icon-btn {
  border: 1.5px solid var(--ats-line);
  background: #fff;
  color: var(--ats-ink);
  border-radius: var(--ats-radius-sm);
  padding: 7px 10px;
  min-height: 40px;
  min-width: 40px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all .18s;
}
.ats-icon-btn:hover {
  border-color: var(--ats-blue);
  background: var(--ats-blue-lt);
  transform: translateY(-1px);
}
.ats-icon-btn.active { background: var(--ats-ink); color: #fff; border-color: var(--ats-ink); }
.ats-save { color: var(--ats-aqua); font-size: 12px; font-weight: 700; min-height: 18px; }

/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */
.ats-btn {
  border: none;
  border-radius: var(--ats-radius-sm);
  padding: 14px 26px;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--ats-blue), #2a5fd4);
  transition: transform .18s, box-shadow .18s, opacity .18s;
  box-shadow: 0 3px 12px rgba(59,111,232,.26);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.ats-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(59,111,232,.34); }
.ats-btn:active { transform: translateY(0); }
.ats-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.ats-btn.secondary {
  background: #fff;
  color: var(--ats-ink);
  border: 1.5px solid var(--ats-line);
  box-shadow: none;
}
.ats-btn.secondary:hover {
  border-color: var(--ats-blue);
  background: var(--ats-blue-lt);
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(59,111,232,.12);
}
.ats-btn.coral { background: linear-gradient(135deg, var(--ats-coral), #dc2626); box-shadow: 0 3px 12px rgba(239,68,68,.26); }
.ats-btn.large { padding: 18px 36px; font-size: 18px; }
.ats-btn.sm { padding: 10px 16px; font-size: 14px; width: auto; }

/* ═══════════════════════════════════════
   ERROR
   ═══════════════════════════════════════ */
.ats-error {
  color: var(--ats-coral);
  background: #fff5f5;
  border: 1.5px solid #fecaca;
  padding: 13px 15px;
  border-radius: var(--ats-radius-sm);
  font-weight: 600;
  font-size: 14px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ═══════════════════════════════════════
   QUESTION SCREEN
   ═══════════════════════════════════════ */
.ats-question-screen { }

/* Progress Line */
.ats-progress-wrap {
  background: var(--ats-panel);
  border: 1px solid var(--ats-line);
  border-radius: var(--ats-radius);
  padding: 20px 24px;
  margin-bottom: 18px;
  box-shadow: var(--ats-shadow);
}
.ats-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.ats-progress-label { font-size: 13px; font-weight: 700; color: var(--ats-muted); }
.ats-progress-count { font-size: 28px; font-weight: 900; color: var(--ats-blue); line-height: 1; }
.ats-progress-label span { color: var(--ats-muted); font-weight: 400; font-size: 14px; }
.ats-progress-pct { font-size: 13px; color: var(--ats-muted); font-weight: 600; }
.ats-progress-bar {
  height: 8px;
  background: #e8edf5;
  border-radius: 999px;
  overflow: hidden;
}
.ats-progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--ats-aqua), var(--ats-blue), var(--ats-violet));
  border-radius: 999px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
  min-width: 4px;
}

/* Question Card */
.ats-question-card {
  background: var(--ats-panel);
  border: 1px solid var(--ats-line);
  border-radius: var(--ats-radius-lg);
  padding: 32px 34px;
  box-shadow: var(--ats-shadow-lg);
  animation: atsFadeIn .3s ease both;
}
@keyframes atsFadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ats-question-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.ats-badge {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--ats-line);
  background: #fafcff;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ats-muted);
}
.ats-question-card > h2 {
  font-size: 22px;
  line-height: 1.5;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--ats-ink);
}
.ats-question-text {
  font-size: 16px;
  line-height: 2;
  color: #3d5068;
  margin-bottom: 28px;
}

/* Options */
.ats-options { display: grid; gap: 12px; }
.ats-option-card {
  display: flex;
  align-items: stretch;
  border: 2px solid var(--ats-line);
  background: #fff;
  border-radius: var(--ats-radius);
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .18s, box-shadow .18s;
  overflow: hidden;
  min-height: 64px;
}
.ats-option-card:hover {
  border-color: #b8c8e0;
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(28,46,74,.08);
}
.ats-option-card.selected {
  border-color: var(--ats-blue);
  background: var(--ats-blue-lt);
  box-shadow: 0 4px 20px rgba(59,111,232,.14);
}
.ats-option-card input[type="radio"],
.ats-option-card input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 52px;
  min-width: 52px;
  border: none;
  background: #f8faff;
  cursor: pointer;
  display: grid;
  place-items: center;
  margin: 0;
  position: relative;
}
.ats-option-card input[type="radio"]::after {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid #c4d0e0;
  background: #fff;
  transition: all .18s;
}
.ats-option-card input[type="radio"]:checked::after {
  border-color: var(--ats-blue);
  background: var(--ats-blue);
  box-shadow: inset 0 0 0 5px #fff;
}
.ats-option-card input[type="checkbox"]::after {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2.5px solid #c4d0e0;
  background: #fff;
  transition: all .18s;
}
.ats-option-card input[type="checkbox"]:checked::after {
  border-color: var(--ats-blue);
  background: var(--ats-blue);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5l3.5 3.5L11 1' stroke='%23fff' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
}
.ats-option-body {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  flex: 1;
}
.ats-option-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f0f5fb;
  color: var(--ats-blue);
  font-weight: 900;
  font-size: 15px;
  flex-shrink: 0;
  transition: all .18s;
}
.ats-option-card.selected .ats-option-num {
  background: var(--ats-blue);
  color: #fff;
}
.ats-option-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--ats-ink);
  line-height: 1.6;
}
.ats-option-card.selected .ats-option-text { color: var(--ats-blue); }

/* Ordered Steps */
.ats-order-list { display: grid; gap: 10px; }
.ats-order-row {
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 1.5px solid var(--ats-line);
  border-radius: var(--ats-radius-sm);
  padding: 14px 16px;
  font-weight: 600;
}
.ats-order-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--ats-blue), var(--ats-aqua));
  color: #fff;
  font-weight: 900;
  font-size: 15px;
}
.ats-order-text { font-size: 15px; font-weight: 600; }
.ats-order-btns { display: flex; gap: 6px; }
.ats-mini {
  padding: 8px 11px;
  border-radius: var(--ats-radius-sm);
  border: 1.5px solid var(--ats-line);
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  transition: background .15s, border-color .15s;
}
.ats-mini:hover { background: var(--ats-blue-lt); border-color: var(--ats-blue); }

.ats-textarea {
  width: 100%;
  min-height: 140px;
  border: 1.5px solid var(--ats-line);
  border-radius: var(--ats-radius-sm);
  padding: 14px 15px;
  font: inherit;
  font-size: 16px;
  line-height: 1.8;
  direction: rtl;
  resize: vertical;
  transition: border-color .18s, box-shadow .18s;
}
.ats-textarea:focus {
  outline: none;
  border-color: var(--ats-blue);
  box-shadow: 0 0 0 3px rgba(59,111,232,.13);
}

/* Confidence */
.ats-confidence-box {
  margin-top: 18px;
  padding: 18px;
  border: 1.5px solid var(--ats-line);
  border-radius: var(--ats-radius);
  background: #fbfdff;
}
.ats-confidence-head {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}
.ats-confidence-head h3 {
  font-size: 16px;
  font-weight: 900;
  color: var(--ats-ink);
}
.ats-confidence-head p {
  color: var(--ats-muted);
  font-size: 13px;
  line-height: 1.7;
}
.ats-confidence-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ats-confidence-card {
  display: grid;
  gap: 5px;
  border: 1.5px solid var(--ats-line);
  border-radius: var(--ats-radius-sm);
  background: #fff;
  padding: 13px 14px;
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s, box-shadow .18s;
}
.ats-confidence-card:hover {
  border-color: var(--ats-blue);
  box-shadow: 0 4px 14px rgba(59,111,232,.10);
  transform: translateY(-1px);
}
.ats-confidence-card.selected {
  border-color: var(--ats-blue);
  background: var(--ats-blue-lt);
}
.ats-confidence-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ats-confidence-card strong {
  font-size: 14px;
  font-weight: 900;
  color: var(--ats-ink);
}
.ats-confidence-card span {
  font-size: 12px;
  color: var(--ats-muted);
  line-height: 1.6;
}

/* Answer Status */
.ats-answer-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--ats-radius-sm);
  font-size: 14px;
  font-weight: 700;
  margin-top: 16px;
}
.ats-answer-status.pending {
  background: #fef3c7;
  border: 1.5px solid #f6d98a;
  color: #92400e;
}
.ats-answer-status.done {
  background: #ecfdf5;
  border: 1.5px solid #a7f3d0;
  color: #065f46;
}
.ats-answer-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ats-answer-status.pending .ats-answer-dot { background: #d97706; }
.ats-answer-status.done .ats-answer-dot { background: #10b981; }
@keyframes atsPulse { 0%,100% { opacity:1; } 50% { opacity:.4; } }
.ats-answer-status.pending .ats-answer-dot { animation: atsPulse 1.5s ease infinite; }

/* Navigation */
.ats-nav {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--ats-line);
}
.ats-nav .ats-btn { flex: 1; }

/* ═══════════════════════════════════════
   COMPLETING SCREEN
   ═══════════════════════════════════════ */
.ats-completing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  text-align: center;
  padding: 60px 30px;
}
.ats-completing-circles {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}
.ats-completing-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  animation: atsBounce 1.2s ease infinite;
}
.ats-completing-circle:nth-child(1) { background: var(--ats-blue); animation-delay: 0s; }
.ats-completing-circle:nth-child(2) { background: var(--ats-aqua); animation-delay: .15s; }
.ats-completing-circle:nth-child(3) { background: var(--ats-violet); animation-delay: .3s; }
@keyframes atsBounce {
  0%,80%,100% { transform: scale(.6); opacity:.4; }
  40% { transform: scale(1); opacity:1; }
}
.ats-completing h2 { font-size: 26px; font-weight: 900; margin-bottom: 10px; }
.ats-completing p { color: var(--ats-muted); font-size: 16px; line-height: 1.8; max-width: 400px; }

/* ═══════════════════════════════════════
   REPORT SCREEN
   ═══════════════════════════════════════ */
.ats-report { display: grid; gap: 18px; }
.ats-report-tools { display: flex; justify-content: flex-end; }

/* Report Header */
.ats-report-header {
  background: linear-gradient(135deg, #fff 0%, #f5f8ff 60%, #eef6f4 100%);
  border: 1px solid var(--ats-line);
  border-radius: var(--ats-radius-lg);
  padding: 32px 34px;
  box-shadow: var(--ats-shadow-lg);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
.ats-report-header .ats-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ats-aqua);
  font-weight: 900;
  font-size: 13px;
  margin-bottom: 8px;
}
.ats-report-header .ats-kicker::before {
  content: "";
  display: block;
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: var(--ats-aqua);
}
.ats-report-header h2 {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 900;
  margin-bottom: 8px;
  line-height: 1.2;
}
.ats-report-desc {
  color: var(--ats-muted);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 16px;
  max-width: 560px;
}
.ats-report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ats-report-meta span {
  background: #fff;
  border: 1.5px solid var(--ats-line);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--ats-muted);
  font-size: 13px;
  font-weight: 600;
}

/* Score Card */
.ats-score-card {
  min-width: 170px;
  text-align: center;
  border-radius: var(--ats-radius-lg);
  padding: 26px 20px;
  color: #fff;
  background: linear-gradient(135deg, #1c2e4a 0%, #3b6fe8 40%, #06b6a8 100%);
  box-shadow: 0 10px 36px rgba(59,111,232,.28);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ats-score-card span { font-size: 12px; font-weight: 700; opacity: .8; }
.ats-score-card strong { font-size: 52px; font-weight: 900; line-height: 1; }
.ats-score-card small { font-size: 13px; line-height: 1.6; opacity: .85; }

/* Dimensions Chart */
.ats-dims-card {
  padding: 26px 28px;
  border-top: 5px solid var(--ats-aqua);
}
.ats-dims-card h3 { font-size: 18px; font-weight: 800; margin-bottom: 18px; }
.ats-dim-row { display: grid; gap: 8px; margin: 10px 0; }
.ats-dim-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--ats-muted);
}
.ats-dim-label span:last-child { color: var(--ats-ink); font-weight: 800; }
.ats-dim-bar { height: 10px; background: #edf2f7; border-radius: 999px; overflow: hidden; }
.ats-dim-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--ats-aqua), var(--ats-blue));
  border-radius: 999px;
  transition: width .8s cubic-bezier(.4,0,.2,1);
  min-width: 4px;
}

/* Metrics */
.ats-metrics-card { padding: 26px 28px; border-top: 5px solid var(--ats-gold); }
.ats-metrics-card h3 { font-size: 18px; font-weight: 800; margin-bottom: 16px; }
.ats-metric-list { display: grid; gap: 10px; }
.ats-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1.5px solid var(--ats-line);
  border-radius: var(--ats-radius-sm);
  padding: 14px 16px;
}
.ats-metric-row span { color: var(--ats-muted); font-weight: 600; font-size: 14px; }
.ats-metric-row strong { font-size: 18px; font-weight: 800; }
.ats-metric-row.blue   strong { color: var(--ats-blue); }
.ats-metric-row.aqua   strong { color: var(--ats-aqua); }
.ats-metric-row.violet strong { color: var(--ats-violet); }
.ats-metric-row.blue   { border-right: 4px solid var(--ats-blue); }
.ats-metric-row.aqua   { border-right: 4px solid var(--ats-aqua); }
.ats-metric-row.violet { border-right: 4px solid var(--ats-violet); }

/* Recommendation */
.ats-recommend-card { padding: 26px 28px; border-top: 5px solid var(--ats-blue); }
.ats-recommend-card h3 { font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.ats-recommend-card > p { line-height: 1.9; font-size: 15px; color: var(--ats-muted); margin-bottom: 14px; }
.ats-judgment-box {
  background: var(--ats-blue-lt);
  border: 1.5px solid #c7d7fa;
  border-radius: var(--ats-radius-sm);
  padding: 16px;
  line-height: 1.8;
}
.ats-judgment-box strong { color: var(--ats-blue); }

/* 3-col Grid */
.ats-list-card { padding: 24px 26px; }
.ats-list-card h3 { font-size: 17px; font-weight: 800; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.ats-list-card h3::before {
  content: "";
  display: block;
  width: 6px;
  height: 22px;
  border-radius: 999px;
}
.ats-list-card:nth-child(1) h3::before { background: var(--ats-aqua); }
.ats-list-card:nth-child(2) h3::before { background: var(--ats-gold); }
.ats-list-card:nth-child(3) h3::before { background: var(--ats-blue); }
.ats-list-card:nth-child(1) { border-top: 5px solid var(--ats-aqua); }
.ats-list-card:nth-child(2) { border-top: 5px solid var(--ats-gold); }
.ats-list-card:nth-child(3) { border-top: 5px solid var(--ats-blue); }
.ats-list { margin: 0; padding: 0 20px 0 0; line-height: 2; }
.ats-list li { font-size: 15px; padding: 7px 0; border-bottom: 1px dashed var(--ats-line); }
.ats-list li:last-child { border-bottom: none; }

/* ═══════════════════════════════════════
   HIGH CONTRAST
   ═══════════════════════════════════════ */
.ats-contrast {
  --ats-ink: #000;
  --ats-muted: #1a2847;
  --ats-line: #4a5568;
  --ats-bg: #fff;
  --ats-blue: #1a3cb8;
  --ats-aqua: #005f57;
}

/* ═══════════════════════════════════════
   PRINT
   ═══════════════════════════════════════ */
@media print {
  body::before, .ats-report-tools, .ats-topbar .ats-tools, .ats-hero-cta { display: none !important; }
  .ats-shell { width: 100%; padding: 0; }
  .ats-card, .ats-question-card { box-shadow: none; break-inside: avoid; }
  .ats-topbar { margin-bottom: 10px; }
  .ats-hero-banner { background: #1c2e4a !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ═══════════════════════════════════════
   RESPONSIVE — TABLET
   ═══════════════════════════════════════ */
@media (max-width: 960px) {
  .ats-shell { width: min(100% - 16px, 1160px); }
  .ats-topbar { flex-direction: column; align-items: flex-start; }
  .ats-tools { justify-content: flex-start; }
  .ats-hero-banner { padding: 36px 28px; }
  .ats-hero-art { display: none; }
  .ats-steps-section { grid-template-columns: 1fr 1fr; }
  .ats-form-section { padding: 24px; }
  .ats-report-header { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════
   RESPONSIVE — MOBILE
   ═══════════════════════════════════════ */
@media (max-width: 640px) {
  .ats-shell { padding: 10px 0 40px; }
  .ats-hero-banner { padding: 28px 20px; border-radius: var(--ats-radius); min-height: 260px; }
  .ats-hero-badge { font-size: 11px; padding: 5px 10px; }
  .ats-hero-title { font-size: 28px; }
  .ats-hero-desc { font-size: 14px; }
  .ats-hero-cta { padding: 14px 24px; font-size: 15px; }
  .ats-steps-section { grid-template-columns: 1fr; }
  .ats-step-card { padding: 16px; }
  .ats-dimension-strip { gap: 6px; }
  .ats-dimension-pill { font-size: 12px; padding: 6px 10px; }
  .ats-form-section { padding: 20px 18px; margin: 0 8px 24px; }
  .ats-topbar { padding: 10px 14px; border-radius: var(--ats-radius-sm); }
  .ats-brand h1 { font-size: 17px; }
  .ats-mark { width: 40px; height: 40px; font-size: 16px; }
  .ats-progress-wrap { padding: 16px 18px; }
  .ats-question-card { padding: 20px 18px; border-radius: var(--ats-radius); }
  .ats-question-card > h2 { font-size: 18px; }
  .ats-question-text { font-size: 15px; }
  .ats-option-card { min-height: 52px; }
  .ats-option-body { padding: 12px 14px; }
  .ats-option-text { font-size: 15px; }
  .ats-confidence-options { grid-template-columns: 1fr; }
  .ats-confidence-box { padding: 14px; }
  .ats-nav { flex-direction: column; }
  .ats-nav .ats-btn { width: 100%; }
  .ats-report-header { padding: 22px 18px; }
  .ats-score-card strong { font-size: 40px; }
  .ats-dims-card, .ats-metrics-card, .ats-recommend-card, .ats-list-card { padding: 18px; }
}
