:root {
  --level-primary: #e83c66;
  --level-primary-strong: #c72450;
  --level-text-main: #1f2a44;
  --level-text-sub: #4b5b79;
  --level-bg-soft: #f7f8fb;
  --level-surface: #ffffff;
  --level-border: #e9edf5;
  --level-radius-lg: 20px;
  --level-radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: linear-gradient(180deg, #fff9ee 0%, #f8f9fc 38%, #f7f8fb 100%);
  color: var(--level-text-main);
  font-family: "Open Sans", sans-serif;
}

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

button,
input {
  font: inherit;
}

.level-page-main {
  min-height: 600px;
  padding: 56px 20px 72px;
}

.level-hero-section {
  margin: 0 auto;
  width: min(1200px, 100%);
}

.level-hero-card {
  background:
    radial-gradient(circle at 95% 8%, rgba(232, 60, 102, 0.14), transparent 34%),
    radial-gradient(circle at 10% 0%, rgba(31, 42, 68, 0.08), transparent 26%),
    #fffaf0;
  border: 1px solid #ffe5c4;
  border-radius: var(--level-radius-lg);
  box-shadow: 0 16px 36px rgba(16, 24, 40, 0.08);
  padding: 34px;
}

.level-badge {
  align-items: center;
  background: rgba(232, 60, 102, 0.12);
  border: 1px solid rgba(232, 60, 102, 0.2);
  border-radius: 999px;
  color: var(--level-primary-strong);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
  margin-bottom: 14px;
  min-height: 32px;
  padding: 6px 14px;
}

.level-hero-grid {
  column-gap: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, .9fr);
}

