@import "tokens.css";

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  padding-top: calc(var(--nav-h) + var(--safe-top));
  padding-bottom: calc(var(--bottom-h) + var(--safe-bottom));
  min-height: 100dvh;
}

a { color: var(--nku); }

/* ── 顶栏 ── */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: calc(var(--nav-h) + var(--safe-top));
  padding-top: var(--safe-top);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 16px;
  padding-right: 16px;
}

.app-brand {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--nku);
  text-decoration: none;
  white-space: nowrap;
}

.app-brand span {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.82rem;
  margin-left: 6px;
}

.app-header-link {
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #f0d4c8;
  background: #fff8f5;
  color: var(--nku);
  white-space: nowrap;
}

.app-header-link-alt {
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
}

/* ── 底栏 ── */
.app-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: calc(var(--bottom-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: #fff;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.app-bottom a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  font-size: 0.65rem;
  color: var(--muted);
  padding: 6px 2px;
  line-height: 1.2;
  text-align: center;
}

.app-bottom a.active {
  color: var(--nku);
  font-weight: 600;
}

.app-bottom-icon {
  font-size: 1.15rem;
  line-height: 1;
}

/* ── 主内容 ── */
.page-main {
  padding: 16px;
  max-width: 640px;
  margin: 0 auto;
}

.hero-block {
  background: linear-gradient(135deg, var(--nku) 0%, var(--nku-light) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 22px 18px;
  margin-bottom: 16px;
}

.hero-block h1 {
  font-size: 1.25rem;
  font-weight: 700;
}

.hero-block p {
  margin-top: 8px;
  font-size: 0.88rem;
  opacity: 0.92;
}

.section-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 20px 0 10px;
}

/* ── 卡片 ── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
}

.card h2, .card h3 {
  font-size: 1rem;
  color: var(--nku);
}

.card p {
  margin-top: 6px;
  font-size: 0.88rem;
  color: #333;
}

.card-muted {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ── 分流入口 ── */
.triage-grid {
  display: grid;
  gap: 10px;
}

.triage-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s;
}

.triage-btn:active {
  box-shadow: var(--shadow);
}

.triage-btn strong {
  display: block;
  font-size: 1rem;
  color: var(--nku);
}

.triage-btn span {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--muted);
}

.triage-btn em {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.78rem;
  font-style: normal;
  color: var(--accent);
}

/* ── 叙事滑动卡片 ── */
.story-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
}

.story-scroll::-webkit-scrollbar { display: none; }

.story-card {
  flex: 0 0 78%;
  max-width: 280px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.story-card h3 {
  font-size: 0.92rem;
  color: var(--nku);
}

.story-card p {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}

.story-card a {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.78rem;
}

/* ── 按钮 ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--nku);
  color: #fff;
}

.btn-outline {
  background: #fff;
  color: var(--nku);
  border: 1px solid var(--line);
}

.btn-block {
  display: flex;
  width: 100%;
}

/* ── 表单 ── */
.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 16px;
  background: #fff;
}

/* ── 标签 ── */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f3ebe8;
  color: var(--nku);
}

.badge-safe { background: #e8f5e9; color: #2e7d32; }
.badge-gold { background: #fff8e8; color: #9a7200; }

/* ── 占位 / 空态 ── */
.placeholder {
  text-align: center;
  padding: 32px 16px;
  color: var(--muted);
  font-size: 0.88rem;
}

.disclaimer {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 8px 0 12px;
}

/* ── Toast ── */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottom-h) + 16px + var(--safe-bottom));
  transform: translateX(-50%) translateY(20px);
  background: rgba(26, 26, 26, 0.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 200;
  max-width: 90vw;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── 留资 FAB ── */
.lead-fab {
  position: fixed;
  right: 16px;
  bottom: calc(var(--bottom-h) + 12px + var(--safe-bottom));
  z-index: 90;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.lead-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.45);
  align-items: flex-end;
  justify-content: center;
}

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

