:root {
  --red: #00205b;
  --red-deep: #00205b;
  --blue: #0b3a7a;
  --blue-deep: #00205b;
  --gold: #c9a227;
  --ink: #0f172a;
  --muted: #5b6577;
  --line: #e6ebf2;
  --paper: #ffffff;
  --panel: #ffffff;
  --shadow: 0 10px 28px rgba(0, 32, 91, 0.08);
  --cuhk-navy: #00205b;
  --cuhk-gold: #c9a227;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #fff !important;
  color: #0f172a;
  line-height: 1.75;
}
body.ms1001-cuhk { background: #fff !important; }
html[data-ms1001-chrome="on"] header.topbar:not(.ms1001-chrome-unified) {
  display: none !important;
}
/* Match portal light chrome: pure white + CUHK under-shadow */
html[data-ms1001-chrome="on"]:not([data-surface-theme="dark"]) body::before {
  background: #fff !important;
}
html[data-ms1001-chrome="on"]:not([data-surface-theme="dark"]) #ms1001-chrome .ms1001-chrome-unified,
html[data-ms1001-chrome="on"]:not([data-surface-theme="dark"]) #ms1001-chrome .ms1001-chrome-unified.is-cuhk-two-row {
  background: #fff !important;
  border-bottom: 0 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
a { color: #1d4ed8; }
.wrap { max-width: 1600px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 56px) 56px; }

/* ── Hero box: blue-red gradient (dark) / warm light panel ── */
.hero.ms1001-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: center;
  margin: 0 0 20px;
  padding: 52px 32px 44px;
  border-radius: 28px;
}

@media (max-width: 900px) {
  .hero.ms1001-hero {
    grid-template-columns: 1fr;
    padding: 40px 22px 32px;
  }
  .hero-flag { order: -1; }
}

.hero-copy { min-width: 0; }

