:root {
  color-scheme: light dark;
  --bg: #f6f4ee;
  --surface: #fffdf8;
  --surface-2: #efece2;
  --ink: #1d2a25;
  --ink-2: #43534c;
  --muted: #71807a;
  --line: #ddd8c9;
  --accent: #0d5c46;
  --accent-ink: #fff;
  --accent-soft: #e2efe8;
  --gold: #a87b1d;
  --gold-soft: #f4ead2;
  --shadow: 0 1px 2px rgba(29, 42, 37, .06), 0 8px 24px rgba(29, 42, 37, .07);
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10150f; --surface: #1a201b; --surface-2: #232a24;
    --ink: #e9ede7; --ink-2: #bcc7bd; --muted: #8b9a8f;
    --line: #333d34; --accent: #4db894; --accent-ink: #0c1a14;
    --accent-soft: #1e332a; --gold: #d9ab4e; --gold-soft: #3a2f18;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.7 "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
.topbar { position: sticky; z-index: 5; top: 0; min-height: 66px; padding: 10px max(20px, calc((100vw - 1180px)/2)); display: flex; align-items: center; justify-content: space-between; gap: 16px; background: color-mix(in srgb, var(--surface) 92%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: baseline; gap: 9px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand b { font: 800 21px/1.2 "Noto Serif SC", "Songti SC", serif; }
.brand span { color: var(--muted); font-size: 13px; }
.brand small { color: var(--ink-2); font-size: 13px; }
.contact, .promo a { border-radius: 9px; padding: 8px 14px; color: var(--accent-ink); background: var(--accent); text-decoration: none; font-weight: 700; }
.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 24px 0 72px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 420px); gap: 30px; align-items: start; padding: 18px 0 28px; }
.hero h1, .pagehead h1 { margin: 0 0 10px; font: 900 clamp(28px, 4.5vw, 42px)/1.25 "Noto Serif SC", "Songti SC", serif; }
.hero p { max-width: 52em; color: var(--ink-2); }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 14px; font-weight: 700; }
.stats { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 22px; padding: 15px 0; border-block: 1px solid var(--line); color: var(--ink-2); }
.stats b { margin-right: 5px; color: var(--accent); font: 900 22px "Noto Serif SC", serif; }
.promo { padding: 20px 22px; border: 2px solid var(--gold); border-radius: var(--radius); background: var(--gold-soft); box-shadow: var(--shadow); }
.promo strong { font: 900 22px/1.4 "Noto Serif SC", serif; }
.promo p { color: var(--ink-2); }
.promo a { display: block; text-align: center; }
.promo details { margin-top: 12px; }
.promo summary { cursor: pointer; color: var(--accent); font-size: 14px; font-weight: 600; }
.p-rules { margin-top: 10px; padding: 12px 14px; border-radius: 10px; background: var(--surface); color: var(--ink-2); font-size: 13px; }
.p-rules p { margin: 4px 0 8px; }
.p-rules ul { margin: 6px 0; padding-left: 1.3em; }
.about-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.about-cols h3 { margin-bottom: 5px; }
.contactline { margin-top: 18px; }
.tag, .tags { display: inline-flex; flex-wrap: wrap; gap: 7px; }
.tag { padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; }
.panel { margin: 18px 0; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 12px; font: 800 22px/1.4 "Noto Serif SC", "Songti SC", serif; }
.about { border-left: 4px solid var(--accent); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.card:hover { border-color: var(--accent); transform: translateY(-1px); }
.card strong { font-size: 16px; }
.card span, .card small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.pagehead { margin: 12px 0 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.pagehead p:last-child { margin-bottom: 0; color: var(--ink-2); }
.crumb { color: var(--muted); font-size: 13px; }
.crumb a { text-decoration: none; }
.prose { overflow-wrap: anywhere; }
.prose h1, .prose h2, .prose h3, .prose h4 { font-family: "Noto Serif SC", "Songti SC", serif; }
.prose h2 { margin: 28px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { margin: 22px 0 8px; font-size: 18px; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose li { margin: 4px 0; }
.prose a, .source a { overflow-wrap: anywhere; }
.source { margin: 14px 0 0; color: var(--muted); font-size: 12px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 0; }
.controls { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; margin: 12px 0 16px; }
.controls label, .panel > label { display: grid; gap: 4px; color: var(--ink-2); font-size: 13px; }
input, select { min-height: 40px; max-width: 100%; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
.table-scroll { overflow-x: auto; }
.table-scroll table { min-width: 940px; }
.table-scroll td.note-cell { min-width: 260px; max-width: 420px; white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
.table-scroll .ranking-table { width: 100%; table-layout: fixed; }
.ranking-table th:nth-child(4), .ranking-table td:nth-child(4) { padding-right: 6px; padding-left: 6px; white-space: nowrap; }
.ranking-table td.note-cell { min-width: 0; max-width: none; }
.reference-intro { margin: 0 0 14px; color: var(--ink-2); }
.reference-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.reference-tab { padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink-2); font: inherit; cursor: pointer; }
.reference-tab[aria-selected="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.reference-panel { padding: 2px 0 4px; scroll-margin-top: 92px; }
.reference-panel > h3 { margin: 6px 0 12px; font: 800 22px/1.4 "Noto Serif SC", "Songti SC", serif; }
.reference-full-link { display: inline-block; margin-top: 12px; }
.reference-copy .md-table-scroll { max-width: 100%; overflow-x: auto; }
.reference-copy .md-table { width: 100%; margin: 14px 0; border-collapse: collapse; font-size: 14.5px; }
.reference-copy .md-table th, .reference-copy .md-table td { padding: 8px 11px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.reference-copy .md-table th { background: var(--surface-2); }
.reference-copy .md-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
th, td { padding: 9px 11px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--surface-2); }
tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
td small { display: block; color: var(--muted); }
.empty { color: var(--muted); }
[hidden] { display: none !important; }
.fact { padding: 10px 12px; border-radius: 9px; background: var(--surface-2); }
.fact dt { color: var(--muted); font-size: 13px; }
.fact dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.footer { display: flex; justify-content: space-between; gap: 16px; padding: 22px max(20px, calc((100vw - 1180px)/2)); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.quick { position: fixed; z-index: 4; right: 18px; top: 42%; display: grid; gap: 5px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.quick a { padding: 4px 8px; color: var(--ink-2); font-size: 12px; text-decoration: none; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; gap: 18px; } .promo { width: 100%; } .quick { right: 8px; top: auto; bottom: 8px; display: flex; } }
@media (max-width: 560px) { body { font-size: 15px; } .topbar { padding-inline: 14px; } .brand { gap: 6px; } .brand b { font-size: 18px; } .brand span, .brand small { font-size: 11px; } .contact { padding: 7px 9px; font-size: 13px; } .wrap { width: calc(100% - 28px); padding-top: 14px; } .panel { padding: 17px; } .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .card { padding: 11px; } .footer { display: block; padding: 18px 14px 64px; } .footer span { display: block; } }

/* Match the original single-file site's spacing and component treatment. */
.wrap { width: min(1140px, calc(100% - 32px)); padding: 0 0 72px; }
.topbar { min-height: 0; padding: 10px max(16px, calc((100vw - 1140px)/2)) 6px; background: color-mix(in srgb, var(--bg) 92%, transparent); border: 0; }
.brand { gap: 10px; flex-wrap: wrap; }
.brand b { font-size: 25px; font-weight: 900; }
.brand span { color: var(--accent); font-size: 15px; font-weight: 700; letter-spacing: .05em; }
.brand small { font-size: 13.5px; }
.contact { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; box-shadow: var(--shadow); white-space: nowrap; }
.hero { display: block; padding: 8px 0 2px; }
.intro-flex { display: flex; align-items: flex-start; gap: 18px; }
.intro-text { flex: 1 1 auto; min-width: 0; }
.eyebrow { display: none; }
.hero h1 { margin-bottom: 6px; font-size: clamp(25px, 3.8vw, 36px); }
.hero .intro-text > p:not(.eyebrow) { max-width: 46em; margin: 0; color: var(--ink-2); font-size: 15.5px; }
.updated-schools { margin-top: 12px; color: var(--ink-2); }
.updated-schools summary { display: inline-flex; align-items: baseline; gap: 8px; cursor: pointer; list-style: none; }
.updated-schools summary::-webkit-details-marker { display: none; }
.updated-schools summary::after { content: "查看学校名单 ↓"; margin-left: 4px; color: var(--accent); font-size: 13px; }
.updated-schools[open] summary::after { content: "收起名单 ↑"; }
.updated-schools strong { color: var(--accent); font: 900 27px/1 "Noto Serif SC", "Songti SC", serif; }
.updated-schools span { font-size: 15px; }
.updated-schools summary small { color: var(--muted); font-size: 13px; }
.updated-school-list { max-width: 640px; margin-top: 10px; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--surface); }
.updated-school-list p { margin: 0 0 6px; font-size: 13px; }
.updated-school-list ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; margin: 0; padding: 0; list-style: none; }
.updated-school-list li { display: flex; gap: 7px; min-width: 0; font-size: 14px; }
.updated-school-list li > span { flex: 0 0 42px; color: var(--muted); font-size: 13px; }
.updated-school-list li a { min-width: 0; text-decoration: none; }
.updated-school-list li small { color: var(--muted); }
.promo { flex: 0 1 390px; max-width: 390px; margin-top: 0; padding: 9px 12px 8px; }
.promo .p-title { margin: 0 0 3px; color: var(--ink); font-size: 20px; line-height: 1.3; }
.promo .p-title::first-letter { color: var(--gold); }
.promo .p-desc { margin: 0 0 5px; font-size: 14px; line-height: 1.5; }
.promo .p-desc strong { font: inherit; font-weight: 700; }
.promo .p-cta { padding: 7px 10px; border-radius: 9px; font-size: 15px; }
.promo details { margin-top: 4px; }
.promo summary { list-style: none; display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 500; }
.promo summary::-webkit-details-marker { display: none; }
.promo summary::after { content: "▾"; font-size: 12px; transition: transform .15s ease; }
.promo details[open] summary::after { transform: rotate(180deg); }
.p-rules { padding: 12px 14px 10px; font-size: 13.5px; }
.p-rules li { margin: 3px 0; }
.p-rules .p-note { font-size: 12.5px; color: var(--muted); }
.stats { gap: 6px 18px; margin: 8px 0 0; padding: 6px 0; border-block: 1px solid var(--line); }
.stats b { font-size: 22px; }
.about { margin: 10px 0 10px; padding: 0; border-left: 0; }
.about-box { padding: 12px 18px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.about h2 { margin: 0 0 5px; font-size: 23px; font-weight: 900; }
.about .lead { max-width: 46em; margin: 0 0 6px; font-size: 15.5px; }
.about .who { max-width: 46em; margin: 0 0 10px; color: var(--ink-2); }
.about-cols { grid-template-columns: 1fr 1fr; gap: 4px 32px; }
.about-cols h3 { margin: 0 0 5px; font-size: 16.5px; }
.about-cols ul { margin: 0; padding: 0; list-style: none; }
.about-cols li { position: relative; padding: 1px 0 1px 22px; color: var(--ink-2); font-size: 15px; }
.about-cols li::before { position: absolute; left: 2px; font-weight: 700; }
.about-cols .do li::before { content: "✓"; color: var(--accent); }
.about-cols .dont li::before { content: "×"; color: var(--danger); }
.about .contactline { margin: 12px 0 0; padding-top: 9px; border-top: 1px dashed var(--line); font-size: 15px; color: var(--ink-2); }
.about .contactline a { font-weight: 500; text-decoration: none; }
.panel { margin: 12px 0; padding: 16px 18px; box-shadow: none; }
.panel h2 { margin-bottom: 8px; font-size: 23px; }
.cards { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; padding: 10px 0 8px; }
.card { gap: 10px; padding: 18px 20px 16px; border-radius: var(--radius); box-shadow: var(--shadow); }
.card:hover { transform: translateY(-2px); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.country-card h3 { margin: 0; font-size: 24px; font-weight: 900; line-height: 1.2; }
.country-card .en { margin-top: 2px; color: var(--muted); font-size: 13.5px; }
.country-card .region { flex: none; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; }
.country-card .qs { padding: 2px 8px; border-radius: 6px; background: var(--gold-soft); color: var(--gold); font: 700 13px "Noto Serif SC", serif; }
.country-card .country-top-rank { margin-top: 1px; }
.country-card .country-top-school { color: var(--ink-2); font-size: 14.5px; overflow-wrap: anywhere; }
.country-card .country-facts { display: grid; gap: 7px; margin: 0; }
.country-card .country-facts > div { display: grid; grid-template-columns: 4.6em minmax(0, 1fr); gap: 8px; color: var(--ink); font-size: 14.5px; line-height: 1.5; }
.country-card .country-facts dt { color: var(--muted); }
.country-card .country-facts dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.country-card .card-note { margin: 0; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.school-note p { margin: 0; overflow-wrap: anywhere; }
.school-ref { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); text-underline-offset: 2px; }
.school-ref:hover { color: var(--accent); text-decoration-color: var(--accent); }
.country-card .go { margin-top: auto; color: var(--accent); font-size: 14px; font-weight: 500; }
.controls { position: sticky; top: 76px; z-index: 3; align-items: center; margin: 0 0 8px; padding: 6px 0; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); }
.controls .search { flex: 1 1 280px; display: flex; align-items: center; gap: 8px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); }
.controls .search input { width: 100%; min-height: 0; padding: 0; border: 0; outline: 0; background: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip, .sortsel { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 7px 15px; font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 500; }
.sortsel { padding: 8px 12px; font: inherit; font-size: 14px; }
.sort-label { display: contents !important; }
.panel > label input { border-radius: 999px; background: var(--surface); }
.quick { right: 16px; top: 28%; transform: none; z-index: 35; gap: 2px; padding: 8px 6px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); }
.quick-title { padding: 2px 6px 4px; color: var(--muted); font-size: 11px; letter-spacing: .12em; text-align: center; }
.quick a { padding: 5px 9px; border-radius: 8px; font-size: 12.5px; white-space: nowrap; }
.quick a:hover { background: var(--accent-soft); color: var(--accent); }
.quick a[aria-current="location"] { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.footer { margin-top: 44px; padding-top: 22px; padding-bottom: 40px; font-size: 13.5px; }
.detail { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 34px; padding: 10px 0 30px; align-items: start; }
.toc { position: sticky; top: 100px; max-height: calc(100vh - 120px); overflow-y: auto; padding-right: 6px; font-size: 14px; }
.toc-title { margin: 0 0 8px; color: var(--muted); font-size: 12.5px; letter-spacing: .12em; }
.toc a { display: block; padding: 4px 0 4px 10px; border-left: 2px solid var(--line); color: var(--ink-2); text-decoration: none; }
.toc a.lvl3 { padding-left: 22px; font-size: 13.5px; }
.toc a:hover { border-left-color: var(--accent); color: var(--accent); }
.article { min-width: 0; padding: 30px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.country-copy > h2 { margin: 0 0 12px; font: 800 22px/1.4 "Noto Serif SC", "Songti SC", serif; }
.country-copy[id], .country-copy .prose h2[id], .country-copy .prose h3[id] { scroll-margin-top: 92px; }
.country-copy .prose h2 { margin: 30px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.country-copy .prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.country-copy .prose h3 { margin: 22px 0 8px; font-size: 18px; }
.country-copy .prose blockquote { margin: 12px 0; padding: 10px 16px; border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; background: var(--accent-soft); color: var(--ink-2); }
.country-copy .prose hr { margin: 22px 0; border: 0; border-top: 1px solid var(--line); }
.country-copy .md-table-scroll { overflow-x: auto; }
.country-copy .md-table { border-collapse: collapse; width: 100%; margin: 14px 0; font-size: 14.5px; }
.country-copy .md-table th, .country-copy .md-table td { padding: 8px 11px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.country-copy .md-table th { background: var(--surface-2); }
.country-copy .md-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.related-schools { margin-top: 28px; }
.major-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 16px; }
.major-controls label { color: var(--ink-2); font-weight: 700; }
.major-controls select { min-width: 190px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font: inherit; }
.major-program-list { display: grid; gap: 12px; }
.major-program { padding: 16px 18px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.major-program[hidden] { display: none; }
.major-program-title { margin-bottom: 10px; }
.major-program-title a { color: var(--ink); text-decoration: none; }
.major-program-title a:hover { color: var(--accent); }
.major-program-title small, .major-program-facts dd small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }
.major-program-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 18px; margin: 0; }
.major-program-facts dt { color: var(--muted); font-size: 12px; }
.major-program-facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.major-program-facts a { text-decoration: none; }
.muted { color: var(--muted); }
.tags .chip { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.tags .chip small { color: inherit; opacity: .75; }
@media (max-width: 900px) {
  .detail { grid-template-columns: 1fr; }
  .toc { display: none; }
  .article { padding: 22px 18px; }
  .intro-flex { flex-direction: column; gap: 18px; }
  .promo { flex: none; width: 100%; max-width: none; margin-top: 0; }
  .cards { grid-template-columns: 1fr; }
  .quick { display: none; }
}
@media (max-width: 700px) {
  .about-cols { grid-template-columns: 1fr; gap: 14px; }
  .about-box { padding: 14px 14px 12px; }
}
@media (max-width: 560px) {
  .topbar { padding: 12px 14px 8px; }
  .brand b { font-size: 24px; }
  .contact { padding: 9px 12px; font-size: 0; }
  .contact span { font-size: 16px; }
  .wrap { width: calc(100% - 28px); padding-top: 0; }
  .panel { padding: 14px 12px; }
  .cards { grid-template-columns: 1fr; gap: 12px; }
  .card { gap: 9px; padding: 16px 16px 14px; }
  .cards { gap: 12px; }
  .country-card h3 { font-size: 23px; }
  .country-card .country-facts > div { font-size: 14px; }
  .updated-school-list { padding: 9px 10px; }
  .updated-school-list ul { grid-template-columns: 1fr; }
  .article { padding: 16px 13px; }
  .table-scroll { max-width: 100%; }
  .footer { display: block; padding: 18px 14px 64px; }
  .footer span { display: block; }
}