.lead-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 20px 16px calc(16px + var(--safe-bottom));
}

.lead-sheet h3 { color: var(--nku); }

.lead-sheet > p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 6px 0 14px;
}

.lead-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.lead-actions button {
  padding: 12px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  cursor: pointer;
}

/* ── 详情折叠 ── */
details.v2-details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
}

details.v2-details summary {
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 600;
  color: var(--nku);
  list-style: none;
}

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

details.v2-details .v2-details-body {
  padding: 0 16px 14px;
  font-size: 0.88rem;
}

@media (min-width: 640px) {
  .story-card { flex: 0 0 240px; }
}

/* ── 数据表格 ── */
.data-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  margin-bottom: 12px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.data-table th,
.data-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.data-table th:first-child,
.data-table td:first-child {
  text-align: left;
}

.data-table thead th {
  background: #f9f6f4;
  font-weight: 600;
}

.name-cell strong { color: var(--nku); font-size: 0.85rem; }

.name-cell .admission-special { color: #6a1b9a; }
.name-cell .admission-early { color: var(--muted); }

.admission-guarantee {
  display: inline-block;
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: #e8f5e9;
  color: #2e7d32;
  margin-left: 4px;
  vertical-align: middle;
}

.name-cell .sub {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: normal;
  margin-top: 4px;
  line-height: 1.4;
}

.data-table-wide { min-width: 640px; }

.admission-policy {
  border-color: var(--accent);
  background: #fffdf8;
  margin-bottom: 12px;
}

.admission-policy p {
  font-size: 0.88rem;
  margin: 0;
  line-height: 1.5;
}

.admission-full-details { margin-top: 4px; }

.admission-notes {
  font-size: 0.78rem;
  line-height: 1.55;
  margin: 4px 0 12px;
  padding: 10px 12px;
  background: #f9f6f4;
  border-radius: var(--radius-sm);
}

.admission-notes-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--nku);
  margin: 0 0 6px;
}

.admission-notes-list {
  margin: 0;
  padding-left: 18px;
}

.admission-notes-list li {
  margin: 5px 0;
  color: var(--muted);
}

.note-purple {
  color: #6a1b9a;
  font-weight: 600;
}

.guide-g-grid {
  display: grid;
  gap: 10px;
  margin: 10px 0 16px;
}

.guide-g-card {
  position: relative;
  padding-top: 12px;
}

.guide-g-count {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
}

.guide-g-card h3 {
  font-size: 0.92rem;
  margin-bottom: 6px;
  padding-right: 52px;
  line-height: 1.35;
}

.guide-g-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--nku);
  text-decoration: none;
}

.guide-lead {
  font-size: 0.88rem;
  margin: 0 0 10px;
  line-height: 1.5;
}

.section-sublabel {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 4px 0 10px;
  font-weight: 600;
}

.special-points {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.special-points li { margin: 6px 0; }

#special .card { margin-bottom: 10px; }

/* ── 计划标签 ── */
.plan-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }

.plan-tag {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 6px;
}

.plan-tag-safe { background: #e8f5e9; color: #2e7d32; }
.plan-tag-special { background: #f3e8ff; color: #6a1b9a; }
.plan-tag-info { background: #f3ebe8; color: var(--nku); }

.retention-tag {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--accent);
}

/* ── 弹层 ── */
.v2-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0, 0, 0, 0.45);
  align-items: flex-end;
  justify-content: center;
}

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

.v2-sheet {
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 18px 16px calc(20px + var(--safe-bottom));
}

.v2-sheet .close-btn {
  float: right;
  border: none;
  background: #f3ebe8;
  color: var(--nku);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
}

.v2-sheet h2 {
  font-size: 1.05rem;
  color: var(--nku);
  margin-bottom: 6px;
  padding-right: 36px;
}

.v2-sheet .meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.v2-sheet .hl {
  margin-top: 12px;
  font-size: 0.9rem;
  line-height: 1.65;
}

.v2-layer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.v2-layer-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}

