:root {
  color-scheme: light;
  --background: #f5f7fa;
  --heading: #1e3a5f;
  --text: #243447;
  --muted: #526174;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

.shell {
  width: calc(100% - 32px);
  max-width: 720px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 48px 0;
}

.site-name {
  color: var(--muted);
  font-size: 14px;
}

h1 {
  color: var(--heading);
  font-size: clamp(28px, 7vw, 44px);
  line-height: 1.25;
}

.status {
  margin-top: 32px;
  color: var(--muted);
}


[hidden] {
  display: none !important;
}

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  margin-bottom: 12px;
}

fieldset {
  min-width: 0;
  margin: 0 0 24px;
  padding: 0;
  border: 0;
}

legend,
.field-label {
  display: block;
  margin-bottom: 10px;
  color: var(--heading);
  font-weight: 650;
}

.select-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

@media (max-width: 420px) {
  .select-row {
    grid-template-columns: 1fr;
  }
}

.choice-grid,
.segmented-control {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-pill,
.segment {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  cursor: pointer;
}

.choice-pill input,
.segment input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-pill span,
.segment span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid #b7c2cf;
  border-radius: 14px;
  background: #fdfeff;
  transition: background-color 0.2s ease-out, border-color 0.2s ease-out;
}

.choice-pill:has(input:checked) span,
.segment:has(input:checked) span {
  border-color: var(--heading);
  background: #e4ebf3;
  color: var(--heading);
  font-weight: 650;
}

.choice-pill:has(input:focus-visible) span,
.segment:has(input:focus-visible) span {
  outline: 3px solid #8da7c2;
  outline-offset: 2px;
}

input[type="text"],
input[type="tel"],
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #b7c2cf;
  border-radius: 10px;
  background: #fdfeff;
  color: var(--text);
  font: inherit;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input[type="text"]:focus-visible,
input[type="tel"]:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible,
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
  outline: 3px solid #8da7c2;
  outline-offset: 2px;
}

.primary-action,
.save-button,
.platform-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 18px 13px;
  border-radius: 10px;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease-out, border-color 0.2s ease-out;
}

.primary-action {
  width: 100%;
  border: 1px solid var(--heading);
  background: var(--heading);
  color: #f5f7fa;
}

.primary-action:hover:not(:disabled) {
  background: #162d49;
}

.primary-action:disabled {
  border-color: #c5cdd7;
  background: #e2e7ed;
  color: #526174;
  cursor: not-allowed;
}

.field-error {
  min-height: 24px;
  margin: 8px 0;
  color: #a32929;
  font-size: 13px;
}

.test-workspace {
  margin-top: 40px;
}

.progress-block {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
}

.progress-block strong {
  color: var(--heading);
  font-size: 22px;
}

.progress-block span,
.lock-copy,
.save-status,
.metric small {
  color: var(--muted);
  font-size: 13px;
}

.question-card {
  margin-bottom: 16px;
  padding: 20px;
  border-radius: 14px;
  background: #fdfeff;
}

.question-card.is-saved {
  border: 1px solid #6d8b73;
}

.question-card.locked {
  border: 1px dashed #b7c2cf;
  background: #edf0f4;
}

.question-title {
  margin: 0 0 16px;
  color: var(--heading);
  font-size: 18px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.platform-toggle,
.save-button {
  border: 1px solid var(--heading);
  background: transparent;
  color: var(--heading);
}

.platform-toggle:hover,
.save-button:hover:not(:disabled) {
  background: #e4ebf3;
}

.answer-form {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #d7dee7;
}

.answer-form .field-label {
  margin-top: 8px;
}

.save-status {
  margin-bottom: 0;
}

.completion {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #d7dee7;
}

.completion h2,
.result-section h2 {
  color: var(--heading);
  font-size: 20px;
}

.metrics {
  display: grid;
  gap: 12px;
  margin-bottom: 32px;
}

.metric {
  display: grid;
  gap: 4px;
  padding: 18px;
  border-radius: 14px;
  background: #fdfeff;
}

.metric strong {
  color: var(--heading);
  font-size: 26px;
  line-height: 1.3;
}

.result-section {
  margin-bottom: 28px;
  padding-top: 20px;
  border-top: 1px solid #d7dee7;
}

.gap-list {
  padding-left: 24px;
}

.gap-list li + li {
  margin-top: 10px;
}

.scope-note .primary-action {
  margin-top: 12px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 12px;
  color: var(--heading);
}

.noscript {
  color: #a32929;
}

@media (min-width: 600px) {
  .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .choice-pill span,
  .segment span,
  .primary-action,
  .save-button,
  .platform-toggle {
    transition: none;
  }
}


/* B3：留资、四平台补测与完整结果 */
.lead-form > .field-label {
  margin-top: 18px;
}

.lead-form > .field-label:first-child {
  margin-top: 0;
}

.service-mode {
  margin-top: 28px;
}

.service-option,
.privacy-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.service-option {
  padding: 16px;
  border: 1px solid #b7c2cf;
  border-radius: 14px;
  background: #fdfeff;
}

.service-option + .service-option {
  margin-top: 10px;
}

.service-option:has(input:checked) {
  border-color: var(--heading);
  background: #e4ebf3;
}

.service-option input,
.privacy-consent input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 5px 0 0;
  accent-color: var(--heading);
}

