:root {
  color-scheme: light;
  font-family: "Ruda", sans-serif;
  color: #17212b;
  background: #4997d0;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-width: 320px;
  min-height: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  background: #4997d0 url("images/guatemala-background.png") center / cover fixed no-repeat;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.app {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px 16px;
}

.quiz-card {
  width: min(100%, 560px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  background: rgba(247, 249, 251, 0.97);
  box-shadow: 0 22px 60px rgba(20, 58, 87, 0.32);
}

.hero {
  display: grid;
  min-height: 280px;
  place-items: center;
  padding: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(225, 241, 252, 0.9));
}

.hero img {
  display: block;
  width: min(100%, 330px);
  max-height: 260px;
  object-fit: contain;
}

.quiz-panel {
  padding: 28px 30px 34px;
}

.eyebrow {
  margin-bottom: 10px;
  color: #397fab;
  font-family: "Encode Sans", sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.question,
.result-title {
  font-size: clamp(22px, 4.8vw, 29px);
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}

.options {
  display: grid;
  gap: 12px;
  margin-top: 25px;
  list-style: none;
}

.option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 13px;
  padding: 15px 18px;
  border: 2px solid transparent;
  border-radius: 18px;
  color: #22313d;
  background: #e8edf1;
  cursor: pointer;
  font-size: 20px;
  font-weight: 700;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.option:hover {
  background: #dceaf3;
  transform: translateY(-1px);
}

.option:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible {
  outline: 4px solid rgba(73, 151, 208, 0.32);
  outline-offset: 3px;
}

.option.is-selected {
  border-color: #4997d0;
  background: #dbeefb;
}

.radio {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  border: 6px solid #9bbfd7;
  border-radius: 50%;
  background: #fff;
}

.option.is-selected .radio {
  border-color: #2d89c7;
}

.progress {
  height: 14px;
  margin-top: 28px;
  overflow: hidden;
  border-radius: 999px;
  background: #d8e0e5;
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4997d0, #73b9e5);
  transition: width 260ms ease;
}

.progress-label {
  display: block;
  margin-top: 8px;
  color: #677681;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.primary-button,
.secondary-button {
  display: grid;
  width: min(100%, 320px);
  min-height: 62px;
  place-items: center;
  margin: 22px auto 0;
  border: 0;
  border-radius: 16px;
  color: #fff;
  cursor: pointer;
  font-family: "Encode Sans", sans-serif;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(32, 97, 142, 0.24);
  transition: filter 160ms ease, transform 160ms ease;
}

.primary-button {
  background: #168b43;
}

.primary-button.telegram {
  background: #2481cc;
}

.secondary-button {
  min-height: 54px;
  margin-top: 12px;
  background: #68757e;
  font-size: 15px;
}

.primary-button:hover,
.secondary-button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.result-copy {
  margin-top: 14px;
  color: #55636d;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
}

.telegram-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
  color: #39454e;
  font-family: "Encode Sans", sans-serif;
  font-weight: 800;
}

.telegram-icon {
  width: 31px;
  height: 31px;
}

@media (max-width: 600px) {
  body {
    background-size: 100% 100%;
  }

  .app {
    align-items: center;
    padding: 8px;
  }

  .quiz-card {
    border-radius: 20px;
  }

  .hero {
    min-height: 220px;
    padding: 14px;
  }

  .hero img {
    width: min(100%, 290px);
    max-height: 210px;
  }

  .quiz-panel {
    padding: 20px 20px 24px;
  }
}

@media (max-width: 400px) and (max-height: 700px) {
  .app {
    padding: 5px;
  }

  .quiz-card {
    border-radius: 17px;
  }

  .hero {
    min-height: 160px;
    padding: 8px 14px;
  }

  .hero img {
    width: min(100%, 245px);
    max-height: 150px;
  }

  .quiz-panel {
    padding: 14px 16px 16px;
  }

  .eyebrow {
    margin-bottom: 6px;
    font-size: 10px;
  }

  .question,
  .result-title {
    font-size: 19px;
    line-height: 1.18;
  }

  .options {
    gap: 8px;
    margin-top: 14px;
  }

  .option {
    gap: 10px;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 17px;
  }

  .radio {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
    border-width: 5px;
  }

  .progress {
    height: 10px;
    margin-top: 15px;
  }

  .progress-label {
    margin-top: 5px;
    font-size: 11px;
  }

  .primary-button,
  .secondary-button {
    min-height: 48px;
    margin-top: 12px;
    border-radius: 13px;
    font-size: 16px;
  }

  .secondary-button {
    min-height: 44px;
    margin-top: 8px;
    font-size: 12px;
  }

  .result-copy {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.35;
  }

  .telegram-note {
    margin-top: 10px;
    font-size: 14px;
  }

  .telegram-icon {
    width: 25px;
    height: 25px;
  }
}

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