:root {
  --bg: #eef8f0;
  --paper: #ffffff;
  --soft: #f7fcf8;
  --ink: #183127;
  --muted: #687970;
  --line: #d7e9dd;
  --green: #4e9b70;
  --green-dark: #2f7153;
  --blue: #2678e6;
  --violet: #8067c7;
  --gold: #f28c28;
  --coral: #dc7653;
  --shadow: 0 22px 60px rgba(45, 105, 75, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(238, 248, 240, 0.95), rgba(249, 253, 250, 0.98)),
    radial-gradient(circle at 12% 8%, rgba(92, 166, 119, 0.18), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(95, 151, 177, 0.14), transparent 26%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

button {
  font: inherit;
}

.shell {
  width: min(1080px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

#intro-screen,
.question-card,
.report-hero,
.chart-panel,
.report-section {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

#intro-screen,
.report-hero {
  border-radius: 22px;
  padding: clamp(24px, 5vw, 56px);
}

.topline {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.brand,
.dimension-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 5px 13px;
  border-radius: 999px;
  color: #fff;
  background: var(--green-dark);
  font-weight: 800;
}

.report-hero .brand {
  min-height: auto;
  padding: 0;
  border-radius: 0;
  color: #1f6f50;
  background: transparent;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  font-weight: 900;
}

.code-note,
.question-type,
.intro-metrics span {
  color: var(--muted);
  font-size: 0.94rem;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 16px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  line-height: 1.25;
}

.lead {
  max-width: 780px;
  color: #365246;
  font-size: 1.1rem;
}

.intro-metrics,
.report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0;
}

.intro-metrics > div,
.basis,
.chart-panel,
.report-section {
  border-radius: 16px;
}

.intro-metrics > div,
.basis {
  border: 1px solid var(--line);
  background: var(--soft);
  padding: 18px;
}

.intro-metrics > div {
  position: relative;
  overflow: hidden;
}

.intro-metrics > div::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
}

.metric-talent::before {
  background: var(--green);
}

.metric-career::before {
  background: #2678e6;
}

.metric-report::before {
  background: #f28c28;
}

.intro-metrics strong {
  display: block;
  margin: 4px 0 8px;
  font-size: 1.28rem;
}

.metric-talent strong {
  color: var(--green-dark);
}

.metric-career strong {
  color: #1267d6;
}

.metric-report strong {
  color: #d96500;
}

.basis-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: #40574b;
}

.basis-list strong {
  color: var(--green-dark);
}

.basis-list .basis-emphasis,
.basis-list .basis-emphasis strong {
  color: #1267d6;
  font-weight: 850;
}

.intro-metrics p,
.basis p,
.warm p {
  margin-bottom: 0;
  color: #40574b;
}

.basis {
  margin-top: 18px;
}

.basis h2,
.report-section h2,
.chart-panel h2 {
  color: var(--green-dark);
}

.result-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.result-preview span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #e7f4eb;
  color: #315f48;
  font-weight: 700;
}

.privacy-note {
  margin: 16px 0 0;
  color: var(--muted);
}

.primary,
.secondary,
.ghost {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
}

.primary {
  margin-top: 24px;
  padding: 0 26px;
  color: #fff;
  background: linear-gradient(135deg, #2f7153, #56aa77 58%, #7aaec7);
  box-shadow: 0 12px 28px rgba(47, 113, 83, 0.22);
}

.secondary,
.ghost {
  padding: 0 18px;
  color: var(--green-dark);
  background: #e7f4eb;
}

.test-head,
.nav {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.progress-box {
  flex: 1;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #52665c;
  font-weight: 700;
}

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

#progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4e9b70, #7fb6c6);
  transition: width 0.25s ease;
}

.question-card {
  margin: 22px 0;
  border-radius: 22px;
  padding: clamp(22px, 4vw, 44px);
}

.dimension-pill {
  margin-bottom: 10px;
}

.question-card h2 {
  max-width: 860px;
  min-height: 92px;
  margin: 8px 0 24px;
  color: #1d342a;
  font-size: clamp(1.45rem, 3.2vw, 2.35rem);
}

.options {
  display: grid;
  gap: 12px;
}

.option {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 12px 16px;
  border: 1px solid #d9e7de;
  border-radius: 14px;
  color: #244236;
  background: #fff;
  text-align: left;
  transition: transform 0.18s ease, border 0.18s ease, background 0.18s ease;
}

.option:hover,
.option.selected {
  border-color: var(--green);
  background: #f0f9f3;
  transform: translateY(-1px);
}

.option b {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
}

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

.chart-panel,
.report-section {
  padding: clamp(18px, 3vw, 28px);
}

canvas {
  width: 100%;
  height: auto;
}

.report-hero {
  margin-bottom: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(247, 252, 248, 0.96)),
    linear-gradient(90deg, rgba(78, 155, 112, 0.12), rgba(128, 103, 199, 0.1));
}

.report-hero p {
  max-width: 880px;
  color: #40574b;
}

.report-hero h1 {
  margin-top: 22px;
  margin-bottom: 8px;
  color: #203a2f;
  font-size: clamp(1.65rem, 4vw, 2.55rem);
}

.report-hero h2 {
  margin-bottom: 16px;
  color: var(--green-dark);
  font-size: clamp(1.35rem, 3vw, 1.9rem);
}

#profile-summary p {
  margin-bottom: 10px;
}

