﻿/* ===== 升学罗盘样式 ===== */

:root {
  color-scheme: light;
  --bg: #eef3f8;
  --surface: #ffffff;
  --surface-strong: #f8fafc;
  --ink: #172033;
  --muted: #657084;
  --line: #d9e2ef;
  --blue: #1d4ed8;
  --blue-soft: #dbeafe;
  --green: #047857;
  --green-soft: #d1fae5;
  --amber: #b45309;
  --amber-soft: #fef3c7;
  --rose: #be123c;
  --rose-soft: #ffe4e6;
  --teal: #0f766e;
  --shadow: 0 18px 40px rgba(18, 30, 51, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(29, 78, 216, 0.12), transparent 28rem),
    radial-gradient(circle at 92% 20%, rgba(4, 120, 87, 0.11), transparent 22rem),
    linear-gradient(180deg, #f7fbff 0%, var(--bg) 48%, #edf4f1 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}


.expert-body {
  min-height: 100vh;
}

.expert-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 12px clamp(16px, 2.4vw, 28px);
  border-bottom: 1px solid rgba(217, 226, 239, 0.86);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.expert-topbar .brand-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.expert-topbar .brand-mini .mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.expert-topbar .back-link {
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}

.expert-topbar .back-link:hover {
  color: var(--blue);
  border-color: var(--blue);
}

.profile-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.profile-strip .field {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
}

.profile-strip .field strong {
  color: var(--ink);
  font-weight: 600;
}

.profile-strip input,
.profile-strip select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 13px;
  background: var(--surface);
  color: var(--ink);
  min-width: 0;
}

.profile-strip input[type="number"] {
  width: 88px;
}

.profile-strip input.rank-input {
  width: 100px;
  border-color: var(--blue);
  background: var(--blue-soft);
  font-weight: 600;
}

.profile-strip .go-btn {
  border: none;
  border-radius: 8px;
  padding: 7px 16px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
}

.profile-strip .go-btn:hover {
  background: #1740b0;
}

.expert-status {
  font-size: 12px;
  color: var(--muted);
  padding: 2px clamp(16px, 2.4vw, 28px);
}

.expert-status.is-error {
  color: var(--rose);
}

.expert-status.is-loading {
  color: var(--blue);
}

.expert-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 280px;
  gap: 16px;
  padding: 14px clamp(12px, 2vw, 24px) 40px;
  align-items: start;
}

@media (max-width: 1180px) {
  .expert-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .right-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .expert-layout {
    grid-template-columns: 1fr;
  }
}

.expert-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.expert-panel-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.expert-panel-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---------- 左侧筛选 ---------- */

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group .group-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.band-row {
  display: grid;
  grid-template-columns: 18px 1fr 1fr 1fr;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
}

.band-row .xw-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.band-row .band-toggle-dot,
.band-row .band-toggle-label {
  cursor: pointer;
  user-select: none;
  transition: opacity 0.15s ease;
}

.band-row .band-toggle-dot:hover,
.band-row .band-toggle-label:hover {
  opacity: 0.7;
}

.band-row .band-toggle-dot:focus-visible,
.band-row .band-toggle-label:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.band-row.is-band-disabled .band-toggle-dot {
  background: var(--line) !important;
}

.band-row.is-band-disabled .band-label {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--muted);
}

.band-row.is-band-disabled input {
  opacity: 0.45;
}

.xw-dot.rush, .badge.rush { background: var(--rose); }
.xw-dot.stable, .badge.stable { background: var(--blue); }
.xw-dot.safe, .badge.safe { background: var(--green); }

.band-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 5px;
  font-size: 11.5px;
}

.band-row .band-label {
  font-weight: 600;
  color: var(--ink);
}

.band-toggle-hint {
  font-size: 10px;
  color: var(--muted);
  margin: 6px 0 0;
  line-height: 1.4;
}

.preset-toggle {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}

