/* CIT/BIT-specific additions. The page shell and questionnaire controls come
   from global.css and test-page.css; this file only adds profile/result pieces. */
html[data-test="cit"] .cit-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 22px;
}

html[data-test="cit"] .cit-mode-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 16px 18px;
  border: 0;
  border-radius: 16px;
  background: var(--test-surface-soft);
  color: var(--test-text);
  cursor: pointer;
  text-align: left;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

html[data-test="cit"] .cit-mode-card:hover,
html[data-test="cit"] .cit-mode-card.selected {
  background: var(--test-accent-soft);
  transform: translateY(-1px);
}

html[data-test="cit"] .cit-mode-card input { margin-top: 4px; accent-color: #f09b9c; }
html[data-test="cit"] .cit-mode-card strong { display: block; margin-bottom: 3px; }
html[data-test="cit"] .cit-mode-card small { color: var(--test-text-muted); line-height: 1.5; }
html[data-test="cit"] .cit-mode-card.selected small { color: inherit; opacity: .78; }

html[data-test="cit"] .cit-question-meta {
  margin: -8px 0 18px;
  color: var(--test-text-muted);
  font-size: .8rem;
}

/* CIT/BIT 有 5 个 Likert 选项，保持单行展示。 */
html[data-test="cit"] .answer-options {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
}

html[data-test="cit"] .answer-options .answer-option {
  flex: 1 1 0;
  min-width: 0;
  padding-right: 2px;
  padding-left: 2px;
}

@media (min-width: 601px) {
  html[data-test="cit"] .answer-options .answer-option .option-label {
    max-width: none;
    white-space: nowrap;
    word-break: keep-all;
  }
}

html[data-test="cit"] .cit-intro-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

html[data-test="cit"] .cit-intro-columns > div {
  padding: 16px;
  border-radius: 16px;
  background: var(--test-surface-soft);
}

html[data-test="cit"] .cit-intro-columns strong { color: var(--test-text); }
html[data-test="cit"] .cit-intro-columns p { margin: 6px 0 0; color: var(--test-text-muted); font-size: .86rem; line-height: 1.6; }
html[data-test="cit"] .cit-original-link { margin: 18px 0 0; color: var(--test-text-muted); font-size: .86rem; }
html[data-test="cit"] .cit-original-link a { color: #f09b9c; font-weight: 700; }

html[data-test="cit"] .cit-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0 0 22px;
}

html[data-test="cit"] .cit-summary-card {
  width: 100%;
  box-sizing: border-box;
  margin: 20px auto;
  padding: 34px;
  border-radius: 22px;
  background: #2a588f;
  color: #ffffff;
  text-align: center;
}

html[data-test="cit"] .cit-summary-label {
  display: block;
  margin-bottom: 4px;
  color: #dfe8f3;
  font-size: .9rem;
  letter-spacing: 2px;
  opacity: .7;
  text-transform: uppercase;
}

html[data-test="cit"] .cit-summary-score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  color: #fff;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
}

html[data-test="cit"] .cit-summary-max {
  margin-left: 4px;
  color: #dfe8f3;
  font-size: 1.2rem;
  font-weight: 400;
  opacity: .5;
}

html[data-test="cit"] .cit-summary-badge {
  display: inline-block;
  margin: 10px 0 4px;
  padding: 5px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .13);
  color: #f8d5d5;
  font-size: .9rem;
  font-weight: 600;
}

