html {
  font-size: 14px;
  min-height: 100%;
  position: relative;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  background: #f4f5f7;
  color: #1e2329;
  margin-bottom: 60px;
}

body.public-site {
  background:
    linear-gradient(180deg, #f7f8fb 0%, #eef2f7 48%, #f7f8fb 100%);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body.public-site::before,
body.public-site::after {
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
}

body.public-site::before {
  background-image:
    linear-gradient(112deg, transparent 0 27%, rgba(199, 141, 75, .13) 27% 27.35%, transparent 27.35% 100%),
    linear-gradient(72deg, transparent 0 63%, rgba(64, 104, 212, .065) 63% 63.35%, transparent 63.35% 100%),
    repeating-linear-gradient(0deg, rgba(17, 24, 39, .032) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(17, 24, 39, .024) 0 1px, transparent 1px 34px);
  opacity: .9;
  z-index: 0;
}

body.public-site::after {
  background-image: url("../img/app-icon.png");
  background-position: calc(100% + 120px) 88px;
  background-repeat: no-repeat;
  background-size: min(46vw, 520px) auto;
  filter: grayscale(1) contrast(1.1);
  opacity: .045;
  z-index: 0;
}

body.public-site > header,
body.public-site > .container,
body.public-site > footer {
  position: relative;
  z-index: 1;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.2rem #4068d4;
}

.navbar {
  background: #fff;
  box-shadow: 0 1px 10px rgba(17, 24, 39, .06);
}

.footer-content {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .7rem 1rem;
  justify-content: space-between;
}

.footer-content a {
  color: inherit;
  text-decoration: none;
}

.footer-content a:hover {
  color: #2556ad;
  text-decoration: underline;
}

.brand-icon {
  border-radius: 6px;
  height: 28px;
  margin-right: .45rem;
  width: 28px;
}

.page-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 0 1.25rem;
}

.page-heading h1,
.panel h2 {
  font-size: 1.35rem;
  font-weight: 650;
  margin: 0;
}

.page-heading p,
.muted {
  color: #69717d;
  margin: .35rem 0 0;
}

.panel,
.login-panel,
.summary-card {
  background: #fff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.panel {
  margin-bottom: 1.25rem;
  padding: 1.25rem;
}

.panel h2 {
  margin-bottom: 1rem;
}

.summary-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 1.25rem;
}

.summary-card {
  color: inherit;
  padding: 1rem;
  text-decoration: none;
}

.summary-card span {
  color: #69717d;
  display: block;
  margin-bottom: .4rem;
}

.summary-card strong {
  font-size: 1.7rem;
}

.form-stack,
.form-grid {
  display: grid;
  gap: 1rem;
}

.form-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.form-grid-wide,
.form-actions {
  grid-column: 1 / -1;
}

.login-panel {
  margin: 4rem auto;
  max-width: 420px;
  padding: 1.5rem;
}

.login-logo {
  display: block;
  height: 64px;
  margin-bottom: 1rem;
  width: 64px;
}

.detail-list {
  display: grid;
  gap: .5rem 1rem;
  grid-template-columns: 110px 1fr;
}

.detail-list dt {
  color: #69717d;
  font-weight: 500;
}

code,
.license-code {
  overflow-wrap: anywhere;
}

.license-code {
  display: block;
  font-size: 1.25rem;
  margin-top: .35rem;
}

.status-pill {
  border-radius: 999px;
  display: inline-block;
  font-size: .85rem;
  padding: .2rem .55rem;
}

.status-unused {
  background: #edf3ff;
  color: #2556ad;
}

.status-activated {
  background: #eaf7ee;
  color: #25733d;
}

.status-disabled {
  background: #f6e9ea;
  color: #9b2530;
}

.public-hero {
  align-items: center;
  display: grid;
  gap: 3rem;
  grid-template-columns: minmax(320px, .9fr) minmax(420px, 1.1fr);
  margin: 2rem 0 3.25rem;
  min-height: 390px;
}

.public-hero-copy {
  align-self: center;
  max-width: 520px;
  padding-left: 1.15rem;
  position: relative;
}

.public-hero-copy::before {
  background: #c78d4b;
  border-radius: 999px;
  bottom: .35rem;
  content: "";
  left: 0;
  position: absolute;
  top: .35rem;
  width: 3px;
}

.public-hero h1 {
  color: #151a22;
  font-family: "YouYuan", "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 3.1rem;
  font-weight: 700;
  line-height: 1.16;
  margin: 0 0 .9rem;
  white-space: nowrap;
}

.public-hero p {
  color: #515a67;
  font-size: 1.08rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  max-width: 460px;
}

.hero-today {
  color: #303846;
  font-size: .98rem;
  font-weight: 650;
  margin-bottom: 1.15rem;
}

.public-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
}

.public-actions .btn {
  border-radius: 7px;
  font-weight: 650;
  padding: .62rem 1rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.05rem;
}

