:root {
  --bg: #f7f8fb;
  --paper: #ffffff;
  --ink: #151515;
  --muted: #666a73;
  --line: #dfe3ea;
  --red: #ef3f32;
  --yellow: #ffd84d;
  --green: #24a148;
  --cyan: #00a6d6;
  --black: #0f0f10;
  --shadow: 0 18px 60px rgba(15, 15, 16, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(15, 15, 16, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(15, 15, 16, 0.04) 1px, transparent 1px),
    var(--bg);
  background-size: 34px 34px;
  font-family:
    "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 14px 28px;
  border-bottom: 2px solid var(--black);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.shop-mark {
  margin-right: auto;
  padding: 5px 10px;
  border: 2px solid var(--black);
  border-radius: 999px;
  color: var(--black);
  background: var(--yellow);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 900;
}

.logo span {
  display: inline-grid;
  place-items: center;
  min-width: 62px;
  min-height: 38px;
  border: 2px solid var(--black);
  border-radius: var(--radius);
  color: white;
  background: var(--black);
}

.logo strong {
  font-size: 18px;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-weight: 700;
}

.topbar nav a:hover {
  color: var(--red);
}

main {
  width: min(calc(100% - 36px), 1180px);
  margin: 0 auto;
}

.test-stage {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.15fr) 180px;
  gap: 24px;
  align-items: stretch;
  min-height: calc(100vh - 74px);
  padding: 42px 0;
}

.intro,
.tester,
.result,
.type-wall,
.faq,
footer {
  min-width: 0;
  border: 2px solid var(--black);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px;
  background:
    linear-gradient(135deg, rgba(255, 216, 77, 0.34), transparent 44%),
    var(--paper);
}

.tag {
  display: inline-flex;
  width: max-content;
  margin: 0 0 16px;
  padding: 5px 10px;
  border: 2px solid var(--black);
  border-radius: 999px;
  color: var(--black);
  background: var(--yellow);
  font-size: 13px;
  font-weight: 900;
}

h1,
h2,
h3,
p {
  margin: 0;
  overflow-wrap: anywhere;
}

h1 {
  font-size: 50px;
  line-height: 1.02;
}

h2 {
  font-size: 34px;
  line-height: 1.16;
}

h3 {
  font-size: 20px;
  line-height: 1.25;
}

.intro > p {
  margin-top: 20px;
  color: var(--muted);
  font-size: 18px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 32px;
}

.metrics div {
  min-height: 92px;
  display: grid;
  place-items: center;
  border: 2px solid var(--black);
  border-radius: var(--radius);
  background: white;
}

.metrics strong {
  font-size: 34px;
  line-height: 1;
}

.metrics span {
  color: var(--muted);
  font-weight: 700;
}

.tester {
  display: flex;
  flex-direction: column;
  min-height: 620px;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(0, 166, 214, 0.1), transparent 28%),
    white;
}

.tester__top,
.tester__controls,
.result__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.tester__top {
  color: var(--muted);
  font-weight: 900;
}

.progress {
  height: 14px;
  margin: 18px 0 28px;
  overflow: hidden;
  border: 2px solid var(--black);
  border-radius: 999px;
  background: white;
}

.progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--cyan), var(--red));
  transition: width 200ms ease;
}

.question-kicker {
  margin-bottom: 10px;
  color: var(--red);
  font-weight: 900;
}

.tester h2 {
  min-height: 126px;
}

.answers {
  display: grid;
  gap: 14px;
  margin: 26px 0;
}

.answer,
.tester__controls button,
.result__actions button,
.primary {
  min-height: 52px;
  padding: 12px 16px;
  border: 2px solid var(--black);
  border-radius: var(--radius);
  color: var(--ink);
  background: white;
  font-weight: 900;
  text-align: left;
  transition:
    transform 140ms ease,
    background 140ms ease;
}

.answer:hover,
.tester__controls button:hover,
.result__actions button:hover {
  transform: translateY(-2px);
  background: #f1f5ff;
}

.answer.is-selected {
  color: white;
  background: var(--black);
}

.answer--start,
.primary {
  color: white;
  background: var(--red);
}

.tester__controls {
  margin-top: auto;
}

.tester__controls button[disabled] {
  cursor: not-allowed;
  opacity: 0.45;
}