.preset-toggle button {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  border-radius: 7px;
  padding: 5px 3px;
  font-size: 10.8px;
  color: var(--muted);
  white-space: nowrap;
}

.preset-toggle button.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 600;
}

.band-basis {
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--muted);
  background: var(--surface-strong);
  border: 1px dashed var(--line);
  border-radius: 7px;
  padding: 6px 8px;
  margin: 0 0 6px;
}

.band-basis.is-data {
  color: var(--blue);
  background: var(--blue-soft);
  border: 1px solid #b9d0fb;
  border-style: solid;
}

.band-basis.is-fallback {
  color: #a3590a;
  background: #fff0d8;
  border: 1px solid #f0caa0;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
  cursor: pointer;
  user-select: none;
}

.chip.active {
  background: var(--blue-soft);
  border-color: var(--blue);
  color: var(--blue);
  font-weight: 600;
}

.filter-reset {
  align-self: flex-start;
  font-size: 11.5px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 7px;
  padding: 5px 10px;
  background: none;
}

.filter-reset:hover {
  color: var(--rose);
  border-color: var(--rose);
}

/* ---------- 中间结果区 ---------- */

.result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

.result-toolbar strong {
  color: var(--ink);
  font-size: 14px;
}

.result-toolbar .toolbar-actions {
  display: flex;
  gap: 6px;
}

.result-toolbar .toolbar-actions button {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 11.5px;
  color: var(--muted);
}

.result-toolbar .toolbar-actions button:hover {
  color: var(--blue);
  border-color: var(--blue);
}

.school-card-list {
  display: flex;
  flex-direction: column;
}

.xw-school-card {
  border-bottom: 1px solid var(--line);
}

.xw-school-card:last-child {
  border-bottom: none;
}

.xw-school-card > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.xw-school-card > summary::-webkit-details-marker {
  display: none;
}