.hero-tags span {
  background: #fff;
  border: 1px solid #d9dee7;
  border-radius: 999px;
  color: #5d6673;
  font-size: .86rem;
  font-weight: 600;
  padding: .28rem .68rem;
}

.public-hero-image {
  aspect-ratio: 16 / 9;
  background: #11151c;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  box-shadow: 0 24px 56px rgba(17, 24, 39, .18);
  height: auto;
  object-fit: contain;
  width: 100%;
}

.public-section {
  margin: 2.25rem 0 3rem;
}

.section-heading {
  align-items: end;
  border-top: 1px solid #dfe3ea;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  padding-top: 1.35rem;
}

.section-heading h2,
.public-copy h2,
.download-panel h2 {
  color: #151a22;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.section-heading a {
  font-weight: 650;
  text-decoration: none;
}

.section-heading p {
  color: #69717d;
  margin: .25rem 0 0;
}

.wallpaper-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}

.wallpaper-grid-home {
  gap: 1.35rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wallpaper-grid-wide {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 500px), 1fr));
}

.wallpaper-card {
  background: #fff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, .07);
  overflow: hidden;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.wallpaper-card:hover {
  border-color: #c6ceda;
  box-shadow: 0 18px 40px rgba(17, 24, 39, .11);
  transform: translateY(-2px);
}

.wallpaper-card img {
  aspect-ratio: 16 / 9;
  background: #11151c;
  display: block;
  object-fit: contain;
  width: 100%;
}

.wallpaper-card-body {
  display: grid;
  gap: .35rem;
  padding: 1rem 1.05rem 1.1rem;
}

.wallpaper-card span {
  color: #69717d;
  font-size: .9rem;
}

.wallpaper-card time {
  color: #1c2330;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0;
}

.wallpaper-card h2,
.wallpaper-card h3 {
  color: #1c2330;
  font-size: 1.02rem;
  font-weight: 650;
  line-height: 1.35;
  margin: 0;
  overflow-wrap: anywhere;
}

.public-copy,
.download-panel {
  background: #fff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, .07);
  margin-bottom: 1.25rem;
  padding: 1.75rem;
}

.public-copy {
  color: #394150;
  font-size: 1.02rem;
  line-height: 1.9;
}

.public-copy h2 {
  margin: 1.6rem 0 .55rem;
}

.contact-list {
  display: grid;
  gap: .55rem 1rem;
  grid-template-columns: 64px 1fr;
  margin: 1rem 0 0;
}

.contact-list dt {
  color: #69717d;
  font-weight: 600;
}

.contact-list dd {
  margin: 0;
}

.compact-copy {
  max-width: 760px;
}

.download-panel {
  align-items: center;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
}

.release-notes {
  border-left: 3px solid #4068d4;
  color: #394150;
  margin: 1rem 0 0;
  padding-left: .9rem;
  white-space: pre-line;
}

.test-shell {
  margin: 2rem 0 3rem;
}

.test-intro {
  margin-bottom: 1.25rem;
  max-width: 760px;
}

.test-kicker {
  color: #9a6427;
  font-size: .86rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 .45rem;
}

.test-intro h1 {
  color: #151a22;
  font-size: 2.35rem;
  font-weight: 750;
  line-height: 1.2;
  margin: 0 0 .75rem;
}

.test-intro p {
  color: #515a67;
  font-size: 1.04rem;
  line-height: 1.85;
  margin: 0;
}

.test-mode-panel {
  display: grid;
  gap: .8rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 1.1rem;
  max-width: 860px;
}

.test-mode-card {
  background: #fff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  color: #1e2329;
  display: grid;
  gap: .28rem;
  padding: 1rem;
  text-align: left;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
  width: 100%;
}

.test-mode-card:hover {
  border-color: #b9c4d5;
  box-shadow: 0 12px 26px rgba(17, 24, 39, .08);
  transform: translateY(-1px);
}

.test-mode-card.is-active {
  border-color: #4068d4;
  box-shadow: 0 0 0 3px rgba(64, 104, 212, .14);
}

.test-mode-card strong {
  color: #151a22;
  font-size: 1.02rem;
  line-height: 1.35;
}

.test-mode-card span {
  color: #9a6427;
  font-size: .86rem;
  font-weight: 700;
}

.test-mode-card small {
  color: #69717d;
  font-size: .86rem;
  line-height: 1.55;
}

.test-card,
.test-result-card {
  background: #fff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, .07);
  max-width: 860px;
  padding: 1.75rem;
}

.test-noscript {
  max-width: 760px;
}

.test-progress-row {
  align-items: center;
  color: #69717d;
  display: flex;
  font-size: .9rem;
  font-weight: 700;
  gap: .85rem;
  margin-bottom: 1.35rem;
}

.test-progress-track {
  background: #e8ecf3;
  border-radius: 999px;
  flex: 1;
  height: 8px;
  overflow: hidden;
}

.test-progress-track span {
  background: #4068d4;
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width .18s ease;
  width: 0;
}

.test-question-block {
  margin-bottom: 1.25rem;
}

.test-axis {
  color: #69717d;
  font-size: .92rem;
  font-weight: 700;
  margin: 0 0 .45rem;
}

.test-question-block h2 {
  color: #151a22;
  font-size: 1.55rem;
  font-weight: 720;
  line-height: 1.35;
  margin: 0;
}

.test-options {
  display: grid;
  gap: .85rem;
  margin-bottom: 1.35rem;
}

.test-option {
  align-items: center;
  background: #fff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  color: #1e2329;
  display: grid;
  gap: .9rem;
  grid-template-columns: 44px 1fr;
  min-height: 86px;
  padding: 1rem;
  text-align: left;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
  width: 100%;
}

.test-option:hover {
  border-color: #b9c4d5;
  box-shadow: 0 12px 26px rgba(17, 24, 39, .08);
  transform: translateY(-1px);
}

.test-option.is-selected {
  border-color: #4068d4;
  box-shadow: 0 0 0 3px rgba(64, 104, 212, .14);
}

.test-option-letter {
  align-items: center;
  background: #edf3ff;
  border-radius: 50%;
  color: #2556ad;
  display: inline-flex;
  font-weight: 750;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.test-option-copy {
  font-size: 1.02rem;
  font-weight: 650;
  line-height: 1.55;
}

.test-nav,
.test-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: space-between;
}

.test-nav .btn,
.test-result-actions .btn {
  border-radius: 7px;
  font-weight: 650;
}

.test-result {
  max-width: 860px;
}

.test-result-heading {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-bottom: .9rem;
}

.test-result-heading h2 {
  color: #151a22;
  font-size: 1.85rem;
  font-weight: 750;
  margin: 0;
}

.test-type-code {
  background: #111821;
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-size: 1.2rem;
  font-weight: 800;
  justify-content: center;
  min-width: 86px;
  padding: .55rem .75rem;
}

.test-result-summary {
  color: #394150;
  font-size: 1.04rem;
  line-height: 1.85;
  margin: 0 0 1.1rem;
}

.test-genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.25rem;
}

