:root {
  color-scheme: light;
  --ink: #101820;
  --muted: #53606c;
  --paper: #f7f8f4;
  --surface: #ffffff;
  --line: #d9dfdf;
  --orange: #f47d30;
  --orange-dark: #ca5d18;
  --teal: #0da6a6;
  --green: #2f8f5b;
  --blue: #315f9f;
  --shadow: 0 16px 40px rgba(16, 24, 32, 0.12);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

:root[data-assessment-theme="business"] {
  --ink: #172033;
  --muted: #5a6475;
  --paper: #f3f6fa;
  --surface: #ffffff;
  --line: #d6dde8;
  --orange: #2f6fed;
  --orange-dark: #1d55c6;
  --teal: #20a4b8;
  --green: #2c8467;
  --blue: #263f73;
}

:root[data-assessment-theme="kids"] {
  --ink: #253044;
  --muted: #647086;
  --paper: #fff8ef;
  --surface: #ffffff;
  --line: #f0d8b6;
  --orange: #ff8a4c;
  --orange-dark: #df6730;
  --teal: #32b9aa;
  --green: #51a857;
  --blue: #4b74c9;
}

:root[data-assessment-theme="premium"] {
  --ink: #16181f;
  --muted: #5d6270;
  --paper: #f5f2ea;
  --surface: #fffdf8;
  --line: #ded5c5;
  --orange: #9b7644;
  --orange-dark: #76582f;
  --teal: #2f7f7a;
  --green: #4d7a57;
  --blue: #283b5d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.topbar {
  align-items: center;
  background: var(--ink);
  color: #fff;
  display: flex;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 48px);
}

.topbar strong {
  display: block;
  font-size: 18px;
}

.eyebrow,
.campaign-tag {
  color: #ffb066;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 4px;
}

.ghost-link {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  padding: 9px 12px;
  text-decoration: none;
}

main {
  margin: 0 auto;
  max-width: 920px;
  padding: clamp(18px, 4vw, 48px);
}

