:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --border: rgba(148, 163, 184, 0.24);
  --text: #0f172a;
  --muted: #475569;
  --accent: #b91c1c;
  --accent-dark: #991b1b;
  --gold: #b45309;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

body.ce-site {
  margin: 0;
  font-family: "Segoe UI", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(185, 28, 28, 0.06), transparent 32%),
    linear-gradient(180deg, #fbf8f8 0%, var(--bg) 100%);
}

.ce-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 80px;
}

/* Chinese-name inline label */
.ce-cn { color: var(--muted); font-weight: 500; font-size: 0.85em; }
.ce-cn-lg { display: inline-block; font-size: 0.5em; vertical-align: middle; margin-left: 6px; }

.ce-breadcrumbs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 18px; color: var(--muted); font-size: 14px;
}
.ce-breadcrumbs a { color: var(--accent); text-decoration: none; }
.ce-breadcrumbs a:hover { text-decoration: underline; }

.ce-hero-card, .ce-card {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.ce-hero-card {
  padding: 28px; margin-bottom: 22px;
  background:
    radial-gradient(circle at top right, rgba(185, 28, 28, 0.10), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(254, 242, 242, 0.9));
}

.ce-kicker {
  margin: 0 0 12px; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.13em;
  font-size: 12px; font-weight: 700;
}

.ce-hero-card h1 {
  margin: 0; font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.1; letter-spacing: -0.02em;
}

.ce-summary, .ce-card p {
  margin: 14px 0 0; color: var(--muted);
  line-height: 1.65; font-size: 16px;
}

.ce-card { padding: 24px; margin-bottom: 22px; }
.ce-card h2 { margin: 0 0 14px; font-size: 22px; }
.ce-card h3 { margin: 20px 0 8px; font-size: 17px; color: var(--text); }

/* Profile facts */
.ce-facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px; margin: 0;
}
.ce-fact {
  padding: 14px; border-radius: 16px;
  background: #f8fafc; border: 1px solid rgba(148, 163, 184, 0.15);
}
.ce-fact dt {
  margin: 0; font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.ce-fact dd { margin: 8px 0 0; font-size: 16px; line-height: 1.45; }

.ce-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ce-badge {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  background: #fef2f2; border: 1px solid rgba(185, 28, 28, 0.25);
  color: var(--accent-dark); font-size: 13px; font-weight: 600;
}

.ce-status { margin-top: 14px; font-size: 15px; }
.ce-status-ok { color: #166534; }
.ce-status a { color: var(--accent); }

.ce-hero-cta {
  margin-top: 14px; padding: 10px 14px; border-radius: 12px;
  background: #fef2f2; border: 1px solid rgba(185, 28, 28, 0.2);
  font-size: 14.5px;
}
.ce-hero-cta a { color: var(--accent-dark); font-weight: 700; text-decoration: none; }
.ce-hero-cta a:hover { text-decoration: underline; }

.ce-publisher { margin-top: 14px; font-size: 13px; color: var(--muted); }
.ce-publisher a { color: var(--accent); text-decoration: none; }

/* Admissions lists */
.ce-list { margin: 8px 0 0; padding-left: 22px; line-height: 1.6; color: var(--muted); }
.ce-list li { margin: 4px 0; }
.ce-admissions h2 .ce-cn { font-size: 0.6em; }

/* Ad CTA */
.tc-ad {
  margin: 20px 0 0; padding: 18px 20px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.06), rgba(217, 119, 6, 0.03));
  border: 1px solid rgba(180, 83, 9, 0.25); border-left: 4px solid var(--gold);
}
.tc-ad p { margin: 0; color: var(--text); font-size: 15px; line-height: 1.6; }
.tc-ad a { color: var(--gold); font-weight: 700; text-decoration: none; }
.tc-ad a:hover { text-decoration: underline; }

/* Language switch */
.ce-lang-switch { margin-top: 18px; display: flex; align-items: center; gap: 10px; }
.ce-lang-switch label { font-size: 13px; color: var(--muted); font-weight: 600; }
.ce-lang-switch select {
  padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; color: var(--text); font-size: 14px;
}