html[data-theme="light"][data-test="cit"] .cit-summary-card { background: #dfe8f3; color: #2a588f; }
html[data-theme="light"][data-test="cit"] .cit-summary-score { color: #2a588f; }
html[data-theme="light"][data-test="cit"] .cit-summary-label,
html[data-theme="light"][data-test="cit"] .cit-summary-max { color: #526b8f; }
html[data-theme="light"][data-test="cit"] .cit-summary-badge { background: rgba(42, 88, 143, .12); color: #2a588f; }

html[data-test="cit"] .cit-reference-panel {
  display: grid;
  grid-template-columns: auto minmax(180px, 260px) minmax(0, 1fr);
  align-items: center;
  gap: 10px 12px;
  margin: 18px 0 8px;
  padding: 8px 0;
  border-radius: 0;
  background: transparent;
}

html[data-test="cit"] .cit-reference-panel label { color: var(--test-text); font-size: .82rem; font-weight: 750; }
html[data-test="cit"] .cit-reference-panel select {
  width: 100%;
  padding: 9px 34px 9px 11px;
  border: 0;
  border-radius: 11px;
  background: var(--test-surface);
  color: var(--test-text);
  font-size: .8rem;
}
html[data-test="cit"] .cit-reference-panel p { margin: 0; color: var(--test-text-muted); font-size: .72rem; line-height: 1.5; }

html[data-test="cit"] .cit-insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

html[data-test="cit"] .cit-insight-card {
  min-width: 0;
  padding: 4px 0 8px;
  border-radius: 0;
  background: transparent;
}

html[data-test="cit"] .cit-insight-eyebrow { color: var(--test-text-muted); font-size: .68rem; font-weight: 750; letter-spacing: .08em; }
html[data-test="cit"] .cit-insight-card h4 { margin: 7px 0 10px; color: var(--test-text); font-size: 1rem; line-height: 1.45; }
html[data-test="cit"] .cit-insight-card p { margin: 10px 0 0; color: var(--test-text-muted); font-size: .72rem; line-height: 1.55; }

html[data-test="cit"] .cit-score-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

html[data-test="cit"] .cit-score-pills span { padding: 4px 7px; border-radius: 8px; background: var(--test-surface); color: var(--test-text-muted); font-size: .66rem; }
html[data-test="cit"] .cit-score-pills strong { color: #f09b9c; font-variant-numeric: tabular-nums; }
html[data-test="cit"] .cit-position-badge { padding: 4px 7px; border-radius: 8px; background: var(--test-surface-soft); color: var(--test-text); font-size: .62rem; font-weight: 700; }
html[data-test="cit"] .cit-position-badge.within { background: rgba(136,156,197,.28); }
html[data-test="cit"] .cit-position-badge.above { background: rgba(240,155,156,.22); }
html[data-test="cit"] .cit-position-badge.below { background: rgba(112,132,173,.28); }

html[data-test="cit"] .cit-table-wrap { overflow-x: auto; }
html[data-test="cit"] .cit-domain-table { width: 100%; min-width: 590px; border-collapse: separate; border-spacing: 0 6px; color: var(--test-text); }
html[data-test="cit"] .cit-domain-table th,
html[data-test="cit"] .cit-domain-table td { padding: 11px 12px; border: 0; text-align: left; }
html[data-test="cit"] .cit-domain-table th { color: var(--test-text-muted); font-size: .74rem; font-weight: 700; }
html[data-test="cit"] .cit-domain-table th:not(:first-child),
html[data-test="cit"] .cit-domain-table td:not(:first-child) { width: 15%; text-align: center; white-space: nowrap; }
html[data-test="cit"] .cit-domain-table .cit-domain-row { background: var(--test-surface-soft); }
html[data-test="cit"] .cit-domain-table .cit-domain-row[role="button"] { cursor: pointer; }
html[data-test="cit"] .cit-domain-table .cit-domain-row[role="button"]:hover,
html[data-test="cit"] .cit-domain-table .cit-domain-row[role="button"]:focus-visible,
html[data-test="cit"] .cit-domain-table .cit-domain-row.open { background: var(--test-accent-soft); outline: 0; }
html[data-test="cit"] .cit-domain-table .cit-domain-row td:first-child { border-radius: 12px 0 0 12px; }
html[data-test="cit"] .cit-domain-table .cit-domain-row td:last-child { border-radius: 0 12px 12px 0; }
html[data-test="cit"] .cit-domain-name,
html[data-test="cit"] .cit-subscale-name { display: inline-block; vertical-align: middle; }
html[data-test="cit"] .cit-domain-name { color: var(--test-text); font-size: .92rem; font-weight: 750; }
html[data-test="cit"] .cit-domain-name small,
html[data-test="cit"] .cit-subscale-name small { display: block; margin-top: 3px; color: var(--test-text-muted); font-size: .65rem; font-weight: 500; line-height: 1.45; white-space: normal; }
html[data-test="cit"] .cit-domain-row td:nth-child(2) strong { color: #f09b9c; font-size: 1.12rem; font-variant-numeric: tabular-nums; }
html[data-test="cit"] .cit-domain-row td:nth-child(2) small { margin-left: 3px; color: var(--test-text-muted); font-size: .62rem; }
html[data-test="cit"] .cit-expand-icon { display: inline-block; width: 9px; height: 9px; margin: 0 10px 1px 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; color: var(--test-text-muted); transform: rotate(-45deg); transition: transform .18s ease; }
html[data-test="cit"] .cit-domain-row.open .cit-expand-icon { transform: rotate(45deg); }
html[data-test="cit"] .cit-expand-hint { color: var(--test-text-muted); font-size: .68rem; font-weight: 650; }
html[data-test="cit"] .cit-subscale-row { background: rgba(223, 232, 243, .035); }
html[data-test="cit"] .cit-subscale-row td { color: var(--test-text-muted); font-size: .76rem; }
html[data-test="cit"] .cit-subscale-row td:first-child { padding-left: 44px; border-radius: 10px 0 0 10px; }
html[data-test="cit"] .cit-subscale-row td:last-child { border-radius: 0 10px 10px 0; }
html[data-test="cit"] .cit-subscale-name { color: var(--test-text); font-weight: 650; }
html[data-test="cit"] .cit-domain-table-brief { min-width: 0; }
html[data-test="cit"] .cit-domain-table-brief th:last-child,
html[data-test="cit"] .cit-domain-table-brief td:last-child { width: 22%; text-align: right; }

html[data-test="cit"] .cit-result-note,
html[data-test="cit"] .cit-credit { color: var(--test-text-muted); font-size: .84rem; line-height: 1.7; }
html[data-test="cit"] .cit-credit { margin-top: 22px; }

/* 小程序入口沿用测试页通用卡片结构，仅补充交互状态。 */
html[data-test="cit"] .mini-program-card[data-mini-program-card] {
  position: relative;
  cursor: pointer;
  transition: background .18s ease;
}

html[data-test="cit"] .mini-program-card[data-mini-program-card]:hover,
html[data-test="cit"] .mini-program-card[data-mini-program-card]:focus-visible {
  background: var(--test-accent-soft) !important;
  outline: 0;
}

html[data-test="cit"] .mp-click-hint {
  display: block;
  margin-top: 5px;
  color: var(--color-link);
  font-size: .74rem;
}

html[data-test="cit"] .mini-program-card[data-mini-program-card]::after {
  content: "已复制，可粘贴到微信中打开";
  position: absolute;
  right: 14px;
  bottom: 10px;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--test-text);
  color: var(--test-surface);
  font-size: .7rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

html[data-test="cit"] .mini-program-card[data-mini-program-card].copied::after { opacity: 1; }

html[data-test="cit"] .cit-radar-panel {
  margin: 18px 0 20px;
  padding: 8px 0;
  border-radius: 0;
  background: transparent;
}

html[data-test="cit"] .cit-radar-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 6px;
}

html[data-test="cit"] .cit-radar-heading strong { color: var(--test-text); font-size: .9rem; }
html[data-test="cit"] .cit-radar-heading small,
html[data-test="cit"] .cit-radar-heading span { color: var(--test-text-muted); font-size: .68rem; }
html[data-test="cit"] .cit-radar-heading small { display: block; margin-top: 3px; }
html[data-test="cit"] .cit-radar-canvas { position: relative; width: min(100%, 560px); height: min(560px, 75vw); aspect-ratio: 1; margin: 4px auto 0; }
html[data-test="cit"] .cit-radar-canvas canvas { display: block; width: 100% !important; height: 100% !important; }

/* 导出图片使用独立的平面报告布局，避免把页面卡片结构原样套入图片。 */
html[data-test="cit"] .cit-export-container {
  display: none;
  width: 720px;
  box-sizing: border-box;
  flex-direction: column;
  gap: 18px;
  padding: 32px;
  background: #19314f;
  color: #fff;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
}

html[data-test="cit"] .cit-export-heading { display: flex; flex-direction: column; gap: 4px; text-align: center; }
html[data-test="cit"] .cit-export-heading strong { color: #fff; font-size: 28px; line-height: 1.25; }
html[data-test="cit"] .cit-export-heading span { color: #f8d5d5; font-size: 15px; font-weight: 700; }
html[data-test="cit"] .cit-export-heading small { color: #dfe8f3; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
html[data-test="cit"] .cit-export-score { padding: 20px; border-radius: 16px; background: rgba(240, 155, 156, .12); text-align: center; }
html[data-test="cit"] .cit-export-score span,
html[data-test="cit"] .cit-export-score small { display: block; color: #dfe8f3; }
html[data-test="cit"] .cit-export-score strong { display: block; margin: 6px 0; color: #f09b9c; font-size: 54px; line-height: 1; }
html[data-test="cit"] .cit-export-radar { display: flex; height: 520px; align-items: center; justify-content: center; }
html[data-test="cit"] .cit-export-radar img { display: block; width: min(100%, 520px); height: 520px; object-fit: contain; }
html[data-test="cit"] .cit-export-domains { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
html[data-test="cit"] .cit-export-domain { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(223, 232, 243, .08); color: #dfe8f3; font-size: 13px; }
html[data-test="cit"] .cit-export-domain strong { color: #f8d5d5; font-variant-numeric: tabular-nums; }
html[data-test="cit"] .cit-export-note { margin: 0; color: #aabbd5; font-size: 12px; line-height: 1.5; text-align: center; }

@media (max-width: 700px) {
  html[data-test="cit"] .cit-mode-grid,
  html[data-test="cit"] .cit-summary-grid { grid-template-columns: 1fr; }
  html[data-test="cit"] .cit-intro-columns { grid-template-columns: 1fr; }
  html[data-test="cit"] .cit-reference-panel { grid-template-columns: 1fr; }
  html[data-test="cit"] .cit-insight-grid { grid-template-columns: 1fr; }
  html[data-test="cit"] .cit-radar-canvas { width: 100%; height: min(560px, 85vw); }
  html[data-test="cit"] .cit-radar-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
}