.tester__hint {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.poster-strip {
  display: grid;
  gap: 24px;
  align-content: center;
}

.poster-strip img {
  aspect-ratio: 1 / 1;
  height: auto;
  border: 2px solid var(--black);
  border-radius: var(--radius);
  object-fit: cover;
  object-position: center;
  background: #222;
  box-shadow: var(--shadow);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
  cursor: pointer;
  position: relative;
}

.poster-strip img:nth-child(1) {
  transform: rotate(-3deg);
}

.poster-strip img:nth-child(2) {
  transform: rotate(4deg);
}

.poster-strip img:nth-child(3) {
  transform: rotate(-2deg);
}

.poster-strip img:hover {
  transform: scale(1.1) rotate(0deg);
  box-shadow: 0 24px 60px rgba(15, 15, 16, 0.2);
  z-index: 10;
}

.result {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 28px;
  margin: 28px 0 42px;
  padding: 28px;
}

.result[hidden] {
  display: none;
}

.result__poster img {
  aspect-ratio: 1 / 1;
  height: auto;
  border: 2px solid var(--black);
  border-radius: var(--radius);
  object-fit: cover;
  object-position: center;
  background: #222;
}

.match {
  margin: 12px 0 18px;
  color: var(--red);
  font-weight: 900;
}

.result__copy > p:not(.tag):not(.match):not(.copy-note) {
  color: var(--muted);
  font-size: 18px;
}

.result__actions {
  justify-content: flex-start;
  margin-top: 22px;
}

.copy-note {
  min-height: 24px;
  margin-top: 10px;
  color: var(--green);
  font-weight: 700;
}

.dimensions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.dim {
  padding: 14px;
  border: 2px solid var(--black);
  border-radius: var(--radius);
  background: #fbfcff;
}

.dim__row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  font-weight: 900;
}

.dim__bar {
  height: 10px;
  overflow: hidden;
  border: 2px solid var(--black);
  border-radius: 999px;
  background: white;
}

.dim__bar span {
  display: block;
  height: 100%;
  background: var(--green);
}

.type-wall,
.faq {
  margin: 42px 0;
  padding: 28px;
}

.section-head {
  max-width: 760px;
  margin-bottom: 24px;
}

.section-head p:not(.tag) {
  margin-top: 14px;
  color: var(--muted);
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.type-card {
  overflow: hidden;
  border: 2px solid var(--black);
  border-radius: var(--radius);
  background: white;
}

.type-card img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 15%;
  background: #222;
}

.type-card div {
  padding: 12px;
}

.type-card p {
  color: var(--muted);
  font-size: 14px;
}

.faq {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
}

.faq-list {
  display: grid;
  gap: 12px;
}

details {
  padding: 16px;
  border: 2px solid var(--black);
  border-radius: var(--radius);
  background: white;
}

summary {
  cursor: pointer;
  font-weight: 900;
}

details p {
  margin-top: 10px;
  color: var(--muted);
}

footer {
  width: min(calc(100% - 36px), 1180px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 42px auto;
  padding: 20px 24px;
  color: var(--muted);
}

footer a {
  flex: 0 0 auto;
  color: var(--red);
  font-weight: 900;
}

.footer-links {
  display: grid;
  justify-items: end;
  gap: 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

@media (max-width: 1060px) {
  .test-stage {
    grid-template-columns: 1fr;
  }

  .poster-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .poster-strip img {
    height: auto;
  }

  .poster-strip img:nth-child(n) {
    transform: none;
  }

  .poster-strip img:hover {
    transform: none;
    box-shadow: var(--shadow);
    z-index: auto;
  }

  .type-grid,
  .dimensions {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 16px;
  }

  .shop-mark {
    margin-right: 0;
  }

  .topbar nav {
    width: 100%;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 4px;
    white-space: nowrap;
  }

  main,
  footer {
    width: min(calc(100% - 24px), 1180px);
  }

  .test-stage {
    min-height: auto;
    padding: 20px 0;
  }

  .intro,
  .tester,
  .result,
  .type-wall,
  .faq {
    padding: 20px;
  }

  h1 {
    font-size: 34px;
    word-break: break-all;
  }

  h2 {
    font-size: 28px;
  }

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

  .tester {
    min-height: 560px;
  }

  .tester h2 {
    min-height: 148px;
  }

  .result,
  .faq,
  .dimensions {
    grid-template-columns: 1fr;
  }

  .poster-strip {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .type-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .poster-strip img {
    height: auto;
  }

  .result__poster img {
    height: auto;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-items: start;
  }
}