#profile-summary em,
.core-points em {
  color: #e86f16;
  font-style: normal;
  font-weight: 900;
}

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

.score-snapshot > div {
  padding: 13px;
  border: 1px solid #dce9e1;
  border-radius: 14px;
  background: #fbfefc;
}

.score-snapshot strong {
  display: block;
  margin-bottom: 9px;
  color: #263c31;
}

.score-snapshot p {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
}

.score-snapshot span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--chip);
  background: color-mix(in srgb, var(--chip) 13%, #fff);
  font-size: 0.92rem;
  font-weight: 850;
}

.snapshot-low,
.snapshot-risk {
  background: #fffafa !important;
  border-color: #efd3d3 !important;
}

.snapshot-low strong,
.snapshot-risk strong {
  color: #cf2525;
}

.core-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.core-points div {
  padding: 14px;
  border: 1px solid #dce9e1;
  border-radius: 14px;
  background: #fbfefc;
}

.core-points strong {
  display: block;
  margin-bottom: 6px;
  color: var(--green-dark);
}

.core-points p {
  margin: 0;
  color: #52665c;
  font-size: 0.95rem;
}

.famous-line {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  background: #fffaf0;
}

.section-note {
  margin: -4px 0 16px;
  color: var(--muted);
}

.tap-hint {
  margin: -2px 0 14px;
  color: #df2f2f;
  font-weight: 850;
  text-align: right;
}

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

.detail-item {
  overflow: hidden;
  border: 1px solid #dce9e1;
  border-radius: 14px;
  background: #fbfefc;
}

.detail-item summary {
  display: grid;
  grid-template-columns: 42px minmax(58px, 96px) minmax(52px, 1fr) 36px minmax(86px, auto) 22px;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 13px 15px;
  cursor: pointer;
  color: #244236;
  font-weight: 850;
  list-style: none;
}

.detail-item summary::-webkit-details-marker {
  display: none;
}

.detail-dot {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
}

.detail-name {
  color: #1f342b;
  font-size: 1.05rem;
}

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

.mini-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.raw-score {
  color: #27384f;
  font-size: 1.12rem;
  font-weight: 900;
  text-align: right;
}

.level-badge {
  justify-self: end;
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 850;
}

.level-strong {
  color: #1a7c53;
  background: #dcf8ea;
}

.level-mid {
  color: #7a45d8;
  background: #f0e8ff;
}

.level-low {
  color: #b06d00;
  background: #fff2bd;
}

.chevron {
  color: #a0aaa4;
  font-size: 1.2rem;
  transition: transform 0.18s ease;
}

.detail-item[open] .chevron {
  transform: rotate(180deg);
}

.detail-item .deep-copy {
  padding: 0 15px 15px;
  color: #4b6257;
  border-left: 5px solid var(--green);
  margin: 0 15px 15px 57px;
  padding: 16px 16px 14px;
  border-radius: 0 14px 14px 0;
  background: #fbfbfa;
}

.detail-item p {
  margin-bottom: 8px;
}

.deep-copy .quote {
  color: #d49a2f;
  font-weight: 850;
}

.deep-copy h3 {
  margin: 14px 0 6px;
  color: #283b32;
  font-size: 1rem;
}

.deep-copy ul {
  margin: 0;
  padding-left: 20px;
}

.deep-copy li {
  margin: 4px 0;
}

.cross-card {
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid #cfe5d8;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(250, 255, 252, 0.98)),
    linear-gradient(90deg, rgba(38, 120, 230, 0.08), rgba(242, 140, 40, 0.08));
  box-shadow: 0 14px 34px rgba(45, 105, 75, 0.1);
}

.cross-title-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.cross-kicker {
  color: #1267d6;
  font-weight: 850;
}

.cross-title-row strong {
  color: var(--green-dark);
  font-size: 1.35rem;
}

