:root {
  color-scheme: light;
  --ink: #163a52;
  --muted: #61798b;
  --line: #d9e8ef;
  --paper: #ffffff;
  --canvas: #f3f8fb;
  --blue: #0b76ad;
  --blue-2: #36a9d6;
  --teal: #27b7b0;
  --pink: #d985bb;
  --danger: #b42318;
  --ok: #117a65;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 5%, rgba(217,133,187,.18), transparent 24rem),
    radial-gradient(circle at 3% 25%, rgba(54,169,214,.14), transparent 24rem),
    var(--canvas);
  min-height: 100vh;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(54,169,214,.35);
  outline-offset: 2px;
}

.topbar {
  min-height: 78px;
  padding: 14px clamp(18px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(217,232,239,.9);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(14px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.brand img { width: 50px; height: 50px; object-fit: contain; }
.brand span { display: grid; line-height: 1.05; }
.brand strong { font-size: 20px; color: #086a9e; }
.brand small { margin-top: 5px; color: var(--muted); font-size: 12px; }
.secure-badge {
  border: 1px solid #c9e8e2;
  background: #eefaf7;
  color: #19715f;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 34px auto 50px;
}
.intro, .workspace, .result, .error {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(217,232,239,.96);
  box-shadow: 0 24px 70px rgba(24,76,108,.10);
  border-radius: 28px;
}
.intro {
  min-height: 570px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr);
  overflow: hidden;
}
.intro-copy { padding: clamp(34px, 6vw, 72px); align-self: center; }
.kicker {
  margin: 0 0 12px;
  color: var(--blue);
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .07em;
}
h1, h2 { margin: 0; color: #153f59; letter-spacing: -.025em; }
h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.02; max-width: 760px; }
h2 { font-size: clamp(26px, 3vw, 36px); }
.lead {
  margin: 20px 0 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}
.meta-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.meta {
  padding: 14px 15px;
  border-radius: 15px;
  background: #f6fafc;
  border: 1px solid #e2edf2;
}
.meta span { display: block; color: var(--muted); font-size: 12px; }
.meta strong { display: block; margin-top: 4px; font-size: 14px; }
.actions { margin-top: 30px; }
.primary, .secondary {
  border: 0;
  border-radius: 13px;
  padding: 12px 19px;
  font-weight: 800;
  min-height: 46px;
}
.primary {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  box-shadow: 0 10px 24px rgba(11,118,173,.20);
}
.primary:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.secondary {
  color: var(--ink);
  background: #eef5f8;
  border: 1px solid #d7e7ee;
}
.privacy { margin: 18px 0 0; color: #7890a0; font-size: 12px; line-height: 1.5; }
.visual {
  position: relative;
  display: grid;
  place-items: end center;
  min-height: 420px;
  background: linear-gradient(160deg, #0875aa, #1aa6bd 58%, #8fcddd);
  overflow: hidden;
}
.visual::before, .visual::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
}
.visual::before { width: 300px; height: 300px; right: -130px; top: -85px; }
.visual::after { width: 220px; height: 220px; left: -90px; bottom: 20px; background: rgba(217,133,187,.25); }
.visual-ring {
  position: absolute;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  top: 80px;
}
.visual img {
  position: relative;
  z-index: 1;
  width: min(88%, 360px);
  max-height: 470px;
  object-fit: contain;
  filter: drop-shadow(0 20px 26px rgba(0,49,75,.25));
}

.workspace { padding: clamp(24px, 4vw, 48px); }
.workspace-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.progress-wrap { min-width: 220px; text-align: right; color: var(--muted); font-size: 13px; }
.progress {
  height: 8px;
  margin-top: 7px;
  background: #e7f1f5;
  border-radius: 99px;
  overflow: hidden;
}
.progress > div {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  transition: width .2s ease;
}

.question-card { padding: 32px 0 12px; }
.question-number { color: var(--blue); font-weight: 800; font-size: 13px; }
.question-card h3 { margin: 8px 0 22px; font-size: 24px; line-height: 1.35; color: #163f58; }
.choice-list { display: grid; gap: 10px; }
.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 15px;
  background: #fbfdfe;
  border: 1px solid #dce9ef;
  border-radius: 14px;
  cursor: pointer;
  line-height: 1.45;
}
.choice:hover { border-color: #9fd1e3; background: #f7fbfd; }
.choice input { margin-top: 3px; accent-color: var(--blue); }
.case-block { padding: 24px 0; border-bottom: 1px solid var(--line); }
.case-block h3 { margin: 0 0 8px; }
.case-situation { color: var(--muted); line-height: 1.6; margin-bottom: 18px; }
.prompt { margin-top: 16px; }
.prompt label { display: block; font-weight: 700; margin-bottom: 8px; }
textarea {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  border: 1px solid #cfdfe7;
  border-radius: 13px;
  padding: 13px;
  color: var(--ink);
  background: #fff;
}
.task-actions {
  margin-top: 26px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.game-card {
  margin-top: 28px;
  padding: 32px;
  text-align: center;
  border: 1px dashed #9fcfdf;
  background: linear-gradient(180deg, #f9fdff, #eef9fb);
  border-radius: 20px;
}
.game-target {
  display: grid;
  place-items: center;
  width: 130px;
  height: 130px;
  margin: 26px auto;
  border: 0;
  border-radius: 50%;
  color: white;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 18px 40px rgba(11,118,173,.20);
}
.game-stats { display: flex; justify-content: center; gap: 28px; }
.game-stats strong { display: block; font-size: 28px; }
.game-stats span { color: var(--muted); font-size: 12px; }
.result, .error { padding: clamp(30px, 6vw, 64px); text-align: center; }
.result h1, .error h1 { font-size: clamp(30px, 5vw, 48px); }
.result p, .error p { color: var(--muted); font-size: 17px; line-height: 1.6; }
.score {
  width: 132px;
  height: 132px;
  margin: 28px auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eff9fb;
  border: 9px solid #d8eff5;
  font-size: 30px;
  font-weight: 900;
  color: var(--blue);
}
.error { border-color: #f1d4cf; color: var(--danger); }
.hidden { display: none !important; }
footer {
  text-align: center;
  padding: 0 20px 34px;
  color: #8195a2;
  font-size: 12px;
}

@media (max-width: 780px) {
  .secure-badge { display: none; }
  .topbar { min-height: 68px; padding: 10px 16px; }
  .brand img { width: 44px; height: 44px; }
  .page { width: min(100% - 20px, 680px); margin-top: 16px; }
  .intro { grid-template-columns: 1fr; }
  .intro-copy { padding: 30px 24px; }
  .visual { min-height: 260px; order: -1; }
  .visual img { max-height: 260px; width: 230px; }
  .visual-ring { width: 200px; height: 200px; top: 26px; }
  .meta-grid { grid-template-columns: 1fr; }
  .workspace-head { display: grid; }
  .progress-wrap { min-width: 0; width: 100%; text-align: left; }
  .task-actions { position: sticky; bottom: 0; padding: 12px 0; background: rgba(255,255,255,.94); }
  h1 { font-size: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
