@font-face {
  font-family: "Unifix SP";
  src: url("fonts/UnifixSP.otf") format("opentype");
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #101738;
  --blue: #123b9d;
  --blue-deep: #09256f;
  --blue-soft: #dce7ff;
  --pink: #f2b4ef;
  --pink-strong: #e951c8;
  --paper: #f5f7ff;
  --white: #ffffff;
  --muted: #626b87;
  --line: rgba(16, 23, 56, 0.16);
  --display: "Unifix SP", "Montserrat", sans-serif;
  --body: "Montserrat", Arial, sans-serif;
  --maxw: 1160px;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
}

body {
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid var(--pink-strong);
  outline-offset: 3px;
}

.app {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--paper);
}

.app::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  content: "";
  background-image: url("quiz/hero-city.webp");
  background-position: center;
  background-size: cover;
  opacity: 0.1;
  pointer-events: none;
}

.app::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  content: "";
  background: rgba(245, 247, 255, 0.88);
  pointer-events: none;
}

.app[data-screen="welcome"] {
  background-color: var(--blue-deep);
}

.app[data-screen="welcome"]::before {
  opacity: 1;
}

.app[data-screen="welcome"]::after {
  background: rgba(6, 24, 84, 0.46);
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 48px), var(--maxw));
  min-height: 72px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(16, 23, 56, 0.12);
}

.brand {
  display: flex;
  align-items: center;
}

.b-title {
  font-size: 15px;
  font-weight: 700;
}

.b-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.date-badge {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--blue-deep);
  background: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  font-weight: 600;
}

.app[data-screen="welcome"] .topbar {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--white);
}

.app[data-screen="welcome"] .b-sub {
  color: rgba(255, 255, 255, 0.7);
}

.app[data-screen="welcome"] .date-badge {
  border-color: rgba(255, 255, 255, 0.34);
  color: var(--white);
  background: rgba(10, 32, 105, 0.38);
  backdrop-filter: blur(12px);
}

.stage {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(calc(100% - 48px), var(--maxw));
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: 36px 0 56px;
}

#screen,
.screen {
  width: 100%;
}