.test-genre-tags span {
  background: #f4f6fa;
  border: 1px solid #d9dee7;
  border-radius: 999px;
  color: #515a67;
  font-size: .88rem;
  font-weight: 650;
  padding: .32rem .68rem;
}

.test-listen-box {
  border-bottom: 1px solid #dfe3ea;
  border-top: 1px solid #dfe3ea;
  margin-bottom: 1.25rem;
  padding: 1.1rem 0;
}

.test-listen-box h3 {
  color: #151a22;
  font-size: 1.08rem;
  font-weight: 720;
  margin: 0 0 .8rem;
}

.test-listen-box ul {
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.test-listen-box li {
  background: #f4f6fa;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  color: #1c2330;
  font-weight: 700;
  min-height: 48px;
  overflow-wrap: anywhere;
  padding: .72rem .8rem;
}

.test-related-box {
  margin-bottom: 1.25rem;
}

.test-related-box h3 {
  color: #151a22;
  font-size: 1.08rem;
  font-weight: 720;
  margin: 0 0 .8rem;
}

.test-related-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.test-related-card {
  background: #fff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  padding: .85rem;
}

.test-related-card strong {
  color: #1c2330;
  display: block;
  font-size: .98rem;
  line-height: 1.35;
  margin-bottom: .35rem;
  overflow-wrap: anywhere;
}

.test-related-card span {
  color: #69717d;
  font-size: .88rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
  .public-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .public-hero h1 {
    font-size: 2.35rem;
    white-space: normal;
  }

  .wallpaper-grid-home {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .download-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .test-intro h1 {
    font-size: 1.95rem;
  }

  .test-card,
  .test-result-card {
    padding: 1.15rem;
  }

  .test-mode-panel {
    grid-template-columns: 1fr;
  }

  .test-option {
    grid-template-columns: 38px 1fr;
    min-height: 78px;
    padding: .85rem;
  }

  .test-option-letter {
    height: 36px;
    width: 36px;
  }

  .test-question-block h2,
  .test-result-heading h2 {
    font-size: 1.35rem;
  }

  .test-listen-box ul,
  .test-related-grid {
    grid-template-columns: 1fr;
  }

  .test-nav,
  .test-result-actions {
    flex-direction: column;
  }
}

/* Download platform cards */
.download-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  margin-bottom: 1.25rem;
}

.download-panel {
  align-items: center;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
}

.download-card {
  align-items: stretch;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
}

.download-card-actions {
  margin-top: 1.25rem;
}

.download-card-actions .btn {
  width: 100%;
}
