:root {
  --ink: #17212b;
  --muted: #657383;
  --line: #d8dee6;
  --surface: #ffffff;
  --page: #f4f6f8;
  --soft: #edf2f6;
  --accent: #0f766e;
  --accent-2: #b42318;
  --gold: #b7791f;
  --blue: #1d4ed8;
  --shadow: 0 18px 45px rgba(23, 33, 43, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.overlay-open {
  overflow: hidden;
}

a {
  color: inherit;
}

.shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.brand strong {
  font-size: 25px;
  font-weight: 750;
}

.brand span {
  color: var(--muted);
  font-size: 14px;
}

.nav {
  display: flex;
  gap: 10px;
}

.nav a,
.nav-tab,
.button,
button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 6px;
  padding: 9px 12px;
  font: inherit;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

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

[hidden] {
  display: none !important;
}

.button.primary,
button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

button.danger {
  border-color: #f0c7c2;
  background: #fff5f3;
  color: var(--accent-2);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.metrics-strip {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  max-width: 1420px;
  margin: 0 auto;
  padding: 24px 28px 14px;
}

.brand-line {
  display: grid;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: var(--shadow);
}

.brand-line strong {
  font-size: 24px;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 24px;
  padding: 32px 28px 18px;
  max-width: 1420px;
  margin: 0 auto;
}

.hero h1 {
  margin: 0 0 12px;
  max-width: 820px;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 0.98;
  font-weight: 760;
}

.hero p {
  margin: 0;
  max-width: 780px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.hero-panel,
.toolbar,
.chart-panel,
.admin-panel,
.review-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 22px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.metric-card {
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric-card b {
  display: block;
  margin: 5px 0 3px;
  font-size: 24px;
  line-height: 1.05;
}

.metric-card small {
  color: #067647;
  font-weight: 760;
}

.metric-card.update-metric {
  grid-column: auto;
}

.metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

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

.metric b {
  font-size: 30px;
}

.metric span {
  color: var(--muted);
}

.content {
  max-width: 1420px;
  margin: 0 auto;
  padding: 18px 28px 44px;
}

.user-timeline-panel {
  max-width: 1420px;
  margin: 0 auto;
  padding: 0 28px 12px;
}

.timeline-title,
.user-timeline-grid,
.timeline-window-strip {
  border: 1px solid var(--line);
  background: #fff;
}

.timeline-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 8px 8px 0 0;
  padding: 14px 16px;
}

.timeline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.timeline-title strong,
.timeline-title span {
  display: block;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 12px;
  border: 1px solid var(--line);
  border-top: 0;
  background: #fff;
  padding: 12px;
}

.profile-grid label {
  display: grid;
  gap: 6px;
}

.profile-grid span,
.profile-hints span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.profile-hints {
  display: grid;
  align-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.profile-hints b {
  line-height: 1.35;
}

.profile-hints small {
  color: var(--muted);
  line-height: 1.4;
}

.timeline-title span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.user-timeline-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  border-top: 0;
  border-bottom: 0;
  padding: 12px;
}

.user-timeline-grid label {
  display: grid;
  gap: 6px;
}

.user-timeline-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.timeline-window-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  border-radius: 0;
  padding: 12px;
}

.timeline-path-plans {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  padding: 12px;
  background: #fff;
}

.timeline-window-card,
.timeline-compare-card {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
}

.timeline-window-card span,
.timeline-window-card small,
.timeline-compare-card span {
  color: var(--muted);
  font-size: 12px;
}

.timeline-window-card b,
.timeline-compare-card b {
  font-size: 15px;
}

.timeline-window-card input {
  width: 100%;
  padding: 8px;
}

.timeline-window-card.urgent,
.timeline-compare-card.urgent {
  border-color: #fde68a;
  background: #fffbeb;
}

.timeline-window-card.danger,
.timeline-compare-card.danger {
  border-color: #fecaca;
  background: #fff5f5;
}

.timeline-window-card.done,
.timeline-compare-card.done {
  border-color: #d1d5db;
  background: #f3f4f6;
  color: #6b7280;
}

.timeline-window-card.done b,
.timeline-window-card.done span,
.timeline-window-card.done small,
.timeline-compare-card.done b,
.timeline-compare-card.done span,
.timeline-compare-card.done p {
  color: #6b7280;
}

.timeline-compare-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.timeline-compare-card p {
  margin: 0;
  color: #364553;
  font-size: 13px;
  line-height: 1.4;
}

.path-plan-card {
  display: grid;
  gap: 6px;
  min-height: 128px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.path-plan-card span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
}

.path-plan-card b {
  font-size: 16px;
}

.path-plan-card p,
.fit-grid p {
  margin: 0;
  color: #364553;
  font-size: 13px;
  line-height: 1.45;
}

.fit-panel {
  margin-bottom: 12px;
}

.fit-panel.danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.fit-panel.urgent {
  border-color: #fde68a;
  background: #fffbeb;
}

.fit-panel.ok {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.fit-grid {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.related-grid.compact button {
  display: grid;
  gap: 5px;
  text-align: left;
  line-height: 1.35;
}

.advisor-panel {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.advisor-form,
.advisor-output {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: var(--shadow);
}

.advisor-form {
  display: grid;
  gap: 10px;
}

.advisor-form h2,
.advisor-result h2 {
  margin: 0 0 8px;
  font-size: 19px;
}

.advisor-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.advisor-output {
  min-height: 340px;
}

.advisor-result {
  display: grid;
  gap: 16px;
}

.recommendation-list {
  display: grid;
  gap: 10px;
}

.recommendation-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.recommendation-card h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.recommendation-card p,
.recommendation-card ul {
  margin: 7px 0;
  color: #364553;
  line-height: 1.45;
}

.score-ring {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 20px;
  font-weight: 800;
}

.personal-timeline {
  position: relative;
  display: grid;
  gap: 10px;
  padding-left: 18px;
}

.personal-timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line);
}

.personal-step {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.personal-step::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 15px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
}

.personal-step.urgent::before,
.personal-step.deadline::before {
  background: var(--accent-2);
}

.personal-step span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.personal-step b {
  display: block;
  margin: 3px 0;
}

.personal-step p,
.advisor-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.toolbar {
  display: grid;
  grid-template-columns: 2fr repeat(4, minmax(130px, 1fr));
  gap: 10px;
  padding: 12px;
  margin-bottom: 18px;
  box-shadow: none;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
  font: inherit;
}

textarea {
  min-height: 84px;
  resize: vertical;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}

.program-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

/* ===== Program card (redesign): fixed-height, logo-left, scan-optimized ===== */
.pcard {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) 232px;
  gap: 20px;
  align-items: center;
  height: 162px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  overflow: hidden;
  /* The browser skips layout/paint for off-screen cards — smooth native scroll. */
  content-visibility: auto;
  contain-intrinsic-size: 0 162px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.pcard:hover { border-color: var(--accent); box-shadow: var(--shadow); }

.pcard-id { display: flex; gap: 14px; align-items: center; min-width: 0; }
.pcard-logo {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  overflow: hidden;
}
.pcard-logo-text {
  background: hsl(var(--hue, 200) 68% 96%);
  color: hsl(var(--hue, 200) 60% 36%);
  border: 1px solid hsl(var(--hue, 200) 55% 88%);
}
.pcard-logo img { width: 100%; height: 100%; object-fit: contain; }

.pcard-idtext { min-width: 0; display: grid; gap: 3px; }
.pcard .pcard-title {
  font-size: 19px;
  font-weight: 750;
  color: var(--ink);
  line-height: 1.22;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pcard .pcard-title:hover { color: var(--accent); }
.pcard-school {
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pcard-city { font-size: 12px; color: var(--muted); }

.pcard-meta { min-width: 0; display: grid; gap: 10px; align-content: center; }
.pcard-verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; max-height: 60px; overflow: hidden; }
.vchip, .vmiss {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.vchip-fit { background: #059669; color: #fff; border-color: #059669; }
.vchip-reach { background: #d97706; color: #fff; border-color: #d97706; }
.vchip-gap { background: #2563eb; color: #fff; border-color: #2563eb; }
.vchip-prep { background: var(--soft); color: var(--muted); border-color: var(--line); }
.vchip-closed { background: #6b7280; color: #fff; border-color: #6b7280; }
.vchip-mismatch { background: #fef2f2; color: var(--accent-2); border-color: #fecaca; }
.vmiss { background: #fff7ed; color: #9a3412; border-color: #fed7aa; font-weight: 650; }
/* Apply-decision facts (语言/APS/入学/月生活费) — fill as data lands */
.pcard-reqs { display: flex; flex-wrap: wrap; gap: 6px 14px; max-height: 40px; overflow: hidden; }
.rq { display: inline-flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.rq > i { font-style: normal; font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: 0.02em; }
.rq > b { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.pcard-tags { display: flex; flex-wrap: wrap; gap: 6px; max-height: 32px; overflow: hidden; }
.pcard-tags .chip { font-size: 12px; min-height: 26px; padding: 4px 8px; }
.pcard-tags .chip.degree { background: var(--soft); color: var(--ink); }
.pcard-tags .chip.dur { background: transparent; border: 1px solid var(--line); color: var(--muted); }

.pcard-facts { display: grid; gap: 9px; align-content: center; min-width: 0; }
.pcard-fact { display: flex; flex-direction: column; min-width: 0; }
.pcard-fact > span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.pcard-fact > b {
  font-size: 14px;
  font-weight: 750;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pcard-fact > b.cost-free { color: var(--accent); }
.pcard-fact > b.cost-high { color: var(--accent-2); }
.pcard-fact > b.cost-unknown { color: var(--muted); font-weight: 600; }
.pcard-fact-ddl > b { font-size: 15px; }
.pcard-fact-ddl > small { font-size: 11px; color: var(--muted); }
.pcard-fact-ddl.deadline-urgent > b { color: var(--accent-2); }
.pcard-fact-ddl.deadline-soon > b { color: var(--gold); }
.pcard-fact-ddl.deadline-closed > b,
.pcard-fact-ddl.deadline-neutral > b { color: var(--muted); }

.pcard-actions { display: flex; gap: 8px; margin-top: 2px; }
.pcard-actions button {
  flex: 1;
  padding: 7px 6px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.pcard-actions .basket-button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.pcard-actions .detail-link { background: var(--soft); }

@media (max-width: 760px) {
  .pcard {
    grid-template-columns: 1fr;
    height: auto;
    contain-intrinsic-size: 0 280px;
    gap: 12px;
  }
  .pcard-facts { grid-auto-flow: column; justify-content: start; gap: 18px; }
  .pcard-actions { grid-column: 1 / -1; }
}

.program-card,
.review-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
}

.program-card h2,
.review-card h2,
.admin-panel h2,
.chart-panel h2,
.review-detail h2 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.2;
}

.original {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.45;
}

.summary {
  color: #364553;
  line-height: 1.55;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--soft);
  color: #344251;
  font-size: 13px;
  white-space: nowrap;
}

.pill.warn {
  border-color: #f8d7a4;
  background: #fff8e8;
  color: #7a4a00;
}

.pill.risk-high {
  border-color: #f0c7c2;
  background: #fff5f3;
  color: var(--accent-2);
}

.pill.risk-medium {
  border-color: #f8d7a4;
  background: #fff8e8;
  color: #7a4a00;
}

.chart-panel {
  padding: 18px;
  box-shadow: none;
}

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

.timeline-list {
  position: relative;
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.timeline-list::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  display: grid;
  gap: 3px;
  margin-left: 22px;
  padding: 10px 10px 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 15px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.timeline-item.soon::before {
  background: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.timeline-item.urgent::before {
  background: var(--accent-2);
  box-shadow: 0 0 0 1px var(--accent-2);
}

.timeline-term {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.timeline-item b {
  font-size: 18px;
}

.timeline-item small {
  color: var(--accent-2);
  font-weight: 760;
}

.timeline-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.filter-assist {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.assist-block {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px;
  background: #fff5f5;
}

.assist-block b {
  color: var(--accent-2);
  font-size: 32px;
}

.assist-block span {
  color: var(--muted);
}

.assist-list {
  display: grid;
  gap: 7px;
}

.assist-list h3 {
  margin: 0;
  font-size: 14px;
}

.assist-list a {
  display: flex;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 9px;
  background: #fff;
  text-decoration: none;
}

.bar-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 28px;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}

.bar-track {
  height: 11px;
  border-radius: 999px;
  background: var(--soft);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.admin-layout {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 18px;
  max-width: 1420px;
  margin: 0 auto;
  padding: 28px;
}

.admin-panel {
  padding: 16px;
  box-shadow: none;
}

.review-list {
  display: grid;
  gap: 10px;
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.admin-tabs button {
  min-height: 36px;
  padding: 8px;
  font-size: 13px;
}

.admin-tabs button.active {
  border-color: var(--accent);
  background: #ecfdf3;
  color: var(--accent);
  font-weight: 800;
}

.review-card {
  text-align: left;
  cursor: pointer;
}

.review-card.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.admin-list-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 8px;
  margin-bottom: 10px;
}

.admin-list-tools.stacked {
  grid-template-columns: 1fr;
}

.admin-list-tools.stacked p {
  margin: 0;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--muted);
  font-size: 13px;
}

.virtual-spacer {
  pointer-events: none;
  min-height: 0;
}

.review-detail {
  padding: 20px;
  min-height: 460px;
}

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

.editor-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.editor-section.span-2 {
  grid-column: 1 / -1;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

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

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

.editor-grid.single {
  grid-template-columns: 1fr;
}

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

.annotation-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.annotation-columns > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.annotation-columns h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.annotation-columns ul {
  margin: 0;
  padding-left: 18px;
  color: #364553;
  font-size: 13px;
  line-height: 1.45;
}

.editor-field {
  display: grid;
  gap: 5px;
}

.editor-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.editor-field.readonly input {
  background: #f8fafc;
}

.editor-field.editable {
  min-width: 0;
}

.editor-field.editable textarea {
  min-height: 96px;
  background: #fff;
}

.draft-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.diff {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

.diff-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fbfcfd;
}

.diff-box b {
  display: block;
  margin-bottom: 8px;
}

.source-box {
  border-left: 4px solid var(--blue);
  padding: 12px 14px;
  background: #f5f8ff;
  line-height: 1.5;
}

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

.evidence-grid .editor-field {
  min-width: 0;
}

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

.duplicate-grid a {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
  text-decoration: none;
}

.duplicate-grid span,
.duplicate-grid small {
  color: var(--muted);
  font-size: 12px;
}

.duplicate-grid b {
  color: var(--ink);
  line-height: 1.35;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.empty {
  padding: 26px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
}

.database-card {
  display: grid;
  grid-template-columns: minmax(300px, 1.25fr) minmax(310px, 1.2fr) minmax(330px, 1.2fr) minmax(230px, 0.85fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  overflow: visible;
}

.row-cell,
.card-identity,
.card-school,
.card-details,
.card-next {
  min-width: 0;
}

.row-cell {
  display: grid;
  gap: 7px;
}

.column-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.card-title-link {
  display: block;
  text-decoration: none;
}

.name-stack {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.name-stack .zh {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 760;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.name-stack .en,
.name-stack .de {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.name-stack span {
  flex: 0 0 auto;
  min-width: 28px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.name-stack.compact.long .zh {
  font-size: 17px;
}

.name-stack.compact.long .en,
.name-stack.compact.long .de {
  font-size: 12px;
}

.name-stack.compact.very-long .zh {
  font-size: 15px;
}

.name-stack.compact.very-long .en,
.name-stack.compact.very-long .de {
  font-size: 11px;
}

.name-stack.full-name .zh,
.name-stack.full-name .en,
.name-stack.full-name .de {
  align-items: flex-start;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

.name-stack.full-name span {
  padding-top: 0.18em;
}

.name-stack.large .zh {
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.05;
}

.name-stack.large .en,
.name-stack.large .de {
  font-size: 18px;
}

.detail-card .name-stack .zh {
  font-size: clamp(18px, 2vw, 24px);
}

.detail-card .name-stack .en,
.detail-card .name-stack .de {
  font-size: 14px;
}

.school-strip {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.card-school {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.card-details {
  align-content: start;
}

.detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.school-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #64748b;
  color: #fff;
  font-weight: 760;
  font-size: 13px;
}

.school-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.school-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 7px;
  background: #fff;
  white-space: nowrap;
}

.school-meta .region-tag {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 750;
}

.school-meta .city-tag {
  background: #64748b;
  color: #fff;
  border-color: transparent;
  font-weight: 750;
}

.scan-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.scan-label {
  color: var(--muted);
  font-size: 12px;
}

.language-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.language-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 28px;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  padding: 5px 7px;
  background: #f8fbff;
  color: #1e3a8a;
  font-size: 12px;
  max-width: none;
  white-space: nowrap;
}

.language-chip.language-english {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.language-chip.language-german {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.language-chip.language-other {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.language-chip.language-instruction {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
}

.language-chip.muted {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #64748b;
}

.language-chip b,
.language-chip em {
  font-style: normal;
  white-space: nowrap;
}

.language-chip small {
  color: var(--muted);
  white-space: nowrap;
}

.chip,
.cost-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 6px;
  padding: 6px 9px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.15;
}

.level-bachelor { background: #e8f4ff; color: #075985; }
.level-master { background: #ecfdf3; color: #067647; }
.level-phd { background: #f3e8ff; color: #6b21a8; }
.level-language_course { background: #fff7ed; color: #9a3412; }
.level-preparatory,
.level-bridge { background: #fef9c3; color: #854d0e; }

.lang-english { background: #eef4ff; color: #1d4ed8; }
.lang-german { background: #f1f5f9; color: #111827; }
.lang-german_english { background: #e0f2fe; color: #075985; }

.curation-ready {
  border: 1px solid #bbf7d0;
  background: #ecfdf3;
  color: #067647;
}

.curation-needs_cleanup {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.curation-needs_verification {
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.curation-hidden,
.curation-unknown {
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  color: #475569;
}

.degree {
  background: #f8fafc;
  color: #344251;
  border: 1px solid var(--line);
}

.city {
  color: #fff;
}

.city-munich { background: #1d4ed8; }
.city-heidelberg { background: #be123c; }
.city-aachen { background: #0f766e; }
.city-berlin { background: #b91c1c; }
.city-unknown { background: #64748b; }

.school-meta .city-munich { background: #1d4ed8; }
.school-meta .city-heidelberg { background: #be123c; }
.school-meta .city-aachen { background: #0f766e; }
.school-meta .city-berlin { background: #b91c1c; }
.school-meta .city-unknown { background: #64748b; }

.deadline-box {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.deadline-box span {
  color: var(--muted);
  font-size: 12px;
}

.deadline-box b {
  font-size: 18px;
}

.deadline-box small {
  font-size: 13px;
  font-weight: 700;
}

.deadline-urgent {
  border-color: #fecaca;
  background: #fff5f5;
}

.deadline-urgent small,
.deadline-danger small {
  color: var(--accent-2);
}

.deadline-soon {
  border-color: #fde68a;
  background: #fffbeb;
}

.deadline-soon small {
  color: #92400e;
}

.cost-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.card-cost {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.card-next {
  align-content: center;
}

.candidate-dock {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 18;
}
/* collapsed: just a pill, never blocks cards */
.candidate-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 10px 28px rgba(23, 33, 43, 0.16);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.candidate-pill.has { color: #fff; background: var(--accent); border-color: var(--accent); }
.candidate-pill .cp-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}
.candidate-dock.empty .candidate-pill { opacity: 0.7; }
.candidate-pill.pulse { animation: cpPulse 0.6s ease; }
@keyframes cpPulse { 0% { transform: scale(1); } 35% { transform: scale(1.14); } 100% { transform: scale(1); } }
/* expanded: the full panel */
.candidate-dock.open {
  width: min(360px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(23, 33, 43, 0.18);
}
.candidate-head-btns { display: flex; gap: 6px; }

.candidate-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.candidate-head strong,
.candidate-head span {
  display: block;
}

.candidate-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.candidate-list {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}

.candidate-list p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.candidate-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px;
  background: #fbfcfd;
}

.candidate-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.candidate-item button,
.candidate-head button {
  padding: 6px 8px;
  font-size: 12px;
}

.candidate-compare {
  display: flex;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 9px 10px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.candidate-compare.disabled {
  border-color: var(--line);
  background: #f1f5f9;
  color: var(--muted);
  pointer-events: none;
}

.ai-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  width: min(420px, calc(100vw - 32px));
}

.ai-toggle {
  display: none;
  width: 118px;
  min-height: 42px;
  margin-left: auto;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
}

.ai-widget.collapsed {
  width: auto;
}

.ai-widget.collapsed .ai-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ai-widget.collapsed .ai-panel {
  display: none;
}

.ai-panel {
  display: grid;
  gap: 10px;
  max-height: min(760px, calc(100vh - 44px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(23, 33, 43, 0.18);
  overflow: auto;
}

.ai-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.ai-head strong,
.ai-head span {
  display: block;
}

.ai-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.ai-messages {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

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

.ai-message {
  display: grid;
  gap: 3px;
  max-width: 92%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.ai-message.user {
  justify-self: end;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.ai-message b {
  font-size: 12px;
}

.ai-message p {
  margin: 0;
  white-space: pre-line;
  color: #364553;
  font-size: 13px;
  line-height: 1.45;
}

.ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.floating-filter {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
}

.floating-filter summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 760;
}

.assist-mini {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

.assist-kpi {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff5f5;
}

.assist-kpi b {
  color: var(--accent-2);
  font-size: 26px;
}

.assist-kpi span,
.assist-empty {
  color: var(--muted);
  font-size: 13px;
}

.assist-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.assist-inline button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  white-space: nowrap;
  padding: 7px 9px;
}

.assist-inline small {
  color: var(--accent);
  font-weight: 800;
}

.assist-deadlines {
  display: grid;
  gap: 7px;
}

.assist-deadlines a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  text-decoration: none;
}

.assist-deadlines span,
.assist-deadlines small {
  color: var(--muted);
  font-size: 12px;
}

.assist-deadlines b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cost-free {
  background: #dcfce7;
  color: #166534;
}

.cost-low {
  background: #ecfdf3;
  color: #067647;
}

.cost-mid {
  background: #fff7ed;
  color: #9a3412;
}

.cost-high {
  background: #fee2e2;
  color: #991b1b;
}

.cost-unknown {
  background: #f1f5f9;
  color: #475569;
}

.source-link,
.detail-link,
.basket-button {
  display: inline-flex;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.detail-link {
  border-color: var(--accent);
  color: var(--accent);
}

.basket-button {
  color: #334155;
}

.basket-button.active {
  border-color: #bbf7d0;
  background: #ecfdf3;
  color: #067647;
}

.reviewed {
  color: var(--muted);
  font-size: 12px;
}

.program-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
}

.program-overlay.open {
  display: flex;
}

.program-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
}

.program-overlay-panel {
  position: relative;
  z-index: 1;
  width: min(90vw, 1420px);
  height: 90vh;
  overflow: auto;
  border: 1px solid rgba(216, 222, 230, 0.92);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}

#programOverlayContent {
  padding: 22px;
}

.overlay-loading {
  display: grid;
  min-height: 340px;
  place-items: center;
  color: var(--muted);
}

.overlay-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin: -22px -22px 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.overlay-head h1 {
  margin: 4px 0 6px;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.1;
}

.overlay-head p {
  margin: 2px 0;
  color: var(--muted);
  line-height: 1.35;
}

.overlay-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 260px;
}

.overlay-actions .button.disabled {
  pointer-events: none;
  background: #f1f5f9;
  color: var(--muted);
}

.overlay-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

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

.school-meta.roomy {
  margin-top: 12px;
}

.overlay-language {
  align-items: start;
}

.card-cost.vertical {
  display: grid;
  gap: 8px;
}

.path-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.path-card {
  display: grid;
  gap: 5px;
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.path-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.path-card b {
  font-size: 15px;
}

.path-card p {
  margin: 0;
  color: #364553;
  line-height: 1.45;
}

.detail-page {
  max-width: 1420px;
  margin: 0 auto;
  padding: 28px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 20px;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-hero p {
  max-width: 760px;
  color: #364553;
  line-height: 1.65;
}

.recommendation-note {
  display: grid;
  gap: 4px;
  max-width: 820px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.recommendation-note b {
  color: #1d4ed8;
}

.recommendation-note span {
  color: #364553;
  line-height: 1.5;
}

.detail-actions {
  display: grid;
  align-content: start;
  gap: 10px;
}

.detail-actions .button.disabled {
  border-color: var(--line);
  background: #f1f5f9;
  color: var(--muted);
  pointer-events: none;
}

.detail-actions .button.active {
  border-color: #bbf7d0;
  background: #ecfdf3;
  color: #067647;
}

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

.decision-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.decision-card.good {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.decision-card.caution {
  border-color: #fde68a;
  background: #fffbeb;
}

.decision-card h2 {
  margin: 0 0 10px;
  font-size: 17px;
}

.decision-card p {
  margin: 8px 0 0;
  color: #364553;
  line-height: 1.5;
}

.agent-meta,
.agent-status {
  display: grid;
  gap: 2px;
  margin: 0 0 10px;
  padding: 9px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #ecfdf3;
  color: #067647;
  font-size: 12px;
}

.agent-meta.stale,
.agent-status.stale {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.agent-meta span,
.agent-meta small {
  color: inherit;
}

.agent-meta b {
  font-size: 13px;
}

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

.detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}

.detail-card.span-2 {
  grid-column: 1 / -1;
}

.detail-card h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.fact-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}

.fact-row span,
.fact-row small {
  color: var(--muted);
}

.fact-row a {
  grid-column: 2 / -1;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.source-evidence {
  display: grid;
  gap: 10px;
}

.source-evidence a {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
  text-decoration: none;
}

.source-evidence span,
.related-grid span,
.related-grid small,
.empty-note {
  color: var(--muted);
  font-size: 12px;
}

.source-evidence b,
.related-grid b {
  color: var(--ink);
  line-height: 1.35;
}

.data-status-card {
  border-color: #cbd5e1;
  background: #fbfcfd;
}

.data-status-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

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

.data-status-grid > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.data-status-grid strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.data-status-grid ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

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

.related-grid a {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
  text-decoration: none;
}

.empty-note {
  margin: 0;
}

.deadline-feature {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 8px;
  background: #fffbeb;
}

.deadline-feature b {
  font-size: 28px;
}

.deadline-feature span {
  color: #92400e;
  font-weight: 760;
}

.program-timeline {
  position: relative;
  overflow-x: auto;
  min-height: 570px;
  min-width: 1080px;
  padding: 10px 96px 24px;
}

.program-timeline::before {
  content: "";
  position: absolute;
  left: 96px;
  right: 96px;
  top: 72px;
  border-top: 3px solid #c8d2dc;
}

.program-step {
  position: absolute;
  top: 0;
  width: 190px;
  min-height: 120px;
  transform: translateX(-50%);
}

.program-step-date {
  position: absolute;
  top: calc(6px + var(--date-lane, 0) * 18px);
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.program-step-dot {
  position: absolute;
  top: 63px;
  left: 50%;
  width: 16px;
  height: 16px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  transform: translateX(-50%);
  z-index: 2;
}

.program-step.future .program-step-dot {
  background: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.program-step.current .program-step-dot {
  background: var(--accent-2);
  box-shadow: 0 0 0 1px var(--accent-2);
}

.program-step-line {
  position: absolute;
  top: 82px;
  left: 50%;
  height: calc(34px + var(--lane, 0) * 112px);
  border-left: 2px dashed #9aa7b3;
  transform: translateX(-50%);
}

.program-step.future .program-step-line {
  border-color: var(--gold);
}

.program-step.current .program-step-line {
  border-color: var(--accent-2);
}

.program-step-card {
  position: absolute;
  top: calc(118px + var(--lane, 0) * 112px);
  left: 0;
  width: 190px;
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(23, 33, 43, 0.06);
}

.program-step-card b {
  display: block;
  line-height: 1.25;
}

.program-step-card p {
  margin: 7px 0 0;
  color: #364553;
  font-size: 13px;
  line-height: 1.45;
}

.compare-page {
  max-width: 1420px;
  margin: 0 auto;
  padding: 28px;
}

.compare-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

.compare-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
}

.compare-hero p {
  margin: 0;
  max-width: 820px;
  color: #364553;
  line-height: 1.55;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(var(--compare-count), minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.compare-program {
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.compare-program span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.compare-program h2 {
  margin: 6px 0;
  font-size: 16px;
  line-height: 1.25;
}

.compare-program p,
.compare-program b {
  display: block;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.compare-program a {
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.compare-section {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}

.compare-section h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.compare-table-wrap {
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
  font-size: 14px;
}

.compare-table th,
.compare-table td {
  border-top: 1px solid var(--line);
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
}

.compare-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.compare-table thead th {
  color: var(--ink);
  background: #f8fafc;
}

.compare-insight p {
  margin: 8px 0;
  color: #364553;
  line-height: 1.5;
}

.compare-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.compare-actions h2 {
  width: 100%;
}

.germany-life {
  background: #eef2f6;
}

.life-hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 520px;
  overflow: hidden;
  background: #17212b;
  color: #fff;
}

.life-visual {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(23, 33, 43, 0.18), rgba(23, 33, 43, 0.78)),
    radial-gradient(circle at 70% 20%, rgba(255, 214, 102, 0.2), transparent 28%),
    linear-gradient(135deg, #1f2937 0%, #0f766e 52%, #111827 100%);
}

.life-skyline {
  position: absolute;
  left: 7vw;
  right: 7vw;
  bottom: 92px;
  display: flex;
  align-items: end;
  gap: 18px;
}

.life-skyline span {
  display: block;
  width: 15%;
  min-width: 54px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px 8px 0 0;
  background: rgba(255, 255, 255, 0.16);
}

.life-skyline span:nth-child(1) { height: 110px; }
.life-skyline span:nth-child(2) { height: 180px; }
.life-skyline span:nth-child(3) { height: 140px; }
.life-skyline span:nth-child(4) { height: 230px; }
.life-skyline span:nth-child(5) { height: 125px; }

.life-route {
  position: absolute;
  left: 10vw;
  right: 10vw;
  bottom: 62px;
  border-top: 3px solid rgba(255, 255, 255, 0.72);
}

.life-route i {
  position: absolute;
  top: -9px;
  width: 16px;
  height: 16px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: #fbbf24;
}

.life-route i:nth-child(1) { left: 0; }
.life-route i:nth-child(2) { left: 32%; }
.life-route i:nth-child(3) { left: 67%; }
.life-route i:nth-child(4) { right: 0; }

.life-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 1420px;
  width: 100%;
  margin: 0 auto;
  padding: 0 28px 54px;
}

.life-hero-copy span,
.life-planner span,
.life-dashboard span,
.life-card b {
  color: #fbbf24;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.life-hero-copy h1 {
  margin: 8px 0 12px;
  font-size: clamp(46px, 9vw, 112px);
  line-height: 0.9;
}

.life-hero-copy p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
  line-height: 1.65;
}

.life-dashboard,
.life-grid,
.life-planner {
  max-width: 1420px;
  margin: 0 auto;
  padding-left: 28px;
  padding-right: 28px;
}

.life-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: -38px;
  position: relative;
  z-index: 2;
}

.life-dashboard article,
.life-card,
.life-planner {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.life-dashboard article {
  padding: 18px;
}

.life-dashboard h2,
.life-card h2,
.life-planner h2 {
  margin: 8px 0;
}

.life-dashboard p,
.life-card p,
.life-planner p {
  color: #364553;
  line-height: 1.55;
}

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

.life-card {
  display: grid;
  gap: 8px;
  min-height: 250px;
  padding: 18px;
}

.life-card.urgent {
  border-color: #f8d7a4;
  background: #fffaf0;
}

.life-card button {
  align-self: end;
  justify-self: start;
}

.life-planner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
  gap: 20px;
  margin-top: 28px;
  margin-bottom: 44px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.life-planner form {
  display: grid;
  gap: 10px;
}

.life-plan-output {
  max-width: 1420px;
  margin: 0 auto 44px;
  padding: 0 28px;
}

.life-plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  padding: 18px;
  background: #fff;
}

.life-plan-head h2 {
  margin: 6px 0;
}

.life-plan-head p {
  margin: 0;
  color: var(--muted);
}

.life-plan-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  padding: 12px;
  background: #fff;
}

.life-plan-grid article {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.life-plan-grid span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
}

.life-plan-grid p {
  margin: 0;
  color: #364553;
  line-height: 1.45;
}

@media (max-width: 980px) {
  .hero,
  .metrics-strip,
  .layout,
  .admin-layout,
  .advisor-panel,
  .database-card,
  .detail-hero,
  .compare-hero,
  .decision-grid,
  .detail-grid,
  .overlay-head,
  .overlay-summary-grid,
  .overlay-detail-grid,
  .path-grid,
  .timeline-compare-grid,
  .user-timeline-grid,
  .timeline-window-strip,
  .timeline-path-plans,
  .profile-grid,
  .life-dashboard,
  .life-grid,
  .life-planner,
  .life-plan-grid,
  .life-plan-head,
  .related-grid,
  .evidence-grid,
  .data-status-grid,
  .duplicate-grid,
  .admin-editor,
  .editor-grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .program-grid {
    grid-template-columns: 1fr;
  }

  .language-stack {
    margin-left: 0;
  }

  .candidate-dock {
    right: 16px;
    bottom: 76px;
  }
  .candidate-dock.open {
    left: 16px;
    right: 16px;
    width: auto;
  }

  .program-overlay {
    padding: 3vh 3vw;
  }

  .program-overlay-panel {
    width: 94vw;
    height: 94vh;
  }

  .overlay-actions {
    justify-content: flex-start;
  }

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

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }

  .hero,
  .content,
  .admin-layout,
  .detail-page {
    padding-left: 18px;
    padding-right: 18px;
  }

  .toolbar,
  .diff,
  .fact-row {
    grid-template-columns: 1fr;
  }

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

  .admin-tabs {
    grid-template-columns: 1fr;
  }
}

/* Admin: fixed-height two-pane; each column scrolls independently within one viewport (desktop) */
@media (min-width: 981px) {
  .admin-layout {
    height: calc(100vh - 73px);
    grid-template-rows: 1fr;
    box-sizing: border-box;
    overflow: hidden;
  }
  .admin-panel {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .admin-panel > h2,
  .admin-panel > .original,
  .admin-panel > .admin-tabs,
  .admin-panel > .admin-list-tools { flex: 0 0 auto; }
  .review-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 6px;
  }
  .review-detail {
    min-height: 0;
    height: 100%;
    overflow-y: auto;
  }
}

/* ===== Redesign: plan panel, structured profile, verdicts, tasks ===== */
.next-step-hero[hidden],
.profile-chips[hidden],
.plan-tasklist[hidden] { display: none; }

.plan-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 18px 20px;
  /* align card edges with the program list below (.content = max 1420 + 28px gutter) */
  width: calc(100% - 56px);
  max-width: calc(1420px - 56px);
  margin: 0 auto 18px;
  display: grid;
  gap: 16px;
}

/* collapsed (profile set): hide the 6-field form behind 编辑资料 */
.plan-panel.collapsed .profile-form { display: none; }
.plan-head-actions button {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.plan-head-actions .danger { color: var(--accent-2); border-color: #fecaca; }
.plan-more { border-top: 1px solid var(--soft); }
.plan-more > summary {
  cursor: pointer;
  list-style: none;
  padding: 8px 0 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}
.plan-more > summary::-webkit-details-marker { display: none; }
.plan-more > summary::before { content: "▸ "; }
.plan-more[open] > summary::before { content: "▾ "; }
.plan-more[hidden] { display: none; }

.plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.plan-head strong {
  font-size: 18px;
  display: block;
}

.plan-head span {
  color: var(--muted);
  font-size: 13px;
  display: block;
  margin-top: 3px;
  max-width: 640px;
}

.plan-head-actions {
  display: flex;
  gap: 8px;
}

.profile-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.profile-form label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.profile-form select,
.profile-form input {
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.next-step-hero {
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  border-radius: 0 12px 12px 0;
  background: var(--soft);
  padding: 14px 16px;
  display: grid;
  gap: 6px;
}

.next-step-hero.tone-danger { border-left-color: var(--accent-2); background: #fff5f5; }
.next-step-hero.tone-urgent { border-left-color: #b45309; background: #fffbeb; }
.next-step-hero.tone-soon { border-left-color: var(--gold); background: #fffdf5; }

.next-step-tag {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-2);
  letter-spacing: 0.04em;
}

.next-step-hero.tone-soon .next-step-tag,
.next-step-hero.tone-urgent .next-step-tag { color: #92400e; }

.next-step-hero b { font-size: 16px; }
.next-step-hero p { color: var(--muted); font-size: 13px; margin: 0; }
.next-step-note { color: var(--ink) !important; font-size: 12px !important; line-height: 1.55; }

.next-step-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.next-step-foot .count { font-weight: 700; font-size: 13px; }
.next-step-foot button {
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.profile-chips .chip {
  font-size: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  border: 1px solid var(--line);
}

/* Horizontal phase timeline */
.plan-timeline[hidden] { display: none; }
.plan-timeline { display: grid; gap: 10px; }
.phase-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.phase-head strong { font-size: 15px; }
.phase-head span { color: var(--muted); font-size: 12px; }

.phase-track {
  position: relative;
  height: 96px;
  background: var(--soft);
  border-radius: 10px;
  border: 1px solid var(--line);
  overflow: visible;
}
.phase-bar {
  position: absolute;
  top: calc(10px + var(--lane, 0) * 38px);
  min-width: 78px;
  height: 30px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid transparent;
  box-shadow: 0 8px 18px rgba(23, 33, 43, 0.06);
}
.phase-bar span {
  font-size: 11px;
  white-space: nowrap;
  padding: 0 6px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.phase-past { background: #eef2f6; border-color: var(--line); color: var(--muted); }
.phase-active { background: #fff5f5; border-color: #fecaca; color: var(--accent-2); }
.phase-future { background: #fff; border-color: var(--line); color: var(--ink); }
.phase-done { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }

.phase-today {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 2px;
  background: var(--blue);
  z-index: 3;
}
.phase-today span {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  color: var(--blue);
  background: var(--surface);
  padding: 0 4px;
  white-space: nowrap;
}
.phase-legend { display: flex; gap: 14px; flex-wrap: wrap; }
.phase-legend .lg { font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.phase-legend .lg::before { content: ""; width: 10px; height: 10px; border-radius: 3px; border: 1px solid var(--line); }
.lg-past::before { background: #eef2f6; }
.lg-active::before { background: #fff5f5; border-color: #fecaca; }
.lg-future::before { background: #fff; }
.lg-done::before { background: #ecfdf5; border-color: #a7f3d0; }

.plan-tasklist { display: grid; gap: 8px; }

.tasklist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.tasklist-head strong { font-size: 15px; }
.tasklist-meta { display: flex; align-items: center; gap: 10px; }
.tasklist-meta span { color: var(--muted); font-size: 12px; }
.tasklist-meta button,
.task-ics {
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent);
  cursor: pointer;
}

.task-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.task-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: var(--line); }
.dot-danger { background: var(--accent-2); }
.dot-urgent { background: #d97706; }
.dot-soon { background: var(--gold); }
.dot-neutral { background: var(--line); }

.task-main { flex: 1; min-width: 0; }
.task-main b { font-size: 14px; display: block; }
.task-main small { color: var(--muted); font-size: 12px; }
.task-when { text-align: right; flex-shrink: 0; }
.task-when span { font-size: 13px; display: block; }
.task-when small { font-size: 12px; }

.count-danger { color: var(--accent-2); font-weight: 700; }
.count-urgent { color: #b45309; font-weight: 700; }
.count-soon { color: #92400e; }
.count-neutral { color: var(--muted); }

/* Verdict badges */
.identity-head { display: flex; align-items: flex-start; gap: 8px; }
.identity-head .card-title-link { flex: 1; min-width: 0; }

.verdict {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 7px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.verdict-fit { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.verdict-reach { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.verdict-gap { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.verdict-prep { background: var(--soft); color: var(--muted); border-color: var(--line); }
.verdict-closed { background: #f3f4f6; color: #6b7280; border-color: #e5e7eb; }
.verdict-mismatch { background: #fef2f2; color: var(--accent-2); border-color: #fecaca; }

.verdict-reason {
  margin: 5px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.verdict-row-mismatch,
.verdict-row-closed { opacity: 0.72; }

/* Deadline closed + neutral tone */
.deadline-closed { border-color: #e5e7eb; background: #f9fafb; }
.deadline-closed small { color: #6b7280; }
.deadline-neutral small { color: var(--muted); font-weight: 600; }

/* Card action grouping */
.card-actions { display: flex; gap: 8px; }

/* Show / hide mismatched programs */
.show-mismatch {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 4px;
  padding: 11px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.show-mismatch:hover { color: var(--ink); border-color: var(--muted); }

/* ===== Rebuilt detail overlay ===== */
.overlay-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.overlay-title-row h1 { font-size: 22px; margin: 2px 0; }
.overlay-sub { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.overlay-school { color: var(--ink); font-size: 14px; margin: 6px 0 0; font-weight: 500; }

.overlay-verdict {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--soft);
}
.overlay-verdict-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.overlay-verdict-head strong { font-size: 15px; }
.overlay-verdict p { margin: 0; color: var(--ink); font-size: 14px; line-height: 1.6; }
.overlay-verdict strong { font-size: 15px; }
.verdict-bg-fit { background: #ecfdf5; border-color: #a7f3d0; }
.verdict-bg-reach { background: #fffbeb; border-color: #fde68a; }
.verdict-bg-gap { background: #eff6ff; border-color: #bfdbfe; }
.verdict-bg-prep,
.verdict-bg-closed,
.verdict-bg-none { background: var(--soft); border-color: var(--line); }

.overlay-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}
.ofact { background: var(--soft); border-radius: 10px; padding: 10px 12px; display: grid; gap: 3px; }
.ofact span { color: var(--muted); font-size: 12px; }
.ofact b { font-size: 14px; }
.ofact-urgent { background: #fff5f5; }
.ofact-urgent b { color: var(--accent-2); }
.ofact-closed b { color: #6b7280; }

/* Vertical milestone timeline */
.overlay-tl .vtimeline-hint { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.vtimeline { list-style: none; margin: 0; padding: 0 0 0 6px; }
.vstep { position: relative; padding: 0 0 16px 22px; border-left: 2px solid var(--line); }
.vstep:last-child { border-left-color: transparent; padding-bottom: 0; }
.vdot {
  position: absolute;
  left: -8px;
  top: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--line);
  border: 2px solid var(--surface);
}
.vstep-anchor .vdot { width: 15px; height: 15px; left: -9px; }
.vstep-anchor .vstep-top b { color: var(--accent); }
.vstep-body { margin-top: -2px; }
.vstep-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.vstep-top b { font-size: 14px; }
.vstep-body small { color: var(--muted); font-size: 12px; }

.cn-points { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.cn-points li { font-size: 13px; line-height: 1.6; color: var(--ink); }
.overlay-reviewed { color: var(--muted); font-size: 12px; margin: 10px 0 0; }

/* Compare page verdict + deadline tone */
.compare-program .verdict { align-self: flex-start; margin-bottom: 6px; }
.compare-program .verdict-reason { color: var(--muted); font-size: 12px; margin: 6px 0 0; line-height: 1.5; }
.compare-program.verdict-row-mismatch,
.compare-program.verdict-row-closed { opacity: 0.78; }
.compare-table td.ddl-danger { color: var(--accent-2); font-weight: 700; }
.compare-table td.ddl-soon { color: #92400e; }
.compare-table td.ddl-closed { color: #6b7280; }
.compare-table .verdict { font-size: 11px; }

/* Find header */
.find-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 4px 0 12px;
}
.find-head strong { font-size: 18px; }
.find-head span { color: var(--muted); font-size: 13px; }

@media (max-width: 720px) {
  .task-row { flex-wrap: wrap; }
  .task-when { text-align: left; }
}

/* ===== 审批台 (admin rebuild) ===== */
.admin-shell { max-width: 1180px; }
.rv-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin: 18px 0 14px; flex-wrap: wrap; }
.rv-head-text strong { display: block; font-size: 22px; }
.rv-head-text span { color: var(--muted); font-size: 13px; line-height: 1.5; max-width: 560px; display: block; margin-top: 4px; }
.rv-progress { display: flex; gap: 10px; }
.rv-stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 16px; text-align: center; }
.rv-stat b { display: block; font-size: 22px; font-weight: 800; color: var(--ink); }
.rv-stat span { font-size: 11px; color: var(--muted); }

.rv-buckets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.rv-bucket { flex: 1; min-width: 150px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.rv-bucket:hover { border-color: var(--accent); }
.rv-bucket.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.rv-bucket strong { display: block; font-size: 14px; }
.rv-bucket span { display: block; font-size: 11px; color: var(--muted); margin: 2px 0 6px; }
.rv-bucket em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--accent-2); }
.rv-bucket.active em { color: var(--accent); }

.rv-layout { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
.rv-queue { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; position: sticky; top: 12px; }
.rv-queue-tools { display: flex; align-items: center; gap: 10px; padding: 10px; border-bottom: 1px solid var(--line); }
.rv-queue-tools input[type=search] { flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.rv-done-toggle { font-size: 11px; color: var(--muted); white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.rv-list { max-height: 70vh; overflow-y: auto; }
.rv-list-count { padding: 8px 12px; font-size: 11px; color: var(--muted); border-bottom: 1px solid var(--soft); }
.rv-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: none; border: none; border-bottom: 1px solid var(--soft); cursor: pointer; text-align: left; }
.rv-row:hover { background: var(--soft); }
.rv-row.active { background: #ecfdf5; box-shadow: inset 3px 0 0 var(--accent); }
.rv-row-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.rv-row-dot.todo { background: var(--gold); }
.rv-row-dot.ok { background: var(--accent); }
.rv-row-main { flex: 1; min-width: 0; }
.rv-row-main b { display: block; font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-row-main small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-row-tag { font-size: 11px; color: var(--muted); flex: 0 0 auto; }

.rv-editor { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; min-height: 360px; }
.rv-empty { color: var(--muted); padding: 40px 12px; text-align: center; font-size: 14px; }
.rv-empty.small { padding: 24px 12px; font-size: 13px; }
.rv-editor-head h2 { margin: 0 0 4px; font-size: 20px; }
.rv-editor-head p { margin: 0; color: var(--muted); font-size: 13px; }
.rv-editor-head a { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--blue); }

.rv-form { margin: 18px 0; display: grid; gap: 14px; }
.rv-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rv-field { display: grid; gap: 4px; }
.rv-field > span { font-size: 12px; font-weight: 700; color: var(--ink); }
.rv-field input, .rv-field select { padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; width: 100%; }
.rv-field input:focus, .rv-field select:focus { outline: none; border-color: var(--accent); }
.rv-field > small { font-size: 11px; color: var(--muted); }

.rv-ref { background: var(--soft); border-radius: 10px; padding: 12px 14px; }
.rv-ref > strong { font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: .03em; }
.rv-ref div { margin-top: 8px; }
.rv-ref div span { font-size: 11px; color: var(--muted); }
.rv-ref div p { margin: 1px 0 0; font-size: 13px; color: var(--ink); line-height: 1.45; }

.rv-lang-rows { display: grid; gap: 8px; }
.rv-lang-row { display: grid; grid-template-columns: 1.1fr 1.4fr auto auto; gap: 8px; align-items: center; }
.rv-lang-row select, .rv-lang-row input[type=text], .rv-lang-row input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.rv-postpone { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.rv-delrow { background: none; border: 1px solid var(--line); border-radius: 8px; width: 32px; height: 32px; cursor: pointer; color: var(--muted); }
.rv-addrow { justify-self: start; background: var(--soft); border: 1px dashed var(--line); border-radius: 8px; padding: 8px 14px; font-size: 13px; cursor: pointer; }

.rv-actions { display: flex; gap: 10px; align-items: center; border-top: 1px solid var(--soft); padding-top: 16px; }
.rv-actions button { padding: 11px 20px; border-radius: 9px; font-size: 14px; font-weight: 700; cursor: pointer; border: 1px solid var(--line); background: var(--surface); }
.rv-approve { background: var(--accent); color: #fff; border-color: var(--accent); }
.rv-hide { margin-left: auto; color: var(--accent-2); }
.rv-actions kbd { font-size: 11px; background: rgba(255,255,255,.25); border-radius: 4px; padding: 1px 5px; margin-left: 4px; }
.rv-skip kbd { background: var(--soft); }

@media (max-width: 820px) {
  .rv-layout { grid-template-columns: 1fr; }
  .rv-queue { position: static; }
  .rv-list { max-height: 320px; }
}

/* 字段变更 diff editor */
.rv-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rv-diff > div { border-radius: 10px; padding: 12px 14px; }
.rv-diff-old { background: #fef2f2; border: 1px solid #fecaca; }
.rv-diff-new { background: #ecfdf5; border: 1px solid #a7f3d0; }
.rv-diff span { font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.rv-diff p { margin: 4px 0 0; font-size: 14px; color: var(--ink); line-height: 1.45; word-break: break-word; }

/* 申请材料清单（计划页聚合） */
#docChecklist { display: grid; gap: 6px; padding-top: 6px; }
.doc-empty { color: var(--muted); font-size: 13px; margin: 4px 0; }
.doc-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.doc-head strong { font-size: 14px; }
.doc-head small { color: var(--muted); font-size: 11px; }
.doc-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.doc-item input { width: 16px; height: 16px; }
.doc-item b { font-size: 13px; font-weight: 650; }
.doc-item small { color: var(--muted); font-size: 11px; text-align: right; }
.doc-item.done { background: #f0fdf4; border-color: #bbf7d0; }
.doc-item.done b { color: var(--muted); text-decoration: line-through; }

/* 详情 overlay 富化：为什么链 + 录取要求文本 */
.verdict-why { margin-top: 8px; }
.verdict-why > summary { cursor: pointer; font-size: 12px; font-weight: 700; color: var(--accent); list-style: none; }
.verdict-why > summary::-webkit-details-marker { display: none; }
.verdict-why ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.verdict-why li { display: grid; grid-template-columns: 18px auto 1fr; gap: 8px; align-items: baseline; font-size: 13px; }
.verdict-why li b { font-weight: 650; }
.verdict-why li span { color: var(--muted); }
.verdict-why .ck { font-style: normal; font-weight: 800; text-align: center; }
.verdict-why .ck.ok { color: #059669; }
.verdict-why .ck.no { color: var(--accent-2); }
.verdict-why .ck.warn { color: #d97706; }
.verdict-why .ck.info { color: var(--blue); }
.adm-text { margin: 8px 0 0; font-size: 13px; line-height: 1.55; color: #364553; }

/* ===== 候选对比（Apple 机型式列对比）===== */
.compare-page { max-width: 1320px; margin: 0 auto; padding: 18px 28px 60px; }
.cmp-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.cmp { display: grid; grid-template-columns: 132px repeat(var(--cols), minmax(178px, 1fr)) 172px; min-width: max-content; }
.cmp-corner { position: sticky; left: 0; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.cmp-col-h { position: sticky; top: 0; z-index: 2; background: var(--surface); border-bottom: 1px solid var(--line); border-left: 1px solid var(--soft); padding: 12px; }
.cmp-h { display: grid; gap: 6px; position: relative; }
.cmp-ribbon { justify-self: start; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 6px; }
.tier-stable { background: #059669; color: #fff; } .tier-sprint { background: #d97706; color: #fff; }
.tier-prep { background: var(--soft); color: var(--muted); } .tier-off { background: #9ca3af; color: #fff; }
.cmp-logo { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: hsl(var(--hue,200) 68% 96%); color: hsl(var(--hue,200) 60% 36%); border: 1px solid hsl(var(--hue,200) 55% 88%); }
.cmp-name { font-size: 15px; font-weight: 750; color: var(--ink); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }
.cmp-name:hover { color: var(--accent); }
.cmp-school { font-size: 11px; color: var(--muted); }
.cmp-h-actions { display: flex; gap: 10px; margin-top: 2px; }
.cmp-h-actions a, .cmp-h-actions button { font-size: 12px; color: var(--blue); background: none; border: none; cursor: pointer; padding: 0; text-decoration: none; }
.cmp-h-actions button { color: var(--accent-2); }
.cmp-add .cmp-addbox { display: grid; gap: 6px; font-size: 13px; }
.cmp-addbox > b { font-size: 13px; }
.cmp-addbox.muted { color: var(--muted); }
.cmp-addbox input { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
#cmpAddResults { display: grid; gap: 4px; }
#cmpAddResults button { text-align: left; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 6px 8px; cursor: pointer; display: grid; }
#cmpAddResults b { font-size: 12px; font-weight: 650; } #cmpAddResults small { color: var(--muted); font-size: 11px; }
.cmp-nohit { color: var(--muted); font-size: 12px; }
.cmp-sec { grid-column: 1 / -1; background: var(--soft); padding: 7px 12px; font-size: 12px; font-weight: 800; color: var(--ink); border-top: 1px solid var(--line); }
.cmp-rl { position: sticky; left: 0; z-index: 1; background: var(--surface); padding: 10px 12px; font-size: 12px; font-weight: 700; color: var(--muted); border-top: 1px solid var(--soft); display: flex; align-items: center; }
.cmp-cell { padding: 10px 12px; border-top: 1px solid var(--soft); border-left: 1px solid var(--soft); font-size: 13px; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.cmp-cell.best { background: #f0fdf4; box-shadow: inset 2px 0 0 #86efac; }
.cmp-cell .good { color: #059669; font-weight: 700; } .cmp-cell .bad { color: var(--accent-2); }
.cmp-cell small { display: block; color: var(--muted); font-size: 11px; }
.cmp-chip { display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 6px; background: var(--soft); color: var(--ink); margin: 1px 2px 1px 0; }
.cmp-chip.warn { background: #fff7ed; color: #9a3412; }
.ddl-danger { color: var(--accent-2); font-weight: 700; } .ddl-soon { color: var(--gold); font-weight: 700; } .ddl-closed { color: var(--muted); }
.cmp-adm summary { cursor: pointer; color: var(--blue); }
.compare-insight { margin-top: 16px; } .compare-insight p { color: var(--muted); line-height: 1.6; margin: 4px 0; }
@media (max-width: 760px) { .compare-page { padding: 14px 12px 50px; } .cmp { grid-template-columns: 104px repeat(var(--cols), minmax(150px, 1fr)) 150px; } }
