:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f8;
  --bg-card: #ffffff;
  --border: #e3e6ea;
  --border-strong: #c9cfd6;
  --text: #1f2328;
  --text-soft: #4a5059;
  --text-mute: #7a828d;
  --accent: #1f3a5f;       /* 深蓝 */
  --accent-soft: #e8eef6;
  --accent-2: #2f5d50;     /* 墨绿 */
  --accent-2-soft: #e7efec;
  --warn: #8a6d1b;
  --warn-soft: #fbf5e3;
  --radius: 6px;
  --maxw: 960px;
  --shadow: 0 1px 2px rgba(20, 30, 50, 0.04);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(31, 58, 95, 0.25);
}
a:hover { border-bottom-color: var(--accent); }

h1, h2, h3, h4 {
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0;
  margin: 0 0 0.6em;
}
h1 { font-size: 1.75rem; line-height: 1.3; }
h2 { font-size: 1.25rem; margin-top: 2.2rem; padding-bottom: 0.35rem; border-bottom: 1px solid var(--border); }
h3 { font-size: 1.05rem; margin-top: 1.8rem; color: var(--accent); }
h4 { font-size: 0.98rem; margin-top: 1.2rem; color: var(--text-soft); }

p { margin: 0 0 0.9em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin-bottom: 0.3em; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--bg-soft);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.92em;
}

/* ---------------- Layout ---------------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.9rem 1.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}
.site-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: none;
}
.site-title:hover { color: var(--accent); }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.1rem;
  font-size: 0.92rem;
}
.site-nav a {
  color: var(--text-soft);
  border-bottom: none;
  padding: 0.2rem 0;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a.active { color: var(--accent); font-weight: 600; }

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem 1.2rem 4rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-mute);
  font-size: 0.85rem;
  padding: 1.4rem 1.2rem;
  text-align: center;
}

/* ---------------- Hero / Page intro ---------------- */
.page-intro {
  margin-bottom: 2.2rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--border);
}
.page-intro .eyebrow {
  color: var(--text-mute);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.page-intro p { color: var(--text-soft); max-width: 52em; }

/* ---------------- Cards / grid ---------------- */
.school-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}
.school-card {
  display: block;
  padding: 1.1rem 1.15rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.15s, transform 0.15s;
}
.school-card:hover {
  border-color: var(--accent);
  border-bottom-color: var(--accent);
  transform: translateY(-1px);
}
.school-card .card-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--accent);
  margin-bottom: 0.15rem;
}
.school-card .card-en {
  font-size: 0.85rem;
  color: var(--text-mute);
  margin-bottom: 0.6rem;
}
.school-card .card-meta {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.55;
}
.school-card .card-tag {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--accent-2);
  background: var(--accent-2-soft);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  margin-right: 0.3rem;
  margin-top: 0.5rem;
}

/* ---------------- Notes / callouts ---------------- */
.note {
  padding: 0.75rem 1rem;
  background: var(--bg-soft);
  border-left: 3px solid var(--border-strong);
  color: var(--text-soft);
  font-size: 0.9rem;
  border-radius: 2px;
  margin: 1rem 0 1.4rem;
}
.note.warn {
  background: var(--warn-soft);
  border-left-color: var(--warn);
  color: #5a4710;
}
.note.info {
  background: var(--accent-soft);
  border-left-color: var(--accent);
  color: #1a2e4a;
}
.note strong { color: inherit; }

/* ---------------- Sections ---------------- */
.section-group {
  margin-bottom: 1.6rem;
}
.kv-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.35rem 1.2rem;
  margin: 0.6rem 0 1rem;
  font-size: 0.93rem;
}
.kv-list dt {
  color: var(--text-mute);
  white-space: nowrap;
}
.kv-list dd { margin: 0; color: var(--text); }

.source-block {
  margin-top: 0.8rem;
}
.source-block h4 {
  font-size: 0.9rem;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 1.1rem;
  margin-bottom: 0.5rem;
}
.source-list {
  list-style: none;
  padding-left: 0;
  margin: 0.2rem 0 0.6rem;
}
.source-list li {
  padding: 0.1rem 0;
  line-height: 1.55;
  font-size: 0.93rem;
}
.source-list .source-label {
  color: var(--text-mute);
  margin-right: 0.4rem;
}

.button-link {
  display: inline-block;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--accent);
  margin-right: 0.5rem;
  margin-bottom: 0.4rem;
  background: #fff;
}
.button-link:hover {
  background: var(--accent-soft);
  border-bottom-color: var(--accent);
}

/* ---------------- Tables ---------------- */
.compare-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 1.2rem 0 1rem;
  background: #fff;
}
table.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 720px;
}
table.compare th,
table.compare td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
}
table.compare thead th {
  background: var(--bg-soft);
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
  position: sticky;
  top: 0;
}
table.compare tbody th {
  background: var(--bg-soft);
  width: 12rem;
  color: var(--text-soft);
  font-weight: 600;
}
table.compare tbody tr:last-child th,
table.compare tbody tr:last-child td { border-bottom: none; }

/* ---------------- Timeline ---------------- */
.timeline {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  border-left: 2px solid var(--border-strong);
}
.timeline li {
  position: relative;
  padding: 0.2rem 0 1.1rem 1.3rem;
}
.timeline li::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--accent);
  border-radius: 50%;
  position: absolute;
  left: -5.5px;
  top: 0.7rem;
}
.timeline .date {
  font-weight: 600;
  color: var(--accent);
  margin-right: 0.6rem;
}
.timeline .item-body {
  color: var(--text-soft);
  font-size: 0.94rem;
}
.timeline .placeholder {
  color: var(--text-mute);
  font-style: italic;
  font-size: 0.88rem;
}

/* ---------------- Placeholder blocks ---------------- */
.placeholder-block {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  color: var(--text-mute);
  background: var(--bg-soft);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.placeholder-block strong { color: var(--text-soft); }

/* ---------------- Password gate ---------------- */
.gate-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  padding: 2rem 1rem;
}
.gate-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  max-width: 360px;
  width: 100%;
  box-shadow: var(--shadow);
}
.gate-box h1 {
  font-size: 1.1rem;
  margin: 0 0 0.3rem;
}
.gate-box p {
  color: var(--text-mute);
  font-size: 0.88rem;
  margin: 0 0 1.2rem;
}
.gate-box input[type="password"] {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
  font-family: inherit;
}
.gate-box input[type="password"]:focus {
  outline: none;
  border-color: var(--accent);
}
.gate-box button {
  width: 100%;
  padding: 0.55rem;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
}
.gate-box button:hover { background: #14284a; }
.gate-error {
  color: #a83232;
  font-size: 0.85rem;
  min-height: 1.1em;
  margin-top: 0.1rem;
}
body.locked { overflow: hidden; }
body.locked main,
body.locked .site-header,
body.locked .site-footer { visibility: hidden; }

/* ---------------- Responsive ---------------- */
@media (max-width: 640px) {
  main { padding: 1.4rem 1rem 3rem; }
  h1 { font-size: 1.45rem; }
  h2 { font-size: 1.1rem; }
  .site-header-inner { padding: 0.7rem 1rem; }
  .site-nav { width: 100%; font-size: 0.88rem; gap: 0.2rem 0.9rem; }
  .kv-list { grid-template-columns: 1fr; gap: 0 0; }
  .kv-list dt { margin-top: 0.4rem; font-size: 0.82rem; }
}
