:root {
  color-scheme: light;
  --paper: #ffffff;
  --page: #efefec;
  --ink: #151515;
  --muted: #5f5f5b;
  --line: #b8b8b2;
  --soft-line: #d9d9d3;
  --soft: #f6f6f2;
  --focus: #151515;
  --shadow: rgba(18, 18, 18, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, transparent 49.96%, rgba(0, 0, 0, 0.035) 50%, transparent 50.04%) 0 0 / 60px 60px,
    var(--page);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "PingFang TC",
    "Noto Sans TC",
    "Microsoft JhengHei",
    sans-serif;
}

button,
input {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 12px;
  z-index: 20;
  padding: 10px 14px;
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-100%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  display: flex;
  width: min(1220px, calc(100% - 48px));
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.site-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.wordmark {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.wordmark span {
  display: grid;
  width: 52px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--ink);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.wordmark strong {
  font-size: 0.84rem;
  letter-spacing: 0.08em;
}

.page-shell {
  width: min(1220px, calc(100% - 48px));
  margin: 0 auto;
  padding: 72px 0 96px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(48px, 8vw, 120px);
  align-items: end;
}

.eyebrow,
.section-index {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(3.8rem, 8.3vw, 7.2rem);
  font-weight: 760;
  letter-spacing: -0.075em;
  line-height: 0.9;
}

.hero-subtitle {
  margin-bottom: 28px;
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  font-weight: 520;
  letter-spacing: 0.04em;
}

.hero-intro {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.9;
}

.hero-note {
  padding: 22px;
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
}

.hero-note p {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

.note-index {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: 0;
  font-size: 0.88rem;
  font-weight: 740;
  text-decoration: none;
  cursor: pointer;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

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

.button:disabled {
  color: #8d8d88;
  border-color: var(--soft-line);
  background: #ecece8;
  cursor: not-allowed;
}

.button-primary {
  color: var(--paper);
  background: var(--ink);
}

.button-primary:hover:not(:disabled) {
  background: #343434;
}

.button-secondary {
  color: var(--ink);
  background: transparent;
}

.button-secondary:hover:not(:disabled) {
  background: var(--paper);
}

.step-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 72px 0 26px;
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  list-style: none;
}

.step-track li {
  display: flex;
  min-height: 70px;
  gap: 12px;
  align-items: center;
  padding: 0 18px;
  color: #858580;
  border-right: 1px solid var(--line);
}

.step-track li:last-child {
  border-right: 0;
}

.step-track li.is-current {
  color: var(--paper);
  background: var(--ink);
}

.step-track li.is-complete {
  color: var(--ink);
  background: #d9d9d4;
}

.step-track span {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

.step-track strong {
  font-size: 0.86rem;
}

.stage-panel {
  padding: clamp(24px, 4.5vw, 54px);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 26px 80px var(--shadow);
}

.panel-heading,
.comparison-topline {
  display: flex;
  gap: 30px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 36px;
}

.panel-heading h2,
.comparison-topline h2 {
  max-width: 720px;
  margin-bottom: 0;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.panel-heading > p {
  max-width: 300px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
  text-align: right;
}

.profile-form {
  display: grid;
  grid-template-columns: 1fr 260px auto;
  gap: 18px;
  align-items: end;
}

.profile-form label {
  display: grid;
  gap: 9px;
}

.profile-form label span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.profile-form input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: var(--soft);
}

.progress-copy {
  min-width: 92px;
  text-align: right;
}

.progress-copy span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.7rem;
}

.progress-copy strong {
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.progress-track {
  height: 5px;
  margin-bottom: 44px;
  overflow: hidden;
  background: #dfdfda;
}

.progress-track span {
  display: block;
  width: 2.22%;
  height: 100%;
  background: var(--ink);
  transition: width 180ms ease;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 74px 1fr;
  gap: 0;
  align-items: stretch;
}

.choice-card {
  min-height: 268px;
  padding: 34px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper);
  text-align: left;
  cursor: pointer;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.choice-card:hover {
  color: var(--paper);
  border-color: var(--ink);
  background: var(--ink);
  transform: translateY(-3px);
}

.choice-card-number {
  display: inline-flex;
  min-width: 42px;
  height: 28px;
  align-items: center;
  justify-content: center;
  margin-bottom: 34px;
  border: 1px solid currentColor;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

.choice-card strong {
  display: block;
  margin-bottom: 13px;
  font-size: clamp(1.6rem, 3.2vw, 2.7rem);
  letter-spacing: -0.045em;
}

.choice-card p {
  max-width: 390px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.75;
}

.choice-card:hover p {
  color: #d6d6d1;
}

.choice-divider {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.choice-divider span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
}

.keyboard-hint {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  text-align: center;
}

.stage-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--soft-line);
}

.scale-guide {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.7rem;
}

.satisfaction-list {
  border-top: 1px solid var(--ink);
}

.satisfaction-row {
  display: grid;
  grid-template-columns: 56px minmax(140px, 0.7fr) minmax(240px, 1.8fr) 150px;
  gap: 18px;
  align-items: center;
  min-height: 70px;
  padding: 10px 0;
  border-bottom: 1px solid var(--soft-line);
}

.satisfaction-row-number {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

.satisfaction-row strong {
  font-size: 1rem;
}

.satisfaction-row p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.6;
}

.satisfaction-row label {
  display: grid;
  gap: 6px;
}

.satisfaction-row label span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.satisfaction-row select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: var(--soft);
  font: inherit;
}

.satisfaction-actions {
  justify-content: space-between;
}

.result-panel {
  margin-top: 28px;
  padding: clamp(24px, 4.5vw, 54px);
  color: var(--paper);
  background: var(--ink);
  box-shadow: 0 26px 80px var(--shadow);
}

.result-heading {
  display: flex;
  gap: 40px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 32px;
}

.result-heading .section-index,
.result-heading > p {
  color: #bdbdb7;
}

.result-heading h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: -0.045em;
}

.result-heading > p {
  max-width: 390px;
  margin-bottom: 4px;
  font-size: 0.78rem;
  line-height: 1.7;
  text-align: right;
}

.result-table-shell {
  overflow-x: auto;
  border-top: 1px solid #686864;
}

.result-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.result-table th,
.result-table td {
  padding: 16px 18px;
  border-bottom: 1px solid #4d4d4a;
  text-align: left;
}

.result-table th {
  color: #bdbdb7;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.result-table td:first-child {
  width: 120px;
  font-size: 0.78rem;
}

.result-table td:nth-child(2) {
  font-size: 1rem;
  font-weight: 720;
}

.result-table td:nth-child(3),
.result-table td:nth-child(4) {
  width: 140px;
  font-variant-numeric: tabular-nums;
}

.text-button {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--muted);
  background: transparent;
  font-size: 0.78rem;
  cursor: pointer;
}