.hero-flag {
  margin: 0;
  text-align: center;
}
.hero-flag img {
  display: block;
  width: auto;
  max-width: min(100%, 260px);
  max-height: 300px;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(245, 196, 81, 0.35);
}
.hero-flag figcaption {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(253, 230, 138, 0.88);
}
.hero.ms1001-hero .hero-flag figcaption,
.hero.ms1001-hero[data-hero-theme="light"] .hero-flag figcaption {
  color: var(--cuhk-muted, #5b6577);
}

.hero.ms1001-hero[data-hero-theme="dark"],
.hero.ms1001-hero[data-hero-theme="light"] {
  border: 1px solid var(--line);
  border-radius: 0;
  background: #f7f9fc;
  color: #0f172a;
  box-shadow: none;
  border-bottom: 2px solid var(--cuhk-navy, #00205b);
}

.hero.ms1001-hero .kicker {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero.ms1001-hero .kicker,
.hero.ms1001-hero[data-hero-theme="dark"] .kicker,
.hero.ms1001-hero[data-hero-theme="light"] .kicker {
  color: var(--cuhk-gold, #c9a227);
}

.hero.ms1001-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4.5vw, 46px);
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.hero.ms1001-hero h1,
.hero.ms1001-hero[data-hero-theme="dark"] h1,
.hero.ms1001-hero[data-hero-theme="light"] h1 {
  color: var(--cuhk-navy, #00205b);
}

.hero.ms1001-hero .alias {
  margin: 0 0 14px;
  max-width: 72ch;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.75;
}

.hero.ms1001-hero .alias,
.hero.ms1001-hero[data-hero-theme="dark"] .alias,
.hero.ms1001-hero[data-hero-theme="light"] .alias {
  color: var(--cuhk-navy-soft, #0b3a7a);
}

.hero.ms1001-hero .lead {
  margin: 0;
  max-width: 72ch;
  font-size: 16px;
  line-height: 1.9;
}

.hero.ms1001-hero .lead,
.hero.ms1001-hero[data-hero-theme="dark"] .lead,
.hero.ms1001-hero[data-hero-theme="light"] .lead {
  color: var(--muted);
}

.hero.ms1001-hero a,
.hero.ms1001-hero[data-hero-theme="dark"] a,
.hero.ms1001-hero[data-hero-theme="light"] a {
  color: var(--blue);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 11px 18px;
  border-radius: 0;
  background: var(--cuhk-navy, #00205b);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  border: 0;
  box-shadow: none;
}

.hero.ms1001-hero .btn,
.hero.ms1001-hero[data-hero-theme="dark"] .btn,
.hero.ms1001-hero[data-hero-theme="light"] .btn {
  background: var(--cuhk-navy, #00205b);
  color: #fff;
  border: 0;
  box-shadow: none;
}

.btn.ghost,
.hero.ms1001-hero .btn.ghost,
.hero.ms1001-hero[data-hero-theme="dark"] .btn.ghost,
.hero.ms1001-hero[data-hero-theme="light"] .btn.ghost {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--cuhk-navy, #00205b);
  box-shadow: none;
}

/* ── 指导单位 / 秘书处 / 活动执行 — solid cards ── */
.gov {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0 0 28px;
}

@media (max-width: 800px) {
  .gov { grid-template-columns: 1fr; }
}

.gov-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 20px 22px;
  color: var(--ink);
  box-shadow: none;
}

.gov-card strong,
.gov-card .gov-label {
  display: block;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--blue);
  margin-bottom: 6px;
}

.gov-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: #334155;
}

.gov-card p a {
  color: #1e40af;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}

.gov-card p a:hover {
  text-decoration: underline;
}

/* ── Alliance poem ── */
.alliance-poem {
  margin: 0 0 20px;
  padding: clamp(28px, 4vw, 40px) clamp(24px, 4vw, 48px);
  border: 1px solid var(--line);
  border-left: 4px solid var(--cuhk-gold, #c9a227);
  background:
    linear-gradient(135deg, rgba(0, 32, 91, 0.04), transparent 55%),
    #fff;
  box-shadow: none;
}
.alliance-poem-kicker {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cuhk-gold, #c9a227);
}
.alliance-poem blockquote {
  margin: 0;
  padding: 0;
  border: 0;
}
.alliance-poem blockquote p {
  margin: 0;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 600;
  line-height: 2;
  letter-spacing: 0.12em;
  color: var(--cuhk-navy, #00205b);
  text-align: center;
}
.alliance-poem blockquote p + p {
  margin-top: 2px;
}

/* ── Content panels ── */
.panel {
  background: #fff;
  color: var(--ink);
  border-radius: 0;
  border: 1px solid var(--line);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: none;
}
.panel h2 { margin: 0 0 12px; font-size: 24px; color: var(--cuhk-navy, #00205b); line-height: 1.3; }
.panel h3 { margin: 24px 0 10px; font-size: 18px; color: var(--cuhk-navy, #00205b); }
.panel h4 { margin: 18px 0 8px; font-size: 16px; color: var(--cuhk-navy, #00205b); }
.panel p, .panel li { font-size: 15px; color: var(--muted); line-height: 1.85; }
.panel ul { margin: 10px 0; padding-left: 20px; }
.panel li + li { margin-top: 6px; }

.tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--cuhk-gold, #c9a227);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.gallery-lead { margin-top: 0; }
.event-meta { margin: 12px 0 0; padding-left: 20px; }
.event-meta li { margin: 6px 0; font-size: 14px; color: var(--muted); line-height: 1.75; }
.event-poster {
  margin-top: 18px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}
.event-poster img { width: 100%; height: auto; display: block; }

.wechat-qr-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}
.wechat-qr-grid figure {
  margin: 0;
  width: min(96px, 22vw);
  text-align: center;
}
.wechat-qr-grid img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 760px) { .gallery-grid { grid-template-columns: 1fr; } }
.gallery-grid figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}
.gallery-grid img { width: 100%; height: auto; display: block; }
.gallery-grid figcaption {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  background: #fffaf1;
}

.charter .charter-note { font-size: 14px; color: #8f1717; font-weight: 700; }
.charter .chapter { margin-top: 28px; padding-top: 8px; border-top: 1px solid #f0dec2; }
.charter .article { margin-top: 16px; }
.charter .article p { margin: 0 0 12px; line-height: 1.85; }

.score-tool-panel p {
  margin: 0;
  color: #334155;
  line-height: 1.85;
}
.score-tool-panel .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer {
  text-align: center;
  padding: 24px 20px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.75;
  border-top: 1px solid #f4cda2;
}

/* Dark surface: one navy page shell; white content cards (same as homepage) */
html[data-surface-theme="dark"] body,
html[data-surface-theme="dark"] body.ms1001-cuhk {
  background: #00205b !important;
  color: #fff;
}
html[data-ms1001-chrome="on"][data-surface-theme="dark"] body::before {
  background: #00205b !important;
}
html[data-surface-theme="dark"] .hero.ms1001-hero,
html[data-surface-theme="dark"] .hero.ms1001-hero[data-hero-theme="dark"],
html[data-surface-theme="dark"] .hero.ms1001-hero[data-hero-theme="light"],
html[data-surface-theme="dark"] .gov-card,
html[data-surface-theme="dark"] .alliance-poem,
html[data-surface-theme="dark"] .panel,
html[data-surface-theme="dark"] .article,
html[data-surface-theme="dark"] .chapter {
  background: #fff !important;
  border-color: #e6ebf2;
  color: #0f172a;
}
html[data-surface-theme="dark"] .hero.ms1001-hero h1,
html[data-surface-theme="dark"] .panel h2,
html[data-surface-theme="dark"] .panel h3,
html[data-surface-theme="dark"] .panel h4,
html[data-surface-theme="dark"] .gov-label {
  color: #00205b !important;
}
html[data-surface-theme="dark"] .hero.ms1001-hero .lead,
html[data-surface-theme="dark"] .hero.ms1001-hero .alias,
html[data-surface-theme="dark"] .panel p,
html[data-surface-theme="dark"] .panel li,
html[data-surface-theme="dark"] .gov-card p {
  color: #5b6577 !important;
}
html[data-surface-theme="dark"] .alliance-poem blockquote p {
  color: #00205b !important;
}
html[data-surface-theme="dark"] .alliance-poem-kicker {
  color: #c9a227 !important;
}
html[data-surface-theme="dark"] .hero.ms1001-hero a:not(.btn),
html[data-surface-theme="dark"] .panel a:not(.btn),
html[data-surface-theme="dark"] .gov-card a:not(.btn) {
  color: #1d4ed8 !important;
}
/* Primary CTA: navy bg + white text (never inherit link blue) */
html[data-surface-theme="dark"] .btn:not(.ghost),
html[data-surface-theme="dark"] .hero.ms1001-hero .btn:not(.ghost),
html[data-surface-theme="dark"] a.btn:not(.ghost) {
  background: #00205b !important;
  color: #fff !important;
}
html[data-surface-theme="dark"] .btn.ghost,
html[data-surface-theme="dark"] .hero.ms1001-hero .btn.ghost,
html[data-surface-theme="dark"] a.btn.ghost {
  background: #fff !important;
  border: 1px solid #e6ebf2 !important;
  color: #00205b !important;
}
/* Chrome already has Light/Dark — hide legacy hero-only toggle */
html[data-ms1001-chrome="on"] .ms1001-hero-theme-toggle {
  display: none !important;
}
html[data-surface-theme="dark"] .footer {
  background: transparent;
  border-top-color: rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.78);
}
html[data-surface-theme="dark"] .footer a {
  color: #e2c878 !important;
}


.site-nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid #e6ebf2;
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}
.site-nav-inner {
  max-width: 1600px; margin: 0 auto;
  padding: 12px clamp(20px,4vw,56px);
  display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.site-nav .brand { font-weight: 800; color: #00205b; text-decoration: none; }
.site-nav nav { display: flex; gap: 14px; flex-wrap: wrap; }
.site-nav nav a { color: #334155; text-decoration: none; font-weight: 600; font-size: 14px; }
.site-nav nav a:hover { color: #00205b; }
.news-teaser { border-top: 1px solid #e6ebf2; padding-top: 14px; margin-top: 8px; }
.news-teaser .meta { color: #64748b; font-size: 13px; }
.news-teaser h3 { margin: 6px 0 8px; font-size: 20px; }
.news-teaser h3 a { color: #00205b; text-decoration: none; }
.event-closed {
  padding: 16px 18px; margin: 0 0 14px;
  background: #f8fafc; border: 1px dashed #cbd5e1; color: #475569;
}
.template-note {
  padding: 12px 14px; margin: 0 0 14px;
  background: #fff8e8; border: 1px solid #e2c878; color: #5b4a12;
}