.service-option span {
  display: grid;
  gap: 3px;
}

.service-option strong {
  color: var(--heading);
}

.service-option small {
  color: var(--muted);
  font-size: 13px;
}

.privacy-consent {
  margin-top: 24px;
}

.privacy-consent a {
  color: var(--heading);
}

.form-error {
  margin-top: 16px;
}

.question-group {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
}

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

.platform-toggle {
  width: 100%;
  min-width: 0;
  padding-right: 8px;
  padding-left: 8px;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}

.platform-toggle.is-saved {
  border-color: #6d8b73;
  background: #edf4ee;
}

.answer-form {
  min-width: 0;
}

.save-button:disabled,
.platform-toggle:disabled {
  cursor: wait;
  opacity: 0.65;
}

.notice {
  margin-bottom: 28px;
  padding: 18px;
  border-left: 4px solid #6d8b73;
  border-radius: 0 14px 14px 0;
  background: #edf4ee;
}

.notice p {
  margin-bottom: 0;
}

.platform-progress {
  margin: 0;
  padding: 0;
  list-style: none;
}

.platform-progress li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 12px 0;
  border-bottom: 1px solid #d7dee7;
}

.platform-progress li:last-child {
  border-bottom: 0;
}

.platform-progress span {
  color: var(--muted);
  font-size: 14px;
}

.result-section,
.question-card,
.answer-form {
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
  .service-option,
  .platform-toggle {
    transition: none;
  }
}


/* B4：内容页、正式报告、运营后台与打印 */
input[type="password"] {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #b7c2cf;
  border-radius: 10px;
  background: #fdfeff;
  color: var(--text);
  font: inherit;
}

input[type="password"]:focus-visible {
  outline: 3px solid #8da7c2;
  outline-offset: 2px;
}

.shell-wide {
  max-width: 1180px;
}

.shell-report {
  max-width: 960px;
}

.home-header {
  padding: 24px 0 16px;
}

.home-header h1 {
  max-width: 14ch;
  margin-top: 20px;
  font-size: clamp(36px, 10vw, 64px);
}

.home-lead {
  margin: 20px 0 28px;
  color: var(--heading);
  font-size: 18px;
  font-weight: 650;
}

.home-steps {
  display: grid;
  gap: 0;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.home-steps li {
  display: grid;
  gap: 4px;
  padding: 22px 0;
  border-top: 1px solid #d7dee7;
}

.home-steps span {
  color: var(--muted);
  font-size: 13px;
}

.home-steps strong {
  color: var(--heading);
  font-size: 20px;
}

.home-steps p {
  margin: 0;
}

.home-explain {
  margin-top: 36px;
}

.content-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 48px;
  padding-bottom: 16px;
  border-bottom: 1px solid #d7dee7;
}

.content-nav div,
.content-footer,
.content-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.content-nav a,
.content-footer a,
.content-links a,
.pagination a,
.admin-table a {
  color: var(--heading);
  text-underline-offset: 4px;
}

.content-nav a,
.content-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.content-brand {
  font-size: 20px;
  font-weight: 750;
  text-decoration: none;
}

.content-document h1 {
  max-width: 20ch;
}

.content-document p,
.qa-answer {
  max-width: 72ch;
}

.content-footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid #d7dee7;
  font-size: 14px;
}

.content-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.formula-list,
.lead-contact dl {
  margin: 0;
}

.formula-list div,
.lead-contact dl div {
  display: grid;
  gap: 4px;
  padding: 16px 0;
  border-top: 1px solid #d7dee7;
}

.formula-list dt,
.lead-contact dt {
  color: var(--heading);
  font-weight: 650;
}

.formula-list dd,
.lead-contact dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.qa-index,
.industry-questions,
.boundary-list {
  padding-left: 24px;
}

.qa-index li,
.industry-questions li,
.boundary-list li {
  padding: 8px 0 8px 6px;
}

.qa-index a {
  color: var(--heading);
  text-underline-offset: 4px;
}

.qa-answer p {
  margin-top: 0;
}

.qa-answer p + p {
  margin-top: 20px;
}

.report-document {
  overflow-wrap: anywhere;
}

.report-header {
  margin-bottom: 20px;
}

.report-header p {
  margin-bottom: 6px;
}

.report-actions {
  margin: 24px 0 40px;
}

.report-section {
  margin: 0;
  padding: 36px 0;
  border-top: 1px solid #d7dee7;
  break-inside: auto;
}

.report-section h2 {
  margin: 0 0 16px;
  color: var(--heading);
  font-size: 25px;
  line-height: 1.35;
  break-after: avoid;
}

