@import url(https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap);

:root {
  --sky: #92ccf7;          /* exact background colour of the heart images */
  --sky-soft: #d9edfc;
  --sky-pale: #f1f8fe;
  --blue: #0b57a4;
  --blue-dark: #083f78;
  --ink: #16243a;
  --ink-soft: #4a5a72;
  --line: #d6e6f4;
  --white: #ffffff;
  --green: #2f9e4f;
  --green-soft: #e3f6e8;
  --red: #e0344a;
  --red-soft: #fde6e9;
  --amber: #e5a100;
  --amber-soft: #fff4d6;
  --radius-xl: 32px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow: 0 24px 60px rgba(11, 87, 164, 0.16);
  --shadow-sm: 0 6px 18px rgba(11, 87, 164, 0.10);
}

* { box-sizing: border-box; }

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

body {
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky) 0%, var(--sky-soft) 55%, var(--sky-pale) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

[ng-cloak] { display: none !important; }

a { color: var(--blue); }

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 40px;
}

/* ---------- brand bar ---------- */
.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  color: var(--blue-dark);
}
.brand__logo {
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--blue-dark);
}
.brand__tag {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-dark);
  opacity: 0.8;
}

/* ---------- card ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 560px;
  transition: min-height .3s ease;
}
.card--end { display: block; }

/* ---------- left panel ---------- */
.panel-left {
  position: relative;
  background: var(--sky);
  min-height: 320px;
}
.panel-left__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 100% 50%;
  display: block;
}
.panel-left--text {
  background: var(--sky-pale);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

/* ---------- right panel ---------- */
.panel-right {
  padding: 36px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ---------- progress ---------- */
.progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.progress__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.progress__steps { display: flex; gap: 8px; }
.progress__step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--white);
  transition: all .25s ease;
}
.progress__step.is-active {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 0 0 5px rgba(11, 87, 164, 0.15);
}
.progress__step.is-done {
  border-color: var(--blue);
  color: var(--blue);
}

/* ---------- content ---------- */
.content { flex: 1; display: flex; flex-direction: column; gap: 16px; }

.title {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
.title--sm { font-size: 24px; }

.lead { margin: 0; font-size: 16px; color: var(--ink-soft); }
.lead + .lead { margin-top: 4px; }

.hint {
  font-size: 14px;
  color: var(--ink-soft);
  margin: -6px 0 0;
}

/* ---------- options ---------- */
.options { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 16px 12px 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s, box-shadow .2s;
}
.option:hover { border-color: var(--sky); background: var(--sky-pale); }
.option:focus-visible { outline: 3px solid rgba(11, 87, 164, .35); outline-offset: 2px; }
.option:active { transform: scale(.99); }

.option__letter {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--sky-soft);
  color: var(--blue-dark);
  font-weight: 800;
  transition: all .2s;
}
.option__text { flex: 1; }
.option__mark {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  transition: all .2s;
}
.option__mark svg { width: 12px; height: 12px; display: none; }

.option.is-selected {
  border-color: var(--blue);
  background: var(--sky-pale);
  box-shadow: var(--shadow-sm);
}
.option.is-selected .option__letter { background: var(--blue); color: var(--white); }
.option.is-selected .option__mark { border-color: var(--blue); background: var(--blue); }
.option.is-selected .option__mark svg { display: block; color: var(--white); }

/* answer state */
.option.is-review { cursor: default; }
.option.is-review:hover { background: var(--white); border-color: var(--line); }
.option.is-review.is-correct { border-color: var(--green); background: var(--green-soft); }
.option.is-review.is-correct .option__letter { background: var(--green); color: var(--white); }
.option.is-review.is-wrong { border-color: var(--red); background: var(--red-soft); }
.option.is-review.is-wrong .option__letter { background: var(--red); color: var(--white); }
.option.is-review .option__mark { border-color: transparent; background: transparent; }
.option.is-review.is-picked .option__mark { border-color: var(--ink-soft); }
.option.is-review.is-picked .option__mark svg { display: block; color: var(--ink-soft); }
.option__you {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- buttons ---------- */
.actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px 10px 10px;
  border-radius: 999px;
  border: 2px solid var(--blue);
  background: var(--blue);
  color: var(--white);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s, opacity .2s;
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid rgba(11, 87, 164, .35); outline-offset: 2px; }
.btn__icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: grid;
  place-items: center;
}
.btn__icon svg { width: 16px; height: 16px; }

