/* 基础排版与移动端体验 */
:root {
  --bg: #e8f4f4;
  --bg-2: #f4faf9;
  --surface: #ffffff;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #d1e7e5;
  --line-strong: #b8d9d6;
  --brand: #0d9488;
  --brand-hover: #0f766e;
  --brand-soft: rgba(13, 148, 136, 0.12);
  --accent-sky: #38bdf8;
  --brand2: #14b8a6;
  --warn: #d97706;
  --danger: #dc2626;
  --shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 2px 12px rgba(15, 23, 42, 0.06);
  --radius: 16px;
  --radius2: 12px;
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC",
    "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 900px 520px at 8% -10%, rgba(56, 189, 248, 0.18), transparent 55%),
    radial-gradient(ellipse 800px 480px at 92% 8%, rgba(20, 184, 166, 0.16), transparent 52%),
    radial-gradient(ellipse 700px 400px at 50% 100%, rgba(13, 148, 136, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 45%, #dff2f0 100%);
  background-attachment: fixed;
}

a {
  color: inherit;
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 22px 16px 40px;
}

.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.title {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 750;
  letter-spacing: 0.2px;
}

.subtitle {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 720px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.pill strong {
  font-variant-numeric: tabular-nums;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.cardHeader {
  padding: 14px 16px 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.qMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.tag {
  padding: 4px 8px;
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-radius: 999px;
  color: var(--brand-hover);
}

.qIndex {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 12px;
}

.qBody {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qText {
  font-size: 14px;
  line-height: 1.55;
}

.qName {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.2px;
}

.choices {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 720px) {
  .choices {
    grid-template-columns: repeat(3, 1fr);
  }
}

.choice {
  border-radius: var(--radius2);
  border: 1px solid var(--line);
  background: #f8fcfc;
  padding: 12px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
  user-select: none;
}

.choice:hover {
  transform: translateY(-1px);
  border-color: rgba(13, 148, 136, 0.45);
  background: var(--brand-soft);
}

.choice[aria-checked="true"] {
  border-color: rgba(13, 148, 136, 0.65);
  background: rgba(13, 148, 136, 0.14);
  box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.12);
}

.choiceLabel {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.choiceLabel strong {
  font-size: 13px;
  font-weight: 700;
}

.choiceLabel span {
  font-size: 12px;
  color: var(--muted);
}

.kbd {
  font-size: 11px;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f1f5f9;
  font-variant-numeric: tabular-nums;
}

.footerBar {
  position: sticky;
  bottom: 0;
  padding-top: 12px;
  margin-top: 10px;
  background: linear-gradient(180deg, rgba(232, 244, 244, 0), rgba(232, 244, 244, 0.92) 28%, rgba(232, 244, 244, 0.98));
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.leftActions,
.rightActions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

button {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, opacity 120ms ease;
  font-weight: 650;
  letter-spacing: 0.2px;
}

button:hover {
  transform: translateY(-1px);
  border-color: rgba(13, 148, 136, 0.45);
  background: var(--brand-soft);
}

button.primary {
  border-color: rgba(13, 148, 136, 0.35);
  background: linear-gradient(180deg, #14b8a6 0%, #0d9488 100%);
  color: #ffffff;
}

button.primary:hover {
  border-color: var(--brand-hover);
  background: linear-gradient(180deg, #2dd4bf 0%, #0f766e 100%);
}

button.danger:hover {
  border-color: rgba(220, 38, 38, 0.45);
  background: rgba(220, 38, 38, 0.08);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.small {
  font-size: 12px;
  color: var(--muted);
}

.result {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.resultTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.resultTitle {
  font-weight: 800;
  font-size: 18px;
}

.scoreBox {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.scoreBadge {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f8fcfc;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.barWrap {
  width: 100%;
  background: #e2e8f0;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  height: 12px;
}

.barFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #5eead4 0%, #14b8a6 45%, #0d9488 100%);
  transition: width 240ms ease;
}

.resultSection {
  background: #fafcfc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 12px;
}

.resultSection h3 {
  margin: 0 0 8px 0;
  font-size: 14px;
  letter-spacing: 0.2px;
}

.resultSection ul {
  margin: 0;
  padding-left: 18px;
  color: #334155;
  line-height: 1.6;
  font-size: 13px;
}

.resultSection p {
  margin: 0;
  color: #334155;
  line-height: 1.6;
  font-size: 13px;
}

.notice {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.hidden {
  display: none !important;
}

.moduleRow {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 14px;
  padding: 12px 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}

.moduleName {
  font-weight: 800;
  letter-spacing: 0.2px;
  margin-bottom: 4px;
}

.moduleMeta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.moduleHeadline {
  margin: 0 0 8px 0;
  font-size: 13px;
  line-height: 1.55;
  color: #334155;
}

.moduleSug {
  margin: 0;
  padding-left: 18px;
  color: #475569;
  line-height: 1.6;
  font-size: 13px;
}

.dimBar {
  width: 100%;
  background: #e2e8f0;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  height: 10px;
}

.dimBarFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #bae6fd 0%, #5eead4 40%, #14b8a6 100%);
  transition: width 240ms ease;
}

.qBars {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qBarRow {
  display: grid;
  grid-template-columns: 44px 1fr 56px;
  gap: 10px;
  align-items: center;
}

.qBarLabel {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.qBarTrack {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: #eef2f7;
  border: 1px solid var(--line);
}

.qBarFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(94, 234, 212, 0.35) 0%, #14b8a6 100%);
  transition: width 240ms ease;
}

.qBarValue {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.moduleRow[data-level^="j"] {
  border-color: rgba(248, 113, 113, 0.45);
  background: #fffafa;
}

.moduleRow[data-level^="z"] {
  border-color: rgba(251, 191, 36, 0.55);
  background: #fffbeb;
}

.moduleRow[data-level="g1"] {
  border-color: rgba(13, 148, 136, 0.45);
  background: #f0fdfa;
}

.moduleSectionFootnote {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.exportHint {
  margin: 0 0 12px 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}

.exportForm {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
}

.exportLabel span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.exportLabel input,
.exportLabel select {
  width: 100%;
  max-width: 400px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}

.exportLabel select {
  cursor: pointer;
  appearance: auto;
}

.exportLabel input:focus,
.exportLabel select:focus {
  outline: none;
  border-color: rgba(13, 148, 136, 0.55);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.exportActions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.submitHint {
  margin-top: 12px;
  margin-bottom: 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
}

