﻿:root{color-scheme:light;--bg:#f7f8fb;--panel:#fff;--ink:#172033;--muted:#617086;--line:#dbe2ec;--accent:#176b87;--accent-strong:#0f4f65;--rush:#b64228;--steady:#176b87;--safe:#2d7b48;--shadow:0 18px 45px rgba(23,32,51,.08)}*{box-sizing:border-box}body{margin:0;min-width:320px;background:var(--bg);color:var(--ink);font-family:"Microsoft YaHei","PingFang SC","Segoe UI",Arial,sans-serif;letter-spacing:0}button,input,select{font:inherit}button{cursor:pointer}.app-shell{width:min(1180px,calc(100% - 32px));margin:0 auto;padding:28px 0 48px}.search-panel,.summary-band,.results{background:var(--panel);border:1px solid var(--line);box-shadow:var(--shadow)}.search-panel{padding:24px;border-radius:8px}.brand-row{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:20px}.eyebrow{margin:0 0 6px;color:var(--accent);font-size:14px;font-weight:700}h1{margin:0;font-size:clamp(28px,4vw,44px);line-height:1.1}.controls-grid,.advanced-grid{display:grid;grid-template-columns:180px 1fr 280px;gap:16px;align-items:end}.field{display:grid;gap:8px}.field span,.subject-field legend,.summary-label{color:var(--muted);font-size:13px;font-weight:700}.field input,.field select,#sortSelect{width:100%;min-height:44px;border:1px solid var(--line);border-radius:6px;padding:0 12px;background:#fff;color:var(--ink)}.score-field input{font-size:28px;font-weight:800}.subject-field{min-width:0;margin:0;padding:0;border:0}.subject-options{display:grid;grid-template-columns:repeat(6,minmax(64px,1fr));gap:8px}.subject-options label,.toggle{min-height:44px;display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:6px;padding:0 12px;background:#fff;color:var(--ink);white-space:nowrap}input[type=checkbox]{width:16px;height:16px;accent-color:var(--accent)}.advanced{margin-top:18px;border-top:1px solid var(--line);padding-top:16px}.advanced summary{color:var(--accent-strong);font-weight:800;margin-bottom:14px}.advanced-grid{grid-template-columns:repeat(4,minmax(0,1fr));align-items:end}.summary-band{margin-top:18px;border-radius:8px;padding:16px 20px;display:grid;grid-template-columns:repeat(3,1fr) auto;gap:14px;align-items:center}.summary-band div{display:grid;gap:4px}.summary-band strong{font-size:24px}#exportBtn{min-height:42px;border:0;border-radius:6px;padding:0 16px;background:var(--accent);color:#fff;font-weight:800}.tabs{display:flex;gap:8px;margin:18px 0 0;overflow-x:auto}.tab{min-width:108px;min-height:42px;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--muted);font-weight:800}.tab.active{border-color:var(--accent);background:var(--accent);color:#fff}.results{margin-top:12px;border-radius:8px;overflow:hidden}.result-head{min-height:62px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line)}#resultHint{margin:0;color:var(--muted)}#sortSelect{max-width:180px}.result-list{display:grid}.result-row{display:grid;grid-template-columns:minmax(170px,1.2fr) minmax(260px,2fr) 92px 86px 120px;gap:14px;padding:16px;border-bottom:1px solid var(--line);align-items:start}.result-row:last-child{border-bottom:0}.school-name,.major-name{font-weight:850;line-height:1.35}.meta{margin-top:8px;color:var(--muted);font-size:13px;line-height:1.5}.score-pill,.bucket-pill{display:inline-flex;align-items:center;justify-content:center;min-height:32px;border-radius:999px;padding:0 10px;font-weight:850;white-space:nowrap}.score-pill{background:#edf4f7;color:var(--accent-strong)}.bucket-pill{color:#fff}.bucket-rush{background:var(--rush)}.bucket-steady{background:var(--steady)}.bucket-safe{background:var(--safe)}.tag-list{display:flex;flex-wrap:wrap;gap:6px}.tag{border:1px solid var(--line);border-radius:999px;padding:5px 8px;color:var(--muted);font-size:12px;background:#fff}.empty{padding:38px 18px;text-align:center;color:var(--muted)}@media (max-width:900px){.brand-row,.result-head{display:grid}.controls-grid,.advanced-grid,.summary-band{grid-template-columns:1fr}.subject-options{grid-template-columns:repeat(3,minmax(0,1fr))}.result-row{grid-template-columns:1fr}#sortSelect{max-width:none}}@media (max-width:520px){.app-shell{width:min(100% - 20px,1180px);padding-top:16px}.search-panel{padding:18px}.subject-options{grid-template-columns:repeat(2,minmax(0,1fr))}}


.school-group {
  content-visibility: auto;
  contain-intrinsic-size: 0 420px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.school-group:last-child {
  border-bottom: 0;
}

.school-group-head {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px;
  background: #fbfcfe;
  border-bottom: 1px solid var(--line);
}

.major-list {
  display: grid;
}

.major-row {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) 190px 86px 150px;
  gap: 14px;
  padding: 14px 16px 14px 28px;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.major-row:last-child {
  border-bottom: 0;
}

@media (max-width: 900px) {
  .school-group-head,
  .major-row {
    grid-template-columns: 1fr;
  }

  .major-row {
    padding-left: 16px;
  }
}

.top-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.text-link {
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.major-group {
  border-top: 1px solid var(--line);
}

.major-group:first-child {
  border-top: 0;
}

.major-group-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  padding: 10px 16px 10px 28px;
  background: #f5f8fb;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.major-group-head strong {
  color: var(--accent-strong);
  font-size: 14px;
}

.notice-page .search-panel {
  margin-bottom: 18px;
}

.notice-disclaimer {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  background: #fbfcfe;
  color: var(--muted);
  line-height: 1.7;
}

.notice-card {
  padding: 22px;
}

.notice-content {
  display: grid;
  gap: 14px;
  color: var(--ink);
  line-height: 1.85;
}

.notice-content p {
  margin: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  white-space: normal;
}

.notice-content p:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

@media (max-width: 900px) {
  .top-actions {
    justify-items: start;
  }

  .major-group-head {
    padding-left: 16px;
  }
}

.image-card {
  padding: 12px;
  overflow: auto;
}

.notice-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.school-name {
  color: #c61212;
  font-weight: 900;
}

.school-name-button,
.major-name-button {
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.school-name-button {
  color: #c61212;
  font-size: inherit;
  font-weight: 900;
}

.major-name-button {
  color: var(--ink);
  font-size: inherit;
  font-weight: 850;
}

.school-name-button:hover,
.major-name-button:hover,
.school-name-button:focus-visible,
.major-name-button:focus-visible {
  text-decoration: underline;
}

.guard-panel {
  position: fixed;
  inset: auto 18px 18px auto;
  z-index: 50;
  width: min(360px, calc(100% - 36px));
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(182, 66, 40, 0.22);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(23, 32, 51, 0.16);
  color: var(--ink);
}

.guard-panel strong {
  color: var(--rush);
}

.guard-panel span {
  color: var(--muted);
  line-height: 1.6;
}

body.guard-blocked .app-shell {
  pointer-events: none;
  opacity: 0.64;
}

body.modal-open {
  overflow: hidden;
}

.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 24, 40, 0.42);
}

.detail-modal[hidden] {
  display: none;
}

.detail-dialog {
  width: min(760px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(23, 32, 51, 0.22);
}

.detail-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.detail-head h2 {
  margin: 0;
  font-size: 24px;
}

.detail-close {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: #fff;
  color: var(--accent-strong);
  font-weight: 800;
}

.detail-body {
  padding: 22px;
}

.detail-card {
  display: grid;
  gap: 18px;
}

.detail-loading {
  color: var(--muted);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-section {
  display: grid;
  gap: 8px;
}

.detail-section h3 {
  margin: 0;
  font-size: 16px;
  color: var(--accent-strong);
}

.detail-section p {
  margin: 0;
  color: var(--ink);
  line-height: 1.8;
  white-space: pre-line;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-item {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.detail-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.detail-item strong {
  color: var(--ink);
  line-height: 1.5;
}

.detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.detail-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(23, 107, 135, 0.28);
  border-radius: 6px;
  background: #e8f4f8;
  color: #0a4a60;
  font-size: 16px;
  font-weight: 900;
  text-decoration: none;
}

.detail-links a:hover {
  border-color: var(--accent);
  background: #d7edf4;
}

@media (max-width: 640px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.query-actions {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

#queryBtn {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 0 24px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

#queryBtn:hover {
  background: var(--accent-strong);
}

.keyword-field textarea {
  width: 100%;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  line-height: 1.5;
  resize: vertical;
}

.previous-score-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  white-space: normal;
}

.score-chart-card {
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.score-chart-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.score-chart-head > div {
  display: grid;
  gap: 4px;
}

.score-chart-head strong {
  font-size: 20px;
}

#scoreChartNote {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.score-chart-wrap {
  position: relative;
  overflow: visible;
  padding: 12px 0 6px;
}

.score-chart {
  width: 100%;
  min-width: 0;
  height: 188px;
  display: flex;
  align-items: end;
  gap: 0;
  padding: 0 2px 20px;
  border-bottom: 1px solid var(--line);
}

.score-bar {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: rgba(23, 107, 135, 0.34);
  padding: 0;
}

.score-bar:hover,
.score-bar:focus-visible {
  background: var(--accent);
  outline: 0;
}

.score-bar.active {
  background: var(--rush);
  box-shadow: 0 0 0 2px rgba(182, 66, 40, 0.16);
}

.score-bar.active::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rush);
  transform: translateX(-50%);
}

.score-tooltip {
  position: absolute;
  z-index: 4;
  transform: translateY(-100%);
  padding: 7px 10px;
  border-radius: 6px;
  background: #172033;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.2);
}

@media (max-width: 640px) {
  .score-chart-head {
    display: grid;
    align-items: start;
  }
}

[hidden] {
  display: none !important;
}

.agent-page {
  background:
    radial-gradient(circle at 12% 10%, rgba(23, 107, 135, 0.16), transparent 28%),
    linear-gradient(145deg, #f7f8fb 0%, #edf4f7 45%, #faf6ee 100%);
}

.agent-shell {
  display: grid;
  gap: 18px;
}

.agent-hero,
.agent-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.agent-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 26px;
}

.agent-subtitle {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.agent-card {
  padding: 22px;
}

.agent-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.agent-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.agent-gate {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 420px);
  gap: 22px;
  align-items: end;
}

.agent-gate-form,
.agent-form {
  display: grid;
  gap: 12px;
}

.agent-gate button,
.agent-form button,
.agent-secondary {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: var(--accent);
  color: #fff;
  font-weight: 850;
}

.agent-secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent-strong);
}

.agent-message {
  min-height: 22px;
  color: var(--muted);
  font-size: 13px;
}

.agent-chat {
  display: grid;
  gap: 16px;
}

.agent-chat-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.agent-messages {
  height: min(54vh, 560px);
  min-height: 320px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72)),
    repeating-linear-gradient(135deg, rgba(23, 107, 135, 0.06) 0 1px, transparent 1px 12px);
}

.agent-message-row {
  max-width: min(760px, 92%);
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.agent-message-row strong {
  color: var(--accent-strong);
}

.agent-message-row p {
  white-space: pre-wrap;
  color: var(--ink);
}

.agent-message-user {
  justify-self: end;
  background: #edf4f7;
}

.agent-message-assistant {
  justify-self: start;
}

.agent-form textarea,
.keyword-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  resize: vertical;
  background: #fff;
  color: var(--ink);
}

.agent-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

@media (max-width: 760px) {
  .agent-hero,
  .agent-gate,
  .agent-chat-head,
  .agent-form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .agent-messages {
    min-height: 360px;
  }
}