.status-message {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-note {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 24px;
    align-items: end;
  }

  .hero-note .note-index {
    grid-column: 1 / -1;
  }

  .hero-note p {
    margin-bottom: 0;
  }

  .profile-form {
    grid-template-columns: 1fr 1fr;
  }

  .profile-form .button {
    grid-column: 1 / -1;
  }

  .choice-grid {
    grid-template-columns: 1fr 54px 1fr;
  }

  .choice-card {
    min-height: 290px;
    padding: 26px;
  }

  .satisfaction-row {
    grid-template-columns: 44px 150px minmax(180px, 1fr) 130px;
    gap: 12px;
  }
}

@media (max-width: 680px) {
  .site-header,
  .page-shell {
    width: min(100% - 28px, 640px);
  }

  .site-header p {
    display: none;
  }

  .page-shell {
    padding: 48px 0 68px;
  }

  h1 {
    font-size: clamp(3.4rem, 18vw, 5.6rem);
  }

  .hero-note {
    display: block;
  }

  .hero-note p {
    margin-bottom: 20px;
  }

  .hero-note .button {
    width: 100%;
  }

  .step-track {
    margin-top: 48px;
    overflow-x: auto;
  }

  .step-track li {
    min-width: 132px;
    padding: 0 14px;
  }

  .panel-heading,
  .comparison-topline {
    display: block;
  }

  .panel-heading > p {
    margin-top: 14px;
    text-align: left;
  }

  .progress-copy {
    margin-top: 18px;
    text-align: left;
  }

  .profile-form {
    grid-template-columns: 1fr;
  }

  .profile-form .button {
    grid-column: auto;
  }

  .choice-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .choice-card {
    min-height: 220px;
  }

  .choice-divider {
    min-height: 34px;
  }

  .choice-divider span {
    width: 34px;
    height: 34px;
  }

  .satisfaction-row {
    grid-template-columns: 42px 1fr 112px;
    gap: 10px;
  }

  .satisfaction-row p {
    display: none;
  }

  .satisfaction-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .result-heading {
    display: block;
  }

  .result-heading > p {
    margin-top: 14px;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button,
  .choice-card,
  .progress-track span {
    transition: none;
  }
}
