/* ========== 浅色 · 铁道主题 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #f4f7fc;
  --card: #ffffff;
  --line: #dbe4f2;
  --txt: #16295b;
  --muted: #6b7a99;
  --primary: #1e40af;
  --primary-2: #2563eb;
  --accent: #d97706;
  --c0: #94a3b8; --c1: #2563eb; --c2: #16a34a; --c3: #d97706;
  --shadow: 0 6px 22px rgba(23, 43, 99, .07);
}
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background-image:
    radial-gradient(900px 420px at 50% -8%, rgba(30, 64, 175, .08), transparent 60%),
    linear-gradient(rgba(30, 64, 175, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 64, 175, .045) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
  overflow-x: hidden;
  padding-bottom: 10px;
}

/* ========== 等比缩放舞台 ========== */
#stage { position: relative; width: 1600px; left: 50%; transform-origin: top center; padding-bottom: 30px; }

/* ========== 头部 ========== */
.top { text-align: center; padding: 30px 20px 10px; }
.school-tag {
  display: inline-block; font-size: 11px; letter-spacing: 2px; color: var(--primary);
  border: 1px solid #b9c9ee; border-radius: 999px; padding: 4px 16px;
  margin-bottom: 12px; background: #fff; box-shadow: var(--shadow);
}
.top h1 { font-size: 30px; font-weight: 800; letter-spacing: 2px; color: #122c6e; }
.top h1 em { font-style: normal; color: var(--primary-2); }
.top .sub { margin-top: 8px; color: var(--muted); font-size: 12px; letter-spacing: 1px; }

/* ========== 铁道装饰：动车 + 轨道 ========== */
.railway { position: relative; height: 52px; max-width: 1500px; margin: 4px auto 0; overflow: hidden; }
.railway .track {
  position: absolute; left: 40px; right: 40px; bottom: 6px; height: 10px;
  border-top: 2px solid #b6c3dd; border-bottom: 2px solid #b6c3dd;
  background: repeating-linear-gradient(90deg, #c9d5ea 0 10px, transparent 10px 26px);
  background-position: 0 3px; border-radius: 2px;
}
.railway .train { position: absolute; bottom: 16px; left: 0; width: 250px; opacity: .5; animation: ride 30s linear infinite; }
@keyframes ride { from { transform: translateX(-280px); } to { transform: translateX(1620px); } }

/* ========== 档位 Tab：成长线路 ========== */
.tabs-wrap {
  position: relative; z-index: 60;
  padding: 12px 50px 8px;
}
.tabs {
  position: relative; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 8px 9px; box-shadow: var(--shadow);
}
.tabs::before {
  content: ''; position: absolute; left: 10%; right: 10%; top: 19px; height: 3px;
  background: linear-gradient(90deg, #c3d2f0, var(--primary)); border-radius: 2px;
}
.tab {
  appearance: none; border: 0; background: none; cursor: pointer; text-align: center;
  padding: 0 4px; color: var(--muted); position: relative; transition: color .25s;
}
.tab .stop {
  position: relative; z-index: 1; display: block; width: 15px; height: 15px; margin: 0 auto;
  border-radius: 50%; background: #fff; border: 3px solid #a9bce4; transition: all .3s;
}
.tab b { display: block; margin-top: 7px; font-size: 17px; font-style: italic; letter-spacing: 1px; }
.tab span { display: block; margin-top: 2px; font-size: 11px; }
.tab:hover { color: var(--txt); }
.tab:hover .stop { border-color: var(--primary-2); }
.tab.done .stop { background: var(--primary); border-color: var(--primary); }
.tab.on { color: #122c6e; }
.tab.on .stop {
  background: var(--primary); border-color: var(--primary);
  box-shadow: 0 0 0 5px rgba(30, 64, 175, .16);
}
.tab.on b { color: var(--primary); }
.level-desc { margin: 9px auto 0; text-align: center; font-size: 12px; color: var(--muted); }
.level-desc b { color: var(--primary); }

/* ========== 总览大卡片 ========== */
.ov-card {
  margin: 16px 50px 0; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 18px 20px 20px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.ov-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), #7ea4f5 55%, transparent);
}
.ov-head { display: flex; align-items: center; gap: 12px; }
.ov-head h2 { font-size: 17px; letter-spacing: 1.5px; color: #122c6e; }
.ov-head h2 i { font-style: normal; color: var(--primary-2); margin-right: 4px; }
.ov-level {
  font-size: 12px; font-weight: 700; color: #fff; background: var(--primary);
  border-radius: 999px; padding: 3px 14px; letter-spacing: 1px;
}
.ov-note { margin-left: auto; font-size: 11px; color: #93a1bd; }
.overview { margin: 14px 0 0; display: grid; grid-template-columns: 330px 1fr 290px 350px; gap: 14px; }
.ov-panel {
  background: #f8fafd; border: 1px solid #e6ecf6; border-radius: 12px;
  padding: 14px 16px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; min-height: 272px;
  animation: fadeUp .55s ease-out both;
}
.ov-panel:nth-child(2) { animation-delay: .08s; }
.ov-panel:nth-child(3) { animation-delay: .16s; }
.ov-panel:nth-child(4) { animation-delay: .24s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
.ov-title { font-size: 12px; color: var(--muted); letter-spacing: 2px; margin-bottom: 6px; }
.ov-title i { font-style: normal; color: var(--primary-2); }

.radar-wrap { flex: 1; display: flex; align-items: center; justify-content: center; }
.anim-radar { transform-box: view-box; transform-origin: 130px 112px; animation: radarIn .9s cubic-bezier(.2, .7, .3, 1) both; }
@keyframes radarIn { from { opacity: 0; transform: scale(.45); } }

.dist-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; margin: 16px 0 14px; background: #e8edf6; }
.dist-bar i { display: block; height: 100%; transform-origin: left; animation: growX .9s ease-out both; }
@keyframes growX { from { transform: scaleX(0); } }
.dist-rows { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; align-content: space-evenly; }
.dist-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #44547a; }
.dist-row .dot { width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); flex: none; }
.dist-row .dl { white-space: nowrap; font-weight: 600; color: #33436b; }
.dist-row b { margin-left: auto; color: #122c6e; font-size: 14px; }
.dist-row small { color: var(--muted); }

.kpi-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; margin-top: 8px; }
.kpi { background: #fff; border: 1px solid #e3ebf8; border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; justify-content: center; }
.kpi b { display: block; font-size: 27px; color: #122c6e; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi b em { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 500; }
.kpi span { font-size: 11px; color: var(--muted); letter-spacing: 1px; }
.kpi.hl { background: linear-gradient(135deg, #eaf1ff, #f8fbff); border-color: #c3d5f7; }
.kpi.hl b { color: var(--primary); }

.curve-wrap { flex: 1; display: flex; align-items: center; justify-content: center; }
.curve-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: drawLine 1.2s .15s ease-out forwards; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }
.curve-dot-now { animation: popIn .4s 1s both; }
@keyframes popIn { from { opacity: 0; } }

/* ========== 搜索/筛选 ========== */
.controls { margin: 16px 50px 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#search {
  flex: 1; min-width: 240px; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; color: var(--txt); font-size: 13px; padding: 9px 14px; outline: none;
  box-shadow: var(--shadow); transition: border-color .2s;
}
#search:focus { border-color: var(--primary-2); }
#search::placeholder { color: #93a1bd; }
.chips { display: flex; gap: 8px; }
.chip {
  appearance: none; cursor: pointer; font-size: 12px; padding: 6px 14px; border-radius: 999px;
  background: var(--card); color: var(--muted); border: 1px solid var(--line); transition: all .2s;
}
.chip:hover { color: var(--primary); border-color: #b9c9ee; }
.chip.on { color: #fff; border-color: var(--primary); background: var(--primary); }
.filter-info { font-size: 12px; color: var(--primary); min-width: 90px; }

/* ========== 能力卡片 ========== */
.cards { margin: 14px 50px 0; display: flex; flex-direction: column; gap: 14px; }
.row { display: grid; gap: 14px; }
.row.r1, .row.r2 { grid-template-columns: 1fr; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--dc), color-mix(in srgb, var(--dc) 35%, #fff) 70%, transparent);
}
.card-head { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.card-badge {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--dc) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--dc) 30%, #fff);
  color: var(--dc);
}
.card-badge .ic { width: 19px; height: 19px; }
.card-title b { font-size: 15px; letter-spacing: 1px; color: #122c6e; }
.card-title span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.ring { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-txt b { font-size: 15px; color: #122c6e; font-variant-numeric: tabular-nums; }
.ring .ring-txt span { display: block; font-size: 10px; color: var(--muted); }

.groups { display: flex; flex-direction: column; gap: 8px; }
.group { transition: opacity .2s; }
.g-head {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: #f8fafd; border: 1px solid #e6ecf6; border-radius: 10px;
  padding: 10px 14px; transition: background .2s, border-color .2s;
  user-select: none;
}
.g-head:hover { background: #eef4fe; border-color: #c9d9f5; }
.g-arrow {
  width: 8px; height: 8px; flex: none; margin-left: 2px;
  border-right: 2px solid #93a1bd; border-bottom: 2px solid #93a1bd;
  transform: rotate(45deg); transition: transform .25s;
}
.group.open .g-arrow { transform: rotate(225deg); }
.g-head .g-name { font-size: 13px; color: #22345f; letter-spacing: .5px; font-weight: 600; }
.g-head .g-code { margin-left: auto; font-size: 10px; color: #93a1bd; }
.g-head .g-bar { width: 150px; height: 5px; border-radius: 3px; background: #dde5f2; overflow: hidden; flex: none; }
.g-head .g-bar i { display: block; height: 100%; transition: width .6s; }
.g-head .g-tag { min-width: 54px; }
.g-items { display: none; padding: 4px 6px 2px; }
.group.open .g-items {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 22px;
  animation: fadeUp .3s ease-out;
}

.item { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 6px; transition: background .2s; }
.item:hover { background: #eef4fe; }
.item .dia { width: 7px; height: 7px; flex: none; background: var(--dc); transform: rotate(45deg); border-radius: 1.5px; opacity: .85; }
.item .name { font-size: 12px; color: #33436b; line-height: 1.45; }
.item .bar { margin-left: auto; width: 56px; height: 4px; flex: none; background: #e2e8f4; border-radius: 2px; overflow: hidden; }
.item .bar i { display: block; height: 100%; border-radius: 2px; transition: width .6s cubic-bezier(.3, .7, .3, 1), background-color .3s; }
.item .tag {
  flex: none; min-width: 54px; text-align: center; font-size: 11px; font-weight: 600;
  padding: 2.5px 6px; border-radius: 5px; border: 1px solid; transition: all .3s;
}
.t0 { color: #64748b; border-color: #d3dbe8; background: #f1f4f9; }
.t1 { color: #1667cc; border-color: #b9d4ff; background: #e8f1ff; }
.t2 { color: #0c8a4d; border-color: #b5e5c8; background: #e6f7ee; }
.t3 { color: #b45309; border-color: #ffd9a1; background: #fff4e0; }
.f0 { background: #94a3b8; } .f1 { background: #2563eb; } .f2 { background: #16a34a; } .f3 { background: #d97706; }
.item.hide, .group.hide, .card.hide { display: none; }
.cards.filtering { display: grid; grid-template-columns: 1fr; }
.cards.filtering .row { display: contents; }
.cards.filtering .group.open .g-items { grid-template-columns: repeat(3, 1fr); }

/* ========== 页脚 ========== */
.foot { margin: 22px 50px 0; }
.legend { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.note { margin-top: 12px; text-align: center; font-size: 11px; color: #93a1bd; line-height: 1.9; }

/* ========== 悬浮轨迹 ========== */
.tooltip {
  position: fixed; z-index: 100; pointer-events: none;
  background: #fff; border: 1px solid #c3d5f7; border-radius: 10px;
  padding: 10px 12px; box-shadow: 0 10px 34px rgba(23, 43, 99, .18); max-width: 340px;
}
.tooltip .tt-name { font-size: 12px; color: #122c6e; font-weight: 600; margin-bottom: 8px; }
.tooltip .tt-row { display: flex; gap: 6px; }
.tooltip .tt-cell {
  flex: 1; text-align: center; font-size: 10px; padding: 4px 2px; border-radius: 5px;
  border: 1px solid #e3ebf8; color: var(--muted); background: #f6f9fe;
}
.tooltip .tt-cell b { display: block; font-size: 10px; margin-bottom: 2px; color: #93a1bd; }
.tooltip .tt-cell.now { border-color: var(--primary-2); color: #122c6e; box-shadow: 0 0 8px rgba(37, 99, 235, .25); background: #eaf1ff; }

/* ========== 悬浮档位坞 ========== */
.dock {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  display: flex; gap: 6px; background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 8px; box-shadow: 0 8px 24px rgba(23, 43, 99, .16);
}
.dock button {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line);
  background: #f6f9fe; color: var(--muted); font-size: 11px; font-style: italic;
  font-weight: 700; cursor: pointer; transition: all .2s;
}
.dock button:hover { color: var(--primary); border-color: #b9c9ee; }
.dock button.on {
  background: var(--primary); border-color: var(--primary); color: #fff;
  box-shadow: 0 2px 10px rgba(30, 64, 175, .4);
}

/* ========== 无障碍 ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