.hero {
  background: linear-gradient(135deg, #101820 0%, #18333b 54%, var(--orange) 180%);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: #fff;
  overflow: hidden;
  padding: clamp(28px, 7vw, 72px) clamp(22px, 6vw, 68px);
}

:root[data-assessment-theme="business"] .hero {
  background: linear-gradient(135deg, #172033 0%, #243b60 58%, var(--orange) 170%);
}

:root[data-assessment-theme="kids"] .hero {
  background: linear-gradient(135deg, #253044 0%, #2e7f83 48%, var(--orange) 165%);
}

:root[data-assessment-theme="premium"] .hero {
  background: linear-gradient(135deg, #16181f 0%, #343021 56%, var(--orange) 175%);
}

.hero h1,
.result-heading h1,
.form-heading h1,
.success-layout h1,
.admin-heading h1 {
  font-size: clamp(30px, 8vw, 56px);
  line-height: 1.06;
  margin: 0;
}

.subtitle {
  color: #f5fbff;
  font-size: clamp(20px, 5vw, 32px);
  font-weight: 800;
  margin: 12px 0 10px;
}

.intro {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
  margin: 0 0 24px;
  max-width: 620px;
}

.channel-strip {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 22px 0;
  padding: 12px 14px;
}

.channel-strip span,
.channel-strip small {
  color: rgba(255, 255, 255, 0.72);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  min-height: 48px;
  padding: 0 18px;
}

.primary-button {
  background: var(--orange);
  color: #fff;
}

.primary-button:hover {
  background: var(--orange-dark);
}

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

.full-width {
  width: 100%;
}

.fine-print {
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  line-height: 1.6;
  margin: 24px 0 0;
}

.quiz-layout,
.result-layout,
.form-layout,
.admin-layout,
.success-layout {
  display: grid;
  gap: 18px;
}

.progress-meta,
.dimension-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

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

.progress-track {
  background: #dce5e5;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.progress-track div {
  background: linear-gradient(90deg, var(--teal), var(--orange));
  height: 100%;
}

.progress-track.compact {
  height: 8px;
}

.question-panel,
.result-section,
.lead-form,
.admin-form,
.channel-row,
.success-layout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(16, 24, 32, 0.08);
  padding: clamp(18px, 4vw, 32px);
}

.question-panel h2,
.result-section h2 {
  font-size: clamp(22px, 5vw, 34px);
  line-height: 1.24;
  margin: 0 0 22px;
}

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

.option-button {
  align-items: flex-start;
  background: #f7fbfb;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 12px;
  grid-template-columns: 34px 1fr;
  min-height: 62px;
  padding: 14px;
  text-align: left;
  width: 100%;
}

.option-button span {
  align-items: center;
  background: #ddeaea;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.option-button strong {
  line-height: 1.55;
}

.option-button.is-selected {
  background: #ecfbf8;
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px var(--teal);
}

.option-button.is-selected span {
  background: var(--teal);
  color: #fff;
}

.quiz-nav {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

.result-heading,
.form-heading,
.admin-heading {
  border-radius: 8px;
  color: #fff;
  padding: clamp(22px, 5vw, 42px);
}

.result-heading {
  background: var(--ink);
}

.result-heading p,
.form-heading p,
.form-heading span,
.admin-heading p {
  line-height: 1.7;
  margin: 10px 0 0;
}

.result-A {
  background: linear-gradient(135deg, var(--orange), var(--blue));
}

.result-B {
  background: linear-gradient(135deg, var(--green), var(--blue));
}

.result-C {
  background: linear-gradient(135deg, var(--teal), var(--green));
}

.result-D {
  background: linear-gradient(135deg, var(--orange), #8b4b9f);
}

.result-E {
  background: linear-gradient(135deg, #67727d, var(--teal));
}

.dimension-list {
  display: grid;
  gap: 16px;
}

.dimension-row p,
.result-section p {
  color: var(--muted);
  line-height: 1.7;
  margin: 8px 0 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list span {
  background: #ecf7f5;
  border: 1px solid #cde5df;
  border-radius: 8px;
  color: #145b55;
  font-weight: 800;
  padding: 10px 12px;
}

.topic-list span {
  background: #fff2e8;
  border-color: #ffd4b2;
  color: #8f3e0d;
}

.sticky-actions {
  background: rgba(247, 248, 244, 0.92);
  bottom: 0;
  padding: 12px 0 0;
  position: sticky;
}

.form-heading,
.admin-heading {
  background: var(--ink);
}

.lead-form,
.admin-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
}

label span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

input,
select {
  background: #fbfcfc;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 46px;
  padding: 0 12px;
  width: 100%;
}

.consent-line {
  align-items: flex-start;
  display: grid;
  gap: 10px;
  grid-template-columns: 18px 1fr;
}

.consent-line input {
  min-height: 18px;
  margin-top: 2px;
}

.channel-table {
  display: grid;
  gap: 14px;
}

.channel-row {
  display: grid;
  gap: 16px;
}

.channel-row p {
  color: var(--muted);
  margin: 8px 0;
}

.channel-row code {
  background: #eff4f4;
  border-radius: 6px;
  color: var(--orange-dark);
  display: inline-block;
  padding: 5px 7px;
}

.channel-actions {
  display: grid;
  gap: 10px;
}

.qr-placeholder {
  align-items: center;
  background: repeating-linear-gradient(
    45deg,
    #f1f4f4,
    #f1f4f4 8px,
    #e5eeee 8px,
    #e5eeee 16px
  );
  border: 1px dashed #b8c6c6;
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-weight: 800;
  height: 96px;
  justify-content: center;
}

.success-layout {
  text-align: center;
}

.success-mark {
  color: var(--green);
  font-weight: 900;
  margin: 0;
}

.toast {
  background: var(--ink);
  border-radius: 8px;
  bottom: 24px;
  box-shadow: var(--shadow);
  color: #fff;
  left: 50%;
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  position: fixed;
  transform: translateX(-50%);
  z-index: 10;
}

@media (min-width: 720px) {
  .channel-row {
    grid-template-columns: 1fr 380px;
  }

  .channel-actions {
    grid-template-columns: 1fr auto 96px;
  }

  .qr-placeholder {
    height: 46px;
  }
}

@media (max-width: 520px) {
  .topbar {
    align-items: flex-start;
    gap: 12px;
  }

  main {
    padding: 16px;
  }

  .hero {
    min-height: calc(100vh - 104px);
  }

  .quiz-nav,
  .actions {
    grid-template-columns: 1fr;
  }

  .actions button {
    width: 100%;
  }
}
