:root {
  --bg: #f3f5f8;
  --navy: #1f3a68;
  --navy2: #2c5190;
  --ink: #1f2933;
  --mute: #6b7685;
  --line: #dde3ea;
  --gold: #b08a3e;
  --red: #b42318;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); }
body { font: 15px/1.6 "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif; min-height: 100vh; -webkit-text-size-adjust: 100%; }
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; }

.top { background: var(--navy); color: #fff; border-bottom: 3px solid var(--gold); }
.top .inner { max-width: 760px; margin: 0 auto; padding: 18px 20px; display: flex; align-items: center; gap: 14px; }
.seal { width: 42px; height: 42px; flex: none; border: 2px solid #fff; border-radius: 6px; display: grid; place-items: center; font: 700 22px/1 "STKaiti", "KaiTi", serif; }
.brand b { display: block; font-size: 19px; letter-spacing: 2px; }
.brand small { display: block; font-size: 12px; opacity: .7; letter-spacing: .5px; }

main { max-width: 760px; margin: 0 auto; padding: 22px 16px 40px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 22px 20px; box-shadow: 0 1px 3px rgba(16, 24, 40, .05); }
.panel + .panel, #results > * + * { margin-top: 16px; }
h2 { font-size: 18px; color: var(--navy); padding-left: 10px; border-left: 4px solid var(--navy); line-height: 1.2; }
.sub { color: var(--mute); font-size: 13px; margin: 10px 0 18px; }
label { display: block; font-size: 13px; color: var(--mute); margin-bottom: 6px; }
.search { display: flex; gap: 10px; }
.search input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 11px 12px; border: 1px solid #c5ced9; border-radius: 6px; outline: none; background: #fff; color: var(--ink); letter-spacing: .5px; }
.search input:focus { border-color: var(--navy2); box-shadow: 0 0 0 3px rgba(44, 81, 144, .15); }
.search button { flex: none; padding: 0 26px; border: 0; border-radius: 6px; background: var(--navy); color: #fff; font-weight: 600; letter-spacing: 2px; }
.search button:hover { background: var(--navy2); }
.search button.loading { opacity: .6; pointer-events: none; }
.hint { color: var(--mute); font-size: 12px; margin-top: 10px; }
.err { color: var(--red); font-size: 13px; min-height: 20px; margin-top: 6px; }

.person .p-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.p-name { font-size: 22px; font-weight: 700; color: var(--navy); letter-spacing: 2px; }
.p-pinyin { font-size: 12px; color: var(--mute); letter-spacing: 1px; text-transform: uppercase; }
.ghost { border: 1px solid #c5ced9; background: #fff; color: var(--navy); border-radius: 6px; padding: 6px 14px; font-size: 13px; white-space: nowrap; }
.ghost:hover { border-color: var(--navy2); }
.p-info { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.p-info dt { font-size: 12px; color: var(--mute); }
.p-info dd { font-size: 14px; font-weight: 600; }

.exam { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-top: 16px; box-shadow: 0 1px 3px rgba(16, 24, 40, .05); }
.exam-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 12px 18px; background: #eef2f8; border-bottom: 1px solid var(--line); }
.exam-h b { color: var(--navy); font-size: 15px; }
.exam-h b::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-right: 8px; vertical-align: middle; }
.exam-h span { color: var(--mute); font-size: 12px; white-space: nowrap; }
.exam table { width: 100%; border-collapse: collapse; font-size: 14px; }
.exam th, .exam td { padding: 11px 18px; text-align: left; border-bottom: 1px solid #edf0f4; }
.exam th { font-size: 12px; color: var(--mute); font-weight: 400; background: #fafbfc; }
.exam tr:last-child td { border-bottom: 0; }
.exam .assoc { color: var(--mute); font-size: 13px; }
.grade { display: inline-block; min-width: 46px; text-align: center; padding: 2px 8px; border-radius: 4px; font-size: 13px; font-weight: 600; border: 1px solid; }
.g-优秀 { color: #8a5a00; border-color: #e7c77a; background: #fdf6e3; }
.g-良好 { color: #1f5a96; border-color: #a9c6e8; background: #eef5fc; }
.g-合格 { color: #2f6b3a; border-color: #b5d6b9; background: #f0f8f1; }
.g-不合格, .g-缺考 { color: var(--red); border-color: #f0b8b3; background: #fdf1f0; }

footer { text-align: center; color: var(--mute); font-size: 12px; margin-top: 28px; }

@media (max-width: 560px) {
  .p-info { grid-template-columns: 1fr 1fr; }
  .p-info div:nth-child(2) { grid-column: 1 / -1; order: 3; }
  .exam-h { flex-direction: column; gap: 2px; padding: 12px 14px; }
  .exam th, .exam td { padding: 10px 12px; }
  .exam .col-assoc { display: none; }
  .exam td.major small { display: block; color: var(--mute); font-size: 12px; }
}
@media (min-width: 561px) { .exam td.major small { display: none; } }
footer a { color: var(--navy2); word-break: break-all; }
