:root {
  --ink: #17211b;
  --muted: #647068;
  --line: #dce3de;
  --paper: #f7f9f7;
  --white: #ffffff;
  --green: #176b4d;
  --green-soft: #e7f2ec;
  --gold: #bd7928;
  --blue: #2f668d;
  --danger: #9a403c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, "Microsoft YaHei", "PingFang SC", sans-serif; letter-spacing: 0; }
button, input, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.hidden { display: none !important; }

.topbar { height: 64px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; background: var(--white); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 750; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; color: white; background: var(--green); border-radius: 6px; }
.data-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #56a67b; box-shadow: 0 0 0 4px #e4f3e9; }
.help-banner { min-height: 68px; padding: 9px 28px; display: grid; place-items: center; gap: 2px; color: #b75509; background: #fff4e8; border-bottom: 1px solid #edc79f; font-size: 14px; line-height: 1.55; text-align: center; }
.help-contact-line { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 20px; }
.help-banner strong { color: #d5620b; font-weight: 800; }
.help-banner span { font-weight: 700; }
.help-banner p { margin: 0; color: #c05c10; font-size: 13px; font-weight: 700; }

.search-band { padding: 38px max(28px, calc((100vw - 1460px) / 2)); background: #edf3ef; border-bottom: 1px solid var(--line); }
.search-copy { max-width: 720px; }
.eyebrow, .section-kicker { margin: 0 0 8px; color: var(--green); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.search-copy h1 { margin: 0; max-width: 720px; font-size: clamp(30px, 4vw, 48px); line-height: 1.18; font-family: "Noto Serif SC", SimSun, serif; font-weight: 700; }
.search-copy > p:last-child { margin: 12px 0 24px; color: var(--muted); line-height: 1.7; }
.search-box { width: min(780px, 100%); height: 54px; display: flex; background: var(--white); border: 1px solid #aebdb3; border-radius: 6px; box-shadow: 0 8px 24px rgba(30, 60, 44, .07); overflow: hidden; }
.search-box:focus-within { outline: 3px solid rgba(23, 107, 77, .16); border-color: var(--green); }
.search-box input { min-width: 0; flex: 1; padding: 0 18px; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-box button, .ask-form button { min-width: 112px; padding: 0 20px; border: 0; color: white; background: var(--green); font-weight: 700; }
.search-box button:hover, .ask-form button:hover { background: #0e563d; }
.quick-searches { min-height: 32px; margin-top: 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 13px; }
.quick-searches button { padding: 4px 8px; color: var(--green); background: transparent; border: 0; border-bottom: 1px solid transparent; }
.quick-searches button:hover { border-bottom-color: var(--green); }
.filter-box { width: min(1060px, 100%); margin-top: 18px; padding: 16px; background: rgba(255, 255, 255, .72); border: 1px solid #cbd8d0; border-radius: 6px; }
.filter-heading { margin-bottom: 13px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.filter-heading div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 10px; }
.filter-heading span { color: var(--green); font-size: 17px; font-weight: 800; }
.filter-heading strong { font-size: 15px; }
.filter-heading > button { padding: 4px 7px; color: var(--muted); background: transparent; border: 0; text-decoration: underline; }
.filter-controls { display: grid; grid-template-columns: minmax(150px, 1fr) 170px minmax(360px, 1.6fr) auto; align-items: end; gap: 12px; }
.filter-field { min-width: 0; display: grid; gap: 6px; }
.filter-field > span, .dorm-options legend { color: #536158; font-size: 11px; font-weight: 700; }
.filter-field input, .filter-field select { width: 100%; height: 40px; padding: 0 10px; color: var(--ink); background: white; border: 1px solid #b9c7be; border-radius: 4px; outline: 0; }
.filter-field input:focus, .filter-field select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23, 107, 77, .1); }
.dorm-options { min-width: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(76px, 1fr)); gap: 6px; border: 0; }
.dorm-options legend { margin-bottom: 6px; }
.dorm-options label { min-height: 40px; padding: 7px 8px; display: flex; align-items: center; justify-content: center; gap: 5px; color: #445249; background: white; border: 1px solid #c4cec8; border-radius: 4px; font-size: 11px; text-align: center; }
.dorm-options label:has(input:checked) { color: var(--green); background: var(--green-soft); border-color: #86af99; font-weight: 700; }
.dorm-options input { width: 14px; height: 14px; accent-color: var(--green); }
.filter-submit { height: 40px; padding: 0 16px; color: white; background: var(--green); border: 0; border-radius: 4px; font-weight: 700; white-space: nowrap; }
.filter-submit:hover { background: #0e563d; }
.filter-note { margin: 9px 0 0; color: #778079; font-size: 10px; }

.workspace { width: min(1460px, 100%); min-height: calc(100vh - 300px); margin: 0 auto; display: grid; grid-template-columns: 300px minmax(430px, 1fr) 340px; background: var(--white); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.school-panel, .ask-panel { min-width: 0; padding: 24px 20px; }
.school-panel { border-right: 1px solid var(--line); }
.ask-panel { border-left: 1px solid var(--line); background: #fbfcfb; }
.detail-panel { min-width: 0; padding: 28px 32px 60px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.panel-heading h2 { margin: 0; font-size: 18px; line-height: 1.35; }
.count { flex: none; padding: 4px 7px; color: var(--muted); background: #eef1ef; border-radius: 4px; font-size: 12px; }
.school-list { display: grid; gap: 5px; }
.school-item { width: 100%; padding: 13px 12px; display: block; color: inherit; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 5px; }
.school-item:hover { background: #f1f5f2; }
.school-item.active { background: var(--green-soft); border-color: #bad6c7; }
.school-name { display: block; margin-bottom: 7px; font-weight: 700; line-height: 1.45; }
.school-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.school-filter-meta { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.school-filter-meta em { padding: 2px 5px; color: var(--green); background: #edf4f0; border-radius: 3px; font-size: 10px; font-style: normal; }
.loading, .no-results { padding: 28px 8px; color: var(--muted); text-align: center; line-height: 1.7; }

.empty-state { min-height: 440px; display: grid; place-content: center; justify-items: center; text-align: center; color: var(--muted); }
.empty-state h2 { margin: 18px 0 6px; color: var(--ink); font-size: 21px; }
.empty-state p { margin: 0; }
.empty-glyph { width: 72px; height: 72px; display: grid; place-items: center; color: var(--green); background: var(--green-soft); border: 1px solid #bfd8ca; border-radius: 50%; font-family: SimSun, serif; font-size: 28px; }
.detail-header { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.detail-header h2 { margin: 0 0 10px; font-family: "Noto Serif SC", SimSun, serif; font-size: 30px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 9px; color: var(--muted); font-size: 13px; }
.tag { padding: 4px 8px; color: var(--green); background: var(--green-soft); border-radius: 4px; }
.region-tag { color: #8a4c12; background: #fff0dd; }
.dorm-tag { color: var(--blue); background: #eaf1f6; }
.topic-nav { margin: 22px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.topic-nav button { padding: 7px 11px; color: var(--muted); background: white; border: 1px solid var(--line); border-radius: 4px; }
.topic-nav button:hover { color: var(--green); border-color: var(--green); }
.question-list { display: grid; gap: 12px; }
.question-card { border-bottom: 1px solid var(--line); }
.question-card summary { padding: 15px 4px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; cursor: pointer; font-weight: 700; line-height: 1.55; list-style: none; }
.question-card summary::-webkit-details-marker { display: none; }
.question-card summary::after { content: '+'; flex: none; color: var(--green); font-size: 20px; font-weight: 400; }
.question-card[open] summary::after { content: '−'; }
.responses { padding: 0 4px 16px; display: grid; gap: 9px; }
.response { padding: 11px 13px; color: #334139; background: #f3f6f4; border-left: 3px solid #8bb59f; line-height: 1.65; font-size: 14px; }
.response-id { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }

.selected-school { min-height: 40px; padding: 10px 12px; color: var(--muted); background: #eef1ef; border-radius: 5px; font-size: 13px; line-height: 1.5; }
.selected-school.ready { color: var(--green); background: var(--green-soft); font-weight: 700; }
.prompt-chips { margin: 15px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.prompt-chips button { min-height: 42px; padding: 8px; color: #405047; background: white; border: 1px solid var(--line); border-radius: 4px; font-size: 12px; line-height: 1.4; }
.prompt-chips button:hover { color: var(--green); border-color: #8fb7a2; }
.ask-form { display: grid; gap: 9px; }
.ask-form textarea { width: 100%; height: 100px; resize: vertical; padding: 12px; color: var(--ink); background: white; border: 1px solid #bdc8c1; border-radius: 5px; line-height: 1.55; outline: 0; }
.ask-form textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23, 107, 77, .12); }
.ask-form button { height: 42px; border-radius: 4px; }
.ask-form button:disabled { cursor: wait; opacity: .65; }
.answer-area { margin-top: 16px; }
.answer-box { padding: 15px; background: white; border: 1px solid #cbd6cf; border-radius: 5px; }
.answer-box h3 { margin: 0 0 8px; font-size: 14px; }
.answer-box p { margin: 0; color: #36443b; font-size: 13px; line-height: 1.75; }
.evidence { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.evidence details { margin-top: 5px; }
.evidence summary { color: var(--green); cursor: pointer; font-size: 12px; }
.evidence blockquote { margin: 8px 0; padding-left: 10px; color: var(--muted); border-left: 2px solid #c8d6ce; font-size: 12px; line-height: 1.6; }
.error { padding: 10px; color: var(--danger); background: #faeeee; border-radius: 4px; font-size: 13px; }
.disclaimer { margin: 16px 0 0; color: #7a837d; font-size: 11px; line-height: 1.65; }
.community-panel { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.community-heading h2 { margin: 0 0 16px; font-size: 18px; }
.community-form, .reply-form { display: grid; gap: 8px; }
.community-form label { font-size: 13px; font-weight: 700; }
.community-form textarea, .reply-form textarea, .community-form input, .reply-form input { width: 100%; padding: 10px; color: var(--ink); background: white; border: 1px solid #bdc8c1; border-radius: 4px; outline: 0; }
.community-form textarea { height: 78px; resize: vertical; }
.reply-form textarea { height: 62px; resize: vertical; font-size: 12px; }
.community-form textarea:focus, .reply-form textarea:focus, .community-form input:focus, .reply-form input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23, 107, 77, .1); }
.form-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.form-row button { min-width: 84px; padding: 0 12px; color: white; background: var(--green); border: 0; border-radius: 4px; font-size: 12px; font-weight: 700; }
.form-row button:disabled { cursor: wait; opacity: .6; }
.community-list-heading { margin: 22px 0 10px; display: flex; align-items: center; justify-content: space-between; }
.community-list-heading h3 { margin: 0; font-size: 14px; }
.community-list-heading button { width: 30px; height: 30px; color: var(--green); background: white; border: 1px solid var(--line); border-radius: 4px; font-size: 18px; }
.community-questions { display: grid; gap: 10px; }
.community-question { padding: 12px; background: white; border: 1px solid var(--line); border-radius: 5px; }
.community-question-head h4 { margin: 0 0 6px; font-size: 13px; line-height: 1.55; }
.community-question-head > span, .community-answer span { color: var(--muted); font-size: 10px; }
.community-answers { margin: 10px 0; display: grid; gap: 7px; }
.community-answer { padding: 8px 10px; background: #f2f6f3; border-left: 2px solid #8bb59f; }
.community-answer p { margin: 0 0 4px; font-size: 12px; line-height: 1.6; }
.waiting-answer, .community-empty { margin: 0; padding: 12px 4px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.success { margin: 10px 0; padding: 9px 10px; color: var(--green); background: var(--green-soft); border-radius: 4px; font-size: 12px; }

@media (max-width: 1100px) {
  .filter-controls { grid-template-columns: 1fr 170px; }
  .dorm-options { grid-column: 1 / -1; }
  .filter-submit { grid-column: 1 / -1; }
  .workspace { grid-template-columns: 270px 1fr; }
  .ask-panel { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
  .prompt-chips { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 720px) {
  .topbar { height: 58px; padding: 0 16px; }
  .help-banner { padding: 10px 16px; gap: 5px; font-size: 13px; }
  .help-contact-line { gap: 3px 12px; }
  .help-banner strong { width: 100%; }
  .help-banner p { font-size: 12px; }
  .data-status span:last-child { display: none; }
  .search-band { padding: 28px 16px; }
  .search-copy h1 { font-size: 32px; }
  .search-box { height: auto; flex-direction: column; overflow: visible; background: transparent; border: 0; box-shadow: none; }
  .search-box input { height: 50px; background: white; border: 1px solid #aebdb3; border-radius: 5px; }
  .search-box button { height: 46px; margin-top: 8px; border-radius: 5px; }
  .filter-box { padding: 13px; }
  .filter-controls { grid-template-columns: 1fr; }
  .room-field, .dorm-options, .filter-submit { grid-column: auto; }
  .dorm-options { grid-template-columns: 1fr 1fr; }
  .workspace { display: block; border: 0; }
  .school-panel, .ask-panel, .detail-panel { padding: 22px 16px; border: 0; border-bottom: 1px solid var(--line); }
  .school-list { grid-template-columns: 1fr 1fr; }
  .school-item { padding: 11px 9px; }
  .school-meta span:last-child { display: none; }
  .prompt-chips { grid-template-columns: 1fr 1fr; }
  .detail-header h2 { font-size: 26px; }
}
