.cv-rater {
  background: var(--brand-cream, #fdf8f1);
  color: var(--text-ink, #1c3458);
  padding-bottom: 4rem;
}

.cv-rater-hero {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 6vw, 4rem);
  background: linear-gradient(135deg, rgba(47, 111, 183, 0.12), rgba(244, 138, 91, 0.08));
  align-items: center;
  text-align: center;
}

.hero-box {
  width: 100%;
  max-width: 860px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.95), rgba(238, 244, 255, 0.9));
  border-radius: 28px;
  border: 1px solid rgba(47, 111, 183, 0.18);
  padding: clamp(2rem, 5vw, 2.75rem);
  box-shadow: 0 24px 48px rgba(28, 52, 88, 0.16);
}

.cv-rater-hero .hero-copy {
  max-width: 700px;
  margin: 0 auto;
  text-align: inherit;
}

.cv-rater-hero h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.15;
}

.cv-rater-hero .lead {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-soft, rgba(28, 52, 88, 0.72));
  margin-bottom: 1.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgba(47, 111, 183, 0.12);
  color: var(--brand-blue, #2f6fb7);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge.badge-disabled {
  background: rgba(28, 52, 88, 0.15);
  color: rgba(28, 52, 88, 0.65);
}

.hero-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  justify-items: start;
}

.hero-points li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  font-size: 0.98rem;
  line-height: 1.6;
  text-align: left;
}

.hero-note {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-soft, rgba(28, 52, 88, 0.72));
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.cv-rater-form-section {
  padding: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 6vw, 4rem) 1rem;
}

.form-card {
  background: var(--white, #fff);
  border-radius: 24px;
  padding: clamp(1.8rem, 3.5vw, 2.4rem);
  box-shadow: 0 18px 36px rgba(28, 52, 88, 0.12);
  border: 1px solid rgba(47, 111, 183, 0.08);
}

.form-header h2 {
  margin-bottom: 0.4rem;
}

.form-header p {
  margin-top: 0;
  color: var(--text-soft, rgba(28, 52, 88, 0.72));
}

.input-grid {
  display: grid;
  gap: 1.5rem;
}

.input-stack label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.input-stack select,
.input-stack input[type="search"],
.input-stack textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(28, 52, 88, 0.18);
  background: rgba(255, 255, 255, 0.95);
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-stack select:focus,
.input-stack input[type="search"]:focus,
.input-stack textarea:focus {
  outline: none;
  border-color: rgba(47, 111, 183, 0.8);
  box-shadow: 0 0 0 3px rgba(47, 111, 183, 0.15);
}

.select-wrapper {
  position: relative;
  margin-top: 0.6rem;
}

.help-text {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--text-soft, rgba(28, 52, 88, 0.72));
}

.input.tabs {
  border: none;
  padding: 0;
}

.tab-controls {
  display: flex;
  gap: 0.75rem;
  background: rgba(47, 111, 183, 0.08);
  padding: 0.4rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.tab {
  flex: 1;
  border: none;
  border-radius: 999px;
  background: transparent;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-ink, #1c3458);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.tab.is-active {
  background: var(--white, #fff);
  color: var(--brand-blue, #2f6fb7);
  box-shadow: 0 6px 12px rgba(28, 52, 88, 0.12);
}

.tab-panel textarea {
  min-height: 280px;
}

.tab-panel.is-hidden {
  display: none;
}

.file-drop {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(47, 111, 183, 0.35);
  border-radius: 16px;
  padding: 2rem 1rem;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.file-drop:hover,
.file-drop:focus-within {
  border-color: rgba(47, 111, 183, 0.65);
  background: rgba(47, 111, 183, 0.08);
}

.file-drop input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.file-drop-text {
  font-size: 0.95rem;
  color: var(--text-soft, rgba(28, 52, 88, 0.72));
}

.file-meta {
  font-size: 0.9rem;
  margin-top: 0.5rem;
  color: var(--text-soft, rgba(28, 52, 88, 0.72));
}

.form-footer {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
}

.terms,
.cloud-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-soft, rgba(28, 52, 88, 0.72));
}

.terms input,
.cloud-toggle input {
  width: 1.1rem;
  height: 1.1rem;
}

.disclaimer {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(28, 52, 88, 0.72);
}

.results-panel {
  margin: 0 clamp(1.5rem, 6vw, 4rem);
  margin-bottom: 4rem;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border-radius: 24px;
  background: var(--white, #fff);
  box-shadow: 0 18px 38px rgba(28, 52, 88, 0.1);
  border: 1px solid rgba(47, 111, 183, 0.1);
}

.results-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.results-header h2 {
  margin: 0;
}

.result-subtitle {
  margin: 0.2rem 0 0;
  color: var(--text-soft, rgba(28, 52, 88, 0.72));
}

.score-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.score-value {
  margin: 0;
  font-size: clamp(2.8rem, 5vw, 3.6rem);
  font-weight: 700;
  color: var(--brand-blue, #2f6fb7);
}

.verdict-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  background: rgba(47, 111, 183, 0.12);
  color: var(--brand-blue, #2f6fb7);
}

.verdict-pill.pass {
  background: rgba(46, 179, 109, 0.16);
  color: #1f7a4a;
}

.verdict-pill.competitive {
  background: rgba(244, 184, 66, 0.18);
  color: #8a5a00;
}

.verdict-pill.needs {
  background: rgba(244, 138, 91, 0.18);
  color: #b5551f;
}

.verdict-pill.fail {
  background: rgba(196, 39, 61, 0.16);
  color: #a3192d;
}

.results-content {
  display: grid;
  gap: 2rem;
}

.results-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
}

.fifa-card-wrapper {
  display: none;
  justify-content: flex-start;
  width: 100%;
}

.card-note {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.6);
}

.fifa-card-wrapper.active {
  display: flex;
}

#fifaCard {
  width: 100%;
  max-width: 320px;
  min-height: 430px;
  margin: 0;
  background: linear-gradient(160deg, #007bff 0%, #64b5f6 70%, #ff8c00 100%);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  color: #fff;
  text-align: left;
  padding: 18px 18px 96px;
  position: relative;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

#fifaCard .ats-score {
  position: absolute;
  top: 18px;
  left: 18px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  font-weight: 800;
}

#fifaCard .ats-label {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

#fifaCard .ats-value {
  font-size: 40px;
  line-height: 1;
}

#fifaCard .ats-total {
  font-size: 18px;
  font-weight: 600;
}