.xw-school-card .caret {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.xw-school-card[open] .caret {
  transform: rotate(90deg);
}

.xw-school-card .xw-school-name {
  font-weight: 700;
  font-size: 15px;
  background: linear-gradient(90deg, var(--ink), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.xw-school-card .xw-school-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.xw-school-card .mini-tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--surface-strong);
  color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.xw-school-card .mini-tag.is-985 { background: #fff0d8; color: #a3590a; border-color: #f0caa0; }
.xw-school-card .mini-tag.is-211 { background: var(--blue-soft); color: var(--blue); border-color: #b9d0fb; }
.xw-school-card .mini-tag.is-double { background: #ecdcfb; color: #7227b8; border-color: #d9bdf3; }
.xw-school-card .mini-tag.is-central { background: var(--green-soft); color: var(--green); border-color: #a8e0c4; }

.xw-school-card .mini-tag.is-baoyan { background: #f0fdfa; color: #0f766e; border-color: #99f6e4; }
.xw-school-card .mini-tag.is-key { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.xw-school-card .mini-tag.is-admission-type { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }

.xw-school-profile {
  margin: -4px 14px 10px 38px;
  padding: 8px 10px;
  border: 1px solid rgba(217, 226, 239, 0.78);
  border-radius: 8px;
  background: var(--surface-strong);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.xw-school-profile .profile-line {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink);
}

.xw-school-profile .profile-line strong {
  color: var(--muted);
  font-weight: 700;
  min-width: 56px;
}

.xw-school-profile .profile-line span {
  padding: 1px 6px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid rgba(217, 226, 239, 0.8);
}

.xw-school-profile .profile-line.muted span {
  color: var(--muted);
  background: transparent;
  border: none;
  padding-left: 0;
}

.major-feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 72px;
}

.major-feature-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 10.5px;
  font-weight: 700;
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  white-space: nowrap;
}

.major-feature-empty {
  color: var(--muted);
  opacity: 0.6;
}

.major-type-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.major-type-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 10.5px;
  font-weight: 800;
  color: #7c2d12;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  white-space: nowrap;
}

.major-variant-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.major-variant-count,
.major-variant-tag {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.major-variant-count {
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
}

.major-variant-tag {
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

@media (max-width: 820px) {
  .xw-school-profile {
    margin-left: 14px;
  }
}


.xw-school-card .meta {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

.xw-school-card .spacer { flex: 1; }

.xw-school-card .headline-gap {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.headline-gap.rush { color: var(--rose); }
.headline-gap.stable { color: var(--blue); }
.headline-gap.safe { color: var(--green); }

.xw-school-card .compare-btn {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  border-radius: 7px;
  padding: 4px 9px;
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}

.xw-school-card .compare-btn.added {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.major-table-wrap {
  padding: 0 14px 14px 38px;
  overflow-x: auto;
}

table.major-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

table.major-table thead th {
  text-align: left;
  padding: 6px 8px;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

table.major-table thead th.sortable:hover { color: var(--blue); }
table.major-table thead th .arrow { font-size: 9px; opacity: 0.6; margin-left: 2px; }

table.major-table tbody td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(217, 226, 239, 0.6);
  vertical-align: middle;
}

table.major-table tbody td.col-major,
table.major-table tbody td.col-history {
  vertical-align: top;
}

table.major-table tbody tr:last-child td { border-bottom: none; }

table.major-table tbody tr.is-rush { box-shadow: inset 3px 0 0 var(--rose); }
table.major-table tbody tr.is-stable { box-shadow: inset 3px 0 0 var(--blue); }
table.major-table tbody tr.is-safe { box-shadow: inset 3px 0 0 var(--green); }

.major-name-cell .major-name { font-weight: 600; color: var(--ink); }
.major-name-cell .major-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }

.gap-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 11.5px;
}

.gap-badge.rush { background: var(--rose-soft); color: var(--rose); }
.gap-badge.stable { background: var(--blue-soft); color: var(--blue); }
.gap-badge.safe { background: var(--green-soft); color: var(--green); }

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--muted);
}

.history-list .hist-row strong { color: var(--ink); }
.history-list .hist-more { color: var(--muted); font-size: 10px; opacity: 0.75; }

.basket-add-btn {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  color: var(--muted);
}

.basket-add-btn.added {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.empty-hint {
  padding: 40px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- 右侧面板 ---------- */

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.compare-table th, .compare-table td {
  border-bottom: 1px solid var(--line);
  padding: 6px 4px;
  text-align: left;
}

.compare-table th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.compare-table td.col-school { font-weight: 600; color: var(--ink); }

.compare-remove {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 0 2px;
}
.compare-remove:hover { color: var(--rose); }

.basket-list-expert {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
}

.basket-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 11.5px;
}

.basket-row .b-name { flex: 1; min-width: 0; }
.basket-row .b-name .b-school { font-weight: 600; color: var(--ink); display: block; }
.basket-row .b-name .b-major { color: var(--muted); font-size: 10.5px; }

.basket-row .b-remove {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}
.basket-row .b-remove:hover { color: var(--rose); }

.basket-toolbar {
  display: flex;
  gap: 6px;
}

.basket-toolbar button {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  border-radius: 7px;
  padding: 6px 8px;
  font-size: 11.5px;
  color: var(--muted);
}

.basket-toolbar button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 600;
}

.row-select {
  width: 14px;
  height: 14px;
}

.select-all-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
  padding: 6px 14px 0 38px;
  flex-wrap: wrap;
}

.batch-action-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--blue-soft);
  border: 1px solid #b9d0fb;
}

.batch-action-bar span {
  font-weight: 600;
  color: var(--blue);
  margin-right: 2px;
}

.batch-action-bar button {
  border: 1px solid var(--blue);
  background: #fff;
  color: var(--blue);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
}

.batch-action-bar button:hover {
  background: var(--blue);
  color: #fff;
}

.batch-action-bar #batchClearSel {
  border-color: var(--line);
  color: var(--muted);
  font-weight: 400;
}

.batch-action-bar #batchClearSel:hover {
  background: var(--surface-strong);
  color: var(--rose);
  border-color: var(--rose);
}

.toast-mini {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--ink);
  color: #fff;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 12.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 99;
}