.screen {
  animation: screen-in 280ms ease both;
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.welcome {
  width: min(650px, 62vw);
  color: var(--white);
}

.kicker {
  display: inline-block;
  margin-bottom: 22px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 5px;
  background: rgba(10, 32, 105, 0.34);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.hero-title {
  max-width: 720px;
  margin-bottom: 20px;
  font-family: var(--display);
  font-size: clamp(46px, 6.2vw, 78px);
  line-height: 1.04;
}

.grad {
  color: var(--pink);
}

.lead {
  max-width: 570px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 16px;
  line-height: 1.55;
}

.welcome-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

.welcome-stats span {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.welcome-stats b {
  color: var(--white);
  font-size: 18px;
}

.btn-grad,
.btn-ghost,
.submit,
.restart-row button {
  min-height: 48px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.btn-grad {
  padding: 13px 24px;
  border: 1px solid var(--pink);
  color: var(--blue-deep);
  background: var(--pink);
}

.btn-grad:hover:not(:disabled) {
  transform: translateY(-2px);
  background: #f8c9f5;
}

.btn-grad:disabled {
  border-color: rgba(16, 23, 56, 0.1);
  color: #9aa1b6;
  background: #e8ebf4;
  cursor: not-allowed;
}

.btn-ghost {
  padding: 12px 22px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
}

.btn-ghost:hover {
  border-color: rgba(18, 59, 157, 0.38);
  background: var(--white);
}

.welcome-note {
  margin-top: 13px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 11px;
}

.q-wrap {
  width: min(100%, 930px);
  margin: 0 auto;
}

.q-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.q-top .acc {
  color: var(--blue);
}

.progress {
  height: 4px;
  margin-bottom: 26px;
  overflow: hidden;
  background: rgba(18, 59, 157, 0.14);
}

.progress > i {
  display: block;
  height: 100%;
  background: var(--pink-strong);
  transition: width 280ms ease;
}

.q-head {
  margin-bottom: 24px;
}

.q-title {
  max-width: 740px;
  margin-bottom: 8px;
  font-family: var(--display);
  font-size: clamp(34px, 4.2vw, 52px);
  line-height: 1;
}

.q-sub {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.opt {
  position: relative;
  display: grid;
  grid-template-columns: 43% minmax(0, 1fr);
  width: 100%;
  min-height: 146px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(16, 23, 56, 0.14);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.opt:hover {
  transform: translateY(-2px);
  border-color: rgba(18, 59, 157, 0.42);
  box-shadow: 0 12px 26px rgba(18, 59, 157, 0.1);
}

.opt.selected {
  border: 2px solid var(--pink-strong);
  box-shadow: 0 14px 30px rgba(233, 81, 200, 0.16);
}

.option-media {
  min-width: 0;
  overflow: hidden;
  background: var(--blue-soft);
}

.option-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.opt:hover .option-media img,
.opt.selected .option-media img {
  transform: scale(1.035);
}

.option-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  padding: 18px;
}

.option-index {
  margin-bottom: auto;
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
}

.opt .label {
  max-width: 100%;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}

.criterion-persona .opt {
  min-height: 174px;
  grid-template-columns: 36% minmax(0, 1fr);
}

.criterion-persona .opt .label,
.criterion-relief .opt .label,
.criterion-creation .opt .label {
  font-size: 14px;
  line-height: 1.35;
}

.text-cards .opt {
  min-height: 132px;
  grid-template-columns: 1fr;
}

.text-cards .option-copy {
  justify-content: flex-start;
  padding: 22px;
}

.text-cards .option-index {
  margin-bottom: 24px;
}

.text-cards .opt .label {
  max-width: 330px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.05;
}

.opt .check {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 7px;
  border-radius: 5px;
  color: var(--blue-deep);
  background: var(--pink);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.q-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.calc {
  width: min(100%, 540px);
  margin: 0 auto;
  text-align: center;
}

.ring {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  border: 4px solid rgba(18, 59, 157, 0.14);
  border-top-color: var(--pink-strong);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.calc h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 400;
}

.calc p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.result {
  width: min(100%, 930px);
  margin: 0 auto;
}

.result .hero {
  position: relative;
  min-height: 290px;
  margin-bottom: 26px;
  padding: 34px;
  overflow: hidden;
  border-radius: 8px;
  color: var(--white);
  background-color: var(--blue-deep);
  background-image: url("quiz/hero-city.webp");
  background-position: center;
  background-size: cover;
}

.result .hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(7, 27, 91, 0.66);
}

.result .hero > * {
  position: relative;
  z-index: 1;
  max-width: 650px;
}

.glow {
  display: none;
}

.h-kicker {
  margin-bottom: 14px;
  color: var(--pink);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.arch-title {
  margin-bottom: 12px;
  font-family: var(--display);
  font-size: clamp(40px, 5vw, 60px);
  line-height: 0.98;
}

.arch-tag {
  margin-bottom: 12px;
  font-size: 17px;
  font-weight: 600;
}

.arch-desc {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.55;
}

.sec-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0 12px;
}

.sec-row .lbl {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.sec-row .line {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.route {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
}

.route .project-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 240px;
  padding: 9px 11px;
  border: 1px solid rgba(18, 59, 157, 0.18);
  border-radius: 6px;
  color: var(--blue-deep);
  background: var(--white);
  font-size: 13px;
  font-weight: 700;
}

.route .project-pill.first {
  border-color: var(--pink);
  background: var(--pink);
}

.route .project-pill small {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 9px;
}

.route .hint {
  flex: 1 1 280px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.match-note {
  margin: -3px 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.jk-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.jk {
  position: relative;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
}

.jk.favorite {
  border-color: rgba(226, 61, 180, 0.7);
  box-shadow: 0 0 0 1px rgba(226, 61, 180, 0.12);
}

.favorite-badge {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 7px;
  border-radius: 4px;
  color: var(--blue-deep);
  background: var(--pink);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.jk .row1 {
  min-height: 54px;
}

.jk .name {
  font-family: var(--display);
  font-size: 24px;
  line-height: 1.05;
}

.jk .name-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 9px;
  align-items: baseline;
}

.jk .district {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
}

.jk .meta {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 18px 0 14px;
}

.match .bar {
  height: 5px;
  overflow: hidden;
  background: var(--blue-soft);
}

.match .bar i {
  display: block;
  height: 100%;
  background: var(--pink-strong);
}

.match .pct {
  font-weight: 700;
}

.match-reasons {
  display: grid;
  gap: 8px;
  min-height: 116px;
  padding: 13px;
  border: 1px solid rgba(18, 59, 157, 0.12);
  border-radius: 6px;
  background: rgba(237, 242, 255, 0.72);
}

.match-reasons-title {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.match-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  color: var(--blue-deep);
  font-size: 11px;
  line-height: 1.35;
}

.match-check {
  display: inline-grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: #16845b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.jk .foot {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.jk .price {
  font-weight: 700;
}

.map-link {
  color: var(--blue);
  font-weight: 600;
}

.country-opportunity {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  min-height: 390px;
  overflow: hidden;
  border: 1px solid rgba(18, 59, 157, 0.2);
  border-radius: 8px;
  background: #eef4ea;
}

.country-photo {
  min-height: 100%;
  overflow: hidden;
}

.country-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.country-copy {
  padding: 30px;
}

.country-kicker {
  margin-bottom: 9px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.country-copy h3 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: 38px;
  font-weight: 400;
  line-height: 1;
}

.country-lead {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.country-benefits {
  display: grid;
  gap: 11px;
  margin: 20px 0 22px;
}

.country-benefit {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.country-benefit strong,
.country-benefit small {
  display: block;
}

.country-benefit strong {
  margin-bottom: 3px;
  color: var(--blue-deep);
  font-size: 12px;
}

.country-benefit small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.country-check {
  display: inline-grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: #16845b;
  font-size: 12px;
  font-weight: 700;
}

.country-cta {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border: 1px solid var(--blue);
  border-radius: 6px;
  color: var(--white);
  background: var(--blue);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.country-cta:hover {
  background: var(--blue-deep);
}

.restart-row {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.restart-row button {
  padding: 11px 18px;
  border: 1px solid var(--line);
  color: var(--blue);
  background: rgba(255, 255, 255, 0.7);
}

.lead-card {
  margin-top: 24px;
  padding: 24px;
  border-radius: 8px;
  color: var(--white);
  background: var(--blue-deep);
}

.lead-card .lt {
  font-family: var(--display);
  font-size: 30px;
}

.lead-card .ls {
  max-width: 620px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.5;
}

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.fields input {
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.fields input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.submit-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}

.submit {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  color: var(--blue-deep);
  background: var(--pink);
}

.qr-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qr-cap {
  max-width: 170px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 10px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 20;
  padding: 11px 15px;
  border-radius: 6px;
  color: var(--white);
  background: var(--blue-deep);
  font-size: 12px;
  transform: translateX(-50%);
}

@media (max-width: 760px) {
  .topbar,
  .stage {
    width: min(calc(100% - 28px), var(--maxw));
  }

  .topbar {
    min-height: 64px;
  }

  .b-title {
    font-size: 13px;
  }

  .b-sub {
    max-width: 150px;
    font-size: 8px;
  }

  .date-badge {
    padding: 7px 8px;
    font-size: 10px;
  }

  .stage {
    align-items: flex-start;
    min-height: calc(100vh - 64px);
    padding: 24px 0 34px;
  }

  .app[data-screen="welcome"] .stage {
    align-items: center;
    padding-top: 12px;
  }

  .welcome {
    width: 100%;
    padding: 20px 0 30px;
  }

  .kicker {
    margin-bottom: 18px;
    font-size: 9px;
  }

  .hero-title {
    max-width: 350px;
    font-size: 46px;
    line-height: 1.08;
  }

  .lead {
    max-width: 350px;
    font-size: 14px;
  }

  .welcome-stats {
    margin-bottom: 22px;
  }

  .q-head {
    margin-bottom: 18px;
  }

  .q-title {
    font-size: 36px;
  }

  .q-sub {
    font-size: 12px;
  }

  .cards {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .opt {
    min-height: 104px;
    grid-template-columns: 38% minmax(0, 1fr);
  }

  .option-copy {
    padding: 13px;
  }

  .opt .label {
    font-size: 14px;
  }

  .criterion-persona .opt {
    min-height: 124px;
    grid-template-columns: 34% minmax(0, 1fr);
  }

  .criterion-persona .opt .label,
  .criterion-relief .opt .label,
  .criterion-creation .opt .label {
    font-size: 13px;
  }

  .text-cards .opt {
    min-height: 112px;
    grid-template-columns: 1fr;
  }

  .text-cards .option-copy {
    padding: 17px;
  }

  .text-cards .option-index {
    margin-bottom: 18px;
  }

  .text-cards .opt .label {
    font-size: 22px;
  }

  .q-foot {
    position: sticky;
    bottom: 0;
    z-index: 4;
    margin: 14px -14px -34px;
    padding: 12px 14px 16px;
    background: rgba(245, 247, 255, 0.94);
    backdrop-filter: blur(14px);
  }

  .q-foot .btn-ghost,
  .q-foot .btn-grad {
    flex: 1;
  }

  .result .hero {
    min-height: 340px;
    padding: 24px;
  }

  .arch-title {
    font-size: 44px;
  }

  .jk-list {
    grid-template-columns: 1fr;
  }

  .country-opportunity {
    grid-template-columns: 1fr;
  }

  .country-photo {
    min-height: 220px;
    aspect-ratio: 16 / 9;
  }

  .country-copy {
    padding: 22px;
  }

  .country-copy h3 {
    font-size: 32px;
  }

  .country-cta {
    width: 100%;
  }

  .jk .name {
    font-size: 23px;
  }

  .fields {
    grid-template-columns: 1fr;
  }

  .submit-row,
  .qr-wrap {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 390px) {
  .hero-title {
    font-size: 41px;
  }

  .arch-title {
    font-size: 36px;
    line-height: 1.02;
  }

  .q-title {
    font-size: 32px;
  }

  .opt {
    min-height: 98px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
