:root {
  --navy: #0f2d52;
  --charcoal: #2d3748;
  --light: rgba(247, 249, 251, 0.82);
  --gold: #d4af37;
  --border: rgba(255, 255, 255, 0.25);
  --text: #162034;
  --panel: rgba(255, 255, 255, 0.64);
  --shadow: 0 24px 80px rgba(15, 45, 82, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(212, 175, 55, 0.12), transparent 24%),
    radial-gradient(circle at top right, rgba(15, 45, 82, 0.16), transparent 20%),
    linear-gradient(180deg, #f4f7fb 0%, #e8eff8 35%, #f7f9fb 100%);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

main {
  flex: 1 0 auto;
}

.hero {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(24px);
  padding: 28px 0 40px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -120px;
  width: 280px;
  height: 280px;
  background: rgba(212, 175, 55, 0.14);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -100px;
  width: 220px;
  height: 220px;
  background: rgba(15, 45, 82, 0.08);
  border-radius: 50%;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
}

.hero h1,
.panel h2,
.footer h3 {
  margin: 0;
  color: var(--navy);
}

.hero__topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__version-switch {
  display: flex;
  gap: 10px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(15, 45, 82, 0.12);
  border-radius: 999px;
}

.version-btn {
  border: 0;
  background: transparent;
  color: var(--charcoal);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
}

.version-btn.active {
  background: linear-gradient(135deg, #1a456f, #0f2d52);
  color: white;
  box-shadow: 0 10px 24px rgba(15, 45, 82, 0.18);
}

.hero__content {
  margin-top: 32px;
  max-width: 760px;
  position: relative;
  z-index: 1;
}

.brand img {
  display: block;
  height: 70px;
  width: auto;
}

.hero h1 {
  font-size: clamp(2.4rem, 3.6vw, 3.8rem);
  letter-spacing: -0.03em;
  margin: 8px 0 18px;
  line-height: 1.05;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
}

.hero__card h3 {
  margin-top: 0;
  font-size: 1rem;
}

.hero .lead {
  font-size: 1.08rem;
  color: var(--charcoal);
  margin-bottom: 20px;
}

.hero__highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 24px 0;
}

.hero__highlights li {
  background: white;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--charcoal);
}

.panel {
  margin: 32px 0;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 32px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field--full {
  grid-column: 1 / -1;
}

label {
  font-weight: 600;
  color: var(--navy);
}

input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(15, 45, 82, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 6px rgba(15, 45, 82, 0.06);
}

.privacy-note {
  margin: 0;
  color: var(--charcoal);
  font-size: 0.95rem;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease;
  min-height: 48px;
}
.btn.loading {
  pointer-events: none;
  opacity: 0.9;
}

.btn.loading::after {
  content: '';
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.team-search-msg { font-size: 0.9rem; margin-left: 8px; color: var(--navy); }
.team-search-msg.error { color: #c53030; }
.team-search-msg.success { color: #2f855a; }

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), #21426e);
  color: white;
  box-shadow: 0 14px 28px rgba(15, 45, 82, 0.18);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.72);
  color: var(--navy);
  border: 1px solid rgba(15, 45, 82, 0.12);
}

.progress-block {
  min-width: 220px;
}

.progress-bar {
  width: 100%;
  background: var(--light);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--navy));
  border-radius: inherit;
  transition: width 0.25s ease;
}

.question-card {
  display: grid;
  gap: 22px;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 24px 64px rgba(15, 45, 82, 0.08);
}

.question-card__title {
  margin: 0;
  color: var(--navy);
  font-size: 1.2rem;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.answer-btn {
  border: 1px solid rgba(15, 45, 82, 0.12);
  background: rgba(255, 255, 255, 0.9);
  padding: 16px 10px;
  border-radius: 18px;
  cursor: pointer;
  color: var(--charcoal);
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.answer-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 45, 82, 0.24);
}

.answer-btn.selected {
  background: linear-gradient(180deg, #0f2d52 0%, #1a456f 100%);
  color: white;
  border-color: rgba(15, 45, 82, 0.4);
}

.assessment-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
}

.hidden {
  display: none;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.score-card,
.ranking-card,
.action-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  background: var(--light);
}

.score-card strong,
.ranking-card strong,
.action-card strong {
  color: var(--navy);
}

.score-card h3,
.ranking-card h3,
.action-card h3 {
  margin-top: 0;
  color: var(--navy);
}

.score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.score-row:last-child {
  border-bottom: 0;
}

.chart-box {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--light);
}

/* Report and print styles */
.report-body { padding: 12px; }
.report-header img { border-radius: 8px; }

@media print {
  body { background: white; color: #000 }
  .panel { border: none; box-shadow: none; border-radius: 0 }
  .no-print { display: none !important }
  .container { width: 100%; margin: 0 }
}

.bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
}

.bar__track {
  flex: 1;
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--navy));
  border-radius: inherit;
}

.footer {
  background: rgba(15, 45, 82, 0.95);
  color: white;
  padding: 48px 0;
  margin-top: auto;
}

.footer h3,
.footer p {
  color: white;
}

.footer__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.footer .btn-secondary {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 768px) {
  .form-grid,
  .grid-2,
  .answer-grid {
    grid-template-columns: 1fr;
  }

  .assessment-actions {
    flex-direction: column;
    gap: 10px;
  }
}

@media (min-width: 769px) {
  .hero {
    padding: 54px 0 80px;
  }
}
