:root {
  --green: #176f35;
  --green-dark: #0f5126;
  --green-soft: #eaf5ee;
  --teal: #0588a3;
  --text: #1d2b24;
  --muted: #637269;
  --line: #dbe7df;
  --danger: #b42318;
  --success: #157347;
  --bg: #f5f8f6;
  --white: #ffffff;
  --shadow: 0 18px 55px rgba(24, 57, 37, .10);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 10%, rgba(23, 111, 53, .10), transparent 32%),
    radial-gradient(circle at 88% 18%, rgba(5, 136, 163, .10), transparent 30%),
    var(--bg);
  color: var(--text);
}

button, input, select { font: inherit; }

.page-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 42px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 18px;
}

.brand-title {
  color: var(--green-dark);
  font-weight: 800;
  letter-spacing: .02em;
}

.logos {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.logos img {
  height: 54px;
  width: auto;
  max-width: 128px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  padding: 5px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .06);
}

.card {
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(219, 231, 223, .9);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 48px);
  min-height: 560px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 18px;
}

h1, h2 {
  color: var(--green-dark);
  margin: 0 0 18px;
  line-height: 1.12;
}

h1 { font-size: clamp(32px, 4.8vw, 58px); }
h2 { font-size: clamp(26px, 3.2vw, 40px); }

.lead {
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.58;
  color: #2c3f34;
  max-width: 920px;
  margin: 0 0 28px;
}

.text-block {
  font-size: 17px;
  line-height: 1.65;
  color: #2c3f34;
  max-width: 880px;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.btn {
  border: 0;
  border-radius: 16px;
  padding: 14px 22px;
  min-height: 52px;
  cursor: pointer;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
}

.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 24px rgba(23, 111, 53, .22);
}

.btn-secondary {
  background: var(--green-soft);
  color: var(--green-dark);
}

.progress-wrap {
  margin-bottom: 24px;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-weight: 800;
  color: var(--green-dark);
  margin-bottom: 10px;
}

.progress {
  height: 10px;
  border-radius: 999px;
  background: #edf2ef;
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--green), var(--teal));
  border-radius: inherit;
  transition: width .25s ease;
}

.question-title {
  font-size: clamp(24px, 3.1vw, 36px);
  margin-bottom: 24px;
}

.options {
  display: grid;
  gap: 12px;
}

.option {
  width: 100%;
  text-align: left;
  border: 2px solid var(--line);
  background: #fff;
  border-radius: 18px;
  padding: 16px 18px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  line-height: 1.48;
}

.option:hover:not(:disabled) {
  border-color: rgba(23, 111, 53, .55);
  background: #fbfffc;
}

.option:disabled { cursor: default; }

.option .letter {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.option.is-selected {
  border-color: var(--green);
  background: var(--green-soft);
}

.option.is-correct {
  border-color: var(--success);
  background: #eef9f3;
}

.option.is-wrong {
  border-color: var(--danger);
  background: #fff1f0;
}

.feedback {
  margin-top: 22px;
  border-radius: 20px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: #f9fcfa;
}

.feedback.good {
  border-color: rgba(21, 115, 71, .25);
  background: #eef9f3;
}

.feedback.bad {
  border-color: rgba(180, 35, 24, .25);
  background: #fff6f5;
}

.feedback-title {
  font-weight: 900;
  font-size: 19px;
  margin-bottom: 8px;
}

.feedback p {
  margin: 0;
  line-height: 1.6;
  white-space: pre-line;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field.full { grid-column: 1 / -1; }

label, .field-title {
  font-weight: 800;
  color: var(--green-dark);
}

input[type="text"], select {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  background: #fff;
  color: var(--text);
}

input[type="text"]:focus, select:focus, .radio-card input:focus + span {
  outline: 3px solid rgba(23, 111, 53, .16);
  border-color: var(--green);
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.radio-card {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.radio-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-card span {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 10px 15px;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

.radio-card input:checked + span {
  border-color: var(--green);
  color: var(--green-dark);
  background: var(--green-soft);
}

.result-box {
  display: grid;
  gap: 18px;
}

.score {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-size: clamp(34px, 6vw, 68px);
  color: var(--green-dark);
  font-weight: 900;
}

.score small {
  font-size: clamp(16px, 2vw, 24px);
  color: var(--muted);
}

.level-badge {
  width: fit-content;
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 900;
}

.notice {
  margin-top: 16px;
  padding: 13px 14px;
  border-radius: 14px;
  background: #fff7e6;
  color: #684b00;
  border: 1px solid #ffe0a3;
  display: none;
}

.notice.is-visible { display: block; }

@media (max-width: 720px) {
  .page-shell { width: min(100% - 20px, 1080px); padding-top: 14px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .logos { justify-content: flex-start; gap: 8px; }
  .logos img { height: 42px; max-width: 100px; border-radius: 8px; }
  .card { border-radius: 22px; padding: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .option { grid-template-columns: 36px 1fr; padding: 14px; }
}