.cross-lead {
  color: #40574b;
  font-size: 1.05rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.tag-row span {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--tag);
  background: color-mix(in srgb, var(--tag) 14%, #fff);
  font-weight: 850;
}

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

.cross-grid div {
  padding: 16px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e1ece5;
}

.cross-grid div:nth-child(1) {
  border-left: 4px solid #2678e6;
}

.cross-grid div:nth-child(2) {
  border-left: 4px solid #f28c28;
}

.cross-grid div:nth-child(3) {
  border-left: 4px solid #df2f2f;
}

.cross-grid div:nth-child(4) {
  border-left: 4px solid #20a464;
}

.cross-grid h3 {
  margin: 0 0 7px;
  color: #263c31;
  font-size: 1.08rem;
}

.cross-grid p {
  margin: 0;
  color: #52665c;
  line-height: 1.78;
}

.cross-grid b,
.cross-lead b {
  color: #e86f16;
}

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

.rank-row {
  display: grid;
  grid-template-columns: minmax(86px, 150px) 1fr 48px;
  gap: 12px;
  align-items: center;
}

.bar-track {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8f0eb;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
}

.score {
  color: #476155;
  font-weight: 800;
  text-align: right;
}

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

.advice-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 64px;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid #dce9e1;
  border-radius: 15px;
  background: #fbfefc;
}

.advice-index {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--blue));
  font-weight: 900;
}

.advice-row h3 {
  margin: 0 0 4px;
  color: #e86f16;
  font-size: 1.05rem;
}

.advice-row p {
  margin: 0;
  color: var(--muted);
}

.advice-tags {
  color: #c78300 !important;
  font-weight: 750;
}

.advice-detail {
  margin-top: 7px !important;
  color: #435d51 !important;
  line-height: 1.7;
}

.advice-row > strong {
  color: var(--green-dark);
  font-size: 1.45rem;
  text-align: right;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.mini-card {
  border: 1px solid #dce9e1;
  border-radius: 14px;
  background: #fbfefc;
  padding: 16px;
}

.mini-card strong {
  display: block;
  margin-bottom: 8px;
  color: #234737;
  font-size: 1.05rem;
}

.mini-card p {
  margin-bottom: 0;
  color: #52665c;
}

.warm {
  background: #f7fbf4;
}

.risk {
  border-color: #f2b8b8;
  background: #fff6f6;
}

.risk h2 {
  color: #df2f2f;
  font-weight: 950;
}

.risk-card {
  border-color: #f1c7c7;
  background: #fffafa;
}

.risk-card strong {
  color: #cf2525;
}

.risk-card p + p {
  margin-top: 8px;
  color: #8f3939;
}

@media (max-width: 760px) {
  .intro-metrics,
  .report-grid,
  .cards,
  .core-points,
  .score-snapshot,
  .cross-grid {
    grid-template-columns: 1fr;
  }

  .test-head,
  .nav {
    align-items: stretch;
  }

  .test-head {
    flex-direction: column;
  }

  .rank-row {
    grid-template-columns: 86px 1fr 42px;
  }

  .advice-row {
    grid-template-columns: 38px minmax(0, 1fr) 52px;
  }

  .detail-item summary {
    grid-template-columns: 34px minmax(48px, 66px) minmax(42px, 1fr) 30px minmax(72px, auto) 18px;
    gap: 7px;
    padding: 12px 10px;
  }

  .detail-dot {
    width: 31px;
    height: 31px;
  }

  .detail-name {
    font-size: 1rem;
  }

  .level-badge {
    padding: 4px 8px;
    font-size: 0.86rem;
  }

  .detail-item .deep-copy {
    margin: 0 10px 12px 44px;
    padding: 14px 13px;
  }
}

@media (max-width: 390px) {
  .shell {
    width: min(100% - 18px, 1080px);
  }

  #intro-screen,
  .report-hero {
    padding: 22px 18px;
  }

  .chart-panel,
  .report-section {
    padding: 17px 13px;
  }

  .raw-score {
    font-size: 1rem;
  }

  .mini-track {
    min-width: 42px;
  }
}

.access-panel {
  margin: 24px 0 4px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
}

.access-panel.is-valid {
  border-color: #a9d6b7;
  background: #eff9f2;
}

.access-panel.is-invalid {
  border-color: #e6b9b9;
  background: #fff5f5;
}

.access-status-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.access-status-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.primary:disabled,
.secondary:disabled,
.ghost:disabled {
  cursor: not-allowed;
  filter: grayscale(0.55);
  opacity: 0.55;
  box-shadow: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(24, 49, 39, 0.36);
}

.modal.is-open {
  display: flex;
}

.modal-card {
  position: relative;
  width: min(430px, 100%);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.modal-card h2 {
  margin-bottom: 10px;
}

.modal-card p {
  color: var(--muted);
}

.modal-card .primary {
  width: 100%;
  margin-top: 0;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: var(--green-dark);
  background: #e7f4eb;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.modal-card label {
  display: block;
  margin: 18px 0 8px;
  color: var(--muted);
  font-weight: 700;
}

.modal-card input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  font: inherit;
}

.modal-card input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(78, 155, 112, 0.16);
}

.error-text {
  min-height: 24px;
  margin: 8px 0 12px;
  color: var(--coral);
  font-size: 0.94rem;
}