.toast-mini.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


.sort-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
}

.sort-control select {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px 8px;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 11.5px;
}

.xw-school-card .profile-btn {
  border: 1px solid #99f6e4;
  background: #f0fdfa;
  border-radius: 7px;
  padding: 4px 9px;
  font-size: 11px;
  color: #0f766e;
  flex-shrink: 0;
}

.xw-school-card .profile-btn.added {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.school-profile-sheet {
  color: var(--ink);
}

.profile-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 2px 2px 12px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  margin-bottom: 14px;
}

.profile-heading {
  min-width: 0;
}

.profile-kicker {
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  color: #0f766e;
}

.profile-title {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 850;
  color: #0f172a;
}

.profile-subtitle {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  color: #0f766e;
}

.profile-baoyan {
  min-width: 116px;
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, #ecfdf5, #f7fee7);
  border: 1px solid #a7f3d0;
  text-align: center;
}

.profile-baoyan span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #047857;
}

.profile-baoyan strong {
  display: block;
  margin-top: 3px;
  font-size: 24px;
  line-height: 1.1;
  color: #065f46;
}

.profile-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.profile-stat {
  border: 1px solid rgba(217, 226, 239, 0.95);
  border-radius: 10px;
  padding: 12px 13px;
  background: #f8fafc;
  min-width: 0;
}

.profile-stat > span {
  display: block;
  font-size: 12px;
  font-weight: 750;
  color: #64748b;
  margin-bottom: 6px;
}

.profile-stat > strong {
  color: #0f172a;
  font-size: 15px;
  line-height: 1.35;
}

.profile-stat-gender {
  background: #fff;
}

