:root {
  color-scheme: light;
  --ink: #17201d;
  --muted: #69736f;
  --paper: #f7f3ec;
  --panel: #fffdf8;
  --line: rgba(23, 32, 29, 0.14);
  --teal: #187778;
  --teal-dark: #0e5252;
  --coral: #d95d45;
  --gold: #b88739;
  --shadow: 0 24px 70px rgba(23, 32, 29, 0.16);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    linear-gradient(135deg, rgba(24, 119, 120, 0.12), transparent 36%),
    linear-gradient(315deg, rgba(217, 93, 69, 0.12), transparent 34%),
    var(--paper);
}

button {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.56fr);
  gap: 22px;
  min-height: 100vh;
  padding: 22px;
}

.test-surface,
.visual-panel {
  min-width: 0;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.test-surface {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.88);
  backdrop-filter: blur(18px);
  padding: clamp(22px, 4vw, 52px);
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow,
.question-kicker {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(2rem, 6vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.step-indicator {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.step-indicator span:first-child {
  color: var(--teal);
  font-size: 2rem;
}

.progress-track {
  width: 100%;
  height: 8px;
  margin: clamp(22px, 5vw, 48px) 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 32, 29, 0.1);
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--coral));
  transition: width 220ms ease;
}

.quiz-view {
  display: grid;
  align-content: start;
  flex: 1;
}

.question-title {
  max-width: 880px;
  min-height: 2.7em;
  margin: 0 0 28px;
  font-size: clamp(1.7rem, 3.4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: 0;
}

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

.option {
  position: relative;
  display: grid;
  min-height: 116px;
  align-content: start;
  gap: 9px;
  width: 100%;
  padding: 20px;
  cursor: pointer;
  color: var(--ink);
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.option:hover {
  transform: translateY(-2px);
  border-color: rgba(24, 119, 120, 0.4);
  box-shadow: 0 14px 30px rgba(23, 32, 29, 0.1);
}

.option[aria-pressed="true"] {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--teal-dark), var(--teal));
  box-shadow: 0 18px 36px rgba(14, 82, 82, 0.22);
}

.option-index {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
}

.option[aria-pressed="true"] .option-index {
  color: rgba(255, 255, 255, 0.82);
}

.option-title {
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.3;
}

.option-copy {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.option[aria-pressed="true"] .option-copy {
  color: rgba(255, 255, 255, 0.78);
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: clamp(24px, 5vw, 48px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  min-height: 48px;
  padding: 0 20px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.button.primary {
  color: #ffffff;
  background: var(--coral);
  box-shadow: 0 12px 26px rgba(217, 93, 69, 0.28);
}

.button.ghost {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.hidden {
  display: none;
}

.result-view {
  display: grid;
  align-content: start;
  max-width: 920px;
}

.result-view.hidden {
  display: none;
}

.result-view h2 {
  margin: 0;
  font-size: clamp(2.3rem, 6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.result-view h2 span {
  color: var(--teal);
}

.result-copy {
  margin: 22px 0 28px;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.22rem);
  line-height: 1.75;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.result-grid article {
  display: grid;
  gap: 8px;
  min-height: 108px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.result-grid strong {
  color: var(--coral);
  font-size: 2.1rem;
  line-height: 1;
}

.result-grid span {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.result-report {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.result-report article {
  min-height: 152px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.result-report h3 {
  margin: 0 0 10px;
  color: var(--teal-dark);
  font-size: 1.02rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.result-report p {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}

.visual-panel {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border-radius: 8px;
  background: #17201d;
}

.visual-panel img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  filter: saturate(1.02) contrast(1.02);
}

.visual-panel::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, transparent 30%, rgba(9, 18, 16, 0.78)),
    linear-gradient(90deg, rgba(9, 18, 16, 0.38), transparent 64%);
}

.visual-copy {
  position: absolute;
  right: 24px;
  bottom: 24px;
  left: 24px;
  z-index: 1;
  color: #ffffff;
}

.visual-copy p {
  margin: 0 0 6px;
  color: #ffce9a;
  font-size: clamp(2.3rem, 5vw, 5rem);
  font-weight: 900;
  line-height: 0.9;
}

.visual-copy strong {
  display: block;
  max-width: 420px;
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  line-height: 1.25;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .visual-panel {
    min-height: 280px;
    order: -1;
  }
}

@media (max-width: 680px) {
  .app-shell {
    gap: 12px;
    padding: 12px;
  }

  .test-surface {
    padding: 20px;
  }

  .topbar {
    align-items: flex-start;
  }

  .step-indicator span:first-child {
    font-size: 1.35rem;
  }

  .options,
  .result-grid,
  .result-report {
    grid-template-columns: 1fr;
  }

  .option {
    min-height: 104px;
  }

  .actions {
    position: sticky;
    bottom: 12px;
  }

  .button {
    flex: 1;
    min-width: 0;
  }
}
