:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #1f302e;
  background: #f5f7f5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --muted: #6f7d79;
  --line: #e5ebe7;
  --green: #276c59;
  --green-dark: #1e5848;
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; }

button, input, select { font: inherit; }

.site-header {
  height: 70px;
  padding: 0 max(24px, calc((100vw - 1160px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, .86);
  border-bottom: 1px solid #e9eeeb;
}

.brand, .home-link { display: inline-flex; align-items: center; text-decoration: none; }

.brand { gap: 10px; color: #223632; font-weight: 750; letter-spacing: .02em; }

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--green);
  font-size: 18px;
}

.home-link { gap: 8px; color: #52645e; font-size: 13px; }
.home-link:hover { color: var(--green); }

.page-shell { width: min(1160px, calc(100% - 48px)); margin: 0 auto; }

.intro { padding: 66px 0 40px; }

.eyebrow, .section-kicker {
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
}

.eyebrow { display: flex; align-items: center; gap: 9px; }
.eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: #c79352; }

h1 { margin: 18px 0 12px; font-size: clamp(34px, 5vw, 54px); letter-spacing: -.055em; }
h1 em { color: var(--green); font-style: normal; }
.intro-copy { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }

.stats { display: flex; gap: 42px; margin-top: 32px; }
.stats div { display: flex; align-items: baseline; gap: 7px; }
.stats strong { font-size: 25px; font-weight: 750; letter-spacing: -.04em; }
.stats span { color: var(--muted); font-size: 13px; }

.search-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(36, 62, 51, .045);
}

.search-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 26px 28px 20px;
}
.section-kicker { letter-spacing: .1em; }
.search-heading h2 { margin: 5px 0 0; font-size: 23px; letter-spacing: -.03em; }
.reset-button {
  border: 0;
  color: var(--green);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
}
.reset-button:hover { color: var(--green-dark); }

.filters { display: grid; grid-template-columns: 1fr 1fr .85fr; gap: 14px; padding: 0 28px 22px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field > span { color: #5d6d68; font-size: 12px; font-weight: 700; }
.combination-field {
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px;
  border: 1px solid #e5ebe7;
  border-radius: 9px;
}
.combination-field legend { padding: 0 5px; color: #5d6d68; font-size: 12px; font-weight: 700; }
.combination-hint { margin: 0; color: var(--muted); font-size: 12px; }
.combination-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.combination-select-field { display: grid; gap: 7px; min-width: 0; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}
.combination-select-field select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #dfe7e2;
  border-radius: 7px;
  outline: none;
  color: #263b35;
  background: #fff;
  font: inherit;
  font-size: 13px;
}
.combination-select-field select:focus {
  border-color: #78a993;
  box-shadow: 0 0 0 3px #e9f3ed;
}
.combination-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}
.field input, .field select {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid #dfe7e2;
  border-radius: 8px;
  outline: none;
  color: #263b35;
  background: #fff;
  font-size: 13px;
}
.field input:focus, .field select:focus { border-color: #78a993; box-shadow: 0 0 0 3px #e9f3ed; }
.field input::placeholder { color: #9aa6a1; }

.result-summary {
  min-height: 54px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #edf1ee;
  color: var(--muted);
  font-size: 12px;
}

.download-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #d5e4dc;
  border-radius: 7px;
  color: var(--green);
  background: #f8fbf9;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.download-button:hover:not(:disabled) { border-color: #a9c9b8; background: #f0f7f2; }
.download-button:disabled { opacity: .5; cursor: default; }

.table-wrap { overflow-x: auto; border-top: 1px solid #edf1ee; }
table { width: 100%; border-collapse: collapse; text-align: left; }
thead { background: #f8faf8; }
th { height: 43px; color: #66756f; font-size: 11px; font-weight: 700; }
th, td { padding: 0 18px; }
th:first-child, td:first-child { padding-left: 28px; }
th:last-child, td:last-child { padding-right: 28px; }
td { height: 62px; border-top: 1px solid #eff2f0; font-size: 13px; }
tbody tr:hover { background: #fbfdfb; }
.school-name { display: block; color: #263a34; font-weight: 700; }
.school-code {
  display: block;
  margin-top: 4px;
  color: #9aa49f;
  font-size: 10px;
  letter-spacing: .04em;
}
.major-name { display: block; color: #263a34; font-weight: 650; }
.major-code { display: block; margin-top: 4px; color: #9aa49f; font-size: 10px; }
.requirement {
  display: inline-block;
  padding: 6px 9px;
  border-radius: 6px;
  color: #415e50;
  background: #eff6f0;
  font-size: 11px;
  line-height: 1.5;
}
.requirement.open { color: #86643e; background: #fbf5eb; }

.empty-state, .error-state { padding: 70px 20px; text-align: center; }
.empty-state strong { display: block; color: #43544e; font-size: 15px; }
.empty-state span { display: block; margin-top: 8px; color: #84918b; font-size: 12px; }
.error-state { color: #a14941; font-size: 13px; }
.hidden { display: none !important; }

.pagination {
  min-height: 66px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border-top: 1px solid #edf1ee;
}
.pagination span { min-width: 90px; color: #75817c; text-align: center; font-size: 12px; }
.page-button {
  padding: 8px 11px;
  border: 1px solid #dfe7e2;
  border-radius: 7px;
  color: #41534c;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
}
.page-button:hover:not(:disabled) { border-color: #a9c9b8; color: var(--green); }
.page-button:disabled { color: #adb6b1; cursor: default; }

.source-note {
  display: flex;
  gap: 11px;
  align-items: start;
  padding: 22px 2px 40px;
  color: #7d8983;
}
.source-mark {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: grid;
  place-items: center;
  border: 1px solid #b9c9bf;
  border-radius: 50%;
  color: #658071;
  font: 700 11px Georgia, serif;
}
.source-note p { margin: 0; font-size: 11px; line-height: 1.8; }
.source-note a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
.source-note a:hover { color: var(--green-dark); }

@media (max-width: 760px) {
  .site-header { height: 60px; padding: 0 20px; }
  .page-shell { width: calc(100% - 32px); }
  .intro { padding: 47px 0 31px; }
  .intro-copy { max-width: 520px; font-size: 13px; }
  .stats { gap: 24px; margin-top: 25px; }
  .stats strong { font-size: 21px; }
  .search-heading { padding: 22px 18px 17px; }
  .filters { grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 18px 18px; }
  .field:last-child { grid-column: 1 / -1; }
  .result-summary { padding: 0 18px; }
  th, td { padding: 0 12px; }
  th:first-child, td:first-child { padding-left: 18px; }
  th:last-child, td:last-child { padding-right: 18px; }
  th:first-child { min-width: 150px; }
  th:nth-child(2) { min-width: 160px; }
  th:nth-child(3) { min-width: 260px; }
  .pagination { padding: 0 14px; }
}

@media (max-width: 480px) {
  .home-link { font-size: 12px; }
  h1 { font-size: 34px; }
  .stats { justify-content: space-between; gap: 8px; }
  .stats div { gap: 5px; }
  .stats strong { font-size: 19px; }
  .stats span { font-size: 11px; }
  .filters { grid-template-columns: 1fr; }
  .field:last-child { grid-column: auto; }
  .combination-field { grid-column: auto; }
  .combination-options { grid-template-columns: 1fr; }
  .combination-footer { align-items: flex-start; }
  .search-heading h2 { font-size: 21px; }
}