.profile-gender {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.gender-bar {
  height: 10px;
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.gender-bar .female { background: #f472b6; }
.gender-bar .male { background: #60a5fa; }

.gender-text {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

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

.profile-info-card {
  border: 1px solid rgba(217, 226, 239, 0.95);
  border-radius: 10px;
  padding: 14px;
  background: #ffffff;
}

.profile-info-card-wide {
  grid-row: span 2;
}

.profile-info-card h4 {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.3;
  color: #0f172a;
}

.profile-subsection {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: 10px;
}

.profile-subsection > span {
  padding-top: 4px;
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
}

.profile-subsection > div,
.profile-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.profile-chip {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(203, 213, 225, 0.95);
  background: #f8fafc;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12.5px;
  line-height: 1.2;
  color: #0f172a;
}

.profile-empty {
  font-size: 13px;
  color: #94a3b8;
}

.profile-contact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: #475569;
}

.profile-contact-list a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.profile-contact-list span {
  overflow-wrap: anywhere;
}

.profile-intro {
  margin-top: 14px;
  border: 1px solid rgba(217, 226, 239, 0.95);
  border-radius: 10px;
  background: #f8fafc;
  overflow: hidden;
}

.profile-intro summary {
  cursor: pointer;
  padding: 13px 15px;
  color: #0f172a;
  font-size: 15px;
  font-weight: 850;
  background: #ffffff;
}

.profile-intro-body {
  padding: 2px 16px 15px;
  max-height: 260px;
  overflow: auto;
}

.profile-intro p {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.78;
  color: #334155;
  text-align: justify;
}

body.profile-modal-open {
  overflow: hidden;
}

.profile-modal[hidden] {
  display: none;
}

.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.profile-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(3px);
}

.profile-modal-card {
  position: relative;
  z-index: 1;
  width: min(960px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
  padding: 22px;
}

.profile-modal-close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #64748b;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

@media (max-width: 820px) {
  .profile-card-head {
    flex-direction: column;
  }
  .profile-baoyan {
    width: 100%;
  }
  .profile-metric-grid,
  .profile-content-grid {
    grid-template-columns: 1fr;
  }
  .profile-subsection {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .profile-modal {
    align-items: stretch;
    padding: 10px;
  }

  .profile-modal-card {
    width: 100%;
    max-height: calc(100vh - 20px);
    padding: 14px;
  }

  .profile-title {
    font-size: 21px;
  }
}

/* Profile modal density and visual hierarchy polish */
.profile-modal-card {
  width: min(940px, calc(100vw - 32px));
  max-height: min(800px, calc(100vh - 28px));
  padding: 18px 20px 20px;
}

.profile-card-head {
  gap: 14px;
  padding: 1px 2px 10px;
  margin-bottom: 12px;
}

.profile-kicker {
  margin-bottom: 3px;
  font-size: 11px;
}

.profile-title {
  font-size: 23px;
}

.profile-subtitle {
  margin-top: 6px;
  font-size: 12px;
}

.profile-baoyan {
  min-width: 108px;
  padding: 10px 12px;
}

.profile-baoyan strong {
  font-size: 22px;
}

.profile-metric-grid {
  gap: 8px;
  margin-bottom: 12px;
}

.profile-stat {
  padding: 10px 11px;
}

.profile-stat > span {
  margin-bottom: 4px;
  font-size: 11.5px;
}

.profile-stat > strong {
  font-size: 14px;
}

.profile-content-grid {
  grid-template-columns: 1.45fr 0.9fr;
  gap: 10px;
}

.profile-info-card {
  padding: 12px;
  border-color: rgba(203, 213, 225, 0.9);
}

.profile-info-card-wide {
  grid-row: span 1;
}

.profile-info-card h4 {
  margin-bottom: 9px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.profile-info-card h4::before {
  content: "";
  width: 4px;
  height: 15px;
  border-radius: 999px;
  background: #0f766e;
}

.profile-subsection {
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 8px;
  margin-top: 7px;
}

.profile-subsection > span {
  padding-top: 5px;
  font-size: 11.5px;
}

.profile-subsection > div,
.profile-chip-list {
  gap: 6px;
}

.profile-chip {
  max-width: 230px;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 760;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.profile-chip.tone-trump {
  color: #7c2d12;
  border-color: #fed7aa;
  background: linear-gradient(180deg, #fff7ed, #ffedd5);
}

.profile-chip.tone-special {
  color: #155e75;
  border-color: #a5f3fc;
  background: linear-gradient(180deg, #ecfeff, #cffafe);
}

.profile-chip.tone-eval {
  color: #3730a3;
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #eef2ff, #e0e7ff);
}

.profile-chip.tone-plain {
  color: #334155;
  border-color: #cbd5e1;
  background: #f8fafc;
}

.profile-contact-list {
  gap: 6px;
  font-size: 12.5px;
}

.profile-intro {
  margin-top: 10px;
}

.profile-intro summary {
  padding: 10px 13px;
  font-size: 14px;
}

.profile-intro-body {
  padding: 0 14px 12px;
  max-height: 220px;
}

.profile-intro p {
  margin: 7px 0 0;
  font-size: 13.5px;
  line-height: 1.58;
  text-align: left;
}

.profile-intro p:first-child {
  margin-top: 8px;
}

@media (max-width: 640px) {
  .profile-modal-card {
    padding: 12px;
  }

  .profile-title {
    font-size: 20px;
  }

  .profile-chip {
    max-width: 100%;
  }
}


/* Campus and enrollment-unit distinction */
.mini-tag.is-campus {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
}

.profile-campus-note {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fff7ed;
  color: #7c2d12;
}

.profile-campus-note strong {
  font-size: 12px;
  line-height: 1.5;
}

.profile-campus-note span {
  font-size: 12.5px;
  line-height: 1.55;
}

@media (max-width: 640px) {
  .profile-campus-note {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