#fifaCard .emoji {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 64px;
  margin-top: 0;
  display: inline-flex;
  animation: fifaEmojiPulse 6s ease-in-out infinite;
}

@keyframes fifaEmojiPulse {
  0%, 100% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.06) rotate(-3deg);
  }
}

#fifaCard .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 110px;
  margin-bottom: 48px;
  padding: 0;
  width: 100%;
}

#fifaCard .stat {
  font-weight: 600;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: help;
  transition: background 0.3s ease, transform 0.3s ease;
  min-width: 0;
}

#fifaCard .stat:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

#fifaCard .stat-label {
  flex: 1 1 auto;
  line-height: 1.3;
  min-width: 0;
}

#fifaCard .stat-value {
  min-width: 48px;
  text-align: right;
  font-size: 18px;
  font-weight: 700;
}

#fifaCard .summary {
  position: absolute;
  bottom: 24px;
  width: calc(100% - 36px);
  left: 18px;
  font-weight: 700;
  text-align: center;
}

#fifaCard .verdict-pill {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  padding: 6px 14px;
  display: inline-block;
  font-size: 16px;
  margin-top: 14px;
}

.card {
  border: 1px solid rgba(28, 52, 88, 0.08);
  border-radius: 18px;
  padding: 1.5rem;
  background: rgba(249, 251, 255, 0.7);
}

.card h3 {
  margin-top: 0;
}

.progress-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 1rem;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
}

.progress-bar {
  height: 10px;
  background: rgba(28, 52, 88, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--brand-blue, #2f6fb7);
  width: 0%;
  transition: width 0.4s ease;
}

.progress-fill.preferred {
  background: #f48a5b;
}

.progress-fill.soft {
  background: #6b83a6;
}

.progress-fill.context {
  background: #0d47a1;
}

.must-have {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.badge-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.badge-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(244, 138, 91, 0.18);
  color: #b5551f;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-list li.soft {
  background: rgba(107, 131, 166, 0.18);
  color: #43536b;
}

.badge-list li.core {
  background: rgba(47, 111, 183, 0.16);
  color: var(--brand-blue, #2f6fb7);
}

.badge-list li.context {
  background: rgba(25, 118, 210, 0.18);
  color: #0f3b7b;
}

.tip {
  margin-top: 0;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
  color: var(--text-soft, rgba(28, 52, 88, 0.72));
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.checklist li {
  display: flex;
  gap: 0.75rem;
  align-items: start;
  font-size: 0.92rem;
}

.checklist li .icon {
  font-size: 1.1rem;
  line-height: 1;
}

.recommendation-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.75rem;
  font-size: 0.92rem;
}

.recommendation-list li {
  line-height: 1.5;
}

.btn {
  cursor: pointer;
}

.btn-outline {
  border-radius: 999px;
  border: 1px solid rgba(47, 111, 183, 0.35);
  background: transparent;
  color: var(--brand-blue, #2f6fb7);
  padding: 0.75rem 1.4rem;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-outline:hover {
  background: rgba(47, 111, 183, 0.1);
  transform: translateY(-1px);
}

.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  display: grid;
  gap: 0.75rem;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  min-width: 220px;
  max-width: 320px;
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  background: rgba(28, 52, 88, 0.92);
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 14px 32px rgba(18, 60, 110, 0.25);
  opacity: 0;
  transform: translateY(-10px);
  animation: toast-in 0.3s forwards;
}

.toast.success {
  background: rgba(47, 111, 183, 0.95);
}

.toast.error {
  background: rgba(196, 39, 61, 0.92);
}

.ats-banner {
  display: none;
  margin: 0 0 1.25rem;
  padding: 0.85rem 1.1rem;
  border-radius: 16px;
  border: 1px solid #fdba74;
  background: #fff7ed;
  color: #9a3412;
  font-size: 0.95rem;
}

.ats-banner.show {
  display: block;
}

.ats-disclaimer,
.ats-mode-note {
  margin: 0.35rem 0;
  font-size: 0.95rem;
  color: #475569;
}

.ats-mode-note .badge {
  margin-right: 0.5rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  border-radius: 12px;
  background: #eef2ff;
  color: #1e1b4b;
  font-weight: 600;
  font-size: 0.85rem;
}

@keyframes toast-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 960px) {
  .cv-rater-hero {
    flex-direction: column;
    align-items: center;
  }
  .input-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .input-grid .input-stack:nth-child(3) {
    grid-column: 1 / -1;
  }
  .input-grid .input-stack:nth-child(4) {
    grid-column: 1 / -1;
  }
  .results-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}

@media (min-width: 1100px) {
  .results-content {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    align-items: start;
    gap: 2.5rem;
  }
  .fifa-card-wrapper {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .progress-fill,
  .btn-outline,
  .toast,
  #fifaCard .emoji {
    transition: none;
    animation-duration: 0.001s;
  }
}