.section-number {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.report-conclusion {
  color: var(--heading);
  font-size: 20px;
  font-weight: 650;
}

.report-gap {
  padding: 20px 0;
  border-top: 1px solid #d7dee7;
}

.report-gap h3,
.next-options h3 {
  margin: 0 0 12px;
  color: var(--heading);
  font-size: 18px;
  break-after: avoid;
}

.report-gap dl {
  margin: 0;
}

.report-gap dl div {
  display: grid;
  gap: 4px;
  margin-top: 12px;
}

.report-gap dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.report-gap dd {
  margin: 0;
}

.next-options {
  display: grid;
  gap: 20px;
}

.next-options section {
  padding: 20px 0;
  border-top: 1px solid #d7dee7;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  margin-top: 20px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
}

th,
td {
  min-width: 0;
  padding: 12px 10px;
  border-bottom: 1px solid #d7dee7;
  vertical-align: top;
  overflow-wrap: anywhere;
}

th {
  color: var(--heading);
  font-weight: 650;
}

.admin-filters {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
}

.admin-filters .save-button {
  align-self: end;
}

.admin-login {
  max-width: 480px;
}

.admin-actions {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.admin-actions .save-button {
  text-decoration: none;
}

#status-form .save-button {
  margin-top: 12px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 24px;
}

.pagination a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.empty-table-note {
  margin: 20px 0 0;
  color: var(--muted);
}

@media (max-width: 699px) {
  .table-wrap {
    overflow-x: visible;
  }

  .table-wrap table,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td {
    display: block;
    width: 100%;
  }

  .table-wrap thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .table-wrap tr {
    padding: 12px 0;
    border-bottom: 1px solid #b7c2cf;
  }

  .table-wrap td {
    display: grid;
    grid-template-columns: minmax(72px, 30%) minmax(0, 1fr);
    gap: 12px;
    padding: 7px 0;
    border: 0;
  }

  .table-wrap td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
  }
}

@media (min-width: 600px) {
  .admin-filters {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: end;
  }

  .admin-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .next-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 760px) {
  .home-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }

  .home-steps li {
    align-content: start;
  }

  .report-section {
    padding: 44px 0;
  }
}

@media print {
  @page {
    size: A4;
    margin: 16mm;
  }

  body {
    background: #fdfeff;
    color: #243447;
    font-size: 11pt;
  }

  .shell-report {
    width: 100%;
    max-width: none;
    min-height: 0;
    padding: 0;
  }

  .print-action,
  .content-nav,
  .content-footer {
    display: none !important;
  }

  .report-header {
    margin-bottom: 24px;
  }

  .report-section {
    padding: 22px 0;
  }

  .report-section h2,
  .report-gap,
  .next-options section,
  .metric,
  tr {
    break-inside: avoid;
  }

  .table-wrap {
    overflow: visible;
  }

  .table-wrap table,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td {
    display: table;
  }

  .table-wrap table {
    display: table;
    font-size: 9pt;
  }

  .table-wrap tbody {
    display: table-row-group;
  }

  .table-wrap tr {
    display: table-row;
  }

  .table-wrap thead {
    position: static;
    display: table-header-group;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
  }

  .table-wrap th,
  .table-wrap td {
    display: table-cell;
    padding: 7px 5px;
  }

  .table-wrap td::before {
    content: none;
  }

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

/* 后台行业分析 */
.inline-link {
  color: var(--heading);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 24px;
}

.metric-card {
  padding: 16px 18px;
  border: 1px solid #d7e0ea;
  border-radius: 14px;
  background: #fdfeff;
  display: grid;
  gap: 6px;
}

.metric-card span {
  color: var(--muted, #5b6b7c);
  font-size: 14px;
}

.metric-card strong {
  color: var(--heading);
  font-size: 30px;
  line-height: 1.1;
}

.metric-card em {
  color: var(--muted, #5b6b7c);
  font-size: 13px;
  font-style: normal;
}

.analysis-block {
  margin: 0 0 20px;
  padding: 18px;
  border: 1px solid #d7e0ea;
  border-radius: 16px;
  background: #fdfeff;
}

.analysis-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.analysis-head h2 {
  margin: 0;
}

.analysis-count,
.muted {
  color: var(--muted, #5b6b7c);
  font-size: 14px;
  font-weight: 400;
}

.analysis-conclusion {
  margin: 8px 0 14px;
  color: var(--heading);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.metric-row > div {
  padding: 12px 14px;
  border-radius: 12px;
  background: #eef2f7;
}

.metric-row dt {
  color: var(--muted, #5b6b7c);
  font-size: 13px;
  margin-bottom: 4px;
}

.metric-row dd {
  margin: 0;
  color: var(--heading);
  font-size: 20px;
  font-weight: 700;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.data-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid #b7c2cf;
  border-radius: 999px;
  background: #fdfeff;
  font-size: 14px;
}

@media (max-width: 640px) {
  .metric-grid,
  .metric-row {
    grid-template-columns: 1fr;
  }
}
