:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: #e7effd;
  color: #252525;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: #e7effd;
}

button,
input {
  font: inherit;
}

.page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
}

.rating-card {
  width: 374px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 12px 28px rgb(65 112 190 / 14%);
}

.entry-card {
  min-height: 308px;
  padding: 43px 21px 44px;
}

.entry-card h1 {
  margin: 0 0 25px;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 700;
  text-align: center;
}

.progress-card {
  width: 420px;
  height: 420px;
  padding: 51px 30px 40px;
  text-align: center;
}

.progress-card[hidden] {
  display: none;
}

.progress-card h2,
.result-card h2 {
  margin: 0;
  color: #303030;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 400;
}

.progress-card p,
.result-card p {
  margin: 9px 0 0;
  color: #777;
  font-size: 16px;
  line-height: 1.5;
}

.result-card {
  width: 420px;
  height: 475px;
  padding: 50px 24px 50px;
  text-align: center;
}

.result-card[hidden] {
  display: none;
}

.result-card p {
  margin-top: 9px;
}

.grade-ring {
  display: grid;
  place-items: center;
  width: 180px;
  height: 180px;
  margin: 38px auto 0;
  border: 6px solid #e7eefb;
  border-radius: 50%;
}

.grade-ring strong {
  color: #2465dc;
  font-size: 64px;
  line-height: 1;
  font-weight: 700;
}

.next-button {
  width: 342px;
  height: 55px;
  margin-top: 45px;
  color: #fff;
  font-size: 18px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(100deg, #1f5bd8 0%, #367ff0 100%);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.next-button:hover {
  filter: brightness(1.04);
  box-shadow: 0 7px 16px rgb(32 100 220 / 22%);
}

.next-button:active {
  transform: translateY(1px);
}

.next-button:focus-visible {
  outline: 3px solid rgb(47 124 243 / 28%);
  outline-offset: 3px;
}

.progress-ring {
  position: relative;
  width: 184px;
  height: 184px;
  margin: 38px auto 0;
}

.progress-ring svg {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-45deg);
}

.progress-ring circle {
  fill: none;
  stroke-width: 6px;
}

.progress-ring__track {
  stroke: #e7eefb;
}

.progress-ring__value {
  stroke: #2766db;
  stroke-linecap: butt;
  stroke-dasharray: 540.35;
  stroke-dashoffset: 534.95;
}

.progress-ring__number {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #2465dc;
  font-size: 60px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 1px;
}

.rating-form {
  display: grid;
  gap: 17px;
}

.rating-form input {
  width: 100%;
  height: 45px;
  padding: 0 14px;
  color: #333;
  font-size: 15px;
  background: #fff;
  border: 1px solid #dce4f1;
  border-radius: 11px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.rating-form input::placeholder {
  color: #979797;
  opacity: 1;
}

.rating-form input:focus {
  border-color: #2f7cf3;
  box-shadow: 0 0 0 3px rgb(47 124 243 / 12%);
}

.rating-form button {
  width: 100%;
  height: 47px;
  margin-top: 0;
  color: #fff;
  font-size: 17px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(100deg, #1f5bd8 0%, #367ff0 100%);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.rating-form button:hover {
  filter: brightness(1.04);
  box-shadow: 0 7px 16px rgb(32 100 220 / 22%);
}

.rating-form button:active {
  transform: translateY(1px);
}

.rating-form button:focus-visible {
  outline: 3px solid rgb(47 124 243 / 28%);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 430px) {
  .page {
    padding: 24px 16px;
  }

  .rating-card {
    width: 100%;
  }

  .progress-card {
    height: min(420px, calc(100vw - 32px));
    min-height: 360px;
  }

  .result-card {
    height: 475px;
  }

  .next-button {
    width: 100%;
  }
}