.level-hero-main h1 {
  color: var(--level-text-main);
  font-size: clamp(34px, 4vw, 50px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

.level-hero-main p {
  color: var(--level-text-sub);
  font-size: 18px;
  line-height: 1.6;
  margin: 16px 0 0;
  max-width: 760px;
}

.level-hero-stats {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.level-hero-stats div {
  align-items: center;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #efdcc0;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  min-width: 116px;
  padding: 10px 12px;
}

.level-hero-stats strong {
  color: var(--level-primary);
  font-size: 26px;
  line-height: 1;
}

.level-hero-stats span {
  color: #6b7387;
  font-size: 13px;
  margin-top: 4px;
}

.level-cta {
  align-items: center;
  background: linear-gradient(135deg, #ee4f74 0%, #e83c66 100%);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 12px 26px rgba(232, 60, 102, 0.28);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-size: 19px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  line-height: 1.2;
  margin-top: 20px;
  min-height: 54px;
  padding: 12px 24px;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.level-cta:hover {
  box-shadow: 0 16px 30px rgba(232, 60, 102, 0.32);
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.level-cta:active {
  transform: translateY(0);
}

.level-intro-feedback {
  border-radius: 10px;
  font-size: 14px;
  line-height: 20px;
  margin: 12px 0 0;
  padding: 10px 12px;
}

.level-intro-feedback.is-error {
  background: #ffe8ee;
  color: #9f2645;
}

.level-hero-side {
  align-self: start;
  background: linear-gradient(180deg, #0f2641 0%, #0b1f35 100%);
  border-radius: 16px;
  color: #eef4ff;
  padding: 20px 18px;
}

.level-hero-side h2 {
  color: #ffffff;
  font-size: 22px;
  line-height: 1.2;
  margin: 0;
}

.level-hero-side ul {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 14px 0 12px;
  padding: 0;
}

.level-hero-side li {
  align-items: center;
  display: flex;
  font-size: 15px;
  gap: 8px;
  line-height: 1.35;
}

.level-hero-side li::before {
  background: #e83c66;
  border-radius: 999px;
  content: "";
  display: inline-flex;
  flex: 0 0 8px;
  height: 8px;
}

.level-hero-side p {
  color: #d0d8e8;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.level-quiz-box,
.level-result-box {
  background: var(--level-surface);
  border: 1px solid var(--level-border);
  border-radius: var(--level-radius-lg);
  box-shadow: 0 16px 34px rgba(17, 31, 45, 0.1);
  margin-top: 24px;
  max-width: 100%;
  width: 100%;
}

.level-quiz-box {
  padding: 24px;
}

.level-quiz-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.level-quiz-step,
.level-quiz-pct {
  color: #4b5563;
  font-size: 14px;
  font-weight: 700;
}

.level-quiz-progress {
  background: #eceff5;
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
  width: 100%;
}

.level-quiz-progress span {
  background: linear-gradient(90deg, #f06d3f 0%, #e83c66 100%);
  border-radius: 999px;
  display: block;
  height: 100%;
  transition: width .22s ease;
}

.level-quiz-card {
  margin-top: 18px;
}

.level-quiz-card h3 {
  color: var(--level-text-main);
  font-size: clamp(16px, 1.35vw, 20px);
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 14px;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.level-quiz-card h3.is-long-question {
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.55;
}

.level-quiz-media {
  margin: 0 0 14px;
}

.level-quiz-media audio,
.level-quiz-media video {
  display: block;
  width: 100%;
}

.level-quiz-media video {
  border-radius: 12px;
  max-height: 360px;
}

.level-quiz-fill {
  margin: 0 0 14px;
}

.level-quiz-fill-input {
  appearance: none;
  background: #ffffff;
  border: 1px solid #d7dce8;
  border-radius: 12px;
  color: #111827;
  font-size: 16px;
  min-height: 52px;
  outline: none;
  padding: 10px 14px;
  width: 100%;
}

.level-quiz-fill-input:focus {
  border-color: var(--level-primary);
  box-shadow: 0 0 0 3px rgba(232, 60, 102, 0.15);
}

.level-quiz-options {
  display: grid;
  gap: 10px;
}

.level-quiz-option {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d6dcea;
  border-radius: 12px;
  color: #1f2937;
  cursor: pointer;
  display: flex;
  font-size: 15px;
  gap: 12px;
  line-height: 1.35;
  min-height: 48px;
  padding: 8px 12px;
  text-align: left;
  width: 100%;
}

.level-quiz-option:hover {
  border-color: #9ca8bf;
}

.level-quiz-option.is-selected {
  background: #fff1f4;
  border-color: var(--level-primary);
}

.level-option-key {
  align-items: center;
  background: #f1f4fa;
  border-radius: 999px;
  color: #374151;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  height: 26px;
  justify-content: center;
  min-width: 26px;
}

.level-quiz-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.level-contact-gate {
  background: #fff6f8;
  border: 1px solid #ffd4df;
  border-radius: 14px;
  margin-top: 16px;
  padding: 16px;
}

.level-contact-gate h4 {
  color: #1f2a44;
  font-size: 20px;
  margin: 0;
}

.level-contact-gate p {
  color: #55627a;
  margin: 8px 0 0;
}

.level-contact-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.level-contact-field {
  display: grid;
  gap: 6px;
}

.level-contact-field span {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.level-contact-field input {
  appearance: none;
  background: #ffffff;
  border: 1px solid #d7dce8;
  border-radius: 12px;
  color: #111827;
  font-size: 15px;
  min-height: 46px;
  outline: none;
  padding: 10px 12px;
  width: 100%;
}

.level-contact-field input:focus {
  border-color: var(--level-primary);
  box-shadow: 0 0 0 3px rgba(232, 60, 102, 0.12);
}

.level-contact-feedback {
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.4;
  margin: 12px 0 0;
  padding: 10px 12px;
}

.level-contact-feedback.is-error {
  background: #ffe8ee;
  color: #9f2645;
}

.level-contact-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.level-contact-submit {
  align-items: center;
  background: linear-gradient(135deg, #f06d3f 0%, #e83c66 100%);
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-size: 15px;
  font-weight: 700;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
}

.level-quiz-next,
.level-result-restart {
  align-items: center;
  background: var(--level-primary);
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-size: 16px;
  font-weight: 700;
  justify-content: center;
  min-height: 46px;
  padding: 10px 22px;
}

.level-quiz-next[disabled] {
  cursor: not-allowed;
  opacity: 0.45;
}

.level-quiz-feedback {
  border-radius: 10px;
  font-size: 14px;
  line-height: 20px;
  margin: 12px 0 0;
  padding: 10px 12px;
}

.level-quiz-feedback.is-success {
  background: #e7f8ee;
  color: #1f6d45;
}

.level-quiz-feedback.is-error {
  background: #ffe8ee;
  color: #9f2645;
}

.level-result-box {
  padding: 28px;
  text-align: center;
}

.level-result-box h2 {
  color: var(--level-text-main);
  font-size: 34px;
  margin: 0;
}

.level-result-lead {
  color: var(--level-text-sub);
  font-size: 16px;
  margin: 10px 0 0;
}

.level-result-stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 24px 0;
}

.level-result-stats div {
  background: #f8fafc;
  border: 1px solid #e6eaf4;
  border-radius: 12px;
  padding: 12px;
}

.level-result-stats span {
  color: #6b7280;
  display: block;
  font-size: 13px;
}

.level-result-stats strong {
  color: #111827;
  display: block;
  font-size: 28px;
  margin-top: 4px;
}

.site-footer {
  margin-top: 28px;
}

.level-test-standalone {
  background:
    radial-gradient(circle at 10% 5%, rgba(31, 42, 68, 0.08), transparent 40%),
    radial-gradient(circle at 90% 8%, rgba(232, 60, 102, 0.12), transparent 36%),
    #f3f5f9;
  min-height: 100vh;
}

.level-test-standalone .level-test-shell {
  align-items: flex-start;
  display: flex;
  justify-content: center;
  margin: 0 auto;
  max-width: 760px;
  min-height: 100vh;
  padding: 52px 20px 64px;
  width: 100%;
}

.level-test-standalone .level-test-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e4e9f4;
  border-radius: 20px;
  box-shadow: 0 18px 36px rgba(16, 24, 40, 0.1);
  margin: 0 auto;
  max-width: 640px;
  padding: 24px;
  width: 100%;
}

.level-test-standalone [hidden] {
  display: none !important;
}

.level-test-standalone .level-quiz-step {
  color: #6b7280;
  font-weight: 600;
  margin: 0;
}

.level-test-standalone .level-quiz-head {
  margin: 2px 0 8px;
}

.level-test-standalone .level-standalone-loading {
  color: #6b7280;
  font-size: 14px;
  margin: 16px 0 0;
  text-align: center;
}

.level-test-standalone .level-intro-feedback {
  margin-top: 12px;
}

.level-test-standalone .level-quiz-box,
.level-test-standalone .level-result-box {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin-top: 18px;
  padding: 0;
}

.level-test-standalone .level-quiz-progress,
.level-test-standalone .level-quiz-head,
.level-test-standalone .level-quiz-step,
.level-test-standalone .level-standalone-loading,
.level-test-standalone .level-intro-feedback {
  max-width: 640px;
}

.level-test-standalone .level-quiz-card h3 {
  font-size: clamp(16px, 1.35vw, 20px);
}

.level-test-standalone .level-quiz-card h3.is-long-question {
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.55;
}

.level-test-standalone .level-quiz-actions {
  margin-top: 18px;
}

.level-test-standalone .level-quiz-next,
.level-test-standalone .level-result-restart {
  background: linear-gradient(135deg, #f06d3f 0%, #e83c66 100%);
  box-shadow: 0 10px 20px rgba(232, 60, 102, 0.25);
}

@media (max-width: 1100px) {
  .level-page-main {
    padding-top: 40px;
  }

  .level-hero-card {
    padding: 24px;
  }

  .level-hero-grid {
    grid-template-columns: 1fr;
    row-gap: 18px;
  }

  .level-hero-main p {
    font-size: 17px;
  }

  .level-hero-stats {
    flex-wrap: wrap;
  }

  .level-hero-side {
    order: 2;
  }
}

@media (max-width: 720px) {
  .level-page-main {
    padding: 30px 14px 56px;
  }

  .level-hero-card {
    border-radius: 16px;
    padding: 18px;
  }

  .level-hero-main h1 {
    font-size: 32px;
  }

  .level-hero-main p {
    font-size: 16px;
  }

  .level-hero-stats div {
    min-width: calc(50% - 6px);
  }

  .level-cta {
    font-size: 17px;
    width: 100%;
  }

  .level-quiz-box,
  .level-result-box {
    border-radius: 16px;
  }

  .level-quiz-box {
    padding: 16px;
  }

  .level-result-stats {
    grid-template-columns: 1fr;
  }

  .level-test-standalone .level-test-shell {
    max-width: 100%;
    padding: 24px 12px 38px;
  }

  .level-test-standalone .level-test-card {
    border-radius: 16px;
    padding: 16px;
  }

  .level-test-standalone .level-quiz-card h3 {
    font-size: 17px;
  }

  .level-test-standalone .level-quiz-card h3.is-long-question {
    font-size: 15px;
  }
}