.btn--ghost { background: var(--white); color: var(--blue); }
.btn--ghost:hover { background: var(--sky-pale); border-color: var(--blue); }
.btn--ghost .btn__icon { background: var(--sky-soft); }

.btn--light { background: var(--white); border-color: var(--white); color: var(--green); }
.btn--light:hover { background: var(--green-soft); border-color: var(--green-soft); }
.btn--light .btn__icon { background: var(--green-soft); }

/* ---------- result (answer) panel ---------- */
.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  width: fit-content;
}
.result-badge__dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.result-badge__dot svg { width: 12px; height: 12px; color: var(--white); }
.result-badge.is-correct { background: var(--green-soft); color: var(--green); }
.result-badge.is-correct .result-badge__dot { background: var(--green); }
.result-badge.is-partial { background: var(--amber-soft); color: #8a6100; }
.result-badge.is-partial .result-badge__dot { background: var(--amber); }
.result-badge.is-wrong { background: var(--red-soft); color: var(--red); }
.result-badge.is-wrong .result-badge__dot { background: var(--red); }

.explain { display: flex; flex-direction: column; gap: 14px; }
.explain p { margin: 0; font-size: 15px; color: var(--ink-soft); }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--white);
  border: 1.5px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.list li {
  position: relative;
  padding-left: 22px;
  font-size: 15px;
  color: var(--ink-soft);
}
.list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
}

.sources { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sources__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-right: 4px;
}
.sources a {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--blue);
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.sources a:hover { background: var(--blue); color: var(--white); }

/* ---------- ending ---------- */
.end-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 32px 40px;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  color: var(--white);
}
.score { display: flex; align-items: baseline; gap: 10px; font-size: 20px; font-weight: 600; }
.score__num {
  font-size: 56px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.end-top .btn--ghost { border-color: var(--white); }

.end-mid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 32px;
  padding: 36px 40px;
}
.end-mid .explain p { font-size: 15px; }

.product {
  background: var(--sky-pale);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.product img { max-height: 200px; width: auto; }
.product p { margin: 0; font-weight: 700; }

.share { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.share p { margin: 0; font-weight: 600; color: var(--ink-soft); }
.share__buttons { display: flex; flex-wrap: wrap; gap: 10px; }

.legal {
  margin: 0 40px 40px;
  background: var(--green);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
}
.legal h3 { margin: 0 0 12px; font-size: 20px; font-weight: 800; }
.legal p { margin: 0 0 20px; font-size: 14px; line-height: 1.6; }
.legal__plus { width: 120px; height: 120px; }

/* ---------- footer ---------- */
.footer {
  margin-top: 20px;
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--ink-soft);
  position: relative;
}
.footer a { font-weight: 700; }
.footer__link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--blue);
  text-decoration: underline;
  cursor: pointer;
}
.footer__info {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--blue);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}
.footer__info:hover { background: var(--blue); color: var(--white); }

/* ---------- legal popup ---------- */
.popup {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  width: min(560px, 100%);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px 28px 28px;
  color: var(--ink);
  z-index: 10;
}
.popup h3 { margin: 0 0 10px; font-size: 18px; font-weight: 800; color: var(--blue-dark); }
.popup p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-soft); }
.popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 0;
  background: var(--sky-soft);
  color: var(--blue-dark);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

/* ---------- transitions ---------- */
.fade { animation: fadeIn .35s ease both; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .card { grid-template-columns: 1fr; min-height: 0; }
  .panel-left { min-height: 260px; }
  .panel-left--text { order: 2; padding: 28px 24px; }
  .panel-right { padding: 28px 24px 32px; }
  .title { font-size: 26px; }
  .end-mid { grid-template-columns: 1fr; padding: 28px 24px; }
  .end-top { padding: 24px; }
  .legal { grid-template-columns: 1fr; margin: 0 24px 24px; padding: 24px; }
  .legal__plus { width: 80px; height: 80px; justify-self: center; }
  .popup { bottom: auto; top: calc(100% + 10px); }
}
@media (max-width: 480px) {
  .page { padding: 16px 12px 24px; }
  .card { border-radius: 22px; }
  .progress { flex-direction: column; align-items: flex-start; gap: 10px; }
  .score__num { font-size: 44px; }
}
.load-error { text-align:center; font-weight:600; color:var(--red); }