.link-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.stream-bar-item { margin: 8px 0; }

.stream-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  margin-bottom: 4px;
}

.stream-bar-track {
  height: 6px;
  background: #f0ebe8;
  border-radius: 999px;
  overflow: hidden;
}

.stream-bar-fill {
  height: 100%;
  background: var(--nku);
  border-radius: 999px;
}

.career-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.career-mini-item {
  text-align: center;
  padding: 10px 6px;
  background: #f9f6f4;
  border-radius: 8px;
  font-size: 0.78rem;
}

.career-mini-item b {
  display: block;
  font-size: 1rem;
  color: var(--nku);
}

.advantage-list {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 0.85rem;
}

.advantage-list li { margin: 4px 0; }

/* ── majors 三 Tab ── */
.majors-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.majors-tab {
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.majors-tab.active {
  background: var(--nku);
  border-color: var(--nku);
  color: #fff;
}

.cat-pills-wrap { margin-bottom: 10px; }

.cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cat-pill {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
}

.cat-pill.active {
  background: #f3ebe8;
  border-color: var(--nku);
  color: var(--nku);
  font-weight: 600;
}

.majors-quiz { margin-bottom: 10px; }

.quiz-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quiz-btns button {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.78rem;
  color: var(--nku);
  cursor: pointer;
}

.map-line {
  font-size: 0.84rem;
  margin-top: 8px;
  line-height: 1.45;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.chip-btn {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f9f6f4;
  font-size: 0.78rem;
  color: var(--nku);
  cursor: pointer;
}

.chip-btn-sm { font-size: 0.72rem; padding: 3px 8px; }

.college-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.college-tag {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f3ebe8;
  color: var(--nku);
}

.gd-plan-item {
  margin: 10px 0;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.gd-plan-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* ── 毕业去向 Tab ── */
.career-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.career-tab {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.career-tab.active {
  background: var(--nku);
  border-color: var(--nku);
  color: #fff;
}

.career-proportion {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
  background: #f0ebe8;
}

.career-proportion-seg { height: 100%; min-width: 3px; }

.career-proportion-domestic { background: linear-gradient(90deg, var(--nku), #9e1818); }
.career-proportion-abroad { background: linear-gradient(90deg, var(--accent), #e0a840); }
.career-proportion-employ { background: linear-gradient(90deg, #3d6b8c, #5a8fb0); }

.career-proportion-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--muted);
}

.career-proportion-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.career-proportion-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--nku);
}

.career-proportion-legend span:nth-child(2) i { background: var(--accent); }
.career-proportion-legend span:nth-child(3) i { background: #3d6b8c; }

.emp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.emp-tag {
  font-size: 0.78rem;
  padding: 6px 10px;
  border-radius: 8px;
  background: #f9f6f4;
  color: var(--text);
  line-height: 1.35;
}

#career .card h3 {
  font-size: 0.92rem;
  margin-bottom: 8px;
  color: var(--nku);
}

/* ── 毕业去向证据条 ── */
.career-teaser {
  display: block;
  margin: 12px 0 16px;
  padding: 14px 14px 12px;
  border-radius: var(--radius);
  border: 1px solid #f0d4c8;
  background: linear-gradient(135deg, #fffaf7 0%, #fff 100%);
  text-decoration: none;
  color: inherit;
}

.career-teaser-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--nku);
  margin-bottom: 10px;
}

.career-teaser-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.career-teaser-stats span {
  text-align: center;
  padding: 8px 4px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.career-teaser-stats b {
  display: block;
  font-size: 1rem;
  color: var(--nku);
  line-height: 1.2;
}

.career-teaser-stats small {
  display: block;
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 2px;
}

.career-teaser-detail {
  margin: 10px 0 6px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.career-teaser-cta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
}

.career-teaser-inline {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 0.84rem;
  line-height: 1.5;
}

.career-teaser-inline-title {
  font-weight: 600;
  color: var(--nku);
  margin-bottom: 6px;
}

.career-teaser-inline a {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
