:root {
  --blue: #7ba9ff;
  --blue-soft: #eaf2ff;
  --pink: #ffb9dc;
  --pink-soft: #fff0f8;
  --mint: #b8f1dd;
  --mint-soft: #eafbf5;
  --ink: #33415c;
  --muted: #7c8aa5;
  --card: rgba(255, 255, 255, 0.88);
  --line: rgba(124, 169, 255, 0.18);
  --shadow: 0 18px 45px rgba(113, 155, 255, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 15% 8%, rgba(255, 185, 220, 0.28) 0 8%, transparent 8.2%),
    radial-gradient(circle at 84% 14%, rgba(184, 241, 221, 0.32) 0 11%, transparent 11.2%),
    radial-gradient(circle at 20% 70%, rgba(123, 169, 255, 0.22) 0 9%, transparent 9.2%),
    linear-gradient(145deg, #f8fbff 0%, #fff6fb 52%, #f1fffa 100%);
  background-size: 240px 240px, 280px 280px, 320px 320px, auto;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: 18px 16px 70px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 24px 20px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.9) 0 7%, transparent 7.5%),
    radial-gradient(circle at 70% 65%, rgba(255, 255, 255, 0.8) 0 6%, transparent 6.5%),
    linear-gradient(135deg, var(--pink), var(--blue));
  opacity: 0.5;
}

.hero__top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

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

h1 {
  margin-bottom: 8px;
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.hero__sub {
  position: relative;
  z-index: 1;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.level-badge {
  flex: 0 0 auto;
  padding: 10px 13px;
  border-radius: 999px;
  color: #3e5b9c;
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.hero__stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat {
  padding: 13px 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.stat strong {
  display: block;
  margin-bottom: 3px;
  font-size: 22px;
  color: var(--blue);
}

.stat span {
  color: var(--muted);
  font-size: 11px;
}

.tabs {
  position: sticky;
  top: 8px;
  z-index: 20;
  display: flex;
  gap: 6px;
  margin: 18px 0;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 25px rgba(113, 155, 255, 0.10);
  backdrop-filter: blur(12px);
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: 1 0 auto;
  padding: 10px 12px;
  border: 0;
  border-radius: 13px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: 0.2s ease;
}

.tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #98c4ff);
  box-shadow: 0 8px 18px rgba(123, 169, 255, 0.28);
}

.view {
  display: none;
}

.view.is-active {
  display: block;
  animation: rise 0.28s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin: 22px 0 14px;
}

.ghost-btn {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--blue);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.path-intro,
.note-card,
.gap-card {
  margin-bottom: 16px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.path-intro {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.path-intro p {
  margin-bottom: 0;
}

.dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
}

.dot--blue {
  background: var(--blue);
}

.stage-list {
  display: grid;
  gap: 14px;
}

.stage-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.stage-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 17px 13px;
}

.stage-id {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #9bc6ff);
  font-weight: 800;
  font-size: 12px;
}

.stage-title {
  flex: 1;
  min-width: 0;
}

.stage-title h3 {
  margin: 0 0 3px;
  font-size: 17px;
}

.stage-title p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.stage-progress {
  flex: 0 0 auto;
  min-width: 56px;
  text-align: right;
}

.stage-progress strong {
  display: block;
  color: var(--blue);
  font-size: 17px;
}

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

.stage-bar {
  height: 7px;
  margin: 0 17px 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2fb;
}

.stage-bar__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--pink), var(--mint));
  transition: width 0.35s ease;
}

.stage-body {
  display: none;
  padding: 0 17px 17px;
}

.lesson-block {
  margin-bottom: 8px;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(234, 242, 255, 0.9), rgba(255, 240, 248, 0.7));
}

.lesson-block__head {
  margin-bottom: 10px;
  color: #3e5b9c;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.lesson-item {
  margin-bottom: 11px;
}

.lesson-item:last-child {
  margin-bottom: 0;
}

.lesson-item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 13px;
}

.lesson-item p,
.practice p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.practice {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px dashed rgba(123, 169, 255, 0.25);
}

.practice strong {
  display: block;
  margin-bottom: 5px;
  color: #b15f8b;
  font-size: 12px;
}

.stage-card.is-open .stage-body {
  display: block;
}

.topic {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(124, 169, 255, 0.16);
}

.topic:last-child {
  border-bottom: 0;
}

.topic input {
  margin-top: 3px;
  accent-color: var(--blue);
}

.topic label {
  flex: 1;
  font-size: 13px;
  line-height: 1.55;
}

.topic small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.stage-work {
  margin-top: 12px;
  padding: 13px;
  border-radius: 16px;
  background: var(--mint-soft);
}

.stage-work p {
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 700;
  color: #29725d;
}

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

.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.workbench-grid {
  display: grid;
  gap: 14px;
}

.order-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.order-card.is-locked {
  opacity: 0.62;
}

.order-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.order-head h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.order-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.status-pill {
  flex: 0 0 auto;
  padding: 7px 9px;
  border-radius: 999px;
  color: #7c8aa5;
  background: #edf2fb;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--pink), #ff9ecf);
}

.order-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.flow-step {
  padding: 6px 8px;
  border-radius: 9px;
  color: var(--muted);
  background: #f3f6fc;
  font-size: 10px;
}

.flow-step.is-done {
  color: #277056;
  background: var(--mint);
}

.flow-step.is-current {
  color: #3e5b9c;
  background: var(--blue-soft);
  font-weight: 800;
}

.primary-btn,
.chat-input button {
  padding: 10px 13px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #94c4ff);
  box-shadow: 0 8px 18px rgba(123, 169, 255, 0.26);
  font-size: 12px;
  font-weight: 800;
}

.agent-roles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 14px 0 18px;
}

.role-btn {
  padding: 13px 11px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  text-align: left;
}

.role-btn strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}

.role-btn span {
  color: var(--muted);
  font-size: 11px;
}

.chat {
  min-height: 300px;
  max-height: 480px;
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
}

.chat-msg {
  margin-bottom: 12px;
  padding: 11px 12px;
  border-radius: 15px;
  background: #f5f8ff;
  font-size: 13px;
  line-height: 1.65;
}

.chat-msg--ai {
  background: var(--mint-soft);
}

.chat-msg__name {
  display: block;
  margin-bottom: 3px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.chat-input {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.chat-input input {
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.radar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}

#radarCanvas {
  width: min(100%, 360px);
  height: auto;
}

.radar-legend {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  width: 100%;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.legend-item i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
}

.gap-card {
  margin-top: 14px;
}

.gap-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.gap-card p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

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

.trend-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.trend-card__tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #8a4f72;
  background: var(--pink-soft);
  font-size: 10px;
  font-weight: 800;
}

.trend-card h3 {
  margin: 0 0 5px;
  font-size: 15px;
}

.trend-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  max-width: calc(100% - 40px);
  padding: 11px 15px;
  border-radius: 14px;
  color: #fff;
  background: rgba(51, 65, 92, 0.92);
  box-shadow: 0 12px 30px rgba(51, 65, 92, 0.28);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 15px);
  transition: 0.25s ease;
}

.toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 640px) {
  .app {
    padding: 26px 24px 80px;
  }

  h1 {
    font-size: 34px;
  }

  .agent-roles {
    grid-template-columns: repeat(3, 1fr);
  }

  .radar-wrap {
    flex-direction: row;
  }

  .radar-legend {
    width: 220px;
  }
}