/* Related + landing lists */
.ce-related-list, .ce-landing-list {
  list-style: none; margin: 0; padding: 0;
}
.ce-related-list li, .ce-landing-list li {
  padding: 10px 0; border-bottom: 1px solid rgba(148, 163, 184, 0.15); font-size: 15px;
}
.ce-related-list li:last-child, .ce-landing-list li:last-child { border-bottom: 0; }
.ce-related-list a, .ce-landing-list a { color: var(--accent); text-decoration: none; font-weight: 600; }
.ce-related-list a:hover, .ce-landing-list a:hover { text-decoration: underline; }
.ce-related-meta, .ce-landing-meta { color: var(--muted); font-size: 13px; margin-left: 6px; }
.ce-tag {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px;
  background: #dcfce7; color: #166534; font-size: 11px; font-weight: 700;
}

/* Landing stats + cross-links */
.ce-landing-stats { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; }
.ce-stat-box {
  flex: 1; min-width: 120px; padding: 16px; border-radius: 16px;
  background: #f8fafc; border: 1px solid rgba(148, 163, 184, 0.15); text-align: center;
}
.ce-stat-number { display: block; font-size: 28px; font-weight: 800; color: var(--accent); line-height: 1; }
.ce-stat-label { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.ce-chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ce-chip {
  display: inline-block; padding: 7px 13px; border-radius: 999px;
  background: #f8fafc; border: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--text); text-decoration: none; font-size: 13px;
}
.ce-chip span { color: var(--muted); }
.ce-chip:hover { background: rgba(185, 28, 28, 0.06); }

/* Footer */
.ce-footer { margin-top: 34px; padding-top: 22px; border-top: 2px solid var(--border); }
.ce-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-top: 16px; }
.ce-footer-links a { color: var(--accent); font-size: 14px; font-weight: 600; text-decoration: none; }
.ce-footer-links a:hover { text-decoration: underline; }

/* ── Browse UI (index.html) ─────────────────────────────────────────────── */
.ce-toolbar { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.ce-search {
  flex: 1 1 240px; min-width: 200px; padding: 12px 16px;
  border-radius: 12px; border: 1px solid var(--border); background: #fff;
  font-size: 15px; color: var(--text);
}
.ce-filter {
  padding: 11px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: #fff; font-size: 14px; color: var(--text);
}
.ce-result-count { margin: 20px 0 12px; color: var(--muted); font-size: 14px; }

.ce-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
}
.ce-uni-card {
  display: block; padding: 18px; border-radius: 16px; text-decoration: none;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: transform 0.12s, border-color 0.12s;
}
.ce-uni-card:hover { transform: translateY(-2px); border-color: rgba(185, 28, 28, 0.35); }
.ce-uni-name { margin: 0; font-size: 17px; font-weight: 700; color: var(--text); }
.ce-uni-cn { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.ce-uni-meta { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.ce-uni-tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.ce-mini-badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700;
}
.ce-mini-985 { background: #fef2f2; color: var(--accent-dark); }
.ce-mini-verified { background: #dcfce7; color: #166534; }

.ce-pager {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 6px; margin: 30px 0 0;
}
.ce-page {
  min-width: 38px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: #fff; color: var(--text);
  font-size: 14px; font-weight: 600; line-height: 1; cursor: pointer;
  text-align: center; transition: border-color 0.12s, background 0.12s;
}
.ce-page:hover { border-color: rgba(185, 28, 28, 0.45); background: #fef2f2; }
.ce-page-cur {
  background: var(--accent); border-color: var(--accent); color: #fff; cursor: default;
}
.ce-page-cur:hover { background: var(--accent); }
.ce-page-off { color: #cbd5e1; cursor: default; }
.ce-page-off:hover { border-color: var(--border); background: #fff; }
.ce-page-gap { padding: 0 4px; color: var(--muted); }
.ce-cards[aria-busy="true"] { opacity: 0.5; transition: opacity 0.15s; }
.ce-empty { text-align: center; color: var(--muted); padding: 40px 0; }

@media (max-width: 700px) {
  .ce-facts { grid-template-columns: 1fr; }
  .ce-hero-card, .ce-card { padding: 18px; border-radius: 16px; }
}
